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

7 lines
55 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
Block Editor: Update the WordPress packages with the fixes for 5.8 beta 2. This includes: **Various** - Fix multi selection for nested blocks https://github.com/WordPress/gutenberg/pull/32536 - Consistently show the drop indicator while dragging blocks https://github.com/WordPress/gutenberg/pull/31896 - Fix horizontal drop indicator https://github.com/WordPress/gutenberg/pull/32589 - Fix Safari flickering issue https://github.com/WordPress/gutenberg/pull/32581 - Silence useSelect zombie bug errors https://github.com/WordPress/gutenberg/pull/32088 **Template Editor** - Clarify the template creation modal https://github.com/WordPress/gutenberg/pull/32427 - Only add skip links for block templates https://github.com/WordPress/gutenberg/pull/32451 **Widgets Editor** - Add block breadcrumb https://github.com/WordPress/gutenberg/pull/32498 https://github.com/WordPress/gutenberg/pull/32528 https://github.com/WordPress/gutenberg/pull/32569 - Saved deleted and restored widgets. https://github.com/WordPress/gutenberg/pull/32534 - Fix unsaved changes detection https://github.com/WordPress/gutenberg/pull/32573 - Fix button spacing in the header https://github.com/WordPress/gutenberg/pull/32585 - Avoid extra undo levels https://github.com/WordPress/gutenberg/pull/32572 - Move Legacy Widget block to the `@wordpress/widgets` package https://github.com/WordPress/gutenberg/pull/32501 - Fix Social Links color inheritance https://github.com/WordPress/gutenberg/pull/32625 - Use Button appender https://github.com/WordPress/gutenberg/pull/32580 **Global Styles (theme.json)** - Separate the presets per origin in the block editor settings https://github.com/WordPress/gutenberg/pull/32358 https://github.com/WordPress/gutenberg/pull/32622 - Use CSS Custom Properties for the preset styles https://github.com/WordPress/gutenberg/pull/32627 **Performance** - Remove is-typing classname to improve typing performance https://github.com/WordPress/gutenberg/pull/32567 Props nosolosw, jorgefilipecosta, aristath, ntsekouras, peterwilsoncc, mcsf. See #53397. Built from https://develop.svn.wordpress.org/trunk@51149 git-svn-id: http://core.svn.wordpress.org/trunk@50758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 10:52:30 +02:00
this.wp=this.wp||{},this.wp.editWidgets=function(e){var t={};function r(c){if(t[c])return t[c].exports;var n=t[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,c){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},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 c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(c,n,function(t){return e[t]}.bind(null,n));return c},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 c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.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 c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.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 c={};r.r(c),r.d(c,"persistStubPost",(function(){return N})),r.d(c,"saveEditedWidgetAreas",(function(){return C})),r.d(c,"saveWidgetAreas",(function(){return R})),r.d(c,"saveWidgetArea",(function(){return W})),r.d(c,"setWidgetIdForClientId",(function(){return L})),r.d(c,"setWidgetAreasOpenState",(function(){return P})),r.d(c,"setIsWidgetAreaOpen",(function(){return M})),r.d(c,"setIsInserterOpened",(function(){return G})),r.d(c,"closeGeneralSidebar",(function(){return D})),r.d(c,"moveBlockToWidgetArea",(function(){return F})),r.d(c,"__unstableToggleFeature",(function(){return V}));var n={};r.r(n),r.d(n,"getWidgetAreas",(function(){return U})),r.d(n,"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 a={};r.r(a),r.d(a,"metadata",(function(){return me})),r.d(a,"name",(function(){return ge})),r.d(a,"settings",(function(){return pe}));var o=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,showBlockBreadcrumbs:!0}},e=>(t=j,r)=>e(t,r))])({features:(e,t)=>"TOGGLE_FEATURE
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
Block Editor: Update the WordPress packages with the fixes for 5.8 beta 2. This includes: **Various** - Fix multi selection for nested blocks https://github.com/WordPress/gutenberg/pull/32536 - Consistently show the drop indicator while dragging blocks https://github.com/WordPress/gutenberg/pull/31896 - Fix horizontal drop indicator https://github.com/WordPress/gutenberg/pull/32589 - Fix Safari flickering issue https://github.com/WordPress/gutenberg/pull/32581 - Silence useSelect zombie bug errors https://github.com/WordPress/gutenberg/pull/32088 **Template Editor** - Clarify the template creation modal https://github.com/WordPress/gutenberg/pull/32427 - Only add skip links for block templates https://github.com/WordPress/gutenberg/pull/32451 **Widgets Editor** - Add block breadcrumb https://github.com/WordPress/gutenberg/pull/32498 https://github.com/WordPress/gutenberg/pull/32528 https://github.com/WordPress/gutenberg/pull/32569 - Saved deleted and restored widgets. https://github.com/WordPress/gutenberg/pull/32534 - Fix unsaved changes detection https://github.com/WordPress/gutenberg/pull/32573 - Fix button spacing in the header https://github.com/WordPress/gutenberg/pull/32585 - Avoid extra undo levels https://github.com/WordPress/gutenberg/pull/32572 - Move Legacy Widget block to the `@wordpress/widgets` package https://github.com/WordPress/gutenberg/pull/32501 - Fix Social Links color inheritance https://github.com/WordPress/gutenberg/pull/32625 - Use Button appender https://github.com/WordPress/gutenberg/pull/32580 **Global Styles (theme.json)** - Separate the presets per origin in the block editor settings https://github.com/WordPress/gutenberg/pull/32358 https://github.com/WordPress/gutenberg/pull/32622 - Use CSS Custom Properties for the preset styles https://github.com/WordPress/gutenberg/pull/32627 **Performance** - Remove is-typing classname to improve typing performance https://github.com/WordPress/gutenberg/pull/32567 Props nosolosw, jorgefilipecosta, aristath, ntsekouras, peterwilsoncc, mcsf. See #53397. Built from https://develop.svn.wordpress.org/trunk@51149 git-svn-id: http://core.svn.wordpress.org/trunk@50758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 10:52:30 +02:00
*/!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var c=arguments[t];if(c){var i=typeof c;if("string"===i||"number"===i)e.push(c);else if(Array.isArray(c)){if(c.length){var a=n.apply(null,c);a&&e.push(a)}}else if("object"===i)if(c.toString===Object.prototype.toString)for(var o in c)r.call(c,o)&&c[o]&&e.push(o);else e.push(c.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(c=function(){return n}.apply(t,[]))||(e.exports=c)}()},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 R}));var c={};r.r(c),r.d(c,"enableComplementaryArea",(function(){return d})),r.d(c,"disableComplementaryArea",(function(){return u})),r.d(c,"pinItem",(function(){return m})),r.d(c,"unpinItem",(function(){return g}));var n={};r.r(n),r.d(n,"getActiveComplementaryArea",(function(){return p})),r.d(n,"isItemPinned",(function(){return O}));var i=r("1ZqX"),a=r("YLtl");const o=Object(i.combineReducers)({singleEnableItems:function(e={},{type:t,itemType:r,scope:c,item:n}){return"SET_SINGLE_ENABLE_ITEM"===t&&r&&c?{...e,[r]:{...e[r],[c]:n||null}}:e},multipleEnableItems:function(e={},{type:t,itemType:r,scope:c,item:n,isEnable:i}){if("SET_MULTIPLE_ENABLE_ITEM"!==t||!r||!c||!n||Object(a.get)(e,[r,c,n])===i)return e;const o=e[r]||{},s=o[c]||{};return{...e,[r]:{...o,[c]:{...s,[n]:i||!1}}}}});var s=Object(i.combineReducers)({enableItems:o});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,c){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:r,isEnable:c}}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(a.get)(e.enableItems.singleEnableItems,[t,r])}(e,"complementaryArea",t)}function O(e,t,r){return!1!==function(e,t,r,c){return Object(a.get)(e.enableItems.multipleEnableItems,[t,r,c])}(e,"pinnedItems",t,r)}const j=Object(i.createReduxStore)("core/interface",{reducer:s,actions:c,selectors:n,persist:["enableItems"]});Object(i.registerStore)("core/interface",{reducer:s,actions:c,selectors:n,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 B=T((function({as:e=h.Button,scope:t,identifier:r,icon:c,selectedIcon:n,...o}){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:n&&l?n:c,onClick:()=>{l?u(t):d(t,r)}},Object(a.omit)(o,["name"])))}));var N=({smallScreenTitle:e,children:t,className:r,toggleButtonProps:c})=>{const n=Object(_.createElement)(B,Object(f.a)({icon:A.a},c));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),n),Object(_.createElement)("div",{className:w()("components-panel__header","interface-complementary-area-header",r),tabIndex:-1},t,n))};function C({name:e,as:t=h.Button,onClick:r,...c}){return Object(_.createElement)(h.Fill,{name:e},({onClick:e})=>Object(_.createElement)(t,Object(f.a)({onClick:r||e?(...t)=>{(r||a.noop)(...t),(e||a.noop)(...t)}:void 0},c)))}C.Slot=function({name:e,as:t=h.ButtonGroup,fillProps:r={},bubblesVirtually:c,...n}){return Object(_.createElement)(h.Slot,{name:e,bubblesVirtually:c,fillProps:r},e=>