2018-12-14 05:41:57 +01:00
this [ "wp" ] = this [ "wp" ] || { } ; this [ "wp" ] [ "editPost" ] =
/******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] ) {
/******/ return installedModules [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . l = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
/******/ }
/******/ } ;
/******/
/******/ // 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 } ) ;
/******/ } ;
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ _ _webpack _require _ _ . t = function ( value , mode ) {
/******/ if ( mode & 1 ) value = _ _webpack _require _ _ ( value ) ;
/******/ if ( mode & 8 ) return value ;
/******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . _ _esModule ) return value ;
/******/ var ns = Object . create ( null ) ;
/******/ _ _webpack _require _ _ . r ( ns ) ;
/******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
/******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) _ _webpack _require _ _ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
/******/ return ns ;
/******/ } ;
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "" ;
/******/
/******/
/******/ // Load entry module and return exports
2021-02-02 06:17:13 +01:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = 458 ) ;
2018-12-14 05:41:57 +01:00
/******/ } )
/************************************************************************/
/******/ ( {
2018-12-18 04:14:52 +01:00
/***/ 0 :
/***/ ( function ( module , exports ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "element" ] ; } ( ) ) ;
2018-12-14 05:41:57 +01:00
/***/ } ) ,
2018-12-18 04:14:52 +01:00
/***/ 1 :
/***/ ( function ( module , exports ) {
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "i18n" ] ; } ( ) ) ;
2018-12-18 04:14:52 +01:00
/***/ } ) ,
/***/ 10 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
var _ _WEBPACK _AMD _DEFINE _ARRAY _ _ , _ _WEBPACK _AMD _DEFINE _RESULT _ _ ; / * !
Copyright ( c ) 2017 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 ) && arg . length ) {
var inner = classNames . apply ( null , arg ) ;
if ( inner ) {
classes . push ( inner ) ;
}
} else if ( argType === 'object' ) {
for ( var key in arg ) {
if ( hasOwn . call ( arg , key ) && arg [ key ] ) {
classes . push ( key ) ;
}
}
}
}
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 { }
} ( ) ) ;
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
/***/ } ) ,
2021-02-02 06:17:13 +01:00
/***/ 103 :
2020-07-21 14:14:37 +02:00
/***/ ( function ( module , exports ) {
2021-02-02 06:17:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "warning" ] ; } ( ) ) ;
2021-01-28 03:04:13 +01:00
/***/ } ) ,
/***/ 11 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* binding */ _slicedToArray ; } ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
var arrayWithHoles = _ _webpack _require _ _ ( 38 ) ;
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit ( arr , i ) {
if ( typeof Symbol === "undefined" || ! ( Symbol . iterator in Object ( arr ) ) ) return ;
var _arr = [ ] ;
var _n = true ;
var _d = false ;
var _e = undefined ;
try {
for ( var _i = arr [ Symbol . iterator ] ( ) , _s ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) {
_arr . push ( _s . value ) ;
if ( i && _arr . length === i ) break ;
}
} catch ( err ) {
_d = true ;
_e = err ;
} finally {
try {
if ( ! _n && _i [ "return" ] != null ) _i [ "return" ] ( ) ;
} finally {
if ( _d ) throw _e ;
}
}
return _arr ;
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
2021-02-02 06:17:13 +01:00
var unsupportedIterableToArray = _ _webpack _require _ _ ( 31 ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
var nonIterableRest = _ _webpack _require _ _ ( 39 ) ;
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
function _slicedToArray ( arr , i ) {
return Object ( arrayWithHoles [ "a" /* default */ ] ) ( arr ) || _iterableToArrayLimit ( arr , i ) || Object ( unsupportedIterableToArray [ "a" /* default */ ] ) ( arr , i ) || Object ( nonIterableRest [ "a" /* default */ ] ) ( ) ;
}
/***/ } ) ,
2021-02-02 06:17:13 +01:00
/***/ 114 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "viewport" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 118 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return STORE _NAME ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "b" , function ( ) { return VIEW _AS _LINK _SELECTOR ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "c" , function ( ) { return VIEW _AS _PREVIEW _LINK _SELECTOR ; } ) ;
/ * *
* The identifier for the data store .
*
* @ type { string }
* /
var STORE _NAME = 'core/edit-post' ;
/ * *
* CSS selector string for the admin bar view post link anchor tag .
*
* @ type { string }
* /
var VIEW _AS _LINK _SELECTOR = '#wp-admin-bar-view a' ;
/ * *
* CSS selector string for the admin bar preview post link anchor tag .
*
* @ type { string }
* /
var VIEW _AS _PREVIEW _LINK _SELECTOR = '#wp-admin-bar-preview a' ;
2020-07-07 18:08:28 +02:00
2020-02-10 23:33:27 +01:00
/***/ } ) ,
2021-02-02 06:17:13 +01:00
/***/ 12 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "compose" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 120 :
2020-07-07 18:08:28 +02:00
/***/ ( function ( module , exports ) {
2020-03-24 00:40:19 +01:00
2020-07-07 18:08:28 +02:00
// shim for using process in browser
var process = module . exports = { } ;
2020-03-24 00:40:19 +01:00
2020-07-07 18:08:28 +02:00
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout ;
var cachedClearTimeout ;
function defaultSetTimout ( ) {
throw new Error ( 'setTimeout has not been defined' ) ;
}
function defaultClearTimeout ( ) {
throw new Error ( 'clearTimeout has not been defined' ) ;
}
( function ( ) {
try {
if ( typeof setTimeout === 'function' ) {
cachedSetTimeout = setTimeout ;
} else {
cachedSetTimeout = defaultSetTimout ;
}
} catch ( e ) {
cachedSetTimeout = defaultSetTimout ;
}
try {
if ( typeof clearTimeout === 'function' ) {
cachedClearTimeout = clearTimeout ;
} else {
cachedClearTimeout = defaultClearTimeout ;
}
} catch ( e ) {
cachedClearTimeout = defaultClearTimeout ;
}
} ( ) )
function runTimeout ( fun ) {
if ( cachedSetTimeout === setTimeout ) {
//normal enviroments in sane situations
return setTimeout ( fun , 0 ) ;
}
// if setTimeout wasn't available but was latter defined
if ( ( cachedSetTimeout === defaultSetTimout || ! cachedSetTimeout ) && setTimeout ) {
cachedSetTimeout = setTimeout ;
return setTimeout ( fun , 0 ) ;
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout ( fun , 0 ) ;
} catch ( e ) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout . call ( null , fun , 0 ) ;
} catch ( e ) {
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout . call ( this , fun , 0 ) ;
}
}
}
function runClearTimeout ( marker ) {
if ( cachedClearTimeout === clearTimeout ) {
//normal enviroments in sane situations
return clearTimeout ( marker ) ;
}
// if clearTimeout wasn't available but was latter defined
if ( ( cachedClearTimeout === defaultClearTimeout || ! cachedClearTimeout ) && clearTimeout ) {
cachedClearTimeout = clearTimeout ;
return clearTimeout ( marker ) ;
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout ( marker ) ;
} catch ( e ) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout . call ( null , marker ) ;
} catch ( e ) {
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout . call ( this , marker ) ;
}
}
2020-03-24 00:40:19 +01:00
2020-06-26 15:33:47 +02:00
}
2020-07-07 18:08:28 +02:00
var queue = [ ] ;
var draining = false ;
var currentQueue ;
var queueIndex = - 1 ;
2020-06-26 15:33:47 +02:00
2020-07-07 18:08:28 +02:00
function cleanUpNextTick ( ) {
if ( ! draining || ! currentQueue ) {
return ;
}
draining = false ;
if ( currentQueue . length ) {
queue = currentQueue . concat ( queue ) ;
} else {
queueIndex = - 1 ;
}
if ( queue . length ) {
drainQueue ( ) ;
}
}
function drainQueue ( ) {
if ( draining ) {
return ;
}
var timeout = runTimeout ( cleanUpNextTick ) ;
draining = true ;
var len = queue . length ;
while ( len ) {
currentQueue = queue ;
queue = [ ] ;
while ( ++ queueIndex < len ) {
if ( currentQueue ) {
currentQueue [ queueIndex ] . run ( ) ;
}
}
queueIndex = - 1 ;
len = queue . length ;
}
currentQueue = null ;
draining = false ;
runClearTimeout ( timeout ) ;
}
process . nextTick = function ( fun ) {
var args = new Array ( arguments . length - 1 ) ;
if ( arguments . length > 1 ) {
for ( var i = 1 ; i < arguments . length ; i ++ ) {
args [ i - 1 ] = arguments [ i ] ;
}
}
queue . push ( new Item ( fun , args ) ) ;
if ( queue . length === 1 && ! draining ) {
runTimeout ( drainQueue ) ;
}
} ;
// v8 likes predictible objects
function Item ( fun , array ) {
this . fun = fun ;
this . array = array ;
}
Item . prototype . run = function ( ) {
this . fun . apply ( null , this . array ) ;
} ;
process . title = 'browser' ;
process . browser = true ;
process . env = { } ;
process . argv = [ ] ;
process . version = '' ; // empty string to avoid regexp issues
process . versions = { } ;
function noop ( ) { }
process . on = noop ;
process . addListener = noop ;
process . once = noop ;
process . off = noop ;
process . removeListener = noop ;
process . removeAllListeners = noop ;
process . emit = noop ;
process . prependListener = noop ;
process . prependOnceListener = noop ;
process . listeners = function ( name ) { return [ ] }
process . binding = function ( name ) {
throw new Error ( 'process.binding is not supported' ) ;
} ;
process . cwd = function ( ) { return '/' } ;
process . chdir = function ( dir ) {
throw new Error ( 'process.chdir is not supported' ) ;
} ;
process . umask = function ( ) { return 0 ; } ;
2020-02-10 23:33:27 +01:00
2020-10-13 15:10:30 +02:00
/***/ } ) ,
2021-01-28 03:04:13 +01:00
/***/ 13 :
2020-01-22 23:06:21 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
"use strict" ;
2021-01-28 03:04:13 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _objectWithoutProperties ; } ) ;
2021-02-02 06:17:13 +01:00
/* harmony import */ var _babel _runtime _helpers _esm _objectWithoutPropertiesLoose _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 44 ) ;
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
function _objectWithoutProperties ( source , excluded ) {
if ( source == null ) return { } ;
var target = Object ( _babel _runtime _helpers _esm _objectWithoutPropertiesLoose _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( source , excluded ) ;
var key , i ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
if ( Object . getOwnPropertySymbols ) {
var sourceSymbolKeys = Object . getOwnPropertySymbols ( source ) ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
for ( i = 0 ; i < sourceSymbolKeys . length ; i ++ ) {
key = sourceSymbolKeys [ i ] ;
if ( excluded . indexOf ( key ) >= 0 ) continue ;
if ( ! Object . prototype . propertyIsEnumerable . call ( source , key ) ) continue ;
target [ key ] = source [ key ] ;
}
}
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
return target ;
2019-09-19 17:19:18 +02:00
}
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
/***/ 15 :
2020-06-26 15:33:47 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-03-24 00:40:19 +01:00
2020-06-26 15:33:47 +02:00
"use strict" ;
2020-03-24 00:40:19 +01:00
2020-07-07 16:43:35 +02:00
// EXPORTS
2021-01-28 03:04:13 +01:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* binding */ _toConsumableArray ; } ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
var arrayLikeToArray = _ _webpack _require _ _ ( 24 ) ;
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
function _arrayWithoutHoles ( arr ) {
if ( Array . isArray ( arr ) ) return Object ( arrayLikeToArray [ "a" /* default */ ] ) ( arr ) ;
2020-07-07 16:43:35 +02:00
}
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = _ _webpack _require _ _ ( 37 ) ;
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
2021-02-02 06:17:13 +01:00
var unsupportedIterableToArray = _ _webpack _require _ _ ( 31 ) ;
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread ( ) {
throw new TypeError ( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
function _toConsumableArray ( arr ) {
return _arrayWithoutHoles ( arr ) || Object ( iterableToArray [ "a" /* default */ ] ) ( arr ) || Object ( unsupportedIterableToArray [ "a" /* default */ ] ) ( arr ) || _nonIterableSpread ( ) ;
2020-07-07 16:43:35 +02:00
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2018-12-18 04:14:52 +01:00
2021-02-02 06:17:13 +01:00
/***/ 154 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "mediaUtils" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 159 :
2019-10-15 17:37:08 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
"use strict" ;
2021-01-28 03:04:13 +01:00
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 7 ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2020-06-26 15:33:47 +02:00
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var closeSmall = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( closeSmall ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2018-12-18 04:14:52 +01:00
2021-02-02 06:17:13 +01:00
/***/ 16 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "regeneratorRuntime" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 160 :
2019-10-15 17:37:08 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
"use strict" ;
2020-07-07 16:43:35 +02:00
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2020-10-13 15:10:30 +02:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 7 ) ;
2020-07-07 16:43:35 +02:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2019-03-07 10:09:59 +01:00
2020-06-29 13:50:29 +02:00
2020-07-07 16:43:35 +02:00
/ * *
* WordPress dependencies
* /
2019-03-07 10:09:59 +01:00
2020-07-07 16:43:35 +02:00
var close = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( close ) ;
2020-06-26 15:33:47 +02:00
2020-07-07 16:43:35 +02:00
/***/ } ) ,
2020-06-26 15:33:47 +02:00
2021-02-02 06:17:13 +01:00
/***/ 161 :
2020-07-07 16:43:35 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-07 10:09:59 +01:00
2020-07-07 16:43:35 +02:00
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2020-10-13 15:10:30 +02:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 7 ) ;
2020-07-07 16:43:35 +02:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2020-06-26 15:33:47 +02:00
2020-07-07 16:43:35 +02:00
/ * *
* WordPress dependencies
* /
2020-06-26 15:33:47 +02:00
2020-07-07 16:43:35 +02:00
var check = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
2020-10-13 15:10:30 +02:00
d : "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"
2020-07-07 16:43:35 +02:00
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( check ) ;
2020-06-26 15:33:47 +02:00
2020-07-07 16:43:35 +02:00
/***/ } ) ,
2021-02-02 06:17:13 +01:00
/***/ 17 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "keycodes" ] ; } ( ) ) ;
/***/ } ) ,
2021-02-02 06:17:13 +01:00
/***/ 171 :
2020-06-26 15:33:47 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* WEBPACK VAR INJECTION */ ( function ( process ) { /* unused harmony export Fill */
/* unused harmony export Slot */
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _wordpress _components _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 3 ) ;
/* harmony import */ var _wordpress _components _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _components _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2021-01-28 03:04:13 +01:00
/* harmony import */ var _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 12 ) ;
2020-06-26 15:33:47 +02:00
/* harmony import */ var _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
2021-02-02 06:17:13 +01:00
/* harmony import */ var _wordpress _plugins _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 73 ) ;
2020-06-26 15:33:47 +02:00
/* harmony import */ var _wordpress _plugins _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _plugins _ _WEBPACK _IMPORTED _MODULE _3 _ _ ) ;
/* harmony import */ var _wordpress _data _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( 4 ) ;
/* harmony import */ var _wordpress _data _ _WEBPACK _IMPORTED _MODULE _4 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _data _ _WEBPACK _IMPORTED _MODULE _4 _ _ ) ;
2021-02-02 06:17:13 +01:00
/* harmony import */ var _wordpress _warning _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( 103 ) ;
2020-06-26 15:33:47 +02:00
/* harmony import */ var _wordpress _warning _ _WEBPACK _IMPORTED _MODULE _5 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _warning _ _WEBPACK _IMPORTED _MODULE _5 _ _ ) ;
2021-02-02 06:17:13 +01:00
/* harmony import */ var _preferences _modal _options _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( 65 ) ;
2021-01-28 03:04:13 +01:00
/* harmony import */ var _store _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( 23 ) ;
2020-06-26 15:33:47 +02:00
/ * *
* Defines as extensibility slot for the Settings sidebar
* /
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2021-01-28 03:04:13 +01:00
2020-06-26 15:33:47 +02:00
var _createSlotFill = Object ( _wordpress _components _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSlotFill" ] ) ( 'PluginDocumentSettingPanel' ) ,
Fill = _createSlotFill . Fill ,
Slot = _createSlotFill . Slot ;
var PluginDocumentSettingFill = function PluginDocumentSettingFill ( _ref ) {
var isEnabled = _ref . isEnabled ,
panelName = _ref . panelName ,
opened = _ref . opened ,
onToggle = _ref . onToggle ,
className = _ref . className ,
title = _ref . title ,
icon = _ref . icon ,
children = _ref . children ;
2021-01-28 03:04:13 +01:00
return Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Fragment" ] , null , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _preferences _modal _options _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ /* EnablePluginDocumentSettingPanelOption */ "d" ] , {
2020-06-26 15:33:47 +02:00
label : title ,
panelName : panelName
} ) , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( Fill , null , isEnabled && Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _components _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "PanelBody" ] , {
className : className ,
title : title ,
icon : icon ,
opened : opened ,
onToggle : onToggle
} , children ) ) ) ;
} ;
/ * *
* Renders items below the Status & Availability panel in the Document Sidebar .
*
* @ param { Object } props Component properties .
* @ param { string } [ props . name ] The machine - friendly name for the panel .
* @ param { string } [ props . className ] An optional class name added to the row .
* @ param { string } [ props . title ] The title of the panel
* @ param { WPBlockTypeIconRender } [ props . icon = inherits from the plugin ] The [ Dashicon ] ( https : //developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
*
* @ example
* < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var el = wp . element . createElement ;
* var _ _ = wp . i18n . _ _ ;
* var registerPlugin = wp . plugins . registerPlugin ;
* var PluginDocumentSettingPanel = wp . editPost . PluginDocumentSettingPanel ;
*
* function MyDocumentSettingPlugin ( ) {
* return el (
* PluginDocumentSettingPanel ,
* {
* className : 'my-document-setting-plugin' ,
* title : 'My Panel' ,
* } ,
* _ _ ( 'My Document Setting Panel' )
* ) ;
* }
*
* registerPlugin ( 'my-document-setting-plugin' , {
* render : MyDocumentSettingPlugin
* } ) ;
* ` ` `
*
* @ example
* < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
2020-07-07 16:43:35 +02:00
* import { registerPlugin } from '@wordpress/plugins' ;
* import { PluginDocumentSettingPanel } from '@wordpress/edit-post' ;
2020-06-26 15:33:47 +02:00
*
* const MyDocumentSettingTest = ( ) => (
* < PluginDocumentSettingPanel className = "my-document-setting-plugin" title = "My Panel" >
* < p > My Document Setting Panel < / p >
* < / P l u g i n D o c u m e n t S e t t i n g P a n e l >
* ) ;
*
* registerPlugin ( 'document-setting-test' , { render : MyDocumentSettingTest } ) ;
* ` ` `
*
* @ return { WPComponent } The component to be rendered .
* /
var PluginDocumentSettingPanel = Object ( _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "compose" ] ) ( Object ( _wordpress _plugins _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "withPluginContext" ] ) ( function ( context , ownProps ) {
if ( undefined === ownProps . name ) {
typeof process !== "undefined" && process . env && "production" !== "production" ? _wordpress _warning _ _WEBPACK _IMPORTED _MODULE _5 _ _ _default ( ) ( 'PluginDocumentSettingPanel requires a name property.' ) : void 0 ;
2019-10-15 17:37:08 +02:00
}
2019-03-07 10:09:59 +01:00
2020-06-26 15:33:47 +02:00
return {
icon : ownProps . icon || context . icon ,
panelName : "" . concat ( context . name , "/" ) . concat ( ownProps . name )
} ;
} ) , Object ( _wordpress _data _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "withSelect" ] ) ( function ( select , _ref2 ) {
var panelName = _ref2 . panelName ;
return {
2021-01-28 03:04:13 +01:00
opened : select ( _store _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ /* store */ "a" ] ) . isEditorPanelOpened ( panelName ) ,
isEnabled : select ( _store _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ /* store */ "a" ] ) . isEditorPanelEnabled ( panelName )
2020-06-26 15:33:47 +02:00
} ;
} ) , Object ( _wordpress _data _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "withDispatch" ] ) ( function ( dispatch , _ref3 ) {
var panelName = _ref3 . panelName ;
return {
onToggle : function onToggle ( ) {
2021-01-28 03:04:13 +01:00
return dispatch ( _store _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ /* store */ "a" ] ) . toggleEditorPanelOpened ( panelName ) ;
2019-09-19 17:19:18 +02:00
}
2020-06-26 15:33:47 +02:00
} ;
} ) ) ( PluginDocumentSettingFill ) ;
PluginDocumentSettingPanel . Slot = Slot ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( PluginDocumentSettingPanel ) ;
2021-02-02 06:17:13 +01:00
/* WEBPACK VAR INJECTION */ } . call ( this , _ _webpack _require _ _ ( 120 ) ) )
2018-12-14 05:41:57 +01:00
2020-10-13 15:10:30 +02:00
/***/ } ) ,
2020-10-20 15:36:16 +02:00
/***/ 18 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _assertThisInitialized ; } ) ;
function _assertThisInitialized ( self ) {
if ( self === void 0 ) {
throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ;
}
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
return self ;
}
2020-10-13 15:10:30 +02:00
2018-12-14 05:41:57 +01:00
/***/ } ) ,
2020-07-21 14:14:37 +02:00
/***/ 19 :
2020-10-20 15:36:16 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-10-13 15:10:30 +02:00
2020-10-20 15:36:16 +02:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _getPrototypeOf ; } ) ;
function _getPrototypeOf ( o ) {
_getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) {
return o . _ _proto _ _ || Object . getPrototypeOf ( o ) ;
} ;
return _getPrototypeOf ( o ) ;
}
2020-10-13 15:10:30 +02:00
/***/ } ) ,
/***/ 2 :
/***/ ( function ( module , exports ) {
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "lodash" ] ; } ( ) ) ;
2020-06-26 15:33:47 +02:00
/***/ } ) ,
2021-02-02 06:17:13 +01:00
/***/ 216 :
2020-10-13 15:10:30 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 7 ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/ * *
* WordPress dependencies
* /
var plus = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( plus ) ;
2020-07-21 14:14:37 +02:00
/***/ } ) ,
2021-01-28 03:04:13 +01:00
/***/ 23 :
2020-06-26 15:33:47 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2021-01-28 03:04:13 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* binding */ store ; } ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/actions.js
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "openGeneralSidebar" , function ( ) { return openGeneralSidebar ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "closeGeneralSidebar" , function ( ) { return closeGeneralSidebar ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "openModal" , function ( ) { return openModal ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "closeModal" , function ( ) { return closeModal ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "openPublishSidebar" , function ( ) { return openPublishSidebar ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "closePublishSidebar" , function ( ) { return closePublishSidebar ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "togglePublishSidebar" , function ( ) { return togglePublishSidebar ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "toggleEditorPanelEnabled" , function ( ) { return toggleEditorPanelEnabled ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "toggleEditorPanelOpened" , function ( ) { return toggleEditorPanelOpened ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "removeEditorPanel" , function ( ) { return removeEditorPanel ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "toggleFeature" , function ( ) { return toggleFeature ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "switchEditorMode" , function ( ) { return switchEditorMode ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "togglePinnedPluginItem" , function ( ) { return togglePinnedPluginItem ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "hideBlockTypes" , function ( ) { return hideBlockTypes ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "updatePreferredStyleVariations" , function ( ) { return updatePreferredStyleVariations ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "__experimentalUpdateLocalAutosaveInterval" , function ( ) { return _ _experimentalUpdateLocalAutosaveInterval ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "showBlockTypes" , function ( ) { return showBlockTypes ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "setAvailableMetaBoxesPerLocation" , function ( ) { return setAvailableMetaBoxesPerLocation ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "requestMetaBoxUpdates" , function ( ) { return requestMetaBoxUpdates ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "metaBoxUpdatesSuccess" , function ( ) { return metaBoxUpdatesSuccess ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "__experimentalSetPreviewDeviceType" , function ( ) { return _ _experimentalSetPreviewDeviceType ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "setIsInserterOpened" , function ( ) { return setIsInserterOpened ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "setIsEditingTemplate" , function ( ) { return setIsEditingTemplate ; } ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
var selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getEditorMode" , function ( ) { return getEditorMode ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isEditorSidebarOpened" , function ( ) { return isEditorSidebarOpened ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isPluginSidebarOpened" , function ( ) { return isPluginSidebarOpened ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getActiveGeneralSidebarName" , function ( ) { return getActiveGeneralSidebarName ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getPreferences" , function ( ) { return getPreferences ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getPreference" , function ( ) { return getPreference ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isPublishSidebarOpened" , function ( ) { return isPublishSidebarOpened ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isEditorPanelRemoved" , function ( ) { return isEditorPanelRemoved ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isEditorPanelEnabled" , function ( ) { return isEditorPanelEnabled ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isEditorPanelOpened" , function ( ) { return isEditorPanelOpened ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isModalActive" , function ( ) { return isModalActive ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isFeatureActive" , function ( ) { return isFeatureActive ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isPluginItemPinned" , function ( ) { return isPluginItemPinned ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getActiveMetaBoxLocations" , function ( ) { return getActiveMetaBoxLocations ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isMetaBoxLocationVisible" , function ( ) { return isMetaBoxLocationVisible ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isMetaBoxLocationActive" , function ( ) { return isMetaBoxLocationActive ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getMetaBoxesPerLocation" , function ( ) { return getMetaBoxesPerLocation ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getAllMetaBoxes" , function ( ) { return getAllMetaBoxes ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "hasMetaBoxes" , function ( ) { return hasMetaBoxes ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isSavingMetaBoxes" , function ( ) { return selectors _isSavingMetaBoxes ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "__experimentalGetPreviewDeviceType" , function ( ) { return _ _experimentalGetPreviewDeviceType ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isInserterOpened" , function ( ) { return selectors _isInserterOpened ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isEditingTemplate" , function ( ) { return selectors _isEditingTemplate ; } ) ;
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","data"]
var external _wp _data _ = _ _webpack _require _ _ ( 4 ) ;
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","dataControls"]
2021-02-02 06:17:13 +01:00
var external _wp _dataControls _ = _ _webpack _require _ _ ( 49 ) ;
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = _ _webpack _require _ _ ( 15 ) ;
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = _ _webpack _require _ _ ( 5 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external "lodash"
var external _lodash _ = _ _webpack _require _ _ ( 2 ) ;
2020-06-29 13:50:29 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/defaults.js
var PREFERENCES _DEFAULTS = {
editorMode : 'visual' ,
panels : {
'post-status' : {
opened : true
}
} ,
features : {
fixedToolbar : false ,
welcomeGuide : true ,
fullscreenMode : true ,
showIconLabels : false ,
2021-02-02 06:17:13 +01:00
themeStyles : true ,
showBlockBreadcrumbs : true
2021-01-28 03:04:13 +01:00
} ,
hiddenBlockTypes : [ ] ,
preferredStyleVariations : { } ,
localAutosaveInterval : 15
} ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/reducer.js
2019-10-15 17:37:08 +02:00
2020-03-24 00:40:19 +01:00
2021-01-28 03:04:13 +01:00
function ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* External dependencies
* /
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2019-03-07 10:09:59 +01:00
2020-03-24 00:40:19 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Higher - order reducer creator which provides the given initial state for the
* original reducer .
*
* @ param { * } initialState Initial state to provide to reducer .
*
* @ return { Function } Higher - order reducer .
* /
2019-10-15 18:17:12 +02:00
2021-01-28 03:04:13 +01:00
var createWithInitialState = function createWithInitialState ( initialState ) {
return function ( reducer ) {
return function ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : initialState ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
return reducer ( state , action ) ;
} ;
} ;
} ;
/ * *
* Reducer returning the user preferences .
*
* @ param { Object } state Current state .
* @ param { string } state . mode Current editor mode , either
* "visual" or "text" .
* @ param { boolean } state . isGeneralSidebarDismissed Whether general sidebar is
* dismissed . False by default
* or when closing general
* sidebar , true when opening
* sidebar .
* @ param { boolean } state . isSidebarOpened Whether the sidebar is
* opened or closed .
* @ param { Object } state . panels The state of the different
* sidebar panels .
* @ param { Object } action Dispatched action .
*
* @ return { Object } Updated state .
* /
2020-03-24 00:40:19 +01:00
2021-01-28 03:04:13 +01:00
var preferences = Object ( external _lodash _ [ "flow" ] ) ( [ external _wp _data _ [ "combineReducers" ] , createWithInitialState ( PREFERENCES _DEFAULTS ) ] ) ( {
panels : function panels ( state , action ) {
switch ( action . type ) {
case 'TOGGLE_PANEL_ENABLED' :
{
var panelName = action . panelName ;
return _objectSpread ( _objectSpread ( { } , state ) , { } , Object ( defineProperty [ "a" /* default */ ] ) ( { } , panelName , _objectSpread ( _objectSpread ( { } , state [ panelName ] ) , { } , {
enabled : ! Object ( external _lodash _ [ "get" ] ) ( state , [ panelName , 'enabled' ] , true )
} ) ) ) ;
}
2020-03-24 00:40:19 +01:00
2021-01-28 03:04:13 +01:00
case 'TOGGLE_PANEL_OPENED' :
{
var _panelName = action . panelName ;
var isOpen = state [ _panelName ] === true || Object ( external _lodash _ [ "get" ] ) ( state , [ _panelName , 'opened' ] , false ) ;
return _objectSpread ( _objectSpread ( { } , state ) , { } , Object ( defineProperty [ "a" /* default */ ] ) ( { } , _panelName , _objectSpread ( _objectSpread ( { } , state [ _panelName ] ) , { } , {
opened : ! isOpen
} ) ) ) ;
}
}
2020-03-24 00:40:19 +01:00
2021-01-28 03:04:13 +01:00
return state ;
} ,
features : function features ( state , action ) {
if ( action . type === 'TOGGLE_FEATURE' ) {
return _objectSpread ( _objectSpread ( { } , state ) , { } , Object ( defineProperty [ "a" /* default */ ] ) ( { } , action . feature , ! state [ action . feature ] ) ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return state ;
} ,
editorMode : function editorMode ( state , action ) {
if ( action . type === 'SWITCH_MODE' ) {
return action . mode ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return state ;
} ,
hiddenBlockTypes : function hiddenBlockTypes ( state , action ) {
switch ( action . type ) {
case 'SHOW_BLOCK_TYPES' :
return external _lodash _ [ "without" ] . apply ( void 0 , [ state ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( action . blockNames ) ) ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
case 'HIDE_BLOCK_TYPES' :
return Object ( external _lodash _ [ "union" ] ) ( state , action . blockNames ) ;
}
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
return state ;
} ,
preferredStyleVariations : function preferredStyleVariations ( state , action ) {
switch ( action . type ) {
case 'UPDATE_PREFERRED_STYLE_VARIATIONS' :
{
if ( ! action . blockName ) {
return state ;
}
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
if ( ! action . blockStyle ) {
return Object ( external _lodash _ [ "omit" ] ) ( state , [ action . blockName ] ) ;
}
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
return _objectSpread ( _objectSpread ( { } , state ) , { } , Object ( defineProperty [ "a" /* default */ ] ) ( { } , action . blockName , action . blockStyle ) ) ;
}
}
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
return state ;
} ,
localAutosaveInterval : function localAutosaveInterval ( state , action ) {
switch ( action . type ) {
case 'UPDATE_LOCAL_AUTOSAVE_INTERVAL' :
return action . interval ;
}
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
return state ;
}
} ) ;
/ * *
* Reducer storing the list of all programmatically removed panels .
*
* @ param { Array } state Current state .
* @ param { Object } action Action object .
*
* @ return { Array } Updated state .
* /
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
function removedPanels ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : [ ] ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
switch ( action . type ) {
case 'REMOVE_PANEL' :
if ( ! Object ( external _lodash _ [ "includes" ] ) ( state , action . panelName ) ) {
return [ ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( state ) , [ action . panelName ] ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return state ;
}
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Reducer for storing the name of the open modal , or null if no modal is open .
*
* @ param { Object } state Previous state .
* @ param { Object } action Action object containing the ` name ` of the modal
*
* @ return { Object } Updated state
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
function activeModal ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : null ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
switch ( action . type ) {
case 'OPEN_MODAL' :
return action . name ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
case 'CLOSE_MODAL' :
return null ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return state ;
}
function publishSidebarActive ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : false ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
switch ( action . type ) {
case 'OPEN_PUBLISH_SIDEBAR' :
return true ;
case 'CLOSE_PUBLISH_SIDEBAR' :
return false ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
case 'TOGGLE_PUBLISH_SIDEBAR' :
return ! state ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return state ;
}
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Reducer keeping track of the meta boxes isSaving state .
* A "true" value means the meta boxes saving request is in - flight .
*
*
* @ param { boolean } state Previous state .
* @ param { Object } action Action Object .
*
* @ return { Object } Updated state .
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
function isSavingMetaBoxes ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : false ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2020-07-21 14:14:37 +02:00
2021-01-28 03:04:13 +01:00
switch ( action . type ) {
case 'REQUEST_META_BOX_UPDATES' :
return true ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
case 'META_BOX_UPDATES_SUCCESS' :
return false ;
2020-12-01 13:19:43 +01:00
2021-01-28 03:04:13 +01:00
default :
return state ;
}
2020-12-01 13:19:43 +01:00
}
2021-01-28 03:04:13 +01:00
/ * *
* Reducer keeping track of the meta boxes per location .
*
* @ param { boolean } state Previous state .
* @ param { Object } action Action Object .
*
* @ return { Object } Updated state .
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function metaBoxLocations ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
switch ( action . type ) {
case 'SET_META_BOXES_PER_LOCATIONS' :
return action . metaBoxesPerLocation ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return state ;
}
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Reducer returning the editing canvas device type .
*
* @ param { Object } state Current state .
* @ param { Object } action Dispatched action .
*
* @ return { Object } Updated state .
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
function deviceType ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : 'Desktop' ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
switch ( action . type ) {
case 'SET_PREVIEW_DEVICE_TYPE' :
return action . deviceType ;
}
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
return state ;
}
/ * *
* Reducer tracking whether the inserter is open .
*
* @ param { boolean } state
* @ param { Object } action
* /
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
function isInserterOpened ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : false ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
switch ( action . type ) {
case 'SET_IS_INSERTER_OPENED' :
return action . value ;
}
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
return state ;
}
/ * *
* Reducer tracking whether the inserter is open .
*
* @ param { boolean } state
* @ param { Object } action
* /
2019-10-15 17:37:08 +02:00
2020-02-10 23:33:27 +01:00
2021-01-28 03:04:13 +01:00
function isEditingTemplate ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : false ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2020-02-10 23:33:27 +01:00
2021-01-28 03:04:13 +01:00
switch ( action . type ) {
case 'SET_IS_EDITING_TEMPLATE' :
return action . value ;
}
2020-02-10 23:33:27 +01:00
2021-01-28 03:04:13 +01:00
return state ;
}
2020-03-24 00:40:19 +01:00
2021-01-28 03:04:13 +01:00
var metaBoxes = Object ( external _wp _data _ [ "combineReducers" ] ) ( {
isSaving : isSavingMetaBoxes ,
locations : metaBoxLocations
} ) ;
/* harmony default export */ var reducer = ( Object ( external _wp _data _ [ "combineReducers" ] ) ( {
activeModal : activeModal ,
metaBoxes : metaBoxes ,
preferences : preferences ,
publishSidebarActive : publishSidebarActive ,
removedPanels : removedPanels ,
deviceType : deviceType ,
isInserterOpened : isInserterOpened ,
isEditingTemplate : isEditingTemplate
} ) ) ;
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = _ _webpack _require _ _ ( 11 ) ;
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external "regeneratorRuntime"
2021-02-02 06:17:13 +01:00
var external _regeneratorRuntime _ = _ _webpack _require _ _ ( 16 ) ;
2021-01-28 03:04:13 +01:00
var external _regeneratorRuntime _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _regeneratorRuntime _ ) ;
2020-03-16 23:07:16 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","i18n"]
var external _wp _i18n _ = _ _webpack _require _ _ ( 1 ) ;
2020-03-16 23:07:16 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/interface/build-module/index.js + 15 modules
2021-02-02 06:17:13 +01:00
var build _module = _ _webpack _require _ _ ( 61 ) ;
2020-03-16 23:07:16 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","a11y"]
2021-02-02 06:17:13 +01:00
var external _wp _a11y _ = _ _webpack _require _ _ ( 48 ) ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/utils/meta-boxes.js
/ * *
* Function returning the current Meta Boxes DOM Node in the editor
* whether the meta box area is opened or not .
* If the MetaBox Area is visible returns it , and returns the original container instead .
*
* @ param { string } location Meta Box location .
* @ return { string } HTML content .
* /
var getMetaBoxContainer = function getMetaBoxContainer ( location ) {
var area = document . querySelector ( ".edit-post-meta-boxes-area.is-" . concat ( location , " .metabox-location-" ) . concat ( location ) ) ;
2020-02-10 23:33:27 +01:00
2021-01-28 03:04:13 +01:00
if ( area ) {
return area ;
}
2020-02-10 23:33:27 +01:00
2021-01-28 03:04:13 +01:00
return document . querySelector ( '#metaboxes .metabox-location-' + location ) ;
} ;
2020-02-10 23:33:27 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/actions.js
2020-02-10 23:33:27 +01:00
2020-03-24 00:40:19 +01:00
2021-01-28 03:04:13 +01:00
function _createForOfIteratorHelper ( o , allowArrayLike ) { var it ; if ( typeof Symbol === "undefined" || o [ Symbol . iterator ] == null ) { if ( Array . isArray ( o ) || ( it = _unsupportedIterableToArray ( o ) ) || allowArrayLike && o && typeof o . length === "number" ) { if ( it ) o = it ; var i = 0 ; var F = function F ( ) { } ; return { s : F , n : function n ( ) { if ( i >= o . length ) return { done : true } ; return { done : false , value : o [ i ++ ] } ; } , e : function e ( _e ) { throw _e ; } , f : F } ; } throw new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ; } var normalCompletion = true , didErr = false , err ; return { s : function s ( ) { it = o [ Symbol . iterator ] ( ) ; } , n : function n ( ) { var step = it . next ( ) ; normalCompletion = step . done ; return step ; } , e : function e ( _e2 ) { didErr = true ; err = _e2 ; } , f : function f ( ) { try { if ( ! normalCompletion && it . return != null ) it . return ( ) ; } finally { if ( didErr ) throw err ; } } } ; }
2020-03-24 00:40:19 +01:00
2021-01-28 03:04:13 +01:00
function _unsupportedIterableToArray ( o , minLen ) { if ( ! o ) return ; if ( typeof o === "string" ) return _arrayLikeToArray ( o , minLen ) ; var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ; if ( n === "Object" && o . constructor ) n = o . constructor . name ; if ( n === "Map" || n === "Set" ) return Array . from ( o ) ; if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return _arrayLikeToArray ( o , minLen ) ; }
2020-02-10 23:33:27 +01:00
2021-01-28 03:04:13 +01:00
function _arrayLikeToArray ( arr , len ) { if ( len == null || len > arr . length ) len = arr . length ; for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) { arr2 [ i ] = arr [ i ] ; } return arr2 ; }
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _marked = /*#__PURE__*/ external _regeneratorRuntime _default . a . mark ( openGeneralSidebar ) ,
_marked2 = /*#__PURE__*/ external _regeneratorRuntime _default . a . mark ( closeGeneralSidebar ) ,
_marked3 = /*#__PURE__*/ external _regeneratorRuntime _default . a . mark ( switchEditorMode ) ,
_marked4 = /*#__PURE__*/ external _regeneratorRuntime _default . a . mark ( setAvailableMetaBoxesPerLocation ) ,
_marked5 = /*#__PURE__*/ external _regeneratorRuntime _default . a . mark ( requestMetaBoxUpdates ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2020-06-26 15:33:47 +02:00
2019-03-07 10:09:59 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-09-19 17:19:18 +02:00
* /
2021-01-28 03:04:13 +01:00
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns an action object used in signalling that the user opened an editor sidebar .
2020-01-22 23:06:21 +01:00
*
2021-01-28 03:04:13 +01:00
* @ param { ? string } name Sidebar name to be opened .
*
* @ yield { Object } Action object .
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function openGeneralSidebar ( name ) {
return external _regeneratorRuntime _default . a . wrap ( function openGeneralSidebar$ ( _context ) {
while ( 1 ) {
switch ( _context . prev = _context . next ) {
case 0 :
_context . next = 2 ;
return external _wp _data _ [ "controls" ] . dispatch ( build _module [ "g" /* store */ ] . name , 'enableComplementaryArea' , store . name , name ) ;
case 2 :
case "end" :
return _context . stop ( ) ;
}
}
} , _marked ) ;
}
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns an action object signalling that the user closed the sidebar .
2020-01-22 23:06:21 +01:00
*
2021-01-28 03:04:13 +01:00
* @ yield { Object } Action object .
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function closeGeneralSidebar ( ) {
return external _regeneratorRuntime _default . a . wrap ( function closeGeneralSidebar$ ( _context2 ) {
while ( 1 ) {
switch ( _context2 . prev = _context2 . next ) {
case 0 :
_context2 . next = 2 ;
return external _wp _data _ [ "controls" ] . dispatch ( build _module [ "g" /* store */ ] . name , 'disableComplementaryArea' , store . name ) ;
case 2 :
case "end" :
return _context2 . stop ( ) ;
}
}
} , _marked2 ) ;
}
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns an action object used in signalling that the user opened a modal .
2019-10-15 17:37:08 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { string } name A string that uniquely identifies the modal .
2019-10-15 17:37:08 +02:00
*
2021-01-28 03:04:13 +01:00
* @ return { Object } Action object .
2019-10-15 17:37:08 +02:00
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function openModal ( name ) {
return {
type : 'OPEN_MODAL' ,
name : name
} ;
}
2020-01-22 23:06:21 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns an action object signalling that the user closed a modal .
2020-01-22 23:06:21 +01:00
*
2021-01-28 03:04:13 +01:00
* @ return { Object } Action object .
2020-01-22 23:06:21 +01:00
* /
2021-01-28 03:04:13 +01:00
function closeModal ( ) {
return {
type : 'CLOSE_MODAL'
} ;
2020-01-22 23:06:21 +01:00
}
/ * *
2021-01-28 03:04:13 +01:00
* Returns an action object used in signalling that the user opened the publish
* sidebar .
2020-01-22 23:06:21 +01:00
*
2021-01-28 03:04:13 +01:00
* @ return { Object } Action object
2020-01-22 23:06:21 +01:00
* /
2021-01-28 03:04:13 +01:00
function openPublishSidebar ( ) {
return {
type : 'OPEN_PUBLISH_SIDEBAR'
} ;
2020-01-22 23:06:21 +01:00
}
/ * *
2021-01-28 03:04:13 +01:00
* Returns an action object used in signalling that the user closed the
* publish sidebar .
2020-01-22 23:06:21 +01:00
*
2021-01-28 03:04:13 +01:00
* @ return { Object } Action object .
2020-01-22 23:06:21 +01:00
* /
2021-01-28 03:04:13 +01:00
function closePublishSidebar ( ) {
return {
type : 'CLOSE_PUBLISH_SIDEBAR'
} ;
}
/ * *
* Returns an action object used in signalling that the user toggles the publish sidebar .
*
* @ return { Object } Action object
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function togglePublishSidebar ( ) {
return {
type : 'TOGGLE_PUBLISH_SIDEBAR'
} ;
}
/ * *
* Returns an action object used to enable or disable a panel in the editor .
*
* @ param { string } panelName A string that identifies the panel to enable or disable .
*
* @ return { Object } Action object .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function toggleEditorPanelEnabled ( panelName ) {
return {
type : 'TOGGLE_PANEL_ENABLED' ,
panelName : panelName
} ;
}
/ * *
* Returns an action object used to open or close a panel in the editor .
*
* @ param { string } panelName A string that identifies the panel to open or close .
*
* @ return { Object } Action object .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function toggleEditorPanelOpened ( panelName ) {
return {
type : 'TOGGLE_PANEL_OPENED' ,
panelName : panelName
} ;
}
/ * *
* Returns an action object used to remove a panel from the editor .
*
* @ param { string } panelName A string that identifies the panel to remove .
*
* @ return { Object } Action object .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function removeEditorPanel ( panelName ) {
return {
type : 'REMOVE_PANEL' ,
panelName : panelName
} ;
}
/ * *
* Returns an action object used to toggle a feature flag .
*
* @ param { string } feature Feature name .
*
* @ return { Object } Action object .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function toggleFeature ( feature ) {
return {
type : 'TOGGLE_FEATURE' ,
feature : feature
} ;
}
function switchEditorMode ( mode ) {
var message ;
return external _regeneratorRuntime _default . a . wrap ( function switchEditorMode$ ( _context3 ) {
while ( 1 ) {
switch ( _context3 . prev = _context3 . next ) {
case 0 :
_context3 . next = 2 ;
return {
type : 'SWITCH_MODE' ,
mode : mode
} ;
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
case 2 :
if ( ! ( mode !== 'visual' ) ) {
_context3 . next = 5 ;
break ;
}
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
_context3 . next = 5 ;
return external _wp _data _ [ "controls" ] . dispatch ( 'core/block-editor' , 'clearSelectedBlock' ) ;
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
case 5 :
message = mode === 'visual' ? Object ( external _wp _i18n _ [ "__" ] ) ( 'Visual editor selected' ) : Object ( external _wp _i18n _ [ "__" ] ) ( 'Code editor selected' ) ;
Object ( external _wp _a11y _ [ "speak" ] ) ( message , 'assertive' ) ;
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
case 7 :
case "end" :
return _context3 . stop ( ) ;
}
}
} , _marked3 ) ;
}
/ * *
* Returns an action object used to toggle a plugin name flag .
*
* @ param { string } pluginName Plugin name .
*
* @ return { Object } Action object .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function togglePinnedPluginItem ( pluginName ) {
return {
type : 'TOGGLE_PINNED_PLUGIN_ITEM' ,
pluginName : pluginName
} ;
}
/ * *
* Returns an action object used in signalling that block types by the given
* name ( s ) should be hidden .
*
* @ param { string [ ] } blockNames Names of block types to hide .
*
* @ return { Object } Action object .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function hideBlockTypes ( blockNames ) {
return {
type : 'HIDE_BLOCK_TYPES' ,
blockNames : Object ( external _lodash _ [ "castArray" ] ) ( blockNames )
} ;
}
/ * *
* Returns an action object used in signaling that a style should be auto - applied when a block is created .
*
* @ param { string } blockName Name of the block .
* @ param { ? string } blockStyle Name of the style that should be auto applied . If undefined , the "auto apply" setting of the block is removed .
*
* @ return { Object } Action object .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function updatePreferredStyleVariations ( blockName , blockStyle ) {
return {
type : 'UPDATE_PREFERRED_STYLE_VARIATIONS' ,
blockName : blockName ,
blockStyle : blockStyle
} ;
}
/ * *
* Returns an action object used in signalling that the editor should attempt
* to locally autosave the current post every ` interval ` seconds .
*
* @ param { number } interval The new interval , in seconds .
* @ return { Object } Action object .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function _ _experimentalUpdateLocalAutosaveInterval ( interval ) {
return {
type : 'UPDATE_LOCAL_AUTOSAVE_INTERVAL' ,
interval : interval
} ;
}
/ * *
* Returns an action object used in signalling that block types by the given
* name ( s ) should be shown .
*
* @ param { string [ ] } blockNames Names of block types to show .
*
* @ return { Object } Action object .
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function showBlockTypes ( blockNames ) {
return {
type : 'SHOW_BLOCK_TYPES' ,
blockNames : Object ( external _lodash _ [ "castArray" ] ) ( blockNames )
} ;
}
var saveMetaboxUnsubscribe ;
/ * *
* Returns an action object used in signaling
* what Meta boxes are available in which location .
*
* @ param { Object } metaBoxesPerLocation Meta boxes per location .
*
* @ yield { Object } Action object .
* /
2020-12-01 13:19:43 +01:00
2021-01-28 03:04:13 +01:00
function setAvailableMetaBoxesPerLocation ( metaBoxesPerLocation ) {
var postType , wasSavingPost , wasAutosavingPost , hasActiveMetaBoxes ;
return external _regeneratorRuntime _default . a . wrap ( function setAvailableMetaBoxesPerLocation$ ( _context4 ) {
while ( 1 ) {
switch ( _context4 . prev = _context4 . next ) {
case 0 :
_context4 . next = 2 ;
return {
type : 'SET_META_BOXES_PER_LOCATIONS' ,
metaBoxesPerLocation : metaBoxesPerLocation
} ;
2020-12-01 13:19:43 +01:00
2021-01-28 03:04:13 +01:00
case 2 :
_context4 . next = 4 ;
return external _wp _data _ [ "controls" ] . select ( 'core/editor' , 'getCurrentPostType' ) ;
2020-12-01 13:19:43 +01:00
2021-01-28 03:04:13 +01:00
case 4 :
postType = _context4 . sent ;
2020-12-01 13:19:43 +01:00
2021-01-28 03:04:13 +01:00
if ( window . postboxes . page !== postType ) {
window . postboxes . add _postbox _toggles ( postType ) ;
}
2020-12-01 13:19:43 +01:00
2021-01-28 03:04:13 +01:00
_context4 . next = 8 ;
return external _wp _data _ [ "controls" ] . select ( 'core/editor' , 'isSavingPost' ) ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
case 8 :
wasSavingPost = _context4 . sent ;
_context4 . next = 11 ;
return external _wp _data _ [ "controls" ] . select ( 'core/editor' , 'isAutosavingPost' ) ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
case 11 :
wasAutosavingPost = _context4 . sent ;
_context4 . next = 14 ;
return external _wp _data _ [ "controls" ] . select ( store . name , 'hasMetaBoxes' ) ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
case 14 :
hasActiveMetaBoxes = _context4 . sent ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
// First remove any existing subscription in order to prevent multiple saves
if ( ! ! saveMetaboxUnsubscribe ) {
saveMetaboxUnsubscribe ( ) ;
} // Save metaboxes when performing a full save on the post.
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
saveMetaboxUnsubscribe = Object ( external _wp _data _ [ "subscribe" ] ) ( function ( ) {
var isSavingPost = Object ( external _wp _data _ [ "select" ] ) ( 'core/editor' ) . isSavingPost ( ) ;
var isAutosavingPost = Object ( external _wp _data _ [ "select" ] ) ( 'core/editor' ) . isAutosavingPost ( ) ; // Save metaboxes on save completion, except for autosaves that are not a post preview.
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
var shouldTriggerMetaboxesSave = hasActiveMetaBoxes && wasSavingPost && ! isSavingPost && ! wasAutosavingPost ; // Save current state for next inspection.
2020-07-21 14:14:37 +02:00
2021-01-28 03:04:13 +01:00
wasSavingPost = isSavingPost ;
wasAutosavingPost = isAutosavingPost ;
2020-07-21 14:14:37 +02:00
2021-01-28 03:04:13 +01:00
if ( shouldTriggerMetaboxesSave ) {
Object ( external _wp _data _ [ "dispatch" ] ) ( store . name ) . requestMetaBoxUpdates ( ) ;
}
} ) ;
2020-07-21 14:14:37 +02:00
2021-01-28 03:04:13 +01:00
case 17 :
case "end" :
return _context4 . stop ( ) ;
}
}
} , _marked4 ) ;
}
2020-07-21 14:14:37 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns an action object used to request meta box update .
*
* @ yield { Object } Action object .
2020-07-21 14:14:37 +02:00
* /
2021-01-28 03:04:13 +01:00
function requestMetaBoxUpdates ( ) {
var post , additionalData , baseFormData , activeMetaBoxLocations , formDataToMerge , formData ;
return external _regeneratorRuntime _default . a . wrap ( function requestMetaBoxUpdates$ ( _context5 ) {
while ( 1 ) {
switch ( _context5 . prev = _context5 . next ) {
case 0 :
_context5 . next = 2 ;
return {
type : 'REQUEST_META_BOX_UPDATES'
} ;
2020-07-21 14:14:37 +02:00
2021-01-28 03:04:13 +01:00
case 2 :
// Saves the wp_editor fields
if ( window . tinyMCE ) {
window . tinyMCE . triggerSave ( ) ;
} // Additional data needed for backward compatibility.
// If we do not provide this data, the post will be overridden with the default values.
_context5 . next = 5 ;
return external _wp _data _ [ "controls" ] . select ( 'core/editor' , 'getCurrentPost' ) ;
case 5 :
post = _context5 . sent ;
additionalData = [ post . comment _status ? [ 'comment_status' , post . comment _status ] : false , post . ping _status ? [ 'ping_status' , post . ping _status ] : false , post . sticky ? [ 'sticky' , post . sticky ] : false , post . author ? [ 'post_author' , post . author ] : false ] . filter ( Boolean ) ; // We gather all the metaboxes locations data and the base form data
baseFormData = new window . FormData ( document . querySelector ( '.metabox-base-form' ) ) ;
_context5 . next = 10 ;
return external _wp _data _ [ "controls" ] . select ( store . name , 'getActiveMetaBoxLocations' ) ;
case 10 :
activeMetaBoxLocations = _context5 . sent ;
formDataToMerge = [ baseFormData ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( activeMetaBoxLocations . map ( function ( location ) {
return new window . FormData ( getMetaBoxContainer ( location ) ) ;
} ) ) ) ; // Merge all form data objects into a single one.
formData = Object ( external _lodash _ [ "reduce" ] ) ( formDataToMerge , function ( memo , currentFormData ) {
var _iterator = _createForOfIteratorHelper ( currentFormData ) ,
_step ;
try {
for ( _iterator . s ( ) ; ! ( _step = _iterator . n ( ) ) . done ; ) {
var _step$value = Object ( slicedToArray [ "a" /* default */ ] ) ( _step . value , 2 ) ,
key = _step$value [ 0 ] ,
value = _step$value [ 1 ] ;
memo . append ( key , value ) ;
}
} catch ( err ) {
_iterator . e ( err ) ;
} finally {
_iterator . f ( ) ;
}
2020-07-21 14:14:37 +02:00
2021-01-28 03:04:13 +01:00
return memo ;
} , new window . FormData ( ) ) ;
additionalData . forEach ( function ( _ref ) {
var _ref2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _ref , 2 ) ,
key = _ref2 [ 0 ] ,
value = _ref2 [ 1 ] ;
return formData . append ( key , value ) ;
} ) ; // Save the metaboxes
_context5 . next = 16 ;
return Object ( external _wp _dataControls _ [ "apiFetch" ] ) ( {
url : window . _wpMetaBoxUrl ,
method : 'POST' ,
body : formData ,
parse : false
} ) ;
2020-07-21 14:14:37 +02:00
2021-01-28 03:04:13 +01:00
case 16 :
_context5 . next = 18 ;
return external _wp _data _ [ "controls" ] . dispatch ( store . name , 'metaBoxUpdatesSuccess' ) ;
2020-12-01 13:19:43 +01:00
2021-01-28 03:04:13 +01:00
case 18 :
case "end" :
return _context5 . stop ( ) ;
}
}
} , _marked5 ) ;
}
/ * *
* Returns an action object used signal a successful meta box update .
*
* @ return { Object } Action object .
* /
2020-12-01 13:19:43 +01:00
2021-01-28 03:04:13 +01:00
function metaBoxUpdatesSuccess ( ) {
return {
type : 'META_BOX_UPDATES_SUCCESS'
} ;
}
/ * *
* Returns an action object used to toggle the width of the editing canvas .
*
* @ param { string } deviceType
*
* @ return { Object } Action object .
* /
2020-12-01 13:19:43 +01:00
2021-01-28 03:04:13 +01:00
function _ _experimentalSetPreviewDeviceType ( deviceType ) {
return {
type : 'SET_PREVIEW_DEVICE_TYPE' ,
deviceType : deviceType
} ;
}
/ * *
* Returns an action object used to open / close the inserter .
*
* @ param { boolean } value A boolean representing whether the inserter should be opened or closed .
* @ return { Object } Action object .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function setIsInserterOpened ( value ) {
return {
type : 'SET_IS_INSERTER_OPENED' ,
value : value
} ;
}
/ * *
* Returns an action object used to switch to template editing .
*
* @ param { boolean } value Is editing template .
* @ return { Object } Action object .
* /
2020-06-29 13:50:29 +02:00
2021-01-28 03:04:13 +01:00
function setIsEditingTemplate ( value ) {
return {
type : 'SET_IS_EDITING_TEMPLATE' ,
value : value
} ;
}
2020-06-29 13:50:29 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
var rememo = _ _webpack _require _ _ ( 41 ) ;
2020-06-29 13:50:29 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
/ * *
* External dependencies
* /
2020-06-29 13:50:29 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Returns the current editing mode .
*
* @ param { Object } state Global application state .
*
* @ return { string } Editing mode .
* /
function getEditorMode ( state ) {
return getPreference ( state , 'editorMode' , 'visual' ) ;
}
/ * *
* Returns true if the editor sidebar is opened .
*
* @ param { Object } state Global application state
*
* @ return { boolean } Whether the editor sidebar is opened .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
var isEditorSidebarOpened = Object ( external _wp _data _ [ "createRegistrySelector" ] ) ( function ( select ) {
return function ( ) {
var activeGeneralSidebar = select ( build _module [ "g" /* store */ ] ) . getActiveComplementaryArea ( 'core/edit-post' ) ;
return Object ( external _lodash _ [ "includes" ] ) ( [ 'edit-post/document' , 'edit-post/block' ] , activeGeneralSidebar ) ;
} ;
} ) ;
/ * *
* Returns true if the plugin sidebar is opened .
*
* @ param { Object } state Global application state
* @ return { boolean } Whether the plugin sidebar is opened .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
var isPluginSidebarOpened = Object ( external _wp _data _ [ "createRegistrySelector" ] ) ( function ( select ) {
return function ( ) {
var activeGeneralSidebar = select ( build _module [ "g" /* store */ ] ) . getActiveComplementaryArea ( 'core/edit-post' ) ;
return ! ! activeGeneralSidebar && ! Object ( external _lodash _ [ "includes" ] ) ( [ 'edit-post/document' , 'edit-post/block' ] , activeGeneralSidebar ) ;
} ;
} ) ;
/ * *
* Returns the current active general sidebar name , or null if there is no
* general sidebar active . The active general sidebar is a unique name to
* identify either an editor or plugin sidebar .
*
* Examples :
*
* - ` edit-post/document `
* - ` my-plugin/insert-image-sidebar `
*
* @ param { Object } state Global application state .
*
* @ return { ? string } Active general sidebar name .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
var getActiveGeneralSidebarName = Object ( external _wp _data _ [ "createRegistrySelector" ] ) ( function ( select ) {
return function ( ) {
return select ( build _module [ "g" /* store */ ] ) . getActiveComplementaryArea ( 'core/edit-post' ) ;
} ;
} ) ;
/ * *
* Returns the preferences ( these preferences are persisted locally ) .
*
* @ param { Object } state Global application state .
*
* @ return { Object } Preferences Object .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function getPreferences ( state ) {
return state . preferences ;
}
/ * *
*
* @ param { Object } state Global application state .
* @ param { string } preferenceKey Preference Key .
* @ param { * } defaultValue Default Value .
*
* @ return { * } Preference Value .
* /
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
function getPreference ( state , preferenceKey , defaultValue ) {
var preferences = getPreferences ( state ) ;
var value = preferences [ preferenceKey ] ;
return value === undefined ? defaultValue : value ;
}
/ * *
* Returns true if the publish sidebar is opened .
*
* @ param { Object } state Global application state
*
* @ return { boolean } Whether the publish sidebar is open .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function isPublishSidebarOpened ( state ) {
return state . publishSidebarActive ;
}
/ * *
* Returns true if the given panel was programmatically removed , or false otherwise .
* All panels are not removed by default .
*
* @ param { Object } state Global application state .
* @ param { string } panelName A string that identifies the panel .
*
* @ return { boolean } Whether or not the panel is removed .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function isEditorPanelRemoved ( state , panelName ) {
return Object ( external _lodash _ [ "includes" ] ) ( state . removedPanels , panelName ) ;
}
/ * *
* Returns true if the given panel is enabled , or false otherwise . Panels are
* enabled by default .
*
* @ param { Object } state Global application state .
* @ param { string } panelName A string that identifies the panel .
*
* @ return { boolean } Whether or not the panel is enabled .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function isEditorPanelEnabled ( state , panelName ) {
var panels = getPreference ( state , 'panels' ) ;
return ! isEditorPanelRemoved ( state , panelName ) && Object ( external _lodash _ [ "get" ] ) ( panels , [ panelName , 'enabled' ] , true ) ;
}
/ * *
* Returns true if the given panel is open , or false otherwise . Panels are
* closed by default .
*
* @ param { Object } state Global application state .
* @ param { string } panelName A string that identifies the panel .
*
* @ return { boolean } Whether or not the panel is open .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function isEditorPanelOpened ( state , panelName ) {
var panels = getPreference ( state , 'panels' ) ;
return Object ( external _lodash _ [ "get" ] ) ( panels , [ panelName ] ) === true || Object ( external _lodash _ [ "get" ] ) ( panels , [ panelName , 'opened' ] ) === true ;
}
/ * *
* Returns true if a modal is active , or false otherwise .
*
* @ param { Object } state Global application state .
* @ param { string } modalName A string that uniquely identifies the modal .
*
* @ return { boolean } Whether the modal is active .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function isModalActive ( state , modalName ) {
return state . activeModal === modalName ;
}
2020-01-22 23:06:21 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns whether the given feature is enabled or not .
*
* @ param { Object } state Global application state .
* @ param { string } feature Feature slug .
*
* @ return { boolean } Is active .
2020-01-22 23:06:21 +01:00
* /
2021-01-28 03:04:13 +01:00
function isFeatureActive ( state , feature ) {
return Object ( external _lodash _ [ "get" ] ) ( state . preferences . features , [ feature ] , false ) ;
}
/ * *
* Returns true if the plugin item is pinned to the header .
* When the value is not set it defaults to true .
*
* @ param { Object } state Global application state .
* @ param { string } pluginName Plugin item name .
*
* @ return { boolean } Whether the plugin item is pinned .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
var isPluginItemPinned = Object ( external _wp _data _ [ "createRegistrySelector" ] ) ( function ( select ) {
return function ( pluginName ) {
return select ( build _module [ "g" /* store */ ] ) . isItemPinned ( 'core/edit-post' , pluginName ) ;
} ;
} ) ;
/ * *
* Returns an array of active meta box locations .
*
* @ param { Object } state Post editor state .
*
* @ return { string [ ] } Active meta box locations .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
var getActiveMetaBoxLocations = Object ( rememo [ "a" /* default */ ] ) ( function ( state ) {
return Object . keys ( state . metaBoxes . locations ) . filter ( function ( location ) {
return isMetaBoxLocationActive ( state , location ) ;
} ) ;
} , function ( state ) {
return [ state . metaBoxes . locations ] ;
} ) ;
/ * *
* Returns true if a metabox location is active and visible
*
* @ param { Object } state Post editor state .
* @ param { string } location Meta box location to test .
*
* @ return { boolean } Whether the meta box location is active and visible .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function isMetaBoxLocationVisible ( state , location ) {
return isMetaBoxLocationActive ( state , location ) && Object ( external _lodash _ [ "some" ] ) ( getMetaBoxesPerLocation ( state , location ) , function ( _ref ) {
var id = _ref . id ;
return isEditorPanelEnabled ( state , "meta-box-" . concat ( id ) ) ;
} ) ;
}
/ * *
* Returns true if there is an active meta box in the given location , or false
* otherwise .
*
* @ param { Object } state Post editor state .
* @ param { string } location Meta box location to test .
*
* @ return { boolean } Whether the meta box location is active .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function isMetaBoxLocationActive ( state , location ) {
var metaBoxes = getMetaBoxesPerLocation ( state , location ) ;
return ! ! metaBoxes && metaBoxes . length !== 0 ;
}
/ * *
* Returns the list of all the available meta boxes for a given location .
*
* @ param { Object } state Global application state .
* @ param { string } location Meta box location to test .
*
* @ return { ? Array } List of meta boxes .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function getMetaBoxesPerLocation ( state , location ) {
return state . metaBoxes . locations [ location ] ;
}
/ * *
* Returns the list of all the available meta boxes .
*
* @ param { Object } state Global application state .
*
* @ return { Array } List of meta boxes .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
var getAllMetaBoxes = Object ( rememo [ "a" /* default */ ] ) ( function ( state ) {
return Object ( external _lodash _ [ "flatten" ] ) ( Object ( external _lodash _ [ "values" ] ) ( state . metaBoxes . locations ) ) ;
} , function ( state ) {
return [ state . metaBoxes . locations ] ;
} ) ;
/ * *
* Returns true if the post is using Meta Boxes
*
* @ param { Object } state Global application state
*
* @ return { boolean } Whether there are metaboxes or not .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function hasMetaBoxes ( state ) {
return getActiveMetaBoxLocations ( state ) . length > 0 ;
}
/ * *
* Returns true if the Meta Boxes are being saved .
*
* @ param { Object } state Global application state .
*
* @ return { boolean } Whether the metaboxes are being saved .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function selectors _isSavingMetaBoxes ( state ) {
return state . metaBoxes . isSaving ;
}
/ * *
* Returns the current editing canvas device type .
*
* @ param { Object } state Global application state .
*
* @ return { string } Device type .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function _ _experimentalGetPreviewDeviceType ( state ) {
return state . deviceType ;
}
/ * *
* Returns true if the inserter is opened .
*
* @ param { Object } state Global application state .
*
* @ return { boolean } Whether the inserter is opened .
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
function selectors _isInserterOpened ( state ) {
return state . isInserterOpened ;
}
2020-01-22 23:06:21 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns true if the template editing mode is enabled .
*
* @ param { Object } state Global application state .
*
* @ return { boolean } Whether we ' re editing the template .
2020-01-22 23:06:21 +01:00
* /
2021-01-28 03:04:13 +01:00
function selectors _isEditingTemplate ( state ) {
return state . isEditingTemplate ;
}
// EXTERNAL MODULE: ./node_modules/@wordpress/edit-post/build-module/store/constants.js
2021-02-02 06:17:13 +01:00
var constants = _ _webpack _require _ _ ( 118 ) ;
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js
2020-01-22 23:06:21 +01:00
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
var storeConfig = {
reducer : reducer ,
actions : actions _namespaceObject ,
selectors : selectors _namespaceObject ,
controls : external _wp _dataControls _ [ "controls" ] ,
persist : [ 'preferences' ]
} ;
2020-01-22 23:06:21 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Store definition for the edit post namespace .
2020-01-22 23:06:21 +01:00
*
2021-02-02 06:17:13 +01:00
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
2020-01-22 23:06:21 +01:00
*
2021-01-28 03:04:13 +01:00
* @ type { Object }
2020-01-22 23:06:21 +01:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var store = Object ( external _wp _data _ [ "createReduxStore" ] ) ( constants [ "a" /* STORE_NAME */ ] , storeConfig ) ; // Ideally we use register instead of register store.
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
Object ( external _wp _data _ [ "registerStore" ] ) ( constants [ "a" /* STORE_NAME */ ] , storeConfig ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ 24 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _arrayLikeToArray ; } ) ;
function _arrayLikeToArray ( arr , len ) {
if ( len == null || len > arr . length ) len = arr . length ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) {
arr2 [ i ] = arr [ i ] ;
}
return arr2 ;
}
/***/ } ) ,
/***/ 25 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _classCallCheck ; } ) ;
function _classCallCheck ( instance , Constructor ) {
if ( ! ( instance instanceof Constructor ) ) {
throw new TypeError ( "Cannot call a class as a function" ) ;
2019-10-15 17:37:08 +02:00
}
2021-01-28 03:04:13 +01:00
}
/***/ } ) ,
/***/ 26 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _createClass ; } ) ;
function _defineProperties ( target , props ) {
for ( var i = 0 ; i < props . length ; i ++ ) {
var descriptor = props [ i ] ;
descriptor . enumerable = descriptor . enumerable || false ;
descriptor . configurable = true ;
if ( "value" in descriptor ) descriptor . writable = true ;
Object . defineProperty ( target , descriptor . key , descriptor ) ;
}
2019-10-15 17:37:08 +02:00
}
2018-12-19 04:16:48 +01:00
2021-01-28 03:04:13 +01:00
function _createClass ( Constructor , protoProps , staticProps ) {
if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ;
if ( staticProps ) _defineProperties ( Constructor , staticProps ) ;
return Constructor ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ 28 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
"use strict" ;
2021-02-02 06:17:13 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _inherits ; } ) ;
/* harmony import */ var _babel _runtime _helpers _esm _setPrototypeOf _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 52 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function _inherits ( subClass , superClass ) {
if ( typeof superClass !== "function" && superClass !== null ) {
throw new TypeError ( "Super expression must either be null or a function" ) ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
subClass . prototype = Object . create ( superClass && superClass . prototype , {
constructor : {
value : subClass ,
writable : true ,
configurable : true
}
} ) ;
2021-02-02 06:17:13 +01:00
if ( superClass ) Object ( _babel _runtime _helpers _esm _setPrototypeOf _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( subClass , superClass ) ;
}
/***/ } ) ,
/***/ 29 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _possibleConstructorReturn ; } ) ;
/* harmony import */ var _babel _runtime _helpers _esm _typeof _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 42 ) ;
/* harmony import */ var _babel _runtime _helpers _esm _assertThisInitialized _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 18 ) ;
function _possibleConstructorReturn ( self , call ) {
if ( call && ( Object ( _babel _runtime _helpers _esm _typeof _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( call ) === "object" || typeof call === "function" ) ) {
return call ;
}
return Object ( _babel _runtime _helpers _esm _assertThisInitialized _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ /* default */ "a" ] ) ( self ) ;
2021-01-28 03:04:13 +01:00
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-02-02 06:17:13 +01:00
/***/ 293 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , exports ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "blockLibrary" ] ; } ( ) ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-02-02 06:17:13 +01:00
/***/ 3 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "components" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 303 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 7 ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var starFilled = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( starFilled ) ;
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-02-02 06:17:13 +01:00
/***/ 304 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 7 ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var starEmpty = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
fillRule : "evenodd" ,
d : "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z" ,
clipRule : "evenodd"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( starEmpty ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-02-02 06:17:13 +01:00
/***/ 31 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _unsupportedIterableToArray ; } ) ;
/* harmony import */ var _babel _runtime _helpers _esm _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 24 ) ;
function _unsupportedIterableToArray ( o , minLen ) {
if ( ! o ) return ;
if ( typeof o === "string" ) return Object ( _babel _runtime _helpers _esm _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( o , minLen ) ;
var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ;
if ( n === "Object" && o . constructor ) n = o . constructor . name ;
if ( n === "Map" || n === "Set" ) return Array . from ( o ) ;
if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return Object ( _babel _runtime _helpers _esm _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( o , minLen ) ;
}
/***/ } ) ,
/***/ 311 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 7 ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var moreVertical = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( moreVertical ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2019-09-19 17:19:18 +02:00
2021-02-02 06:17:13 +01:00
/***/ 32 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , exports ) {
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "url" ] ; } ( ) ) ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
/***/ 33 :
/***/ ( function ( module , exports ) {
2019-09-19 17:19:18 +02:00
2021-02-02 06:17:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "hooks" ] ; } ( ) ) ;
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
/***/ 34 :
/***/ ( function ( module , exports ) {
2019-09-19 17:19:18 +02:00
2021-02-02 06:17:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "editor" ] ; } ( ) ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
/***/ 37 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _iterableToArray ; } ) ;
function _iterableToArray ( iter ) {
if ( typeof Symbol !== "undefined" && Symbol . iterator in Object ( iter ) ) return Array . from ( iter ) ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ 38 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _arrayWithHoles ; } ) ;
function _arrayWithHoles ( arr ) {
if ( Array . isArray ( arr ) ) return arr ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ 39 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _nonIterableRest ; } ) ;
function _nonIterableRest ( ) {
throw new TypeError ( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
/***/ 4 :
/***/ ( function ( module , exports ) {
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "data" ] ; } ( ) ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ 41 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
"use strict" ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var LEAF _KEY , hasWeakMap ;
2020-02-06 22:03:31 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Arbitrary value used as key for referencing cache object in WeakMap tree .
*
* @ type { Object }
* /
LEAF _KEY = { } ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Whether environment supports WeakMap .
*
* @ type { boolean }
2019-10-15 17:37:08 +02:00
* /
2021-01-28 03:04:13 +01:00
hasWeakMap = typeof WeakMap !== 'undefined' ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns the first argument as the sole entry in an array .
*
* @ param { * } value Value to return .
*
* @ return { Array } Value returned as entry in array .
2019-10-15 17:37:08 +02:00
* /
2021-01-28 03:04:13 +01:00
function arrayOf ( value ) {
return [ value ] ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Returns true if the value passed is object - like , or false otherwise . A value
* is object - like if it can support property assignment , e . g . object or array .
*
* @ param { * } value Value to test .
*
* @ return { boolean } Whether value is object - like .
* /
function isObjectLike ( value ) {
return ! ! value && 'object' === typeof value ;
}
2018-12-14 05:41:57 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Creates and returns a new cache object .
*
* @ return { Object } Cache object .
2018-12-14 05:41:57 +01:00
* /
2021-01-28 03:04:13 +01:00
function createCache ( ) {
var cache = {
clear : function ( ) {
cache . head = null ;
} ,
} ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return cache ;
}
2018-12-14 05:41:57 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns true if entries within the two arrays are strictly equal by
* reference from a starting index .
2018-12-18 04:14:52 +01:00
*
2021-01-28 03:04:13 +01:00
* @ param { Array } a First array .
* @ param { Array } b Second array .
* @ param { number } fromIndex Index from which to start comparison .
2018-12-18 04:14:52 +01:00
*
2021-01-28 03:04:13 +01:00
* @ return { boolean } Whether arrays are shallowly equal .
2018-12-14 05:41:57 +01:00
* /
2021-01-28 03:04:13 +01:00
function isShallowEqual ( a , b , fromIndex ) {
var i ;
if ( a . length !== b . length ) {
return false ;
}
for ( i = fromIndex ; i < a . length ; i ++ ) {
if ( a [ i ] !== b [ i ] ) {
return false ;
}
}
return true ;
}
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns a memoized selector function . The getDependants function argument is
* called before the memoized selector and is expected to return an immutable
* reference or array of references on which the selector depends for computing
* its own return value . The memoize cache is preserved only as long as those
* dependant references remain the same . If getDependants returns a different
* reference ( s ) , the cache is cleared and the selector value regenerated .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { Function } selector Selector function .
* @ param { Function } getDependants Dependant getter returning an immutable
* reference or array of reference used in
* cache bust consideration .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ return { Function } Memoized selector .
2018-12-18 04:14:52 +01:00
* /
2021-01-28 03:04:13 +01:00
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( function ( selector , getDependants ) {
var rootCache , getCache ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// Use object source as dependant if getter not provided
if ( ! getDependants ) {
getDependants = arrayOf ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Returns the root cache . If WeakMap is supported , this is assigned to the
* root WeakMap cache set , otherwise it is a shared instance of the default
* cache object .
*
* @ return { ( WeakMap | Object ) } Root cache object .
* /
function getRootCache ( ) {
return rootCache ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Returns the cache for a given dependants array . When possible , a WeakMap
* will be used to create a unique cache for each set of dependants . This
* is feasible due to the nature of WeakMap in allowing garbage collection
* to occur on entries where the key object is no longer referenced . Since
* WeakMap requires the key to be an object , this is only possible when the
* dependant is object - like . The root cache is created as a hierarchy where
* each top - level key is the first entry in a dependants set , the value a
* WeakMap where each key is the next dependant , and so on . This continues
* so long as the dependants are object - like . If no dependants are object -
* like , then the cache is shared across all invocations .
*
* @ see isObjectLike
*
* @ param { Array } dependants Selector dependants .
*
* @ return { Object } Cache object .
* /
function getWeakMapCache ( dependants ) {
var caches = rootCache ,
isUniqueByDependants = true ,
i , dependant , map , cache ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
for ( i = 0 ; i < dependants . length ; i ++ ) {
dependant = dependants [ i ] ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// Can only compose WeakMap from object-like key.
if ( ! isObjectLike ( dependant ) ) {
isUniqueByDependants = false ;
break ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
// Does current segment of cache already have a WeakMap?
if ( caches . has ( dependant ) ) {
// Traverse into nested WeakMap.
caches = caches . get ( dependant ) ;
} else {
// Create, set, and traverse into a new one.
map = new WeakMap ( ) ;
caches . set ( dependant , map ) ;
caches = map ;
}
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// We use an arbitrary (but consistent) object as key for the last item
// in the WeakMap to serve as our running cache.
if ( ! caches . has ( LEAF _KEY ) ) {
cache = createCache ( ) ;
cache . isUniqueByDependants = isUniqueByDependants ;
caches . set ( LEAF _KEY , cache ) ;
}
return caches . get ( LEAF _KEY ) ;
}
// Assign cache handler by availability of WeakMap
getCache = hasWeakMap ? getWeakMapCache : getRootCache ;
/ * *
* Resets root memoization cache .
* /
function clear ( ) {
rootCache = hasWeakMap ? new WeakMap ( ) : createCache ( ) ;
}
// eslint-disable-next-line jsdoc/check-param-names
/ * *
* The augmented selector call , considering first whether dependants have
* changed before passing it to underlying memoize function .
*
* @ param { Object } source Source object for derivation .
* @ param { ... * } extraArgs Additional arguments to pass to selector .
*
* @ return { * } Selector result .
* /
function callSelector ( /* source, ...extraArgs */ ) {
var len = arguments . length ,
cache , node , i , args , dependants ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// Create copy of arguments (avoid leaking deoptimization).
args = new Array ( len ) ;
for ( i = 0 ; i < len ; i ++ ) {
args [ i ] = arguments [ i ] ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
dependants = getDependants . apply ( null , args ) ;
cache = getCache ( dependants ) ;
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
// If not guaranteed uniqueness by dependants (primitive type or lack
// of WeakMap support), shallow compare against last dependants and, if
// references have changed, destroy cache to recalculate result.
if ( ! cache . isUniqueByDependants ) {
if ( cache . lastDependants && ! isShallowEqual ( dependants , cache . lastDependants , 0 ) ) {
cache . clear ( ) ;
}
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
cache . lastDependants = dependants ;
}
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
node = cache . head ;
while ( node ) {
// Check whether node arguments match arguments
if ( ! isShallowEqual ( node . args , args , 1 ) ) {
node = node . next ;
continue ;
}
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
// At this point we can assume we've found a match
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
// Surface matched node to head if not already
if ( node !== cache . head ) {
// Adjust siblings to point to each other.
node . prev . next = node . next ;
if ( node . next ) {
node . next . prev = node . prev ;
}
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
node . next = cache . head ;
node . prev = null ;
cache . head . prev = node ;
cache . head = node ;
}
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
// Return immediately
return node . val ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
// No cached value found. Continue to insertion phase:
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
node = {
// Generate the result from original function
val : selector . apply ( null , args ) ,
} ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
// Avoid including the source object in the cache.
args [ 0 ] = null ;
node . args = args ;
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
// Don't need to check whether node is already head, since it would
// have been returned above already if it was
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// Shift existing head down list
if ( cache . head ) {
cache . head . prev = node ;
node . next = cache . head ;
}
Block Editor: Update WordPress packages to include the latest bug fixes.
Updated packages:
@wordpress/annotations@1.7.1
@wordpress/api-fetch@3.6.1
@wordpress/babel-plugin-makepot@3.2.1
@wordpress/babel-preset-default@4.6.1
@wordpress/block-directory@1.0.1
@wordpress/block-editor@3.2.1
@wordpress/block-library@2.9.1
@wordpress/blocks@6.7.1
@wordpress/components@8.3.1
@wordpress/compose@3.7.1
@wordpress/core-data@2.7.1
@wordpress/data-controls@1.3.1
@wordpress/data@4.9.1
@wordpress/docgen@1.4.1
@wordpress/dom@2.5.1
@wordpress/e2e-test-utils@2.4.1
@wordpress/e2e-tests@1.7.1
@wordpress/edit-post@3.8.1
@wordpress/editor@9.7.1
@wordpress/element@2.8.1
@wordpress/format-library@1.9.1
@wordpress/i18n@3.6.1
@wordpress/jest-console@3.3.1
@wordpress/jest-preset-default@5.1.1
@wordpress/keycodes@2.6.1
@wordpress/library-export-default-webpack-plugin@1.4.1
@wordpress/list-reusable-blocks@1.8.1
@wordpress/media-utils@1.2.1
@wordpress/notices@1.8.1
@wordpress/nux@3.7.1
@wordpress/plugins@2.7.1
@wordpress/redux-routine@3.6.1
@wordpress/rich-text@3.7.1
@wordpress/scripts@5.0.1
@wordpress/server-side-render@1.3.1
@wordpress/shortcode@2.4.1
@wordpress/token-list@1.6.1
@wordpress/viewport@2.8.1
@wordpress/wordcount@2.6.1
Props epiqueras, youknowriad, donmhico, jorgefilipecosta, soean, mcsf, noisysocks, andraganescu, gziolo, talldanwp, iseulde, nrqsnchz, mapk, karmatosed, joen, afercia, kjellr, desrosj.
Fixes #48186.
Built from https://develop.svn.wordpress.org/trunk@46364
git-svn-id: http://core.svn.wordpress.org/trunk@46163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-30 22:07:06 +02:00
2021-01-28 03:04:13 +01:00
cache . head = node ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return node . val ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
callSelector . getDependants = getDependants ;
callSelector . clear = clear ;
clear ( ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return callSelector ;
} ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ 42 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _typeof ; } ) ;
function _typeof ( obj ) {
"@babel/helpers - typeof" ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) {
_typeof = function _typeof ( obj ) {
return typeof obj ;
} ;
} else {
_typeof = function _typeof ( obj ) {
return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ;
} ;
2019-10-15 17:37:08 +02:00
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
return _typeof ( obj ) ;
2018-12-18 04:14:52 +01:00
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2021-02-02 06:17:13 +01:00
/***/ 436 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 7 ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2020-06-26 15:33:47 +02:00
2020-07-07 16:43:35 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-07-07 16:43:35 +02:00
* /
2021-01-28 03:04:13 +01:00
var external = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "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 */ _ _webpack _exports _ _ [ "a" ] = ( external ) ;
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2020-07-07 16:43:35 +02:00
2021-02-02 06:17:13 +01:00
/***/ 44 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _objectWithoutPropertiesLoose ; } ) ;
function _objectWithoutPropertiesLoose ( source , excluded ) {
if ( source == null ) return { } ;
var target = { } ;
var sourceKeys = Object . keys ( source ) ;
var key , i ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
for ( i = 0 ; i < sourceKeys . length ; i ++ ) {
key = sourceKeys [ i ] ;
if ( excluded . indexOf ( key ) >= 0 ) continue ;
target [ key ] = source [ key ] ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
return target ;
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-02-02 06:17:13 +01:00
/***/ 458 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
"use strict" ;
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "store" , function ( ) { return /* reexport */ store [ "a" /* store */ ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "reinitializeEditor" , function ( ) { return /* binding */ reinitializeEditor ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "initializeEditor" , function ( ) { return /* binding */ initializeEditor ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginBlockSettingsMenuItem" , function ( ) { return /* reexport */ plugin _block _settings _menu _item ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginDocumentSettingPanel" , function ( ) { return /* reexport */ plugin _document _setting _panel [ "a" /* default */ ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginMoreMenuItem" , function ( ) { return /* reexport */ plugin _more _menu _item ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginPostPublishPanel" , function ( ) { return /* reexport */ plugin _post _publish _panel ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginPostStatusInfo" , function ( ) { return /* reexport */ plugin _post _status _info ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginPrePublishPanel" , function ( ) { return /* reexport */ plugin _pre _publish _panel ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginSidebar" , function ( ) { return /* reexport */ PluginSidebarEditPost ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginSidebarMoreMenuItem" , function ( ) { return /* reexport */ PluginSidebarMoreMenuItem ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "__experimentalFullscreenModeClose" , function ( ) { return /* reexport */ fullscreen _mode _close ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "__experimentalMainDashboardButton" , function ( ) { return /* reexport */ main _dashboard _button ; } ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","element"]
var external _wp _element _ = _ _webpack _require _ _ ( 0 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","coreData"]
var external _wp _coreData _ = _ _webpack _require _ _ ( 57 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","blockEditor"]
var external _wp _blockEditor _ = _ _webpack _require _ _ ( 6 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","editor"]
2021-02-02 06:17:13 +01:00
var external _wp _editor _ = _ _webpack _require _ _ ( 34 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","blockLibrary"]
2021-02-02 06:17:13 +01:00
var external _wp _blockLibrary _ = _ _webpack _require _ _ ( 293 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","hooks"]
2021-02-02 06:17:13 +01:00
var external _wp _hooks _ = _ _webpack _require _ _ ( 33 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","mediaUtils"]
2021-02-02 06:17:13 +01:00
var external _wp _mediaUtils _ = _ _webpack _require _ _ ( 154 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/components/index.js
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2020-06-26 15:33:47 +02:00
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var components _replaceMediaUpload = function replaceMediaUpload ( ) {
return external _wp _mediaUtils _ [ "MediaUpload" ] ;
} ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
Object ( external _wp _hooks _ [ "addFilter" ] ) ( 'editor.MediaUpload' , 'core/edit-post/replace-media-upload' , components _replaceMediaUpload ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm _extends = _ _webpack _require _ _ ( 8 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = _ _webpack _require _ _ ( 13 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external "lodash"
var external _lodash _ = _ _webpack _require _ _ ( 2 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","blocks"]
var external _wp _blocks _ = _ _webpack _require _ _ ( 9 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","components"]
var external _wp _components _ = _ _webpack _require _ _ ( 3 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","data"]
var external _wp _data _ = _ _webpack _require _ _ ( 4 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","i18n"]
var external _wp _i18n _ = _ _webpack _require _ _ ( 1 ) ;
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","compose"]
var external _wp _compose _ = _ _webpack _require _ _ ( 12 ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/validate-multiple-use/index.js
2018-12-18 04:14:52 +01:00
2020-02-06 22:03:31 +01:00
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var enhance = Object ( external _wp _compose _ [ "compose" ] ) (
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* For blocks whose block type doesn ' t support ` multiple ` , provides the
* wrapped component with ` originalBlockClientId ` -- a reference to the
* first block of the same type in the content -- if and only if that
* "original" block is not the current one . Thus , an inexisting
* ` originalBlockClientId ` prop signals that the block is valid .
2020-06-26 15:33:47 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { WPComponent } WrappedBlockEdit A filtered BlockEdit instance .
2020-06-26 15:33:47 +02:00
*
2021-01-28 03:04:13 +01:00
* @ return { WPComponent } Enhanced component with merged state data props .
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select , block ) {
var multiple = Object ( external _wp _blocks _ [ "hasBlockSupport" ] ) ( block . name , 'multiple' , true ) ; // For block types with `multiple` support, there is no "original
// block" to be found in the content, as the block itself is valid.
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( multiple ) {
return { } ;
} // Otherwise, only pass `originalBlockClientId` if it refers to a different
// block from the current one.
var blocks = select ( 'core/block-editor' ) . getBlocks ( ) ;
var firstOfSameType = Object ( external _lodash _ [ "find" ] ) ( blocks , function ( _ref ) {
var name = _ref . name ;
return block . name === name ;
} ) ;
var isInvalid = firstOfSameType && firstOfSameType . clientId !== block . clientId ;
2020-06-26 15:33:47 +02:00
return {
2021-01-28 03:04:13 +01:00
originalBlockClientId : isInvalid && firstOfSameType . clientId
2020-06-26 15:33:47 +02:00
} ;
2021-01-28 03:04:13 +01:00
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , _ref2 ) {
var originalBlockClientId = _ref2 . originalBlockClientId ;
return {
selectFirst : function selectFirst ( ) {
return dispatch ( 'core/block-editor' ) . selectBlock ( originalBlockClientId ) ;
}
} ;
} ) ) ;
var withMultipleValidation = Object ( external _wp _compose _ [ "createHigherOrderComponent" ] ) ( function ( BlockEdit ) {
return enhance ( function ( _ref3 ) {
var originalBlockClientId = _ref3 . originalBlockClientId ,
selectFirst = _ref3 . selectFirst ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref3 , [ "originalBlockClientId" , "selectFirst" ] ) ;
if ( ! originalBlockClientId ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( BlockEdit , props ) ;
}
var blockType = Object ( external _wp _blocks _ [ "getBlockType" ] ) ( props . name ) ;
var outboundType = getOutboundType ( props . name ) ;
return [ Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
key : "invalid-preview" ,
style : {
minHeight : '60px'
}
} , Object ( external _wp _element _ [ "createElement" ] ) ( BlockEdit , Object ( esm _extends [ "a" /* default */ ] ) ( {
key : "block-edit"
} , props ) ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "Warning" ] , {
key : "multiple-use-warning" ,
actions : [ Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
key : "find-original" ,
isSecondary : true ,
onClick : selectFirst
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Find original' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
key : "remove" ,
isSecondary : true ,
onClick : function onClick ( ) {
return props . onReplace ( [ ] ) ;
}
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Remove' ) ) , outboundType && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
key : "transform" ,
isSecondary : true ,
onClick : function onClick ( ) {
return props . onReplace ( Object ( external _wp _blocks _ [ "createBlock" ] ) ( outboundType . name , props . attributes ) ) ;
}
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Transform into:' ) , " " , outboundType . title ) ]
} , Object ( external _wp _element _ [ "createElement" ] ) ( "strong" , null , blockType . title , ": " ) , Object ( external _wp _i18n _ [ "__" ] ) ( 'This block can only be used once.' ) ) ] ;
} ) ;
} , 'withMultipleValidation' ) ;
2020-07-07 16:43:35 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Given a base block name , returns the default block type to which to offer
* transforms .
2020-07-07 16:43:35 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { string } blockName Base block name .
*
* @ return { ? Object } The chosen default block type .
2020-07-07 16:43:35 +02:00
* /
2021-01-28 03:04:13 +01:00
function getOutboundType ( blockName ) {
// Grab the first outbound transform
var transform = Object ( external _wp _blocks _ [ "findTransform" ] ) ( Object ( external _wp _blocks _ [ "getBlockTransforms" ] ) ( 'to' , blockName ) , function ( _ref4 ) {
var type = _ref4 . type ,
blocks = _ref4 . blocks ;
return type === 'block' && blocks . length === 1 ;
} // What about when .length > 1?
) ;
if ( ! transform ) {
return null ;
}
return Object ( external _wp _blocks _ [ "getBlockType" ] ) ( transform . blocks [ 0 ] ) ;
2020-07-07 16:43:35 +02:00
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
Object ( external _wp _hooks _ [ "addFilter" ] ) ( 'editor.BlockEdit' , 'core/edit-post/validate-multiple-use/with-multiple-validation' , withMultipleValidation ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/index.js
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-10-15 17:37:08 +02:00
* /
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
2021-02-02 06:17:13 +01:00
var external = _ _webpack _require _ _ ( 436 ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","plugins"]
2021-02-02 06:17:13 +01:00
var external _wp _plugins _ = _ _webpack _require _ _ ( 73 ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","url"]
2021-02-02 06:17:13 +01:00
var external _wp _url _ = _ _webpack _require _ _ ( 32 ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","notices"]
2021-02-02 06:17:13 +01:00
var external _wp _notices _ = _ _webpack _require _ _ ( 51 ) ;
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/copy-content-menu-item/index.js
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function CopyContentMenuItem ( _ref ) {
var createNotice = _ref . createNotice ,
editedPostContent = _ref . editedPostContent ;
var ref = Object ( external _wp _element _ [ "useRef" ] ) ( ) ;
var hasCopied = Object ( external _wp _compose _ [ "useCopyOnClick" ] ) ( ref , editedPostContent ) ;
Object ( external _wp _element _ [ "useEffect" ] ) ( function ( ) {
if ( ! hasCopied ) {
return ;
}
createNotice ( 'info' , Object ( external _wp _i18n _ [ "__" ] ) ( 'All content copied.' ) , {
isDismissible : true ,
type : 'snackbar'
} ) ;
} , [ hasCopied ] ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItem" ] , {
ref : ref
} , hasCopied ? Object ( external _wp _i18n _ [ "__" ] ) ( 'Copied!' ) : Object ( external _wp _i18n _ [ "__" ] ) ( 'Copy all content' ) ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var copy _content _menu _item = ( Object ( external _wp _compose _ [ "compose" ] ) ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
editedPostContent : select ( 'core/editor' ) . getEditedPostAttribute ( 'content' )
2020-06-26 15:33:47 +02:00
} ;
2021-01-28 03:04:13 +01:00
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( external _wp _notices _ [ "store" ] ) ,
createNotice = _dispatch . createNotice ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return {
createNotice : createNotice
2020-06-26 15:33:47 +02:00
} ;
2021-01-28 03:04:13 +01:00
} ) , Object ( external _wp _compose _ [ "ifCondition" ] ) ( function ( _ref2 ) {
var editedPostContent = _ref2 . editedPostContent ;
return editedPostContent . length > 0 ;
} ) ) ( CopyContentMenuItem ) ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js + 5 modules
var store = _ _webpack _require _ _ ( 23 ) ;
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/manage-blocks-menu-item/index.js
2018-12-14 05:53:54 +01:00
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
2018-12-14 05:41:57 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
2021-01-28 03:04:13 +01:00
function ManageBlocksMenuItem ( _ref ) {
var openModal = _ref . openModal ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItem" ] , {
onClick : function onClick ( ) {
openModal ( 'edit-post/manage-blocks' ) ;
}
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Block Manager' ) ) ;
2019-10-15 17:37:08 +02:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var manage _blocks _menu _item = ( Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( store [ "a" /* store */ ] ) ,
openModal = _dispatch . openModal ;
return {
openModal : openModal
} ;
} ) ( ManageBlocksMenuItem ) ) ;
// EXTERNAL MODULE: external ["wp","keycodes"]
2021-02-02 06:17:13 +01:00
var external _wp _keycodes _ = _ _webpack _require _ _ ( 17 ) ;
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
2018-12-17 05:52:00 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2018-12-17 05:52:00 +01:00
* /
2021-01-28 03:04:13 +01:00
function KeyboardShortcutsHelpMenuItem ( _ref ) {
var openModal = _ref . openModal ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItem" ] , {
onClick : function onClick ( ) {
openModal ( 'edit-post/keyboard-shortcut-help' ) ;
} ,
shortcut : external _wp _keycodes _ [ "displayShortcut" ] . access ( 'h' )
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Keyboard shortcuts' ) ) ;
2019-10-15 17:37:08 +02:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var keyboard _shortcuts _help _menu _item = ( Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( store [ "a" /* store */ ] ) ,
openModal = _dispatch . openModal ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
return {
openModal : openModal
2020-06-26 15:33:47 +02:00
} ;
2021-01-28 03:04:13 +01:00
} ) ( KeyboardShortcutsHelpMenuItem ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/tools-more-menu-group/index.js
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2019-09-19 17:19:18 +02:00
* /
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-09-19 17:19:18 +02:00
* /
2021-01-28 03:04:13 +01:00
var _createSlotFill = Object ( external _wp _components _ [ "createSlotFill" ] ) ( 'ToolsMoreMenuGroup' ) ,
ToolsMoreMenuGroup = _createSlotFill . Fill ,
tools _more _menu _group _Slot = _createSlotFill . Slot ;
ToolsMoreMenuGroup . Slot = function ( _ref ) {
var fillProps = _ref . fillProps ;
return Object ( external _wp _element _ [ "createElement" ] ) ( tools _more _menu _group _Slot , {
fillProps : fillProps
} , function ( fills ) {
return ! Object ( external _lodash _ [ "isEmpty" ] ) ( fills ) && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuGroup" ] , {
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Tools' )
} , fills ) ;
2019-10-15 17:37:08 +02:00
} ) ;
2021-01-28 03:04:13 +01:00
} ;
/* harmony default export */ var tools _more _menu _group = ( ToolsMoreMenuGroup ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/welcome-guide-menu-item/index.js
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-10-15 17:37:08 +02:00
* /
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-10-15 17:37:08 +02:00
* /
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
function WelcomeGuideMenuItem ( ) {
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
toggleFeature = _useDispatch . toggleFeature ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItem" ] , {
onClick : function onClick ( ) {
return toggleFeature ( 'welcomeGuide' ) ;
}
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Welcome Guide' ) ) ;
2019-10-15 17:37:08 +02:00
}
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/index.js
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-10-15 17:37:08 +02:00
* /
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
Object ( external _wp _plugins _ [ "registerPlugin" ] ) ( 'edit-post' , {
render : function render ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( tools _more _menu _group , null , function ( _ref ) {
var onClose = _ref . onClose ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( manage _blocks _menu _item , {
onSelect : onClose
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItem" ] , {
role : "menuitem" ,
href : Object ( external _wp _url _ [ "addQueryArgs" ] ) ( 'edit.php' , {
post _type : 'wp_block'
} )
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Manage all reusable blocks' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcuts _help _menu _item , {
onSelect : onClose
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( WelcomeGuideMenuItem , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( copy _content _menu _item , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItem" ] , {
role : "menuitem" ,
icon : external [ "a" /* default */ ] ,
href : Object ( external _wp _i18n _ [ "__" ] ) ( 'https://wordpress.org/support/article/wordpress-editor/' ) ,
target : "_blank" ,
rel : "noopener noreferrer"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Help' ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "VisuallyHidden" ] , {
as : "span"
} ,
/* translators: accessibility text */
Object ( external _wp _i18n _ [ "__" ] ) ( '(opens in a new tab)' ) ) ) ) ;
} ) ) ;
}
} ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = _ _webpack _require _ _ ( 15 ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = _ _webpack _require _ _ ( 5 ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/prevent-event-discovery.js
/* harmony default export */ var prevent _event _discovery = ( {
't a l e s o f g u t e n b e r g' : function tALESOFGUTENBERG ( event ) {
var ownerDocument = event . target . ownerDocument ;
if ( ! ownerDocument . activeElement . classList . contains ( 'edit-post-visual-editor' ) && ownerDocument . activeElement !== ownerDocument . body ) {
return ;
}
event . preventDefault ( ) ;
window . wp . data . dispatch ( 'core/block-editor' ) . insertBlock ( window . wp . blocks . createBlock ( 'core/paragraph' , {
content : '🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️'
} ) ) ;
}
} ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = _ _webpack _require _ _ ( 11 ) ;
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = _ _webpack _require _ _ ( 10 ) ;
var classnames _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( classnames ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/interface/build-module/index.js + 15 modules
2021-02-02 06:17:13 +01:00
var build _module = _ _webpack _require _ _ ( 61 ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
2021-02-02 06:17:13 +01:00
var library _close = _ _webpack _require _ _ ( 160 ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","keyboardShortcuts"]
2021-02-02 06:17:13 +01:00
var external _wp _keyboardShortcuts _ = _ _webpack _require _ _ ( 46 ) ;
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/text-editor/index.js
2020-07-07 16:43:35 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-07-07 16:43:35 +02:00
* /
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-10-15 17:37:08 +02:00
* /
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
function TextEditor ( _ref ) {
var onExit = _ref . onExit ,
isRichEditingEnabled = _ref . isRichEditingEnabled ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-text-editor"
} , isRichEditingEnabled && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-text-editor__toolbar"
} , Object ( external _wp _element _ [ "createElement" ] ) ( "h2" , null , Object ( external _wp _i18n _ [ "__" ] ) ( 'Editing code' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
isTertiary : true ,
onClick : onExit ,
shortcut : external _wp _keycodes _ [ "displayShortcut" ] . secondary ( 'm' )
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Exit code editor' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "TextEditorGlobalKeyboardShortcuts" ] , null ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-text-editor__body"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTitle" ] , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTextEditor" ] , null ) ) ) ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var text _editor = ( Object ( external _wp _compose _ [ "compose" ] ) ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
isRichEditingEnabled : select ( 'core/editor' ) . getEditorSettings ( ) . richEditingEnabled
} ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
return {
onExit : function onExit ( ) {
dispatch ( store [ "a" /* store */ ] ) . switchEditorMode ( 'visual' ) ;
}
} ;
} ) ) ( TextEditor ) ) ;
2019-09-19 17:19:18 +02:00
2021-02-02 06:17:13 +01:00
// EXTERNAL MODULE: ./node_modules/react-merge-refs/dist/react-merge-refs.esm.js
var react _merge _refs _esm = _ _webpack _require _ _ ( 72 ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","a11y"]
2021-02-02 06:17:13 +01:00
var external _wp _a11y _ = _ _webpack _require _ _ ( 48 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/visual-editor/block-inspector-button.js
2020-06-26 15:33:47 +02:00
2019-09-19 17:19:18 +02:00
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* Internal dependencies
2019-09-19 17:19:18 +02:00
* /
2021-01-28 03:04:13 +01:00
function BlockInspectorButton ( _ref ) {
var _ref$onClick = _ref . onClick ,
_onClick = _ref$onClick === void 0 ? external _lodash _ [ "noop" ] : _ref$onClick ,
_ref$small = _ref . small ,
small = _ref$small === void 0 ? false : _ref$small ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
shortcut : select ( external _wp _keyboardShortcuts _ [ "store" ] ) . getShortcutRepresentation ( 'core/edit-post/toggle-sidebar' ) ,
areAdvancedSettingsOpened : select ( store [ "a" /* store */ ] ) . getActiveGeneralSidebarName ( ) === 'edit-post/block'
} ;
} , [ ] ) ,
shortcut = _useSelect . shortcut ,
areAdvancedSettingsOpened = _useSelect . areAdvancedSettingsOpened ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
openGeneralSidebar = _useDispatch . openGeneralSidebar ,
closeGeneralSidebar = _useDispatch . closeGeneralSidebar ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var speakMessage = function speakMessage ( ) {
if ( areAdvancedSettingsOpened ) {
Object ( external _wp _a11y _ [ "speak" ] ) ( Object ( external _wp _i18n _ [ "__" ] ) ( 'Block settings closed' ) ) ;
} else {
Object ( external _wp _a11y _ [ "speak" ] ) ( Object ( external _wp _i18n _ [ "__" ] ) ( 'Additional settings are now available in the Editor block settings sidebar' ) ) ;
}
} ;
2019-09-19 17:19:18 +02:00
2021-02-02 06:17:13 +01:00
var label = areAdvancedSettingsOpened ? Object ( external _wp _i18n _ [ "__" ] ) ( 'Hide more settings' ) : Object ( external _wp _i18n _ [ "__" ] ) ( 'Show more settings' ) ;
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItem" ] , {
onClick : function onClick ( ) {
if ( areAdvancedSettingsOpened ) {
closeGeneralSidebar ( ) ;
} else {
openGeneralSidebar ( 'edit-post/block' ) ;
speakMessage ( ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
_onClick ( ) ;
}
} ,
shortcut : shortcut
} , ! small && label ) ;
}
/* harmony default export */ var block _inspector _button = ( BlockInspectorButton ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/visual-editor/index.js
2019-09-19 17:19:18 +02:00
2021-02-02 06:17:13 +01:00
/ * *
* External dependencies
* /
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2019-09-19 17:19:18 +02:00
2021-02-02 06:17:13 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2019-09-19 17:19:18 +02:00
2020-06-26 15:33:47 +02:00
2021-02-02 06:17:13 +01:00
function VisualEditor ( _ref ) {
var styles = _ref . styles ;
2021-01-28 03:04:13 +01:00
var ref = Object ( external _wp _element _ [ "useRef" ] ) ( ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select = select ( store [ "a" /* store */ ] ) ,
isEditingTemplate = _select . isEditingTemplate ,
_ _experimentalGetPreviewDeviceType = _select . _ _experimentalGetPreviewDeviceType ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return {
deviceType : _ _experimentalGetPreviewDeviceType ( ) ,
isTemplateMode : isEditingTemplate ( )
} ;
} , [ ] ) ,
deviceType = _useSelect . deviceType ,
isTemplateMode = _useSelect . isTemplateMode ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var hasMetaBoxes = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return select ( store [ "a" /* store */ ] ) . hasMetaBoxes ( ) ;
} , [ ] ) ;
var desktopCanvasStyles = {
height : '100%' ,
// Add a constant padding for the typewritter effect. When typing at the
// bottom, there needs to be room to scroll up.
paddingBottom : hasMetaBoxes ? null : '40vh'
} ;
var resizedCanvasStyles = Object ( external _wp _blockEditor _ [ "__experimentalUseResizeCanvas" ] ) ( deviceType ) ;
Object ( external _wp _blockEditor _ [ "__unstableUseScrollMultiSelectionIntoView" ] ) ( ref ) ;
Object ( external _wp _blockEditor _ [ "__unstableUseBlockSelectionClearer" ] ) ( ref ) ;
Object ( external _wp _blockEditor _ [ "__unstableUseTypewriter" ] ) ( ref ) ;
Object ( external _wp _blockEditor _ [ "__unstableUseClipboardHandler" ] ) ( ref ) ;
Object ( external _wp _blockEditor _ [ "__unstableUseTypingObserver" ] ) ( ref ) ;
Object ( external _wp _blockEditor _ [ "__unstableUseCanvasClickRedirect" ] ) ( ref ) ;
2021-02-02 06:17:13 +01:00
var editorStylesRef = Object ( external _wp _blockEditor _ [ "__unstableUseEditorStyles" ] ) ( styles ) ;
var mergedRefs = Object ( external _wp _element _ [ "useCallback" ] ) ( Object ( react _merge _refs _esm [ "a" /* default */ ] ) ( [ ref , editorStylesRef ] ) , [ ref , editorStylesRef ] ) ;
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-visual-editor"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "VisualEditorGlobalKeyboardShortcuts" ] , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Popover" ] . Slot , {
name : "block-toolbar"
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
2021-02-02 06:17:13 +01:00
ref : mergedRefs ,
2021-01-28 03:04:13 +01:00
className : "editor-styles-wrapper" ,
style : resizedCanvasStyles || desktopCanvasStyles
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "WritingFlow" ] , null , ! isTemplateMode && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-visual-editor__post-title-wrapper"
2021-02-02 06:17:13 +01:00
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTitle" ] , null ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "BlockList" ] , null ) ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "__experimentalBlockSettingsMenuFirstItem" ] , null , function ( _ref2 ) {
var onClose = _ref2 . onClose ;
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( block _inspector _button , {
onClick : onClose
} ) ;
} ) ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcuts/index.js
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-06-26 15:33:47 +02:00
* /
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
function KeyboardShortcuts ( ) {
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var settings = select ( 'core/editor' ) . getEditorSettings ( ) ;
return {
getBlockSelectionStart : select ( 'core/block-editor' ) . getBlockSelectionStart ,
getEditorMode : select ( store [ "a" /* store */ ] ) . getEditorMode ,
isEditorSidebarOpened : select ( store [ "a" /* store */ ] ) . isEditorSidebarOpened ,
richEditingEnabled : settings . richEditingEnabled ,
codeEditingEnabled : settings . codeEditingEnabled
} ;
} ) ,
getBlockSelectionStart = _useSelect . getBlockSelectionStart ,
getEditorMode = _useSelect . getEditorMode ,
isEditorSidebarOpened = _useSelect . isEditorSidebarOpened ,
richEditingEnabled = _useSelect . richEditingEnabled ,
codeEditingEnabled = _useSelect . codeEditingEnabled ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
switchEditorMode = _useDispatch . switchEditorMode ,
openGeneralSidebar = _useDispatch . openGeneralSidebar ,
closeGeneralSidebar = _useDispatch . closeGeneralSidebar ,
toggleFeature = _useDispatch . toggleFeature ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _useDispatch2 = Object ( external _wp _data _ [ "useDispatch" ] ) ( external _wp _keyboardShortcuts _ [ "store" ] ) ,
registerShortcut = _useDispatch2 . registerShortcut ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
Object ( external _wp _element _ [ "useEffect" ] ) ( function ( ) {
registerShortcut ( {
name : 'core/edit-post/toggle-mode' ,
category : 'global' ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Switch between visual editor and code editor.' ) ,
keyCombination : {
modifier : 'secondary' ,
character : 'm'
}
} ) ;
registerShortcut ( {
name : 'core/edit-post/toggle-fullscreen' ,
category : 'global' ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Toggle fullscreen mode.' ) ,
keyCombination : {
modifier : 'secondary' ,
character : 'f'
}
} ) ;
registerShortcut ( {
name : 'core/edit-post/toggle-block-navigation' ,
category : 'global' ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Open the block list view.' ) ,
keyCombination : {
modifier : 'access' ,
character : 'o'
}
} ) ;
registerShortcut ( {
name : 'core/edit-post/toggle-sidebar' ,
category : 'global' ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Show or hide the settings sidebar.' ) ,
keyCombination : {
modifier : 'primaryShift' ,
character : ','
}
} ) ;
registerShortcut ( {
name : 'core/edit-post/next-region' ,
category : 'global' ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Navigate to the next part of the editor.' ) ,
keyCombination : {
modifier : 'ctrl' ,
character : '`'
} ,
aliases : [ {
modifier : 'access' ,
character : 'n'
} ]
} ) ;
registerShortcut ( {
name : 'core/edit-post/previous-region' ,
category : 'global' ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Navigate to the previous part of the editor.' ) ,
keyCombination : {
modifier : 'ctrlShift' ,
character : '`'
} ,
aliases : [ {
modifier : 'access' ,
character : 'p'
} ]
} ) ;
registerShortcut ( {
name : 'core/edit-post/keyboard-shortcuts' ,
category : 'main' ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Display these keyboard shortcuts.' ) ,
keyCombination : {
modifier : 'access' ,
character : 'h'
}
} ) ;
} , [ ] ) ;
Object ( external _wp _keyboardShortcuts _ [ "useShortcut" ] ) ( 'core/edit-post/toggle-mode' , function ( ) {
switchEditorMode ( getEditorMode ( ) === 'visual' ? 'text' : 'visual' ) ;
} , {
bindGlobal : true ,
isDisabled : ! richEditingEnabled || ! codeEditingEnabled
} ) ;
Object ( external _wp _keyboardShortcuts _ [ "useShortcut" ] ) ( 'core/edit-post/toggle-fullscreen' , function ( ) {
toggleFeature ( 'fullscreenMode' ) ;
} , {
bindGlobal : true
} ) ;
Object ( external _wp _keyboardShortcuts _ [ "useShortcut" ] ) ( 'core/edit-post/toggle-sidebar' , function ( event ) {
// This shortcut has no known clashes, but use preventDefault to prevent any
// obscure shortcuts from triggering.
event . preventDefault ( ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( isEditorSidebarOpened ( ) ) {
closeGeneralSidebar ( ) ;
} else {
var sidebarToOpen = getBlockSelectionStart ( ) ? 'edit-post/block' : 'edit-post/document' ;
openGeneralSidebar ( sidebarToOpen ) ;
}
} , {
bindGlobal : true
} ) ;
return null ;
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var keyboard _shortcuts = ( KeyboardShortcuts ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcut-help-modal/config.js
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
var textFormattingShortcuts = [ {
keyCombination : {
modifier : 'primary' ,
character : 'b'
} ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Make the selected text bold.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'i'
} ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Make the selected text italic.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'k'
} ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Convert the selected text into a link.' )
} , {
keyCombination : {
modifier : 'primaryShift' ,
character : 'k'
} ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Remove a link.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'u'
} ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Underline the selected text.' )
} ] ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcut-help-modal/shortcut.js
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* External dependencies
* /
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
function KeyCombination ( _ref ) {
var keyCombination = _ref . keyCombination ,
forceAriaLabel = _ref . forceAriaLabel ;
var shortcut = keyCombination . modifier ? external _wp _keycodes _ [ "displayShortcutList" ] [ keyCombination . modifier ] ( keyCombination . character ) : keyCombination . character ;
var ariaLabel = keyCombination . modifier ? external _wp _keycodes _ [ "shortcutAriaLabel" ] [ keyCombination . modifier ] ( keyCombination . character ) : keyCombination . character ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "kbd" , {
className : "edit-post-keyboard-shortcut-help-modal__shortcut-key-combination" ,
"aria-label" : forceAriaLabel || ariaLabel
} , Object ( external _lodash _ [ "castArray" ] ) ( shortcut ) . map ( function ( character , index ) {
if ( character === '+' ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , {
key : index
} , character ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( "kbd" , {
key : index ,
className : "edit-post-keyboard-shortcut-help-modal__shortcut-key"
} , character ) ;
} ) ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function Shortcut ( _ref2 ) {
var description = _ref2 . description ,
keyCombination = _ref2 . keyCombination ,
_ref2$aliases = _ref2 . aliases ,
aliases = _ref2$aliases === void 0 ? [ ] : _ref2$aliases ,
ariaLabel = _ref2 . ariaLabel ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-keyboard-shortcut-help-modal__shortcut-description"
} , description ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-keyboard-shortcut-help-modal__shortcut-term"
} , Object ( external _wp _element _ [ "createElement" ] ) ( KeyCombination , {
keyCombination : keyCombination ,
forceAriaLabel : ariaLabel
} ) , aliases . map ( function ( alias , index ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( KeyCombination , {
keyCombination : alias ,
forceAriaLabel : ariaLabel ,
key : index
} ) ;
} ) ) ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var keyboard _shortcut _help _modal _shortcut = ( Shortcut ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2020-06-26 15:33:47 +02:00
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function DynamicShortcut ( _ref ) {
var name = _ref . name ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select = select ( external _wp _keyboardShortcuts _ [ "store" ] ) ,
getShortcutKeyCombination = _select . getShortcutKeyCombination ,
getShortcutDescription = _select . getShortcutDescription ,
getShortcutAliases = _select . getShortcutAliases ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
return {
keyCombination : getShortcutKeyCombination ( name ) ,
aliases : getShortcutAliases ( name ) ,
description : getShortcutDescription ( name )
} ;
} ) ,
keyCombination = _useSelect . keyCombination ,
description = _useSelect . description ,
aliases = _useSelect . aliases ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( ! keyCombination ) {
return null ;
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _shortcut , {
keyCombination : keyCombination ,
description : description ,
aliases : aliases
} ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var dynamic _shortcut = ( DynamicShortcut ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcut-help-modal/index.js
2020-06-26 15:33:47 +02:00
/ * *
* External dependencies
* /
2021-01-28 03:04:13 +01:00
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
var MODAL _NAME = 'edit-post/keyboard-shortcut-help' ;
var keyboard _shortcut _help _modal _ShortcutList = function ShortcutList ( _ref ) {
var shortcuts = _ref . shortcuts ;
return (
/ *
* Disable reason : The ` list ` ARIA role is redundant but
* Safari + VoiceOver won ' t announce the list otherwise .
* /
/* eslint-disable jsx-a11y/no-redundant-roles */
Object ( external _wp _element _ [ "createElement" ] ) ( "ul" , {
className : "edit-post-keyboard-shortcut-help-modal__shortcut-list" ,
role : "list"
} , shortcuts . map ( function ( shortcut , index ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( "li" , {
className : "edit-post-keyboard-shortcut-help-modal__shortcut" ,
key : index
} , Object ( external _lodash _ [ "isString" ] ) ( shortcut ) ? Object ( external _wp _element _ [ "createElement" ] ) ( dynamic _shortcut , {
name : shortcut
} ) : Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _shortcut , shortcut ) ) ;
} ) )
/* eslint-enable jsx-a11y/no-redundant-roles */
) ;
} ;
var keyboard _shortcut _help _modal _ShortcutSection = function ShortcutSection ( _ref2 ) {
var title = _ref2 . title ,
shortcuts = _ref2 . shortcuts ,
className = _ref2 . className ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "section" , {
className : classnames _default ( ) ( 'edit-post-keyboard-shortcut-help-modal__section' , className )
} , ! ! title && Object ( external _wp _element _ [ "createElement" ] ) ( "h2" , {
className : "edit-post-keyboard-shortcut-help-modal__section-title"
} , title ) , Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutList , {
shortcuts : shortcuts
} ) ) ;
} ;
var keyboard _shortcut _help _modal _ShortcutCategorySection = function ShortcutCategorySection ( _ref3 ) {
var title = _ref3 . title ,
categoryName = _ref3 . categoryName ,
_ref3$additionalShort = _ref3 . additionalShortcuts ,
additionalShortcuts = _ref3$additionalShort === void 0 ? [ ] : _ref3$additionalShort ;
var categoryShortcuts = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return select ( external _wp _keyboardShortcuts _ [ "store" ] ) . getCategoryShortcuts ( categoryName ) ;
} , [ categoryName ] ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutSection , {
title : title ,
shortcuts : categoryShortcuts . concat ( additionalShortcuts )
} ) ;
} ;
function KeyboardShortcutHelpModal ( _ref4 ) {
var isModalActive = _ref4 . isModalActive ,
toggleModal = _ref4 . toggleModal ;
Object ( external _wp _keyboardShortcuts _ [ "useShortcut" ] ) ( 'core/edit-post/keyboard-shortcuts' , toggleModal , {
bindGlobal : true
} ) ;
if ( ! isModalActive ) {
return null ;
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Modal" ] , {
className : "edit-post-keyboard-shortcut-help-modal" ,
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Keyboard shortcuts' ) ,
closeLabel : Object ( external _wp _i18n _ [ "__" ] ) ( 'Close' ) ,
onRequestClose : toggleModal
} , Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutSection , {
className : "edit-post-keyboard-shortcut-help-modal__main-shortcuts" ,
shortcuts : [ 'core/edit-post/keyboard-shortcuts' ]
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutCategorySection , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Global shortcuts' ) ,
categoryName : "global"
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutCategorySection , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Selection shortcuts' ) ,
categoryName : "selection"
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutCategorySection , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Block shortcuts' ) ,
categoryName : "block" ,
additionalShortcuts : [ {
keyCombination : {
character : '/'
} ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Change the block type after adding a new paragraph.' ) ,
/* translators: The forward-slash character. e.g. '/'. */
ariaLabel : Object ( external _wp _i18n _ [ "__" ] ) ( 'Forward-slash' )
} ]
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutSection , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Text formatting' ) ,
shortcuts : textFormattingShortcuts
} ) ) ;
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var keyboard _shortcut _help _modal = ( Object ( external _wp _compose _ [ "compose" ] ) ( [ Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
isModalActive : select ( store [ "a" /* store */ ] ) . isModalActive ( MODAL _NAME )
} ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , _ref5 ) {
var isModalActive = _ref5 . isModalActive ;
var _dispatch = dispatch ( store [ "a" /* store */ ] ) ,
openModal = _dispatch . openModal ,
closeModal = _dispatch . closeModal ;
2020-06-26 15:33:47 +02:00
return {
2021-01-28 03:04:13 +01:00
toggleModal : function toggleModal ( ) {
return isModalActive ? closeModal ( ) : openModal ( MODAL _NAME ) ;
}
2020-06-26 15:33:47 +02:00
} ;
2021-01-28 03:04:13 +01:00
} ) ] ) ( KeyboardShortcutHelpModal ) ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/manage-blocks-modal/checklist.js
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2020-06-26 15:33:47 +02:00
* /
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
function BlockTypesChecklist ( _ref ) {
var blockTypes = _ref . blockTypes ,
value = _ref . value ,
onItemChange = _ref . onItemChange ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "ul" , {
className : "edit-post-manage-blocks-modal__checklist"
} , blockTypes . map ( function ( blockType ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( "li" , {
key : blockType . name ,
className : "edit-post-manage-blocks-modal__checklist-item"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "CheckboxControl" ] , {
label : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , blockType . title , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "BlockIcon" ] , {
icon : blockType . icon
} ) ) ,
checked : value . includes ( blockType . name ) ,
onChange : Object ( external _lodash _ [ "partial" ] ) ( onItemChange , blockType . name )
} ) ) ;
} ) ) ;
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var checklist = ( BlockTypesChecklist ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/edit-post-settings/index.js
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
var EditPostSettings = Object ( external _wp _element _ [ "createContext" ] ) ( { } ) ;
/* harmony default export */ var edit _post _settings = ( EditPostSettings ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/manage-blocks-modal/category.js
2020-06-26 15:33:47 +02:00
/ * *
* External dependencies
* /
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
function BlockManagerCategory ( _ref ) {
var instanceId = _ref . instanceId ,
title = _ref . title ,
blockTypes = _ref . blockTypes ,
hiddenBlockTypes = _ref . hiddenBlockTypes ,
toggleVisible = _ref . toggleVisible ,
toggleAllVisible = _ref . toggleAllVisible ;
var settings = Object ( external _wp _element _ [ "useContext" ] ) ( edit _post _settings ) ;
var allowedBlockTypes = settings . allowedBlockTypes ;
var filteredBlockTypes = Object ( external _wp _element _ [ "useMemo" ] ) ( function ( ) {
if ( allowedBlockTypes === true ) {
return blockTypes ;
}
return blockTypes . filter ( function ( _ref2 ) {
var name = _ref2 . name ;
return Object ( external _lodash _ [ "includes" ] ) ( allowedBlockTypes || [ ] , name ) ;
} ) ;
} , [ allowedBlockTypes , blockTypes ] ) ;
if ( ! filteredBlockTypes . length ) {
return null ;
}
var checkedBlockNames = external _lodash _ [ "without" ] . apply ( void 0 , [ Object ( external _lodash _ [ "map" ] ) ( filteredBlockTypes , 'name' ) ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( hiddenBlockTypes ) ) ) ;
var titleId = 'edit-post-manage-blocks-modal__category-title-' + instanceId ;
var isAllChecked = checkedBlockNames . length === filteredBlockTypes . length ;
var ariaChecked ;
if ( isAllChecked ) {
ariaChecked = 'true' ;
} else if ( checkedBlockNames . length > 0 ) {
ariaChecked = 'mixed' ;
} else {
ariaChecked = 'false' ;
}
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
role : "group" ,
"aria-labelledby" : titleId ,
className : "edit-post-manage-blocks-modal__category"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "CheckboxControl" ] , {
checked : isAllChecked ,
onChange : toggleAllVisible ,
className : "edit-post-manage-blocks-modal__category-title" ,
"aria-checked" : ariaChecked ,
label : Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
id : titleId
} , title )
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( checklist , {
blockTypes : filteredBlockTypes ,
value : checkedBlockNames ,
onItemChange : toggleVisible
} ) ) ;
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var manage _blocks _modal _category = ( Object ( external _wp _compose _ [ "compose" ] ) ( [ external _wp _compose _ [ "withInstanceId" ] , Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( store [ "a" /* store */ ] ) ,
getPreference = _select . getPreference ;
return {
hiddenBlockTypes : getPreference ( 'hiddenBlockTypes' )
} ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , ownProps ) {
var _dispatch = dispatch ( store [ "a" /* store */ ] ) ,
showBlockTypes = _dispatch . showBlockTypes ,
hideBlockTypes = _dispatch . hideBlockTypes ;
return {
toggleVisible : function toggleVisible ( blockName , nextIsChecked ) {
if ( nextIsChecked ) {
showBlockTypes ( blockName ) ;
} else {
hideBlockTypes ( blockName ) ;
}
} ,
toggleAllVisible : function toggleAllVisible ( nextIsChecked ) {
var blockNames = Object ( external _lodash _ [ "map" ] ) ( ownProps . blockTypes , 'name' ) ;
if ( nextIsChecked ) {
showBlockTypes ( blockNames ) ;
} else {
hideBlockTypes ( blockNames ) ;
}
}
} ;
} ) ] ) ( BlockManagerCategory ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/manage-blocks-modal/manager.js
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2020-06-26 15:33:47 +02:00
* /
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
2020-06-26 15:33:47 +02:00
/ * *
* Internal dependencies
* /
2021-01-28 03:04:13 +01:00
function BlockManager ( _ref ) {
var search = _ref . search ,
setState = _ref . setState ,
blockTypes = _ref . blockTypes ,
categories = _ref . categories ,
hasBlockSupport = _ref . hasBlockSupport ,
isMatchingSearchTerm = _ref . isMatchingSearchTerm ,
numberOfHiddenBlocks = _ref . numberOfHiddenBlocks ;
2021-02-02 06:17:13 +01:00
// Filtering occurs here (as opposed to `withSelect`) to avoid
// wasted renders by consequence of `Array#filter` producing
// a new value reference on each call.
2021-01-28 03:04:13 +01:00
blockTypes = blockTypes . filter ( function ( blockType ) {
return hasBlockSupport ( blockType , 'inserter' , true ) && ( ! search || isMatchingSearchTerm ( blockType , search ) ) && ( ! blockType . parent || Object ( external _lodash _ [ "includes" ] ) ( blockType . parent , 'core/post-content' ) ) ;
} ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-manage-blocks-modal__content"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "TextControl" ] , {
type : "search" ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Search for a block' ) ,
value : search ,
onChange : function onChange ( nextSearch ) {
return setState ( {
search : nextSearch
} ) ;
} ,
className : "edit-post-manage-blocks-modal__search"
} ) , ! ! numberOfHiddenBlocks && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-manage-blocks-modal__disabled-blocks-count"
} , Object ( external _wp _i18n _ [ "sprintf" ] ) (
/* translators: %d: number of blocks. */
Object ( external _wp _i18n _ [ "_n" ] ) ( '%d block is disabled.' , '%d blocks are disabled.' , numberOfHiddenBlocks ) , numberOfHiddenBlocks ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
tabIndex : "0" ,
role : "region" ,
"aria-label" : Object ( external _wp _i18n _ [ "__" ] ) ( 'Available block types' ) ,
className : "edit-post-manage-blocks-modal__results"
} , blockTypes . length === 0 && Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-manage-blocks-modal__no-results"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'No blocks found.' ) ) , categories . map ( function ( category ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( manage _blocks _modal _category , {
key : category . slug ,
title : category . title ,
blockTypes : Object ( external _lodash _ [ "filter" ] ) ( blockTypes , {
category : category . slug
} )
} ) ;
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( manage _blocks _modal _category , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Uncategorized' ) ,
blockTypes : Object ( external _lodash _ [ "filter" ] ) ( blockTypes , function ( _ref2 ) {
var category = _ref2 . category ;
return ! category ;
} )
} ) ) ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var manager = ( Object ( external _wp _compose _ [ "compose" ] ) ( [ Object ( external _wp _compose _ [ "withState" ] ) ( {
search : ''
} ) , Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( external _wp _blocks _ [ "store" ] ) ,
getBlockTypes = _select . getBlockTypes ,
getCategories = _select . getCategories ,
hasBlockSupport = _select . hasBlockSupport ,
isMatchingSearchTerm = _select . isMatchingSearchTerm ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _select2 = select ( store [ "a" /* store */ ] ) ,
getPreference = _select2 . getPreference ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
var hiddenBlockTypes = getPreference ( 'hiddenBlockTypes' ) ;
var numberOfHiddenBlocks = Object ( external _lodash _ [ "isArray" ] ) ( hiddenBlockTypes ) && hiddenBlockTypes . length ;
return {
blockTypes : getBlockTypes ( ) ,
categories : getCategories ( ) ,
hasBlockSupport : hasBlockSupport ,
isMatchingSearchTerm : isMatchingSearchTerm ,
numberOfHiddenBlocks : numberOfHiddenBlocks
} ;
} ) ] ) ( BlockManager ) ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/manage-blocks-modal/index.js
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Unique identifier for Manage Blocks modal .
*
* @ type { string }
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
var manage _blocks _modal _MODAL _NAME = 'edit-post/manage-blocks' ;
function ManageBlocksModal ( _ref ) {
var isActive = _ref . isActive ,
closeModal = _ref . closeModal ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( ! isActive ) {
return null ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Modal" ] , {
className : "edit-post-manage-blocks-modal" ,
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Block Manager' ) ,
closeLabel : Object ( external _wp _i18n _ [ "__" ] ) ( 'Close' ) ,
onRequestClose : closeModal
} , Object ( external _wp _element _ [ "createElement" ] ) ( manager , null ) ) ;
}
/* harmony default export */ var manage _blocks _modal = ( Object ( external _wp _compose _ [ "compose" ] ) ( [ Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( store [ "a" /* store */ ] ) ,
isModalActive = _select . isModalActive ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return {
isActive : isModalActive ( manage _blocks _modal _MODAL _NAME )
} ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( store [ "a" /* store */ ] ) ,
closeModal = _dispatch . closeModal ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return {
closeModal : closeModal
} ;
} ) ] ) ( ManageBlocksModal ) ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/section.js
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var section _Section = function Section ( _ref ) {
var description = _ref . description ,
title = _ref . title ,
children = _ref . children ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "section" , {
className : "edit-post-preferences-modal__section"
} , Object ( external _wp _element _ [ "createElement" ] ) ( "h2" , {
className : "edit-post-preferences-modal__section-title"
} , title ) , description && Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-preferences-modal__section-description"
} , description ) , children ) ;
} ;
2020-06-26 15:33:47 +02:00
2021-02-02 06:17:13 +01:00
/* harmony default export */ var preferences _modal _section = ( section _Section ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/index.js + 6 modules
2021-02-02 06:17:13 +01:00
var options = _ _webpack _require _ _ ( 65 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/meta-boxes-section.js
2020-06-26 15:33:47 +02:00
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
2020-06-26 15:33:47 +02:00
/ * *
* Internal dependencies
* /
2021-01-28 03:04:13 +01:00
function MetaBoxesSection ( _ref ) {
var areCustomFieldsRegistered = _ref . areCustomFieldsRegistered ,
metaBoxes = _ref . metaBoxes ,
sectionProps = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "areCustomFieldsRegistered" , "metaBoxes" ] ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// The 'Custom Fields' meta box is a special case that we handle separately.
var thirdPartyMetaBoxes = Object ( external _lodash _ [ "filter" ] ) ( metaBoxes , function ( _ref2 ) {
var id = _ref2 . id ;
return id !== 'postcustom' ;
} ) ;
if ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes . length === 0 ) {
return null ;
}
2021-02-02 06:17:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( preferences _modal _section , sectionProps , areCustomFieldsRegistered && Object ( external _wp _element _ [ "createElement" ] ) ( options [ "a" /* EnableCustomFieldsOption */ ] , {
2021-01-28 03:04:13 +01:00
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Custom fields' )
} ) , Object ( external _lodash _ [ "map" ] ) ( thirdPartyMetaBoxes , function ( _ref3 ) {
var id = _ref3 . id ,
title = _ref3 . title ;
return Object ( external _wp _element _ [ "createElement" ] ) ( options [ "c" /* EnablePanelOption */ ] , {
key : id ,
label : title ,
panelName : "meta-box-" . concat ( id )
} ) ;
} ) ) ;
}
/* harmony default export */ var meta _boxes _section = ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getEditorSettings = _select . getEditorSettings ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _select2 = select ( store [ "a" /* store */ ] ) ,
getAllMetaBoxes = _select2 . getAllMetaBoxes ;
return {
// This setting should not live in the block editor's store.
areCustomFieldsRegistered : getEditorSettings ( ) . enableCustomFields !== undefined ,
metaBoxes : getAllMetaBoxes ( )
} ;
} ) ( MetaBoxesSection ) ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/index.js
2020-06-26 15:33:47 +02:00
2021-02-02 06:17:13 +01:00
2020-06-26 15:33:47 +02:00
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2021-02-02 06:17:13 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var preferences _modal _MODAL _NAME = 'edit-post/preferences' ;
2021-02-02 06:17:13 +01:00
var PREFERENCES _MENU = 'preferences-menu' ;
function PreferencesModal ( ) {
var isLargeViewport = Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( 'medium' ) ;
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
closeModal = _useDispatch . closeModal ;
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select = select ( external _wp _editor _ [ "store" ] ) ,
getEditedPostAttribute = _select . getEditedPostAttribute ;
var _select2 = select ( external _wp _coreData _ [ "store" ] ) ,
getPostType = _select2 . getPostType ;
var postType = getPostType ( getEditedPostAttribute ( 'type' ) ) ;
return {
isModalActive : select ( store [ "a" /* store */ ] ) . isModalActive ( preferences _modal _MODAL _NAME ) ,
isViewable : Object ( external _lodash _ [ "get" ] ) ( postType , [ 'viewable' ] , false )
} ;
} , [ ] ) ,
isModalActive = _useSelect . isModalActive ,
isViewable = _useSelect . isViewable ;
var showBlockBreadcrumbsOption = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select3 = select ( external _wp _editor _ [ "store" ] ) ,
getEditorSettings = _select3 . getEditorSettings ;
var _select4 = select ( store [ "a" /* store */ ] ) ,
getEditorMode = _select4 . getEditorMode ,
isFeatureActive = _select4 . isFeatureActive ;
var mode = getEditorMode ( ) ;
var isRichEditingEnabled = getEditorSettings ( ) . richEditingEnabled ;
var hasReducedUI = isFeatureActive ( 'reducedUI' ) ;
return ! hasReducedUI && isLargeViewport && isRichEditingEnabled && mode === 'visual' ;
} , [ isLargeViewport ] ) ;
var sections = Object ( external _wp _element _ [ "useMemo" ] ) ( function ( ) {
return [ {
name : 'general' ,
tabLabel : Object ( external _wp _i18n _ [ "__" ] ) ( 'General' ) ,
content : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , isLargeViewport && Object ( external _wp _element _ [ "createElement" ] ) ( preferences _modal _section , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Choose your own experience' )
} , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "e" /* EnablePublishSidebarOption */ ] , {
help : Object ( external _wp _i18n _ [ "__" ] ) ( 'Review settings such as categories and tags.' ) ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Include pre-publish checklist' )
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( preferences _modal _section , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Decide what to focus on' )
} , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "b" /* EnableFeature */ ] , {
featureName : "reducedUI" ,
help : Object ( external _wp _i18n _ [ "__" ] ) ( 'Compacts options and outlines in the toolbar.' ) ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Reduce the interface' )
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "b" /* EnableFeature */ ] , {
featureName : "focusMode" ,
help : Object ( external _wp _i18n _ [ "__" ] ) ( 'Highlights the current block and fades other content.' ) ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Spotlight mode' )
} ) , showBlockBreadcrumbsOption && Object ( external _wp _element _ [ "createElement" ] ) ( options [ "b" /* EnableFeature */ ] , {
featureName : "showBlockBreadcrumbs" ,
help : Object ( external _wp _i18n _ [ "__" ] ) ( 'Shows block breadcrumbs at the bottom of the editor.' ) ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Display block breadcrumbs' )
} ) ) )
} , {
name : 'appearance' ,
tabLabel : Object ( external _wp _i18n _ [ "__" ] ) ( 'Appearance' ) ,
content : Object ( external _wp _element _ [ "createElement" ] ) ( preferences _modal _section , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Choose the way it looks' )
} , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "b" /* EnableFeature */ ] , {
featureName : "showIconLabels" ,
help : Object ( external _wp _i18n _ [ "__" ] ) ( 'Shows text instead of icons in toolbar.' ) ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Display button labels' )
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "b" /* EnableFeature */ ] , {
featureName : "themeStyles" ,
help : Object ( external _wp _i18n _ [ "__" ] ) ( 'Make the editor look like your theme.' ) ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Use theme styles' )
} ) )
} , {
name : 'blocks' ,
tabLabel : Object ( external _wp _i18n _ [ "__" ] ) ( 'Blocks' ) ,
content : Object ( external _wp _element _ [ "createElement" ] ) ( preferences _modal _section , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Choose how you interact with blocks' )
} , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "b" /* EnableFeature */ ] , {
featureName : "mostUsedBlocks" ,
help : Object ( external _wp _i18n _ [ "__" ] ) ( 'Places the most frequent blocks in the block library.' ) ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Show most used blocks' )
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "b" /* EnableFeature */ ] , {
featureName : "keepCaretInsideBlock" ,
help : Object ( external _wp _i18n _ [ "__" ] ) ( 'Aids screen readers by stopping text caret from leaving blocks.' ) ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Contain text cursor inside block' )
} ) )
} , {
name : 'panels' ,
tabLabel : Object ( external _wp _i18n _ [ "__" ] ) ( 'Panels' ) ,
content : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( preferences _modal _section , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Document settings' ) ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Choose what displays in the panel.' )
} , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "d" /* EnablePluginDocumentSettingPanelOption */ ] . Slot , null ) , isViewable && Object ( external _wp _element _ [ "createElement" ] ) ( options [ "c" /* EnablePanelOption */ ] , {
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Permalink' ) ,
panelName : "post-link"
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTaxonomies" ] , {
taxonomyWrapper : function taxonomyWrapper ( content , taxonomy ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( options [ "c" /* EnablePanelOption */ ] , {
label : Object ( external _lodash _ [ "get" ] ) ( taxonomy , [ 'labels' , 'menu_name' ] ) ,
panelName : "taxonomy-panel-" . concat ( taxonomy . slug )
} ) ;
}
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostFeaturedImageCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "c" /* EnablePanelOption */ ] , {
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Featured image' ) ,
panelName : "featured-image"
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostExcerptCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "c" /* EnablePanelOption */ ] , {
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Excerpt' ) ,
panelName : "post-excerpt"
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTypeSupportCheck" ] , {
supportKeys : [ 'comments' , 'trackbacks' ]
} , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "c" /* EnablePanelOption */ ] , {
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Discussion' ) ,
panelName : "discussion-panel"
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PageAttributesCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( options [ "c" /* EnablePanelOption */ ] , {
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Page attributes' ) ,
panelName : "page-attributes"
} ) ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( preferences _modal _section , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Additional' ) ,
description : Object ( external _wp _i18n _ [ "__" ] ) ( 'Add extra areas to the editor.' )
} , Object ( external _wp _element _ [ "createElement" ] ) ( meta _boxes _section , null ) ) )
} ] ;
} , [ isViewable , isLargeViewport , showBlockBreadcrumbsOption ] ) ; // This is also used to sync the two different rendered components
// between small and large viewports.
var _useState = Object ( external _wp _element _ [ "useState" ] ) ( PREFERENCES _MENU ) ,
_useState2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _useState , 2 ) ,
activeMenu = _useState2 [ 0 ] ,
setActiveMenu = _useState2 [ 1 ] ;
/ * *
* Create helper objects from ` sections ` for easier data handling .
* ` tabs ` is used for creating the ` TabPanel ` and ` sectionsContentMap `
* is used for easier access to active tab ' s content .
* /
var _useMemo = Object ( external _wp _element _ [ "useMemo" ] ) ( function ( ) {
return sections . reduce ( function ( accumulator , _ref ) {
var name = _ref . name ,
title = _ref . tabLabel ,
content = _ref . content ;
accumulator . tabs . push ( {
name : name ,
title : title
} ) ;
accumulator . sectionsContentMap [ name ] = content ;
return accumulator ;
} , {
tabs : [ ] ,
sectionsContentMap : { }
} ) ;
} , [ sections ] ) ,
tabs = _useMemo . tabs ,
sectionsContentMap = _useMemo . sectionsContentMap ;
var getCurrentTab = Object ( external _wp _element _ [ "useCallback" ] ) ( function ( tab ) {
return sectionsContentMap [ tab . name ] || null ;
} , [ sectionsContentMap ] ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( ! isModalActive ) {
return null ;
}
2020-06-26 15:33:47 +02:00
2021-02-02 06:17:13 +01:00
var modalContent ; // We render different components based on the viewport size.
if ( isLargeViewport ) {
modalContent = Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "TabPanel" ] , {
className : "edit-post-preferences__tabs" ,
tabs : tabs ,
initialTabName : activeMenu !== PREFERENCES _MENU ? activeMenu : undefined ,
onSelect : setActiveMenu ,
orientation : "vertical"
} , getCurrentTab ) ;
} else {
modalContent = Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "__experimentalNavigation" ] , {
activeMenu : activeMenu ,
onActivateMenu : setActiveMenu
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "__experimentalNavigationMenu" ] , {
menu : PREFERENCES _MENU
} , tabs . map ( function ( tab ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "__experimentalNavigationItem" ] , {
key : tab . name ,
title : tab . title ,
navigateToMenu : tab . name
} ) ;
} ) ) , sections . map ( function ( section ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "__experimentalNavigationMenu" ] , {
key : "" . concat ( section . name , "-menu" ) ,
menu : section . name ,
title : section . tabLabel ,
parentMenu : PREFERENCES _MENU
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "__experimentalNavigationItem" ] , null , section . content ) ) ;
} ) ) ;
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Modal" ] , {
className : "edit-post-preferences-modal" ,
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Preferences' ) ,
closeLabel : Object ( external _wp _i18n _ [ "__" ] ) ( 'Close' ) ,
onRequestClose : closeModal
2021-02-02 06:17:13 +01:00
} , modalContent ) ;
2021-01-28 03:04:13 +01:00
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = _ _webpack _require _ _ ( 25 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = _ _webpack _require _ _ ( 26 ) ;
2020-06-26 15:33:47 +02:00
2021-02-02 06:17:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
2021-01-28 03:04:13 +01:00
var inherits = _ _webpack _require _ _ ( 28 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
var possibleConstructorReturn = _ _webpack _require _ _ ( 29 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
var getPrototypeOf = _ _webpack _require _ _ ( 19 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/browser-url/index.js
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function _createSuper ( Derived ) { var hasNativeReflectConstruct = _isNativeReflectConstruct ( ) ; return function _createSuperInternal ( ) { var Super = Object ( getPrototypeOf [ "a" /* default */ ] ) ( Derived ) , result ; if ( hasNativeReflectConstruct ) { var NewTarget = Object ( getPrototypeOf [ "a" /* default */ ] ) ( this ) . constructor ; result = Reflect . construct ( Super , arguments , NewTarget ) ; } else { result = Super . apply ( this , arguments ) ; } return Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , result ) ; } ; }
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function _isNativeReflectConstruct ( ) { if ( typeof Reflect === "undefined" || ! Reflect . construct ) return false ; if ( Reflect . construct . sham ) return false ; if ( typeof Proxy === "function" ) return true ; try { Date . prototype . toString . call ( Reflect . construct ( Date , [ ] , function ( ) { } ) ) ; return true ; } catch ( e ) { return false ; } }
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* Returns the Post ' s Edit URL .
*
* @ param { number } postId Post ID .
*
* @ return { string } Post edit URL .
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function getPostEditURL ( postId ) {
return Object ( external _wp _url _ [ "addQueryArgs" ] ) ( 'post.php' , {
post : postId ,
action : 'edit'
} ) ;
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
/ * *
* Returns the Post ' s Trashed URL .
*
* @ param { number } postId Post ID .
* @ param { string } postType Post Type .
*
* @ return { string } Post trashed URL .
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function getPostTrashedURL ( postId , postType ) {
return Object ( external _wp _url _ [ "addQueryArgs" ] ) ( 'edit.php' , {
trashed : 1 ,
post _type : postType ,
ids : postId
} ) ;
}
var browser _url _BrowserURL = /*#__PURE__*/ function ( _Component ) {
Object ( inherits [ "a" /* default */ ] ) ( BrowserURL , _Component ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _super = _createSuper ( BrowserURL ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function BrowserURL ( ) {
var _this ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
Object ( classCallCheck [ "a" /* default */ ] ) ( this , BrowserURL ) ;
_this = _super . apply ( this , arguments ) ;
_this . state = {
historyId : null
2020-06-26 15:33:47 +02:00
} ;
2021-01-28 03:04:13 +01:00
return _this ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
Object ( createClass [ "a" /* default */ ] ) ( BrowserURL , [ {
key : "componentDidUpdate" ,
value : function componentDidUpdate ( prevProps ) {
var _this$props = this . props ,
postId = _this$props . postId ,
postStatus = _this$props . postStatus ,
postType = _this$props . postType ,
isSavingPost = _this$props . isSavingPost ;
var historyId = this . state . historyId ; // Posts are still dirty while saving so wait for saving to finish
// to avoid the unsaved changes warning when trashing posts.
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( postStatus === 'trash' && ! isSavingPost ) {
this . setTrashURL ( postId , postType ) ;
return ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( ( postId !== prevProps . postId || postId !== historyId ) && postStatus !== 'auto-draft' && postId ) {
this . setBrowserURL ( postId ) ;
}
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
/ * *
* Navigates the browser to the post trashed URL to show a notice about the trashed post .
*
* @ param { number } postId Post ID .
* @ param { string } postType Post Type .
* /
} , {
key : "setTrashURL" ,
value : function setTrashURL ( postId , postType ) {
window . location . href = getPostTrashedURL ( postId , postType ) ;
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
/ * *
* Replaces the browser URL with a post editor link for the given post ID .
*
* Note it is important that , since this function may be called when the
* editor first loads , the result generated ` getPostEditURL ` matches that
* produced by the server . Otherwise , the URL will change unexpectedly .
*
* @ param { number } postId Post ID for which to generate post editor URL .
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
} , {
key : "setBrowserURL" ,
value : function setBrowserURL ( postId ) {
window . history . replaceState ( {
id : postId
} , 'Post ' + postId , getPostEditURL ( postId ) ) ;
this . setState ( function ( ) {
return {
historyId : postId
} ;
} ) ;
}
} , {
key : "render" ,
value : function render ( ) {
return null ;
}
} ] ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return BrowserURL ;
} ( external _wp _element _ [ "Component" ] ) ;
/* harmony default export */ var browser _url = ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getCurrentPost = _select . getCurrentPost ,
isSavingPost = _select . isSavingPost ;
var post = getCurrentPost ( ) ;
var id = post . id ,
status = post . status ,
type = post . type ;
var isTemplate = [ 'wp_template' , 'wp_template_part' ] . includes ( type ) ;
if ( isTemplate ) {
id = post . wp _id ;
}
return {
postId : id ,
postStatus : status ,
postType : type ,
isSavingPost : isSavingPost ( )
} ;
} ) ( browser _url _BrowserURL ) ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","primitives"]
var external _wp _primitives _ = _ _webpack _require _ _ ( 7 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var wordpress = Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _primitives _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "-2 -2 24 24"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _primitives _ [ "Path" ] , {
d : "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
} ) ) ;
/* harmony default export */ var library _wordpress = ( wordpress ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/fullscreen-mode-close/index.js
2020-06-26 15:33:47 +02:00
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function FullscreenModeClose ( _ref ) {
var showTooltip = _ref . showTooltip ,
icon = _ref . icon ,
href = _ref . href ;
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getCurrentPostType = _select . getCurrentPostType ;
var _select2 = select ( store [ "a" /* store */ ] ) ,
isFeatureActive = _select2 . isFeatureActive ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _select3 = select ( 'core/data' ) ,
isResolving = _select3 . isResolving ;
var _select4 = select ( 'core' ) ,
getEntityRecord = _select4 . getEntityRecord ,
getPostType = _select4 . getPostType ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var siteData = getEntityRecord ( 'root' , '__unstableBase' , undefined ) || { } ;
return {
isActive : isFeatureActive ( 'fullscreenMode' ) ,
isRequestingSiteIcon : isResolving ( 'core' , 'getEntityRecord' , [ 'root' , '__unstableBase' , undefined ] ) ,
postType : getPostType ( getCurrentPostType ( ) ) ,
siteIconUrl : siteData . site _icon _url
} ;
} , [ ] ) ,
isActive = _useSelect . isActive ,
isRequestingSiteIcon = _useSelect . isRequestingSiteIcon ,
postType = _useSelect . postType ,
siteIconUrl = _useSelect . siteIconUrl ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( ! isActive || ! postType ) {
return null ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var buttonIcon = Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Icon" ] , {
size : "36px" ,
icon : library _wordpress
} ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( siteIconUrl ) {
buttonIcon = Object ( external _wp _element _ [ "createElement" ] ) ( "img" , {
alt : Object ( external _wp _i18n _ [ "__" ] ) ( 'Site Icon' ) ,
className : "edit-post-fullscreen-mode-close_site-icon" ,
src : siteIconUrl
} ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( isRequestingSiteIcon ) {
buttonIcon = null ;
} // Override default icon if custom icon is provided via props.
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( icon ) {
buttonIcon = Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Icon" ] , {
size : "36px" ,
icon : icon
} ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
className : "edit-post-fullscreen-mode-close has-icon" ,
href : href !== null && href !== void 0 ? href : Object ( external _wp _url _ [ "addQueryArgs" ] ) ( 'edit.php' , {
post _type : postType . slug
} ) ,
label : Object ( external _lodash _ [ "get" ] ) ( postType , [ 'labels' , 'view_items' ] , Object ( external _wp _i18n _ [ "__" ] ) ( 'Back' ) ) ,
showTooltip : showTooltip
} , buttonIcon ) ;
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var fullscreen _mode _close = ( FullscreenModeClose ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
2021-02-02 06:17:13 +01:00
var plus = _ _webpack _require _ _ ( 216 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/template-title/index.js
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
function TemplateTitle ( ) {
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select = select ( external _wp _editor _ [ "store" ] ) ,
getEditedPostAttribute = _select . getEditedPostAttribute ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _select2 = select ( external _wp _coreData _ [ "store" ] ) ,
_ _experimentalGetTemplateForLink = _select2 . _ _experimentalGetTemplateForLink ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _select3 = select ( store [ "a" /* store */ ] ) ,
isEditingTemplate = _select3 . isEditingTemplate ;
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
var link = getEditedPostAttribute ( 'link' ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _isEditing = isEditingTemplate ( ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
return {
template : _isEditing ? _ _experimentalGetTemplateForLink ( link ) : null ,
isEditing : _isEditing
} ;
} , [ ] ) ,
template = _useSelect . template ,
isEditing = _useSelect . isEditing ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
if ( ! isEditing || ! template ) {
return null ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "edit-post-template-title"
} ,
/* translators: 1: Template name. */
Object ( external _wp _i18n _ [ "sprintf" ] ) ( Object ( external _wp _i18n _ [ "__" ] ) ( 'Editing template: %s' ) , template . slug ) ) ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var template _title = ( TemplateTitle ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/header-toolbar/index.js
2019-09-19 17:19:18 +02:00
/ * *
* External dependencies
* /
/ * *
2020-06-26 15:33:47 +02:00
* WordPress dependencies
2019-09-19 17:19:18 +02:00
* /
2018-12-17 05:52:00 +01:00
2020-06-26 15:33:47 +02:00
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-10-15 17:37:08 +02:00
* /
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
function HeaderToolbar ( ) {
var inserterButton = Object ( external _wp _element _ [ "useRef" ] ) ( ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
setIsInserterOpened = _useDispatch . setIsInserterOpened ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select = select ( 'core/block-editor' ) ,
hasInserterItems = _select . hasInserterItems ,
getBlockRootClientId = _select . getBlockRootClientId ,
getBlockSelectionEnd = _select . getBlockSelectionEnd ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
return {
hasFixedToolbar : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'fixedToolbar' ) ,
// This setting (richEditingEnabled) should not live in the block editor's setting.
isInserterEnabled : select ( store [ "a" /* store */ ] ) . getEditorMode ( ) === 'visual' && select ( 'core/editor' ) . getEditorSettings ( ) . richEditingEnabled && hasInserterItems ( getBlockRootClientId ( getBlockSelectionEnd ( ) ) ) ,
isInserterOpened : select ( store [ "a" /* store */ ] ) . isInserterOpened ( ) ,
isTextModeEnabled : select ( store [ "a" /* store */ ] ) . getEditorMode ( ) === 'text' ,
previewDeviceType : select ( store [ "a" /* store */ ] ) . _ _experimentalGetPreviewDeviceType ( ) ,
showIconLabels : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'showIconLabels' ) ,
isNavigationTool : select ( 'core/block-editor' ) . isNavigationMode ( ) ,
isTemplateMode : select ( store [ "a" /* store */ ] ) . isEditingTemplate ( )
} ;
} , [ ] ) ,
hasFixedToolbar = _useSelect . hasFixedToolbar ,
isInserterEnabled = _useSelect . isInserterEnabled ,
isInserterOpened = _useSelect . isInserterOpened ,
isTextModeEnabled = _useSelect . isTextModeEnabled ,
previewDeviceType = _useSelect . previewDeviceType ,
showIconLabels = _useSelect . showIconLabels ,
isNavigationTool = _useSelect . isNavigationTool ,
isTemplateMode = _useSelect . isTemplateMode ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var isLargeViewport = Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( 'medium' ) ;
var isWideViewport = Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( 'wide' ) ;
var isSmallViewport = Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( 'small' , '<' ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var _useDispatch2 = Object ( external _wp _data _ [ "useDispatch" ] ) ( 'core/block-editor' ) ,
setNavigationMode = _useDispatch2 . setNavigationMode ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var displayBlockToolbar = ! isLargeViewport || previewDeviceType !== 'Desktop' || hasFixedToolbar ;
var toolbarAriaLabel = displayBlockToolbar ?
/* translators: accessibility text for the editor toolbar when Top Toolbar is on */
Object ( external _wp _i18n _ [ "__" ] ) ( 'Document and block tools' ) :
/* translators: accessibility text for the editor toolbar when Top Toolbar is off */
Object ( external _wp _i18n _ [ "__" ] ) ( 'Document tools' ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var onSwitchMode = function onSwitchMode ( mode ) {
setNavigationMode ( mode === 'edit' ? false : true ) ;
} ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var overflowItems = Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ToolbarItem" ] , {
as : external _wp _editor _ [ "TableOfContents" ] ,
hasOutlineItemsDisabled : isTextModeEnabled ,
repositionDropdown : showIconLabels && ! isWideViewport ,
showTooltip : ! showIconLabels ,
isTertiary : showIconLabels
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ToolbarItem" ] , {
as : external _wp _blockEditor _ [ "BlockNavigationDropdown" ] ,
isDisabled : isTextModeEnabled ,
showTooltip : ! showIconLabels ,
isTertiary : showIconLabels
} ) ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "NavigableToolbar" ] , {
className : "edit-post-header-toolbar" ,
"aria-label" : toolbarAriaLabel
} , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-header-toolbar__left"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ToolbarItem" ] , {
ref : inserterButton ,
as : external _wp _components _ [ "Button" ] ,
className : "edit-post-header-toolbar__inserter-toggle" ,
isPrimary : true ,
isPressed : isInserterOpened ,
onMouseDown : function onMouseDown ( event ) {
event . preventDefault ( ) ;
} ,
onClick : function onClick ( ) {
if ( isInserterOpened ) {
// Focusing the inserter button closes the inserter popover
inserterButton . current . focus ( ) ;
} else {
setIsInserterOpened ( true ) ;
}
} ,
disabled : ! isInserterEnabled ,
icon : plus [ "a" /* default */ ]
/ * t r a n s l a t o r s : b u t t o n l a b e l t e x t s h o u l d , i f p o s s i b l e , b e u n d e r 1 6
characters . * /
,
label : Object ( external _wp _i18n _ [ "_x" ] ) ( 'Add block' , 'Generic label for block inserter button' ) ,
showTooltip : ! showIconLabels
} , showIconLabels && Object ( external _wp _i18n _ [ "__" ] ) ( 'Add' ) ) , ( isWideViewport || ! showIconLabels ) && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , isLargeViewport && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ToolbarItem" ] , {
as : external _wp _blockEditor _ [ "ToolSelector" ] ,
showTooltip : ! showIconLabels ,
isTertiary : showIconLabels ,
disabled : isTextModeEnabled
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ToolbarItem" ] , {
as : external _wp _editor _ [ "EditorHistoryUndo" ] ,
showTooltip : ! showIconLabels ,
isTertiary : showIconLabels
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ToolbarItem" ] , {
as : external _wp _editor _ [ "EditorHistoryRedo" ] ,
showTooltip : ! showIconLabels ,
isTertiary : showIconLabels
} ) , overflowItems ) , ! isWideViewport && ! isSmallViewport && showIconLabels && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "DropdownMenu" ] , {
position : "bottom right" ,
label :
/ * t r a n s l a t o r s : b u t t o n l a b e l t e x t s h o u l d , i f p o s s i b l e , b e u n d e r 1 6
characters . * /
Object ( external _wp _i18n _ [ "__" ] ) ( 'Tools' )
} , function ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-header__dropdown"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuGroup" ] , {
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Modes' )
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItemsChoice" ] , {
value : isNavigationTool ? 'select' : 'edit' ,
onSelect : onSwitchMode ,
choices : [ {
value : 'edit' ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Edit' )
} , {
value : 'select' ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Select' )
} ]
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuGroup" ] , {
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Edit' )
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "EditorHistoryUndo" ] , {
showTooltip : ! showIconLabels ,
isTertiary : showIconLabels
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "EditorHistoryRedo" ] , {
showTooltip : ! showIconLabels ,
isTertiary : showIconLabels
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuGroup" ] , null , overflowItems ) ) ;
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( template _title , null ) , displayBlockToolbar && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : classnames _default ( ) ( 'edit-post-header-toolbar__block-toolbar' , {
'is-pushed-down' : isTemplateMode
} )
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "BlockToolbar" ] , {
hideDragHandle : true
} ) ) ) ;
}
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var header _toolbar = ( HeaderToolbar ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
2021-02-02 06:17:13 +01:00
var more _vertical = _ _webpack _require _ _ ( 311 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/mode-switcher/index.js
2019-10-15 17:37:08 +02:00
2020-02-10 23:33:27 +01:00
2021-01-28 03:04:13 +01:00
function ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2020-01-08 12:57:23 +01:00
/ * *
* WordPress dependencies
* /
2019-09-19 17:19:18 +02:00
2018-12-18 04:14:52 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2018-12-18 04:14:52 +01:00
* /
2018-12-17 05:52:00 +01:00
2021-01-28 03:04:13 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Set of available mode options .
*
* @ type { Array }
2020-01-08 12:57:23 +01:00
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var MODES = [ {
value : 'visual' ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Visual editor' )
} , {
value : 'text' ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Code editor' )
} ] ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
function ModeSwitcher ( ) {
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
2020-01-22 23:06:21 +01:00
return {
2021-01-28 03:04:13 +01:00
shortcut : select ( external _wp _keyboardShortcuts _ [ "store" ] ) . getShortcutRepresentation ( 'core/edit-post/toggle-mode' ) ,
isRichEditingEnabled : select ( 'core/editor' ) . getEditorSettings ( ) . richEditingEnabled ,
isCodeEditingEnabled : select ( 'core/editor' ) . getEditorSettings ( ) . codeEditingEnabled ,
mode : select ( store [ "a" /* store */ ] ) . getEditorMode ( )
2020-01-22 23:06:21 +01:00
} ;
} , [ ] ) ,
shortcut = _useSelect . shortcut ,
2021-01-28 03:04:13 +01:00
isRichEditingEnabled = _useSelect . isRichEditingEnabled ,
isCodeEditingEnabled = _useSelect . isCodeEditingEnabled ,
mode = _useSelect . mode ;
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
switchEditorMode = _useDispatch . switchEditorMode ;
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
if ( ! isRichEditingEnabled || ! isCodeEditingEnabled ) {
return null ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var choices = MODES . map ( function ( choice ) {
if ( choice . value !== mode ) {
return _objectSpread ( _objectSpread ( { } , choice ) , { } , {
shortcut : shortcut
} ) ;
}
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
return choice ;
} ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuGroup" ] , {
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Editor' )
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItemsChoice" ] , {
choices : choices ,
value : mode ,
onSelect : switchEditorMode
} ) ) ;
2020-01-08 12:57:23 +01:00
}
2018-12-17 05:52:00 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var mode _switcher = ( ModeSwitcher ) ;
2018-12-17 05:52:00 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/preferences-menu-item/index.js
2020-01-08 12:57:23 +01:00
2020-01-22 23:06:21 +01:00
/ * *
* WordPress dependencies
* /
2018-12-17 05:52:00 +01:00
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
2021-02-02 06:17:13 +01:00
function PreferencesMenuItem ( ) {
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
openModal = _useDispatch . openModal ;
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItem" ] , {
onClick : function onClick ( ) {
openModal ( 'edit-post/preferences' ) ;
2020-01-22 23:06:21 +01:00
}
2021-01-28 03:04:13 +01:00
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Preferences' ) ) ;
2020-01-22 23:06:21 +01:00
}
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
2021-02-02 06:17:13 +01:00
var check = _ _webpack _require _ _ ( 161 ) ;
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/feature-toggle/index.js
/ * *
* External dependencies
* /
2018-12-17 05:52:00 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-17 05:52:00 +01:00
2021-01-28 03:04:13 +01:00
2018-12-17 05:52:00 +01:00
2018-12-14 05:53:54 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
function FeatureToggle ( _ref ) {
var onToggle = _ref . onToggle ,
isActive = _ref . isActive ,
label = _ref . label ,
info = _ref . info ,
messageActivated = _ref . messageActivated ,
messageDeactivated = _ref . messageDeactivated ,
shortcut = _ref . shortcut ;
var speakMessage = function speakMessage ( ) {
if ( isActive ) {
Object ( external _wp _a11y _ [ "speak" ] ) ( messageDeactivated || Object ( external _wp _i18n _ [ "__" ] ) ( 'Feature deactivated' ) ) ;
} else {
Object ( external _wp _a11y _ [ "speak" ] ) ( messageActivated || Object ( external _wp _i18n _ [ "__" ] ) ( 'Feature activated' ) ) ;
}
} ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItem" ] , {
icon : isActive && check [ "a" /* default */ ] ,
isSelected : isActive ,
onClick : Object ( external _lodash _ [ "flow" ] ) ( onToggle , speakMessage ) ,
role : "menuitemcheckbox" ,
info : info ,
shortcut : shortcut
} , label ) ;
}
/* harmony default export */ var feature _toggle = ( Object ( external _wp _compose _ [ "compose" ] ) ( [ Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select , _ref2 ) {
var feature = _ref2 . feature ;
return {
isActive : select ( store [ "a" /* store */ ] ) . isFeatureActive ( feature )
} ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , ownProps ) {
return {
onToggle : function onToggle ( ) {
dispatch ( store [ "a" /* store */ ] ) . toggleFeature ( ownProps . feature ) ;
}
} ;
} ) ] ) ( FeatureToggle ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/writing-menu/index.js
2020-01-22 23:06:21 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
function WritingMenu ( ) {
var isLargeViewport = Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( 'medium' ) ;
if ( ! isLargeViewport ) {
return null ;
}
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuGroup" ] , {
label : Object ( external _wp _i18n _ [ "_x" ] ) ( 'View' , 'noun' )
} , Object ( external _wp _element _ [ "createElement" ] ) ( feature _toggle , {
feature : "fixedToolbar" ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Top toolbar' ) ,
info : Object ( external _wp _i18n _ [ "__" ] ) ( 'Access all block and document tools in a single place' ) ,
messageActivated : Object ( external _wp _i18n _ [ "__" ] ) ( 'Top toolbar activated' ) ,
messageDeactivated : Object ( external _wp _i18n _ [ "__" ] ) ( 'Top toolbar deactivated' )
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( feature _toggle , {
feature : "focusMode" ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Spotlight mode' ) ,
info : Object ( external _wp _i18n _ [ "__" ] ) ( 'Focus on one block at a time' ) ,
messageActivated : Object ( external _wp _i18n _ [ "__" ] ) ( 'Spotlight mode activated' ) ,
messageDeactivated : Object ( external _wp _i18n _ [ "__" ] ) ( 'Spotlight mode deactivated' )
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( feature _toggle , {
feature : "fullscreenMode" ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Fullscreen mode' ) ,
info : Object ( external _wp _i18n _ [ "__" ] ) ( 'Work without distraction' ) ,
messageActivated : Object ( external _wp _i18n _ [ "__" ] ) ( 'Fullscreen mode activated' ) ,
messageDeactivated : Object ( external _wp _i18n _ [ "__" ] ) ( 'Fullscreen mode deactivated' ) ,
shortcut : external _wp _keycodes _ [ "displayShortcut" ] . secondary ( 'f' )
2020-01-22 23:06:21 +01:00
} ) ) ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var writing _menu = ( WritingMenu ) ;
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/more-menu/index.js
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
function more _menu _ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
function more _menu _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { more _menu _ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { more _menu _ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
2020-01-22 23:06:21 +01:00
/ * *
* Internal dependencies
* /
2019-10-15 17:37:08 +02:00
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
var POPOVER _PROPS = {
className : 'edit-post-more-menu__content' ,
position : 'bottom left'
} ;
var TOGGLE _PROPS = {
tooltipPosition : 'bottom'
} ;
var more _menu _MoreMenu = function MoreMenu ( _ref ) {
var showIconLabels = _ref . showIconLabels ;
var isLargeViewport = Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( 'large' ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "DropdownMenu" ] , {
className : "edit-post-more-menu" ,
icon : more _vertical [ "a" /* default */ ]
/* translators: button label text should, if possible, be under 16 characters. */
,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Options' ) ,
popoverProps : POPOVER _PROPS ,
toggleProps : more _menu _objectSpread ( {
showTooltip : ! showIconLabels ,
isTertiary : showIconLabels
} , TOGGLE _PROPS )
} , function ( _ref2 ) {
var onClose = _ref2 . onClose ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , showIconLabels && ! isLargeViewport && Object ( external _wp _element _ [ "createElement" ] ) ( build _module [ "f" /* PinnedItems */ ] . Slot , {
className : showIconLabels && 'show-icon-labels' ,
scope : "core/edit-post"
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( writing _menu , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( mode _switcher , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( build _module [ "a" /* ActionItem */ ] . Slot , {
name : "core/edit-post/plugin-more-menu" ,
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'Plugins' ) ,
as : [ external _wp _components _ [ "MenuGroup" ] , external _wp _components _ [ "MenuItem" ] ] ,
fillProps : {
onClick : onClose
}
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( tools _more _menu _group . Slot , {
fillProps : {
onClose : onClose
}
2021-02-02 06:17:13 +01:00
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuGroup" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( PreferencesMenuItem , null ) ) ) ;
2021-01-28 03:04:13 +01:00
} ) ;
} ;
/* harmony default export */ var more _menu = ( more _menu _MoreMenu ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/post-publish-button-or-toggle.js
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
function PostPublishButtonOrToggle ( _ref ) {
var forceIsDirty = _ref . forceIsDirty ,
forceIsSaving = _ref . forceIsSaving ,
hasPublishAction = _ref . hasPublishAction ,
isBeingScheduled = _ref . isBeingScheduled ,
isPending = _ref . isPending ,
isPublished = _ref . isPublished ,
isPublishSidebarEnabled = _ref . isPublishSidebarEnabled ,
isPublishSidebarOpened = _ref . isPublishSidebarOpened ,
isScheduled = _ref . isScheduled ,
togglePublishSidebar = _ref . togglePublishSidebar ,
setEntitiesSavedStatesCallback = _ref . setEntitiesSavedStatesCallback ;
var IS _TOGGLE = 'toggle' ;
var IS _BUTTON = 'button' ;
var isSmallerThanMediumViewport = Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( 'medium' , '<' ) ;
var component ;
/ * *
* Conditions to show a BUTTON ( publish directly ) or a TOGGLE ( open publish sidebar ) :
*
* 1 ) We want to show a BUTTON when the post status is at the _final stage _
* for a particular role ( see https : //wordpress.org/support/article/post-status/):
*
* - is published
* - is scheduled to be published
* - is pending and can ' t be published ( but only for viewports >= medium ) .
* Originally , we considered showing a button for pending posts that couldn ' t be published
* ( for example , for an author with the contributor role ) . Some languages can have
* long translations for "Submit for review" , so given the lack of UI real estate available
* we decided to take into account the viewport in that case .
* See : https : //github.com/WordPress/gutenberg/issues/10475
*
* 2 ) Then , in small viewports , we ' ll show a TOGGLE .
*
* 3 ) Finally , we ' ll use the publish sidebar status to decide :
*
* - if it is enabled , we show a TOGGLE
* - if it is disabled , we show a BUTTON
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
if ( isPublished || isScheduled && isBeingScheduled || isPending && ! hasPublishAction && ! isSmallerThanMediumViewport ) {
component = IS _BUTTON ;
} else if ( isSmallerThanMediumViewport ) {
component = IS _TOGGLE ;
} else if ( isPublishSidebarEnabled ) {
component = IS _TOGGLE ;
} else {
component = IS _BUTTON ;
2020-01-22 23:06:21 +01:00
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostPublishButton" ] , {
forceIsDirty : forceIsDirty ,
forceIsSaving : forceIsSaving ,
isOpen : isPublishSidebarOpened ,
isToggle : component === IS _TOGGLE ,
onToggle : togglePublishSidebar ,
setEntitiesSavedStatesCallback : setEntitiesSavedStatesCallback
2020-01-22 23:06:21 +01:00
} ) ;
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var post _publish _button _or _toggle = ( Object ( external _wp _compose _ [ "compose" ] ) ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
hasPublishAction : Object ( external _lodash _ [ "get" ] ) ( select ( 'core/editor' ) . getCurrentPost ( ) , [ '_links' , 'wp:action-publish' ] , false ) ,
isBeingScheduled : select ( 'core/editor' ) . isEditedPostBeingScheduled ( ) ,
isPending : select ( 'core/editor' ) . isCurrentPostPending ( ) ,
isPublished : select ( 'core/editor' ) . isCurrentPostPublished ( ) ,
isPublishSidebarEnabled : select ( 'core/editor' ) . isPublishSidebarEnabled ( ) ,
isPublishSidebarOpened : select ( store [ "a" /* store */ ] ) . isPublishSidebarOpened ( ) ,
isScheduled : select ( 'core/editor' ) . isCurrentPostScheduled ( )
} ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( store [ "a" /* store */ ] ) ,
togglePublishSidebar = _dispatch . togglePublishSidebar ;
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
return {
togglePublishSidebar : togglePublishSidebar
} ;
} ) ) ( PostPublishButtonOrToggle ) ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/device-preview/index.js
2018-12-14 05:41:57 +01:00
/ * *
* WordPress dependencies
* /
2019-10-15 17:37:08 +02:00
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
2021-01-28 03:04:13 +01:00
function DevicePreview ( ) {
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
hasActiveMetaboxes : select ( store [ "a" /* store */ ] ) . hasMetaBoxes ( ) ,
isSaving : select ( store [ "a" /* store */ ] ) . isSavingMetaBoxes ( ) ,
isPostSaveable : select ( 'core/editor' ) . isEditedPostSaveable ( ) ,
deviceType : select ( store [ "a" /* store */ ] ) . _ _experimentalGetPreviewDeviceType ( )
} ;
} , [ ] ) ,
hasActiveMetaboxes = _useSelect . hasActiveMetaboxes ,
isPostSaveable = _useSelect . isPostSaveable ,
isSaving = _useSelect . isSaving ,
deviceType = _useSelect . deviceType ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
setPreviewDeviceType = _useDispatch . _ _experimentalSetPreviewDeviceType ;
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "__experimentalPreviewOptions" ] , {
isEnabled : isPostSaveable ,
className : "edit-post-post-preview-dropdown" ,
deviceType : deviceType ,
setDeviceType : setPreviewDeviceType
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuGroup" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-header-preview__grouping-external"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostPreviewButton" ] , {
className : 'edit-post-header-preview__button-external' ,
role : "menuitem" ,
forceIsAutosaveable : hasActiveMetaboxes ,
forcePreviewLink : isSaving ? null : undefined ,
textContent : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _i18n _ [ "__" ] ) ( 'Preview in new tab' ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Icon" ] , {
icon : external [ "a" /* default */ ]
2020-01-08 12:57:23 +01:00
} ) )
2021-01-28 03:04:13 +01:00
} ) ) ) ) ;
2020-01-08 12:57:23 +01:00
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/main-dashboard-button/index.js
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var slotName = '__experimentalMainDashboardButton' ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var main _dashboard _button _createSlotFill = Object ( external _wp _components _ [ "createSlotFill" ] ) ( slotName ) ,
Fill = main _dashboard _button _createSlotFill . Fill ,
MainDashboardButtonSlot = main _dashboard _button _createSlotFill . Slot ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var MainDashboardButton = Fill ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var main _dashboard _button _Slot = function Slot ( _ref ) {
var children = _ref . children ;
var slot = Object ( external _wp _components _ [ "__experimentalUseSlot" ] ) ( slotName ) ;
var hasFills = Boolean ( slot . fills && slot . fills . length ) ;
if ( ! hasFills ) {
return children ;
}
return Object ( external _wp _element _ [ "createElement" ] ) ( MainDashboardButtonSlot , {
bubblesVirtually : true
} ) ;
} ;
MainDashboardButton . Slot = main _dashboard _button _Slot ;
/* harmony default export */ var main _dashboard _button = ( MainDashboardButton ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-publish-panel/index.js
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var plugin _post _publish _panel _createSlotFill = Object ( external _wp _components _ [ "createSlotFill" ] ) ( 'PluginPostPublishPanel' ) ,
plugin _post _publish _panel _Fill = plugin _post _publish _panel _createSlotFill . Fill ,
plugin _post _publish _panel _Slot = plugin _post _publish _panel _createSlotFill . Slot ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var plugin _post _publish _panel _PluginPostPublishPanelFill = function PluginPostPublishPanelFill ( _ref ) {
var children = _ref . children ,
className = _ref . className ,
title = _ref . title ,
_ref$initialOpen = _ref . initialOpen ,
initialOpen = _ref$initialOpen === void 0 ? false : _ref$initialOpen ,
icon = _ref . icon ;
return Object ( external _wp _element _ [ "createElement" ] ) ( plugin _post _publish _panel _Fill , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelBody" ] , {
className : className ,
initialOpen : initialOpen || ! title ,
title : title ,
icon : icon
} , children ) ) ;
} ;
2018-12-18 04:14:52 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Renders provided content to the post - publish panel in the publish flow
* ( side panel that opens after a user publishes the post ) .
*
* @ param { Object } props Component properties .
* @ param { string } [ props . className ] An optional class name added to the panel .
* @ param { string } [ props . title ] Title displayed at the top of the panel .
* @ param { boolean } [ props . initialOpen = false ] Whether to have the panel initially opened . When no title is provided it is always opened .
* @ param { WPBlockTypeIconRender } [ props . icon = inherits from the plugin ] The [ Dashicon ] ( https : //developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
*
* @ example
* < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
* var PluginPostPublishPanel = wp . editPost . PluginPostPublishPanel ;
*
* function MyPluginPostPublishPanel ( ) {
* return wp . element . createElement (
* PluginPostPublishPanel ,
* {
* className : 'my-plugin-post-publish-panel' ,
* title : _ _ ( 'My panel title' ) ,
* initialOpen : true ,
* } ,
* _ _ ( 'My panel content' )
* ) ;
* }
* ` ` `
*
* @ example
* < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
* import { _ _ } from '@wordpress/i18n' ;
* import { PluginPostPublishPanel } from '@wordpress/edit-post' ;
*
* const MyPluginPostPublishPanel = ( ) => (
* < PluginPostPublishPanel
* className = "my-plugin-post-publish-panel"
* title = { _ _ ( 'My panel title' ) }
* initialOpen = { true }
* >
* { _ _ ( 'My panel content' ) }
* < / P l u g i n P o s t P u b l i s h P a n e l >
* ) ;
* ` ` `
*
* @ return { WPComponent } The component to be rendered .
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:41:57 +01:00
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
var PluginPostPublishPanel = Object ( external _wp _compose _ [ "compose" ] ) ( Object ( external _wp _plugins _ [ "withPluginContext" ] ) ( function ( context , ownProps ) {
return {
icon : ownProps . icon || context . icon
} ;
} ) ) ( plugin _post _publish _panel _PluginPostPublishPanelFill ) ;
PluginPostPublishPanel . Slot = plugin _post _publish _panel _Slot ;
/* harmony default export */ var plugin _post _publish _panel = ( PluginPostPublishPanel ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-pre-publish-panel/index.js
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-18 04:14:52 +01:00
2018-12-14 05:53:54 +01:00
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var plugin _pre _publish _panel _createSlotFill = Object ( external _wp _components _ [ "createSlotFill" ] ) ( 'PluginPrePublishPanel' ) ,
plugin _pre _publish _panel _Fill = plugin _pre _publish _panel _createSlotFill . Fill ,
plugin _pre _publish _panel _Slot = plugin _pre _publish _panel _createSlotFill . Slot ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var plugin _pre _publish _panel _PluginPrePublishPanelFill = function PluginPrePublishPanelFill ( _ref ) {
var children = _ref . children ,
className = _ref . className ,
title = _ref . title ,
_ref$initialOpen = _ref . initialOpen ,
initialOpen = _ref$initialOpen === void 0 ? false : _ref$initialOpen ,
icon = _ref . icon ;
return Object ( external _wp _element _ [ "createElement" ] ) ( plugin _pre _publish _panel _Fill , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelBody" ] , {
className : className ,
initialOpen : initialOpen || ! title ,
title : title ,
icon : icon
} , children ) ) ;
} ;
/ * *
* Renders provided content to the pre - publish side panel in the publish flow
* ( side panel that opens when a user first pushes "Publish" from the main editor ) .
*
* @ param { Object } props Component props .
* @ param { string } [ props . className ] An optional class name added to the panel .
* @ param { string } [ props . title ] Title displayed at the top of the panel .
* @ param { boolean } [ props . initialOpen = false ] Whether to have the panel initially opened .
* When no title is provided it is always opened .
* @ param { WPBlockTypeIconRender } [ props . icon = inherits from the plugin ] The [ Dashicon ] ( https : //developer.wordpress.org/resource/dashicons/)
* icon slug string , or an SVG WP element , to be rendered when
* the sidebar is pinned to toolbar .
*
* @ example
* < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
* var PluginPrePublishPanel = wp . editPost . PluginPrePublishPanel ;
*
* function MyPluginPrePublishPanel ( ) {
* return wp . element . createElement (
* PluginPrePublishPanel ,
* {
* className : 'my-plugin-pre-publish-panel' ,
* title : _ _ ( 'My panel title' ) ,
* initialOpen : true ,
* } ,
* _ _ ( 'My panel content' )
* ) ;
* }
* ` ` `
*
* @ example
* < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
* import { _ _ } from '@wordpress/i18n' ;
* import { PluginPrePublishPanel } from '@wordpress/edit-post' ;
*
* const MyPluginPrePublishPanel = ( ) => (
* < PluginPrePublishPanel
* className = "my-plugin-pre-publish-panel"
* title = { _ _ ( 'My panel title' ) }
* initialOpen = { true }
* >
* { _ _ ( 'My panel content' ) }
* < / P l u g i n P r e P u b l i s h P a n e l >
* ) ;
* ` ` `
*
* @ return { WPComponent } The component to be rendered .
* /
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var PluginPrePublishPanel = Object ( external _wp _compose _ [ "compose" ] ) ( Object ( external _wp _plugins _ [ "withPluginContext" ] ) ( function ( context , ownProps ) {
2019-09-19 17:19:18 +02:00
return {
2021-01-28 03:04:13 +01:00
icon : ownProps . icon || context . icon
2020-01-08 12:57:23 +01:00
} ;
2021-01-28 03:04:13 +01:00
} ) ) ( plugin _pre _publish _panel _PluginPrePublishPanelFill ) ;
PluginPrePublishPanel . Slot = plugin _pre _publish _panel _Slot ;
/* harmony default export */ var plugin _pre _publish _panel = ( PluginPrePublishPanel ) ;
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/actions-panel.js
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
/ * *
* WordPress dependencies
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
/ * *
* Internal dependencies
* /
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var actions _panel _createSlotFill = Object ( external _wp _components _ [ "createSlotFill" ] ) ( 'ActionsPanel' ) ,
actions _panel _Fill = actions _panel _createSlotFill . Fill ,
actions _panel _Slot = actions _panel _createSlotFill . Slot ;
var ActionsPanelFill = actions _panel _Fill ;
function ActionsPanel ( _ref ) {
var setEntitiesSavedStatesCallback = _ref . setEntitiesSavedStatesCallback ,
closeEntitiesSavedStates = _ref . closeEntitiesSavedStates ,
isEntitiesSavedStatesOpen = _ref . isEntitiesSavedStatesOpen ;
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
closePublishSidebar = _useDispatch . closePublishSidebar ,
togglePublishSidebar = _useDispatch . togglePublishSidebar ;
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
publishSidebarOpened : select ( store [ "a" /* store */ ] ) . isPublishSidebarOpened ( ) ,
hasActiveMetaboxes : select ( store [ "a" /* store */ ] ) . hasMetaBoxes ( ) ,
isSavingMetaBoxes : select ( store [ "a" /* store */ ] ) . isSavingMetaBoxes ( ) ,
hasNonPostEntityChanges : select ( 'core/editor' ) . hasNonPostEntityChanges ( )
} ;
} , [ ] ) ,
publishSidebarOpened = _useSelect . publishSidebarOpened ,
hasActiveMetaboxes = _useSelect . hasActiveMetaboxes ,
isSavingMetaBoxes = _useSelect . isSavingMetaBoxes ,
hasNonPostEntityChanges = _useSelect . hasNonPostEntityChanges ;
var openEntitiesSavedStates = Object ( external _wp _element _ [ "useCallback" ] ) ( function ( ) {
return setEntitiesSavedStatesCallback ( true ) ;
} , [ ] ) ; // It is ok for these components to be unmounted when not in visual use.
// We don't want more than one present at a time, decide which to render.
var unmountableContent ;
if ( publishSidebarOpened ) {
unmountableContent = Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostPublishPanel" ] , {
onClose : closePublishSidebar ,
forceIsDirty : hasActiveMetaboxes ,
forceIsSaving : isSavingMetaBoxes ,
PrePublishExtension : plugin _pre _publish _panel . Slot ,
PostPublishExtension : plugin _post _publish _panel . Slot
} ) ;
} else if ( hasNonPostEntityChanges ) {
unmountableContent = Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-layout__toggle-entities-saved-states-panel"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
isSecondary : true ,
className : "edit-post-layout__toggle-entities-saved-states-panel-button" ,
onClick : openEntitiesSavedStates ,
"aria-expanded" : false
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Open save panel' ) ) ) ;
} else {
unmountableContent = Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-layout__toggle-publish-panel"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
isSecondary : true ,
className : "edit-post-layout__toggle-publish-panel-button" ,
onClick : togglePublishSidebar ,
"aria-expanded" : false
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Open publish panel' ) ) ) ;
} // Since EntitiesSavedStates controls its own panel, we can keep it
// always mounted to retain its own component state (such as checkboxes).
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "EntitiesSavedStates" ] , {
isOpen : isEntitiesSavedStatesOpen ,
close : closeEntitiesSavedStates
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( actions _panel _Slot , {
bubblesVirtually : true
} ) , ! isEntitiesSavedStatesOpen && unmountableContent ) ;
}
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/template-save-button/index.js
2018-12-14 05:41:57 +01:00
/ * *
* WordPress dependencies
* /
2020-01-08 12:57:23 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2020-01-08 12:57:23 +01:00
* /
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
function TemplateSaveButton ( ) {
var _useState = Object ( external _wp _element _ [ "useState" ] ) ( false ) ,
_useState2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _useState , 2 ) ,
isEntitiesReviewPanelOpen = _useState2 [ 0 ] ,
setIsEntitiesReviewPanelOpen = _useState2 [ 1 ] ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
setIsEditingTemplate = _useDispatch . setIsEditingTemplate ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
onClick : function onClick ( ) {
return setIsEditingTemplate ( false ) ;
} ,
isTertiary : true
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Cancel' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
isPrimary : true ,
onClick : function onClick ( ) {
return setIsEntitiesReviewPanelOpen ( true ) ;
} ,
"aria-expanded" : isEntitiesReviewPanelOpen
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Apply' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( ActionsPanelFill , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "EntitiesSavedStates" ] , {
isOpen : isEntitiesReviewPanelOpen ,
close : function close ( entities ) {
setIsEntitiesReviewPanelOpen ( false ) ;
if ( entities !== null && entities !== void 0 && entities . length ) {
setIsEditingTemplate ( false ) ;
}
}
} ) ) ) ;
}
2018-12-19 04:16:48 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var template _save _button = ( TemplateSaveButton ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/index.js
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* External dependencies
* /
2018-12-14 05:41:57 +01:00
/ * *
2018-12-18 04:14:52 +01:00
* WordPress dependencies
2018-12-14 05:41:57 +01:00
* /
2021-01-28 03:04:13 +01:00
2020-06-26 15:33:47 +02:00
/ * *
* Internal dependencies
* /
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
function Header ( _ref ) {
var setEntitiesSavedStatesCallback = _ref . setEntitiesSavedStatesCallback ;
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
hasActiveMetaboxes : select ( store [ "a" /* store */ ] ) . hasMetaBoxes ( ) ,
isPublishSidebarOpened : select ( store [ "a" /* store */ ] ) . isPublishSidebarOpened ( ) ,
isSaving : select ( store [ "a" /* store */ ] ) . isSavingMetaBoxes ( ) ,
showIconLabels : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'showIconLabels' ) ,
hasReducedUI : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'reducedUI' ) ,
isEditingTemplate : select ( store [ "a" /* store */ ] ) . isEditingTemplate ( )
} ;
} , [ ] ) ,
hasActiveMetaboxes = _useSelect . hasActiveMetaboxes ,
isPublishSidebarOpened = _useSelect . isPublishSidebarOpened ,
isSaving = _useSelect . isSaving ,
showIconLabels = _useSelect . showIconLabels ,
hasReducedUI = _useSelect . hasReducedUI ,
isEditingTemplate = _useSelect . isEditingTemplate ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var isLargeViewport = Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( 'large' ) ;
var classes = classnames _default ( ) ( 'edit-post-header' , {
'has-reduced-ui' : hasReducedUI
} ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : classes
} , Object ( external _wp _element _ [ "createElement" ] ) ( main _dashboard _button . Slot , null , Object ( external _wp _element _ [ "createElement" ] ) ( fullscreen _mode _close , null ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-header__toolbar"
} , Object ( external _wp _element _ [ "createElement" ] ) ( header _toolbar , null ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-header__settings"
} , ! isEditingTemplate && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , ! isPublishSidebarOpened && // This button isn't completely hidden by the publish sidebar.
// We can't hide the whole toolbar when the publish sidebar is open because
// we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.
// We track that DOM node to return focus to the PostPublishButtonOrToggle
// when the publish sidebar has been closed.
Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostSavedState" ] , {
forceIsDirty : hasActiveMetaboxes ,
forceIsSaving : isSaving ,
showIconLabels : showIconLabels
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( DevicePreview , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostPreviewButton" ] , {
forceIsAutosaveable : hasActiveMetaboxes ,
forcePreviewLink : isSaving ? null : undefined
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _publish _button _or _toggle , {
forceIsDirty : hasActiveMetaboxes ,
forceIsSaving : isSaving ,
setEntitiesSavedStatesCallback : setEntitiesSavedStatesCallback
} ) ) , isEditingTemplate && Object ( external _wp _element _ [ "createElement" ] ) ( template _save _button , null ) , ( isLargeViewport || ! showIconLabels ) && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( build _module [ "f" /* PinnedItems */ ] . Slot , {
scope : "core/edit-post"
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( more _menu , {
showIconLabels : showIconLabels
} ) ) , showIconLabels && ! isLargeViewport && Object ( external _wp _element _ [ "createElement" ] ) ( more _menu , {
showIconLabels : showIconLabels
} ) ) ) ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var header = ( Header ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cog.js
2020-01-08 12:57:23 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var cog = Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _primitives _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _primitives _ [ "Path" ] , {
fillRule : "evenodd" ,
d : "M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z" ,
clipRule : "evenodd"
} ) ) ;
/* harmony default export */ var library _cog = ( cog ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/settings-header/index.js
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var settings _header _SettingsHeader = function SettingsHeader ( _ref ) {
var sidebarName = _ref . sidebarName ;
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
openGeneralSidebar = _useDispatch . openGeneralSidebar ;
var openDocumentSettings = function openDocumentSettings ( ) {
return openGeneralSidebar ( 'edit-post/document' ) ;
2020-01-08 12:57:23 +01:00
} ;
2021-01-28 03:04:13 +01:00
var openBlockSettings = function openBlockSettings ( ) {
return openGeneralSidebar ( 'edit-post/block' ) ;
} ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var documentLabel = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _postType$labels$sing , _postType$labels ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var currentPostType = select ( 'core/editor' ) . getCurrentPostType ( ) ;
var postType = select ( 'core' ) . getPostType ( currentPostType ) ;
return ( // Disable reason: Post type labels object is shaped like this.
// eslint-disable-next-line camelcase
( _postType$labels$sing = postType === null || postType === void 0 ? void 0 : ( _postType$labels = postType . labels ) === null || _postType$labels === void 0 ? void 0 : _postType$labels . singular _name ) !== null && _postType$labels$sing !== void 0 ? _postType$labels$sing : // translators: Default label for the Document sidebar tab, not selected.
Object ( external _wp _i18n _ [ "__" ] ) ( 'Document' )
) ;
} ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _ref2 = sidebarName === 'edit-post/document' ? // translators: ARIA label for the Document sidebar tab, selected. %s: Document label.
[ Object ( external _wp _i18n _ [ "sprintf" ] ) ( Object ( external _wp _i18n _ [ "__" ] ) ( '%s (selected)' ) , documentLabel ) , 'is-active' ] : [ documentLabel , '' ] ,
_ref3 = Object ( slicedToArray [ "a" /* default */ ] ) ( _ref2 , 2 ) ,
documentAriaLabel = _ref3 [ 0 ] ,
documentActiveClass = _ref3 [ 1 ] ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _ref4 = sidebarName === 'edit-post/block' ? // translators: ARIA label for the Block Settings Sidebar tab, selected.
[ Object ( external _wp _i18n _ [ "__" ] ) ( 'Block (selected)' ) , 'is-active' ] : // translators: ARIA label for the Block Settings Sidebar tab, not selected.
[ Object ( external _wp _i18n _ [ "__" ] ) ( 'Block' ) , '' ] ,
_ref5 = Object ( slicedToArray [ "a" /* default */ ] ) ( _ref4 , 2 ) ,
blockAriaLabel = _ref5 [ 0 ] ,
blockActiveClass = _ref5 [ 1 ] ;
/* Use a list so screen readers will announce how many tabs there are. */
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( "ul" , null , Object ( external _wp _element _ [ "createElement" ] ) ( "li" , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
onClick : openDocumentSettings ,
className : "edit-post-sidebar__panel-tab " . concat ( documentActiveClass ) ,
"aria-label" : documentAriaLabel ,
"data-label" : documentLabel
} , documentLabel ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "li" , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
onClick : openBlockSettings ,
className : "edit-post-sidebar__panel-tab " . concat ( blockActiveClass ) ,
"aria-label" : blockAriaLabel // translators: Data label for the Block Settings Sidebar tab.
,
"data-label" : Object ( external _wp _i18n _ [ "__" ] ) ( 'Block' )
} , // translators: Text label for the Block Settings Sidebar tab.
Object ( external _wp _i18n _ [ "__" ] ) ( 'Block' ) ) ) ) ;
} ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var settings _header = ( settings _header _SettingsHeader ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-visibility/index.js
2019-10-15 17:37:08 +02:00
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2020-01-08 12:57:23 +01:00
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function PostVisibility ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostVisibilityCheck" ] , {
render : function render ( _ref ) {
var canEdit = _ref . canEdit ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , {
className : "edit-post-post-visibility"
} , Object ( external _wp _element _ [ "createElement" ] ) ( "span" , null , Object ( external _wp _i18n _ [ "__" ] ) ( 'Visibility' ) ) , ! canEdit && Object ( external _wp _element _ [ "createElement" ] ) ( "span" , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostVisibilityLabel" ] , null ) ) , canEdit && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Dropdown" ] , {
position : "bottom left" ,
contentClassName : "edit-post-post-visibility__dialog" ,
renderToggle : function renderToggle ( _ref2 ) {
var isOpen = _ref2 . isOpen ,
onToggle = _ref2 . onToggle ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
"aria-expanded" : isOpen ,
className : "edit-post-post-visibility__toggle" ,
onClick : onToggle ,
isTertiary : true
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostVisibilityLabel" ] , null ) ) ;
} ,
renderContent : function renderContent ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostVisibility" ] , null ) ;
}
} ) ) ;
}
} ) ;
2020-01-08 12:57:23 +01:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var post _visibility = ( PostVisibility ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-trash/index.js
2018-12-14 05:41:57 +01:00
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function PostTrash ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTrashCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTrash" ] , null ) ) ) ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-schedule/index.js
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function PostSchedule ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostScheduleCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , {
className : "edit-post-post-schedule"
} , Object ( external _wp _element _ [ "createElement" ] ) ( "span" , null , Object ( external _wp _i18n _ [ "__" ] ) ( 'Publish' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Dropdown" ] , {
position : "bottom left" ,
contentClassName : "edit-post-post-schedule__dialog" ,
renderToggle : function renderToggle ( _ref ) {
var onToggle = _ref . onToggle ,
isOpen = _ref . isOpen ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
className : "edit-post-post-schedule__toggle" ,
onClick : onToggle ,
"aria-expanded" : isOpen ,
isTertiary : true
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostScheduleLabel" ] , null ) ) ) ;
} ,
renderContent : function renderContent ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostSchedule" ] , null ) ;
2020-01-08 12:57:23 +01:00
}
2021-01-28 03:04:13 +01:00
} ) ) ) ;
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var post _schedule = ( PostSchedule ) ;
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-sticky/index.js
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
function PostSticky ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostStickyCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostSticky" ] , null ) ) ) ;
}
/* harmony default export */ var post _sticky = ( PostSticky ) ;
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-author/index.js
2020-06-26 15:33:47 +02:00
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* WordPress dependencies
2019-09-19 17:19:18 +02:00
* /
2019-03-21 13:48:00 +01:00
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
function PostAuthor ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostAuthorCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostAuthor" ] , null ) ) ) ;
}
/* harmony default export */ var post _author = ( PostAuthor ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-slug/index.js
2019-09-19 17:19:18 +02:00
2019-03-21 13:48:00 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-03-21 13:48:00 +01:00
* /
2021-01-28 03:04:13 +01:00
function PostSlug ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostSlugCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostSlug" ] , null ) ) ) ;
2020-01-08 12:57:23 +01:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var post _slug = ( PostSlug ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-format/index.js
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-09-19 17:19:18 +02:00
* /
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
function PostFormat ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostFormatCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostFormat" ] , null ) ) ) ;
2020-01-08 12:57:23 +01:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var post _format = ( PostFormat ) ;
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-pending-status/index.js
2020-06-26 15:33:47 +02:00
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
function PostPendingStatus ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostPendingStatusCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostPendingStatus" ] , null ) ) ) ;
}
/* harmony default export */ var post _pending _status = ( PostPendingStatus ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-status-info/index.js
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Defines as extensibility slot for the Status & visibility panel .
* /
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
var plugin _post _status _info _createSlotFill = Object ( external _wp _components _ [ "createSlotFill" ] ) ( 'PluginPostStatusInfo' ) ,
plugin _post _status _info _Fill = plugin _post _status _info _createSlotFill . Fill ,
plugin _post _status _info _Slot = plugin _post _status _info _createSlotFill . Slot ;
/ * *
* Renders a row in the Status & visibility panel of the Document sidebar .
* It should be noted that this is named and implemented around the function it serves
* and not its location , which may change in future iterations .
*
* @ param { Object } props Component properties .
* @ param { string } [ props . className ] An optional class name added to the row .
* @ param { WPElement } props . children Children to be rendered .
*
* @ example
* < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
* var PluginPostStatusInfo = wp . editPost . PluginPostStatusInfo ;
*
* function MyPluginPostStatusInfo ( ) {
* return wp . element . createElement (
* PluginPostStatusInfo ,
* {
* className : 'my-plugin-post-status-info' ,
* } ,
* _ _ ( 'My post status info' )
* )
* }
* ` ` `
*
* @ example
* < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
* import { _ _ } from '@wordpress/i18n' ;
* import { PluginPostStatusInfo } from '@wordpress/edit-post' ;
*
* const MyPluginPostStatusInfo = ( ) => (
* < PluginPostStatusInfo
* className = "my-plugin-post-status-info"
* >
* { _ _ ( 'My post status info' ) }
* < / P l u g i n P o s t S t a t u s I n f o >
* ) ;
* ` ` `
*
* @ return { WPComponent } The component to be rendered .
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
var plugin _post _status _info _PluginPostStatusInfo = function PluginPostStatusInfo ( _ref ) {
var children = _ref . children ,
className = _ref . className ;
return Object ( external _wp _element _ [ "createElement" ] ) ( plugin _post _status _info _Fill , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , {
className : className
} , children ) ) ;
} ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
plugin _post _status _info _PluginPostStatusInfo . Slot = plugin _post _status _info _Slot ;
/* harmony default export */ var plugin _post _status _info = ( plugin _post _status _info _PluginPostStatusInfo ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-template/index.js
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2019-03-21 13:48:00 +01:00
2020-02-10 23:33:27 +01:00
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
function PostTemplate ( ) {
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _getPostType$viewable , _getPostType ;
2020-03-10 15:53:18 +01:00
2021-01-28 03:04:13 +01:00
var _select = select ( external _wp _editor _ [ "store" ] ) ,
getEditedPostAttribute = _select . getEditedPostAttribute ,
getCurrentPostType = _select . getCurrentPostType ,
getCurrentPost = _select . getCurrentPost ;
2020-03-10 15:53:18 +01:00
2021-01-28 03:04:13 +01:00
var _select2 = select ( external _wp _coreData _ [ "store" ] ) ,
_ _experimentalGetTemplateForLink = _select2 . _ _experimentalGetTemplateForLink ,
getPostType = _select2 . getPostType ;
2020-03-10 15:53:18 +01:00
2021-01-28 03:04:13 +01:00
var _select3 = select ( store [ "a" /* store */ ] ) ,
isEditingTemplate = _select3 . isEditingTemplate ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
var link = getEditedPostAttribute ( 'link' ) ;
var isFSEEnabled = select ( external _wp _editor _ [ "store" ] ) . getEditorSettings ( ) . isFSETheme ;
var isViewable = ( _getPostType$viewable = ( _getPostType = getPostType ( getCurrentPostType ( ) ) ) === null || _getPostType === void 0 ? void 0 : _getPostType . viewable ) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false ;
2020-03-10 15:53:18 +01:00
return {
2021-01-28 03:04:13 +01:00
template : isFSEEnabled && isViewable && link && getCurrentPost ( ) . status !== 'auto-draft' ? _ _experimentalGetTemplateForLink ( link ) : null ,
isEditing : isEditingTemplate ( ) ,
isFSETheme : isFSEEnabled
2020-03-10 15:53:18 +01:00
} ;
} , [ ] ) ,
2021-01-28 03:04:13 +01:00
template = _useSelect . template ,
isEditing = _useSelect . isEditing ,
isFSETheme = _useSelect . isFSETheme ;
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
setIsEditingTemplate = _useDispatch . setIsEditingTemplate ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var _useDispatch2 = Object ( external _wp _data _ [ "useDispatch" ] ) ( external _wp _notices _ [ "store" ] ) ,
createSuccessNotice = _useDispatch2 . createSuccessNotice ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
if ( ! isFSETheme || ! template ) {
return null ;
2020-10-13 15:10:30 +02:00
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , {
className : "edit-post-post-template"
} , Object ( external _wp _element _ [ "createElement" ] ) ( "span" , null , Object ( external _wp _i18n _ [ "__" ] ) ( 'Template' ) ) , ! isEditing && Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "edit-post-post-template__value"
} , Object ( external _wp _element _ [ "createInterpolateElement" ] ) ( Object ( external _wp _i18n _ [ "sprintf" ] ) (
/* translators: 1: Template name. */
Object ( external _wp _i18n _ [ "__" ] ) ( '%s (<a>Edit</a>)' ) , template . slug ) , {
a : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
isLink : true ,
onClick : function onClick ( ) {
setIsEditingTemplate ( true ) ;
createSuccessNotice ( Object ( external _wp _i18n _ [ "__" ] ) ( 'Editing template. Changes made here affect all posts and pages that use the template.' ) , {
type : 'snackbar'
} ) ;
}
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Edit' ) )
} ) ) , isEditing && Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "edit-post-post-template__value"
} , template . slug ) ) ;
2020-01-08 12:57:23 +01:00
}
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var post _template = ( PostTemplate ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-status/index.js
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2019-03-21 13:48:00 +01:00
2020-06-26 15:33:47 +02:00
2020-08-10 16:18:33 +02:00
2019-10-15 17:37:08 +02:00
2020-02-06 22:03:31 +01:00
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Module Constants
2020-01-08 12:57:23 +01:00
* /
2021-01-28 03:04:13 +01:00
var PANEL _NAME = 'post-status' ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
function PostStatus ( _ref ) {
var isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelBody" ] , {
className : "edit-post-post-status" ,
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Status & visibility' ) ,
opened : isOpened ,
onToggle : onTogglePanel
} , Object ( external _wp _element _ [ "createElement" ] ) ( plugin _post _status _info . Slot , null , function ( fills ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( post _template , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _visibility , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _schedule , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _format , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _sticky , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _pending _status , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _slug , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _author , null ) , fills , Object ( external _wp _element _ [ "createElement" ] ) ( PostTrash , null ) ) ;
2020-01-08 12:57:23 +01:00
} ) ) ;
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var post _status = ( Object ( external _wp _compose _ [ "compose" ] ) ( [ Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do
// not use isEditorPanelEnabled since this panel should not be disabled through the UI.
var _select = select ( store [ "a" /* store */ ] ) ,
isEditorPanelRemoved = _select . isEditorPanelRemoved ,
isEditorPanelOpened = _select . isEditorPanelOpened ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
return {
isRemoved : isEditorPanelRemoved ( PANEL _NAME ) ,
isOpened : isEditorPanelOpened ( PANEL _NAME )
} ;
} ) , Object ( external _wp _compose _ [ "ifCondition" ] ) ( function ( _ref2 ) {
var isRemoved = _ref2 . isRemoved ;
return ! isRemoved ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
return {
onTogglePanel : function onTogglePanel ( ) {
return dispatch ( store [ "a" /* store */ ] ) . toggleEditorPanelOpened ( PANEL _NAME ) ;
}
} ;
} ) ] ) ( PostStatus ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/last-revision/index.js
2019-09-19 17:19:18 +02:00
2018-12-14 12:02:53 +01:00
2020-01-08 12:57:23 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 12:02:53 +01:00
2021-01-28 03:04:13 +01:00
function LastRevision ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostLastRevisionCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelBody" ] , {
className : "edit-post-last-revision__panel"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostLastRevision" ] , null ) ) ) ;
2020-01-08 12:57:23 +01:00
}
2018-12-14 12:02:53 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var last _revision = ( LastRevision ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* External dependencies
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2019-10-15 17:37:08 +02:00
2020-02-06 22:03:31 +01:00
2021-01-28 03:04:13 +01:00
function TaxonomyPanel ( _ref ) {
var isEnabled = _ref . isEnabled ,
taxonomy = _ref . taxonomy ,
isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ,
children = _ref . children ;
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
if ( ! isEnabled ) {
return null ;
}
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var taxonomyMenuName = Object ( external _lodash _ [ "get" ] ) ( taxonomy , [ 'labels' , 'menu_name' ] ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
if ( ! taxonomyMenuName ) {
return null ;
}
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelBody" ] , {
title : taxonomyMenuName ,
opened : isOpened ,
onToggle : onTogglePanel
} , children ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var taxonomy _panel = ( Object ( external _wp _compose _ [ "compose" ] ) ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select , ownProps ) {
var slug = Object ( external _lodash _ [ "get" ] ) ( ownProps . taxonomy , [ 'slug' ] ) ;
var panelName = slug ? "taxonomy-panel-" . concat ( slug ) : '' ;
2019-10-15 17:37:08 +02:00
return {
2021-01-28 03:04:13 +01:00
panelName : panelName ,
isEnabled : slug ? select ( store [ "a" /* store */ ] ) . isEditorPanelEnabled ( panelName ) : false ,
isOpened : slug ? select ( store [ "a" /* store */ ] ) . isEditorPanelOpened ( panelName ) : false
2019-10-15 17:37:08 +02:00
} ;
2021-01-28 03:04:13 +01:00
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , ownProps ) {
2020-01-08 12:57:23 +01:00
return {
2021-01-28 03:04:13 +01:00
onTogglePanel : function onTogglePanel ( ) {
dispatch ( store [ "a" /* store */ ] ) . toggleEditorPanelOpened ( ownProps . panelName ) ;
2020-01-08 12:57:23 +01:00
}
} ;
2021-01-28 03:04:13 +01:00
} ) ) ( TaxonomyPanel ) ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-taxonomies/index.js
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
function PostTaxonomies ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTaxonomiesCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTaxonomies" ] , {
taxonomyWrapper : function taxonomyWrapper ( content , taxonomy ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( taxonomy _panel , {
taxonomy : taxonomy
} , content ) ;
}
2019-10-15 17:37:08 +02:00
} ) ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var post _taxonomies = ( PostTaxonomies ) ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/featured-image/index.js
2020-10-13 15:10:30 +02:00
2018-12-14 05:41:57 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2018-12-14 05:41:57 +01:00
* /
2020-01-08 12:57:23 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-01-08 12:57:23 +01:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2020-01-08 12:57:23 +01:00
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Module Constants
2019-10-15 17:37:08 +02:00
* /
2021-01-28 03:04:13 +01:00
var featured _image _PANEL _NAME = 'featured-image' ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
function FeaturedImage ( _ref ) {
var isEnabled = _ref . isEnabled ,
isOpened = _ref . isOpened ,
postType = _ref . postType ,
onTogglePanel = _ref . onTogglePanel ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
if ( ! isEnabled ) {
return null ;
2019-10-15 17:37:08 +02:00
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostFeaturedImageCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelBody" ] , {
title : Object ( external _lodash _ [ "get" ] ) ( postType , [ 'labels' , 'featured_image' ] , Object ( external _wp _i18n _ [ "__" ] ) ( 'Featured image' ) ) ,
opened : isOpened ,
onToggle : onTogglePanel
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostFeaturedImage" ] , null ) ) ) ;
2020-01-08 12:57:23 +01:00
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var applyWithSelect = Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getEditedPostAttribute = _select . getEditedPostAttribute ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _select2 = select ( 'core' ) ,
getPostType = _select2 . getPostType ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var _select3 = select ( store [ "a" /* store */ ] ) ,
isEditorPanelEnabled = _select3 . isEditorPanelEnabled ,
isEditorPanelOpened = _select3 . isEditorPanelOpened ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
return {
postType : getPostType ( getEditedPostAttribute ( 'type' ) ) ,
isEnabled : isEditorPanelEnabled ( featured _image _PANEL _NAME ) ,
isOpened : isEditorPanelOpened ( featured _image _PANEL _NAME )
} ;
} ) ;
var applyWithDispatch = Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( store [ "a" /* store */ ] ) ,
toggleEditorPanelOpened = _dispatch . toggleEditorPanelOpened ;
return {
onTogglePanel : Object ( external _lodash _ [ "partial" ] ) ( toggleEditorPanelOpened , featured _image _PANEL _NAME )
} ;
} ) ;
/* harmony default export */ var featured _image = ( Object ( external _wp _compose _ [ "compose" ] ) ( applyWithSelect , applyWithDispatch ) ( FeaturedImage ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-excerpt/index.js
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
2018-12-18 04:14:52 +01:00
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Module Constants
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var post _excerpt _PANEL _NAME = 'post-excerpt' ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function PostExcerpt ( _ref ) {
var isEnabled = _ref . isEnabled ,
isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
if ( ! isEnabled ) {
return null ;
}
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostExcerptCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelBody" ] , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Excerpt' ) ,
opened : isOpened ,
onToggle : onTogglePanel
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostExcerpt" ] , null ) ) ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var post _excerpt = ( Object ( external _wp _compose _ [ "compose" ] ) ( [ Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
isEnabled : select ( store [ "a" /* store */ ] ) . isEditorPanelEnabled ( post _excerpt _PANEL _NAME ) ,
isOpened : select ( store [ "a" /* store */ ] ) . isEditorPanelOpened ( post _excerpt _PANEL _NAME )
} ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
return {
onTogglePanel : function onTogglePanel ( ) {
return dispatch ( store [ "a" /* store */ ] ) . toggleEditorPanelOpened ( post _excerpt _PANEL _NAME ) ;
}
} ;
} ) ] ) ( PostExcerpt ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-link/index.js
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* External dependencies
* /
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2019-03-07 10:09:59 +01:00
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2018-12-18 04:14:52 +01:00
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* Module Constants
* /
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
var post _link _PANEL _NAME = 'post-link' ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
function PostLink ( _ref ) {
var isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ,
isEditable = _ref . isEditable ,
postLink = _ref . postLink ,
permalinkPrefix = _ref . permalinkPrefix ,
permalinkSuffix = _ref . permalinkSuffix ,
editPermalink = _ref . editPermalink ,
forceEmptyField = _ref . forceEmptyField ,
setState = _ref . setState ,
postSlug = _ref . postSlug ,
postTypeLabel = _ref . postTypeLabel ;
var prefixElement , postNameElement , suffixElement ;
2020-10-13 15:10:30 +02:00
2021-01-28 03:04:13 +01:00
if ( isEditable ) {
prefixElement = permalinkPrefix && Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "edit-post-post-link__link-prefix"
} , permalinkPrefix ) ;
postNameElement = postSlug && Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "edit-post-post-link__link-post-name"
} , postSlug ) ;
suffixElement = permalinkSuffix && Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "edit-post-post-link__link-suffix"
} , permalinkSuffix ) ;
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelBody" ] , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Permalink' ) ,
opened : isOpened ,
onToggle : onTogglePanel
} , isEditable && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "editor-post-link"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "TextControl" ] , {
label : Object ( external _wp _i18n _ [ "__" ] ) ( 'URL Slug' ) ,
value : forceEmptyField ? '' : postSlug ,
onChange : function onChange ( newValue ) {
editPermalink ( newValue ) ; // When we delete the field the permalink gets
// reverted to the original value.
// The forceEmptyField logic allows the user to have
// the field temporarily empty while typing.
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
if ( ! newValue ) {
if ( ! forceEmptyField ) {
setState ( {
forceEmptyField : true
} ) ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( forceEmptyField ) {
setState ( {
forceEmptyField : false
} ) ;
}
} ,
onBlur : function onBlur ( event ) {
editPermalink ( Object ( external _wp _editor _ [ "cleanForSlug" ] ) ( event . target . value ) ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
if ( forceEmptyField ) {
setState ( {
forceEmptyField : false
} ) ;
}
}
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( "p" , null , Object ( external _wp _i18n _ [ "__" ] ) ( 'The last part of the URL.' ) , ' ' , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ExternalLink" ] , {
href : "https://wordpress.org/support/article/writing-posts/#post-field-descriptions"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Read about permalinks' ) ) ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "h3" , {
className : "edit-post-post-link__preview-label"
} , postTypeLabel || Object ( external _wp _i18n _ [ "__" ] ) ( 'View post' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-post-link__preview-link-container"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ExternalLink" ] , {
className : "edit-post-post-link__link" ,
href : postLink ,
target : "_blank"
} , isEditable ? Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , prefixElement , postNameElement , suffixElement ) : postLink ) ) ) ;
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var post _link = ( Object ( external _wp _compose _ [ "compose" ] ) ( [ Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
isPermalinkEditable = _select . isPermalinkEditable ,
getCurrentPost = _select . getCurrentPost ,
isCurrentPostPublished = _select . isCurrentPostPublished ,
getPermalinkParts = _select . getPermalinkParts ,
getEditedPostAttribute = _select . getEditedPostAttribute ,
getEditedPostSlug = _select . getEditedPostSlug ;
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
2021-01-28 03:04:13 +01:00
var _select2 = select ( store [ "a" /* store */ ] ) ,
isEditorPanelEnabled = _select2 . isEditorPanelEnabled ,
isEditorPanelOpened = _select2 . isEditorPanelOpened ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _select3 = select ( 'core' ) ,
getPostType = _select3 . getPostType ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _getCurrentPost = getCurrentPost ( ) ,
link = _getCurrentPost . link ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var postTypeName = getEditedPostAttribute ( 'type' ) ;
var postType = getPostType ( postTypeName ) ;
var permalinkParts = getPermalinkParts ( ) ;
return {
postLink : link ,
isEditable : isPermalinkEditable ( ) ,
isPublished : isCurrentPostPublished ( ) ,
isOpened : isEditorPanelOpened ( post _link _PANEL _NAME ) ,
isEnabled : isEditorPanelEnabled ( post _link _PANEL _NAME ) ,
isViewable : Object ( external _lodash _ [ "get" ] ) ( postType , [ 'viewable' ] , false ) ,
postSlug : Object ( external _wp _url _ [ "safeDecodeURIComponent" ] ) ( getEditedPostSlug ( ) ) ,
postTypeLabel : Object ( external _lodash _ [ "get" ] ) ( postType , [ 'labels' , 'view_item' ] ) ,
hasPermalinkParts : ! ! permalinkParts ,
permalinkPrefix : permalinkParts === null || permalinkParts === void 0 ? void 0 : permalinkParts . prefix ,
permalinkSuffix : permalinkParts === null || permalinkParts === void 0 ? void 0 : permalinkParts . suffix
} ;
} ) , Object ( external _wp _compose _ [ "ifCondition" ] ) ( function ( _ref2 ) {
var isEnabled = _ref2 . isEnabled ,
postLink = _ref2 . postLink ,
isViewable = _ref2 . isViewable ,
hasPermalinkParts = _ref2 . hasPermalinkParts ;
return isEnabled && postLink && isViewable && hasPermalinkParts ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( store [ "a" /* store */ ] ) ,
toggleEditorPanelOpened = _dispatch . toggleEditorPanelOpened ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _dispatch2 = dispatch ( 'core/editor' ) ,
editPost = _dispatch2 . editPost ;
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
2021-01-28 03:04:13 +01:00
return {
onTogglePanel : function onTogglePanel ( ) {
return toggleEditorPanelOpened ( post _link _PANEL _NAME ) ;
} ,
editPermalink : function editPermalink ( newSlug ) {
editPost ( {
slug : newSlug
} ) ;
2019-10-15 17:37:08 +02:00
}
2021-01-28 03:04:13 +01:00
} ;
} ) , Object ( external _wp _compose _ [ "withState" ] ) ( {
forceEmptyField : false
} ) ] ) ( PostLink ) ) ;
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/discussion-panel/index.js
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
2018-12-18 04:14:52 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* WordPress dependencies
2018-12-18 04:14:52 +01:00
* /
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-19 04:16:48 +01:00
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Module Constants
* /
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var discussion _panel _PANEL _NAME = 'discussion-panel' ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function DiscussionPanel ( _ref ) {
var isEnabled = _ref . isEnabled ,
isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
if ( ! isEnabled ) {
return null ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTypeSupportCheck" ] , {
supportKeys : [ 'comments' , 'trackbacks' ]
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelBody" ] , {
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Discussion' ) ,
opened : isOpened ,
onToggle : onTogglePanel
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTypeSupportCheck" ] , {
supportKeys : "comments"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostComments" ] , null ) ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostTypeSupportCheck" ] , {
supportKeys : "trackbacks"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostPingbacks" ] , null ) ) ) ) ) ;
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var discussion _panel = ( Object ( external _wp _compose _ [ "compose" ] ) ( [ Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
isEnabled : select ( store [ "a" /* store */ ] ) . isEditorPanelEnabled ( discussion _panel _PANEL _NAME ) ,
isOpened : select ( store [ "a" /* store */ ] ) . isEditorPanelOpened ( discussion _panel _PANEL _NAME )
} ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
return {
onTogglePanel : function onTogglePanel ( ) {
return dispatch ( store [ "a" /* store */ ] ) . toggleEditorPanelOpened ( discussion _panel _PANEL _NAME ) ;
}
} ;
} ) ] ) ( DiscussionPanel ) ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/page-attributes/index.js
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* External dependencies
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
2020-01-08 12:57:23 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2020-01-08 12:57:23 +01:00
* /
2021-01-28 03:04:13 +01:00
/ * *
* Module Constants
* /
var page _attributes _PANEL _NAME = 'page-attributes' ;
function PageAttributes ( _ref ) {
var isEnabled = _ref . isEnabled ,
isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ,
postType = _ref . postType ;
if ( ! isEnabled || ! postType ) {
return null ;
}
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PageAttributesCheck" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelBody" ] , {
title : Object ( external _lodash _ [ "get" ] ) ( postType , [ 'labels' , 'attributes' ] , Object ( external _wp _i18n _ [ "__" ] ) ( 'Page attributes' ) ) ,
opened : isOpened ,
onToggle : onTogglePanel
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PageTemplate" ] , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PageAttributesParent" ] , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "PanelRow" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PageAttributesOrder" ] , null ) ) ) ) ;
2020-01-08 12:57:23 +01:00
}
2021-01-28 03:04:13 +01:00
var page _attributes _applyWithSelect = Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getEditedPostAttribute = _select . getEditedPostAttribute ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var _select2 = select ( store [ "a" /* store */ ] ) ,
isEditorPanelEnabled = _select2 . isEditorPanelEnabled ,
isEditorPanelOpened = _select2 . isEditorPanelOpened ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var _select3 = select ( 'core' ) ,
getPostType = _select3 . getPostType ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
return {
isEnabled : isEditorPanelEnabled ( page _attributes _PANEL _NAME ) ,
isOpened : isEditorPanelOpened ( page _attributes _PANEL _NAME ) ,
postType : getPostType ( getEditedPostAttribute ( 'type' ) )
} ;
} ) ;
var page _attributes _applyWithDispatch = Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( store [ "a" /* store */ ] ) ,
toggleEditorPanelOpened = _dispatch . toggleEditorPanelOpened ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
return {
onTogglePanel : Object ( external _lodash _ [ "partial" ] ) ( toggleEditorPanelOpened , page _attributes _PANEL _NAME )
} ;
} ) ;
/* harmony default export */ var page _attributes = ( Object ( external _wp _compose _ [ "compose" ] ) ( page _attributes _applyWithSelect , page _attributes _applyWithDispatch ) ( PageAttributes ) ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = _ _webpack _require _ _ ( 18 ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-boxes-area/index.js
2018-12-18 04:14:52 +01:00
2019-03-07 10:09:59 +01:00
2018-12-18 04:14:52 +01:00
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
function meta _boxes _area _createSuper ( Derived ) { var hasNativeReflectConstruct = meta _boxes _area _isNativeReflectConstruct ( ) ; return function _createSuperInternal ( ) { var Super = Object ( getPrototypeOf [ "a" /* default */ ] ) ( Derived ) , result ; if ( hasNativeReflectConstruct ) { var NewTarget = Object ( getPrototypeOf [ "a" /* default */ ] ) ( this ) . constructor ; result = Reflect . construct ( Super , arguments , NewTarget ) ; } else { result = Super . apply ( this , arguments ) ; } return Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , result ) ; } ; }
function meta _boxes _area _isNativeReflectConstruct ( ) { if ( typeof Reflect === "undefined" || ! Reflect . construct ) return false ; if ( Reflect . construct . sham ) return false ; if ( typeof Proxy === "function" ) return true ; try { Date . prototype . toString . call ( Reflect . construct ( Date , [ ] , function ( ) { } ) ) ; return true ; } catch ( e ) { return false ; } }
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-10-15 17:37:08 +02:00
* /
2019-03-21 13:48:00 +01:00
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var meta _boxes _area _MetaBoxesArea = /*#__PURE__*/ function ( _Component ) {
Object ( inherits [ "a" /* default */ ] ) ( MetaBoxesArea , _Component ) ;
var _super = meta _boxes _area _createSuper ( MetaBoxesArea ) ;
/ * *
* @ inheritdoc
* /
function MetaBoxesArea ( ) {
var _this ;
Object ( classCallCheck [ "a" /* default */ ] ) ( this , MetaBoxesArea ) ;
_this = _super . apply ( this , arguments ) ;
_this . bindContainerNode = _this . bindContainerNode . bind ( Object ( assertThisInitialized [ "a" /* default */ ] ) ( _this ) ) ;
return _this ;
}
/ * *
* @ inheritdoc
* /
Object ( createClass [ "a" /* default */ ] ) ( MetaBoxesArea , [ {
key : "componentDidMount" ,
value : function componentDidMount ( ) {
this . form = document . querySelector ( '.metabox-location-' + this . props . location ) ;
if ( this . form ) {
this . container . appendChild ( this . form ) ;
}
}
/ * *
* Get the meta box location form from the original location .
* /
} , {
key : "componentWillUnmount" ,
value : function componentWillUnmount ( ) {
if ( this . form ) {
document . querySelector ( '#metaboxes' ) . appendChild ( this . form ) ;
}
}
/ * *
* Binds the metabox area container node .
*
* @ param { Element } node DOM Node .
* /
} , {
key : "bindContainerNode" ,
value : function bindContainerNode ( node ) {
this . container = node ;
}
/ * *
* @ inheritdoc
* /
} , {
key : "render" ,
value : function render ( ) {
var _this$props = this . props ,
location = _this$props . location ,
isSaving = _this$props . isSaving ;
var classes = classnames _default ( ) ( 'edit-post-meta-boxes-area' , "is-" . concat ( location ) , {
'is-loading' : isSaving
} ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : classes
} , isSaving && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Spinner" ] , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-meta-boxes-area__container" ,
ref : this . bindContainerNode
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-meta-boxes-area__clear"
} ) ) ;
}
} ] ) ;
return MetaBoxesArea ;
} ( external _wp _element _ [ "Component" ] ) ;
/* harmony default export */ var meta _boxes _area = ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
isSaving : select ( store [ "a" /* store */ ] ) . isSavingMetaBoxes ( )
} ;
} ) ( meta _boxes _area _MetaBoxesArea ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-box-visibility.js
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function meta _box _visibility _createSuper ( Derived ) { var hasNativeReflectConstruct = meta _box _visibility _isNativeReflectConstruct ( ) ; return function _createSuperInternal ( ) { var Super = Object ( getPrototypeOf [ "a" /* default */ ] ) ( Derived ) , result ; if ( hasNativeReflectConstruct ) { var NewTarget = Object ( getPrototypeOf [ "a" /* default */ ] ) ( this ) . constructor ; result = Reflect . construct ( Super , arguments , NewTarget ) ; } else { result = Super . apply ( this , arguments ) ; } return Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , result ) ; } ; }
function meta _box _visibility _isNativeReflectConstruct ( ) { if ( typeof Reflect === "undefined" || ! Reflect . construct ) return false ; if ( Reflect . construct . sham ) return false ; if ( typeof Proxy === "function" ) return true ; try { Date . prototype . toString . call ( Reflect . construct ( Date , [ ] , function ( ) { } ) ) ; return true ; } catch ( e ) { return false ; } }
2018-12-14 05:41:57 +01:00
/ * *
* WordPress dependencies
* /
/ * *
2018-12-18 04:14:52 +01:00
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
2021-01-28 03:04:13 +01:00
var meta _box _visibility _MetaBoxVisibility = /*#__PURE__*/ function ( _Component ) {
Object ( inherits [ "a" /* default */ ] ) ( MetaBoxVisibility , _Component ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var _super = meta _box _visibility _createSuper ( MetaBoxVisibility ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
function MetaBoxVisibility ( ) {
Object ( classCallCheck [ "a" /* default */ ] ) ( this , MetaBoxVisibility ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
return _super . apply ( this , arguments ) ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
Object ( createClass [ "a" /* default */ ] ) ( MetaBoxVisibility , [ {
key : "componentDidMount" ,
value : function componentDidMount ( ) {
this . updateDOM ( ) ;
}
} , {
key : "componentDidUpdate" ,
value : function componentDidUpdate ( prevProps ) {
if ( this . props . isVisible !== prevProps . isVisible ) {
this . updateDOM ( ) ;
}
}
} , {
key : "updateDOM" ,
value : function updateDOM ( ) {
var _this$props = this . props ,
id = _this$props . id ,
isVisible = _this$props . isVisible ;
var element = document . getElementById ( id ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
if ( ! element ) {
return ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
if ( isVisible ) {
element . classList . remove ( 'is-hidden' ) ;
} else {
element . classList . add ( 'is-hidden' ) ;
}
}
} , {
key : "render" ,
value : function render ( ) {
return null ;
}
} ] ) ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
return MetaBoxVisibility ;
} ( external _wp _element _ [ "Component" ] ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var meta _box _visibility = ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select , _ref ) {
var id = _ref . id ;
2019-10-15 17:37:08 +02:00
return {
2021-01-28 03:04:13 +01:00
isVisible : select ( store [ "a" /* store */ ] ) . isEditorPanelEnabled ( "meta-box-" . concat ( id ) )
2019-10-15 17:37:08 +02:00
} ;
2021-01-28 03:04:13 +01:00
} ) ( meta _box _visibility _MetaBoxVisibility ) ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/index.js
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* External dependencies
* /
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function MetaBoxes ( _ref ) {
var location = _ref . location ,
isVisible = _ref . isVisible ,
metaBoxes = _ref . metaBoxes ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _lodash _ [ "map" ] ) ( metaBoxes , function ( _ref2 ) {
var id = _ref2 . id ;
return Object ( external _wp _element _ [ "createElement" ] ) ( meta _box _visibility , {
key : id ,
id : id
} ) ;
} ) , isVisible && Object ( external _wp _element _ [ "createElement" ] ) ( meta _boxes _area , {
location : location
} ) ) ;
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var meta _boxes = ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select , _ref3 ) {
var location = _ref3 . location ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var _select = select ( store [ "a" /* store */ ] ) ,
isMetaBoxLocationVisible = _select . isMetaBoxLocationVisible ,
getMetaBoxesPerLocation = _select . getMetaBoxesPerLocation ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
return {
2021-01-28 03:04:13 +01:00
metaBoxes : getMetaBoxesPerLocation ( location ) ,
isVisible : isMetaBoxLocationVisible ( location )
2019-10-15 17:37:08 +02:00
} ;
2021-01-28 03:04:13 +01:00
} ) ( MetaBoxes ) ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-document-setting-panel/index.js
2021-02-02 06:17:13 +01:00
var plugin _document _setting _panel = _ _webpack _require _ _ ( 171 ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-sidebar/index.js
2019-10-15 17:37:08 +02:00
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* WordPress dependencies
2018-12-14 05:41:57 +01:00
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Renders a sidebar when activated . The contents within the ` PluginSidebar ` will appear as content within the sidebar .
* If you wish to display the sidebar , you can with use the ` PluginSidebarMoreMenuItem ` component or the ` wp.data.dispatch ` API :
*
* ` ` ` js
* wp . data . dispatch ( 'core/edit-post' ) . openGeneralSidebar ( 'plugin-name/sidebar-name' ) ;
* ` ` `
*
* @ see PluginSidebarMoreMenuItem
*
* @ param { Object } props Element props .
* @ param { string } props . name A string identifying the sidebar . Must be unique for every sidebar registered within the scope of your plugin .
* @ param { string } [ props . className ] An optional class name added to the sidebar body .
* @ param { string } props . title Title displayed at the top of the sidebar .
* @ param { boolean } [ props . isPinnable = true ] Whether to allow to pin sidebar to toolbar .
* @ param { WPBlockTypeIconRender } [ props . icon = inherits from the plugin ] The [ Dashicon ] ( https : //developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
*
* @ example
* < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
* var el = wp . element . createElement ;
* var PanelBody = wp . components . PanelBody ;
* var PluginSidebar = wp . editPost . PluginSidebar ;
* var moreIcon = wp . element . createElement ( 'svg' ) ; //... svg element.
*
* function MyPluginSidebar ( ) {
* return el (
* PluginSidebar ,
* {
* name : 'my-sidebar' ,
* title : 'My sidebar title' ,
* icon : moreIcon ,
* } ,
* el (
* PanelBody ,
* { } ,
* _ _ ( 'My sidebar content' )
* )
* ) ;
* }
* ` ` `
*
* @ example
* < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
* import { _ _ } from '@wordpress/i18n' ;
* import { PanelBody } from '@wordpress/components' ;
* import { PluginSidebar } from '@wordpress/edit-post' ;
* import { more } from '@wordpress/icons' ;
*
* const MyPluginSidebar = ( ) => (
* < PluginSidebar
* name = "my-sidebar"
* title = "My sidebar title"
* icon = { more }
* >
* < PanelBody >
* { _ _ ( 'My sidebar content' ) }
* < / P a n e l B o d y >
* < / P l u g i n S i d e b a r >
* ) ;
* ` ` `
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function PluginSidebarEditPost ( _ref ) {
var className = _ref . className ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "className" ] ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
postTitle : select ( 'core/editor' ) . getEditedPostAttribute ( 'title' ) ,
shortcut : select ( external _wp _keyboardShortcuts _ [ "store" ] ) . getShortcutRepresentation ( 'core/edit-post/toggle-sidebar' ) ,
showIconLabels : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'showIconLabels' )
} ;
} ) ,
postTitle = _useSelect . postTitle ,
shortcut = _useSelect . shortcut ,
showIconLabels = _useSelect . showIconLabels ;
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( build _module [ "b" /* ComplementaryArea */ ] , Object ( esm _extends [ "a" /* default */ ] ) ( {
panelClassName : className ,
className : "edit-post-sidebar" ,
smallScreenTitle : postTitle || Object ( external _wp _i18n _ [ "__" ] ) ( '(no title)' ) ,
scope : "core/edit-post" ,
toggleShortcut : shortcut ,
showIconLabels : showIconLabels
} , props ) ) ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/settings-sidebar/index.js
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* WordPress dependencies
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
2018-12-14 05:41:57 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
2018-12-18 04:14:52 +01:00
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
2018-12-14 05:53:54 +01:00
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var SIDEBAR _ACTIVE _BY _DEFAULT = external _wp _element _ [ "Platform" ] . select ( {
web : true ,
native : false
} ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var settings _sidebar _SettingsSidebar = function SettingsSidebar ( ) {
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
// The settings sidebar is used by the edit-post/document and edit-post/block sidebars.
// sidebarName represents the sidebar that is active or that should be active when the SettingsSidebar toggle button is pressed.
// If one of the two sidebars is active the component will contain the content of that sidebar.
// When neither of the the two sidebars is active we can not simply return null, because the PluginSidebarEditPost
// component, besides being used to render the sidebar, also renders the toggle button. In that case sidebarName
// should contain the sidebar that will be active when the toggle button is pressed. If a block
// is selected, that should be edit-post/block otherwise it's edit-post/document.
var sidebar = select ( build _module [ "g" /* store */ ] ) . getActiveComplementaryArea ( store [ "a" /* store */ ] . name ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
if ( ! [ 'edit-post/document' , 'edit-post/block' ] . includes ( sidebar ) ) {
if ( select ( 'core/block-editor' ) . getBlockSelectionStart ( ) ) {
sidebar = 'edit-post/block' ;
2019-10-15 17:37:08 +02:00
}
2021-01-28 03:04:13 +01:00
sidebar = 'edit-post/document' ;
2019-10-15 17:37:08 +02:00
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var shortcut = select ( external _wp _keyboardShortcuts _ [ "store" ] ) . getShortcutRepresentation ( 'core/edit-post/toggle-sidebar' ) ;
return {
sidebarName : sidebar ,
keyboardShortcut : shortcut
} ;
} , [ ] ) ,
sidebarName = _useSelect . sidebarName ,
keyboardShortcut = _useSelect . keyboardShortcut ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( PluginSidebarEditPost , {
identifier : sidebarName ,
header : Object ( external _wp _element _ [ "createElement" ] ) ( settings _header , {
sidebarName : sidebarName
} ) ,
closeLabel : Object ( external _wp _i18n _ [ "__" ] ) ( 'Close settings' ) ,
headerClassName : "edit-post-sidebar__panel-tabs"
/* translators: button label text should, if possible, be under 16 characters. */
,
title : Object ( external _wp _i18n _ [ "__" ] ) ( 'Settings' ) ,
toggleShortcut : keyboardShortcut ,
icon : library _cog ,
isActiveByDefault : SIDEBAR _ACTIVE _BY _DEFAULT
} , sidebarName === 'edit-post/document' && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( post _status , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( plugin _document _setting _panel [ "a" /* default */ ] . Slot , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( last _revision , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _link , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _taxonomies , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( featured _image , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( post _excerpt , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( discussion _panel , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( page _attributes , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( meta _boxes , {
location : "side"
} ) ) , sidebarName === 'edit-post/block' && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "BlockInspector" ] , null ) ) ;
} ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var settings _sidebar = ( settings _sidebar _SettingsSidebar ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/images.js
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
var images _CanvasImage = function CanvasImage ( props ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
className : "edit-post-welcome-guide__image edit-post-welcome-guide__image__prm-np" ,
alt : "" ,
src : " data : image / gif ; base64 , R0lGODlhcALgAfYAAOfn58PDw //+/9zc3ODg4IqKiujo6N3d3erq6uTk5N7e3jExMURERGFhYdnZ2dXV1dDQ0M/Pz/f39wAAAOzs7FNTU25ubrS0tOLi4uPj4wwMDPn5+fz8/P///xsbG319fe7u7qioqJiYmP39/fHx8fX19ePh4OXj4ReXwRmWwACg0A+ax/T//+7//wCh1gCg0tze3f/+/Mrt+P/9++nh3wCg1K3q/kOpyuX//wOf0P3//xmXvrnq+fn//xOZwyOexiajyb7s/AubyVeow9f7/2a2z5DW7uH//5ro/kW12gaezf/9/f///c34/wCi1iSSuGrM663j93rM6LH4/+r//xGcyKHb7p/c7v/+/e/t7Pjv7e7l5JXe9lK93Taqz2DE5N3d36j0//T2+N3e2/P192u/2+Dc3BebxY3O4xmfytfv+eDr7uDq8NTh5cHo87/o9cvj7GrS9XfT8IHa98Pn89Lf5JbK3Eihvvr3+Nze39ne4HnV8f38///7+//7/gAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0MzUyLCAyMDIwLzAxLzMwLTE1OjUwOjM4ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMSAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NUNDQ0Q2Rjg3RTQxMUVBODRBODkxOUNBOEEwNEI0RiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NUNDQ0Q3MDg3RTQxMUVBODRBODkxOUNBOEEwNEI0RiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU1Q0NDRDZEODdFNDExRUE4NEE4OTE5Q0E4QTA0QjRGIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU1Q0NDRDZFODdFNDExRUE4NEE4OTE5Q0E4QTA0QjRGIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEBQQAAAAsAAAAAHAC4AEAB/+AL4KDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wADChxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bNmzhz6tzJs6fPn0CDCh1KtKjRo0iTKl3KtKnTp1CjSp1KtarVq1izat3KtavXr2DDih1LtqzZs2jTql3Ltq3bt3D/48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0ueTLmy5cuYM2vezLmz58+gQ4seTbq06dOoU6tezbq169ewY8ueTbu27du4c+vezbu379/AgwsfTry48ePIkytfzry58+fQo0ufTr269evYs2vfzr279+/gw4sfT768+fPo06tfz769+/fw48ufT7++/fv48+vfz7+///8ABijggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDTWaOONOOao44489ujjj0AGKeSQRBZp5JFIJqnk/5JMNunkk1BGKeWUVFZp5ZVYZqnlllx26eWXYIYp5phklmnmmWimqeaabLbp5ptwxinnnHTWaeedeOap55589unnn4AGKuighBZq6KGIJqrooow26uijkEYq6aSUVmrppZhmqummnHbq6aeghirqqKSWauqpqKaq6qqsturqq7DGKuustNZq66245qrrrrz26uuvwAYr7LDEFmvsscgmq+yyzDbr7LPQRivttNRWa+212Gar7bbcduvtt+CGK+645JZr7rnopqvuuuy26+678MYr77z01mvvvfjmq+++/Pbr778AByzwwAQXbPDBCCes8MIMN+zwwxBHLPHEFFds8Y3FGGes8cYcd+zxxyCHLPLIJJds8skop6zyyiy37PLLMMcs88w012zzzTjnrPPOPPfs889ABy300EQXbfTRSCet9NJMN+3001BHLfXUVFdt9dVYZ6311lx37fXXYIct9thkl2322WinrfbabLft9ttwxy333HTXbffdeOet99589+3334AHLvjghBceXyAAIfkEBQQAAAAs7QBXAZYAiQAAB/+AAII1hIWGh4iJiouMjY6PkJGSioKDNS6YmZqbnJ2en6ChoqOkpaaeNZU1OSs+KK+wsbKztLW2t7i5uru8vbE+KzmqKzc2PMfIycrLzM3Oz9DR0tPU1ck2NyupADU+NjgsPeLj5OXm5+jp6uvs7e7v8OIsODYoqZcoPOE6/P3+/wADChxIsKDBgwgTKuTXgwUPe9xc5Ouho4PFixgzatzIsaPHjyBDihxJ0qKOHjx23JPIg2LJlzBjypwp8+RDF4RYuqTJs6fPnyBtosCJr2VFoEiTKoUplKjOo0ujSp1qEuXQnBOhUt3KlWdTrEa7ih378mvRnWTTqt1o9unat3D/22aFSzet3LB183K9i1av36V8tf4d/DMw4cOFrTqdi7jxTMOOI5dVDLav5MsfIWPe3FEz588YPYMGLXo059KmMaNOLXk1a8euXyOOLZsw7dp/b+PWq3t33d6+41I+Kzi47eFujTcGrtwucsbNj9+sXDx6XubWu2LPvnU796nev0cNL14p+fJIz6NPPJ34errq33t9jle+2vj2a9K3nF/7/ur9UYVfgCUNSOBIBh4YUoIKZvZfg3s9CKGAEk4oFYMWaoRhhqFVyGFSG37YQYgfksihiRmiaKGKE7IIoYsNwqigjAfSSKCNAeLYn4758Wifj/IB+Z6Q6xGJnpHlISmeppLfMcmdk9lBaZ2U0VHZnJXKYWmclsFx6ZuXu4GJm5i1kSmbma+hyZqaqbFpmpujwUmahyKyd5V7daZHZ57ztZccnz7J+Zmgp+0JqH5+QncoTYRu1qhqhi46WaL1SYronX9aGtOjl3HaWqSaiuRpZKPCBmqoQZ2KqkelLqfqqhy1OtursGp
} , props ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
className : "edit-post-welcome-guide__image edit-post-welcome-guide__image__prm-r" ,
alt : "" ,
src : "data:image/svg+xml,%3Csvg fill='none' height='240' viewBox='0 0 312 240' width='312' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m0 0h312v240h-312z' fill='%2300a0d2'/%3E%3Cpath d='m48 32c0-1.1046.8954-2 2-2h212c1.105 0 2 .8954 2 2v208h-216z' fill='%23fff'/%3E%3Cpath d='m60 38h191.455v34h-191.455z' fill='%23ddd'/%3E%3Cpath d='m151 49v11l5-4.125 5 4.125v-11h-5z' fill='%23000' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='m48 80h216v74h-216z' fill='%23e3e3e3'/%3E%3Crect height='16.5' rx='1.53571' stroke='%23000' stroke-width='1.5' width='16.5' x='147.75' y='108.75'/%3E%3Cpath d='m154 120v-6l5 3z' fill='%23000'/%3E%3Cpath d='m60 163h91.4727v49h-91.4727z' fill='%23ddd'/%3E%3Cpath d='m159.982 163h91.4727v49h-91.4727z' fill='%23ddd'/%3E%3Cg stroke='%23000' stroke-width='1.5'%3E%3Crect height='16.5' rx='1.25' width='16.5' x='97.75' y='179.75'/%3E%3Cpath d='m98 192 4.571-3.333 3.429 2.222 4-3.889 4 3.889' stroke-linejoin='round'/%3E%3Cpath d='m208.917 196v-15.111'/%3E%3Cpath d='m204.472 196v-15.111'/%3E%3Cpath d='m212.333 180.75h-8.889'/%3E%3Cpath d='m203.139 184.889v4.071c-1.928-.353-3.389-2.041-3.389-4.071s1.461-3.718 3.389-4.071z' fill='%23000'/%3E%3C/g%3E%3Cpath d='m60 220h191v20h-191z' fill='%23ddd'/%3E%3C/svg%3E"
} , props ) ) ) ;
} ;
var images _EditorImage = function EditorImage ( props ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
className : "edit-post-welcome-guide__image edit-post-welcome-guide__image__prm-np" ,
alt : "" ,
src : " data : image / gif ; base64 , R0lGODlhcALgAfYBAACg0vj4 + P ///wAAAP/+//T09BwcHACf1AGf0v///RmXvgCg0ACg1ACi1n5+fm1tbTk5OU9PUASezwOf0F/F5gedzd3c2wCh1huWvqGhoR8jJbOzs//9+/Tv8AI0RxKZxACi2BmWwPPx7/Dv7iUcGgUnMheXwFi/4cbGxubm5tXU1Oz//xWYwf/+/QybyQx1l+n//9r//834/xaXxLvt/A6ax/3//xx+nu3y9ROZwgF+qidfcv/9/OT1+47j/heSuobd+RuWvI+Pj/X//5vX663n+vn//0az1huYv+X//9T+/7f8/1Oxz5ng9+///5HU6MT//+H//5LQ5x+m0vH//2271DWr0v/9/ReXvgCi1MXz/1nB4m/N6/z8/M3//wOg0qTe8h+izIXK4SWhyh6eyCWStSGUuGS0zv3//afz/xOdykCt0hmXvB+UukSpyh2VvSmRsi6PrzCQsDaWsy6cvnvj/1yuyVK93SyWuofL3wGRwCuCnv/7+f/69g+g0QAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0MzUyLCAyMDIwLzAxLzMwLTE1OjUwOjM4ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMSAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NUNDQ0Q3Mzg3RTQxMUVBODRBODkxOUNBOEEwNEI0RiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NUNDQ0Q3NDg3RTQxMUVBODRBODkxOUNBOEEwNEI0RiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU1Q0NDRDcxODdFNDExRUE4NEE4OTE5Q0E4QTA0QjRGIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU1Q0NDRDcyODdFNDExRUE4NEE4OTE5Q0E4QTA0QjRGIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEBQgAAQAsAAAAAHAC4AEAB/+AAIKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wADChxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bNmzhz6tzJs6fPn0CDCh1KtKjRo0iTKl3KtKnTp1CjSp1KtarVq1izat3KtavXr2DDih1LtqzZs2jTql3Ltq3bt3D/48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0ueTLmy5cuYM2vezLmz58+gQ4seTbq06dOoU6tezbq169ewY8ueTbu27du4c+vezbu379/AgwsfTry48ePIkytfzry58+fQo0ufTr269evYs2vfzr279+/gw4sfT768+fPo06tfz769+/fw48ufT7++/fv48+vfz7+///8ABijggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDTWaOONOOao44489ujjj0AGKeSQRBZp5JFIJqnk/5JMNunkk1BGKeWUVFZp5ZVYZqnlllx26eWXYIYp5phklmnmmWimqeaabLbp5ptwxinnnHTWaeedeOap55589unnn4AGKuighBZq6KGIJqrooow26uijkEYq6aSUVmrppZhmqummnHbq6aeghirqqKSWauqpqKaq6qqsturqq7DGKuustNZq66245qrrrrz26uuvwAYr7LDEFmvsscgmq+yyzDbr7LPQRivttNRWa+212Gar7bbcduvtt+CGK+645JZr7rnopqvuuuy26+678MYr77z01mvvvfjmq+++/Pbr778AByzwwAQXbPDBCCes8MIMN+zwwxBHLPHEFFds8Y3FGGes8cYcd+zxxyCHLPLIJJds8skop6zyyiy37PLLMMcs88w012zzzTjnrPPOPPfs889ABy300EQXbfTRSCet9NJMN+3001BHLfXUVFdt9dVYZ6311lx37fXXYIct9thkl2322WinrfbabLft9ttwxy333HTXbffdeOet99589+3334AHLvjghBceXyAAIfkEBQQAAAAsMAEIARAAEAAAB0aAAIIACAiDhIaHg4WHjIqPkJGSjgyPlYiOhBObE4mIihMVohUTkgChFBSkpqiqpZITEqISr5GFm5mWuqa8vYK5toWekwiBACH5BAUEAAEALDABCAEQABAAAAdWgACCg4SFhoeIiYqLhgsLixI1Hx81EgiHCAhqbpxuahOXhQgTVlBeXlBWoIUXo1ZLp0uqoYMHozV0c3N0n7SECBIuNWouloiOghcHAI+JyIzMzdDTi4EAIfkEBQQAAQAsMAELAQ8ACwAAB2GAAIIACIWGhYODCBOMjRITCIoIflaVlpV+kYsTVkowMElJn0pWkIsSayt8HCMFfHwra5CEnCt9fH23fbGQDIudoKGipLOEFSxIyUgYSCwVkYMMF9PU0wyJggza29rY3t+BACH5BAUEAAAALBIBAgFOABoAAAf/gACCg4SCBweFiYqLjI2Dh46Rj4iSlZaFkJeMDAyanpKcn4qhoqWJpKaCqKmmq62drKmupbOVCwuJCJ+1u7CXB7CcwsKevLkIyIvGowwXF5zO0dG+lcuEyMnMlhMVNR8sM+HiJiYzHzUVE5bW69SOLm8+TWD09fZNPm8u7bEA7IMuynhJQqWgwYNJvJTZV80dLYeMasDxssKGkYsYL9pYoQRODX6x/gmSqIQKAQEoUaRAKYAAlY4fG/YTCaBGnJIETgooUIClgJdxYoKC2MuSRC8whmRcCsOLR5CsaLowAyVGkqtYs8aAYobh0JlEFVUwsaWK2bNozW4xUQGqrLCJQbi5+EC3rl26LtK5fXVpmF+/mWSGhLvowIVFFyj1JbxXUuBByB4Ljsq4XyN22S5XtqyMceZNmzmfCu2IpmhCIgMBACH5BAUEAAA
} , props ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
className : "edit-post-welcome-guide__image edit-post-welcome-guide__image__prm-r" ,
alt : "" ,
src : "data:image/svg+xml,%3Csvg fill='none' height='240' viewBox='0 0 312 240' width='312' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m0 0h312v240h-312z' fill='%2300a0d2'/%3E%3Crect fill='%23fff' height='108' rx='2' width='216' x='48' y='80'/%3E%3Cg stroke='%23000' stroke-width='1.5'%3E%3Cpath d='m158.917 142v-15.111'/%3E%3Cpath d='m154.472 142v-15.111'/%3E%3Cpath d='m162.333 126.75h-8.889'/%3E%3Cpath d='m153.139 130.889v4.071c-1.928-.353-3.389-2.041-3.389-4.071s1.461-3.718 3.389-4.071z' fill='%23000'/%3E%3C/g%3E%3Crect fill='%23fff' height='21' rx='1.5' stroke='%231e1e1e' width='117' x='48.5' y='53.5'/%3E%3Cpath d='m70.592 53v22' stroke='%231e1e1e'/%3E%3Cpath d='m144.432 53v22' stroke='%231e1e1e'/%3E%3Crect fill='%23333' height='8' rx='1' width='9' x='55' y='60'/%3E%3Cpath d='m150 63h2v2h-2z' fill='%23333'/%3E%3Cpath d='m154 63h2v2h-2z' fill='%23333'/%3E%3Cpath d='m158 63h2v2h-2z' fill='%23333'/%3E%3C/svg%3E"
} , props ) ) ) ;
} ;
var images _BlockLibraryImage = function BlockLibraryImage ( props ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
className : "edit-post-welcome-guide__image edit-post-welcome-guide__image__prm-np" ,
alt : "" ,
src : " data : image / gif ; base64 , R0lGODlhcALgAfYBAACg0k9PTxmXviyNr //+/xOZxB+Uuv///wOf0ACg1AGf0mBgYOLi4gybyb6+vgCg0CAgIKioqHZ2di0tLQgmMBchJBOCphSJrwFGXyEdGxc9Sh4eHgadzR9xjz8/P8zZ4C9sgYHb9laHm9j4/+3//xd0lSibwZjm/Nv///z///X//////Tyt0vL//+r///n5+f3//7HV5AAAAO/v74fL4hISElyuyjh9l0eTridviKzk+FCmwwkJCQ8PD0KdvSCUt//9/KXx/4/T7Lz////8/XyxxBB2nKHb7rvf7s/8/8bq+K+vrxaYwOjo6I+PjwCh1s/Pz6CgoF6SpfHx8fX19fz8/JXU6MT1/3bB3Iy5ypnC0bXt/9/f3/r//+T//yJ/oG+gstTy/f/9+VK73Eh9kYWuvANzmAVkgxBTaQ9eeBtdcx1thxiRuP38/wCKtgh/pASBpv/7+tTq9RKUvhCSvNzk6P37/L/P1SdFUeP0/On5/uXs8Ovx9ODo7e/u8QAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0MzUyLCAyMDIwLzAxLzMwLTE1OjUwOjM4ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMSAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2OTFFQjQ2Njg3RTQxMUVBODRBODkxOUNBOEEwNEI0RiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2OTFFQjQ2Nzg3RTQxMUVBODRBODkxOUNBOEEwNEI0RiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU1Q0NDRDc1ODdFNDExRUE4NEE4OTE5Q0E4QTA0QjRGIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU1Q0NDRDc2ODdFNDExRUE4NEE4OTE5Q0E4QTA0QjRGIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEBQQAAQAsAAAAAHAC4AEAB/+AAIKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wADChxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bNmzhz6tzJs6fPn0CDCh1KtKjRo0iTKl3KtKnTp1CjSp1KtarVq1izat3KtavXr2DDih1LtqzZs2jTql3Ltq3bt3D/48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0ueTLmy5cuYM2vezLmz58+gQ4seTbq06dOoU6tezbq169ewY8ueTbu27du4c+vezbu379/AgwsfTry48ePIkytfzry58+fQo0ufTr269evYs2vfzr279+/gw4sfT768+fPo06tfz769+/fw48ufT7++/fv48+vfz7+///8ABijggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDTWaOONOOao44489ujjj0AGKeSQRBZp5JFIJqnk/5JMNunkk1BGKeWUVFZp5ZVYZqnlllx26eWXYIYp5phklmnmmWimqeaabLbp5ptwxinnnHTWaeedeOap55589unnn4AGKuighBZq6KGIJqrooow26uijkEYq6aSUVmrppZhmqummnHbq6aeghirqqKSWauqpqKaq6qqsturqq7DGKuustNZq66245qrrrrz26uuvwAYr7LDEFmvsscgmq+yyzDbr7LPQRivttNRWa+212Gar7bbcduvtt+CGK+645JZr7rnopqvuuuy26+678MYr77z01mvvvfjmq+++/Pbr778AByzwwAQXbPDBCCes8MIMN+zwwxBHLPHEFFds8Y3FGGes8cYcd+zxxyCHLPLIJJds8skop6zyyiy37PLLMMcs88w012zzzTjnrPPOPPfs889ABy300EQXbfTRSCet9NJMN+3001BHLfXUVFdt9dVYZ6311lx37fXXYIct9thkl2322WinrfbabLft9ttwxy333HTXbffdeOet99589+3334AHLvjghBceXyAAIfkEBQQAAAAsdQA4ADMAMQAAB/+AAIKDhIWGh4iHD4sPCgqLiZGSk4WOkIQJmQmUnIeam4eOCAgcpaanqKmqq6UICoYJpA1ucLW2t7i5urtwbg0Im5uOCgizcG/IycrLzM3Ob70cg8SuHLTHz9nazb2uotXY2+Li0QrCrxzh4+vO0QiF6ezy3G4c74Tx8/rI7vDq++z64fsHcJzAQfkKBqx3DyFBcT4izjsoKOE6CxF9TGTobx7GiBbkUQRgcdxHHyEX2uso7+TGlQM9ZnzZsOJDbSeNiOQYs2VGnSprkryJzIIFI0iB5kz5Jmm2kSWVZZxKterUZ1CJWt1qFStPh8+4ip3Z7qvNZ0bTqj25Vq1XmGCTfUrcCfesXJR0hUbdxjYvS3Z9g/69mJGpQbNDZUYEui6rYh+MD9dNfDcyOcR7cZIV3FNhY8xEPdObnFn0aL2hTSujmKC06tX1LgFonfo1tNgPprm2fbuugt22WSOgxdurK0LEjPFaznxXvVeVSLmZTr269evYs09vwCF3odyiWIkfr6omqErURqlfz769+/aOCgUCACH5BAUEAAEALHUAOAAzADEAAAf/gACCgwAJCYSIiYqLjI2GjZCRkoIJT0+GmJmam5ydmIsKCBwNpKWmp6ipqqUcCIoIDXRmZ7S1tre4ubpnRnMch4QJHHS0acbHyMnKy8xpZ2YNCgqDlQ2zzdjZzWdwrdRPDWfa4+TO0K7U4eXr29Acwers8sjPBe/p4vP69feU8fry+MHLB5CdQHz61Mw76I9gOTVFIipcx7DQv4dFyhSZWK5igovkIGrkSM4jyHEiNxo0Y2+gvJQkx5l0GDKjSoos+1mkidJmTG0zX5YZ+RNbUGZqkipdOnTj0qXtWiJ
} , props ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
className : "edit-post-welcome-guide__image edit-post-welcome-guide__image__prm-r" ,
alt : "" ,
src : "data:image/svg+xml,%3Csvg fill='none' height='240' viewBox='0 0 312 240' width='312' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m0 0h312v240h-312z' fill='%2300a0d2'/%3E%3Crect fill='%231e1e1e' height='21.3714' rx='2' width='21.3714' x='61' y='30'/%3E%3Cpath d='m71.75 35v11m-5.75-5.75h11' stroke='%23fff' stroke-width='1.5'/%3E%3Crect fill='%23fff' height='154' rx='2' width='210' x='51' y='57'/%3E%3Cg stroke-width='1.5'%3E%3Cpath d='m217 167v11l5-4.125 5 4.125v-11h-5z' fill='%23000' stroke='%23000'/%3E%3Cpath d='m165 169v11c0 1.105-.894 2-1.999 2-3.104 0-9.127 0-13.001 0' stroke='%23000'/%3E%3Crect height='13.5' rx='.875' stroke='%23000' width='13.5' x='147.75' y='164.75'/%3E%3Cpath d='m148 175 3.714-2 2.786 1.333 3.25-2.333 3.25 2.333' stroke='%23000' stroke-linejoin='round'/%3E%3Crect height='16.5' rx='1.25' stroke='%23000' width='16.5' x='82.75' y='164.75'/%3E%3Cpath d='m83 177 4.5714-3.333 3.4286 2.222 4-3.889 4 3.889' stroke='%23000' stroke-linejoin='round'/%3E%3C/g%3E%3Cpath clip-rule='evenodd' d='m164 117.5h-16v-1.5h16z' fill='%23000' fill-rule='evenodd'/%3E%3Cpath clip-rule='evenodd' d='m164 124.5h-8v-1.5h8z' fill='%23000' fill-rule='evenodd'/%3E%3Cpath clip-rule='evenodd' d='m164 132h-16v-1.5h16z' fill='%23000' fill-rule='evenodd'/%3E%3Ccircle cx='150' cy='124' fill='%23000' r='2'/%3E%3Cpath d='m223 116h6v6h-6z' fill='%23000'/%3E%3Cpath d='m214 116h6v6h-6z' fill='%23000'/%3E%3Cpath d='m229 116v9.999c0 3.199-2.5 2.998-4 2.999' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='m220 116v9.999c0 3.199-2.5 2.998-4 2.999' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='m93.9167 131v-15.111' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='m89.4722 131v-15.111' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='m97.3333 115.75h-8.8889' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='m88.1389 119.889v4.071c-1.9278-.353-3.3889-2.041-3.3889-4.071s1.4611-3.718 3.3889-4.071z' fill='%23000' stroke='%23000' stroke-width='1.5'/%3E%3Crect height='25' rx='3.5' stroke='%23007ca8' width='189' x='61.5' y='67.5'/%3E%3C/svg%3E"
} , props ) ) ) ;
} ;
var images _DocumentationImage = function DocumentationImage ( props ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
className : "edit-post-welcome-guide__image edit-post-welcome-guide__image__prm-np" ,
alt : "" ,
src : " data : image / gif ; base64 , R0lGODlhcALgAfYBAACg0h8fH93d3R0dHdzc3B4eHuvr6 + Hh4fb29ujo6P ///+Xl5f39/f/+//n5+ePj4+7u7iAdHgqcyh8bGh8cHR8dGyAcGwCg0CMbGSAeHCUcGvLy8gedzAOf0ACg1AUnMghPZyQbHACi1BwcHCoZGAGf0gCf1MPDwysrKxmJrnV1dTk5ORmWwAgmMAo6TAUtPBUhJgCh1hOZwxmXvgCi1heXwNTU1EpKSllZWYODg2dnZ7W1taamppWVlcvLyyYbGh0fIAGf0ASezgOe0h0fHhweHQ+axgCj2BeXvheCpiZofhmQtjKTsub////9/en//wKg1Em11/3////+/cPz/6n5//P//9L//8b//+H//0mSq7n1/0Kfvtj//zKmzBWeyzyt0iefxiCbwSMbFzOw2v/9+/n//1uuyf/8/RqYv1K93bnq+dD5/8z3///7+QCWxhukz1S+4Ge1z1HI8Amm2dL6/2HE5HnC2R6w363j9ZHR5qHb7nbT8Zzp/3bT7wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0MzUyLCAyMDIwLzAxLzMwLTE1OjUwOjM4ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMSAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2OTFFQjQ2QTg3RTQxMUVBODRBODkxOUNBOEEwNEI0RiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2OTFFQjQ2Qjg3RTQxMUVBODRBODkxOUNBOEEwNEI0RiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjY5MUVCNDY4ODdFNDExRUE4NEE4OTE5Q0E4QTA0QjRGIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjY5MUVCNDY5ODdFNDExRUE4NEE4OTE5Q0E4QTA0QjRGIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEBQQAAQAsAAAAAHAC4AEAB/+AAIKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wADChxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bNmzhz6tzJs6fPn0CDCh1KtKjRo0iTKl3KtKnTp1CjSp1KtarVq1izat3KtavXr2DDih1LtqzZs2jTql3Ltq3bt3D/48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0ueTLmy5cuYM2vezLmz58+gQ4seTbq06dOoU6tezbq169ewY8ueTbu27du4c+vezbu379/AgwsfTry48ePIkytfzry58+fQo0ufTr269evYs2vfzr279+/gw4sfT768+fPo06tfz769+/fw48ufT7++/fv48+vfz7+///8ABijggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDTWaOONOOao44489ujjj0AGKeSQRBZp5JFIJqnk/5JMNunkk1BGKeWUVFZp5ZVYZqnlllx26eWXYIYp5phklmnmmWimqeaabLbp5ptwxinnnHTWaeedeOap55589unnn4AGKuighBZq6KGIJqrooow26uijkEYq6aSUVmrppZhmqummnHbq6aeghirqqKSWauqpqKaq6qqsturqq7DGKuustNZq66245qrrrrz26uuvwAYr7LDEFmvsscgmq+yyzDbr7LPQRivttNRWa+212Gar7bbcduvtt+CGK+645JZr7rnopqvuuuy26+678MYr77z01mvvvfjmq+++/Pbr778AByzwwAQXbPDBCCes8MIMN+zwwxBHLPHEFFds8Y3FGGes8cYcd+zxxyCHLPLIJJds8skop6zyyiy37PLLMMcs88w012zzzTjnrPPOPPfs889ABy300EQXbfTRSCet9NJMN+3001BHLfXUVFdt9dVYZ6311lx37fXXYIct9thkl2322WinrfbabLft9ttwxy333HTXbffdeOet99589+3334AHLvjghBceXyAAIfkEBQQAAAAsYAA4ACgAYAAAB/+AAIKDgiYmhIiJiouJHh6GjJGSghcAjjExjoIlnCWTnwAXnEISEkKcAJ2eoJMdb0kgIElvHauQrJIlHDNKSjMcQ7aHuIqQJh4sLi4sj8STkI4sHx8zmasXlc6LHjQzHy1LHtqg3DMt4OLjk+Xn4err3e3p74zs6PSR9u742/H3/Ir0zQNISCDBRv72HRxkcCHDhAMXNnRoCSJFQRMdZpRo8eLGgx8JhgQ4kl9JfCfppXy3Ul3LcS+1eThi7h/FmM5wEtOJiycrn+Q63hSqkSjHmgqLIo0I0mjTpRcrQvXoVGRVkldNZkW5VWVXll9dhoU5VmbZnGd3pu259mfboFNoh8ZVKi8q0E934c09Wpfq3qd95cq7xRcdYcCGhxUOd9jq0sZYHytGzHiy48GWI2MWnJhzZc+PMmuVDBry6BYwPmuMIePFC9UahdSoweGno9uOTCPSZBt3btFRgwsfThDVQuOEkBcvEQgAIfkEBQQAAgAsYAA4ACoAZAAAB/+AAoICJSWCAACDiouMghcXjY2FiB6VlpeYmR6RjImIAB4xMTSkpaanpjGVJpyHiB0cAjIsLDO2t7i5tyw1RkKtrhwySS4vH8fIycrJLy5JRsACoEZJLzARGCEaGiHaGBoY4eDg3xgFMC9JEh2NiAKhNSAt1xERGRn1Fff7+v0VFQWAtADBQkK7RAJiCHgRoYDDAgMcDoj48CHFiQUooGMCLZoADA0hVrwosWTJjR2BfcAAECLFiiYtRhyALkXKVisBkhT5cudDlB4/aMhgUaZLmCIdAo0mlOjLkUh7nnvBMSgGolGz9qRJ9SanlU5hzsT4FOPUqkyHInUptSjEpSr/h0r1CVUkXJx
} , props ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
className : "edit-post-welcome-guide__image edit-post-welcome-guide__image__prm-r" ,
alt : "" ,
src : "data:image/svg+xml,%3Csvg fill='none' height='240' viewBox='0 0 312 240' width='312' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m0 0h312v240h-312z' fill='%2300a0d2'/%3E%3Cpath d='m51 32c0-1.1046.8954-2 2-2h206c1.105 0 2 .8954 2 2v208h-210z' fill='%23fff'/%3E%3Cpath d='m51 32c0-1.1046.8954-2 2-2h206c1.105 0 2 .8954 2 2v40h-210z' fill='%231e1e1e'/%3E%3Cg fill='%23ddd'%3E%3Cpath d='m90 98h104v16h-104z'/%3E%3Cpath d='m90 130h126v8h-126z'/%3E%3Cpath d='m90 143h126v8h-126z'/%3E%3Cpath d='m90 156h126v8h-126z'/%3E%3Cpath d='m90 206h126v8h-126z'/%3E%3Cpath d='m90 169h126v8h-126z'/%3E%3Cpath d='m90 219h126v8h-126z'/%3E%3Cpath d='m90 182h63v8h-63z'/%3E%3Cpath d='m90 232h63v8h-63z'/%3E%3C/g%3E%3Cpath d='m82.6667 51c0-6.4284-5.2384-11.6667-11.6667-11.6667-6.44 0-11.6667 5.2383-11.6667 11.6667 0 6.44 5.2267 11.6667 11.6667 11.6667 6.4283 0 11.6667-5.2267 11.6667-11.6667zm-14.2567 6.265-3.9784-10.675c.6417-.0234 1.365-.0934 1.365-.0934.5834-.07.5134-1.3183-.07-1.295 0 0-1.6916.1284-2.765.1284-.21 0-.4316 0-.6766-.0117 1.855-2.8467 5.0633-4.69 8.715-4.69 2.7183 0 5.1916 1.015 7.0583 2.73-.7933-.1283-1.925.455-1.925 1.8433 0 .8634.525 1.5867 1.05 2.45.4084.7117.6417 1.5867.6417 2.87 0 1.7384-1.6334 5.8334-1.6334 5.8334l-3.535-9.765c.63-.0234.9567-.1984.9567-.1984.5833-.0583.5133-1.4583-.07-1.4233 0 0-1.68.14-2.7767.14-1.015 0-2.7183-.14-2.7183-.14-.5833-.035-.6533 1.4-.07 1.4233l1.0733.0934 1.47 3.9783zm11.235-6.265c.28-.7467.8633-2.1817.5017-4.9584.8166 1.505 1.2249 3.1617 1.2249 4.9584 0 3.8383-2.0183 7.28-5.1333 9.0767 1.1317-3.0217 2.2633-6.0667 3.4067-9.0767zm-13.195 9.4383c-3.4767-1.68-5.8217-5.32-5.8217-9.4383 0-1.5167.2683-2.8934.84-4.1884 1.6567 4.5384 3.3133 9.0884 4.9817 13.6267zm4.7016-7.735 3.01 8.1434c-1.0033.3383-2.0533.5249-3.1616.5249-.9217 0-1.8317-.1283-2.6717-.385.945-2.7766 1.89-5.53 2.8233-8.2833z' fill='%23fff'/%3E%3C/svg%3E"
} , props ) ) ) ;
} ;
var images _InserterIconImage = function InserterIconImage ( props ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
alt : Object ( external _wp _i18n _ [ "__" ] ) ( 'inserter' ) ,
src : "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
} , props ) ) ;
} ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/index.js
2018-12-18 04:14:52 +01:00
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* WordPress dependencies
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
* /
2019-10-15 17:37:08 +02:00
2018-12-14 05:41:57 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
function WelcomeGuide ( ) {
var isActive = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'welcomeGuide' ) ;
} , [ ] ) ;
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
toggleFeature = _useDispatch . toggleFeature ;
if ( ! isActive ) {
2019-10-15 17:37:08 +02:00
return null ;
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Guide" ] , {
className : "edit-post-welcome-guide" ,
contentLabel : Object ( external _wp _i18n _ [ "__" ] ) ( 'Welcome to the block editor' ) ,
finishButtonText : Object ( external _wp _i18n _ [ "__" ] ) ( 'Get started' ) ,
onFinish : function onFinish ( ) {
return toggleFeature ( 'welcomeGuide' ) ;
} ,
pages : [ {
image : Object ( external _wp _element _ [ "createElement" ] ) ( images _CanvasImage , null ) ,
content : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "h1" , {
className : "edit-post-welcome-guide__heading"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Welcome to the block editor' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-welcome-guide__text"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.' ) ) )
} , {
image : Object ( external _wp _element _ [ "createElement" ] ) ( images _EditorImage , null ) ,
content : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "h1" , {
className : "edit-post-welcome-guide__heading"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Make each block your own' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-welcome-guide__text"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.' ) ) )
} , {
image : Object ( external _wp _element _ [ "createElement" ] ) ( images _BlockLibraryImage , null ) ,
content : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "h1" , {
className : "edit-post-welcome-guide__heading"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Get to know the block library' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-welcome-guide__text"
} , Object ( external _wp _element _ [ "createInterpolateElement" ] ) ( Object ( external _wp _i18n _ [ "__" ] ) ( 'All of the blocks available to you live in the block library. You’ ll find it wherever you see the <InserterIconImage /> icon.' ) , {
InserterIconImage : Object ( external _wp _element _ [ "createElement" ] ) ( images _InserterIconImage , {
className : "edit-post-welcome-guide__inserter-icon"
} )
} ) ) )
} , {
image : Object ( external _wp _element _ [ "createElement" ] ) ( images _DocumentationImage , null ) ,
content : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "h1" , {
className : "edit-post-welcome-guide__heading"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Learn how to use the block editor' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-welcome-guide__text"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'New to the block editor? Want to learn more about using it? ' ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ExternalLink" ] , {
href : Object ( external _wp _i18n _ [ "__" ] ) ( 'https://wordpress.org/support/article/wordpress-editor/' )
} , Object ( external _wp _i18n _ [ "__" ] ) ( "Here's a detailed guide." ) ) ) )
} ]
} ) ;
2018-12-18 04:14:52 +01:00
}
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/index.js
2019-10-15 17:37:08 +02:00
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* External dependencies
2018-12-14 05:41:57 +01:00
* /
/ * *
2019-10-15 17:37:08 +02:00
* WordPress dependencies
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
2018-12-14 05:41:57 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var interfaceLabels = {
secondarySidebar : Object ( external _wp _i18n _ [ "__" ] ) ( 'Block library' ) ,
/* translators: accessibility text for the editor top bar landmark region. */
header : Object ( external _wp _i18n _ [ "__" ] ) ( 'Editor top bar' ) ,
/* translators: accessibility text for the editor content landmark region. */
body : Object ( external _wp _i18n _ [ "__" ] ) ( 'Editor content' ) ,
/* translators: accessibility text for the editor settings landmark region. */
sidebar : Object ( external _wp _i18n _ [ "__" ] ) ( 'Editor settings' ) ,
/* translators: accessibility text for the editor publish landmark region. */
actions : Object ( external _wp _i18n _ [ "__" ] ) ( 'Editor publish' ) ,
/* translators: accessibility text for the editor footer landmark region. */
footer : Object ( external _wp _i18n _ [ "__" ] ) ( 'Editor footer' )
} ;
function Layout ( _ref ) {
var styles = _ref . styles ;
var isMobileViewport = Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( 'medium' , '<' ) ;
var isHugeViewport = Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( 'huge' , '>=' ) ;
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
openGeneralSidebar = _useDispatch . openGeneralSidebar ,
closeGeneralSidebar = _useDispatch . closeGeneralSidebar ,
setIsInserterOpened = _useDispatch . setIsInserterOpened ;
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
hasFixedToolbar : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'fixedToolbar' ) ,
sidebarIsOpened : ! ! ( select ( build _module [ "g" /* store */ ] ) . getActiveComplementaryArea ( store [ "a" /* store */ ] . name ) || select ( store [ "a" /* store */ ] ) . isPublishSidebarOpened ( ) ) ,
isFullscreenActive : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'fullscreenMode' ) ,
showMostUsedBlocks : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'mostUsedBlocks' ) ,
isInserterOpened : select ( store [ "a" /* store */ ] ) . isInserterOpened ( ) ,
mode : select ( store [ "a" /* store */ ] ) . getEditorMode ( ) ,
isRichEditingEnabled : select ( 'core/editor' ) . getEditorSettings ( ) . richEditingEnabled ,
hasActiveMetaboxes : select ( store [ "a" /* store */ ] ) . hasMetaBoxes ( ) ,
previousShortcut : select ( external _wp _keyboardShortcuts _ [ "store" ] ) . getAllShortcutRawKeyCombinations ( 'core/edit-post/previous-region' ) ,
nextShortcut : select ( external _wp _keyboardShortcuts _ [ "store" ] ) . getAllShortcutRawKeyCombinations ( 'core/edit-post/next-region' ) ,
showIconLabels : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'showIconLabels' ) ,
2021-02-02 06:17:13 +01:00
hasReducedUI : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'reducedUI' ) ,
showBlockBreadcrumbs : select ( store [ "a" /* store */ ] ) . isFeatureActive ( 'showBlockBreadcrumbs' )
2021-01-28 03:04:13 +01:00
} ;
} , [ ] ) ,
mode = _useSelect . mode ,
isFullscreenActive = _useSelect . isFullscreenActive ,
isRichEditingEnabled = _useSelect . isRichEditingEnabled ,
sidebarIsOpened = _useSelect . sidebarIsOpened ,
hasActiveMetaboxes = _useSelect . hasActiveMetaboxes ,
hasFixedToolbar = _useSelect . hasFixedToolbar ,
previousShortcut = _useSelect . previousShortcut ,
nextShortcut = _useSelect . nextShortcut ,
hasBlockSelected = _useSelect . hasBlockSelected ,
showMostUsedBlocks = _useSelect . showMostUsedBlocks ,
isInserterOpened = _useSelect . isInserterOpened ,
showIconLabels = _useSelect . showIconLabels ,
2021-02-02 06:17:13 +01:00
hasReducedUI = _useSelect . hasReducedUI ,
showBlockBreadcrumbs = _useSelect . showBlockBreadcrumbs ;
2021-01-28 03:04:13 +01:00
var className = classnames _default ( ) ( 'edit-post-layout' , 'is-mode-' + mode , {
'is-sidebar-opened' : sidebarIsOpened ,
'has-fixed-toolbar' : hasFixedToolbar ,
'has-metaboxes' : hasActiveMetaboxes ,
'show-icon-labels' : showIconLabels
} ) ;
var openSidebarPanel = function openSidebarPanel ( ) {
return openGeneralSidebar ( hasBlockSelected ? 'edit-post/block' : 'edit-post/document' ) ;
} ; // Inserter and Sidebars are mutually exclusive
Object ( external _wp _element _ [ "useEffect" ] ) ( function ( ) {
if ( sidebarIsOpened && ! isHugeViewport ) {
setIsInserterOpened ( false ) ;
}
} , [ sidebarIsOpened , isHugeViewport ] ) ;
Object ( external _wp _element _ [ "useEffect" ] ) ( function ( ) {
if ( isInserterOpened && ! isHugeViewport ) {
closeGeneralSidebar ( ) ;
}
} , [ isInserterOpened , isHugeViewport ] ) ; // Local state for save panel.
// Note 'truthy' callback implies an open panel.
var _useState = Object ( external _wp _element _ [ "useState" ] ) ( false ) ,
_useState2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _useState , 2 ) ,
entitiesSavedStatesCallback = _useState2 [ 0 ] ,
setEntitiesSavedStatesCallback = _useState2 [ 1 ] ;
var closeEntitiesSavedStates = Object ( external _wp _element _ [ "useCallback" ] ) ( function ( arg ) {
if ( typeof entitiesSavedStatesCallback === 'function' ) {
entitiesSavedStatesCallback ( arg ) ;
}
setEntitiesSavedStatesCallback ( false ) ;
} , [ entitiesSavedStatesCallback ] ) ;
var ref = Object ( external _wp _element _ [ "useRef" ] ) ( ) ;
Object ( external _wp _components _ [ "__unstableUseDrop" ] ) ( ref ) ;
var _useDialog = Object ( external _wp _compose _ [ "__experimentalUseDialog" ] ) ( {
onClose : function onClose ( ) {
return setIsInserterOpened ( false ) ;
}
} ) ,
_useDialog2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _useDialog , 2 ) ,
inserterDialogRef = _useDialog2 [ 0 ] ,
inserterDialogProps = _useDialog2 [ 1 ] ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( build _module [ "d" /* FullscreenMode */ ] , {
isActive : isFullscreenActive
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( browser _url , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "UnsavedChangesWarning" ] , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "AutosaveMonitor" ] , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "LocalAutosaveMonitor" ] , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcuts , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "EditorKeyboardShortcutsRegister" ] , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( settings _sidebar , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( build _module [ "e" /* InterfaceSkeleton */ ] , {
ref : ref ,
className : className ,
labels : interfaceLabels ,
header : Object ( external _wp _element _ [ "createElement" ] ) ( header , {
setEntitiesSavedStatesCallback : setEntitiesSavedStatesCallback
} ) ,
secondarySidebar : mode === 'visual' && isInserterOpened && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , Object ( esm _extends [ "a" /* default */ ] ) ( {
ref : inserterDialogRef
} , inserterDialogProps , {
className : "edit-post-layout__inserter-panel"
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-layout__inserter-panel-header"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
icon : library _close [ "a" /* default */ ] ,
onClick : function onClick ( ) {
return setIsInserterOpened ( false ) ;
}
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-layout__inserter-panel-content"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "__experimentalLibrary" ] , {
showMostUsedBlocks : showMostUsedBlocks ,
showInserterHelpPanel : true ,
onSelect : function onSelect ( ) {
if ( isMobileViewport ) {
setIsInserterOpened ( false ) ;
}
}
} ) ) ) ,
sidebar : ( ! isMobileViewport || sidebarIsOpened ) && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , ! isMobileViewport && ! sidebarIsOpened && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-layout__toogle-sidebar-panel"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
isSecondary : true ,
className : "edit-post-layout__toogle-sidebar-panel-button" ,
onClick : openSidebarPanel ,
"aria-expanded" : false
} , hasBlockSelected ? Object ( external _wp _i18n _ [ "__" ] ) ( 'Open block settings' ) : Object ( external _wp _i18n _ [ "__" ] ) ( 'Open document settings' ) ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( build _module [ "b" /* ComplementaryArea */ ] . Slot , {
scope : "core/edit-post"
} ) ) ,
2021-02-02 06:17:13 +01:00
content : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "EditorNotices" ] , null ) , ( mode === 'text' || ! isRichEditingEnabled ) && Object ( external _wp _element _ [ "createElement" ] ) ( text _editor , null ) , isRichEditingEnabled && mode === 'visual' && Object ( external _wp _element _ [ "createElement" ] ) ( VisualEditor , {
styles : styles
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
2021-01-28 03:04:13 +01:00
className : "edit-post-layout__metaboxes"
} , Object ( external _wp _element _ [ "createElement" ] ) ( meta _boxes , {
location : "normal"
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( meta _boxes , {
location : "advanced"
} ) ) , isMobileViewport && sidebarIsOpened && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ScrollLock" ] , null ) ) ,
2021-02-02 06:17:13 +01:00
footer : ! hasReducedUI && showBlockBreadcrumbs && ! isMobileViewport && isRichEditingEnabled && mode === 'visual' && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
2021-01-28 03:04:13 +01:00
className : "edit-post-layout__footer"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "BlockBreadcrumb" ] , null ) ) ,
actions : Object ( external _wp _element _ [ "createElement" ] ) ( ActionsPanel , {
closeEntitiesSavedStates : closeEntitiesSavedStates ,
isEntitiesSavedStatesOpen : entitiesSavedStatesCallback ,
setEntitiesSavedStatesCallback : setEntitiesSavedStatesCallback
} ) ,
shortcuts : {
previous : previousShortcut ,
next : nextShortcut
}
2021-02-02 06:17:13 +01:00
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( manage _blocks _modal , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( PreferencesModal , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( WelcomeGuide , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Popover" ] . Slot , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _plugins _ [ "PluginArea" ] , null ) ) ;
2019-09-19 17:19:18 +02:00
}
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var layout = ( Layout ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/edit-post/build-module/store/constants.js
2021-02-02 06:17:13 +01:00
var constants = _ _webpack _require _ _ ( 118 ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/listener-hooks.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
/ * *
* This listener hook monitors for block selection and triggers the appropriate
* sidebar state .
*
* @ param { number } postId The current post id .
* /
var listener _hooks _useBlockSelectionListener = function useBlockSelectionListener ( postId ) {
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
hasBlockSelection : ! ! select ( 'core/block-editor' ) . getBlockSelectionStart ( ) ,
isEditorSidebarOpened : select ( constants [ "a" /* STORE_NAME */ ] ) . isEditorSidebarOpened ( )
} ;
} , [ postId ] ) ,
hasBlockSelection = _useSelect . hasBlockSelection ,
isEditorSidebarOpened = _useSelect . isEditorSidebarOpened ;
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( constants [ "a" /* STORE_NAME */ ] ) ,
openGeneralSidebar = _useDispatch . openGeneralSidebar ;
Object ( external _wp _element _ [ "useEffect" ] ) ( function ( ) {
if ( ! isEditorSidebarOpened ) {
return ;
}
if ( hasBlockSelection ) {
openGeneralSidebar ( 'edit-post/block' ) ;
} else {
openGeneralSidebar ( 'edit-post/document' ) ;
}
} , [ hasBlockSelection , isEditorSidebarOpened ] ) ;
} ;
/ * *
* This listener hook monitors any change in permalink and updates the view
* post link in the admin bar .
*
* @ param { number } postId
* /
var listener _hooks _useUpdatePostLinkListener = function useUpdatePostLinkListener ( postId ) {
var _useSelect2 = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
newPermalink : select ( 'core/editor' ) . getCurrentPost ( ) . link
} ;
} , [ postId ] ) ,
newPermalink = _useSelect2 . newPermalink ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var nodeToUpdate = Object ( external _wp _element _ [ "useRef" ] ) ( ) ;
Object ( external _wp _element _ [ "useEffect" ] ) ( function ( ) {
nodeToUpdate . current = document . querySelector ( constants [ "c" /* VIEW_AS_PREVIEW_LINK_SELECTOR */ ] ) || document . querySelector ( constants [ "b" /* VIEW_AS_LINK_SELECTOR */ ] ) ;
} , [ postId ] ) ;
Object ( external _wp _element _ [ "useEffect" ] ) ( function ( ) {
if ( ! newPermalink || ! nodeToUpdate . current ) {
return ;
}
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
nodeToUpdate . current . setAttribute ( 'href' , newPermalink ) ;
} , [ newPermalink ] ) ;
} ;
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/index.js
/ * *
* Internal dependencies
* /
/ * *
* Data component used for initializing the editor and re - initializes
* when postId changes or on unmount .
*
* @ param { number } postId The id of the post .
* @ return { null } This is a data component so does not render any ui .
* /
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
function EditorInitialization ( _ref ) {
var postId = _ref . postId ;
listener _hooks _useBlockSelectionListener ( postId ) ;
listener _hooks _useUpdatePostLinkListener ( postId ) ;
return null ;
}
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/editor.js
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
function editor _ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function editor _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { editor _ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { editor _ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2020-06-26 15:33:47 +02:00
2020-01-08 12:57:23 +01:00
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2020-06-26 15:33:47 +02:00
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
function Editor ( _ref ) {
var postId = _ref . postId ,
postType = _ref . postType ,
settings = _ref . settings ,
initialEdits = _ref . initialEdits ,
onError = _ref . onError ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "postId" , "postType" , "settings" , "initialEdits" , "onError" ] ) ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _getPostType$viewable , _getPostType ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var _select = select ( store [ "a" /* store */ ] ) ,
isFeatureActive = _select . isFeatureActive ,
getPreference = _select . getPreference ,
_ _experimentalGetPreviewDeviceType = _select . _ _experimentalGetPreviewDeviceType ,
isEditingTemplate = _select . isEditingTemplate ;
var _select2 = select ( 'core' ) ,
getEntityRecord = _select2 . getEntityRecord ,
_ _experimentalGetTemplateForLink = _select2 . _ _experimentalGetTemplateForLink ,
getPostType = _select2 . getPostType ,
getEntityRecords = _select2 . getEntityRecords ;
var _select3 = select ( 'core/editor' ) ,
getEditorSettings = _select3 . getEditorSettings ,
getCurrentPost = _select3 . getCurrentPost ;
var _select4 = select ( external _wp _blocks _ [ "store" ] ) ,
getBlockTypes = _select4 . getBlockTypes ;
var isTemplate = [ 'wp_template' , 'wp_template_part' ] . includes ( postType ) ; // Ideally the initializeEditor function should be called using the ID of the REST endpoint.
// to avoid the special case.
var postObject ;
if ( isTemplate ) {
var posts = getEntityRecords ( 'postType' , postType , {
wp _id : postId
2020-01-08 12:57:23 +01:00
} ) ;
2021-01-28 03:04:13 +01:00
postObject = posts === null || posts === void 0 ? void 0 : posts [ 0 ] ;
} else {
postObject = getEntityRecord ( 'postType' , postType , postId ) ;
2020-01-08 12:57:23 +01:00
}
2021-01-28 03:04:13 +01:00
var isFSETheme = getEditorSettings ( ) . isFSETheme ;
var isViewable = ( _getPostType$viewable = ( _getPostType = getPostType ( postType ) ) === null || _getPostType === void 0 ? void 0 : _getPostType . viewable ) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false ;
return {
hasFixedToolbar : isFeatureActive ( 'fixedToolbar' ) || _ _experimentalGetPreviewDeviceType ( ) !== 'Desktop' ,
focusMode : isFeatureActive ( 'focusMode' ) ,
hasReducedUI : isFeatureActive ( 'reducedUI' ) ,
hasThemeStyles : isFeatureActive ( 'themeStyles' ) ,
preferredStyleVariations : getPreference ( 'preferredStyleVariations' ) ,
hiddenBlockTypes : getPreference ( 'hiddenBlockTypes' ) ,
blockTypes : getBlockTypes ( ) ,
_ _experimentalLocalAutosaveInterval : getPreference ( 'localAutosaveInterval' ) ,
keepCaretInsideBlock : isFeatureActive ( 'keepCaretInsideBlock' ) ,
isTemplateMode : isEditingTemplate ( ) ,
template : isFSETheme && isViewable && postObject && getCurrentPost ( ) . status !== 'auto-draft' ? _ _experimentalGetTemplateForLink ( postObject . link ) : null ,
post : postObject
} ;
} ) ,
hasFixedToolbar = _useSelect . hasFixedToolbar ,
focusMode = _useSelect . focusMode ,
hasReducedUI = _useSelect . hasReducedUI ,
hasThemeStyles = _useSelect . hasThemeStyles ,
post = _useSelect . post ,
preferredStyleVariations = _useSelect . preferredStyleVariations ,
hiddenBlockTypes = _useSelect . hiddenBlockTypes ,
blockTypes = _useSelect . blockTypes ,
_ _experimentalLocalAutosaveInterval = _useSelect . _ _experimentalLocalAutosaveInterval ,
keepCaretInsideBlock = _useSelect . keepCaretInsideBlock ,
isTemplateMode = _useSelect . isTemplateMode ,
template = _useSelect . template ;
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store [ "a" /* store */ ] ) ,
updatePreferredStyleVariations = _useDispatch . updatePreferredStyleVariations ,
setIsInserterOpened = _useDispatch . setIsInserterOpened ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var editorSettings = Object ( external _wp _element _ [ "useMemo" ] ) ( function ( ) {
var result = editor _objectSpread ( editor _objectSpread ( { } , Object ( external _lodash _ [ "omit" ] ) ( settings , [ 'defaultEditorStyles' , 'styles' ] ) ) , { } , {
_ _experimentalPreferredStyleVariations : {
value : preferredStyleVariations ,
onChange : updatePreferredStyleVariations
} ,
hasFixedToolbar : hasFixedToolbar ,
focusMode : focusMode ,
hasReducedUI : hasReducedUI ,
_ _experimentalLocalAutosaveInterval : _ _experimentalLocalAutosaveInterval ,
// This is marked as experimental to give time for the quick inserter to mature.
_ _experimentalSetIsInserterOpened : setIsInserterOpened ,
keepCaretInsideBlock : keepCaretInsideBlock
} ) ; // Omit hidden block types if exists and non-empty.
if ( Object ( external _lodash _ [ "size" ] ) ( hiddenBlockTypes ) > 0 ) {
// Defer to passed setting for `allowedBlockTypes` if provided as
// anything other than `true` (where `true` is equivalent to allow
// all block types).
var defaultAllowedBlockTypes = true === settings . allowedBlockTypes ? Object ( external _lodash _ [ "map" ] ) ( blockTypes , 'name' ) : settings . allowedBlockTypes || [ ] ;
result . allowedBlockTypes = external _lodash _ [ "without" ] . apply ( void 0 , [ defaultAllowedBlockTypes ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( hiddenBlockTypes ) ) ) ;
}
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
return result ;
} , [ settings , hasFixedToolbar , focusMode , hasReducedUI , hiddenBlockTypes , blockTypes , preferredStyleVariations , _ _experimentalLocalAutosaveInterval , setIsInserterOpened , updatePreferredStyleVariations , keepCaretInsideBlock ] ) ;
var styles = Object ( external _wp _element _ [ "useMemo" ] ) ( function ( ) {
return hasThemeStyles ? settings . styles : settings . defaultEditorStyles ;
} , [ settings , hasThemeStyles ] ) ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
if ( ! post ) {
return null ;
}
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "StrictMode" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( edit _post _settings . Provider , {
value : settings
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "SlotFillProvider" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "__unstableDropZoneContextProvider" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "EditorProvider" ] , Object ( esm _extends [ "a" /* default */ ] ) ( {
settings : editorSettings ,
post : post ,
initialEdits : initialEdits ,
useSubRegistry : false ,
_ _unstableTemplate : isTemplateMode ? template : undefined
} , props ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "ErrorBoundary" ] , {
onError : onError
} , Object ( external _wp _element _ [ "createElement" ] ) ( EditorInitialization , {
postId : postId
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( layout , {
styles : styles
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "KeyboardShortcuts" ] , {
shortcuts : prevent _event _discovery
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editor _ [ "PostLockedModal" ] , null ) ) ) ) ) ) ;
}
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var editor = ( Editor ) ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js
2020-01-08 12:57:23 +01:00
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* External dependencies
* /
2020-06-26 15:33:47 +02:00
2020-01-08 12:57:23 +01:00
/ * *
* WordPress dependencies
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var plugin _block _settings _menu _item _isEverySelectedBlockAllowed = function isEverySelectedBlockAllowed ( selected , allowed ) {
return Object ( external _lodash _ [ "difference" ] ) ( selected , allowed ) . length === 0 ;
} ;
/ * *
* Plugins may want to add an item to the menu either for every block
* or only for the specific ones provided in the ` allowedBlocks ` component property .
*
* If there are multiple blocks selected the item will be rendered if every block
* is of one allowed type ( not necessarily the same ) .
*
* @ param { string [ ] } selectedBlocks Array containing the names of the blocks selected
* @ param { string [ ] } allowedBlocks Array containing the names of the blocks allowed
* @ return { boolean } Whether the item will be rendered or not .
* /
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var shouldRenderItem = function shouldRenderItem ( selectedBlocks , allowedBlocks ) {
return ! Array . isArray ( allowedBlocks ) || plugin _block _settings _menu _item _isEverySelectedBlockAllowed ( selectedBlocks , allowedBlocks ) ;
} ;
/ * *
* Renders a new item in the block settings menu .
*
* @ param { Object } props Component props .
* @ param { Array } [ props . allowedBlocks ] An array containing a list of block names for which the item should be shown . If not present , it 'll be rendered for any block. If multiple blocks are selected, it' ll be shown if and only if all of them are in the allowed list .
* @ param { WPBlockTypeIconRender } [ props . icon ] The [ Dashicon ] ( https : //developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element.
* @ param { string } props . label The menu item text .
* @ param { Function } props . onClick Callback function to be executed when the user click the menu item .
* @ param { boolean } [ props . small ] Whether to render the label or not .
* @ param { string } [ props . role ] The ARIA role for the menu item .
*
* @ example
* < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
* var PluginBlockSettingsMenuItem = wp . editPost . PluginBlockSettingsMenuItem ;
*
* function doOnClick ( ) {
* // To be called when the user clicks the menu item.
* }
*
* function MyPluginBlockSettingsMenuItem ( ) {
* return wp . element . createElement (
* PluginBlockSettingsMenuItem ,
* {
* allowedBlocks : [ 'core/paragraph' ] ,
* icon : 'dashicon-name' ,
* label : _ _ ( 'Menu item text' ) ,
* onClick : doOnClick ,
* }
* ) ;
* }
* ` ` `
*
* @ example
* < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
* import { _ _ } from '@wordpress/i18n' ;
* import { PluginBlockSettingsMenuItem } from '@wordpress/edit-post' ;
*
* const doOnClick = ( ) => {
* // To be called when the user clicks the menu item.
* } ;
*
* const MyPluginBlockSettingsMenuItem = ( ) => (
* < PluginBlockSettingsMenuItem
* allowedBlocks = { [ 'core/paragraph' ] }
* icon = 'dashicon-name'
* label = { _ _ ( 'Menu item text' ) }
* onClick = { doOnClick } / >
* ) ;
* ` ` `
*
* @ return { WPComponent } The component to be rendered .
* /
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
var plugin _block _settings _menu _item _PluginBlockSettingsMenuItem = function PluginBlockSettingsMenuItem ( _ref ) {
var allowedBlocks = _ref . allowedBlocks ,
icon = _ref . icon ,
label = _ref . label ,
onClick = _ref . onClick ,
small = _ref . small ,
role = _ref . role ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "BlockSettingsMenuControls" ] , null , function ( _ref2 ) {
var selectedBlocks = _ref2 . selectedBlocks ,
onClose = _ref2 . onClose ;
if ( ! shouldRenderItem ( selectedBlocks , allowedBlocks ) ) {
2020-01-08 12:57:23 +01:00
return null ;
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "MenuItem" ] , {
onClick : Object ( external _wp _compose _ [ "compose" ] ) ( onClick , onClose ) ,
icon : icon ,
label : small ? label : undefined ,
role : role
} , ! small && label ) ;
} ) ;
} ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var plugin _block _settings _menu _item = ( plugin _block _settings _menu _item _PluginBlockSettingsMenuItem ) ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/plugin-more-menu-item/index.js
2020-01-08 12:57:23 +01:00
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
2020-01-08 12:57:23 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Renders a menu item in ` Plugins ` group in ` More Menu ` drop down , and can be used to as a button or link depending on the props provided .
* The text within the component appears as the menu item label .
*
* @ param { Object } props Component properties .
* @ param { string } [ props . href ] When ` href ` is provided then the menu item is represented as an anchor rather than button . It corresponds to the ` href ` attribute of the anchor .
* @ param { WPBlockTypeIconRender } [ props . icon = inherits from the plugin ] The [ Dashicon ] ( https : //developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
* @ param { Function } [ props . onClick = noop ] The callback function to be executed when the user clicks the menu item .
* @ param { ... * } [ props . other ] Any additional props are passed through to the underlying [ MenuItem ] ( / p a c k a g e s / c o m p o n e n t s / s r c / m e n u - i t e m / R E A D M E . m d ) c o m p o n e n t .
*
* @ example
* < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
* var PluginMoreMenuItem = wp . editPost . PluginMoreMenuItem ;
* var moreIcon = wp . element . createElement ( 'svg' ) ; //... svg element.
*
* function onButtonClick ( ) {
* alert ( 'Button clicked.' ) ;
* }
*
* function MyButtonMoreMenuItem ( ) {
* return wp . element . createElement (
* PluginMoreMenuItem ,
* {
* icon : moreIcon ,
* onClick : onButtonClick ,
* } ,
* _ _ ( 'My button title' )
* ) ;
* }
* ` ` `
*
* @ example
* < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
* import { _ _ } from '@wordpress/i18n' ;
* import { PluginMoreMenuItem } from '@wordpress/edit-post' ;
* import { more } from '@wordpress/icons' ;
*
* function onButtonClick ( ) {
* alert ( 'Button clicked.' ) ;
* }
*
* const MyButtonMoreMenuItem = ( ) => (
* < PluginMoreMenuItem
* icon = { more }
* onClick = { onButtonClick }
* >
* { _ _ ( 'My button title' ) }
* < / P l u g i n M o r e M e n u I t e m >
* ) ;
* ` ` `
*
* @ return { WPComponent } The component to be rendered .
2020-01-08 12:57:23 +01:00
* /
2021-01-28 03:04:13 +01:00
/* harmony default export */ var plugin _more _menu _item = ( Object ( external _wp _compose _ [ "compose" ] ) ( Object ( external _wp _plugins _ [ "withPluginContext" ] ) ( function ( context , ownProps ) {
2020-01-08 12:57:23 +01:00
return {
2021-01-28 03:04:13 +01:00
icon : ownProps . icon || context . icon ,
name : 'core/edit-post/plugin-more-menu'
2019-09-19 17:19:18 +02:00
} ;
2021-01-28 03:04:13 +01:00
} ) ) ( build _module [ "a" /* ActionItem */ ] ) ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/plugin-sidebar-more-menu-item/index.js
2019-10-15 17:37:08 +02:00
2019-09-19 17:19:18 +02:00
/ * *
2020-06-26 15:33:47 +02:00
* WordPress dependencies
2019-09-19 17:19:18 +02:00
* /
2018-12-18 04:14:52 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Renders a menu item in ` Plugins ` group in ` More Menu ` drop down ,
* and can be used to activate the corresponding ` PluginSidebar ` component .
* The text within the component appears as the menu item label .
2020-06-26 15:33:47 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { Object } props Component props .
* @ param { string } props . target A string identifying the target sidebar you wish to be activated by this menu item . Must be the same as the ` name ` prop you have given to that sidebar .
* @ param { WPBlockTypeIconRender } [ props . icon = inherits from the plugin ] The [ Dashicon ] ( https : //developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
2019-09-19 17:19:18 +02:00
*
2020-06-26 15:33:47 +02:00
* @ example
* < caption > ES5 < / c a p t i o n >
2019-10-15 17:37:08 +02:00
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
2021-01-28 03:04:13 +01:00
* var PluginSidebarMoreMenuItem = wp . editPost . PluginSidebarMoreMenuItem ;
2020-06-26 15:33:47 +02:00
* var moreIcon = wp . element . createElement ( 'svg' ) ; //... svg element.
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* function MySidebarMoreMenuItem ( ) {
* return wp . element . createElement (
* PluginSidebarMoreMenuItem ,
* {
* target : 'my-sidebar' ,
* icon : moreIcon ,
* } ,
* _ _ ( 'My sidebar title' )
* )
2019-10-15 17:37:08 +02:00
* }
* ` ` `
2019-09-19 17:19:18 +02:00
*
2020-06-26 15:33:47 +02:00
* @ example
* < caption > ESNext < / c a p t i o n >
2019-10-15 17:37:08 +02:00
* ` ` ` jsx
* // Using ESNext syntax
2020-06-26 15:33:47 +02:00
* import { _ _ } from '@wordpress/i18n' ;
2021-01-28 03:04:13 +01:00
* import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post' ;
2020-06-26 15:33:47 +02:00
* import { more } from '@wordpress/icons' ;
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* const MySidebarMoreMenuItem = ( ) => (
* < PluginSidebarMoreMenuItem
* target = "my-sidebar"
2020-06-26 15:33:47 +02:00
* icon = { more }
* >
2021-01-28 03:04:13 +01:00
* { _ _ ( 'My sidebar title' ) }
* < / P l u g i n S i d e b a r M o r e M e n u I t e m >
2020-06-26 15:33:47 +02:00
* ) ;
2019-10-15 17:37:08 +02:00
* ` ` `
2021-01-28 03:04:13 +01:00
*
* @ return { WPComponent } The component to be rendered .
* /
function PluginSidebarMoreMenuItem ( props ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( build _module [ "c" /* ComplementaryAreaMoreMenuItem */ ] , Object ( esm _extends [ "a" /* default */ ] ) ( {
scope : "core/edit-post"
} , props ) ) ;
}
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/index.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
/ * *
* Reinitializes the editor after the user chooses to reboot the editor after
* an unhandled error occurs , replacing previously mounted editor element using
* an initial state from prior to the crash .
*
* @ param { Object } postType Post type of the post to edit .
* @ param { Object } postId ID of the post to edit .
* @ param { Element } target DOM node in which editor is rendered .
* @ param { ? Object } settings Editor settings object .
* @ param { Object } initialEdits Programmatic edits to apply initially , to be
* considered as non - user - initiated ( bypass for
* unsaved changes prompt ) .
* /
function reinitializeEditor ( postType , postId , target , settings , initialEdits ) {
Object ( external _wp _element _ [ "unmountComponentAtNode" ] ) ( target ) ;
var reboot = reinitializeEditor . bind ( null , postType , postId , target , settings , initialEdits ) ;
Object ( external _wp _element _ [ "render" ] ) ( Object ( external _wp _element _ [ "createElement" ] ) ( editor , {
settings : settings ,
onError : reboot ,
postId : postId ,
postType : postType ,
initialEdits : initialEdits ,
recovery : true
} ) , target ) ;
}
/ * *
* Initializes and returns an instance of Editor .
*
* The return value of this function is not necessary if we change where we
* call initializeEditor ( ) . This is due to metaBox timing .
*
* @ param { string } id Unique identifier for editor instance .
* @ param { Object } postType Post type of the post to edit .
* @ param { Object } postId ID of the post to edit .
* @ param { ? Object } settings Editor settings object .
* @ param { Object } initialEdits Programmatic edits to apply initially , to be
* considered as non - user - initiated ( bypass for
* unsaved changes prompt ) .
2018-12-14 05:41:57 +01:00
* /
2021-01-28 03:04:13 +01:00
function initializeEditor ( id , postType , postId , settings , initialEdits ) {
var target = document . getElementById ( id ) ;
var reboot = reinitializeEditor . bind ( null , postType , postId , target , settings , initialEdits ) ;
Object ( external _wp _blockLibrary _ [ "registerCoreBlocks" ] ) ( ) ;
if ( false ) { } // Show a console log warning if the browser is not in Standards rendering mode.
var documentMode = document . compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks' ;
if ( documentMode !== 'Standards' ) {
// eslint-disable-next-line no-console
console . warn ( "Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins." ) ;
} // This is a temporary fix for a couple of issues specific to Webkit on iOS.
// Without this hack the browser scrolls the mobile toolbar off-screen.
// Once supported in Safari we can replace this in favor of preventScroll.
// For details see issue #18632 and PR #18686
// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.
// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var isIphone = window . navigator . userAgent . indexOf ( 'iPhone' ) !== - 1 ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
if ( isIphone ) {
window . addEventListener ( 'scroll' , function ( event ) {
var editorScrollContainer = document . getElementsByClassName ( 'interface-interface-skeleton__body' ) [ 0 ] ;
if ( event . target === document ) {
// Scroll element into view by scrolling the editor container by the same amount
// that Mobile Safari tried to scroll the html element upwards.
if ( window . scrollY > 100 ) {
editorScrollContainer . scrollTop = editorScrollContainer . scrollTop + window . scrollY ;
} // Undo unwanted scroll on html element, but only in the visual editor.
if ( document . getElementsByClassName ( 'is-mode-visual' ) [ 0 ] ) {
window . scrollTo ( 0 , 0 ) ;
}
}
} ) ;
}
Object ( external _wp _element _ [ "render" ] ) ( Object ( external _wp _element _ [ "createElement" ] ) ( editor , {
settings : settings ,
onError : reboot ,
postId : postId ,
postType : postType ,
initialEdits : initialEdits
} ) , target ) ;
2020-06-26 15:33:47 +02:00
}
2019-10-15 17:37:08 +02:00
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2018-12-17 05:52:00 +01:00
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-18 04:14:52 +01:00
2021-02-02 06:17:13 +01:00
/***/ 46 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , exports ) {
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "keyboardShortcuts" ] ; } ( ) ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2021-02-02 06:17:13 +01:00
/***/ 48 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , exports ) {
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "a11y" ] ; } ( ) ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2019-10-15 17:37:08 +02:00
2021-02-02 06:17:13 +01:00
/***/ 49 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , exports ) {
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "dataControls" ] ; } ( ) ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/***/ 5 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _defineProperty ; } ) ;
function _defineProperty ( obj , key , value ) {
if ( key in obj ) {
Object . defineProperty ( obj , key , {
value : value ,
enumerable : true ,
configurable : true ,
writable : true
} ) ;
} else {
obj [ key ] = value ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return obj ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2020-06-26 15:33:47 +02:00
2021-02-02 06:17:13 +01:00
/***/ 51 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , exports ) {
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "notices" ] ; } ( ) ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2020-06-26 15:33:47 +02:00
2021-02-02 06:17:13 +01:00
/***/ 52 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _setPrototypeOf ; } ) ;
function _setPrototypeOf ( o , p ) {
_setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) {
o . _ _proto _ _ = p ;
return o ;
} ;
return _setPrototypeOf ( o , p ) ;
}
/***/ } ) ,
/***/ 57 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "coreData" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 6 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "blockEditor" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 61 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
"use strict" ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "g" , function ( ) { return /* reexport */ store ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "b" , function ( ) { return /* reexport */ complementary _area ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "c" , function ( ) { return /* reexport */ ComplementaryAreaMoreMenuItem ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "d" , function ( ) { return /* reexport */ fullscreen _mode ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "e" , function ( ) { return /* reexport */ interface _skeleton ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "f" , function ( ) { return /* reexport */ pinned _items ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* reexport */ action _item ; } ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "enableComplementaryArea" , function ( ) { return actions _enableComplementaryArea ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "disableComplementaryArea" , function ( ) { return actions _disableComplementaryArea ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "pinItem" , function ( ) { return actions _pinItem ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "unpinItem" , function ( ) { return actions _unpinItem ; } ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js
var selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getActiveComplementaryArea" , function ( ) { return selectors _getActiveComplementaryArea ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isItemPinned" , function ( ) { return selectors _isItemPinned ; } ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","data"]
var external _wp _data _ = _ _webpack _require _ _ ( 4 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = _ _webpack _require _ _ ( 5 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external "lodash"
var external _lodash _ = _ _webpack _require _ _ ( 2 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/reducer.js
function ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2020-06-26 15:33:47 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2020-06-26 15:33:47 +02:00
* /
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* Reducer to keep tract of the active area per scope .
*
* @ param { boolean } state Previous state .
* @ param { Object } action Action object .
* @ param { string } action . type Action type .
* @ param { string } action . itemType Type of item .
* @ param { string } action . scope Item scope .
* @ param { string } action . item Item name .
*
* @ return { Object } Updated state .
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function singleEnableItems ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var _ref = arguments . length > 1 ? arguments [ 1 ] : undefined ,
type = _ref . type ,
itemType = _ref . itemType ,
scope = _ref . scope ,
item = _ref . item ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
if ( type !== 'SET_SINGLE_ENABLE_ITEM' || ! itemType || ! scope ) {
return state ;
}
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
return _objectSpread ( _objectSpread ( { } , state ) , { } , Object ( defineProperty [ "a" /* default */ ] ) ( { } , itemType , _objectSpread ( _objectSpread ( { } , state [ itemType ] ) , { } , Object ( defineProperty [ "a" /* default */ ] ) ( { } , scope , item || null ) ) ) ) ;
}
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Reducer keeping track of the "pinned" items per scope .
*
* @ param { boolean } state Previous state .
* @ param { Object } action Action object .
* @ param { string } action . type Action type .
* @ param { string } action . itemType Type of item .
* @ param { string } action . scope Item scope .
* @ param { string } action . item Item name .
* @ param { boolean } action . isEnable Whether the item is pinned .
*
* @ return { Object } Updated state .
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function multipleEnableItems ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var _ref2 = arguments . length > 1 ? arguments [ 1 ] : undefined ,
type = _ref2 . type ,
itemType = _ref2 . itemType ,
scope = _ref2 . scope ,
item = _ref2 . item ,
isEnable = _ref2 . isEnable ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
if ( type !== 'SET_MULTIPLE_ENABLE_ITEM' || ! itemType || ! scope || ! item || Object ( external _lodash _ [ "get" ] ) ( state , [ itemType , scope , item ] ) === isEnable ) {
return state ;
}
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var currentTypeState = state [ itemType ] || { } ;
var currentScopeState = currentTypeState [ scope ] || { } ;
return _objectSpread ( _objectSpread ( { } , state ) , { } , Object ( defineProperty [ "a" /* default */ ] ) ( { } , itemType , _objectSpread ( _objectSpread ( { } , currentTypeState ) , { } , Object ( defineProperty [ "a" /* default */ ] ) ( { } , scope , _objectSpread ( _objectSpread ( { } , currentScopeState ) , { } , Object ( defineProperty [ "a" /* default */ ] ) ( { } , item , isEnable || false ) ) ) ) ) ) ;
}
var enableItems = Object ( external _wp _data _ [ "combineReducers" ] ) ( {
singleEnableItems : singleEnableItems ,
multipleEnableItems : multipleEnableItems
} ) ;
/* harmony default export */ var reducer = ( Object ( external _wp _data _ [ "combineReducers" ] ) ( {
enableItems : enableItems
} ) ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns an action object used in signalling that an active area should be changed .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { string } itemType Type of item .
* @ param { string } scope Item scope .
* @ param { string } item Item identifier .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ return { Object } Action object .
* /
function setSingleEnableItem ( itemType , scope , item ) {
return {
type : 'SET_SINGLE_ENABLE_ITEM' ,
itemType : itemType ,
scope : scope ,
item : item
} ;
}
/ * *
* Returns an action object used in signalling that a complementary item should be enabled .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { string } scope Complementary area scope .
* @ param { string } area Area identifier .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ return { Object } Action object .
* /
function actions _enableComplementaryArea ( scope , area ) {
return setSingleEnableItem ( 'complementaryArea' , scope , area ) ;
}
/ * *
* Returns an action object used in signalling that the complementary area of a given scope should be disabled .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { string } scope Complementary area scope .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ return { Object } Action object .
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function actions _disableComplementaryArea ( scope ) {
return setSingleEnableItem ( 'complementaryArea' , scope , undefined ) ;
}
/ * *
* Returns an action object to make an area enabled / disabled .
*
* @ param { string } itemType Type of item .
* @ param { string } scope Item scope .
* @ param { string } item Item identifier .
* @ param { boolean } isEnable Boolean indicating if an area should be pinned or not .
*
* @ return { Object } Action object .
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
function setMultipleEnableItem ( itemType , scope , item , isEnable ) {
2019-10-15 17:37:08 +02:00
return {
2021-01-28 03:04:13 +01:00
type : 'SET_MULTIPLE_ENABLE_ITEM' ,
itemType : itemType ,
scope : scope ,
item : item ,
isEnable : isEnable
2019-10-15 17:37:08 +02:00
} ;
2021-01-28 03:04:13 +01:00
}
2018-12-18 04:14:52 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns an action object used in signalling that an item should be pinned .
*
* @ param { string } scope Item scope .
* @ param { string } itemId Item identifier .
*
* @ return { Object } Action object .
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
function actions _pinItem ( scope , itemId ) {
return setMultipleEnableItem ( 'pinnedItems' , scope , itemId , true ) ;
}
/ * *
* Returns an action object used in signalling that an item should be unpinned .
*
* @ param { string } scope Item scope .
* @ param { string } itemId Item identifier .
*
* @ return { Object } Action object .
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
function actions _unpinItem ( scope , itemId ) {
return setMultipleEnableItem ( 'pinnedItems' , scope , itemId , false ) ;
}
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js
/ * *
* External dependencies
* /
2019-10-15 17:37:08 +02:00
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Returns the item that is enabled in a given scope .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { Object } state Global application state .
* @ param { string } itemType Type of item .
* @ param { string } scope Item scope .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ return { ? string | null } The item that is enabled in the passed scope and type .
* /
function getSingleEnableItem ( state , itemType , scope ) {
return Object ( external _lodash _ [ "get" ] ) ( state . enableItems . singleEnableItems , [ itemType , scope ] ) ;
}
/ * *
* Returns the complementary area that is active in a given scope .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { Object } state Global application state .
* @ param { string } scope Item scope .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ return { string } The complementary area that is active in the given scope .
* /
function selectors _getActiveComplementaryArea ( state , scope ) {
return getSingleEnableItem ( state , 'complementaryArea' , scope ) ;
}
/ * *
* Returns a boolean indicating if an item is enabled or not in a given scope .
2019-09-19 17:19:18 +02:00
*
2021-01-28 03:04:13 +01:00
* @ param { Object } state Global application state .
* @ param { string } itemType Type of item .
* @ param { string } scope Scope .
* @ param { string } item Item to check .
2019-10-15 17:37:08 +02:00
*
2021-01-28 03:04:13 +01:00
* @ return { boolean | undefined } True if the item is enabled , false otherwise if the item is explicitly disabled , and undefined if there is no information for that item .
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function isMultipleEnabledItemEnabled ( state , itemType , scope , item ) {
return Object ( external _lodash _ [ "get" ] ) ( state . enableItems . multipleEnableItems , [ itemType , scope , item ] ) ;
}
/ * *
* Returns a boolean indicating if an item is pinned or not .
*
* @ param { Object } state Global application state .
* @ param { string } scope Scope .
* @ param { string } item Item to check .
*
* @ return { boolean } True if the item is pinned and false otherwise .
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
function selectors _isItemPinned ( state , scope , item ) {
return isMultipleEnabledItemEnabled ( state , 'pinnedItems' , scope , item ) !== false ;
}
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js
2020-01-08 12:57:23 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* The identifier for the data store .
*
* @ type { string }
2020-01-08 12:57:23 +01:00
* /
2021-01-28 03:04:13 +01:00
var STORE _NAME = 'core/interface' ;
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js
/ * *
* WordPress dependencies
* /
2019-10-15 17:37:08 +02:00
2019-09-19 17:19:18 +02:00
/ * *
2020-06-26 15:33:47 +02:00
* Internal dependencies
2019-09-19 17:19:18 +02:00
* /
2019-10-15 17:37:08 +02:00
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* Store definition for the interface namespace .
*
2021-02-02 06:17:13 +01:00
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
2021-01-28 03:04:13 +01:00
*
* @ type { Object }
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
var store = Object ( external _wp _data _ [ "createReduxStore" ] ) ( STORE _NAME , {
reducer : reducer ,
actions : actions _namespaceObject ,
selectors : selectors _namespaceObject ,
persist : [ 'enableItems' ]
} ) ; // 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.
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
Object ( external _wp _data _ [ "registerStore" ] ) ( STORE _NAME , {
reducer : reducer ,
actions : actions _namespaceObject ,
selectors : selectors _namespaceObject ,
persist : [ 'enableItems' ]
} ) ;
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm _extends = _ _webpack _require _ _ ( 8 ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = _ _webpack _require _ _ ( 13 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","element"]
var external _wp _element _ = _ _webpack _require _ _ ( 0 ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = _ _webpack _require _ _ ( 10 ) ;
var classnames _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( classnames ) ;
2020-08-10 16:18:33 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","components"]
var external _wp _components _ = _ _webpack _require _ _ ( 3 ) ;
2020-08-10 16:18:33 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","i18n"]
var external _wp _i18n _ = _ _webpack _require _ _ ( 1 ) ;
2020-08-10 16:18:33 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
2021-02-02 06:17:13 +01:00
var check = _ _webpack _require _ _ ( 161 ) ;
2020-08-10 16:18:33 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js
2021-02-02 06:17:13 +01:00
var star _filled = _ _webpack _require _ _ ( 303 ) ;
2020-08-10 16:18:33 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js
2021-02-02 06:17:13 +01:00
var star _empty = _ _webpack _require _ _ ( 304 ) ;
2020-08-10 16:18:33 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","viewport"]
2021-02-02 06:17:13 +01:00
var external _wp _viewport _ = _ _webpack _require _ _ ( 114 ) ;
2020-08-10 16:18:33 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
2021-02-02 06:17:13 +01:00
var close _small = _ _webpack _require _ _ ( 159 ) ;
2020-08-10 16:18:33 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","plugins"]
2021-02-02 06:17:13 +01:00
var external _wp _plugins _ = _ _webpack _require _ _ ( 73 ) ;
2020-08-10 16:18:33 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js
2020-08-10 16:18:33 +02:00
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
/* harmony default export */ var complementary _area _context = ( Object ( external _wp _plugins _ [ "withPluginContext" ] ) ( function ( context , ownProps ) {
return {
icon : ownProps . icon || context . icon ,
identifier : ownProps . identifier || "" . concat ( context . name , "/" ) . concat ( ownProps . name )
} ;
2020-08-10 16:18:33 +02:00
} ) ) ;
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js
2020-08-10 16:18:33 +02:00
2018-12-14 05:41:57 +01:00
2020-06-26 15:33:47 +02:00
2018-12-14 05:41:57 +01:00
/ * *
* External dependencies
* /
/ * *
2018-12-18 04:14:52 +01:00
* WordPress dependencies
2018-12-14 05:41:57 +01:00
* /
2020-06-26 15:33:47 +02:00
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function ComplementaryAreaToggle ( _ref ) {
var _ref$as = _ref . as ,
as = _ref$as === void 0 ? external _wp _components _ [ "Button" ] : _ref$as ,
scope = _ref . scope ,
identifier = _ref . identifier ,
icon = _ref . icon ,
selectedIcon = _ref . selectedIcon ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "as" , "scope" , "identifier" , "icon" , "selectedIcon" ] ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var ComponentToUse = as ;
var isSelected = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return select ( store ) . getActiveComplementaryArea ( scope ) === identifier ;
} , [ identifier ] ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store ) ,
enableComplementaryArea = _useDispatch . enableComplementaryArea ,
disableComplementaryArea = _useDispatch . disableComplementaryArea ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( ComponentToUse , Object ( esm _extends [ "a" /* default */ ] ) ( {
icon : selectedIcon && isSelected ? selectedIcon : icon ,
onClick : function onClick ( ) {
if ( isSelected ) {
disableComplementaryArea ( scope ) ;
} else {
enableComplementaryArea ( scope , identifier ) ;
}
2020-06-26 15:33:47 +02:00
}
2021-01-28 03:04:13 +01:00
} , Object ( external _lodash _ [ "omit" ] ) ( props , [ 'name' ] ) ) ) ;
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var complementary _area _toggle = ( complementary _area _context ( ComplementaryAreaToggle ) ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js
2020-02-10 23:33:27 +01:00
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-09-19 17:19:18 +02:00
* /
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var complementary _area _header _ComplementaryAreaHeader = function ComplementaryAreaHeader ( _ref ) {
var smallScreenTitle = _ref . smallScreenTitle ,
children = _ref . children ,
className = _ref . className ,
toggleButtonProps = _ref . toggleButtonProps ;
var toggleButton = Object ( external _wp _element _ [ "createElement" ] ) ( complementary _area _toggle , Object ( esm _extends [ "a" /* default */ ] ) ( {
icon : close _small [ "a" /* default */ ]
} , toggleButtonProps ) ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "components-panel__header interface-complementary-area-header__small"
} , smallScreenTitle && Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "interface-complementary-area-header__small-title"
} , smallScreenTitle ) , toggleButton ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : classnames _default ( ) ( 'components-panel__header' , 'interface-complementary-area-header' , className ) ,
tabIndex : - 1
} , children , toggleButton ) ) ;
2019-10-15 17:37:08 +02:00
} ;
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var complementary _area _header = ( complementary _area _header _ComplementaryAreaHeader ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/pinned-items/index.js
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function PinnedItems ( _ref ) {
var scope = _ref . scope ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "scope" ] ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Fill" ] , Object ( esm _extends [ "a" /* default */ ] ) ( {
name : "PinnedItems/" . concat ( scope )
} , props ) ) ;
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
function PinnedItemsSlot ( _ref2 ) {
var scope = _ref2 . scope ,
className = _ref2 . className ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref2 , [ "scope" , "className" ] ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Slot" ] , Object ( esm _extends [ "a" /* default */ ] ) ( {
name : "PinnedItems/" . concat ( scope )
} , props ) , function ( fills ) {
return ! Object ( external _lodash _ [ "isEmpty" ] ) ( fills ) && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : classnames _default ( ) ( className , 'interface-pinned-items' )
} , fills ) ;
} ) ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
PinnedItems . Slot = PinnedItemsSlot ;
/* harmony default export */ var pinned _items = ( PinnedItems ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area/index.js
2020-02-06 22:03:31 +01:00
2020-06-26 15:33:47 +02:00
2019-10-15 17:37:08 +02:00
/ * *
* External dependencies
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2018-12-14 05:53:54 +01:00
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
2021-01-28 03:04:13 +01:00
function ComplementaryAreaSlot ( _ref ) {
var scope = _ref . scope ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "scope" ] ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Slot" ] , Object ( esm _extends [ "a" /* default */ ] ) ( {
name : "ComplementaryArea/" . concat ( scope )
} , props ) ) ;
}
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
function ComplementaryAreaFill ( _ref2 ) {
var scope = _ref2 . scope ,
children = _ref2 . children ,
className = _ref2 . className ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Fill" ] , {
name : "ComplementaryArea/" . concat ( scope )
} , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : className
} , children ) ) ;
}
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
function useAdjustComplementaryListener ( scope , identifier , activeArea , isActive , isSmall ) {
var previousIsSmall = Object ( external _wp _element _ [ "useRef" ] ) ( false ) ;
var shouldOpenWhenNotSmall = Object ( external _wp _element _ [ "useRef" ] ) ( false ) ;
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
var _useDispatch = Object ( external _wp _data _ [ "useDispatch" ] ) ( store ) ,
enableComplementaryArea = _useDispatch . enableComplementaryArea ,
disableComplementaryArea = _useDispatch . disableComplementaryArea ;
Object ( external _wp _element _ [ "useEffect" ] ) ( function ( ) {
// If the complementary area is active and the editor is switching from a big to a small window size.
if ( isActive && isSmall && ! previousIsSmall . current ) {
// Disable the complementary area.
disableComplementaryArea ( scope ) ; // Flag the complementary area to be reopened when the window size goes from small to big.
shouldOpenWhenNotSmall . current = true ;
} else if ( // If there is a flag indicating the complementary area should be enabled when we go from small to big window size
// and we are going from a small to big window size.
shouldOpenWhenNotSmall . current && ! isSmall && previousIsSmall . current ) {
// Remove the flag indicating the complementary area should be enabled.
shouldOpenWhenNotSmall . current = false ; // Enable the complementary area.
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
enableComplementaryArea ( scope , identifier ) ;
} else if ( // If the flag is indicating the current complementary should be reopened but another complementary area becomes active,
// remove the flag.
shouldOpenWhenNotSmall . current && activeArea && activeArea !== identifier ) {
shouldOpenWhenNotSmall . current = false ;
2019-09-19 17:19:18 +02:00
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
if ( isSmall !== previousIsSmall . current ) {
previousIsSmall . current = isSmall ;
2019-10-15 17:37:08 +02:00
}
2021-01-28 03:04:13 +01:00
} , [ isActive , isSmall , scope , identifier , activeArea ] ) ;
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
function ComplementaryArea ( _ref3 ) {
var children = _ref3 . children ,
className = _ref3 . className ,
_ref3$closeLabel = _ref3 . closeLabel ,
closeLabel = _ref3$closeLabel === void 0 ? Object ( external _wp _i18n _ [ "__" ] ) ( 'Close plugin' ) : _ref3$closeLabel ,
identifier = _ref3 . identifier ,
header = _ref3 . header ,
headerClassName = _ref3 . headerClassName ,
icon = _ref3 . icon ,
_ref3$isPinnable = _ref3 . isPinnable ,
isPinnable = _ref3$isPinnable === void 0 ? true : _ref3$isPinnable ,
panelClassName = _ref3 . panelClassName ,
scope = _ref3 . scope ,
smallScreenTitle = _ref3 . smallScreenTitle ,
title = _ref3 . title ,
toggleShortcut = _ref3 . toggleShortcut ,
isActiveByDefault = _ref3 . isActiveByDefault ,
_ref3$showIconLabels = _ref3 . showIconLabels ,
showIconLabels = _ref3$showIconLabels === void 0 ? false : _ref3$showIconLabels ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var _useSelect = Object ( external _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select = select ( store ) ,
getActiveComplementaryArea = _select . getActiveComplementaryArea ,
isItemPinned = _select . isItemPinned ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var _activeArea = getActiveComplementaryArea ( scope ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
return {
isActive : _activeArea === identifier ,
isPinned : isItemPinned ( scope , identifier ) ,
activeArea : _activeArea ,
isSmall : select ( external _wp _viewport _ [ "store" ] ) . isViewportMatch ( '< medium' ) ,
isLarge : select ( external _wp _viewport _ [ "store" ] ) . isViewportMatch ( 'large' )
} ;
} , [ identifier , scope ] ) ,
isActive = _useSelect . isActive ,
isPinned = _useSelect . isPinned ,
activeArea = _useSelect . activeArea ,
isSmall = _useSelect . isSmall ,
isLarge = _useSelect . isLarge ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
useAdjustComplementaryListener ( scope , identifier , activeArea , isActive , isSmall ) ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
var _useDispatch2 = Object ( external _wp _data _ [ "useDispatch" ] ) ( store ) ,
enableComplementaryArea = _useDispatch2 . enableComplementaryArea ,
disableComplementaryArea = _useDispatch2 . disableComplementaryArea ,
pinItem = _useDispatch2 . pinItem ,
unpinItem = _useDispatch2 . unpinItem ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
Object ( external _wp _element _ [ "useEffect" ] ) ( function ( ) {
if ( isActiveByDefault && activeArea === undefined && ! isSmall ) {
enableComplementaryArea ( scope , identifier ) ;
}
} , [ activeArea , isActiveByDefault , scope , identifier , isSmall ] ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , isPinned && isPinnable && Object ( external _wp _element _ [ "createElement" ] ) ( pinned _items , {
scope : scope
} , Object ( external _wp _element _ [ "createElement" ] ) ( complementary _area _toggle , {
scope : scope ,
identifier : identifier ,
isPressed : isActive && ( ! showIconLabels || isLarge ) ,
"aria-expanded" : isActive ,
label : title ,
icon : showIconLabels ? check [ "a" /* default */ ] : icon ,
showTooltip : ! showIconLabels ,
isTertiary : showIconLabels
} ) ) , isActive && Object ( external _wp _element _ [ "createElement" ] ) ( ComplementaryAreaFill , {
className : classnames _default ( ) ( 'interface-complementary-area' , className ) ,
scope : scope
} , Object ( external _wp _element _ [ "createElement" ] ) ( complementary _area _header , {
className : headerClassName ,
closeLabel : closeLabel ,
onClose : function onClose ( ) {
return disableComplementaryArea ( scope ) ;
} ,
smallScreenTitle : smallScreenTitle ,
toggleButtonProps : {
label : closeLabel ,
shortcut : toggleShortcut ,
scope : scope ,
identifier : identifier
}
} , header || Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "strong" , null , title ) , isPinnable && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
className : "interface-complementary-area__pin-unpin-item" ,
icon : isPinned ? star _filled [ "a" /* default */ ] : star _empty [ "a" /* default */ ] ,
label : isPinned ? Object ( external _wp _i18n _ [ "__" ] ) ( 'Unpin from toolbar' ) : Object ( external _wp _i18n _ [ "__" ] ) ( 'Pin to toolbar' ) ,
onClick : function onClick ( ) {
return ( isPinned ? unpinItem : pinItem ) ( scope , identifier ) ;
} ,
isPressed : isPinned ,
"aria-expanded" : isPinned
} ) ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Panel" ] , {
className : panelClassName
} , children ) ) ) ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
var ComplementaryAreaWrapped = complementary _area _context ( ComplementaryArea ) ;
ComplementaryAreaWrapped . Slot = ComplementaryAreaSlot ;
/* harmony default export */ var complementary _area = ( ComplementaryAreaWrapped ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = _ _webpack _require _ _ ( 11 ) ;
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js
2019-09-19 17:19:18 +02:00
2018-12-18 04:14:52 +01:00
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
function action _item _ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
function action _item _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { action _item _ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { action _item _ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-10-15 17:37:08 +02:00
* /
2019-03-07 10:09:59 +01:00
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
function ActionItemSlot ( _ref ) {
var name = _ref . name ,
_ref$as = _ref . as ,
as = _ref$as === void 0 ? [ external _wp _components _ [ "ButtonGroup" ] , external _wp _components _ [ "Button" ] ] : _ref$as ,
_ref$fillProps = _ref . fillProps ,
fillProps = _ref$fillProps === void 0 ? { } : _ref$fillProps ,
bubblesVirtually = _ref . bubblesVirtually ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "name" , "as" , "fillProps" , "bubblesVirtually" ] ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _as = Object ( slicedToArray [ "a" /* default */ ] ) ( as , 2 ) ,
Container = _as [ 0 ] ,
Item = _as [ 1 ] ;
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Slot" ] , {
name : name ,
bubblesVirtually : bubblesVirtually ,
fillProps : action _item _objectSpread ( {
as : Item
} , fillProps )
} , function ( fills ) {
return ! Object ( external _lodash _ [ "isEmpty" ] ) ( fills ) && Object ( external _wp _element _ [ "createElement" ] ) ( Container , props , fills ) ;
} ) ;
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
function ActionItem ( _ref2 ) {
var name = _ref2 . name ,
as = _ref2 . as ,
onClick = _ref2 . onClick ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref2 , [ "name" , "as" , "onClick" ] ) ;
2018-12-19 04:16:48 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Fill" ] , {
name : name
} , function ( fillProps ) {
var fpOnClick = fillProps . onClick ,
fpAs = fillProps . as ;
var Item = as || fpAs || external _wp _components _ [ "Button" ] ;
return Object ( external _wp _element _ [ "createElement" ] ) ( Item , Object ( esm _extends [ "a" /* default */ ] ) ( {
onClick : onClick || fpOnClick ? function ( ) {
( onClick || external _lodash _ [ "noop" ] ) . apply ( void 0 , arguments ) ;
( fpOnClick || external _lodash _ [ "noop" ] ) . apply ( void 0 , arguments ) ;
} : undefined
} , props ) ) ;
} ) ;
}
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
ActionItem . Slot = ActionItemSlot ;
/* harmony default export */ var action _item = ( ActionItem ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-more-menu-item/index.js
2020-01-08 12:57:23 +01:00
2019-03-21 13:48:00 +01:00
2020-02-06 22:03:31 +01:00
2018-12-14 05:53:54 +01:00
/ * *
2020-06-26 15:33:47 +02:00
* WordPress dependencies
2018-12-14 05:53:54 +01:00
* /
2020-06-26 15:33:47 +02:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2019-09-19 17:19:18 +02:00
* /
2021-01-28 03:04:13 +01:00
function ComplementaryAreaMoreMenuItem ( _ref ) {
var scope = _ref . scope ,
target = _ref . target ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "scope" , "target" ] ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( complementary _area _toggle , Object ( esm _extends [ "a" /* default */ ] ) ( {
as : function as ( toggleProps ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( action _item , Object ( esm _extends [ "a" /* default */ ] ) ( {
name : "" . concat ( scope , "/plugin-more-menu" )
} , toggleProps ) ) ;
} ,
role : "menuitemcheckbox" ,
selectedIcon : check [ "a" /* default */ ] ,
name : target ,
scope : scope
2020-06-26 15:33:47 +02:00
} , props ) ) ;
}
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = _ _webpack _require _ _ ( 25 ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = _ _webpack _require _ _ ( 26 ) ;
2021-02-02 06:17:13 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
2021-01-28 03:04:13 +01:00
var inherits = _ _webpack _require _ _ ( 28 ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
var possibleConstructorReturn = _ _webpack _require _ _ ( 29 ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
var getPrototypeOf = _ _webpack _require _ _ ( 19 ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/fullscreen-mode/index.js
function _createSuper ( Derived ) { var hasNativeReflectConstruct = _isNativeReflectConstruct ( ) ; return function _createSuperInternal ( ) { var Super = Object ( getPrototypeOf [ "a" /* default */ ] ) ( Derived ) , result ; if ( hasNativeReflectConstruct ) { var NewTarget = Object ( getPrototypeOf [ "a" /* default */ ] ) ( this ) . constructor ; result = Reflect . construct ( Super , arguments , NewTarget ) ; } else { result = Super . apply ( this , arguments ) ; } return Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , result ) ; } ; }
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
function _isNativeReflectConstruct ( ) { if ( typeof Reflect === "undefined" || ! Reflect . construct ) return false ; if ( Reflect . construct . sham ) return false ; if ( typeof Proxy === "function" ) return true ; try { Date . prototype . toString . call ( Reflect . construct ( Date , [ ] , function ( ) { } ) ) ; return true ; } catch ( e ) { return false ; } }
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
var fullscreen _mode _FullscreenMode = /*#__PURE__*/ function ( _Component ) {
Object ( inherits [ "a" /* default */ ] ) ( FullscreenMode , _Component ) ;
var _super = _createSuper ( FullscreenMode ) ;
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
function FullscreenMode ( ) {
Object ( classCallCheck [ "a" /* default */ ] ) ( this , FullscreenMode ) ;
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
return _super . apply ( this , arguments ) ;
}
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
Object ( createClass [ "a" /* default */ ] ) ( FullscreenMode , [ {
key : "componentDidMount" ,
value : function componentDidMount ( ) {
this . isSticky = false ;
this . sync ( ) ; // `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes
// `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled
// even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as
// a consequence of the FullscreenMode setup
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
if ( document . body . classList . contains ( 'sticky-menu' ) ) {
this . isSticky = true ;
document . body . classList . remove ( 'sticky-menu' ) ;
}
}
} , {
key : "componentWillUnmount" ,
value : function componentWillUnmount ( ) {
if ( this . isSticky ) {
document . body . classList . add ( 'sticky-menu' ) ;
}
2019-09-19 17:19:18 +02:00
2021-01-28 03:04:13 +01:00
if ( this . props . isActive ) {
document . body . classList . remove ( 'is-fullscreen-mode' ) ;
}
}
} , {
key : "componentDidUpdate" ,
value : function componentDidUpdate ( prevProps ) {
if ( this . props . isActive !== prevProps . isActive ) {
this . sync ( ) ;
}
}
} , {
key : "sync" ,
value : function sync ( ) {
var isActive = this . props . isActive ;
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
if ( isActive ) {
document . body . classList . add ( 'is-fullscreen-mode' ) ;
} else {
document . body . classList . remove ( 'is-fullscreen-mode' ) ;
}
}
} , {
key : "render" ,
value : function render ( ) {
return null ;
}
} ] ) ;
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
return FullscreenMode ;
} ( external _wp _element _ [ "Component" ] ) ;
/* harmony default export */ var fullscreen _mode = ( fullscreen _mode _FullscreenMode ) ;
2020-10-20 15:36:16 +02:00
2021-02-02 06:17:13 +01:00
// EXTERNAL MODULE: ./node_modules/react-merge-refs/dist/react-merge-refs.esm.js
var react _merge _refs _esm = _ _webpack _require _ _ ( 72 ) ;
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
function interface _skeleton _ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
2018-12-14 05:53:54 +01:00
2021-01-28 03:04:13 +01:00
function interface _skeleton _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { interface _skeleton _ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { interface _skeleton _ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2020-01-22 23:06:21 +01:00
* /
2018-12-14 05:53:54 +01:00
2021-02-02 06:17:13 +01:00
2020-01-22 23:06:21 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-01-22 23:06:21 +01:00
* /
2018-12-14 05:53:54 +01:00
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
function useHTMLClass ( className ) {
Object ( external _wp _element _ [ "useEffect" ] ) ( function ( ) {
var element = document && document . querySelector ( "html:not(." . concat ( className , ")" ) ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
if ( ! element ) {
return ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
element . classList . toggle ( className ) ;
return function ( ) {
element . classList . toggle ( className ) ;
} ;
} , [ className ] ) ;
}
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
function InterfaceSkeleton ( _ref , ref ) {
var footer = _ref . footer ,
header = _ref . header ,
sidebar = _ref . sidebar ,
secondarySidebar = _ref . secondarySidebar ,
content = _ref . content ,
drawer = _ref . drawer ,
actions = _ref . actions ,
labels = _ref . labels ,
className = _ref . className ,
shortcuts = _ref . shortcuts ;
var fallbackRef = Object ( external _wp _element _ [ "useRef" ] ) ( ) ;
2021-02-02 06:17:13 +01:00
var regionsClassName = Object ( external _wp _components _ [ "__unstableUseNavigateRegions" ] ) ( fallbackRef , shortcuts ) ;
2021-01-28 03:04:13 +01:00
useHTMLClass ( 'interface-interface-skeleton__html-container' ) ;
var defaultLabels = {
/* translators: accessibility text for the nav bar landmark region. */
drawer : Object ( external _wp _i18n _ [ "__" ] ) ( 'Drawer' ) ,
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/* translators: accessibility text for the top bar landmark region. */
header : Object ( external _wp _i18n _ [ "__" ] ) ( 'Header' ) ,
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/* translators: accessibility text for the content landmark region. */
body : Object ( external _wp _i18n _ [ "__" ] ) ( 'Content' ) ,
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
/* translators: accessibility text for the secondary sidebar landmark region. */
secondarySidebar : Object ( external _wp _i18n _ [ "__" ] ) ( 'Block Library' ) ,
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
/* translators: accessibility text for the settings landmark region. */
sidebar : Object ( external _wp _i18n _ [ "__" ] ) ( 'Settings' ) ,
/* translators: accessibility text for the publish landmark region. */
actions : Object ( external _wp _i18n _ [ "__" ] ) ( 'Publish' ) ,
/* translators: accessibility text for the footer landmark region. */
footer : Object ( external _wp _i18n _ [ "__" ] ) ( 'Footer' )
} ;
var mergedLabels = interface _skeleton _objectSpread ( interface _skeleton _objectSpread ( { } , defaultLabels ) , labels ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
2021-02-02 06:17:13 +01:00
ref : Object ( external _wp _element _ [ "useCallback" ] ) ( Object ( react _merge _refs _esm [ "a" /* default */ ] ) ( [ ref , fallbackRef ] ) , [ ref , fallbackRef ] ) ,
className : classnames _default ( ) ( className , 'interface-interface-skeleton' , regionsClassName , ! ! footer && 'has-footer' )
2021-01-28 03:04:13 +01:00
} , ! ! drawer && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "interface-interface-skeleton__drawer" ,
role : "region" ,
"aria-label" : mergedLabels . drawer
} , drawer ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "interface-interface-skeleton__editor"
} , ! ! header && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "interface-interface-skeleton__header" ,
role : "region" ,
"aria-label" : mergedLabels . header ,
tabIndex : "-1"
} , header ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "interface-interface-skeleton__body"
} , ! ! secondarySidebar && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "interface-interface-skeleton__secondary-sidebar" ,
role : "region" ,
"aria-label" : mergedLabels . secondarySidebar ,
tabIndex : "-1"
} , secondarySidebar ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "interface-interface-skeleton__content" ,
role : "region" ,
"aria-label" : mergedLabels . body ,
tabIndex : "-1"
} , content ) , ! ! sidebar && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "interface-interface-skeleton__sidebar" ,
role : "region" ,
"aria-label" : mergedLabels . sidebar ,
tabIndex : "-1"
} , sidebar ) , ! ! actions && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "interface-interface-skeleton__actions" ,
role : "region" ,
"aria-label" : mergedLabels . actions ,
tabIndex : "-1"
} , actions ) ) ) , ! ! footer && Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "interface-interface-skeleton__footer" ,
role : "region" ,
"aria-label" : mergedLabels . footer ,
tabIndex : "-1"
} , footer ) ) ;
2020-01-22 23:06:21 +01:00
}
2021-01-28 03:04:13 +01:00
/* harmony default export */ var interface _skeleton = ( Object ( external _wp _element _ [ "forwardRef" ] ) ( InterfaceSkeleton ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js
2020-01-22 23:06:21 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2020-01-22 23:06:21 +01:00
2021-02-02 06:17:13 +01:00
/***/ 65 :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* reexport */ enable _custom _fields ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "c" , function ( ) { return /* reexport */ enable _panel ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "d" , function ( ) { return /* reexport */ enable _plugin _document _setting _panel ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "e" , function ( ) { return /* reexport */ enable _publish _sidebar ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "b" , function ( ) { return /* reexport */ enable _feature ; } ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = _ _webpack _require _ _ ( 11 ) ;
// EXTERNAL MODULE: external ["wp","element"]
var external _wp _element _ = _ _webpack _require _ _ ( 0 ) ;
// EXTERNAL MODULE: external ["wp","i18n"]
var external _wp _i18n _ = _ _webpack _require _ _ ( 1 ) ;
// EXTERNAL MODULE: external ["wp","components"]
var external _wp _components _ = _ _webpack _require _ _ ( 3 ) ;
// EXTERNAL MODULE: external ["wp","data"]
var external _wp _data _ = _ _webpack _require _ _ ( 4 ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/base.js
/ * *
* WordPress dependencies
* /
function BaseOption ( _ref ) {
var help = _ref . help ,
label = _ref . label ,
isChecked = _ref . isChecked ,
onChange = _ref . onChange ,
children = _ref . children ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-preferences-modal__option"
2021-02-02 06:17:13 +01:00
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "ToggleControl" ] , {
2021-01-28 03:04:13 +01:00
help : help ,
label : label ,
checked : isChecked ,
onChange : onChange
} ) , children ) ;
}
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var base = ( BaseOption ) ;
2020-10-20 15:36:16 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/enable-custom-fields.js
2020-03-24 00:40:19 +01:00
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
2020-06-26 15:33:47 +02:00
/ * *
* Internal dependencies
* /
2021-01-28 03:04:13 +01:00
function CustomFieldsConfirmation ( _ref ) {
var willEnable = _ref . willEnable ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _useState = Object ( external _wp _element _ [ "useState" ] ) ( false ) ,
_useState2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _useState , 2 ) ,
isReloading = _useState2 [ 0 ] ,
setIsReloading = _useState2 [ 1 ] ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-preferences-modal__custom-fields-confirmation-message"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'A page reload is required for this change. Make sure your content is saved before reloading.' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
className : "edit-post-preferences-modal__custom-fields-confirmation-button" ,
isSecondary : true ,
isBusy : isReloading ,
disabled : isReloading ,
onClick : function onClick ( ) {
setIsReloading ( true ) ;
document . getElementById ( 'toggle-custom-fields-form' ) . submit ( ) ;
}
} , willEnable ? Object ( external _wp _i18n _ [ "__" ] ) ( 'Enable & Reload' ) : Object ( external _wp _i18n _ [ "__" ] ) ( 'Disable & Reload' ) ) ) ;
}
function EnableCustomFieldsOption ( _ref2 ) {
var label = _ref2 . label ,
areCustomFieldsEnabled = _ref2 . areCustomFieldsEnabled ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
var _useState3 = Object ( external _wp _element _ [ "useState" ] ) ( areCustomFieldsEnabled ) ,
_useState4 = Object ( slicedToArray [ "a" /* default */ ] ) ( _useState3 , 2 ) ,
isChecked = _useState4 [ 0 ] ,
setIsChecked = _useState4 [ 1 ] ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( base , {
label : label ,
isChecked : isChecked ,
onChange : setIsChecked
} , isChecked !== areCustomFieldsEnabled && Object ( external _wp _element _ [ "createElement" ] ) ( CustomFieldsConfirmation , {
willEnable : isChecked
} ) ) ;
}
/* harmony default export */ var enable _custom _fields = ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
areCustomFieldsEnabled : ! ! select ( 'core/editor' ) . getEditorSettings ( ) . enableCustomFields
} ;
} ) ( EnableCustomFieldsOption ) ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","compose"]
var external _wp _compose _ = _ _webpack _require _ _ ( 12 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js + 5 modules
var store = _ _webpack _require _ _ ( 23 ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/enable-panel.js
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2021-01-28 03:04:13 +01:00
/* harmony default export */ var enable _panel = ( Object ( external _wp _compose _ [ "compose" ] ) ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select , _ref ) {
2020-06-26 15:33:47 +02:00
var panelName = _ref . panelName ;
2021-01-28 03:04:13 +01:00
var _select = select ( store [ "a" /* store */ ] ) ,
2020-06-26 15:33:47 +02:00
isEditorPanelEnabled = _select . isEditorPanelEnabled ,
isEditorPanelRemoved = _select . isEditorPanelRemoved ;
return {
isRemoved : isEditorPanelRemoved ( panelName ) ,
isChecked : isEditorPanelEnabled ( panelName )
} ;
2021-01-28 03:04:13 +01:00
} ) , Object ( external _wp _compose _ [ "ifCondition" ] ) ( function ( _ref2 ) {
2020-06-26 15:33:47 +02:00
var isRemoved = _ref2 . isRemoved ;
return ! isRemoved ;
2021-01-28 03:04:13 +01:00
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , _ref3 ) {
2020-06-26 15:33:47 +02:00
var panelName = _ref3 . panelName ;
return {
onChange : function onChange ( ) {
2021-01-28 03:04:13 +01:00
return dispatch ( store [ "a" /* store */ ] ) . toggleEditorPanelEnabled ( panelName ) ;
2020-06-26 15:33:47 +02:00
}
} ;
2021-01-28 03:04:13 +01:00
} ) ) ( base ) ) ;
2020-07-21 14:14:37 +02:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js
2019-03-07 10:09:59 +01:00
2020-03-10 15:53:18 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-03-10 15:53:18 +01:00
* /
/ * *
2021-01-28 03:04:13 +01:00
* Internal dependencies
2020-03-10 15:53:18 +01:00
* /
2021-01-28 03:04:13 +01:00
var _createSlotFill = Object ( external _wp _components _ [ "createSlotFill" ] ) ( 'EnablePluginDocumentSettingPanelOption' ) ,
Fill = _createSlotFill . Fill ,
Slot = _createSlotFill . Slot ;
2020-03-10 15:53:18 +01:00
2021-01-28 03:04:13 +01:00
var enable _plugin _document _setting _panel _EnablePluginDocumentSettingPanelOption = function EnablePluginDocumentSettingPanelOption ( _ref ) {
var label = _ref . label ,
panelName = _ref . panelName ;
return Object ( external _wp _element _ [ "createElement" ] ) ( Fill , null , Object ( external _wp _element _ [ "createElement" ] ) ( enable _panel , {
label : label ,
panelName : panelName
} ) ) ;
} ;
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
enable _plugin _document _setting _panel _EnablePluginDocumentSettingPanelOption . Slot = Slot ;
/* harmony default export */ var enable _plugin _document _setting _panel = ( enable _plugin _document _setting _panel _EnablePluginDocumentSettingPanelOption ) ;
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","viewport"]
2021-02-02 06:17:13 +01:00
var external _wp _viewport _ = _ _webpack _require _ _ ( 114 ) ;
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/enable-publish-sidebar.js
/ * *
* WordPress dependencies
* /
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var enable _publish _sidebar = ( Object ( external _wp _compose _ [ "compose" ] ) ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
isChecked : select ( 'core/editor' ) . isPublishSidebarEnabled ( )
} ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/editor' ) ,
enablePublishSidebar = _dispatch . enablePublishSidebar ,
disablePublishSidebar = _dispatch . disablePublishSidebar ;
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
return {
onChange : function onChange ( isEnabled ) {
return isEnabled ? enablePublishSidebar ( ) : disablePublishSidebar ( ) ;
}
} ;
} ) , // In < medium viewports we override this option and always show the publish sidebar.
// See the edit-post's header component for the specific logic.
Object ( external _wp _viewport _ [ "ifViewportMatches" ] ) ( 'medium' ) ) ( base ) ) ;
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/enable-feature.js
/ * *
* WordPress dependencies
* /
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2019-03-07 10:09:59 +01:00
2021-01-28 03:04:13 +01:00
/* harmony default export */ var enable _feature = ( Object ( external _wp _compose _ [ "compose" ] ) ( Object ( external _wp _data _ [ "withSelect" ] ) ( function ( select , _ref ) {
var featureName = _ref . featureName ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
var _select = select ( store [ "a" /* store */ ] ) ,
isFeatureActive = _select . isFeatureActive ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
return {
isChecked : isFeatureActive ( featureName )
} ;
} ) , Object ( external _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , _ref2 ) {
var featureName = _ref2 . featureName ;
return {
onChange : function onChange ( ) {
return dispatch ( store [ "a" /* store */ ] ) . toggleFeature ( featureName ) ;
}
} ;
} ) ) ( base ) ) ;
2018-12-14 05:41:57 +01:00
2021-01-28 03:04:13 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/index.js
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
2020-03-10 15:53:18 +01:00
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2019-09-19 17:19:18 +02:00
2021-02-02 06:17:13 +01:00
/***/ 7 :
2019-10-15 17:37:08 +02:00
/***/ ( function ( module , exports ) {
2019-09-19 17:19:18 +02:00
2021-02-02 06:17:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "primitives" ] ; } ( ) ) ;
2019-09-19 17:19:18 +02:00
/***/ } ) ,
2021-02-02 06:17:13 +01:00
/***/ 72 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
function mergeRefs ( refs ) {
return function ( value ) {
refs . forEach ( function ( ref ) {
if ( typeof ref === "function" ) {
ref ( value ) ;
} else if ( ref != null ) {
ref . current = value ;
}
} ) ;
} ;
}
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( mergeRefs ) ;
/***/ } ) ,
/***/ 73 :
2020-01-22 23:06:21 +01:00
/***/ ( function ( module , exports ) {
2021-02-02 06:17:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "plugins" ] ; } ( ) ) ;
2020-01-22 23:06:21 +01:00
/***/ } ) ,
2020-06-26 15:33:47 +02:00
/***/ 8 :
2020-01-22 23:06:21 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-26 15:33:47 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _extends ; } ) ;
function _extends ( ) {
_extends = Object . assign || function ( target ) {
for ( var i = 1 ; i < arguments . length ; i ++ ) {
var source = arguments [ i ] ;
2020-02-06 22:03:31 +01:00
2020-06-26 15:33:47 +02:00
for ( var key in source ) {
if ( Object . prototype . hasOwnProperty . call ( source , key ) ) {
target [ key ] = source [ key ] ;
}
}
}
2020-02-06 22:03:31 +01:00
2020-06-26 15:33:47 +02:00
return target ;
} ;
2020-02-06 22:03:31 +01:00
2020-06-26 15:33:47 +02:00
return _extends . apply ( this , arguments ) ;
}
2020-02-06 22:03:31 +01:00
/***/ } ) ,
2019-10-15 17:37:08 +02:00
/***/ 9 :
2020-07-07 16:43:35 +02:00
/***/ ( function ( module , exports ) {
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "blocks" ] ; } ( ) ) ;
2020-07-07 16:43:35 +02:00
2018-12-14 05:41:57 +01:00
/***/ } )
2018-12-18 04:14:52 +01:00
/******/ } ) ;