WordPress/wp-includes/js/dist/customize-widgets.min.js

7 lines
50 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
Update @wordpress packages Update packages to include these bug fixes from Gutenberg: - FSE: Add welcome guide - Update theme styles for the code block - Add feature flag to toggle the new site editor sidebar - Add templates list page for site editor - Cover Block: Fix default background dim - E2E: Add more Cover block tests - Cover Block: Fix regressions - Post Comments Form: ensure typography styles are applied to child elements - Navigation: Fix space-between - Fix background colours in nested submenus. - Fix duplicate custom classnames in navigation submenu block - Fix colour rendering in Navigation overlay - Fix: Add ability to opt out of Core color palette V2 - Change @package to WordPress in block-library - Make the core color palette opt-in for themes with not theme.json - Remove textdomain from calendar block - Page List block: fix space before href attribute - Try: Let Featured Image block inherit dimensions, look like a placeholder - [Global Styles]: Add block icon next to blocks list - Page List: Use core entities instead of direct apiFetch - Site Editor: Stabilize export endpoint - Fix mobile horizontal scrollbar. - Multi-entity save: Only set site entity to pending if really saving - Add page list to navigation direct insert conditions - Implement "Add New" for templates list in Site Editor - Post Featured Image: Remove withNotices HOC - Fix page list missing button styles when set to open on click. - Make appender fixed position to avoid jumps in the UI - Color UI component: reorder palettes and update names (core by defaults, user by custom) - Remove the Styles link in Site Editor - GlobalStyles sidebar: do not show default palette if theme opts-out - Only render the site editor canvas when the global styles are ready. - Global Styles: rename core origin key to default for presets - Clarify i18n context for PostTemplateActions's "New" label - Revert erroneous native editor package version bumps - Try: Hide the columns inserter in pattern previews. - Fix site editor region navigation - Update navigation sidebar responsiveness - Add _wp_array_set and _wp_to_kebab_case to 5.8 compat - Make user able to change all color palette origins - Site Editor: Update hrefs to not specifically refer to themes.php?page=gutenberg-edit-site - Site Editor: Validate the postType query argument - Navigation: Scale submenu icon. - Move the theme editor under tools for FSE themes - Deprecate navigation areas See #54487. Built from https://develop.svn.wordpress.org/trunk@52232 git-svn-id: http://core.svn.wordpress.org/trunk@51824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-23 00:40:38 -05:00
this.wp=this.wp||{},this.wp.customizeWidgets=function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="9pbN")}({"1CF3":function(e,t){e.exports=window.wp.dom},"1ZqX":function(e,t){e.exports=window.wp.data},"6aBm":function(e,t){e.exports=window.wp.mediaUtils},"9pbN":function(e,t,n){"use strict";n.r(t),n.d(t,"initialize",(function(){return ke}));var r={};n.r(r),n.d(r,"isInserterOpened",(function(){return z})),n.d(r,"__experimentalGetInsertionPoint",(function(){return T}));var c={};n.r(c),n.d(c,"setIsInserterOpened",(function(){return B}));var i=n("GRId"),s=n("QyPg"),o=n("GLVC"),a=n("HSyU"),l=n("1ZqX"),d=n("U60i"),u=n("tI+e"),b=n("hF7m"),m=n("l3Sj"),p=n("axFQ"),h=n("K9lf");function g(e){let{text:t,children:n}=e;const r=Object(h.useCopyToClipboard)(t);return Object(i.createElement)(u.Button,{variant:"secondary",ref:r},n)}class f extends i.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){this.setState({error:e})}render(){const{error:e}=this.state;return e?Object(i.createElement)(p.Warning,{className:"customize-widgets-error-boundary",actions:[Object(i.createElement)(g,{key:"copy-error",text:e.stack},Object(m.__)("Copy Error"))]},Object(m.__)("The editor has encountered an unexpected error.")):this.props.children}}var O=n("YLtl"),j=n("jZUy"),_=n("6aBm"),w=n("wx14");var E=function(e){let{inspector:t,closeMenu:n,...r}=e;const c=Object(l.useSelect)(e=>e(p.store).getSelectedBlockClientId(),[]),s=Object(i.useMemo)(()=>document.getElementById("block-"+c),[c]);return Object(i.createElement)(u.MenuItem,Object(w.a)({onClick:()=>{t.open({returnFocusWhenClose:s}),n()}},r),Object(m.__)("Show more settings"))},v=n("TSYQ"),y=n.n(v),k=n("RxS6"),C=n("Ntru"),x=n("K2cm"),S=n("Q4Sy"),I=n("bWcr");function z(e){return!!e.blockInserterPanel}function T(e){const{rootClientId:t,insertionIndex:n}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:n}}function B(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}const N={reducer:Object(l.combineReducers)({blockInserterPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_IS_INSERTER_OPENED":return t.value}return e}}),selectors:r,actions:c},W=Object(l.createReduxStore)("core/customize-widgets",N);Object(l.registerStore)("core/customize-widgets",N);var A=function e(t){let{setIsOpened:n}=t;const r=Object(h.useInstanceId)(e,"customize-widget-layout__inserter-panel-title"),c=Object(l.useSelect)(e=>e(W).__experimentalGetInsertionPoint(),[]);return Object(i.createElement)("div",{className:"customize-widgets-layout__inserter-panel","aria-labelledby":r},Object(i.createElement)("div",{className:"customize-widgets-layout__inserter-panel-header"},Object(i.createElement)("h2",{id:r,className:"customize-widgets-layout__inserter-panel-header-title"},Object(m.__)("Add a block")),Object(i.createElement)(u.Button,{className:"customize-widgets-layout__inserter-panel-header-close-button",icon:I.a,onClick:()=>n(!1),"aria-label":Object(m.__)("Close inserter")})),Object(i.createElement)("div",{className:"customize-widgets-layout__inserter-panel-content"},Object(i.createElement)(p.__experimentalLibrary,{rootClientId:c.rootClientId,__experimentalInsertionIn
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
Update @wordpress packages Update packages to include these bug fixes from Gutenberg: - FSE: Add welcome guide - Update theme styles for the code block - Add feature flag to toggle the new site editor sidebar - Add templates list page for site editor - Cover Block: Fix default background dim - E2E: Add more Cover block tests - Cover Block: Fix regressions - Post Comments Form: ensure typography styles are applied to child elements - Navigation: Fix space-between - Fix background colours in nested submenus. - Fix duplicate custom classnames in navigation submenu block - Fix colour rendering in Navigation overlay - Fix: Add ability to opt out of Core color palette V2 - Change @package to WordPress in block-library - Make the core color palette opt-in for themes with not theme.json - Remove textdomain from calendar block - Page List block: fix space before href attribute - Try: Let Featured Image block inherit dimensions, look like a placeholder - [Global Styles]: Add block icon next to blocks list - Page List: Use core entities instead of direct apiFetch - Site Editor: Stabilize export endpoint - Fix mobile horizontal scrollbar. - Multi-entity save: Only set site entity to pending if really saving - Add page list to navigation direct insert conditions - Implement "Add New" for templates list in Site Editor - Post Featured Image: Remove withNotices HOC - Fix page list missing button styles when set to open on click. - Make appender fixed position to avoid jumps in the UI - Color UI component: reorder palettes and update names (core by defaults, user by custom) - Remove the Styles link in Site Editor - GlobalStyles sidebar: do not show default palette if theme opts-out - Only render the site editor canvas when the global styles are ready. - Global Styles: rename core origin key to default for presets - Clarify i18n context for PostTemplateActions's "New" label - Revert erroneous native editor package version bumps - Try: Hide the columns inserter in pattern previews. - Fix site editor region navigation - Update navigation sidebar responsiveness - Add _wp_array_set and _wp_to_kebab_case to 5.8 compat - Make user able to change all color palette origins - Site Editor: Update hrefs to not specifically refer to themes.php?page=gutenberg-edit-site - Site Editor: Validate the postType query argument - Navigation: Scale submenu icon. - Move the theme editor under tools for FSE themes - Deprecate navigation areas See #54487. Built from https://develop.svn.wordpress.org/trunk@52232 git-svn-id: http://core.svn.wordpress.org/trunk@51824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-23 00:40:38 -05:00
*/!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var s=c.apply(null,r);s&&e.push(s)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var o in r)n.call(r,o)&&r[o]&&e.push(o);else e.push(r.toString())}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(r=function(){return c}.apply(t,[]))||(e.exports=r)}()},Tqx9:function(e,t){e.exports=window.wp.primitives},TvNi:function(e,t){e.exports=window.wp.plugins},U60i:function(e,t,n){"use strict";n.d(t,"b",(function(){return K})),n.d(t,"c",(function(){return D})),n.d(t,"d",(function(){return $})),n.d(t,"e",(function(){return Y})),n.d(t,"h",(function(){return V})),n.d(t,"f",(function(){return Z})),n.d(t,"g",(function(){return ee})),n.d(t,"a",(function(){return R})),n.d(t,"i",(function(){return W}));var r={};n.r(r),n.d(r,"enableComplementaryArea",(function(){return v})),n.d(r,"disableComplementaryArea",(function(){return y})),n.d(r,"pinItem",(function(){return C})),n.d(r,"unpinItem",(function(){return x})),n.d(r,"toggleFeature",(function(){return S})),n.d(r,"setFeatureValue",(function(){return I})),n.d(r,"setFeatureDefaults",(function(){return z}));var c={};n.r(c),n.d(c,"getActiveComplementaryArea",(function(){return T})),n.d(c,"isItemPinned",(function(){return B})),n.d(c,"isFeatureActive",(function(){return N}));var i=n("wx14"),s=n("GRId"),o=n("TSYQ"),a=n.n(o),l=n("tI+e"),d=n("1ZqX"),u=n("l3Sj"),b=n("RMJe"),m=n("URob"),p=n("Xxwi"),h=n("KEfo"),g=n("bWcr"),f=n("YLtl");const O=Object(d.combineReducers)({features(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_FEATURE_DEFAULTS"===t.type){const{scope:n,defaults:r}=t;return{...e,[n]:{...e[n],...r}}}return e}}),j=Object(d.combineReducers)({features(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_FEATURE_VALUE"===t.type){const{scope:n,featureName:r,value:c}=t;return{...e,[n]:{...e[n],[r]:c}}}return e}}),_=Object(d.combineReducers)({singleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:n,scope:r,item:c}=arguments.length>1?arguments[1]:void 0;return"SET_SINGLE_ENABLE_ITEM"===t&&n&&r?{...e,[n]:{...e[n],[r]:c||null}}:e},multipleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:n,scope:r,item:c,isEnable:i}=arguments.length>1?arguments[1]:void 0;if("SET_MULTIPLE_ENABLE_ITEM"!==t||!n||!r||!c||Object(f.get)(e,[n,r,c])===i)return e;const s=e[n]||{},o=s[r]||{};return{...e,[n]:{...s,[r]:{...o,[c]:i||!1}}}}});var w=Object(d.combineReducers)({enableItems:_,preferenceDefaults:O,preferences:j});function E(e,t,n){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:n}}function v(e,t){return E("complementaryArea",e,t)}function y(e){return E("complementaryArea",e,void 0)}function k(e,t,n,r){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:n,isEnable:r}}function C(e,t){return k("pinnedItems",e,t,!0)}function x(e,t){return k("pinnedItems",e,t,!1)}function S(e,t){return function(n){let{select:r,dispatch:c}=n;const i=r.isFeatureActive(e,t);c.setFeatureValue(e,t,!i)}}function I(e,t,n){return{type:"SET_FEATURE_VALUE",scope:e,featureName:t,value:!!n}}function z(e,t){return{type:"SET_FEATURE_DEFAULTS",scope:e,defaults:t}}function T(e,t){return function(e,t,n){return Object(f.get)(e.enableItems.singleEnableItems,[t,n])}(e,"complementaryArea",t)}function B(e,t,n){return!1!==function(e,t,n,r){return Object(f.get)(e.enableItems.multipleEnableItems,[t,n,r])}(e,"pinnedItems",t,n)}function N(e,t,n){var r,c;const i=null===(r=e.preferences.features[t])||void 0===r?void 0:r[n];return!!(void 0!==i?i:null===(c=e.preferenceDefaults.features[t])||void 0===c?void 0:c[n])}const W=Object(d.createReduxStore)("core/interface",{reducer:w,actions:r,selectors:c,persist:["enableItems","preferences"],__experimentalUseThunks: