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

7 lines
22 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.widgets=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},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="4g8P")}({"1ZqX":function(e,t){e.exports=window.wp.data},"4g8P":function(e,t,n){"use strict";n.r(t),n.d(t,"MoveToWidgetArea",(function(){return q})),n.d(t,"getWidgetIdFromBlock",(function(){return X})),n.d(t,"addWidgetIdToBlock",(function(){return Y})),n.d(t,"registerLegacyWidgetBlock",(function(){return J})),n.d(t,"registerWidgetGroupBlock",(function(){return ee})),n.d(t,"registerLegacyWidgetVariations",(function(){return K}));var i={};n.r(i),n.d(i,"metadata",(function(){return D})),n.d(i,"name",(function(){return W})),n.d(i,"settings",(function(){return A}));var r={};n.r(r),n.d(r,"metadata",(function(){return Q})),n.d(r,"name",(function(){return Z})),n.d(r,"settings",(function(){return U}));var o=n("HSyU"),a=n("GRId"),c=n("Tqx9");var s=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{d:"M6 3H8V5H16V3H18V5C19.1046 5 20 5.89543 20 7V19C20 20.1046 19.1046 21 18 21H6C4.89543 21 4 20.1046 4 19V7C4 5.89543 4.89543 5 6 5V3ZM18 6.5H6C5.72386 6.5 5.5 6.72386 5.5 7V8H18.5V7C18.5 6.72386 18.2761 6.5 18 6.5ZM18.5 9.5H5.5V19C5.5 19.2761 5.72386 19.5 6 19.5H18C18.2761 19.5 18.5 19.2761 18.5 19V9.5ZM11 11H13V13H11V11ZM7 11V13H9V11H7ZM15 13V11H17V13H15Z"})),l=n("TSYQ"),d=n.n(l),u=n("axFQ"),m=n("tI+e");var h=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})),b=n("l3Sj"),g=n("1ZqX"),w=n("jZUy");function p(e){let{selectedId:t,onSelect:n}=e;const i=Object(g.useSelect)(e=>{var t,n,i;const r=null!==(t=null===(n=e(u.store).getSettings())||void 0===n?void 0:n.widgetTypesToHideFromLegacyWidgetBlock)&&void 0!==t?t:[];return null===(i=e(w.store).getWidgetTypes({per_page:-1}))||void 0===i?void 0:i.filter(e=>!r.includes(e.id))},[]);return i?0===i.length?Object(b.__)("There are no widgets available."):Object(a.createElement)(m.SelectControl,{label:Object(b.__)("Select a legacy widget to display:"),value:null!=t?t:"",options:[{value:"",label:Object(b.__)("Select widget")},...i.map(e=>({value:e.id,label:e.name}))],onChange:e=>{if(e){const t=i.find(t=>t.id===e);n({selectedId:t.id,isMulti:t.is_multi})}else n({selectedId:null})}}):Object(a.createElement)(m.Spinner,null)}function f(e){let{name:t,description:n}=e;return Object(a.createElement)("div",{className:"wp-block-legacy-widget-inspector-card"},Object(a.createElement)("h3",{className:"wp-block-legacy-widget-inspector-card__name"},t),Object(a.createElement)("span",null,n))}var v=n("onLe"),j=n("K9lf"),O=n("YLtl"),y=n("ywyh"),_=n.n(y);class E{constructor(e){let{id:t,idBase:n,instance:i,onChangeInstance:r,onChangeHasPreview:o,onError:a}=e;this.id=t,this.idBase=n,this._instance=i,this._hasPreview=null,this.onChangeInstance=r,this.onChangeHasPreview=o,this.onError=a,this.number=++k,this.handleFormChange=Obj
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 04:52:30 -04:00
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var o=typeof i;if("string"===o||"number"===o)e.push(i);else if(Array.isArray(i)){if(i.length){var a=r.apply(null,i);a&&e.push(a)}}else if("object"===o)if(i.toString===Object.prototype.toString)for(var c in i)n.call(i,c)&&i[c]&&e.push(c);else e.push(i.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(i=function(){return r}.apply(t,[]))||(e.exports=i)}()},Tqx9:function(e,t){e.exports=window.wp.primitives},YLtl:function(e,t){e.exports=window.lodash},axFQ:function(e,t){e.exports=window.wp.blockEditor},jZUy:function(e,t){e.exports=window.wp.coreData},l3Sj:function(e,t){e.exports=window.wp.i18n},onLe:function(e,t){e.exports=window.wp.notices},"tI+e":function(e,t){e.exports=window.wp.components},u6za:function(e,t,n){"use strict";var i=n("GRId"),r=n("Tqx9");const o=Object(i.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)(r.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));t.a=o},ywyh:function(e,t){e.exports=window.wp.apiFetch}});