@10up/block-components
Version:
10up Components built for the WordPress Block Editor.
2 lines • 5.22 kB
JavaScript
!function(){var t={161:function(t,e,n){"use strict";n.d(e,{Zm:function(){return u}});var r=n(7966);const o={postId:void 0,postType:void 0,isEditable:void 0},s=(0,r.createContext)(o),u=()=>(0,r.useContext)(s)},283:function(t,e,n){"use strict";n.d(e,{YK:function(){return r.usePost}});n(3505),n(1210),n(1740),n(4512),n(6186),n(2516);var r=n(2312);n(4275),n(2131),n(703),n(8857),n(6856),n(687),n(1461),n(989),n(8021),n(8474),n(3445),n(2737),n(4449),n(3227)},2131:function(t,e,n){"use strict";n(5214),n(7816)},2516:function(t,e,n){"use strict";n(5214),n(2627)},4512:function(t,e,n){"use strict";n(7966);var r=require("@leeoniya/ufuzzy");new(n.n(r)())},4449:function(t,e,n){"use strict";n(2627),n(5214)},3505:function(t,e,n){"use strict";n(5214),n(2627)},1740:function(t,e,n){"use strict";n(5214),n(7966),n(8475)},687:function(t,e,n){"use strict";n(5214),n(7816)},2737:function(t,e,n){"use strict";n(7816),n(2312)},4275:function(t,e,n){"use strict";n(5214),n(7816)},6186:function(t,e,n){"use strict";n(5214),n(7816)},763:function(t,e,n){"use strict";n(6314)},989:function(t,e,n){"use strict";n(7966),n(2050),n(763)},8474:function(t,e,n){"use strict";n(7816),n(2312)},2312:function(t,e,n){"use strict";n.d(e,{usePost:function(){return u}});var r=n(5214),o=n(4951),s=n(161);function u(){const{postId:t,postType:e,isEditable:n}=(0,s.Zm)(),{globalPostId:u,globalPostType:i}=(0,r.useSelect)(t=>({globalPostId:t(o.store).getCurrentPostId(),globalPostType:t(o.store).getCurrentPostType()}),[]);return{postId:t||u,postType:e||i,isEditable:!(!!t&&!!e)||n}}},1461:function(t,e,n){"use strict";n(5214),n(8450),n(7816),n(2312),n(687),n(4275)},3227:function(t,e,n){"use strict";n(5214),n(2627)},1210:function(t,e,n){"use strict";n(3805),n(7816),n(5214)},8021:function(t,e,n){"use strict";n(7966)},703:function(t,e,n){"use strict";n(4951),n(5214),n(7816)},6856:function(t,e,n){"use strict";n(5214),n(7816)},8857:function(t,e,n){"use strict";n(2312),n(4275),n(2131),n(703),n(6856)},3445:function(t,e,n){"use strict";n(5214),n(7816)},7785:function(t,e,n){"use strict";var r={};n.r(r),n.d(r,{getIcon:function(){return f},getIconSet:function(){return i},getIconSets:function(){return u},getIcons:function(){return c}});var o={};n.r(o),n.d(o,{registerIconSet:function(){return a},removeIconSet:function(){return p}});var s=n(5214);function u(t){const{iconSets:e}=t;return Object.values(e)}function i(t,e){const{iconSets:n}=t;return n[e]??[]}function c(t,e){const{iconSets:n}=t;return n?.hasOwnProperty(e)?n[e]?.icons??[]:[]}function f(t,e,n){const{iconSets:r}=t;return r?.hasOwnProperty(e)?r[e]?.icons?.find(t=>t.name===n)??[]:void 0}function a(t){return{type:"REGISTER_ICON_SET",iconSet:t}}function p(t){return{type:"REMOVE_ICON_SET",name:t}}const d="tenup/icons",l=(0,s.createReduxStore)(d,{reducer:function(t={iconSets:{}},e){switch(e.type){case"REGISTER_ICON_SET":return{...t,iconSets:{...t.iconSets,[e.iconSet.name]:e.iconSet}};case"REMOVE_ICON_SET":if(t.iconSets.hasOwnProperty(e.name)){const n={...t};return delete n.iconSets[e.name],n}return t;default:return t}},selectors:r,actions:o});!!(0,s.select)(d)||(0,s.register)(l)},8475:function(t,e,n){"use strict";n(7785)},3805:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},2627:function(t){"use strict";t.exports=require("@wordpress/block-editor")},2050:function(t){"use strict";t.exports=require("@wordpress/components")},6314:function(t){"use strict";t.exports=require("@wordpress/compose")},7816:function(t){"use strict";t.exports=require("@wordpress/core-data")},5214:function(t){"use strict";t.exports=require("@wordpress/data")},4951:function(t){"use strict";t.exports=require("@wordpress/editor")},7966:function(t){"use strict";t.exports=require("@wordpress/element")},8450:function(t){"use strict";t.exports=require("@wordpress/i18n")}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var s=e[r]={exports:{}};return t[r](s,s.exports,n),s.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{PostTitle:function(){return c}});var t=n(7966),e=n(7816),o=n(2627),s=n(5214),u=n(283);function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i.apply(null,arguments)}const c=({tagName:n="h1",...r})=>{const{postId:c,postType:f,isEditable:a}=(0,u.YK)(),[p="",d,l]=(0,e.useEntityProp)("postType",f,"title",c),S=(0,s.useSelect)(t=>t(o.store).getSettings().titlePlaceholder,[]);return a?(0,t.createElement)(o.RichText,i({tagName:n,placeholder:S,value:p,onChange:t=>d(t),allowedFormats:[]},r)):(0,t.createElement)(n,i({},r,{dangerouslySetInnerHTML:{__html:l?.rendered}}))}}(),module.exports=r}();
//# sourceMappingURL=index.js.map