From 9249a19410532579a3a92d2a5bbe2479bd945ffd Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 29 Aug 2024 13:35:24 -0500 Subject: [PATCH] Asset build. --- build/blocks.asset.php | 2 +- build/blocks.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/blocks.asset.php b/build/blocks.asset.php index 3d0df2d..92cc4d4 100644 --- a/build/blocks.asset.php +++ b/build/blocks.asset.php @@ -1 +1 @@ - array('wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'dcc6188c79d498894109'); + array('wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'c1fa9b0e2fd493ee1494'); diff --git a/build/blocks.js b/build/blocks.js index c346dc0..21c7304 100644 --- a/build/blocks.js +++ b/build/blocks.js @@ -1 +1 @@ -(()=>{"use strict";function e(){return e=Object.assign?Object.assign.bind():function(e){for(var i=1;i{let{}=e;const{blogPublic:n}=openlabBlocksPostVisibility,{editPost:r}=(0,s.useDispatch)("core/editor"),c=parseInt(n),{postVisibility:m}=(0,s.useSelect)((e=>{const i=e("core/editor").getEditedPostAttribute("meta"),t=c>=0?"default":"members-only";return{postVisibility:i.openlab_post_visibility||t}}));if(c<-1)return null;const p=[{value:"group-members-only",label:(0,l.__)("Site Members","commons-in-a-box"),info:(0,l.__)("Only members of the current site can see this post. This will override the Public visibility setting above.","commons-in-a-box")},{value:"members-only",label:(0,l.__)("Community members only","commons-in-a-box"),info:(0,l.__)("Only logged-in members of the community can see this post.","commons-in-a-box")}];return c>=0&&p.push({value:"default",label:(0,l.__)("Everyone","commons-in-a-box"),info:(0,l.__)("Everyone who can view this site can see this post.","commons-in-a-box")}),(0,i.createElement)(o.PluginDocumentSettingPanel,{name:"post-sharing-options",title:(0,l.__)("More visibility options","commons-in-a-box"),className:"post-sharing-options"},(0,i.createElement)("fieldset",{className:"editor-post-visibility__fieldset"},(0,i.createElement)(t.VisuallyHidden,{as:"legend"},(0,l.__)("Sharing","commons-in-a-box")),(0,i.createElement)("p",null,(0,l.__)("Control who can see this post.","commons-in-a-box")),p.map((e=>(0,i.createElement)(a,{key:e.value,instanceId:"post-sharing-options",value:e.value,label:e.label,info:e.info,onChange:e=>{return i=e.target.value,void r({meta:{openlab_post_visibility:i}});var i},checked:m===e.value})))))}})})(); \ No newline at end of file +(()=>{"use strict";function e(){return e=Object.assign?Object.assign.bind():function(e){for(var i=1;i{let{}=e;const{blogPublic:n}=openlabBlocksPostVisibility,{editPost:a}=(0,s.useDispatch)("core/editor"),c=parseInt(n),{postVisibility:m}=(0,s.useSelect)((e=>{const i=e("core/editor").getEditedPostAttribute("meta"),t=c>=0?"default":"members-only";return{postVisibility:i.openlab_post_visibility||t}}));if(c<-1)return null;const p=[{value:"group-members-only",label:(0,l.__)("Site Members","commons-in-a-box"),info:(0,l.__)("Only members of the current site can see this post. This will override the Public visibility setting above.","commons-in-a-box")},{value:"members-only",label:(0,l.__)("Community members only","commons-in-a-box"),info:(0,l.__)("Only logged-in members of the community can see this post.","commons-in-a-box")}];return c>=0&&p.push({value:"default",label:(0,l.__)("Everyone","commons-in-a-box"),info:(0,l.__)("Everyone who can view this site can see this post.","commons-in-a-box")}),(0,i.createElement)(o.PluginDocumentSettingPanel,{name:"post-sharing-options",title:(0,l.__)("More visibility options","commons-in-a-box"),className:"post-sharing-options"},(0,i.createElement)("fieldset",{className:"editor-post-visibility__fieldset"},(0,i.createElement)(t.VisuallyHidden,{as:"legend"},(0,l.__)("Sharing","commons-in-a-box")),(0,i.createElement)("p",null,(0,l.__)("Control who can see this post.","commons-in-a-box")),p.map((e=>(0,i.createElement)(r,{key:e.value,instanceId:"post-sharing-options",value:e.value,label:e.label,info:e.info,onChange:e=>{return i=e.target.value,void a({meta:{openlab_post_visibility:i}});var i},checked:m===e.value})))))};function r(t){let{instanceId:o,value:n,label:s,info:l,...a}=t;return(0,i.createElement)("div",{className:"editor-post-visibility__choice"},(0,i.createElement)("input",e({type:"radio",name:`editor-post-visibility__setting-${o}`,value:n,id:`editor-post-${n}-${o}`,"aria-describedby":`editor-post-${n}-${o}-description`,className:"editor-post-visibility__radio"},a)),(0,i.createElement)("label",{htmlFor:`editor-post-${n}-${o}`,className:"editor-post-visibility__label"},s),(0,i.createElement)("p",{id:`editor-post-${n}-${o}-description`,className:"editor-post-visibility__info"},l))}const c=()=>!(0,s.useSelect)((e=>!!e("core/edit-site")),[])&&(0,i.createElement)(a,null);wp.domReady((()=>{(0,n.registerPlugin)("post-sharing-options",{render:c,icon:"visibility"})}))})(); \ No newline at end of file