2022-04-11 14:04:30 +02:00
/******/ ( function ( ) { // webpackBootstrap
/******/ var _ _webpack _modules _ _ = ( {
/***/ 4403 :
/***/ ( function ( module , exports ) {
var _ _WEBPACK _AMD _DEFINE _ARRAY _ _ , _ _WEBPACK _AMD _DEFINE _RESULT _ _ ; / * !
Copyright ( c ) 2018 Jed Watson .
Licensed under the MIT License ( MIT ) , see
http : //jedwatson.github.io/classnames
* /
/* global define */
( function ( ) {
'use strict' ;
var hasOwn = { } . hasOwnProperty ;
function classNames ( ) {
var classes = [ ] ;
for ( var i = 0 ; i < arguments . length ; i ++ ) {
var arg = arguments [ i ] ;
if ( ! arg ) continue ;
var argType = typeof arg ;
if ( argType === 'string' || argType === 'number' ) {
classes . push ( arg ) ;
} else if ( Array . isArray ( arg ) ) {
if ( arg . length ) {
var inner = classNames . apply ( null , arg ) ;
if ( inner ) {
classes . push ( inner ) ;
}
}
} else if ( argType === 'object' ) {
if ( arg . toString === Object . prototype . toString ) {
for ( var key in arg ) {
if ( hasOwn . call ( arg , key ) && arg [ key ] ) {
classes . push ( key ) ;
}
}
} else {
classes . push ( arg . toString ( ) ) ;
}
}
}
return classes . join ( ' ' ) ;
}
if ( true && module . exports ) {
classNames . default = classNames ;
module . exports = classNames ;
} else if ( true ) {
// register as 'classnames', consistent with npm package name
! ( _ _WEBPACK _AMD _DEFINE _ARRAY _ _ = [ ] , _ _WEBPACK _AMD _DEFINE _RESULT _ _ = ( function ( ) {
return classNames ;
} ) . apply ( exports , _ _WEBPACK _AMD _DEFINE _ARRAY _ _ ) ,
_ _WEBPACK _AMD _DEFINE _RESULT _ _ !== undefined && ( module . exports = _ _WEBPACK _AMD _DEFINE _RESULT _ _ ) ) ;
} else { }
} ( ) ) ;
/***/ } )
/******/ } ) ;
/************************************************************************/
2021-05-25 10:40:25 +02:00
/******/ // The module cache
2022-04-11 14:04:30 +02:00
/******/ var _ _webpack _module _cache _ _ = { } ;
/******/
2021-05-25 10:40:25 +02:00
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/ // Check if module is in cache
2022-04-11 14:04:30 +02:00
/******/ var cachedModule = _ _webpack _module _cache _ _ [ moduleId ] ;
/******/ if ( cachedModule !== undefined ) {
/******/ return cachedModule . exports ;
2021-05-25 10:40:25 +02:00
/******/ }
/******/ // Create a new module (and put it into the cache)
2022-04-11 14:04:30 +02:00
/******/ var module = _ _webpack _module _cache _ _ [ moduleId ] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
2021-05-25 10:40:25 +02:00
/******/ exports : { }
/******/ } ;
2022-04-11 14:04:30 +02:00
/******/
2021-05-25 10:40:25 +02:00
/******/ // Execute the module function
2022-04-11 14:04:30 +02:00
/******/ _ _webpack _modules _ _ [ moduleId ] ( module , module . exports , _ _webpack _require _ _ ) ;
/******/
2021-05-25 10:40:25 +02:00
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
2022-04-11 14:04:30 +02:00
/******/
2021-05-25 10:40:25 +02:00
/************************************************************************/
2022-04-11 14:04:30 +02:00
/******/ /* webpack/runtime/compat get default export */
/******/ ! function ( ) {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function ( ) { return module [ 'default' ] ; } :
/******/ function ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , { a : getter } ) ;
/******/ return getter ;
/******/ } ;
/******/ } ( ) ;
/******/
/******/ /* webpack/runtime/define property getters */
/******/ ! function ( ) {
/******/ // define getter functions for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , definition ) {
/******/ for ( var key in definition ) {
/******/ if ( _ _webpack _require _ _ . o ( definition , key ) && ! _ _webpack _require _ _ . o ( exports , key ) ) {
/******/ Object . defineProperty ( exports , key , { enumerable : true , get : definition [ key ] } ) ;
/******/ }
/******/ }
/******/ } ;
/******/ } ( ) ;
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ ! function ( ) {
/******/ _ _webpack _require _ _ . o = function ( obj , prop ) { return Object . prototype . hasOwnProperty . call ( obj , prop ) ; }
/******/ } ( ) ;
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ ! function ( ) {
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/ } ( ) ;
/******/
/************************************************************************/
var _ _webpack _exports _ _ = { } ;
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
! function ( ) {
2021-05-25 10:40:25 +02:00
"use strict" ;
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
// EXPORTS
2022-04-11 14:04:30 +02:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
"initialize" : function ( ) { return /* binding */ initialize ; }
} ) ;
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js
var selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , {
"__experimentalGetInsertionPoint" : function ( ) { return _ _experimentalGetInsertionPoint ; } ,
"isInserterOpened" : function ( ) { return isInserterOpened ; }
} ) ;
// NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js
2021-05-25 10:40:25 +02:00
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
2022-04-11 14:04:30 +02:00
_ _webpack _require _ _ . d ( actions _namespaceObject , {
2022-04-12 17:12:47 +02:00
"setIsInserterOpened" : function ( ) { return setIsInserterOpened ; }
} ) ;
// NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js
var store _actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( store _actions _namespaceObject ) ;
_ _webpack _require _ _ . d ( store _actions _namespaceObject , {
2022-04-11 14:04:30 +02:00
"disableComplementaryArea" : function ( ) { return disableComplementaryArea ; } ,
"enableComplementaryArea" : function ( ) { return enableComplementaryArea ; } ,
"pinItem" : function ( ) { return pinItem ; } ,
"setFeatureDefaults" : function ( ) { return setFeatureDefaults ; } ,
"setFeatureValue" : function ( ) { return setFeatureValue ; } ,
"toggleFeature" : function ( ) { return toggleFeature ; } ,
"unpinItem" : function ( ) { return unpinItem ; }
} ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js
var store _selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( store _selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( store _selectors _namespaceObject , {
2022-04-12 17:12:47 +02:00
"getActiveComplementaryArea" : function ( ) { return getActiveComplementaryArea ; } ,
"isFeatureActive" : function ( ) { return isFeatureActive ; } ,
"isItemPinned" : function ( ) { return isItemPinned ; }
2022-04-11 14:04:30 +02:00
} ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","element"]
var external _wp _element _namespaceObject = window [ "wp" ] [ "element" ] ;
; // CONCATENATED MODULE: external ["wp","blockLibrary"]
var external _wp _blockLibrary _namespaceObject = window [ "wp" ] [ "blockLibrary" ] ;
; // CONCATENATED MODULE: external ["wp","widgets"]
var external _wp _widgets _namespaceObject = window [ "wp" ] [ "widgets" ] ;
; // CONCATENATED MODULE: external ["wp","blocks"]
var external _wp _blocks _namespaceObject = window [ "wp" ] [ "blocks" ] ;
; // CONCATENATED MODULE: external ["wp","data"]
var external _wp _data _namespaceObject = window [ "wp" ] [ "data" ] ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: external ["wp","preferences"]
var external _wp _preferences _namespaceObject = window [ "wp" ] [ "preferences" ] ;
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","components"]
var external _wp _components _namespaceObject = window [ "wp" ] [ "components" ] ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
var external _wp _keyboardShortcuts _namespaceObject = window [ "wp" ] [ "keyboardShortcuts" ] ;
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","i18n"]
var external _wp _i18n _namespaceObject = window [ "wp" ] [ "i18n" ] ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: external ["wp","blockEditor"]
var external _wp _blockEditor _namespaceObject = window [ "wp" ] [ "blockEditor" ] ;
; // CONCATENATED MODULE: external ["wp","compose"]
var external _wp _compose _namespaceObject = window [ "wp" ] [ "compose" ] ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/error-boundary/index.js
2021-05-25 10:40:25 +02:00
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
/ * *
* WordPress dependencies
* /
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
2022-04-12 17:12:47 +02:00
function CopyButton ( _ref ) {
let {
text ,
children
} = _ref ;
const ref = ( 0 , external _wp _compose _namespaceObject . useCopyToClipboard ) ( text ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Button , {
variant : "secondary" ,
ref : ref
} , children ) ;
}
class ErrorBoundary extends external _wp _element _namespaceObject . Component {
constructor ( ) {
super ( ... arguments ) ;
this . state = {
error : null
} ;
}
componentDidCatch ( error ) {
this . setState ( {
error
} ) ;
}
render ( ) {
const {
error
} = this . state ;
if ( ! error ) {
return this . props . children ;
}
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . Warning , {
className : "customize-widgets-error-boundary" ,
actions : [ ( 0 , external _wp _element _namespaceObject . createElement ) ( CopyButton , {
key : "copy-error" ,
text : error . stack
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Copy Error' ) ) ]
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'The editor has encountered an unexpected error.' ) ) ;
}
}
; // CONCATENATED MODULE: external "lodash"
var external _lodash _namespaceObject = window [ "lodash" ] ;
; // CONCATENATED MODULE: external ["wp","coreData"]
var external _wp _coreData _namespaceObject = window [ "wp" ] [ "coreData" ] ;
; // CONCATENATED MODULE: external ["wp","mediaUtils"]
var external _wp _mediaUtils _namespaceObject = window [ "wp" ] [ "mediaUtils" ] ;
; // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends ( ) {
_extends = Object . assign || function ( target ) {
for ( var i = 1 ; i < arguments . length ; i ++ ) {
var source = arguments [ i ] ;
for ( var key in source ) {
if ( Object . prototype . hasOwnProperty . call ( source , key ) ) {
target [ key ] = source [ key ] ;
}
}
}
return target ;
} ;
return _extends . apply ( this , arguments ) ;
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-inspector-button/index.js
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
/ * *
* WordPress dependencies
* /
2022-04-11 14:04:30 +02:00
2022-04-12 17:12:47 +02:00
function BlockInspectorButton ( _ref ) {
let {
inspector ,
closeMenu ,
... props
2021-11-15 13:50:17 +01:00
} = _ref ;
2022-04-12 17:12:47 +02:00
const selectedBlockClientId = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _blockEditor _namespaceObject . store ) . getSelectedBlockClientId ( ) , [ ] ) ;
const selectedBlock = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => document . getElementById ( ` block- ${ selectedBlockClientId } ` ) , [ selectedBlockClientId ] ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . MenuItem , _extends ( {
onClick : ( ) => {
// Open the inspector.
inspector . open ( {
returnFocusWhenClose : selectedBlock
} ) ; // Then close the dropdown menu.
closeMenu ( ) ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
}
2022-04-12 17:12:47 +02:00
} , props ) , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Show more settings' ) ) ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
}
2022-04-12 17:12:47 +02:00
/* harmony default export */ var block _inspector _button = ( BlockInspectorButton ) ;
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = _ _webpack _require _ _ ( 4403 ) ;
var classnames _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( classnames ) ;
; // CONCATENATED MODULE: external ["wp","keycodes"]
var external _wp _keycodes _namespaceObject = window [ "wp" ] [ "keycodes" ] ;
; // CONCATENATED MODULE: external ["wp","primitives"]
var external _wp _primitives _namespaceObject = window [ "wp" ] [ "primitives" ] ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
2022-04-12 17:12:47 +02:00
const undo = ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 14:04:30 +02:00
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
2022-04-12 17:12:47 +02:00
d : "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
2022-04-11 14:04:30 +02:00
} ) ) ;
2022-04-12 17:12:47 +02:00
/* harmony default export */ var library _undo = ( undo ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* WordPress dependencies
2022-04-11 14:04:30 +02:00
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const redo = ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
d : "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
} ) ) ;
/* harmony default export */ var library _redo = ( redo ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
2022-04-12 17:12:47 +02:00
const plus = ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
d : "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"
} ) ) ;
/* harmony default export */ var library _plus = ( plus ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
2022-04-11 14:04:30 +02:00
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* WordPress dependencies
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
* /
2022-04-12 17:12:47 +02:00
const closeSmall = ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
d : "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
} ) ) ;
/* harmony default export */ var close _small = ( closeSmall ) ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/reducer.js
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* WordPress dependencies
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
* /
/ * *
2022-04-12 17:12:47 +02:00
* Reducer tracking whether the inserter is open .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { boolean | Object } state
* @ param { Object } action
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
function blockInserterPanel ( ) {
let state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : false ;
let action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2022-04-11 14:04:30 +02:00
2022-04-12 17:12:47 +02:00
switch ( action . type ) {
case 'SET_IS_INSERTER_OPENED' :
return action . value ;
2022-04-11 14:04:30 +02:00
}
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
return state ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
/* harmony default export */ var reducer = ( ( 0 , external _wp _data _namespaceObject . combineReducers ) ( {
2022-04-12 17:12:47 +02:00
blockInserterPanel
2022-04-11 14:04:30 +02:00
} ) ) ;
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Returns true if the inserter is opened .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { Object } state Global application state .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ return { boolean } Whether the inserter is opened .
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
* /
2022-04-12 17:12:47 +02:00
function isInserterOpened ( state ) {
return ! ! state . blockInserterPanel ;
2022-04-11 14:04:30 +02:00
}
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Get the insertion point for the inserter .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { Object } state Global application state .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ return { Object } The root client ID and index to insert at .
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
* /
2022-04-12 17:12:47 +02:00
function _ _experimentalGetInsertionPoint ( state ) {
const {
rootClientId ,
insertionIndex
} = state . blockInserterPanel ;
2022-04-11 14:04:30 +02:00
return {
2022-04-12 17:12:47 +02:00
rootClientId ,
insertionIndex
2022-04-11 14:04:30 +02:00
} ;
}
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js
2022-04-11 14:04:30 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Returns an action object used to open / close the inserter .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { boolean | Object } value Whether the inserter should be
* opened ( true ) or closed ( false ) .
* To specify an insertion point ,
* use an object .
* @ param { string } value . rootClientId The root client ID to insert at .
* @ param { number } value . insertionIndex The index to insert at .
2022-04-11 14:04:30 +02:00
*
* @ return { Object } Action object .
* /
2022-04-12 17:12:47 +02:00
function setIsInserterOpened ( value ) {
2022-04-11 14:04:30 +02:00
return {
2022-04-12 17:12:47 +02:00
type : 'SET_IS_INSERTER_OPENED' ,
value
2022-04-11 14:04:30 +02:00
} ;
}
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/constants.js
2022-04-11 14:04:30 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Module Constants
2022-04-11 14:04:30 +02:00
* /
2022-04-12 17:12:47 +02:00
const STORE _NAME = 'core/customize-widgets' ;
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/index.js
2022-04-11 14:04:30 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* WordPress dependencies
2022-04-11 14:04:30 +02:00
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Internal dependencies
2022-04-11 14:04:30 +02:00
* /
2021-05-25 10:40:25 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Block editor data store configuration .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registering-a-store
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ type { Object }
2022-04-11 14:04:30 +02:00
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const storeConfig = {
reducer : reducer ,
selectors : selectors _namespaceObject ,
actions : actions _namespaceObject
} ;
2021-05-25 10:40:25 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Store definition for the edit widgets namespace .
2022-04-11 14:04:30 +02:00
*
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*
* @ type { Object }
2021-05-25 10:40:25 +02:00
* /
2022-04-12 17:12:47 +02:00
const store = ( 0 , external _wp _data _namespaceObject . createReduxStore ) ( STORE _NAME , storeConfig ) ;
( 0 , external _wp _data _namespaceObject . register ) ( store ) ;
2022-04-11 14:04:30 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/index.js
2022-04-11 14:04:30 +02:00
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
2022-04-12 17:12:47 +02:00
2021-05-25 10:40:25 +02:00
/ * *
* Internal dependencies
* /
2022-04-12 17:12:47 +02:00
function Inserter ( _ref ) {
2022-04-11 14:04:30 +02:00
let {
2022-04-12 17:12:47 +02:00
setIsOpened
2022-04-11 14:04:30 +02:00
} = _ref ;
2022-04-12 17:12:47 +02:00
const inserterTitleId = ( 0 , external _wp _compose _namespaceObject . useInstanceId ) ( Inserter , 'customize-widget-layout__inserter-panel-title' ) ;
const insertionPoint = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( store ) . _ _experimentalGetInsertionPoint ( ) , [ ] ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( "div" , {
className : "customize-widgets-layout__inserter-panel" ,
"aria-labelledby" : inserterTitleId
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( "div" , {
className : "customize-widgets-layout__inserter-panel-header"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( "h2" , {
id : inserterTitleId ,
className : "customize-widgets-layout__inserter-panel-header-title"
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Add a block' ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Button , {
className : "customize-widgets-layout__inserter-panel-header-close-button" ,
icon : close _small ,
onClick : ( ) => setIsOpened ( false ) ,
"aria-label" : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Close inserter' )
} ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( "div" , {
className : "customize-widgets-layout__inserter-panel-content"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . _ _experimentalLibrary , {
rootClientId : insertionPoint . rootClientId ,
_ _experimentalInsertionIndex : insertionPoint . insertionIndex ,
showInserterHelpPanel : true ,
onSelect : ( ) => setIsOpened ( false )
} ) ) ) ;
2022-04-11 14:04:30 +02:00
}
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
/* harmony default export */ var components _inserter = ( Inserter ) ;
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
/ * *
* WordPress dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const external = ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
d : "M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"
} ) ) ;
/* harmony default export */ var library _external = ( external ) ;
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
2021-05-25 10:40:25 +02:00
2021-11-08 15:29:21 +01:00
2022-04-12 17:12:47 +02:00
/ * *
* WordPress dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const moreVertical = ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
d : "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
} ) ) ;
/* harmony default export */ var more _vertical = ( moreVertical ) ;
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/more-menu-dropdown/index.js
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
/ * *
* External dependencies
* /
2021-05-25 10:40:25 +02:00
/ * *
2022-04-11 14:04:30 +02:00
* WordPress dependencies
2021-05-25 10:40:25 +02:00
* /
2022-04-12 17:12:47 +02:00
function MoreMenuDropdown ( _ref ) {
2021-11-15 13:50:17 +01:00
let {
2022-04-12 17:12:47 +02:00
as : DropdownComponent = external _wp _components _namespaceObject . DropdownMenu ,
className ,
2022-04-11 14:04:30 +02:00
2022-04-12 17:12:47 +02:00
/* translators: button label text should, if possible, be under 16 characters. */
label = ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Options' ) ,
popoverProps ,
toggleProps ,
children
} = _ref ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( DropdownComponent , {
className : classnames _default ( ) ( 'interface-more-menu-dropdown' , className ) ,
icon : more _vertical ,
label : label ,
popoverProps : {
position : 'bottom left' ,
... popoverProps ,
className : classnames _default ( ) ( 'interface-more-menu-dropdown__content' , popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps . className )
} ,
toggleProps : {
tooltipPosition : 'bottom' ,
... toggleProps
2021-05-25 10:40:25 +02:00
}
2022-04-12 17:12:47 +02:00
} , onClose => children ( onClose ) ) ;
2021-05-25 10:40:25 +02:00
}
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js
2022-04-11 14:04:30 +02:00
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
2022-04-11 14:04:30 +02:00
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
2021-05-25 10:40:25 +02:00
2021-07-13 18:41:28 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: external ["wp","deprecated"]
var external _wp _deprecated _namespaceObject = window [ "wp" ] [ "deprecated" ] ;
var external _wp _deprecated _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _deprecated _namespaceObject ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js
2021-05-25 10:40:25 +02:00
/ * *
2021-07-13 18:41:28 +02:00
* WordPress dependencies
2021-05-25 10:40:25 +02:00
* /
2021-07-13 18:41:28 +02:00
2021-05-25 10:40:25 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Enable the complementary area .
*
* @ param { string } scope Complementary area scope .
* @ param { string } area Area identifier .
2021-05-25 10:40:25 +02:00
* /
2022-04-12 17:12:47 +02:00
const enableComplementaryArea = ( scope , area ) => _ref => {
let {
registry
} = _ref ;
// Return early if there's no area.
if ( ! area ) {
return ;
}
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . set ( scope , 'complementaryArea' , area ) ;
} ;
2021-07-13 18:41:28 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Disable the complementary area .
2021-07-13 18:41:28 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { string } scope Complementary area scope .
2021-07-13 18:41:28 +02:00
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const disableComplementaryArea = scope => _ref2 => {
let {
registry
} = _ref2 ;
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . set ( scope , 'complementaryArea' , null ) ;
} ;
/ * *
* Pins an item .
*
* @ param { string } scope Item scope .
* @ param { string } item Item identifier .
*
* @ return { Object } Action object .
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const pinItem = ( scope , item ) => _ref3 => {
let {
registry
} = _ref3 ;
// Return early if there's no item.
if ( ! item ) {
return ;
2021-07-13 18:41:28 +02:00
}
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const pinnedItems = registry . select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'pinnedItems' ) ; // The item is already pinned, there's nothing to do.
2022-04-11 14:04:30 +02:00
2022-04-12 17:12:47 +02:00
if ( ( pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems [ item ] ) === true ) {
return ;
}
2022-04-11 14:04:30 +02:00
2022-04-12 17:12:47 +02:00
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . set ( scope , 'pinnedItems' , { ... pinnedItems ,
[ item ] : true
} ) ;
} ;
2021-07-13 18:41:28 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Unpins an item .
2021-07-13 18:41:28 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { string } scope Item scope .
* @ param { string } item Item identifier .
* /
const unpinItem = ( scope , item ) => _ref4 => {
let {
registry
} = _ref4 ;
// Return early if there's no item.
if ( ! item ) {
return ;
}
const pinnedItems = registry . select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'pinnedItems' ) ;
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . set ( scope , 'pinnedItems' , { ... pinnedItems ,
[ item ] : false
} ) ;
} ;
/ * *
* Returns an action object used in signalling that a feature should be toggled .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { string } scope The feature scope ( e . g . core / edit - post ) .
* @ param { string } featureName The feature name .
2022-04-11 14:04:30 +02:00
* /
2022-04-12 17:12:47 +02:00
function toggleFeature ( scope , featureName ) {
return function ( _ref5 ) {
let {
registry
} = _ref5 ;
external _wp _deprecated _default ( ) ( ` wp.dispatch( 'core/interface' ).toggleFeature ` , {
since : '6.0' ,
alternative : ` wp.dispatch( 'core/preferences' ).toggle `
} ) ;
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . toggle ( scope , featureName ) ;
} ;
2021-05-25 10:40:25 +02:00
}
2021-07-13 18:41:28 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Returns an action object used in signalling that a feature should be set to
* a true or false value
2021-07-13 18:41:28 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { string } scope The feature scope ( e . g . core / edit - post ) .
* @ param { string } featureName The feature name .
* @ param { boolean } value The value to set .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ return { Object } Action object .
2021-07-13 18:41:28 +02:00
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
function setFeatureValue ( scope , featureName , value ) {
return function ( _ref6 ) {
let {
registry
} = _ref6 ;
external _wp _deprecated _default ( ) ( ` wp.dispatch( 'core/interface' ).setFeatureValue ` , {
since : '6.0' ,
alternative : ` wp.dispatch( 'core/preferences' ).set `
} ) ;
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . set ( scope , featureName , ! ! value ) ;
2022-04-11 14:04:30 +02:00
} ;
}
/ * *
2022-04-12 17:12:47 +02:00
* Returns an action object used in signalling that defaults should be set for features .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { string } scope The feature scope ( e . g . core / edit - post ) .
* @ param { Object < string , boolean > } defaults A key / value map of feature names to values .
2022-04-11 14:04:30 +02:00
*
* @ return { Object } Action object .
* /
2022-04-12 17:12:47 +02:00
function setFeatureDefaults ( scope , defaults ) {
return function ( _ref7 ) {
let {
registry
} = _ref7 ;
external _wp _deprecated _default ( ) ( ` wp.dispatch( 'core/interface' ).setFeatureDefaults ` , {
since : '6.0' ,
alternative : ` wp.dispatch( 'core/preferences' ).setDefaults `
} ) ;
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . setDefaults ( scope , defaults ) ;
2022-04-11 14:04:30 +02:00
} ;
2021-05-25 10:40:25 +02:00
}
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js
2021-07-13 18:41:28 +02:00
/ * *
* WordPress dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Returns the complementary area that is active in a given scope .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { Object } state Global application state .
* @ param { string } scope Item scope .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ return { string } The complementary area that is active in the given scope .
2022-04-11 14:04:30 +02:00
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const getActiveComplementaryArea = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , scope ) => {
return select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'complementaryArea' ) ;
} ) ;
2022-04-11 14:04:30 +02:00
/ * *
2022-04-12 17:12:47 +02:00
* Returns a boolean indicating if an item is pinned or not .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ param { Object } state Global application state .
* @ param { string } scope Scope .
* @ param { string } item Item to check .
2022-04-11 14:04:30 +02:00
*
2022-04-12 17:12:47 +02:00
* @ return { boolean } True if the item is pinned and false otherwise .
2022-04-11 14:04:30 +02:00
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const isItemPinned = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , scope , item ) => {
var _pinnedItems$item ;
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const pinnedItems = select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'pinnedItems' ) ;
return ( _pinnedItems$item = pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems [ item ] ) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true ;
} ) ;
/ * *
* Returns a boolean indicating whether a feature is active for a particular
* scope .
*
* @ param { Object } state The store state .
* @ param { string } scope The scope of the feature ( e . g . core / edit - post ) .
* @ param { string } featureName The name of the feature .
*
* @ return { boolean } Is the feature enabled ?
* /
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
const isFeatureActive = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , scope , featureName ) => {
external _wp _deprecated _default ( ) ( ` wp.select( 'core/interface' ).isFeatureActive( scope, featureName ) ` , {
since : '6.0' ,
alternative : ` !! wp.select( 'core/preferences' ).isFeatureActive( scope, featureName ) `
} ) ;
return ! ! select ( external _wp _preferences _namespaceObject . store ) . get ( scope , featureName ) ;
} ) ;
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js
/ * *
* The identifier for the data store .
*
* @ type { string }
* /
const constants _STORE _NAME = 'core/interface' ;
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js
2022-04-11 14:04:30 +02:00
/ * *
* WordPress dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
/ * *
* Internal dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
/ * *
* Store definition for the interface namespace .
*
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*
* @ type { Object }
* /
2022-04-11 14:04:30 +02:00
2022-04-12 17:12:47 +02:00
const store _store = ( 0 , external _wp _data _namespaceObject . createReduxStore ) ( constants _STORE _NAME , {
reducer : ( ) => { } ,
actions : store _actions _namespaceObject ,
selectors : store _selectors _namespaceObject
} ) ; // Once we build a more generic persistence plugin that works across types of stores
// we'd be able to replace this with a register call.
2021-05-25 10:40:25 +02:00
2022-04-12 17:12:47 +02:00
( 0 , external _wp _data _namespaceObject . register ) ( store _store ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/config.js
2021-05-25 10:40:25 +02:00
/ * *
2022-04-11 14:04:30 +02:00
* WordPress dependencies
2021-05-25 10:40:25 +02:00
* /
2022-04-11 14:04:30 +02:00
const textFormattingShortcuts = [ {
keyCombination : {
modifier : 'primary' ,
character : 'b'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Make the selected text bold.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'i'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Make the selected text italic.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'k'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Convert the selected text into a link.' )
} , {
keyCombination : {
modifier : 'primaryShift' ,
character : 'k'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Remove a link.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'u'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Underline the selected text.' )
} ] ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.js
2021-05-25 10:40:25 +02:00
/ * *
2022-04-11 14:04:30 +02:00
* External dependencies
2021-05-25 10:40:25 +02:00
* /
/ * *
2022-04-11 14:04:30 +02:00
* WordPress dependencies
2021-05-25 10:40:25 +02:00
* /
2022-04-11 14:04:30 +02:00
function KeyCombination ( _ref ) {
let {
keyCombination ,
forceAriaLabel
} = _ref ;
const shortcut = keyCombination . modifier ? external _wp _keycodes _namespaceObject . displayShortcutList [ keyCombination . modifier ] ( keyCombination . character ) : keyCombination . character ;
const ariaLabel = keyCombination . modifier ? external _wp _keycodes _namespaceObject . shortcutAriaLabel [ keyCombination . modifier ] ( keyCombination . character ) : keyCombination . character ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( "kbd" , {
className : "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination" ,
"aria-label" : forceAriaLabel || ariaLabel
} , ( 0 , external _lodash _namespaceObject . castArray ) ( shortcut ) . map ( ( character , index ) => {
if ( character === '+' ) {
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _element _namespaceObject . Fragment , {
key : index
} , character ) ;
2021-05-25 10:40:25 +02:00
}
2022-04-11 14:04:30 +02:00
return ( 0 , external _wp _element _namespaceObject . createElement ) ( "kbd" , {
key : index ,
className : "customize-widgets-keyboard-shortcut-help-modal__shortcut-key"
} , character ) ;
} ) ) ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
function Shortcut ( _ref2 ) {
2021-11-15 13:50:17 +01:00
let {
2022-04-11 14:04:30 +02:00
description ,
keyCombination ,
aliases = [ ] ,
ariaLabel
} = _ref2 ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _element _namespaceObject . Fragment , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( "div" , {
className : "customize-widgets-keyboard-shortcut-help-modal__shortcut-description"
} , description ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( "div" , {
className : "customize-widgets-keyboard-shortcut-help-modal__shortcut-term"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( KeyCombination , {
keyCombination : keyCombination ,
forceAriaLabel : ariaLabel
} ) , aliases . map ( ( alias , index ) => ( 0 , external _wp _element _namespaceObject . createElement ) ( KeyCombination , {
keyCombination : alias ,
forceAriaLabel : ariaLabel ,
key : index
} ) ) ) ) ;
2021-05-25 10:40:25 +02:00
}
2022-04-11 14:04:30 +02:00
/* harmony default export */ var keyboard _shortcut _help _modal _shortcut = ( Shortcut ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
/ * *
2022-04-11 14:04:30 +02:00
* Internal dependencies
2021-05-25 10:40:25 +02:00
* /
2022-04-11 14:04:30 +02:00
function DynamicShortcut ( _ref ) {
2021-11-15 13:50:17 +01:00
let {
2022-04-11 14:04:30 +02:00
name
2021-11-15 13:50:17 +01:00
} = _ref ;
2021-05-25 10:40:25 +02:00
const {
2022-04-11 14:04:30 +02:00
keyCombination ,
description ,
aliases
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getShortcutKeyCombination ,
getShortcutDescription ,
getShortcutAliases
} = select ( external _wp _keyboardShortcuts _namespaceObject . store ) ;
return {
keyCombination : getShortcutKeyCombination ( name ) ,
aliases : getShortcutAliases ( name ) ,
description : getShortcutDescription ( name )
2021-05-25 10:40:25 +02:00
} ;
2022-04-11 14:04:30 +02:00
} , [ name ] ) ;
2021-06-28 18:01:36 +02:00
2022-04-11 14:04:30 +02:00
if ( ! keyCombination ) {
return null ;
}
2021-06-28 18:01:36 +02:00
2022-04-11 14:04:30 +02:00
return ( 0 , external _wp _element _namespaceObject . createElement ) ( keyboard _shortcut _help _modal _shortcut , {
keyCombination : keyCombination ,
description : description ,
aliases : aliases
} ) ;
2021-06-28 18:01:36 +02:00
}
2022-04-11 14:04:30 +02:00
/* harmony default export */ var dynamic _shortcut = ( DynamicShortcut ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.js
2021-05-25 10:40:25 +02:00
/ * *
* External dependencies
* /
2022-04-11 14:04:30 +02:00
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2022-04-11 14:04:30 +02:00
const ShortcutList = _ref => {
2021-11-15 13:50:17 +01:00
let {
2022-04-11 14:04:30 +02:00
shortcuts
2021-11-15 13:50:17 +01:00
} = _ref ;
2022-04-11 14:04:30 +02:00
return (
/ *
* Disable reason : The ` list ` ARIA role is redundant but
* Safari + VoiceOver won ' t announce the list otherwise .
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
/* eslint-disable jsx-a11y/no-redundant-roles */
( 0 , external _wp _element _namespaceObject . createElement ) ( "ul" , {
className : "customize-widgets-keyboard-shortcut-help-modal__shortcut-list" ,
role : "list"
} , shortcuts . map ( ( shortcut , index ) => ( 0 , external _wp _element _namespaceObject . createElement ) ( "li" , {
className : "customize-widgets-keyboard-shortcut-help-modal__shortcut" ,
key : index
} , ( 0 , external _lodash _namespaceObject . isString ) ( shortcut ) ? ( 0 , external _wp _element _namespaceObject . createElement ) ( dynamic _shortcut , {
name : shortcut
} ) : ( 0 , external _wp _element _namespaceObject . createElement ) ( keyboard _shortcut _help _modal _shortcut , shortcut ) ) ) )
/* eslint-enable jsx-a11y/no-redundant-roles */
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
) ;
} ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
const ShortcutSection = _ref2 => {
let {
title ,
shortcuts ,
className
} = _ref2 ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( "section" , {
className : classnames _default ( ) ( 'customize-widgets-keyboard-shortcut-help-modal__section' , className )
} , ! ! title && ( 0 , external _wp _element _namespaceObject . createElement ) ( "h2" , {
className : "customize-widgets-keyboard-shortcut-help-modal__section-title"
} , title ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( ShortcutList , {
shortcuts : shortcuts
} ) ) ;
} ;
const ShortcutCategorySection = _ref3 => {
let {
title ,
categoryName ,
additionalShortcuts = [ ]
} = _ref3 ;
const categoryShortcuts = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
return select ( external _wp _keyboardShortcuts _namespaceObject . store ) . getCategoryShortcuts ( categoryName ) ;
} , [ categoryName ] ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( ShortcutSection , {
title : title ,
shortcuts : categoryShortcuts . concat ( additionalShortcuts )
} ) ;
} ;
function KeyboardShortcutHelpModal ( _ref4 ) {
let {
isModalActive ,
toggleModal
} = _ref4 ;
const {
registerShortcut
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _keyboardShortcuts _namespaceObject . store ) ;
registerShortcut ( {
name : 'core/customize-widgets/keyboard-shortcuts' ,
category : 'main' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Display these keyboard shortcuts.' ) ,
keyCombination : {
modifier : 'access' ,
character : 'h'
}
} ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/customize-widgets/keyboard-shortcuts' , toggleModal ) ;
if ( ! isModalActive ) {
return null ;
2021-05-25 10:40:25 +02:00
}
2022-04-11 14:04:30 +02:00
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Modal , {
className : "customize-widgets-keyboard-shortcut-help-modal" ,
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Keyboard shortcuts' ) ,
closeLabel : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Close' ) ,
onRequestClose : toggleModal
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( ShortcutSection , {
className : "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts" ,
shortcuts : [ 'core/customize-widgets/keyboard-shortcuts' ]
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( ShortcutCategorySection , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Global shortcuts' ) ,
categoryName : "global"
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( ShortcutCategorySection , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Selection shortcuts' ) ,
categoryName : "selection"
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( ShortcutCategorySection , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Block shortcuts' ) ,
categoryName : "block" ,
additionalShortcuts : [ {
keyCombination : {
character : '/'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Change the block type after adding a new paragraph.' ) ,
/* translators: The forward-slash character. e.g. '/'. */
ariaLabel : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Forward-slash' )
} ]
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( ShortcutSection , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Text formatting' ) ,
shortcuts : textFormattingShortcuts
2021-11-15 13:50:17 +01:00
} ) ) ;
2021-05-25 10:40:25 +02:00
}
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/more-menu/index.js
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
2022-04-12 17:12:47 +02:00
2022-04-11 14:04:30 +02:00
/ * *
* Internal dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
function MoreMenu ( ) {
const [ isKeyboardShortcutsModalActive , setIsKeyboardShortcutsModalVisible ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
const toggleKeyboardShortcutsModal = ( ) => setIsKeyboardShortcutsModalVisible ( ! isKeyboardShortcutsModalActive ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/customize-widgets/keyboard-shortcuts' , toggleKeyboardShortcutsModal ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _element _namespaceObject . Fragment , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( MoreMenuDropdown , {
2022-04-12 17:12:47 +02:00
as : external _wp _components _namespaceObject . ToolbarDropdownMenu
2022-04-11 14:04:30 +02:00
} , ( ) => ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _element _namespaceObject . Fragment , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . MenuGroup , {
label : ( 0 , external _wp _i18n _namespaceObject . _x ) ( 'View' , 'noun' )
2022-04-12 17:12:47 +02:00
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _preferences _namespaceObject . PreferenceToggleMenuItem , {
2022-04-11 14:04:30 +02:00
scope : "core/customize-widgets" ,
2022-04-12 17:12:47 +02:00
name : "fixedToolbar" ,
2022-04-11 14:04:30 +02:00
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Top toolbar' ) ,
info : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Access all block and document tools in a single place' ) ,
messageActivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Top toolbar activated' ) ,
messageDeactivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Top toolbar deactivated' )
} ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . MenuGroup , {
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Tools' )
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . MenuItem , {
onClick : ( ) => {
setIsKeyboardShortcutsModalVisible ( true ) ;
} ,
shortcut : external _wp _keycodes _namespaceObject . displayShortcut . access ( 'h' )
2022-04-12 17:12:47 +02:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Keyboard shortcuts' ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _preferences _namespaceObject . PreferenceToggleMenuItem , {
2022-04-11 14:04:30 +02:00
scope : "core/customize-widgets" ,
2022-04-12 17:12:47 +02:00
name : "welcomeGuide" ,
2022-04-11 14:04:30 +02:00
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome Guide' )
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . MenuItem , {
role : "menuitem" ,
icon : library _external ,
href : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'https://wordpress.org/support/article/block-based-widgets-editor/' ) ,
target : "_blank" ,
rel : "noopener noreferrer"
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Help' ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . VisuallyHidden , {
as : "span"
} ,
/* translators: accessibility text */
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( '(opens in a new tab)' ) ) ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . MenuGroup , {
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Preferences' )
2022-04-12 17:12:47 +02:00
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _preferences _namespaceObject . PreferenceToggleMenuItem , {
2022-04-11 14:04:30 +02:00
scope : "core/customize-widgets" ,
2022-04-12 17:12:47 +02:00
name : "keepCaretInsideBlock" ,
2022-04-11 14:04:30 +02:00
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Contain text cursor inside block' ) ,
info : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Aids screen readers by stopping text caret from leaving blocks.' ) ,
messageActivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Contain text cursor inside block activated' ) ,
messageDeactivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Contain text cursor inside block deactivated' )
} ) ) ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( KeyboardShortcutHelpModal , {
isModalActive : isKeyboardShortcutsModalActive ,
toggleModal : toggleKeyboardShortcutsModal
} ) ) ;
2021-05-25 10:40:25 +02:00
}
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/header/index.js
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
/ * *
* External dependencies
* /
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
2021-05-25 10:40:25 +02:00
/ * *
* Internal dependencies
* /
2022-04-11 14:04:30 +02:00
function Header ( _ref ) {
2021-11-15 13:50:17 +01:00
let {
2022-04-11 14:04:30 +02:00
sidebar ,
inserter ,
isInserterOpened ,
setIsInserterOpened ,
isFixedToolbarActive
2021-11-15 13:50:17 +01:00
} = _ref ;
2022-04-11 14:04:30 +02:00
const [ [ hasUndo , hasRedo ] , setUndoRedo ] = ( 0 , external _wp _element _namespaceObject . useState ) ( [ sidebar . hasUndo ( ) , sidebar . hasRedo ( ) ] ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
return sidebar . subscribeHistory ( ( ) => {
setUndoRedo ( [ sidebar . hasUndo ( ) , sidebar . hasRedo ( ) ] ) ;
2021-06-01 10:10:04 +02:00
} ) ;
2022-04-11 14:04:30 +02:00
} , [ sidebar ] ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _element _namespaceObject . Fragment , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( "div" , {
className : classnames _default ( ) ( 'customize-widgets-header' , {
'is-fixed-toolbar-active' : isFixedToolbarActive
} )
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . NavigableToolbar , {
className : "customize-widgets-header-toolbar" ,
"aria-label" : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Document tools' )
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . ToolbarButton , {
icon : ! ( 0 , external _wp _i18n _namespaceObject . isRTL ) ( ) ? library _undo : library _redo
/* translators: button label text should, if possible, be under 16 characters. */
,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Undo' ) ,
shortcut : external _wp _keycodes _namespaceObject . displayShortcut . primary ( 'z' ) // If there are no undo levels we don't want to actually disable this
// button, because it will remove focus for keyboard users.
// See: https://github.com/WordPress/gutenberg/issues/3486
,
"aria-disabled" : ! hasUndo ,
onClick : sidebar . undo ,
className : "customize-widgets-editor-history-button undo-button"
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . ToolbarButton , {
icon : ! ( 0 , external _wp _i18n _namespaceObject . isRTL ) ( ) ? library _redo : library _undo
/* translators: button label text should, if possible, be under 16 characters. */
,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Redo' ) ,
shortcut : external _wp _keycodes _namespaceObject . displayShortcut . primaryShift ( 'z' ) // If there are no undo levels we don't want to actually disable this
// button, because it will remove focus for keyboard users.
// See: https://github.com/WordPress/gutenberg/issues/3486
,
"aria-disabled" : ! hasRedo ,
onClick : sidebar . redo ,
className : "customize-widgets-editor-history-button redo-button"
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . ToolbarButton , {
className : "customize-widgets-header-toolbar__inserter-toggle" ,
isPressed : isInserterOpened ,
variant : "primary" ,
icon : library _plus ,
label : ( 0 , external _wp _i18n _namespaceObject . _x ) ( 'Add block' , 'Generic label for block inserter button' ) ,
onClick : ( ) => {
setIsInserterOpened ( isOpen => ! isOpen ) ;
2021-05-25 10:40:25 +02:00
}
2022-04-11 14:04:30 +02:00
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( MoreMenu , null ) ) ) , ( 0 , external _wp _element _namespaceObject . createPortal ) ( ( 0 , external _wp _element _namespaceObject . createElement ) ( components _inserter , {
setIsOpened : setIsInserterOpened
} ) , inserter . contentContainer [ 0 ] ) ) ;
2021-05-25 10:40:25 +02:00
}
2022-04-11 14:04:30 +02:00
/* harmony default export */ var header = ( Header ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/use-inserter.js
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2022-04-11 14:04:30 +02:00
function useInserter ( inserter ) {
2022-04-12 17:12:47 +02:00
const isInserterOpened = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( store ) . isInserterOpened ( ) , [ ] ) ;
2021-07-13 18:41:28 +02:00
const {
2022-04-11 14:04:30 +02:00
setIsInserterOpened
2022-04-12 17:12:47 +02:00
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
2022-04-11 14:04:30 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( isInserterOpened ) {
inserter . open ( ) ;
2021-07-13 18:41:28 +02:00
} else {
2022-04-11 14:04:30 +02:00
inserter . close ( ) ;
}
} , [ inserter , isInserterOpened ] ) ;
return [ isInserterOpened , ( 0 , external _wp _element _namespaceObject . useCallback ) ( updater => {
let isOpen = updater ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( typeof updater === 'function' ) {
2022-04-12 17:12:47 +02:00
isOpen = updater ( ( 0 , external _wp _data _namespaceObject . select ) ( store ) . isInserterOpened ( ) ) ;
2022-04-11 14:04:30 +02:00
}
2021-06-08 10:09:53 +02:00
2022-04-11 14:04:30 +02:00
setIsInserterOpened ( isOpen ) ;
} , [ setIsInserterOpened ] ) ] ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","isShallowEqual"]
var external _wp _isShallowEqual _namespaceObject = window [ "wp" ] [ "isShallowEqual" ] ;
var external _wp _isShallowEqual _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _isShallowEqual _namespaceObject ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/utils.js
// @ts-check
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
/ * *
2022-04-11 14:04:30 +02:00
* External dependencies
2021-05-25 10:40:25 +02:00
* /
/ * *
2022-04-11 14:04:30 +02:00
* Convert settingId to widgetId .
2021-05-25 10:40:25 +02:00
*
2022-04-11 14:04:30 +02:00
* @ param { string } settingId The setting id .
* @ return { string } The widget id .
2021-05-25 10:40:25 +02:00
* /
2022-04-11 14:04:30 +02:00
function settingIdToWidgetId ( settingId ) {
const matches = settingId . match ( /^widget_(.+)(?:\[(\d+)\])$/ ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( matches ) {
const idBase = matches [ 1 ] ;
const number = parseInt ( matches [ 2 ] , 10 ) ;
return ` ${ idBase } - ${ number } ` ;
}
2021-07-06 16:38:40 +02:00
2022-04-11 14:04:30 +02:00
return settingId ;
2021-05-25 10:40:25 +02:00
}
/ * *
2022-04-11 14:04:30 +02:00
* Transform a block to a customizable widget .
*
* @ param { WPBlock } block The block to be transformed from .
* @ param { Object } existingWidget The widget to be extended from .
* @ return { Object } The transformed widget .
2021-05-25 10:40:25 +02:00
* /
2022-04-11 14:04:30 +02:00
function blockToWidget ( block ) {
let existingWidget = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : null ;
let widget ;
const isValidLegacyWidgetBlock = block . name === 'core/legacy-widget' && ( block . attributes . id || block . attributes . instance ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( isValidLegacyWidgetBlock ) {
if ( block . attributes . id ) {
// Widget that does not extend WP_Widget.
widget = {
id : block . attributes . id
} ;
} else {
const {
encoded ,
hash ,
raw ,
... rest
} = block . attributes . instance ; // Widget that extends WP_Widget.
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
widget = {
idBase : block . attributes . idBase ,
instance : { ... ( existingWidget === null || existingWidget === void 0 ? void 0 : existingWidget . instance ) ,
// Required only for the customizer.
is _widget _customizer _js _value : true ,
encoded _serialized _instance : encoded ,
instance _hash _key : hash ,
raw _instance : raw ,
... rest
}
} ;
}
} else {
const instance = {
content : ( 0 , external _wp _blocks _namespaceObject . serialize ) ( block )
} ;
widget = {
idBase : 'block' ,
widgetClass : 'WP_Widget_Block' ,
instance : {
raw _instance : instance
}
} ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
return { ... ( 0 , external _lodash _namespaceObject . omit ) ( existingWidget , [ 'form' , 'rendered' ] ) ,
... widget
} ;
}
2021-05-25 10:40:25 +02:00
/ * *
2022-04-11 14:04:30 +02:00
* Transform a widget to a block .
*
* @ param { Object } widget The widget to be transformed from .
* @ param { string } widget . id The widget id .
* @ param { string } widget . idBase The id base of the widget .
* @ param { number } widget . number The number / index of the widget .
* @ param { Object } widget . instance The instance of the widget .
* @ return { WPBlock } The transformed block .
2021-05-25 10:40:25 +02:00
* /
2022-04-11 14:04:30 +02:00
function widgetToBlock ( _ref ) {
let {
id ,
idBase ,
number ,
instance
} = _ref ;
let block ;
const {
encoded _serialized _instance : encoded ,
instance _hash _key : hash ,
raw _instance : raw ,
... rest
} = instance ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( idBase === 'block' ) {
const parsedBlocks = ( 0 , external _wp _blocks _namespaceObject . parse ) ( raw . content ) ;
block = parsedBlocks . length ? parsedBlocks [ 0 ] : ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( 'core/paragraph' , { } ) ;
} else if ( number ) {
// Widget that extends WP_Widget.
block = ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( 'core/legacy-widget' , {
idBase ,
instance : {
encoded ,
hash ,
raw ,
... rest
}
} ) ;
} else {
// Widget that does not extend WP_Widget.
block = ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( 'core/legacy-widget' , {
id
} ) ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
return ( 0 , external _wp _widgets _namespaceObject . addWidgetIdToBlock ) ( block , id ) ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.js
/ * *
* External dependencies
* /
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
/ * *
2022-04-11 14:04:30 +02:00
* Internal dependencies
2021-05-25 10:40:25 +02:00
* /
2022-04-11 14:04:30 +02:00
function widgetsToBlocks ( widgets ) {
return widgets . map ( widget => widgetToBlock ( widget ) ) ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
function useSidebarBlockEditor ( sidebar ) {
const [ blocks , setBlocks ] = ( 0 , external _wp _element _namespaceObject . useState ) ( ( ) => widgetsToBlocks ( sidebar . getWidgets ( ) ) ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
return sidebar . subscribe ( ( prevWidgets , nextWidgets ) => {
setBlocks ( prevBlocks => {
const prevWidgetsMap = new Map ( prevWidgets . map ( widget => [ widget . id , widget ] ) ) ;
const prevBlocksMap = new Map ( prevBlocks . map ( block => [ ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) , block ] ) ) ;
const nextBlocks = nextWidgets . map ( nextWidget => {
const prevWidget = prevWidgetsMap . get ( nextWidget . id ) ; // Bail out updates.
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( prevWidget && prevWidget === nextWidget ) {
return prevBlocksMap . get ( nextWidget . id ) ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
return widgetToBlock ( nextWidget ) ;
} ) ; // Bail out updates.
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( external _wp _isShallowEqual _default ( ) ( prevBlocks , nextBlocks ) ) {
return prevBlocks ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
return nextBlocks ;
} ) ;
} ) ;
} , [ sidebar ] ) ;
const onChangeBlocks = ( 0 , external _wp _element _namespaceObject . useCallback ) ( nextBlocks => {
setBlocks ( prevBlocks => {
if ( external _wp _isShallowEqual _default ( ) ( prevBlocks , nextBlocks ) ) {
return prevBlocks ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
const prevBlocksMap = new Map ( prevBlocks . map ( block => [ ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) , block ] ) ) ;
const nextWidgets = nextBlocks . map ( nextBlock => {
const widgetId = ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( nextBlock ) ; // Update existing widgets.
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( widgetId && prevBlocksMap . has ( widgetId ) ) {
const prevBlock = prevBlocksMap . get ( widgetId ) ;
const prevWidget = sidebar . getWidget ( widgetId ) ; // Bail out updates by returning the previous widgets.
// Deep equality is necessary until the block editor's internals changes.
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( ( 0 , external _lodash _namespaceObject . isEqual ) ( nextBlock , prevBlock ) && prevWidget ) {
return prevWidget ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
return blockToWidget ( nextBlock , prevWidget ) ;
} // Add a new widget.
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
return blockToWidget ( nextBlock ) ;
} ) ; // Bail out updates if the updated widgets are the same.
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( external _wp _isShallowEqual _default ( ) ( sidebar . getWidgets ( ) , nextWidgets ) ) {
return prevBlocks ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
const addedWidgetIds = sidebar . setWidgets ( nextWidgets ) ;
return nextBlocks . reduce ( ( updatedNextBlocks , nextBlock , index ) => {
const addedWidgetId = addedWidgetIds [ index ] ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( addedWidgetId !== null ) {
// Only create a new instance if necessary to prevent
// the whole editor from re-rendering on every edit.
if ( updatedNextBlocks === nextBlocks ) {
updatedNextBlocks = nextBlocks . slice ( ) ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
updatedNextBlocks [ index ] = ( 0 , external _wp _widgets _namespaceObject . addWidgetIdToBlock ) ( nextBlock , addedWidgetId ) ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
return updatedNextBlocks ;
} , nextBlocks ) ;
} ) ;
} , [ sidebar ] ) ;
return [ blocks , onChangeBlocks , onChangeBlocks ] ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/index.js
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
/ * *
* WordPress dependencies
* /
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
/ * *
* Internal dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
const FocusControlContext = ( 0 , external _wp _element _namespaceObject . createContext ) ( ) ;
function FocusControl ( _ref ) {
let {
api ,
sidebarControls ,
children
} = _ref ;
const [ focusedWidgetIdRef , setFocusedWidgetIdRef ] = ( 0 , external _wp _element _namespaceObject . useState ) ( {
current : null
} ) ;
const focusWidget = ( 0 , external _wp _element _namespaceObject . useCallback ) ( widgetId => {
for ( const sidebarControl of sidebarControls ) {
const widgets = sidebarControl . setting . get ( ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( widgets . includes ( widgetId ) ) {
sidebarControl . sectionInstance . expand ( {
// Schedule it after the complete callback so that
// it won't be overridden by the "Back" button focus.
completeCallback ( ) {
// Create a "ref-like" object every time to ensure
// the same widget id can also triggers the focus control.
setFocusedWidgetIdRef ( {
current : widgetId
} ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
} ) ;
break ;
}
}
} , [ sidebarControls ] ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
function handleFocus ( settingId ) {
const widgetId = settingIdToWidgetId ( settingId ) ;
focusWidget ( widgetId ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function handleReady ( ) {
api . previewer . preview . bind ( 'focus-control-for-setting' , handleFocus ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
api . previewer . bind ( 'ready' , handleReady ) ;
return ( ) => {
api . previewer . unbind ( 'ready' , handleReady ) ;
api . previewer . preview . unbind ( 'focus-control-for-setting' , handleFocus ) ;
} ;
} , [ api , focusWidget ] ) ;
const context = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => [ focusedWidgetIdRef , focusWidget ] , [ focusedWidgetIdRef , focusWidget ] ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( FocusControlContext . Provider , {
value : context
} , children ) ;
}
const useFocusControl = ( ) => ( 0 , external _wp _element _namespaceObject . useContext ) ( FocusControlContext ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.js
/ * *
* WordPress dependencies
* /
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
/ * *
* Internal dependencies
* /
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function useBlocksFocusControl ( blocks ) {
const {
selectBlock
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _blockEditor _namespaceObject . store ) ;
const [ focusedWidgetIdRef ] = useFocusControl ( ) ;
const blocksRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( blocks ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
blocksRef . current = blocks ;
} , [ blocks ] ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( focusedWidgetIdRef . current ) {
const focusedBlock = blocksRef . current . find ( block => ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) === focusedWidgetIdRef . current ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( focusedBlock ) {
selectBlock ( focusedBlock . clientId ) ; // If the block is already being selected, the DOM node won't
// get focused again automatically.
// We select the DOM and focus it manually here.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
const blockNode = document . querySelector ( ` [data-block=" ${ focusedBlock . clientId } "] ` ) ;
blockNode === null || blockNode === void 0 ? void 0 : blockNode . focus ( ) ;
}
}
} , [ focusedWidgetIdRef , selectBlock ] ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.js
2021-11-08 15:29:21 +01:00
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
2021-11-08 15:29:21 +01:00
/ * *
2022-04-11 14:04:30 +02:00
* Internal dependencies
2021-11-08 15:29:21 +01:00
* /
2021-11-15 13:50:17 +01:00
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function SidebarEditorProvider ( _ref ) {
let {
sidebar ,
settings ,
children
} = _ref ;
const [ blocks , onInput , onChange ] = useSidebarBlockEditor ( sidebar ) ;
useBlocksFocusControl ( blocks ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . BlockEditorProvider , {
value : blocks ,
onInput : onInput ,
onChange : onChange ,
settings : settings ,
useSubRegistry : false
} , children ) ;
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/welcome-guide/index.js
2021-11-15 13:50:17 +01:00
2021-11-08 15:29:21 +01:00
/ * *
2022-04-11 14:04:30 +02:00
* WordPress dependencies
2021-11-08 15:29:21 +01:00
* /
2021-11-15 13:50:17 +01:00
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function WelcomeGuide ( _ref ) {
let {
sidebar
} = _ref ;
const {
2022-04-12 17:12:47 +02:00
toggle
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _preferences _namespaceObject . store ) ;
2022-04-11 14:04:30 +02:00
const isEntirelyBlockWidgets = sidebar . getWidgets ( ) . every ( widget => widget . id . startsWith ( 'block-' ) ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( "div" , {
className : "customize-widgets-welcome-guide"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( "div" , {
className : "customize-widgets-welcome-guide__image__wrapper"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( "picture" , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( "source" , {
srcSet : "https://s.w.org/images/block-editor/welcome-editor.svg" ,
media : "(prefers-reduced-motion: reduce)"
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( "img" , {
className : "customize-widgets-welcome-guide__image" ,
src : "https://s.w.org/images/block-editor/welcome-editor.gif" ,
width : "312" ,
height : "240" ,
alt : ""
} ) ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( "h1" , {
className : "customize-widgets-welcome-guide__heading"
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome to block Widgets' ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( "p" , {
className : "customize-widgets-welcome-guide__text"
} , isEntirelyBlockWidgets ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Your theme provides different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ ll look on your site.' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'You can now add any block to your site’ s widget areas. Don’ t worry, all of your favorite widgets still work flawlessly.' ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Button , {
className : "customize-widgets-welcome-guide__button" ,
variant : "primary" ,
2022-04-12 17:12:47 +02:00
onClick : ( ) => toggle ( 'core/customize-widgets' , 'welcomeGuide' )
2022-04-11 14:04:30 +02:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Got it' ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( "hr" , {
className : "customize-widgets-welcome-guide__separator"
} ) , ! isEntirelyBlockWidgets && ( 0 , external _wp _element _namespaceObject . createElement ) ( "p" , {
className : "customize-widgets-welcome-guide__more-info"
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Want to stick with the old widgets?' ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( "br" , null ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . ExternalLink , {
href : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'https://wordpress.org/plugins/classic-widgets/' )
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Get the Classic Widgets plugin.' ) ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( "p" , {
className : "customize-widgets-welcome-guide__more-info"
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'New to the block editor?' ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( "br" , null ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . ExternalLink , {
href : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'https://wordpress.org/support/article/wordpress-editor/' )
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Here's a detailed guide." ) ) ) ) ;
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcuts/index.js
2021-11-08 15:29:21 +01:00
/ * *
2022-04-11 14:04:30 +02:00
* WordPress dependencies
2021-11-08 15:29:21 +01:00
* /
2021-11-15 13:50:17 +01:00
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function KeyboardShortcuts ( _ref ) {
let {
undo ,
redo ,
save
} = _ref ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/customize-widgets/undo' , event => {
undo ( ) ;
event . preventDefault ( ) ;
} ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/customize-widgets/redo' , event => {
redo ( ) ;
event . preventDefault ( ) ;
} ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/customize-widgets/save' , event => {
event . preventDefault ( ) ;
save ( ) ;
} ) ;
return null ;
}
function KeyboardShortcutsRegister ( ) {
const {
registerShortcut ,
unregisterShortcut
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _keyboardShortcuts _namespaceObject . store ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
registerShortcut ( {
name : 'core/customize-widgets/undo' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Undo your last changes.' ) ,
keyCombination : {
modifier : 'primary' ,
character : 'z'
}
} ) ;
registerShortcut ( {
name : 'core/customize-widgets/redo' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Redo your last undo.' ) ,
keyCombination : {
modifier : 'primaryShift' ,
character : 'z'
}
} ) ;
registerShortcut ( {
name : 'core/customize-widgets/save' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Save your changes.' ) ,
keyCombination : {
modifier : 'primary' ,
character : 's'
}
} ) ;
return ( ) => {
unregisterShortcut ( 'core/customize-widgets/undo' ) ;
unregisterShortcut ( 'core/customize-widgets/redo' ) ;
unregisterShortcut ( 'core/customize-widgets/save' ) ;
} ;
} , [ registerShortcut ] ) ;
return null ;
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
KeyboardShortcuts . Register = KeyboardShortcutsRegister ;
/* harmony default export */ var keyboard _shortcuts = ( KeyboardShortcuts ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-appender/index.js
2021-11-08 15:29:21 +01:00
/ * *
2022-04-11 14:04:30 +02:00
* WordPress dependencies
2021-11-08 15:29:21 +01:00
* /
2022-04-11 14:04:30 +02:00
function BlockAppender ( props ) {
const ref = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
const isBlocksListEmpty = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _blockEditor _namespaceObject . store ) . getBlockCount ( ) === 0 ) ; // Move the focus to the block appender to prevent focus from
// being lost when emptying the widget area.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( isBlocksListEmpty && ref . current ) {
const {
ownerDocument
} = ref . current ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( ! ownerDocument . activeElement || ownerDocument . activeElement === ownerDocument . body ) {
ref . current . focus ( ) ;
}
}
} , [ isBlocksListEmpty ] ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . ButtonBlockAppender , _extends ( { } , props , {
ref : ref
} ) ) ;
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/index.js
2021-11-08 15:29:21 +01:00
/ * *
* External dependencies
* /
/ * *
2022-04-11 14:04:30 +02:00
* WordPress dependencies
2021-11-08 15:29:21 +01:00
* /
2022-04-11 14:04:30 +02:00
2021-11-08 15:29:21 +01:00
/ * *
2022-04-11 14:04:30 +02:00
* Internal dependencies
2021-11-08 15:29:21 +01:00
* /
2022-04-11 14:04:30 +02:00
function SidebarBlockEditor ( _ref ) {
let {
blockEditorSettings ,
sidebar ,
inserter ,
inspector
} = _ref ;
const [ isInserterOpened , setIsInserterOpened ] = useInserter ( inserter ) ;
const {
hasUploadPermissions ,
isFixedToolbarActive ,
keepCaretInsideBlock ,
isWelcomeGuideActive
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
2022-04-12 17:12:47 +02:00
get
} = select ( external _wp _preferences _namespaceObject . store ) ;
2022-04-11 14:04:30 +02:00
return {
hasUploadPermissions : ( 0 , external _lodash _namespaceObject . defaultTo ) ( select ( external _wp _coreData _namespaceObject . store ) . canUser ( 'create' , 'media' ) , true ) ,
2022-04-12 17:12:47 +02:00
isFixedToolbarActive : ! ! get ( 'core/customize-widgets' , 'fixedToolbar' ) ,
keepCaretInsideBlock : ! ! get ( 'core/customize-widgets' , 'keepCaretInsideBlock' ) ,
isWelcomeGuideActive : ! ! get ( 'core/customize-widgets' , 'welcomeGuide' )
2022-04-11 14:04:30 +02:00
} ;
} , [ ] ) ;
const settings = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => {
let mediaUploadBlockEditor ;
if ( hasUploadPermissions ) {
mediaUploadBlockEditor = _ref2 => {
let {
onError ,
... argumentsObject
} = _ref2 ;
( 0 , external _wp _mediaUtils _namespaceObject . uploadMedia ) ( {
wpAllowedMimeTypes : blockEditorSettings . allowedMimeTypes ,
onError : _ref3 => {
let {
message
} = _ref3 ;
return onError ( message ) ;
} ,
... argumentsObject
} ) ;
} ;
}
return { ... blockEditorSettings ,
_ _experimentalSetIsInserterOpened : setIsInserterOpened ,
mediaUpload : mediaUploadBlockEditor ,
hasFixedToolbar : isFixedToolbarActive ,
keepCaretInsideBlock ,
_ _unstableHasCustomAppender : true
} ;
} , [ hasUploadPermissions , blockEditorSettings , isFixedToolbarActive , keepCaretInsideBlock , setIsInserterOpened ] ) ;
if ( isWelcomeGuideActive ) {
return ( 0 , external _wp _element _namespaceObject . createElement ) ( WelcomeGuide , {
sidebar : sidebar
} ) ;
}
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _element _namespaceObject . Fragment , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . BlockEditorKeyboardShortcuts . Register , null ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( keyboard _shortcuts . Register , null ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( SidebarEditorProvider , {
sidebar : sidebar ,
settings : settings
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( keyboard _shortcuts , {
undo : sidebar . undo ,
redo : sidebar . redo ,
save : sidebar . save
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( header , {
sidebar : sidebar ,
inserter : inserter ,
isInserterOpened : isInserterOpened ,
setIsInserterOpened : setIsInserterOpened ,
isFixedToolbarActive : isFixedToolbarActive
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . CopyHandler , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . BlockTools , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . _ _unstableEditorStyles , {
styles : settings . defaultEditorStyles
} ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . BlockSelectionClearer , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . WritingFlow , {
className : "editor-styles-wrapper"
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . ObserveTyping , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . BlockList , {
renderAppender : BlockAppender
} ) ) ) ) ) ) , ( 0 , external _wp _element _namespaceObject . createPortal ) ( // This is a temporary hack to prevent button component inside <BlockInspector>
// from submitting form when type="button" is not specified.
( 0 , external _wp _element _namespaceObject . createElement ) ( "form" , {
onSubmit : event => event . preventDefault ( )
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . BlockInspector , null ) ) , inspector . contentContainer [ 0 ] ) ) , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . _ _unstableBlockSettingsMenuFirstItem , null , _ref4 => {
let {
onClose
} = _ref4 ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( block _inspector _button , {
inspector : inspector ,
closeMenu : onClose
} ) ;
} ) ) ;
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-controls/index.js
2021-11-08 15:29:21 +01:00
/ * *
* WordPress dependencies
* /
2022-04-11 14:04:30 +02:00
const SidebarControlsContext = ( 0 , external _wp _element _namespaceObject . createContext ) ( ) ;
function SidebarControls ( _ref ) {
let {
sidebarControls ,
activeSidebarControl ,
children
} = _ref ;
const context = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => ( {
sidebarControls ,
activeSidebarControl
} ) , [ sidebarControls , activeSidebarControl ] ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( SidebarControlsContext . Provider , {
value : context
} , children ) ;
}
function useSidebarControls ( ) {
const {
sidebarControls
} = ( 0 , external _wp _element _namespaceObject . useContext ) ( SidebarControlsContext ) ;
return sidebarControls ;
}
function useActiveSidebarControl ( ) {
const {
activeSidebarControl
} = ( 0 , external _wp _element _namespaceObject . useContext ) ( SidebarControlsContext ) ;
return activeSidebarControl ;
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/use-clear-selected-block.js
2021-11-08 15:29:21 +01:00
/ * *
2022-04-11 14:04:30 +02:00
* WordPress dependencies
2021-11-08 15:29:21 +01:00
* /
/ * *
2022-04-11 14:04:30 +02:00
* We can ' t just use < BlockSelectionClearer > because the customizer has
* many root nodes rather than just one in the post editor .
* We need to listen to the focus events in all those roots , and also in
* the preview iframe .
* This hook will clear the selected block when focusing outside the editor ,
* with a few exceptions :
* 1. Focusing on popovers .
* 2. Focusing on the inspector .
* 3. Focusing on any modals / dialogs .
* These cases are normally triggered by user interactions from the editor ,
* not by explicitly focusing outside the editor , hence no need for clearing .
2021-11-08 15:29:21 +01:00
*
2022-04-11 14:04:30 +02:00
* @ param { Object } sidebarControl The sidebar control instance .
* @ param { Object } popoverRef The ref object of the popover node container .
2021-11-08 15:29:21 +01:00
* /
2022-04-11 14:04:30 +02:00
function useClearSelectedBlock ( sidebarControl , popoverRef ) {
const {
hasSelectedBlock ,
hasMultiSelection
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( external _wp _blockEditor _namespaceObject . store ) ;
const {
clearSelectedBlock
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _blockEditor _namespaceObject . store ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( popoverRef . current && sidebarControl ) {
const inspector = sidebarControl . inspector ;
const container = sidebarControl . container [ 0 ] ;
const ownerDocument = container . ownerDocument ;
const ownerWindow = ownerDocument . defaultView ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function handleClearSelectedBlock ( element ) {
if ( // 1. Make sure there are blocks being selected.
( hasSelectedBlock ( ) || hasMultiSelection ( ) ) && // 2. The element should exist in the DOM (not deleted).
element && ownerDocument . contains ( element ) && // 3. It should also not exist in the container, the popover, nor the dialog.
! container . contains ( element ) && ! popoverRef . current . contains ( element ) && ! element . closest ( '[role="dialog"]' ) && // 4. The inspector should not be opened.
! inspector . expanded ( ) ) {
clearSelectedBlock ( ) ;
}
} // Handle mouse down in the same document.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function handleMouseDown ( event ) {
handleClearSelectedBlock ( event . target ) ;
} // Handle focusing outside the current document, like to iframes.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function handleBlur ( ) {
handleClearSelectedBlock ( ownerDocument . activeElement ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
ownerDocument . addEventListener ( 'mousedown' , handleMouseDown ) ;
ownerWindow . addEventListener ( 'blur' , handleBlur ) ;
return ( ) => {
ownerDocument . removeEventListener ( 'mousedown' , handleMouseDown ) ;
ownerWindow . removeEventListener ( 'blur' , handleBlur ) ;
} ;
}
} , [ popoverRef , sidebarControl , hasSelectedBlock , hasMultiSelection , clearSelectedBlock ] ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/index.js
2021-11-08 15:29:21 +01:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2022-04-11 14:04:30 +02:00
function CustomizeWidgets ( _ref ) {
2021-11-15 13:50:17 +01:00
let {
2022-04-11 14:04:30 +02:00
api ,
sidebarControls ,
blockEditorSettings
2021-11-15 13:50:17 +01:00
} = _ref ;
2022-04-11 14:04:30 +02:00
const [ activeSidebarControl , setActiveSidebarControl ] = ( 0 , external _wp _element _namespaceObject . useState ) ( null ) ;
const parentContainer = document . getElementById ( 'customize-theme-controls' ) ;
const popoverRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
useClearSelectedBlock ( activeSidebarControl , popoverRef ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
const unsubscribers = sidebarControls . map ( sidebarControl => sidebarControl . subscribe ( expanded => {
if ( expanded ) {
setActiveSidebarControl ( sidebarControl ) ;
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
} ) ) ;
return ( ) => {
unsubscribers . forEach ( unsubscriber => unsubscriber ( ) ) ;
} ;
} , [ sidebarControls ] ) ;
const activeSidebar = activeSidebarControl && ( 0 , external _wp _element _namespaceObject . createPortal ) ( ( 0 , external _wp _element _namespaceObject . createElement ) ( ErrorBoundary , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( SidebarBlockEditor , {
key : activeSidebarControl . id ,
blockEditorSettings : blockEditorSettings ,
sidebar : activeSidebarControl . sidebarAdapter ,
inserter : activeSidebarControl . inserter ,
inspector : activeSidebarControl . inspector
} ) ) , activeSidebarControl . container [ 0 ] ) ; // We have to portal this to the parent of both the editor and the inspector,
// so that the popovers will appear above both of them.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
const popover = parentContainer && ( 0 , external _wp _element _namespaceObject . createPortal ) ( ( 0 , external _wp _element _namespaceObject . createElement ) ( "div" , {
className : "customize-widgets-popover" ,
ref : popoverRef
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Popover . Slot , null ) ) , parentContainer ) ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _keyboardShortcuts _namespaceObject . ShortcutProvider , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _components _namespaceObject . SlotFillProvider , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( SidebarControls , {
sidebarControls : sidebarControls ,
activeSidebarControl : activeSidebarControl
} , ( 0 , external _wp _element _namespaceObject . createElement ) ( FocusControl , {
api : api ,
sidebarControls : sidebarControls
} , activeSidebar , popover ) ) ) ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/inspector-section.js
function getInspectorSection ( ) {
const {
wp : {
customize
}
} = window ;
return class InspectorSection extends customize . Section {
constructor ( id , options ) {
super ( id , options ) ;
this . parentSection = options . parentSection ;
this . returnFocusWhenClose = null ;
this . _isOpen = false ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
get isOpen ( ) {
return this . _isOpen ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
set isOpen ( value ) {
this . _isOpen = value ;
this . triggerActiveCallbacks ( ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
ready ( ) {
this . contentContainer [ 0 ] . classList . add ( 'customize-widgets-layout__inspector' ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
isContextuallyActive ( ) {
return this . isOpen ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
onChangeExpanded ( expanded , args ) {
super . onChangeExpanded ( expanded , args ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( this . parentSection && ! args . unchanged ) {
if ( expanded ) {
this . parentSection . collapse ( {
manualTransition : true
} ) ;
} else {
this . parentSection . expand ( {
manualTransition : true ,
completeCallback : ( ) => {
// Return focus after finishing the transition.
if ( this . returnFocusWhenClose && ! this . contentContainer [ 0 ] . contains ( this . returnFocusWhenClose ) ) {
this . returnFocusWhenClose . focus ( ) ;
}
}
} ) ;
}
}
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
open ( ) {
let {
returnFocusWhenClose
} = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
this . isOpen = true ;
this . returnFocusWhenClose = returnFocusWhenClose ;
this . expand ( {
allowMultiple : true
} ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
close ( ) {
this . collapse ( {
allowMultiple : true
} ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
collapse ( options ) {
// Overridden collapse() function. Mostly call the parent collapse(), but also
// move our .isOpen to false.
// Initially, I tried tracking this with onChangeExpanded(), but it doesn't work
// because the block settings sidebar is a layer "on top of" the G editor sidebar.
//
// For example, when closing the block settings sidebar, the G
// editor sidebar would display, and onChangeExpanded in
// inspector-section would run with expanded=true, but I want
// isOpen to be false when the block settings is closed.
this . isOpen = false ;
super . collapse ( options ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
triggerActiveCallbacks ( ) {
// Manually fire the callbacks associated with moving this.active
// from false to true. "active" is always true for this section,
// and "isContextuallyActive" reflects if the block settings
// sidebar is currently visible, that is, it has replaced the main
// Gutenberg view.
// The WP customizer only checks ".isContextuallyActive()" when
// ".active" changes values. But our ".active" never changes value.
// The WP customizer never foresaw a section being used a way we
// fit the block settings sidebar into a section. By manually
// triggering the "this.active" callbacks, we force the WP
// customizer to query our .isContextuallyActive() function and
// update its view of our status.
this . active . callbacks . fireWith ( this . active , [ false , true ] ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
} ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-section.js
2021-11-08 15:29:21 +01:00
/ * *
2022-04-11 14:04:30 +02:00
* WordPress dependencies
2021-11-08 15:29:21 +01:00
* /
/ * *
2022-04-11 14:04:30 +02:00
* Internal dependencies
2021-11-08 15:29:21 +01:00
* /
2022-04-11 14:04:30 +02:00
const getInspectorSectionId = sidebarId => ` widgets-inspector- ${ sidebarId } ` ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function getSidebarSection ( ) {
const {
wp : {
customize
}
} = window ;
2022-04-12 17:12:47 +02:00
const reduceMotionMediaQuery = window . matchMedia ( '(prefers-reduced-motion: reduce)' ) ;
let isReducedMotion = reduceMotionMediaQuery . matches ;
reduceMotionMediaQuery . addEventListener ( 'change' , event => {
isReducedMotion = event . matches ;
} ) ;
2022-04-11 14:04:30 +02:00
return class SidebarSection extends customize . Section {
ready ( ) {
const InspectorSection = getInspectorSection ( ) ;
this . inspector = new InspectorSection ( getInspectorSectionId ( this . id ) , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Block Settings' ) ,
parentSection : this ,
customizeAction : [ ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Customizing' ) , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widgets' ) , this . params . title ] . join ( ' ▸ ' )
} ) ;
customize . section . add ( this . inspector ) ;
this . contentContainer [ 0 ] . classList . add ( 'customize-widgets__sidebar-section' ) ;
}
hasSubSectionOpened ( ) {
return this . inspector . expanded ( ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
onChangeExpanded ( expanded , _args ) {
const controls = this . controls ( ) ;
const args = { ... _args ,
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
completeCallback ( ) {
var _args$completeCallbac ;
controls . forEach ( control => {
var _control$onChangeSect ;
( _control$onChangeSect = control . onChangeSectionExpanded ) === null || _control$onChangeSect === void 0 ? void 0 : _control$onChangeSect . call ( control , expanded , args ) ;
} ) ;
( _args$completeCallbac = _args . completeCallback ) === null || _args$completeCallbac === void 0 ? void 0 : _args$completeCallbac . call ( _args ) ;
2021-11-15 13:50:17 +01:00
}
2022-04-11 14:04:30 +02:00
} ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( args . manualTransition ) {
if ( expanded ) {
this . contentContainer . addClass ( [ 'busy' , 'open' ] ) ;
this . contentContainer . removeClass ( 'is-sub-section-open' ) ;
this . contentContainer . closest ( '.wp-full-overlay' ) . addClass ( 'section-open' ) ;
} else {
this . contentContainer . addClass ( [ 'busy' , 'is-sub-section-open' ] ) ;
this . contentContainer . closest ( '.wp-full-overlay' ) . addClass ( 'section-open' ) ;
this . contentContainer . removeClass ( 'open' ) ;
2022-04-12 17:12:47 +02:00
}
const handleTransitionEnd = ( ) => {
this . contentContainer . removeClass ( 'busy' ) ;
args . completeCallback ( ) ;
} ;
if ( isReducedMotion ) {
handleTransitionEnd ( ) ;
} else {
this . contentContainer . one ( 'transitionend' , handleTransitionEnd ) ;
2022-04-11 14:04:30 +02:00
}
} else {
super . onChangeExpanded ( expanded , args ) ;
}
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
} ;
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-adapter.js
/ * *
* Internal dependencies
* /
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
const {
wp
} = window ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function parseWidgetId ( widgetId ) {
const matches = widgetId . match ( /^(.+)-(\d+)$/ ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( matches ) {
return {
idBase : matches [ 1 ] ,
number : parseInt ( matches [ 2 ] , 10 )
} ;
} // Likely an old single widget.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
return {
idBase : widgetId
} ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function widgetIdToSettingId ( widgetId ) {
const {
idBase ,
number
} = parseWidgetId ( widgetId ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( number ) {
return ` widget_ ${ idBase } [ ${ number } ] ` ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
return ` widget_ ${ idBase } ` ;
}
2021-11-08 15:29:21 +01:00
/ * *
2022-04-11 14:04:30 +02:00
* This is a custom debounce function to call different callbacks depending on
* whether it ' s the _leading _ call or not .
*
* @ param { Function } leading The callback that gets called first .
* @ param { Function } callback The callback that gets called after the first time .
* @ param { number } timeout The debounced time in milliseconds .
* @ return { Function } The debounced function .
2021-11-08 15:29:21 +01:00
* /
2022-04-11 14:04:30 +02:00
function debounce ( leading , callback , timeout ) {
let isLeading = false ;
let timerID ;
function debounced ( ) {
for ( var _len = arguments . length , args = new Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) {
args [ _key ] = arguments [ _key ] ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
const result = ( isLeading ? callback : leading ) . apply ( this , args ) ;
isLeading = true ;
clearTimeout ( timerID ) ;
timerID = setTimeout ( ( ) => {
isLeading = false ;
} , timeout ) ;
return result ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
debounced . cancel = ( ) => {
isLeading = false ;
clearTimeout ( timerID ) ;
} ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
return debounced ;
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
class SidebarAdapter {
constructor ( setting , api ) {
this . setting = setting ;
this . api = api ;
this . locked = false ;
this . widgetsCache = new WeakMap ( ) ;
this . subscribers = new Set ( ) ;
this . history = [ this . _getWidgetIds ( ) . map ( widgetId => this . getWidget ( widgetId ) ) ] ;
this . historyIndex = 0 ;
this . historySubscribers = new Set ( ) ; // Debounce the input for 1 second.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _debounceSetHistory = debounce ( this . _pushHistory , this . _replaceHistory , 1000 ) ;
this . setting . bind ( this . _handleSettingChange . bind ( this ) ) ;
this . api . bind ( 'change' , this . _handleAllSettingsChange . bind ( this ) ) ;
this . undo = this . undo . bind ( this ) ;
this . redo = this . redo . bind ( this ) ;
this . save = this . save . bind ( this ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
subscribe ( callback ) {
this . subscribers . add ( callback ) ;
return ( ) => {
this . subscribers . delete ( callback ) ;
} ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
getWidgets ( ) {
return this . history [ this . historyIndex ] ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_emit ( ) {
for ( const callback of this . subscribers ) {
callback ( ... arguments ) ;
}
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_getWidgetIds ( ) {
return this . setting . get ( ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_pushHistory ( ) {
this . history = [ ... this . history . slice ( 0 , this . historyIndex + 1 ) , this . _getWidgetIds ( ) . map ( widgetId => this . getWidget ( widgetId ) ) ] ;
this . historyIndex += 1 ;
this . historySubscribers . forEach ( listener => listener ( ) ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_replaceHistory ( ) {
this . history [ this . historyIndex ] = this . _getWidgetIds ( ) . map ( widgetId => this . getWidget ( widgetId ) ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_handleSettingChange ( ) {
if ( this . locked ) {
return ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
const prevWidgets = this . getWidgets ( ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _pushHistory ( ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _emit ( prevWidgets , this . getWidgets ( ) ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_handleAllSettingsChange ( setting ) {
if ( this . locked ) {
return ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( ! setting . id . startsWith ( 'widget_' ) ) {
return ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
const widgetId = settingIdToWidgetId ( setting . id ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( ! this . setting . get ( ) . includes ( widgetId ) ) {
return ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
const prevWidgets = this . getWidgets ( ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _pushHistory ( ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _emit ( prevWidgets , this . getWidgets ( ) ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_createWidget ( widget ) {
const widgetModel = wp . customize . Widgets . availableWidgets . findWhere ( {
id _base : widget . idBase
} ) ;
let number = widget . number ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( widgetModel . get ( 'is_multi' ) && ! number ) {
widgetModel . set ( 'multi_number' , widgetModel . get ( 'multi_number' ) + 1 ) ;
number = widgetModel . get ( 'multi_number' ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
const settingId = number ? ` widget_ ${ widget . idBase } [ ${ number } ] ` : ` widget_ ${ widget . idBase } ` ;
const settingArgs = {
transport : wp . customize . Widgets . data . selectiveRefreshableWidgets [ widgetModel . get ( 'id_base' ) ] ? 'postMessage' : 'refresh' ,
previewer : this . setting . previewer
} ;
const setting = this . api . create ( settingId , settingId , '' , settingArgs ) ;
setting . set ( widget . instance ) ;
const widgetId = settingIdToWidgetId ( settingId ) ;
return widgetId ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_removeWidget ( widget ) {
const settingId = widgetIdToSettingId ( widget . id ) ;
const setting = this . api ( settingId ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( setting ) {
const instance = setting . get ( ) ;
this . widgetsCache . delete ( instance ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . api . remove ( settingId ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_updateWidget ( widget ) {
const prevWidget = this . getWidget ( widget . id ) ; // Bail out update if nothing changed.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( prevWidget === widget ) {
return widget . id ;
} // Update existing setting if only the widget's instance changed.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( prevWidget . idBase && widget . idBase && prevWidget . idBase === widget . idBase ) {
const settingId = widgetIdToSettingId ( widget . id ) ;
this . api ( settingId ) . set ( widget . instance ) ;
return widget . id ;
} // Otherwise delete and re-create.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _removeWidget ( widget ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
return this . _createWidget ( widget ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
getWidget ( widgetId ) {
if ( ! widgetId ) {
return null ;
2021-11-08 15:29:21 +01:00
}
const {
2022-04-11 14:04:30 +02:00
idBase ,
number
} = parseWidgetId ( widgetId ) ;
const settingId = widgetIdToSettingId ( widgetId ) ;
const setting = this . api ( settingId ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( ! setting ) {
return null ;
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
const instance = setting . get ( ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( this . widgetsCache . has ( instance ) ) {
return this . widgetsCache . get ( instance ) ;
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
const widget = {
id : widgetId ,
idBase ,
number ,
instance
2021-11-08 15:29:21 +01:00
} ;
2022-04-11 14:04:30 +02:00
this . widgetsCache . set ( instance , widget ) ;
return widget ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_updateWidgets ( nextWidgets ) {
this . locked = true ;
const addedWidgetIds = [ ] ;
const nextWidgetIds = nextWidgets . map ( nextWidget => {
if ( nextWidget . id && this . getWidget ( nextWidget . id ) ) {
addedWidgetIds . push ( null ) ;
return this . _updateWidget ( nextWidget ) ;
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
const widgetId = this . _createWidget ( nextWidget ) ;
addedWidgetIds . push ( widgetId ) ;
return widgetId ;
} ) ;
const deletedWidgets = this . getWidgets ( ) . filter ( widget => ! nextWidgetIds . includes ( widget . id ) ) ;
deletedWidgets . forEach ( widget => this . _removeWidget ( widget ) ) ;
this . setting . set ( nextWidgetIds ) ;
this . locked = false ;
return addedWidgetIds ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
setWidgets ( nextWidgets ) {
const addedWidgetIds = this . _updateWidgets ( nextWidgets ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _debounceSetHistory ( ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
return addedWidgetIds ;
}
/ * *
* Undo / Redo related features
* /
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
hasUndo ( ) {
return this . historyIndex > 0 ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
hasRedo ( ) {
return this . historyIndex < this . history . length - 1 ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
_seek ( historyIndex ) {
const currentWidgets = this . getWidgets ( ) ;
this . historyIndex = historyIndex ;
const widgets = this . history [ this . historyIndex ] ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _updateWidgets ( widgets ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _emit ( currentWidgets , this . getWidgets ( ) ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . historySubscribers . forEach ( listener => listener ( ) ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _debounceSetHistory . cancel ( ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
undo ( ) {
if ( ! this . hasUndo ( ) ) {
return ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . _seek ( this . historyIndex - 1 ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
redo ( ) {
if ( ! this . hasRedo ( ) ) {
2021-11-08 15:29:21 +01:00
return ;
}
2022-04-11 14:04:30 +02:00
this . _seek ( this . historyIndex + 1 ) ;
}
subscribeHistory ( listener ) {
this . historySubscribers . add ( listener ) ;
2021-11-08 15:29:21 +01:00
return ( ) => {
2022-04-11 14:04:30 +02:00
this . historySubscribers . delete ( listener ) ;
2021-11-08 15:29:21 +01:00
} ;
2022-04-11 14:04:30 +02:00
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
save ( ) {
this . api . previewer . save ( ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","dom"]
var external _wp _dom _namespaceObject = window [ "wp" ] [ "dom" ] ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/inserter-outer-section.js
/ * *
* WordPress dependencies
* /
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
/ * *
* Internal dependencies
* /
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function getInserterOuterSection ( ) {
const {
wp : {
customize
}
} = window ;
const OuterSection = customize . OuterSection ; // Override the OuterSection class to handle multiple outer sections.
// It closes all the other outer sections whenever one is opened.
// The result is that at most one outer section can be opened at the same time.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
customize . OuterSection = class extends OuterSection {
onChangeExpanded ( expanded , args ) {
if ( expanded ) {
customize . section . each ( section => {
if ( section . params . type === 'outer' && section . id !== this . id ) {
if ( section . expanded ( ) ) {
section . collapse ( ) ;
}
}
} ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
return super . onChangeExpanded ( expanded , args ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
} ; // Handle constructor so that "params.type" can be correctly pointed to "outer".
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
customize . sectionConstructor . outer = customize . OuterSection ;
return class InserterOuterSection extends customize . OuterSection {
constructor ( ) {
super ( ... arguments ) ; // This is necessary since we're creating a new class which is not identical to the original OuterSection.
// @See https://github.com/WordPress/wordpress-develop/blob/42b05c397c50d9dc244083eff52991413909d4bd/src/js/_enqueues/wp/customize/controls.js#L1427-L1436
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . params . type = 'outer' ;
this . activeElementBeforeExpanded = null ;
const ownerWindow = this . contentContainer [ 0 ] . ownerDocument . defaultView ; // Handle closing the inserter when pressing the Escape key.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
ownerWindow . addEventListener ( 'keydown' , event => {
if ( this . expanded ( ) && ( event . keyCode === external _wp _keycodes _namespaceObject . ESCAPE || event . code === 'Escape' ) && ! event . defaultPrevented ) {
event . preventDefault ( ) ;
event . stopPropagation ( ) ;
2022-04-12 17:12:47 +02:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( store ) . setIsInserterOpened ( false ) ;
2022-04-11 14:04:30 +02:00
}
} , // Use capture mode to make this run before other event listeners.
true ) ;
this . contentContainer . addClass ( 'widgets-inserter' ) ; // Set a flag if the state is being changed from open() or close().
// Don't propagate the event if it's an internal action to prevent infinite loop.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . isFromInternalAction = false ;
this . expanded . bind ( ( ) => {
if ( ! this . isFromInternalAction ) {
// Propagate the event to React to sync the state.
2022-04-12 17:12:47 +02:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( store ) . setIsInserterOpened ( this . expanded ( ) ) ;
2022-04-11 14:04:30 +02:00
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . isFromInternalAction = false ;
} ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
open ( ) {
if ( ! this . expanded ( ) ) {
const contentContainer = this . contentContainer [ 0 ] ;
this . activeElementBeforeExpanded = contentContainer . ownerDocument . activeElement ;
this . isFromInternalAction = true ;
this . expand ( {
completeCallback ( ) {
// We have to do this in a "completeCallback" or else the elements will not yet be visible/tabbable.
// The first one should be the close button,
// we want to skip it and choose the second one instead, which is the search box.
const searchBox = external _wp _dom _namespaceObject . focus . tabbable . find ( contentContainer ) [ 1 ] ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( searchBox ) {
searchBox . focus ( ) ;
}
}
} ) ;
}
2021-11-08 15:29:21 +01:00
}
2022-04-11 14:04:30 +02:00
close ( ) {
if ( this . expanded ( ) ) {
const contentContainer = this . contentContainer [ 0 ] ;
const activeElement = contentContainer . ownerDocument . activeElement ;
this . isFromInternalAction = true ;
this . collapse ( {
completeCallback ( ) {
// Return back the focus when closing the inserter.
// Only do this if the active element which triggers the action is inside the inserter,
// (the close button for instance). In that case the focus will be lost.
// Otherwise, we don't hijack the focus when the user is focusing on other elements
// (like the quick inserter).
if ( contentContainer . contains ( activeElement ) ) {
// Return back the focus when closing the inserter.
if ( this . activeElementBeforeExpanded ) {
this . activeElementBeforeExpanded . focus ( ) ;
}
}
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
} ) ;
}
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
} ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-control.js
2021-11-08 15:29:21 +01:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2022-04-11 14:04:30 +02:00
const getInserterId = controlId => ` widgets-inserter- ${ controlId } ` ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function getSidebarControl ( ) {
const {
wp : {
customize
}
} = window ;
return class SidebarControl extends customize . Control {
constructor ( ) {
super ( ... arguments ) ;
this . subscribers = new Set ( ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
ready ( ) {
const InserterOuterSection = getInserterOuterSection ( ) ;
this . inserter = new InserterOuterSection ( getInserterId ( this . id ) , { } ) ;
customize . section . add ( this . inserter ) ;
this . sectionInstance = customize . section ( this . section ( ) ) ;
this . inspector = this . sectionInstance . inspector ;
this . sidebarAdapter = new SidebarAdapter ( this . setting , customize ) ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
subscribe ( callback ) {
this . subscribers . add ( callback ) ;
return ( ) => {
this . subscribers . delete ( callback ) ;
} ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
onChangeSectionExpanded ( expanded , args ) {
if ( ! args . unchanged ) {
// Close the inserter when the section collapses.
if ( ! expanded ) {
2022-04-12 17:12:47 +02:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( store ) . setIsInserterOpened ( false ) ;
2022-04-11 14:04:30 +02:00
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
this . subscribers . forEach ( subscriber => subscriber ( expanded , args ) ) ;
}
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
} ;
}
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","hooks"]
var external _wp _hooks _namespaceObject = window [ "wp" ] [ "hooks" ] ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/move-to-sidebar.js
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
/ * *
* External dependencies
* /
2021-11-08 15:29:21 +01:00
/ * *
* WordPress dependencies
* /
/ * *
2022-04-11 14:04:30 +02:00
* Internal dependencies
2021-11-08 15:29:21 +01:00
* /
2022-04-11 14:04:30 +02:00
const withMoveToSidebarToolbarItem = ( 0 , external _wp _compose _namespaceObject . createHigherOrderComponent ) ( BlockEdit => props => {
let widgetId = ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( props ) ;
const sidebarControls = useSidebarControls ( ) ;
const activeSidebarControl = useActiveSidebarControl ( ) ;
const hasMultipleSidebars = ( sidebarControls === null || sidebarControls === void 0 ? void 0 : sidebarControls . length ) > 1 ;
const blockName = props . name ;
const clientId = props . clientId ;
const canInsertBlockInSidebar = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
// Use an empty string to represent the root block list, which
// in the customizer editor represents a sidebar/widget area.
return select ( external _wp _blockEditor _namespaceObject . store ) . canInsertBlockType ( blockName , '' ) ;
} , [ blockName ] ) ;
const block = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _blockEditor _namespaceObject . store ) . getBlock ( clientId ) , [ clientId ] ) ;
const {
removeBlock
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _blockEditor _namespaceObject . store ) ;
const [ , focusWidget ] = useFocusControl ( ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
function moveToSidebar ( sidebarControlId ) {
const newSidebarControl = sidebarControls . find ( sidebarControl => sidebarControl . id === sidebarControlId ) ;
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
if ( widgetId ) {
/ * *
* If there ' s a widgetId , move it to the other sidebar .
* /
const oldSetting = activeSidebarControl . setting ;
const newSetting = newSidebarControl . setting ;
oldSetting ( ( 0 , external _lodash _namespaceObject . without ) ( oldSetting ( ) , widgetId ) ) ;
newSetting ( [ ... newSetting ( ) , widgetId ] ) ;
} else {
/ * *
* If there isn 't a widgetId, it' s most likely a inner block .
* First , remove the block in the original sidebar ,
* then , create a new widget in the new sidebar and get back its widgetId .
* /
const sidebarAdapter = newSidebarControl . sidebarAdapter ;
removeBlock ( clientId ) ;
const addedWidgetIds = sidebarAdapter . setWidgets ( [ ... sidebarAdapter . getWidgets ( ) , blockToWidget ( block ) ] ) ; // The last non-null id is the added widget's id.
2021-11-08 15:29:21 +01:00
2022-04-11 14:04:30 +02:00
widgetId = addedWidgetIds . reverse ( ) . find ( id => ! ! id ) ;
} // Move focus to the moved widget and expand the sidebar.
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
focusWidget ( widgetId ) ;
}
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
return ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _element _namespaceObject . Fragment , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( BlockEdit , props ) , hasMultipleSidebars && canInsertBlockInSidebar && ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . BlockControls , null , ( 0 , external _wp _element _namespaceObject . createElement ) ( external _wp _widgets _namespaceObject . MoveToWidgetArea , {
widgetAreas : sidebarControls . map ( sidebarControl => ( {
id : sidebarControl . id ,
name : sidebarControl . params . label ,
description : sidebarControl . params . description
} ) ) ,
currentWidgetAreaId : activeSidebarControl === null || activeSidebarControl === void 0 ? void 0 : activeSidebarControl . id ,
onSelect : moveToSidebar
} ) ) ) ;
} , 'withMoveToSidebarToolbarItem' ) ;
( 0 , external _wp _hooks _namespaceObject . addFilter ) ( 'editor.BlockEdit' , 'core/customize-widgets/block-edit' , withMoveToSidebarToolbarItem ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/replace-media-upload.js
/ * *
* WordPress dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
const replaceMediaUpload = ( ) => external _wp _mediaUtils _namespaceObject . MediaUpload ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
( 0 , external _wp _hooks _namespaceObject . addFilter ) ( 'editor.MediaUpload' , 'core/edit-widgets/replace-media-upload' , replaceMediaUpload ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/wide-widget-display.js
2021-05-25 10:40:25 +02:00
/ * *
* WordPress dependencies
* /
2022-04-11 14:04:30 +02:00
const {
wp : wide _widget _display _wp
} = window ;
const withWideWidgetDisplay = ( 0 , external _wp _compose _namespaceObject . createHigherOrderComponent ) ( BlockEdit => props => {
var _wp$customize$Widgets , _wp$customize$Widgets2 ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
const {
idBase
} = props . attributes ;
const isWide = ( _wp$customize$Widgets = ( _wp$customize$Widgets2 = wide _widget _display _wp . customize . Widgets . data . availableWidgets . find ( widget => widget . id _base === idBase ) ) === null || _wp$customize$Widgets2 === void 0 ? void 0 : _wp$customize$Widgets2 . is _wide ) !== null && _wp$customize$Widgets !== void 0 ? _wp$customize$Widgets : false ;
return ( 0 , external _wp _element _namespaceObject . createElement ) ( BlockEdit , _extends ( { } , props , {
isWide : isWide
} ) ) ;
} , 'withWideWidgetDisplay' ) ;
( 0 , external _wp _hooks _namespaceObject . addFilter ) ( 'editor.BlockEdit' , 'core/customize-widgets/wide-widget-display' , withWideWidgetDisplay ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/index.js
/ * *
* Internal dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/index.js
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
/ * *
* WordPress dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
/ * *
* Internal dependencies
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
const {
wp : build _module _wp
} = window ;
const DISABLED _BLOCKS = [ 'core/more' , 'core/block' , 'core/freeform' , 'core/template-part' ] ;
const ENABLE _EXPERIMENTAL _FSE _BLOCKS = false ;
/ * *
* Initializes the widgets block editor in the customizer .
*
* @ param { string } editorName The editor name .
* @ param { Object } blockEditorSettings Block editor settings .
* /
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
function initialize ( editorName , blockEditorSettings ) {
2022-04-12 17:12:47 +02:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _preferences _namespaceObject . store ) . setDefaults ( 'core/customize-widgets' , {
2022-04-11 14:04:30 +02:00
fixedToolbar : false ,
welcomeGuide : true
} ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _blocks _namespaceObject . store ) . _ _experimentalReapplyBlockTypeFilters ( ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
const coreBlocks = ( 0 , external _wp _blockLibrary _namespaceObject . _ _experimentalGetCoreBlocks ) ( ) . filter ( block => {
return ! ( DISABLED _BLOCKS . includes ( block . name ) || block . name . startsWith ( 'core/post' ) || block . name . startsWith ( 'core/query' ) || block . name . startsWith ( 'core/site' ) || block . name . startsWith ( 'core/navigation' ) ) ;
} ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
( 0 , external _wp _blockLibrary _namespaceObject . registerCoreBlocks ) ( coreBlocks ) ;
( 0 , external _wp _widgets _namespaceObject . registerLegacyWidgetBlock ) ( ) ;
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
if ( false ) { }
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
( 0 , external _wp _widgets _namespaceObject . registerLegacyWidgetVariations ) ( blockEditorSettings ) ;
( 0 , external _wp _widgets _namespaceObject . registerWidgetGroupBlock ) ( ) ; // As we are unregistering `core/freeform` to avoid the Classic block, we must
// replace it with something as the default freeform content handler. Failure to
// do this will result in errors in the default block parser.
// see: https://github.com/WordPress/gutenberg/issues/33097
2021-05-25 10:40:25 +02:00
2022-04-11 14:04:30 +02:00
( 0 , external _wp _blocks _namespaceObject . setFreeformContentHandlerName ) ( 'core/html' ) ;
const SidebarControl = getSidebarControl ( blockEditorSettings ) ;
build _module _wp . customize . sectionConstructor . sidebar = getSidebarSection ( ) ;
build _module _wp . customize . controlConstructor . sidebar _block _editor = SidebarControl ;
const container = document . createElement ( 'div' ) ;
document . body . appendChild ( container ) ;
build _module _wp . customize . bind ( 'ready' , ( ) => {
const sidebarControls = [ ] ;
build _module _wp . customize . control . each ( control => {
if ( control instanceof SidebarControl ) {
sidebarControls . push ( control ) ;
}
} ) ;
( 0 , external _wp _element _namespaceObject . render ) ( ( 0 , external _wp _element _namespaceObject . createElement ) ( CustomizeWidgets , {
api : build _module _wp . customize ,
sidebarControls : sidebarControls ,
blockEditorSettings : blockEditorSettings
} ) , container ) ;
} ) ;
2021-05-25 10:40:25 +02:00
}
2022-04-11 14:04:30 +02:00
} ( ) ;
( window . wp = window . wp || { } ) . customizeWidgets = _ _webpack _exports _ _ ;
/******/ } ) ( )
;