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

7 lines
54 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.editWidgets=function(e){var t={};function r(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="F35A")}({"//Lo":function(e,t,r){"use strict";var n=r("GRId"),c=r("Tqx9");const i=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(c.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=i},"1ZqX":function(e,t){e.exports=window.wp.data},"6aBm":function(e,t){e.exports=window.wp.mediaUtils},Cg8A:function(e,t,r){"use strict";var n=r("GRId"),c=r("Tqx9");const i=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(c.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));t.a=i},F35A:function(e,t,r){"use strict";r.r(t),r.d(t,"initialize",(function(){return mt}));var n={};r.r(n),r.d(n,"persistStubPost",(function(){return B})),r.d(n,"saveEditedWidgetAreas",(function(){return R})),r.d(n,"saveWidgetAreas",(function(){return C})),r.d(n,"saveWidgetArea",(function(){return W})),r.d(n,"setWidgetIdForClientId",(function(){return L})),r.d(n,"setWidgetAreasOpenState",(function(){return P})),r.d(n,"setIsWidgetAreaOpen",(function(){return M})),r.d(n,"setIsInserterOpened",(function(){return G})),r.d(n,"closeGeneralSidebar",(function(){return D})),r.d(n,"moveBlockToWidgetArea",(function(){return F})),r.d(n,"__unstableToggleFeature",(function(){return V}));var c={};r.r(c),r.d(c,"getWidgetAreas",(function(){return U})),r.d(c,"getWidgets",(function(){return q}));var i={};r.r(i),r.d(i,"getWidgets",(function(){return z})),r.d(i,"getWidget",(function(){return H})),r.d(i,"getWidgetAreas",(function(){return K})),r.d(i,"getWidgetAreaForWidgetId",(function(){return Q})),r.d(i,"getEditedWidgetAreas",(function(){return Y})),r.d(i,"getReferenceWidgetBlocks",(function(){return J})),r.d(i,"isSavingWidgetAreas",(function(){return X})),r.d(i,"getIsWidgetAreaOpen",(function(){return Z})),r.d(i,"isInserterOpened",(function(){return $})),r.d(i,"canInsertBlockInWidgetArea",(function(){return ee})),r.d(i,"__unstableIsFeatureActive",(function(){return te}));var o={};r.r(o),r.d(o,"metadata",(function(){return me})),r.d(o,"name",(function(){return ge})),r.d(o,"settings",(function(){return pe}));var a=r("GRId"),s=r("HSyU"),l=r("QyPg"),d=r("jZUy"),u=r("GLVC"),b=r("ywyh"),m=r.n(b),g=r("1ZqX"),p=r("YLtl");const O=Object(p.flow)([g.combineReducers,(j={features:{fixedToolbar:!1,welcomeGuide:!0}},e=>(t=j,r)=>e(t,r))])({features:(e,t)=>"TOGGLE_FEATURE"===t.type?{...e,[t.feat
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 10:10:04 +02:00
*/!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var o=c.apply(null,n);o&&e.push(o)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n)}()},Tqx9:function(e,t){e.exports=window.wp.primitives},TvNi:function(e,t){e.exports=window.wp.plugins},U60i:function(e,t,r){"use strict";r.d(t,"g",(function(){return j})),r.d(t,"b",(function(){return F})),r.d(t,"c",(function(){return L})),r.d(t,"d",(function(){return U})),r.d(t,"e",(function(){return z})),r.d(t,"f",(function(){return M})),r.d(t,"a",(function(){return C}));var n={};r.r(n),r.d(n,"enableComplementaryArea",(function(){return d})),r.d(n,"disableComplementaryArea",(function(){return u})),r.d(n,"pinItem",(function(){return m})),r.d(n,"unpinItem",(function(){return g}));var c={};r.r(c),r.d(c,"getActiveComplementaryArea",(function(){return p})),r.d(c,"isItemPinned",(function(){return O}));var i=r("1ZqX"),o=r("YLtl");const a=Object(i.combineReducers)({singleEnableItems:function(e={},{type:t,itemType:r,scope:n,item:c}){return"SET_SINGLE_ENABLE_ITEM"===t&&r&&n?{...e,[r]:{...e[r],[n]:c||null}}:e},multipleEnableItems:function(e={},{type:t,itemType:r,scope:n,item:c,isEnable:i}){if("SET_MULTIPLE_ENABLE_ITEM"!==t||!r||!n||!c||Object(o.get)(e,[r,n,c])===i)return e;const a=e[r]||{},s=a[n]||{};return{...e,[r]:{...a,[n]:{...s,[c]:i||!1}}}}});var s=Object(i.combineReducers)({enableItems:a});function l(e,t,r){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:r}}function d(e,t){return l("complementaryArea",e,t)}function u(e){return l("complementaryArea",e,void 0)}function b(e,t,r,n){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:r,isEnable:n}}function m(e,t){return b("pinnedItems",e,t,!0)}function g(e,t){return b("pinnedItems",e,t,!1)}function p(e,t){return function(e,t,r){return Object(o.get)(e.enableItems.singleEnableItems,[t,r])}(e,"complementaryArea",t)}function O(e,t,r){return!1!==function(e,t,r,n){return Object(o.get)(e.enableItems.multipleEnableItems,[t,r,n])}(e,"pinnedItems",t,r)}const j=Object(i.createReduxStore)("core/interface",{reducer:s,actions:n,selectors:c,persist:["enableItems"]});Object(i.registerStore)("core/interface",{reducer:s,actions:n,selectors:c,persist:["enableItems"]});var f=r("wx14"),_=r("GRId"),E=r("TSYQ"),w=r.n(E),h=r("tI+e"),y=r("l3Sj"),v=r("RMJe"),k=r("URob"),S=r("Xxwi"),I=r("KEfo"),A=r("bWcr"),x=r("TvNi"),T=Object(x.withPluginContext)((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`}));var N=T((function({as:e=h.Button,scope:t,identifier:r,icon:n,selectedIcon:c,...a}){const s=e,l=Object(i.useSelect)(e=>e(j).getActiveComplementaryArea(t)===r,[r]),{enableComplementaryArea:d,disableComplementaryArea:u}=Object(i.useDispatch)(j);return Object(_.createElement)(s,Object(f.a)({icon:c&&l?c:n,onClick:()=>{l?u(t):d(t,r)}},Object(o.omit)(a,["name"])))}));var B=({smallScreenTitle:e,children:t,className:r,toggleButtonProps:n})=>{const c=Object(_.createElement)(N,Object(f.a)({icon:A.a},n));return Object(_.createElement)(_.Fragment,null,Object(_.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},e&&Object(_.createElement)("span",{className:"interface-complementary-area-header__small-title"},e),c),Object(_.createElement)("div",{className:w()("components-panel__header","interface-complementary-area-header",r),tabIndex:-1},t,c))};function R({name:e,as:t=h.Button,onClick:r,...n}){return Object(_.createElement)(h.Fill,{name:e},({onClick:e})=>Object(_.createElement)(t,Object(f.a)({onClick:r||e?(...t)=>{(r||o.noop)(...t),(e||o.noop)(...t)}:void 0},n)))}R.Slot=function({name:e,as:t=h.ButtonGroup,fillProps:r={},bubblesVirtually:n,...c}){return Object(_.createElement)(h.Slot,{name:e,bubblesVirtually:n,fillProps:r},e=>