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
2020-03-24 00:40:19 +01:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = 423 ) ;
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
2018-12-18 04:14:52 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "element" ] ; } ( ) ) ;
2018-12-14 05:41:57 +01:00
/***/ } ) ,
2018-12-18 04:14:52 +01:00
/***/ 1 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "i18n" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 10 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "blocks" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 11 :
2020-01-08 12:57:23 +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
/***/ } ) ,
/***/ 12 :
2018-12-14 05:41:57 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-01-22 23:06:21 +01:00
"use strict" ;
/* 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 ] ;
for ( var key in source ) {
if ( Object . prototype . hasOwnProperty . call ( source , key ) ) {
target [ key ] = source [ key ] ;
}
}
}
return target ;
} ;
return _extends . apply ( this , arguments ) ;
}
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 120 :
/***/ ( 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 _ _ ( 9 ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/ * *
* WordPress dependencies
* /
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 : "-2 -2 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( close ) ;
2020-02-10 23:33:27 +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" ;
2019-09-19 17:19:18 +02:00
/* 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 ) ;
2018-12-18 04:14:52 +01:00
}
2018-12-14 05:41:57 +01:00
}
2019-09-19 17:19:18 +02:00
function _createClass ( Constructor , protoProps , staticProps ) {
if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ;
if ( staticProps ) _defineProperties ( Constructor , staticProps ) ;
return Constructor ;
}
2019-03-07 10:09:59 +01:00
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 130 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "mediaUtils" ] ; } ( ) ) ;
/***/ } ) ,
2020-02-10 23:33:27 +01:00
/***/ 14 :
2018-12-14 05:41:57 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2019-10-15 17:37:08 +02:00
/* 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" ) ;
}
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2018-12-18 04:14:52 +01:00
2020-02-10 23:33:27 +01:00
/***/ 15 :
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" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _possibleConstructorReturn ; } ) ;
2020-03-24 00:40:19 +01:00
/* harmony import */ var _helpers _esm _typeof _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 34 ) ;
2020-01-22 23:06:21 +01:00
/* harmony import */ var _assertThisInitialized _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 7 ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
function _possibleConstructorReturn ( self , call ) {
if ( call && ( Object ( _helpers _esm _typeof _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( call ) === "object" || typeof call === "function" ) ) {
return call ;
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
return Object ( _assertThisInitialized _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ /* default */ "a" ] ) ( self ) ;
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2018-12-18 04:14:52 +01:00
2020-02-10 23:33:27 +01:00
/***/ 16 :
2018-12-14 05:41:57 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2019-10-15 17:37:08 +02:00
/* 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 ) ;
}
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2019-03-21 13:48:00 +01:00
2020-02-10 23:33:27 +01:00
/***/ 17 :
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" ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function _setPrototypeOf ( o , p ) {
_setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) {
o . _ _proto _ _ = p ;
return o ;
} ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
return _setPrototypeOf ( o , p ) ;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _inherits ; } ) ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
function _inherits ( subClass , superClass ) {
if ( typeof superClass !== "function" && superClass !== null ) {
throw new TypeError ( "Super expression must either be null or a function" ) ;
}
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
subClass . prototype = Object . create ( superClass && superClass . prototype , {
constructor : {
value : subClass ,
writable : true ,
configurable : true
2019-09-19 17:19:18 +02:00
}
2019-10-15 17:37:08 +02:00
} ) ;
if ( superClass ) _setPrototypeOf ( subClass , superClass ) ;
}
2018-12-18 04:14:52 +01:00
/***/ } ) ,
2020-02-10 23:33:27 +01:00
/***/ 18 :
2018-12-14 05:41:57 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2019-10-15 17:37:08 +02:00
2020-03-24 00:40:19 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
var arrayLikeToArray = _ _webpack _require _ _ ( 25 ) ;
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
2020-03-24 00:40:19 +01:00
function _arrayWithoutHoles ( arr ) {
if ( Array . isArray ( arr ) ) return Object ( arrayLikeToArray [ "a" /* default */ ] ) ( arr ) ;
2018-12-14 05:41:57 +01:00
}
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
2020-03-24 00:40:19 +01:00
var iterableToArray = _ _webpack _require _ _ ( 35 ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = _ _webpack _require _ _ ( 27 ) ;
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread ( ) {
2020-03-24 00:40:19 +01:00
throw new TypeError ( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
2019-10-15 17:37:08 +02:00
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _toConsumableArray ; } ) ;
2020-03-24 00:40:19 +01:00
2019-10-15 17:37:08 +02:00
function _toConsumableArray ( arr ) {
2020-03-24 00:40:19 +01:00
return _arrayWithoutHoles ( arr ) || Object ( iterableToArray [ "a" /* default */ ] ) ( arr ) || Object ( unsupportedIterableToArray [ "a" /* default */ ] ) ( arr ) || _nonIterableSpread ( ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 182 :
2020-03-16 23:07:16 +01:00
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "notices" ] ; } ( ) ) ;
/***/ } ) ,
2020-02-10 23:33:27 +01:00
/***/ 19 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2020-02-10 23:33:27 +01:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _objectWithoutProperties ; } ) ;
2020-03-24 00:40:19 +01:00
/* harmony import */ var _objectWithoutPropertiesLoose _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 43 ) ;
2018-12-14 05:41:57 +01:00
2020-02-10 23:33:27 +01:00
function _objectWithoutProperties ( source , excluded ) {
if ( source == null ) return { } ;
var target = Object ( _objectWithoutPropertiesLoose _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( source , excluded ) ;
var key , i ;
2018-12-14 05:41:57 +01:00
2020-02-10 23:33:27 +01:00
if ( Object . getOwnPropertySymbols ) {
var sourceSymbolKeys = Object . getOwnPropertySymbols ( source ) ;
2018-12-14 05:41:57 +01:00
2020-02-10 23:33:27 +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 ] ;
}
}
return target ;
}
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2019-09-19 17:19:18 +02:00
2020-03-24 00:40:19 +01:00
/***/ 193 :
2020-02-06 22:03:31 +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 _ _ ) ;
2020-02-10 23:33:27 +01:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 9 ) ;
2020-02-06 22:03:31 +01:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/ * *
* WordPress dependencies
* /
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 : "-2 -2 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M15.3 5.3l-6.8 6.8-2.8-2.8-1.4 1.4 4.2 4.2 8.2-8.2"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( check ) ;
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2018-12-14 05:41:57 +01:00
2020-02-06 22:03:31 +01:00
/***/ 2 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "lodash" ] ; } ( ) ) ;
/***/ } ) ,
2020-03-16 23:07:16 +01:00
/***/ 20 :
2019-10-15 17:37:08 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
"use strict" ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
2020-03-24 00:40:19 +01:00
var arrayWithHoles = _ _webpack _require _ _ ( 38 ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit ( arr , i ) {
2020-03-24 00:40:19 +01:00
if ( typeof Symbol === "undefined" || ! ( Symbol . iterator in Object ( arr ) ) ) return ;
2019-10-15 17:37:08 +02:00
var _arr = [ ] ;
var _n = true ;
var _d = false ;
var _e = undefined ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
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 ;
}
2020-03-24 00:40:19 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = _ _webpack _require _ _ ( 27 ) ;
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
2020-03-24 00:40:19 +01:00
var nonIterableRest = _ _webpack _require _ _ ( 39 ) ;
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _slicedToArray ; } ) ;
2019-03-07 10:09:59 +01:00
2020-03-24 00:40:19 +01:00
2019-10-15 17:37:08 +02:00
function _slicedToArray ( arr , i ) {
2020-03-24 00:40:19 +01:00
return Object ( arrayWithHoles [ "a" /* default */ ] ) ( arr ) || _iterableToArrayLimit ( arr , i ) || Object ( unsupportedIterableToArray [ "a" /* default */ ] ) ( arr , i ) || Object ( nonIterableRest [ "a" /* default */ ] ) ( ) ;
2019-10-15 17:37:08 +02:00
}
2019-03-07 10:09:59 +01:00
2019-09-19 17:19:18 +02:00
/***/ } ) ,
2019-03-07 10:09:59 +01:00
2020-03-16 23:07:16 +01:00
/***/ 22 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "keycodes" ] ; } ( ) ) ;
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 25 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-10-15 18:17:12 +02:00
2020-03-24 00:40:19 +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 ;
for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) {
arr2 [ i ] = arr [ i ] ;
}
return arr2 ;
}
/***/ } ) ,
/***/ 27 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _unsupportedIterableToArray ; } ) ;
/* harmony import */ var _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 25 ) ;
function _unsupportedIterableToArray ( o , minLen ) {
if ( ! o ) return ;
if ( typeof o === "string" ) return Object ( _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 ( n ) ;
if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return Object ( _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( o , minLen ) ;
}
2019-10-15 18:17:12 +02:00
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 275 :
2019-10-15 17:37:08 +02:00
/***/ ( function ( module , exports ) {
2019-03-07 10:09:59 +01:00
2020-03-24 00:40:19 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "blockLibrary" ] ; } ( ) ) ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2019-03-07 10:09:59 +01:00
2020-03-24 00:40:19 +01:00
/***/ 284 :
2020-02-10 23:33:27 +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 _ _ ( 9 ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/ * *
* WordPress dependencies
* /
var moreHorizontal = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "-2 -2 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M5 10c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( moreHorizontal ) ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2019-03-07 10:09:59 +01:00
2020-03-24 00:40:19 +01:00
/***/ 3 :
2019-10-15 17:37:08 +02:00
/***/ ( function ( module , exports ) {
2019-03-07 10:09:59 +01:00
2020-03-24 00:40:19 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "components" ] ; } ( ) ) ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2019-03-07 10:09:59 +01:00
2020-03-24 00:40:19 +01:00
/***/ 30 :
2019-10-15 17:37:08 +02:00
/***/ ( function ( module , exports ) {
2020-03-24 00:40:19 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "url" ] ; } ( ) ) ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 31 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , exports ) {
2020-03-24 00:40:19 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "editor" ] ; } ( ) ) ;
2020-02-10 23:33:27 +01:00
/***/ } ) ,
2020-01-22 23:06:21 +01:00
/***/ 32 :
2020-03-24 00:40:19 +01:00
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "hooks" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 34 :
2020-01-22 23:06:21 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-09-19 17:19:18 +02:00
"use strict" ;
2019-10-15 17:37:08 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _typeof ; } ) ;
function _typeof ( obj ) {
2020-02-06 22:03:31 +01:00
"@babel/helpers - typeof" ;
2020-01-08 12:57:23 +01:00
if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) {
2019-10-15 17:37:08 +02:00
_typeof = function _typeof ( obj ) {
2020-01-08 12:57:23 +01:00
return typeof obj ;
2019-10-15 17:37:08 +02:00
} ;
} else {
_typeof = function _typeof ( obj ) {
2020-01-08 12:57:23 +01:00
return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ;
2019-10-15 17:37:08 +02:00
} ;
}
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
return _typeof ( obj ) ;
}
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2019-03-07 10:09:59 +01:00
2020-03-24 00:40:19 +01:00
/***/ 35 :
2020-03-16 23:07:16 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _iterableToArray ; } ) ;
function _iterableToArray ( iter ) {
2020-03-24 00:40:19 +01:00
if ( typeof Symbol !== "undefined" && Symbol . iterator in Object ( iter ) ) return Array . from ( iter ) ;
2020-03-16 23:07:16 +01:00
}
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 38 :
2020-01-08 12:57:23 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-02-10 23:33:27 +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 ;
}
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 39 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _nonIterableRest ; } ) ;
function _nonIterableRest ( ) {
2020-03-24 00:40:19 +01:00
throw new TypeError ( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
2020-02-10 23:33:27 +01:00
}
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 4 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "data" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 40 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-01-08 12:57:23 +01:00
"use strict" ;
2019-03-07 10:09:59 +01:00
2020-01-22 23:06:21 +01:00
var LEAF _KEY , hasWeakMap ;
2019-03-07 10:09:59 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2020-01-22 23:06:21 +01:00
* Arbitrary value used as key for referencing cache object in WeakMap tree .
*
* @ type { Object }
2019-09-19 17:19:18 +02:00
* /
2020-01-22 23:06:21 +01:00
LEAF _KEY = { } ;
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2020-01-22 23:06:21 +01:00
* Whether environment supports WeakMap .
*
* @ type { boolean }
2019-09-19 17:19:18 +02:00
* /
2020-01-22 23:06:21 +01:00
hasWeakMap = typeof WeakMap !== 'undefined' ;
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2020-01-22 23:06:21 +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-09-19 17:19:18 +02:00
* /
2020-01-22 23:06:21 +01:00
function arrayOf ( value ) {
return [ value ] ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2020-01-22 23:06:21 +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 .
2019-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +01:00
* @ param { * } value Value to test .
2019-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +01:00
* @ return { boolean } Whether value is object - like .
2019-10-15 17:37:08 +02:00
* /
2020-01-22 23:06:21 +01:00
function isObjectLike ( value ) {
return ! ! value && 'object' === typeof value ;
}
/ * *
* Creates and returns a new cache object .
*
* @ return { Object } Cache object .
* /
function createCache ( ) {
var cache = {
clear : function ( ) {
cache . head = null ;
} ,
} ;
return cache ;
}
/ * *
* Returns true if entries within the two arrays are strictly equal by
* reference from a starting index .
*
* @ param { Array } a First array .
* @ param { Array } b Second array .
* @ param { number } fromIndex Index from which to start comparison .
*
* @ return { boolean } Whether arrays are shallowly equal .
* /
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 ;
}
/ * *
* 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 .
*
* @ param { Function } selector Selector function .
* @ param { Function } getDependants Dependant getter returning an immutable
* reference or array of reference used in
* cache bust consideration .
*
* @ return { Function } Memoized selector .
* /
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( function ( selector , getDependants ) {
var rootCache , getCache ;
// Use object source as dependant if getter not provided
if ( ! getDependants ) {
getDependants = arrayOf ;
}
/ * *
* 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 ;
}
/ * *
* 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 ;
for ( i = 0 ; i < dependants . length ; i ++ ) {
dependant = dependants [ i ] ;
// Can only compose WeakMap from object-like key.
if ( ! isObjectLike ( dependant ) ) {
isUniqueByDependants = false ;
break ;
}
// 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 ;
}
}
// 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 ;
// Create copy of arguments (avoid leaking deoptimization).
args = new Array ( len ) ;
for ( i = 0 ; i < len ; i ++ ) {
args [ i ] = arguments [ i ] ;
}
dependants = getDependants . apply ( null , args ) ;
cache = getCache ( dependants ) ;
// 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 ( ) ;
}
cache . lastDependants = dependants ;
}
node = cache . head ;
while ( node ) {
// Check whether node arguments match arguments
if ( ! isShallowEqual ( node . args , args , 1 ) ) {
node = node . next ;
continue ;
}
// At this point we can assume we've found a match
// 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 ;
}
node . next = cache . head ;
node . prev = null ;
cache . head . prev = node ;
cache . head = node ;
}
// Return immediately
return node . val ;
}
// No cached value found. Continue to insertion phase:
node = {
// Generate the result from original function
val : selector . apply ( null , args ) ,
} ;
// Avoid including the source object in the cache.
args [ 0 ] = null ;
node . args = args ;
// Don't need to check whether node is already head, since it would
// have been returned above already if it was
// Shift existing head down list
if ( cache . head ) {
cache . head . prev = node ;
node . next = cache . head ;
}
cache . head = node ;
return node . val ;
}
callSelector . getDependants = getDependants ;
callSelector . clear = clear ;
clear ( ) ;
return callSelector ;
} ) ;
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 42 :
2020-02-06 22:03:31 +01:00
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "apiFetch" ] ; } ( ) ) ;
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 423 :
2020-01-22 23:06:21 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "openGeneralSidebar" , function ( ) { return actions _openGeneralSidebar ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "closeGeneralSidebar" , function ( ) { return actions _closeGeneralSidebar ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "openModal" , function ( ) { return actions _openModal ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "closeModal" , function ( ) { return actions _closeModal ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "openPublishSidebar" , function ( ) { return openPublishSidebar ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "closePublishSidebar" , function ( ) { return actions _closePublishSidebar ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "togglePublishSidebar" , function ( ) { return actions _togglePublishSidebar ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "toggleEditorPanelEnabled" , function ( ) { return toggleEditorPanelEnabled ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "toggleEditorPanelOpened" , function ( ) { return actions _toggleEditorPanelOpened ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "removeEditorPanel" , function ( ) { return removeEditorPanel ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "toggleFeature" , function ( ) { return actions _toggleFeature ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "switchEditorMode" , function ( ) { return actions _switchEditorMode ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "togglePinnedPluginItem" , function ( ) { return togglePinnedPluginItem ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "hideBlockTypes" , function ( ) { return actions _hideBlockTypes ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "updatePreferredStyleVariations" , function ( ) { return actions _updatePreferredStyleVariations ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "__experimentalUpdateLocalAutosaveInterval" , function ( ) { return _ _experimentalUpdateLocalAutosaveInterval ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "showBlockTypes" , function ( ) { return actions _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 ; } ) ;
var selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getEditorMode" , function ( ) { return selectors _getEditorMode ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isEditorSidebarOpened" , function ( ) { return selectors _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 selectors _getPreference ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isPublishSidebarOpened" , function ( ) { return selectors _isPublishSidebarOpened ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isEditorPanelRemoved" , function ( ) { return isEditorPanelRemoved ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isEditorPanelEnabled" , function ( ) { return selectors _isEditorPanelEnabled ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isEditorPanelOpened" , function ( ) { return selectors _isEditorPanelOpened ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isModalActive" , function ( ) { return selectors _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 ; } ) ;
// EXTERNAL MODULE: external {"this":["wp","element"]}
var external _this _wp _element _ = _ _webpack _require _ _ ( 0 ) ;
// EXTERNAL MODULE: external {"this":["wp","coreData"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _coreData _ = _ _webpack _require _ _ ( 75 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","blockEditor"]}
2020-02-06 22:03:31 +01:00
var external _this _wp _blockEditor _ = _ _webpack _require _ _ ( 6 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","editor"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _editor _ = _ _webpack _require _ _ ( 31 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","keyboardShortcuts"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _keyboardShortcuts _ = _ _webpack _require _ _ ( 48 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","viewport"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _viewport _ = _ _webpack _require _ _ ( 56 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","notices"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _notices _ = _ _webpack _require _ _ ( 182 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","blockLibrary"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _blockLibrary _ = _ _webpack _require _ _ ( 275 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","hooks"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _hooks _ = _ _webpack _require _ _ ( 32 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","mediaUtils"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _mediaUtils _ = _ _webpack _require _ _ ( 130 ) ;
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/components/index.js
/ * *
* WordPress dependencies
* /
var components _replaceMediaUpload = function replaceMediaUpload ( ) {
return external _this _wp _mediaUtils _ [ "MediaUpload" ] ;
} ;
Object ( external _this _wp _hooks _ [ "addFilter" ] ) ( 'editor.MediaUpload' , 'core/edit-post/replace-media-upload' , components _replaceMediaUpload ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
2020-02-10 23:33:27 +01:00
var esm _extends = _ _webpack _require _ _ ( 12 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
2020-02-06 22:03:31 +01:00
var objectWithoutProperties = _ _webpack _require _ _ ( 19 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":"lodash"}
var external _this _lodash _ = _ _webpack _require _ _ ( 2 ) ;
// EXTERNAL MODULE: external {"this":["wp","blocks"]}
2020-02-10 23:33:27 +01:00
var external _this _wp _blocks _ = _ _webpack _require _ _ ( 10 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","components"]}
var external _this _wp _components _ = _ _webpack _require _ _ ( 3 ) ;
// EXTERNAL MODULE: external {"this":["wp","data"]}
var external _this _wp _data _ = _ _webpack _require _ _ ( 4 ) ;
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
var external _this _wp _i18n _ = _ _webpack _require _ _ ( 1 ) ;
// EXTERNAL MODULE: external {"this":["wp","compose"]}
var external _this _wp _compose _ = _ _webpack _require _ _ ( 8 ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/validate-multiple-use/index.js
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
var enhance = Object ( external _this _wp _compose _ [ "compose" ] ) (
/ * *
* 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 .
*
* @ param { WPComponent } WrappedBlockEdit A filtered BlockEdit instance .
*
* @ return { WPComponent } Enhanced component with merged state data props .
* /
Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , block ) {
var multiple = Object ( external _this _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.
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
if ( multiple ) {
return { } ;
} // Otherwise, only pass `originalBlockClientId` if it refers to a different
// block from the current one.
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var blocks = select ( 'core/block-editor' ) . getBlocks ( ) ;
2020-01-03 14:17:24 +01:00
var firstOfSameType = Object ( external _this _lodash _ [ "find" ] ) ( blocks , function ( _ref ) {
2019-10-15 17:37:08 +02:00
var name = _ref . name ;
return block . name === name ;
} ) ;
var isInvalid = firstOfSameType && firstOfSameType . clientId !== block . clientId ;
return {
originalBlockClientId : isInvalid && firstOfSameType . clientId
} ;
} ) , Object ( external _this _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 _this _wp _compose _ [ "createHigherOrderComponent" ] ) ( function ( BlockEdit ) {
return enhance ( function ( _ref3 ) {
var originalBlockClientId = _ref3 . originalBlockClientId ,
selectFirst = _ref3 . selectFirst ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref3 , [ "originalBlockClientId" , "selectFirst" ] ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
if ( ! originalBlockClientId ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( BlockEdit , props ) ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var blockType = Object ( external _this _wp _blocks _ [ "getBlockType" ] ) ( props . name ) ;
var outboundType = getOutboundType ( props . name ) ;
return [ Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
key : "invalid-preview" ,
style : {
minHeight : '60px'
}
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( BlockEdit , Object ( esm _extends [ "a" /* default */ ] ) ( {
key : "block-edit"
} , props ) ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "Warning" ] , {
key : "multiple-use-warning" ,
actions : [ Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
key : "find-original" ,
2020-01-22 23:06:21 +01:00
isSecondary : true ,
2019-10-15 17:37:08 +02:00
onClick : selectFirst
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Find original' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
key : "remove" ,
2020-01-22 23:06:21 +01:00
isSecondary : true ,
2019-10-15 17:37:08 +02:00
onClick : function onClick ( ) {
return props . onReplace ( [ ] ) ;
}
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Remove' ) ) , outboundType && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
key : "transform" ,
2020-01-22 23:06:21 +01:00
isSecondary : true ,
2019-10-15 17:37:08 +02:00
onClick : function onClick ( ) {
return props . onReplace ( Object ( external _this _wp _blocks _ [ "createBlock" ] ) ( outboundType . name , props . attributes ) ) ;
}
2020-02-06 22:03:31 +01:00
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Transform into:' ) , " " , outboundType . title ) ]
2019-10-15 17:37:08 +02:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "strong" , null , blockType . title , ": " ) , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'This block can only be used once.' ) ) ] ;
} ) ;
} , 'withMultipleValidation' ) ;
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Given a base block name , returns the default block type to which to offer
* transforms .
*
* @ param { string } blockName Base block name .
*
* @ return { ? Object } The chosen default block type .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function getOutboundType ( blockName ) {
// Grab the first outbound transform
var transform = Object ( external _this _wp _blocks _ [ "findTransform" ] ) ( Object ( external _this _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?
) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
if ( ! transform ) {
return null ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return Object ( external _this _wp _blocks _ [ "getBlockType" ] ) ( transform . blocks [ 0 ] ) ;
}
2018-12-19 04:16:48 +01:00
2019-10-15 17:37:08 +02:00
Object ( external _this _wp _hooks _ [ "addFilter" ] ) ( 'editor.BlockEdit' , 'core/edit-post/validate-multiple-use/with-multiple-validation' , withMultipleValidation ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/index.js
2019-09-19 17:19:18 +02:00
/ * *
* Internal 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
// EXTERNAL MODULE: external {"this":["wp","plugins"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _plugins _ = _ _webpack _require _ _ ( 55 ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: external {"this":["wp","url"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _url _ = _ _webpack _require _ _ ( 30 ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/copy-content-menu-item/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
function CopyContentMenuItem ( _ref ) {
var createNotice = _ref . createNotice ,
editedPostContent = _ref . editedPostContent ,
hasCopied = _ref . hasCopied ,
setState = _ref . setState ;
return editedPostContent . length > 0 && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "ClipboardButton" ] , {
text : editedPostContent ,
role : "menuitem" ,
className : "components-menu-item__button" ,
onCopy : function onCopy ( ) {
setState ( {
hasCopied : true
} ) ;
2019-10-15 18:17:12 +02:00
createNotice ( 'info' , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'All content copied.' ) , {
2019-10-15 17:37:08 +02:00
isDismissible : true ,
type : 'snackbar'
} ) ;
} ,
onFinishCopy : function onFinishCopy ( ) {
return setState ( {
hasCopied : false
} ) ;
}
2020-01-22 23:06:21 +01:00
} , hasCopied ? Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Copied!' ) : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Copy all content' ) ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var copy _content _menu _item = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
editedPostContent : select ( 'core/editor' ) . getEditedPostAttribute ( 'content' )
2019-09-19 17:19:18 +02:00
} ;
2019-10-15 17:37:08 +02:00
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/notices' ) ,
createNotice = _dispatch . createNotice ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
return {
createNotice : createNotice
} ;
} ) , Object ( external _this _wp _compose _ [ "withState" ] ) ( {
hasCopied : false
} ) ) ( CopyContentMenuItem ) ) ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/manage-blocks-menu-item/index.js
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
2019-10-15 17:37:08 +02:00
function ManageBlocksMenuItem ( _ref ) {
var openModal = _ref . openModal ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItem" ] , {
onClick : function onClick ( ) {
openModal ( 'edit-post/manage-blocks' ) ;
2018-12-14 05:41:57 +01:00
}
2019-10-15 17:37:08 +02:00
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Block Manager' ) ) ;
2019-09-19 17:19:18 +02:00
}
2019-10-15 17:37:08 +02:00
/* harmony default export */ var manage _blocks _menu _item = ( Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/edit-post' ) ,
openModal = _dispatch . openModal ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return {
openModal : openModal
} ;
} ) ( ManageBlocksMenuItem ) ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: external {"this":["wp","keycodes"]}
2020-03-16 23:07:16 +01:00
var external _this _wp _keycodes _ = _ _webpack _require _ _ ( 22 ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02: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
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
function KeyboardShortcutsHelpMenuItem ( _ref ) {
var openModal = _ref . openModal ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItem" ] , {
onClick : function onClick ( ) {
openModal ( 'edit-post/keyboard-shortcut-help' ) ;
} ,
shortcut : external _this _wp _keycodes _ [ "displayShortcut" ] . access ( 'h' )
2020-01-22 23:06:21 +01:00
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Keyboard shortcuts' ) ) ;
2019-10-15 17:37:08 +02:00
}
/* harmony default export */ var keyboard _shortcuts _help _menu _item = ( Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/edit-post' ) ,
openModal = _dispatch . openModal ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return {
openModal : openModal
} ;
} ) ( KeyboardShortcutsHelpMenuItem ) ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// 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
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-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var _createSlotFill = Object ( external _this _wp _components _ [ "createSlotFill" ] ) ( 'ToolsMoreMenuGroup' ) ,
ToolsMoreMenuGroup = _createSlotFill . Fill ,
Slot = _createSlotFill . Slot ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
ToolsMoreMenuGroup . Slot = function ( _ref ) {
var fillProps = _ref . fillProps ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( Slot , {
fillProps : fillProps
} , function ( fills ) {
2020-01-03 14:17:24 +01:00
return ! Object ( external _this _lodash _ [ "isEmpty" ] ) ( fills ) && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuGroup" ] , {
2019-10-15 17:37:08 +02:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Tools' )
} , fills ) ;
} ) ;
} ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var tools _more _menu _group = ( ToolsMoreMenuGroup ) ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/welcome-guide-menu-item/index.js
/ * *
* WordPress dependencies
* /
function WelcomeGuideMenuItem ( ) {
2020-01-22 23:06:21 +01:00
var _useDispatch = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( 'core/edit-post' ) ,
toggleFeature = _useDispatch . toggleFeature ;
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItem" ] , {
2020-01-22 23:06:21 +01:00
onClick : function onClick ( ) {
return toggleFeature ( 'welcomeGuide' ) ;
}
2020-01-08 12:57:23 +01:00
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Welcome Guide' ) ) ;
}
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/index.js
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-10-15 17:37:08 +02:00
/ * *
* Internal dependencies
* /
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
2019-10-15 17:37:08 +02:00
Object ( external _this _wp _plugins _ [ "registerPlugin" ] ) ( 'edit-post' , {
render : function render ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( tools _more _menu _group , null , function ( _ref ) {
var onClose = _ref . onClose ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( manage _blocks _menu _item , {
onSelect : onClose
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItem" ] , {
role : "menuitem" ,
href : Object ( external _this _wp _url _ [ "addQueryArgs" ] ) ( 'edit.php' , {
post _type : 'wp_block'
} )
2020-01-22 23:06:21 +01:00
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Manage all reusable blocks' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcuts _help _menu _item , {
2019-10-15 17:37:08 +02:00
onSelect : onClose
2020-01-22 23:06:21 +01:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( WelcomeGuideMenuItem , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( copy _content _menu _item , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItem" ] , {
role : "menuitem" ,
href : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'https://wordpress.org/support/article/wordpress-editor/' ) ,
target : "_new"
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Help' ) ) ) ;
2019-09-19 17:19:18 +02:00
} ) ) ;
}
} ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
2020-02-10 23:33:27 +01:00
var toConsumableArray = _ _webpack _require _ _ ( 18 ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
2020-02-06 22:03:31 +01:00
var defineProperty = _ _webpack _require _ _ ( 5 ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/defaults.js
var PREFERENCES _DEFAULTS = {
editorMode : 'visual' ,
isGeneralSidebarDismissed : false ,
panels : {
'post-status' : {
opened : true
}
} ,
features : {
fixedToolbar : false ,
2020-01-22 23:06:21 +01:00
showInserterHelpPanel : true ,
2020-03-03 21:45:08 +01:00
welcomeGuide : true ,
fullscreenMode : true
2019-10-15 17:37:08 +02:00
} ,
pinnedPluginItems : { } ,
hiddenBlockTypes : [ ] ,
preferredStyleVariations : { } ,
localAutosaveInterval : 15
} ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/reducer.js
2018-12-14 05:41:57 +01:00
2020-02-06 22:03:31 +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 ; }
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 ; }
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
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
/ * *
* The default active general sidebar : The "Document" tab .
*
* @ type { string }
* /
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
var DEFAULT _ACTIVE _GENERAL _SIDEBAR = 'edit-post/document' ;
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Higher - order reducer creator which provides the given initial state for the
* original reducer .
2018-12-18 04:14:52 +01:00
*
2019-10-15 17:37:08 +02:00
* @ param { * } initialState Initial state to provide to reducer .
2018-12-18 04:14:52 +01:00
*
2019-10-15 17:37:08 +02:00
* @ return { Function } Higher - order reducer .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02: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 ) ;
} ;
} ;
} ;
2018-12-18 04:14:52 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Reducer returning the user preferences .
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ 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 .
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ return { Object } Updated state .
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:41:57 +01:00
2020-01-03 14:17:24 +01:00
var preferences = Object ( external _this _lodash _ [ "flow" ] ) ( [ external _this _wp _data _ [ "combineReducers" ] , createWithInitialState ( PREFERENCES _DEFAULTS ) ] ) ( {
2019-10-15 17:37:08 +02:00
isGeneralSidebarDismissed : function isGeneralSidebarDismissed ( state , action ) {
switch ( action . type ) {
case 'OPEN_GENERAL_SIDEBAR' :
case 'CLOSE_GENERAL_SIDEBAR' :
return action . type === 'CLOSE_GENERAL_SIDEBAR' ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return state ;
} ,
panels : function panels ( state , action ) {
switch ( action . type ) {
case 'TOGGLE_PANEL_ENABLED' :
{
var panelName = action . panelName ;
2020-02-06 22:03:31 +01:00
return _objectSpread ( { } , state , Object ( defineProperty [ "a" /* default */ ] ) ( { } , panelName , _objectSpread ( { } , state [ panelName ] , {
2020-01-03 14:17:24 +01:00
enabled : ! Object ( external _this _lodash _ [ "get" ] ) ( state , [ panelName , 'enabled' ] , true )
2019-10-15 17:37:08 +02:00
} ) ) ) ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
case 'TOGGLE_PANEL_OPENED' :
{
var _panelName = action . panelName ;
2020-01-03 14:17:24 +01:00
var isOpen = state [ _panelName ] === true || Object ( external _this _lodash _ [ "get" ] ) ( state , [ _panelName , 'opened' ] , false ) ;
2020-02-06 22:03:31 +01:00
return _objectSpread ( { } , state , Object ( defineProperty [ "a" /* default */ ] ) ( { } , _panelName , _objectSpread ( { } , state [ _panelName ] , {
2019-10-15 17:37:08 +02:00
opened : ! isOpen
} ) ) ) ;
}
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return state ;
} ,
features : function features ( state , action ) {
if ( action . type === 'TOGGLE_FEATURE' ) {
2020-02-06 22:03:31 +01:00
return _objectSpread ( { } , state , Object ( defineProperty [ "a" /* default */ ] ) ( { } , action . feature , ! state [ action . feature ] ) ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return state ;
} ,
editorMode : function editorMode ( state , action ) {
if ( action . type === 'SWITCH_MODE' ) {
return action . mode ;
2019-09-19 17:19:18 +02:00
}
2019-10-15 17:37:08 +02:00
return state ;
} ,
pinnedPluginItems : function pinnedPluginItems ( state , action ) {
if ( action . type === 'TOGGLE_PINNED_PLUGIN_ITEM' ) {
2020-02-06 22:03:31 +01:00
return _objectSpread ( { } , state , Object ( defineProperty [ "a" /* default */ ] ) ( { } , action . pluginName , ! Object ( external _this _lodash _ [ "get" ] ) ( state , [ action . pluginName ] , true ) ) ) ;
2019-10-15 17:37:08 +02:00
}
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
return state ;
} ,
hiddenBlockTypes : function hiddenBlockTypes ( state , action ) {
switch ( action . type ) {
case 'SHOW_BLOCK_TYPES' :
2020-01-03 14:17:24 +01:00
return external _this _lodash _ [ "without" ] . apply ( void 0 , [ state ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( action . blockNames ) ) ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
case 'HIDE_BLOCK_TYPES' :
2020-01-03 14:17:24 +01:00
return Object ( external _this _lodash _ [ "union" ] ) ( state , action . blockNames ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return state ;
} ,
preferredStyleVariations : function preferredStyleVariations ( state , action ) {
switch ( action . type ) {
case 'UPDATE_PREFERRED_STYLE_VARIATIONS' :
{
if ( ! action . blockName ) {
return state ;
}
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
if ( ! action . blockStyle ) {
2020-01-03 14:17:24 +01:00
return Object ( external _this _lodash _ [ "omit" ] ) ( state , [ action . blockName ] ) ;
2019-10-15 17:37:08 +02:00
}
2019-03-21 13:48:00 +01:00
2020-02-06 22:03:31 +01:00
return _objectSpread ( { } , state , Object ( defineProperty [ "a" /* default */ ] ) ( { } , action . blockName , action . blockStyle ) ) ;
2019-10-15 17:37:08 +02:00
}
}
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
return state ;
} ,
localAutosaveInterval : function localAutosaveInterval ( state , action ) {
switch ( action . type ) {
case 'UPDATE_LOCAL_AUTOSAVE_INTERVAL' :
return action . interval ;
}
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
return state ;
}
} ) ;
2019-03-21 13:48:00 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Reducer storing the list of all programmatically removed panels .
*
* @ param { Array } state Current state .
* @ param { Object } action Action object .
*
* @ return { Array } Updated state .
2019-03-21 13:48:00 +01:00
* /
2019-10-15 17:37:08 +02:00
function removedPanels ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : [ ] ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
switch ( action . type ) {
case 'REMOVE_PANEL' :
2020-01-03 14:17:24 +01:00
if ( ! Object ( external _this _lodash _ [ "includes" ] ) ( state , action . panelName ) ) {
2019-10-15 17:37:08 +02:00
return [ ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( state ) , [ action . panelName ] ) ;
}
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
}
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
return state ;
}
/ * *
* Reducer returning the next active general sidebar state . The active general
* sidebar is a unique name to identify either an editor or plugin sidebar .
*
* @ param { ? string } state Current state .
* @ param { Object } action Action object .
*
* @ return { ? string } Updated state .
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
function reducer _activeGeneralSidebar ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : DEFAULT _ACTIVE _GENERAL _SIDEBAR ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
switch ( action . type ) {
case 'OPEN_GENERAL_SIDEBAR' :
return action . name ;
2019-09-19 17:19:18 +02:00
}
2019-10-15 17:37:08 +02:00
return state ;
2019-03-21 13:48:00 +01:00
}
2019-10-15 17:37:08 +02: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
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
function activeModal ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : null ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
switch ( action . type ) {
case 'OPEN_MODAL' :
return action . name ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
case 'CLOSE_MODAL' :
return null ;
}
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
return state ;
}
function publishSidebarActive ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : false ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
switch ( action . type ) {
case 'OPEN_PUBLISH_SIDEBAR' :
return true ;
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
2019-10-15 17:37:08 +02:00
case 'CLOSE_PUBLISH_SIDEBAR' :
return false ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
case 'TOGGLE_PUBLISH_SIDEBAR' :
return ! state ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return state ;
}
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02: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 .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function isSavingMetaBoxes ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : false ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
switch ( action . type ) {
case 'REQUEST_META_BOX_UPDATES' :
return true ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
case 'META_BOX_UPDATES_SUCCESS' :
return false ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
default :
return state ;
}
}
/ * *
* Reducer keeping track of the meta boxes per location .
*
* @ param { boolean } state Previous state .
* @ param { Object } action Action Object .
*
* @ return { Object } Updated state .
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
function metaBoxLocations ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
switch ( action . type ) {
case 'SET_META_BOXES_PER_LOCATIONS' :
return action . metaBoxesPerLocation ;
}
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
return state ;
2018-12-18 04:14:52 +01:00
}
2019-10-15 17:37:08 +02:00
var reducer _metaBoxes = Object ( external _this _wp _data _ [ "combineReducers" ] ) ( {
isSaving : isSavingMetaBoxes ,
locations : metaBoxLocations
} ) ;
/* harmony default export */ var reducer = ( Object ( external _this _wp _data _ [ "combineReducers" ] ) ( {
activeGeneralSidebar : reducer _activeGeneralSidebar ,
activeModal : activeModal ,
metaBoxes : reducer _metaBoxes ,
preferences : preferences ,
publishSidebarActive : publishSidebarActive ,
removedPanels : removedPanels
} ) ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/refx/refx.js
2020-03-24 00:40:19 +01:00
var refx = _ _webpack _require _ _ ( 89 ) ;
2019-10-15 17:37:08 +02:00
var refx _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( refx ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
2020-03-16 23:07:16 +01:00
var slicedToArray = _ _webpack _require _ _ ( 20 ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: external {"this":["wp","a11y"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _a11y _ = _ _webpack _require _ _ ( 50 ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _apiFetch _ = _ _webpack _require _ _ ( 42 ) ;
2019-10-15 17:37:08 +02:00
var external _this _wp _apiFetch _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _this _wp _apiFetch _ ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/actions.js
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
* /
2018-12-18 04:14:52 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns an action object used in signalling that the user opened an editor sidebar .
*
* @ param { string } name Sidebar name to be opened .
*
* @ 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
function actions _openGeneralSidebar ( name ) {
return {
type : 'OPEN_GENERAL_SIDEBAR' ,
name : name
} ;
}
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns an action object signalling that the user closed the sidebar .
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ return { Object } Action object .
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function actions _closeGeneralSidebar ( ) {
2019-09-19 17:19:18 +02:00
return {
2019-10-15 17:37:08 +02:00
type : 'CLOSE_GENERAL_SIDEBAR'
2019-09-19 17:19:18 +02:00
} ;
2019-10-15 17:37:08 +02:00
}
/ * *
* Returns an action object used in signalling that the user opened a modal .
*
* @ param { string } name A string that uniquely identifies the modal .
*
* @ return { Object } Action object .
* /
function actions _openModal ( name ) {
2019-09-19 17:19:18 +02:00
return {
2019-10-15 17:37:08 +02:00
type : 'OPEN_MODAL' ,
name : name
2019-09-19 17:19:18 +02:00
} ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns an action object signalling that the user closed a modal .
*
* @ return { Object } Action object .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function actions _closeModal ( ) {
return {
type : 'CLOSE_MODAL'
} ;
2019-09-19 17:19:18 +02:00
}
2019-10-15 17:37:08 +02:00
/ * *
* Returns an action object used in signalling that the user opened the publish
* sidebar .
*
* @ return { Object } Action object
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
function openPublishSidebar ( ) {
2019-09-19 17:19:18 +02:00
return {
2019-10-15 17:37:08 +02:00
type : 'OPEN_PUBLISH_SIDEBAR'
2019-09-19 17:19:18 +02:00
} ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns an action object used in signalling that the user closed the
* publish sidebar .
*
* @ return { Object } Action object .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function actions _closePublishSidebar ( ) {
return {
type : 'CLOSE_PUBLISH_SIDEBAR'
} ;
}
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns an action object used in signalling that the user toggles the publish sidebar .
*
* @ return { Object } Action object
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function actions _togglePublishSidebar ( ) {
return {
type : 'TOGGLE_PUBLISH_SIDEBAR'
2019-09-19 17:19:18 +02:00
} ;
}
2019-10-15 17:37:08 +02:00
/ * *
* 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 .
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function toggleEditorPanelEnabled ( panelName ) {
2019-09-19 17:19:18 +02:00
return {
2019-10-15 17:37:08 +02:00
type : 'TOGGLE_PANEL_ENABLED' ,
panelName : panelName
2019-09-19 17:19:18 +02:00
} ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* 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 .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function actions _toggleEditorPanelOpened ( panelName ) {
return {
type : 'TOGGLE_PANEL_OPENED' ,
panelName : panelName
} ;
}
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* 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 .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function removeEditorPanel ( panelName ) {
return {
type : 'REMOVE_PANEL' ,
panelName : panelName
} ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns an action object used to toggle a feature flag .
*
* @ param { string } feature Feature name .
*
* @ return { Object } Action object .
2018-12-14 05:41:57 +01:00
* /
2020-01-22 23:06:21 +01:00
function actions _toggleFeature ( feature ) {
2019-10-15 17:37:08 +02:00
return {
type : 'TOGGLE_FEATURE' ,
feature : feature
} ;
}
2020-01-22 23:06:21 +01:00
function actions _switchEditorMode ( mode ) {
2019-10-15 17:37:08 +02:00
return {
type : 'SWITCH_MODE' ,
mode : mode
} ;
}
2019-03-21 13:48:00 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns an action object used to toggle a plugin name flag .
*
* @ param { string } pluginName Plugin name .
*
* @ return { Object } Action object .
2019-03-21 13:48:00 +01:00
* /
2019-10-15 17:37:08 +02: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 .
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function actions _hideBlockTypes ( blockNames ) {
return {
type : 'HIDE_BLOCK_TYPES' ,
2020-01-03 14:17:24 +01:00
blockNames : Object ( external _this _lodash _ [ "castArray" ] ) ( blockNames )
2019-10-15 17:37:08 +02:00
} ;
}
/ * *
* 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 .
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
function actions _updatePreferredStyleVariations ( blockName , blockStyle ) {
return {
type : 'UPDATE_PREFERRED_STYLE_VARIATIONS' ,
blockName : blockName ,
blockStyle : blockStyle
} ;
}
2020-02-06 22:03:31 +01:00
/ * *
* 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 .
* /
2019-10-15 17:37:08 +02: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 .
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function actions _showBlockTypes ( blockNames ) {
return {
type : 'SHOW_BLOCK_TYPES' ,
2020-01-03 14:17:24 +01:00
blockNames : Object ( external _this _lodash _ [ "castArray" ] ) ( blockNames )
2019-10-15 17:37:08 +02:00
} ;
}
/ * *
* Returns an action object used in signaling
* what Meta boxes are available in which location .
*
* @ param { Object } metaBoxesPerLocation Meta boxes per location .
*
* @ return { Object } Action object .
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
function setAvailableMetaBoxesPerLocation ( metaBoxesPerLocation ) {
return {
type : 'SET_META_BOXES_PER_LOCATIONS' ,
metaBoxesPerLocation : metaBoxesPerLocation
} ;
}
/ * *
* Returns an action object used to request meta box update .
*
* @ return { Object } Action object .
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function requestMetaBoxUpdates ( ) {
return {
type : 'REQUEST_META_BOX_UPDATES'
} ;
}
/ * *
* Returns an action object used signal a successful meta box update .
*
* @ return { Object } Action object .
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
function metaBoxUpdatesSuccess ( ) {
return {
type : 'META_BOX_UPDATES_SUCCESS'
} ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
2020-03-24 00:40:19 +01:00
var rememo = _ _webpack _require _ _ ( 40 ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
/ * *
* External dependencies
* /
2019-03-21 13:48:00 +01:00
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns the current editing mode .
*
* @ param { Object } state Global application state .
*
* @ return { string } Editing mode .
2018-12-14 05:41:57 +01:00
* /
2020-01-22 23:06:21 +01:00
function selectors _getEditorMode ( state ) {
2019-10-15 17:37:08 +02:00
return selectors _getPreference ( state , 'editorMode' , 'visual' ) ;
}
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns true if the editor sidebar is opened .
*
* @ param { Object } state Global application state
*
* @ return { boolean } Whether the editor sidebar is opened .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function selectors _isEditorSidebarOpened ( state ) {
var activeGeneralSidebar = getActiveGeneralSidebarName ( state ) ;
2020-01-03 14:17:24 +01:00
return Object ( external _this _lodash _ [ "includes" ] ) ( [ 'edit-post/document' , 'edit-post/block' ] , activeGeneralSidebar ) ;
2019-10-15 17:37:08 +02:00
}
/ * *
* Returns true if the plugin sidebar is opened .
*
* @ param { Object } state Global application state
* @ return { boolean } Whether the plugin sidebar is opened .
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function isPluginSidebarOpened ( state ) {
var activeGeneralSidebar = getActiveGeneralSidebarName ( state ) ;
return ! ! activeGeneralSidebar && ! selectors _isEditorSidebarOpened ( state ) ;
}
/ * *
* 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 .
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function getActiveGeneralSidebarName ( state ) {
// Dismissal takes precedent.
var isDismissed = selectors _getPreference ( state , 'isGeneralSidebarDismissed' , false ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
if ( isDismissed ) {
return null ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return state . activeGeneralSidebar ;
2018-12-18 04:14:52 +01:00
}
/ * *
2019-10-15 17:37:08 +02:00
* Returns the preferences ( these preferences are persisted locally ) .
*
* @ param { Object } state Global application state .
*
* @ return { Object } Preferences Object .
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:53:54 +01:00
2019-10-15 17:37:08 +02:00
function getPreferences ( state ) {
return state . preferences ;
}
2018-12-14 05:53:54 +01:00
/ * *
2019-10-15 17:37:08 +02:00
*
* @ param { Object } state Global application state .
* @ param { string } preferenceKey Preference Key .
2020-01-08 12:57:23 +01:00
* @ param { * } defaultValue Default Value .
2019-10-15 17:37:08 +02:00
*
2020-01-08 12:57:23 +01:00
* @ return { * } Preference Value .
2018-12-14 05:53:54 +01:00
* /
2019-10-15 17:37:08 +02:00
function selectors _getPreference ( state , preferenceKey , defaultValue ) {
var preferences = getPreferences ( state ) ;
var value = preferences [ preferenceKey ] ;
return value === undefined ? defaultValue : value ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns true if the publish sidebar is opened .
*
* @ param { Object } state Global application state
*
* @ return { boolean } Whether the publish sidebar is open .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function selectors _isPublishSidebarOpened ( state ) {
return state . publishSidebarActive ;
2018-12-18 04:14:52 +01:00
}
/ * *
2019-10-15 17:37:08 +02:00
* 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 .
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function isEditorPanelRemoved ( state , panelName ) {
2020-01-03 14:17:24 +01:00
return Object ( external _this _lodash _ [ "includes" ] ) ( state . removedPanels , panelName ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* 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 .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function selectors _isEditorPanelEnabled ( state , panelName ) {
var panels = selectors _getPreference ( state , 'panels' ) ;
2020-01-03 14:17:24 +01:00
return ! isEditorPanelRemoved ( state , panelName ) && Object ( external _this _lodash _ [ "get" ] ) ( panels , [ panelName , 'enabled' ] , true ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* 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 .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function selectors _isEditorPanelOpened ( state , panelName ) {
var panels = selectors _getPreference ( state , 'panels' ) ;
2020-01-03 14:17:24 +01:00
return Object ( external _this _lodash _ [ "get" ] ) ( panels , [ panelName ] ) === true || Object ( external _this _lodash _ [ "get" ] ) ( panels , [ panelName , 'opened' ] ) === true ;
2019-09-19 17:19:18 +02:00
}
2018-12-18 04:14:52 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* 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 .
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function selectors _isModalActive ( state , modalName ) {
return state . activeModal === modalName ;
2018-12-18 04:14:52 +01:00
}
2018-12-17 05:52:00 +01:00
/ * *
2019-10-15 17:37:08 +02: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 .
2018-12-17 05:52:00 +01:00
* /
2019-10-15 17:37:08 +02:00
function isFeatureActive ( state , feature ) {
2020-01-03 14:17:24 +01:00
return Object ( external _this _lodash _ [ "get" ] ) ( state . preferences . features , [ feature ] , false ) ;
2019-10-15 17:37:08 +02:00
}
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* 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 .
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
function isPluginItemPinned ( state , pluginName ) {
var pinnedPluginItems = selectors _getPreference ( state , 'pinnedPluginItems' , { } ) ;
2020-01-03 14:17:24 +01:00
return Object ( external _this _lodash _ [ "get" ] ) ( pinnedPluginItems , [ pluginName ] , true ) ;
2019-10-15 17:37:08 +02:00
}
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* Returns an array of active meta box locations .
*
* @ param { Object } state Post editor state .
*
* @ return { string [ ] } Active meta box locations .
2019-09-19 17:19:18 +02:00
* /
2019-10-15 17:37:08 +02: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 ] ;
} ) ;
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* 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 .
2019-09-19 17:19:18 +02:00
* /
2019-10-15 17:37:08 +02:00
function isMetaBoxLocationVisible ( state , location ) {
2020-01-03 14:17:24 +01:00
return isMetaBoxLocationActive ( state , location ) && Object ( external _this _lodash _ [ "some" ] ) ( getMetaBoxesPerLocation ( state , location ) , function ( _ref ) {
2019-10-15 17:37:08 +02:00
var id = _ref . id ;
return selectors _isEditorPanelEnabled ( state , "meta-box-" . concat ( id ) ) ;
} ) ;
}
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* 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 .
2019-09-19 17:19:18 +02:00
* /
2019-10-15 17:37:08 +02: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 .
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02: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 .
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var getAllMetaBoxes = Object ( rememo [ "a" /* default */ ] ) ( function ( state ) {
2020-01-03 14:17:24 +01:00
return Object ( external _this _lodash _ [ "flatten" ] ) ( Object ( external _this _lodash _ [ "values" ] ) ( state . metaBoxes . locations ) ) ;
2019-10-15 17:37:08 +02:00
} , 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 .
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02: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 .
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
function selectors _isSavingMetaBoxes ( state ) {
return state . metaBoxes . isSaving ;
}
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02: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 ) ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
if ( area ) {
return area ;
}
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
return document . querySelector ( '#metaboxes .metabox-location-' + location ) ;
2019-09-19 17:19:18 +02:00
} ;
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/effects.js
2019-09-19 17:19:18 +02:00
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
/ * *
2019-10-15 17:37:08 +02:00
* Internal dependencies
2019-09-19 17:19:18 +02:00
* /
2019-10-15 17:37:08 +02:00
var saveMetaboxUnsubscribe ;
var effects = {
SET _META _BOXES _PER _LOCATIONS : function SET _META _BOXES _PER _LOCATIONS ( action , store ) {
// Allow toggling metaboxes panels
// We need to wait for all scripts to load
// If the meta box loads the post script, it will already trigger this.
// After merge in Core, make sure to drop the timeout and update the postboxes script
// to avoid the double binding.
setTimeout ( function ( ) {
var postType = Object ( external _this _wp _data _ [ "select" ] ) ( 'core/editor' ) . getCurrentPostType ( ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
if ( window . postboxes . page !== postType ) {
window . postboxes . add _postbox _toggles ( postType ) ;
}
} ) ;
var wasSavingPost = Object ( external _this _wp _data _ [ "select" ] ) ( 'core/editor' ) . isSavingPost ( ) ;
var wasAutosavingPost = Object ( external _this _wp _data _ [ "select" ] ) ( 'core/editor' ) . isAutosavingPost ( ) ; // Meta boxes are initialized once at page load. It is not necessary to
// account for updates on each state change.
//
// See: https://github.com/WordPress/WordPress/blob/5.1.1/wp-admin/includes/post.php#L2307-L2309
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var hasActiveMetaBoxes = Object ( external _this _wp _data _ [ "select" ] ) ( 'core/edit-post' ) . hasMetaBoxes ( ) ; // First remove any existing subscription in order to prevent multiple saves
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
if ( ! ! saveMetaboxUnsubscribe ) {
saveMetaboxUnsubscribe ( ) ;
} // Save metaboxes when performing a full save on the post.
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
saveMetaboxUnsubscribe = Object ( external _this _wp _data _ [ "subscribe" ] ) ( function ( ) {
var isSavingPost = Object ( external _this _wp _data _ [ "select" ] ) ( 'core/editor' ) . isSavingPost ( ) ;
var isAutosavingPost = Object ( external _this _wp _data _ [ "select" ] ) ( 'core/editor' ) . isAutosavingPost ( ) ; // Save metaboxes on save completion, except for autosaves that are not a post preview.
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var shouldTriggerMetaboxesSave = hasActiveMetaBoxes && wasSavingPost && ! isSavingPost && ! wasAutosavingPost ; // Save current state for next inspection.
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
wasSavingPost = isSavingPost ;
wasAutosavingPost = isAutosavingPost ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
if ( shouldTriggerMetaboxesSave ) {
store . dispatch ( requestMetaBoxUpdates ( ) ) ;
}
} ) ;
} ,
REQUEST _META _BOX _UPDATES : function REQUEST _META _BOX _UPDATES ( action , store ) {
// Saves the wp_editor fields
if ( window . tinyMCE ) {
window . tinyMCE . triggerSave ( ) ;
2019-09-19 17:19:18 +02:00
}
2019-10-15 17:37:08 +02:00
var state = store . getState ( ) ; // Additional data needed for backward compatibility.
// If we do not provide this data, the post will be overridden with the default values.
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var post = Object ( external _this _wp _data _ [ "select" ] ) ( 'core/editor' ) . getCurrentPost ( state ) ;
var 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
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var baseFormData = new window . FormData ( document . querySelector ( '.metabox-base-form' ) ) ;
var formDataToMerge = [ baseFormData ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( getActiveMetaBoxLocations ( state ) . map ( function ( location ) {
return new window . FormData ( getMetaBoxContainer ( location ) ) ;
} ) ) ) ; // Merge all form data objects into a single one.
2019-09-19 17:19:18 +02:00
2020-01-03 14:17:24 +01:00
var formData = Object ( external _this _lodash _ [ "reduce" ] ) ( formDataToMerge , function ( memo , currentFormData ) {
2019-10-15 17:37:08 +02:00
var _iteratorNormalCompletion = true ;
var _didIteratorError = false ;
var _iteratorError = undefined ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
try {
for ( var _iterator = currentFormData [ Symbol . iterator ] ( ) , _step ; ! ( _iteratorNormalCompletion = ( _step = _iterator . next ( ) ) . done ) ; _iteratorNormalCompletion = true ) {
var _step$value = Object ( slicedToArray [ "a" /* default */ ] ) ( _step . value , 2 ) ,
key = _step$value [ 0 ] ,
value = _step$value [ 1 ] ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
memo . append ( key , value ) ;
}
} catch ( err ) {
_didIteratorError = true ;
_iteratorError = err ;
} finally {
try {
if ( ! _iteratorNormalCompletion && _iterator . return != null ) {
_iterator . return ( ) ;
}
} finally {
if ( _didIteratorError ) {
throw _iteratorError ;
}
}
}
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
return memo ;
} , new window . FormData ( ) ) ;
additionalData . forEach ( function ( _ref ) {
var _ref2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _ref , 2 ) ,
key = _ref2 [ 0 ] ,
value = _ref2 [ 1 ] ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
return formData . append ( key , value ) ;
} ) ; // Save the metaboxes
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
external _this _wp _apiFetch _default ( ) ( {
url : window . _wpMetaBoxUrl ,
method : 'POST' ,
body : formData ,
parse : false
} ) . then ( function ( ) {
return store . dispatch ( metaBoxUpdatesSuccess ( ) ) ;
} ) ;
} ,
SWITCH _MODE : function SWITCH _MODE ( action ) {
// Unselect blocks when we switch to the code editor.
if ( action . mode !== 'visual' ) {
Object ( external _this _wp _data _ [ "dispatch" ] ) ( 'core/block-editor' ) . clearSelectedBlock ( ) ;
2019-09-19 17:19:18 +02:00
}
2019-10-15 17:37:08 +02:00
var message = action . mode === 'visual' ? Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Visual editor selected' ) : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Code editor selected' ) ;
Object ( external _this _wp _a11y _ [ "speak" ] ) ( message , 'assertive' ) ;
}
} ;
/* harmony default export */ var store _effects = ( effects ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/middlewares.js
2019-09-19 17:19:18 +02:00
/ * *
* External dependencies
* /
2019-10-15 17:37:08 +02: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
* /
/ * *
2019-10-15 17:37:08 +02:00
* Applies the custom middlewares used specifically in the editor module .
*
* @ param { Object } store Store Object .
*
* @ return { Object } Update Store Object .
2019-09-19 17:19:18 +02:00
* /
2019-10-15 17:37:08 +02:00
function applyMiddlewares ( store ) {
var middlewares = [ refx _default ( ) ( store _effects ) ] ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var enhancedDispatch = function enhancedDispatch ( ) {
throw new Error ( 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.' ) ;
} ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var chain = [ ] ;
var middlewareAPI = {
getState : store . getState ,
dispatch : function dispatch ( ) {
return enhancedDispatch . apply ( void 0 , arguments ) ;
}
} ;
chain = middlewares . map ( function ( middleware ) {
return middleware ( middlewareAPI ) ;
2019-09-19 17:19:18 +02:00
} ) ;
2020-01-03 14:17:24 +01:00
enhancedDispatch = external _this _lodash _ [ "flowRight" ] . apply ( void 0 , Object ( toConsumableArray [ "a" /* default */ ] ) ( chain ) ) ( store . dispatch ) ;
2019-10-15 17:37:08 +02:00
store . dispatch = enhancedDispatch ;
return store ;
2018-12-18 04:14:52 +01:00
}
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var store _middlewares = ( applyMiddlewares ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/controls.js
/ * *
* WordPress dependencies
* /
/ * *
* Calls a selector using the current state .
*
* @ param { string } storeName Store name .
* @ param { string } selectorName Selector name .
* @ param { Array } args Selector arguments .
*
* @ return { Object } control descriptor .
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
function controls _select ( storeName , selectorName ) {
for ( var _len = arguments . length , args = new Array ( _len > 2 ? _len - 2 : 0 ) , _key = 2 ; _key < _len ; _key ++ ) {
args [ _key - 2 ] = arguments [ _key ] ;
}
2019-09-19 17:19:18 +02:00
return {
2019-10-15 17:37:08 +02:00
type : 'SELECT' ,
storeName : storeName ,
selectorName : selectorName ,
args : args
2019-09-19 17:19:18 +02:00
} ;
2019-10-15 17:37:08 +02:00
}
var controls = {
SELECT : Object ( external _this _wp _data _ [ "createRegistryControl" ] ) ( function ( registry ) {
return function ( _ref ) {
var _registry$select ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var storeName = _ref . storeName ,
selectorName = _ref . selectorName ,
args = _ref . args ;
return ( _registry$select = registry . select ( storeName ) ) [ selectorName ] . apply ( _registry$select , Object ( toConsumableArray [ "a" /* default */ ] ) ( args ) ) ;
} ;
} )
} ;
/* harmony default export */ var store _controls = ( controls ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/constants.js
2018-12-17 05:52:00 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* The identifier for the data store .
*
* @ type { string }
* /
var STORE _KEY = 'core/edit-post' ;
/ * *
* CSS selector string for the admin bar view post link anchor tag .
*
* @ type { string }
2018-12-17 05:52:00 +01:00
* /
2019-10-15 17:37:08 +02:00
var VIEW _AS _LINK _SELECTOR = '#wp-admin-bar-view a' ;
/ * *
* CSS selector string for the admin bar preview post link anchor tag .
*
* @ type { string }
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var VIEW _AS _PREVIEW _LINK _SELECTOR = '#wp-admin-bar-preview a' ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js
/ * *
* WordPress dependencies
* /
2019-09-19 17:19:18 +02:00
2018-12-17 05:52:00 +01:00
/ * *
2019-09-19 17:19:18 +02:00
* Internal dependencies
2018-12-17 05:52:00 +01:00
* /
2019-09-19 17:19:18 +02:00
2018-12-17 05:52:00 +01:00
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var store _store = Object ( external _this _wp _data _ [ "registerStore" ] ) ( STORE _KEY , {
reducer : reducer ,
actions : actions _namespaceObject ,
selectors : selectors _namespaceObject ,
controls : store _controls ,
persist : [ 'preferences' ]
} ) ;
store _middlewares ( store _store ) ;
/* harmony default export */ var build _module _store = ( store _store ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
2020-02-10 23:33:27 +01:00
var classCallCheck = _ _webpack _require _ _ ( 14 ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
2020-02-10 23:33:27 +01:00
var createClass = _ _webpack _require _ _ ( 13 ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
2020-02-10 23:33:27 +01:00
var possibleConstructorReturn = _ _webpack _require _ _ ( 15 ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
2020-02-10 23:33:27 +01:00
var getPrototypeOf = _ _webpack _require _ _ ( 16 ) ;
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
2020-02-10 23:33:27 +01:00
var inherits = _ _webpack _require _ _ ( 17 ) ;
2019-10-15 17:37:08 +02:00
// EXTERNAL MODULE: ./node_modules/memize/index.js
2020-03-24 00:40:19 +01:00
var memize = _ _webpack _require _ _ ( 46 ) ;
2019-10-15 17:37:08 +02:00
var memize _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( memize ) ;
// 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 ) {
if ( ! document . activeElement . classList . contains ( 'edit-post-visual-editor' ) && document . activeElement !== document . body ) {
return ;
}
event . preventDefault ( ) ;
window . wp . data . dispatch ( 'core/block-editor' ) . insertBlock ( window . wp . blocks . createBlock ( 'core/paragraph' , {
content : '🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️'
} ) ) ;
}
} ) ;
// EXTERNAL MODULE: ./node_modules/classnames/index.js
2020-02-10 23:33:27 +01:00
var classnames = _ _webpack _require _ _ ( 11 ) ;
2019-10-15 17:37:08 +02:00
var classnames _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( classnames ) ;
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
2020-03-24 00:40:19 +01:00
var library _close = _ _webpack _require _ _ ( 120 ) ;
2020-02-10 23:33:27 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/text-editor/index.js
/ * *
* WordPress dependencies
* /
2019-09-19 17:19:18 +02:00
2018-12-17 05:52:00 +01:00
2020-01-08 12:57:23 +01:00
2020-02-10 23:33:27 +01:00
2020-01-08 12:57:23 +01:00
function TextEditor ( _ref ) {
var onExit = _ref . onExit ,
isRichEditingEnabled = _ref . isRichEditingEnabled ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-text-editor"
} , isRichEditingEnabled && Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-text-editor__toolbar"
2020-01-22 23:06:21 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "h2" , null , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Editing Code' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
2020-01-08 12:57:23 +01:00
onClick : onExit ,
2020-02-10 23:33:27 +01:00
icon : library _close [ "a" /* default */ ] ,
2020-01-08 12:57:23 +01:00
shortcut : external _this _wp _keycodes _ [ "displayShortcut" ] . secondary ( 'm' )
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Exit Code Editor' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "TextEditorGlobalKeyboardShortcuts" ] , null ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-text-editor__body"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTitle" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTextEditor" ] , null ) ) ) ;
}
/* harmony default export */ var text _editor = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
isRichEditingEnabled : select ( 'core/editor' ) . getEditorSettings ( ) . richEditingEnabled
} ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
return {
onExit : function onExit ( ) {
dispatch ( 'core/edit-post' ) . switchEditorMode ( 'visual' ) ;
}
} ;
} ) ) ( TextEditor ) ) ;
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: external {"this":["wp","primitives"]}
var external _this _wp _primitives _ = _ _webpack _require _ _ ( 9 ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cog.js
/ * *
* WordPress dependencies
* /
var cog = Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "-2 -2 24 24"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "Path" ] , {
d : "M18 12h-2.18c-.17.7-.44 1.35-.81 1.93l1.54 1.54-2.1 2.1-1.54-1.54c-.58.36-1.23.63-1.91.79V19H8v-2.18c-.68-.16-1.33-.43-1.91-.79l-1.54 1.54-2.12-2.12 1.54-1.54c-.36-.58-.63-1.23-.79-1.91H1V9.03h2.17c.16-.7.44-1.35.8-1.94L2.43 5.55l2.1-2.1 1.54 1.54c.58-.37 1.24-.64 1.93-.81V2h3v2.18c.68.16 1.33.43 1.91.79l1.54-1.54 2.12 2.12-1.54 1.54c.36.59.64 1.24.8 1.94H18V12zm-8.5 1.5c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z"
} ) ) ;
/* harmony default export */ var library _cog = ( cog ) ;
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/visual-editor/block-inspector-button.js
2019-09-19 17:19:18 +02:00
2018-12-18 04:14:52 +01:00
/ * *
2020-01-08 12:57:23 +01:00
* External dependencies
2018-12-18 04:14:52 +01:00
* /
2018-12-17 05:52:00 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2020-01-22 23:06:21 +01:00
* WordPress dependencies
2020-01-08 12:57:23 +01:00
* /
2019-10-15 17:37:08 +02:00
2020-01-22 23:06:21 +01:00
2020-02-10 23:33:27 +01:00
2020-01-08 12:57:23 +01:00
function BlockInspectorButton ( _ref ) {
2020-01-22 23:06:21 +01:00
var _ref$onClick = _ref . onClick ,
_onClick = _ref$onClick === void 0 ? external _this _lodash _ [ "noop" ] : _ref$onClick ,
2020-01-08 12:57:23 +01:00
_ref$small = _ref . small ,
small = _ref$small === void 0 ? false : _ref$small ,
speak = _ref . speak ;
2019-10-15 17:37:08 +02:00
2020-01-22 23:06:21 +01:00
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
shortcut : select ( 'core/keyboard-shortcuts' ) . getShortcutRepresentation ( 'core/edit-post/toggle-sidebar' ) ,
areAdvancedSettingsOpened : select ( 'core/edit-post' ) . getActiveGeneralSidebarName ( ) === 'edit-post/block'
} ;
} , [ ] ) ,
shortcut = _useSelect . shortcut ,
areAdvancedSettingsOpened = _useSelect . areAdvancedSettingsOpened ;
var _useDispatch = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( 'core/edit-post' ) ,
openGeneralSidebar = _useDispatch . openGeneralSidebar ,
closeGeneralSidebar = _useDispatch . closeGeneralSidebar ;
2020-01-08 12:57:23 +01:00
var speakMessage = function speakMessage ( ) {
if ( areAdvancedSettingsOpened ) {
speak ( Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Block settings closed' ) ) ;
} else {
speak ( Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Additional settings are now available in the Editor block settings sidebar' ) ) ;
2019-10-15 17:37:08 +02:00
}
2020-01-08 12:57:23 +01:00
} ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
var label = areAdvancedSettingsOpened ? Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Hide Block Settings' ) : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Show Block Settings' ) ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItem" ] , {
2020-01-22 23:06:21 +01:00
onClick : function onClick ( ) {
if ( areAdvancedSettingsOpened ) {
closeGeneralSidebar ( ) ;
} else {
openGeneralSidebar ( 'edit-post/block' ) ;
speakMessage ( ) ;
_onClick ( ) ;
}
} ,
2020-02-10 23:33:27 +01:00
icon : library _cog ,
2020-01-22 23:06:21 +01:00
shortcut : shortcut
2020-01-08 12:57:23 +01:00
} , ! small && label ) ;
}
2020-01-22 23:06:21 +01:00
/* harmony default export */ var block _inspector _button = ( Object ( external _this _wp _components _ [ "withSpokenMessages" ] ) ( BlockInspectorButton ) ) ;
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/block-settings-menu/plugin-block-settings-menu-group.js
2019-09-19 17:19:18 +02:00
2020-02-06 22:03:31 +01:00
function plugin _block _settings _menu _group _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 plugin _block _settings _menu _group _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { plugin _block _settings _menu _group _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 { plugin _block _settings _menu _group _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-09-19 17:19:18 +02:00
* External dependencies
2018-12-18 04:14:52 +01:00
* /
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
/ * *
2019-09-19 17:19:18 +02:00
* WordPress dependencies
2018-12-18 04:14:52 +01:00
* /
2018-12-17 05:52:00 +01:00
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
var plugin _block _settings _menu _group _createSlotFill = Object ( external _this _wp _components _ [ "createSlotFill" ] ) ( 'PluginBlockSettingsMenuGroup' ) ,
PluginBlockSettingsMenuGroup = plugin _block _settings _menu _group _createSlotFill . Fill ,
plugin _block _settings _menu _group _Slot = plugin _block _settings _menu _group _createSlotFill . Slot ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
var plugin _block _settings _menu _group _PluginBlockSettingsMenuGroupSlot = function PluginBlockSettingsMenuGroupSlot ( _ref ) {
var fillProps = _ref . fillProps ,
selectedBlocks = _ref . selectedBlocks ;
selectedBlocks = Object ( external _this _lodash _ [ "map" ] ) ( selectedBlocks , function ( block ) {
return block . name ;
} ) ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( plugin _block _settings _menu _group _Slot , {
2020-02-06 22:03:31 +01:00
fillProps : plugin _block _settings _menu _group _objectSpread ( { } , fillProps , {
2020-01-08 12:57:23 +01:00
selectedBlocks : selectedBlocks
} )
} , function ( fills ) {
return ! Object ( external _this _lodash _ [ "isEmpty" ] ) ( fills ) && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
2020-01-22 23:06:21 +01:00
className : "block-editor-block-settings-menu__separator"
2020-01-08 12:57:23 +01:00
} ) , fills ) ;
} ) ;
} ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
PluginBlockSettingsMenuGroup . Slot = Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref2 ) {
var clientIds = _ref2 . fillProps . clientIds ;
2019-09-19 17:19:18 +02:00
return {
2020-01-08 12:57:23 +01:00
selectedBlocks : select ( 'core/block-editor' ) . getBlocksByClientId ( clientIds )
2018-12-14 05:53:54 +01:00
} ;
2020-01-08 12:57:23 +01:00
} ) ( plugin _block _settings _menu _group _PluginBlockSettingsMenuGroupSlot ) ;
/* harmony default export */ var plugin _block _settings _menu _group = ( PluginBlockSettingsMenuGroup ) ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/visual-editor/index.js
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
2020-02-06 22:03:31 +01:00
2020-01-08 12:57:23 +01:00
/ * *
* Internal dependencies
* /
2018-12-17 05:52:00 +01:00
2020-01-08 12:57:23 +01:00
function VisualEditor ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "BlockSelectionClearer" ] , {
className : "edit-post-visual-editor editor-styles-wrapper"
2020-02-06 22:03:31 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "VisualEditorGlobalKeyboardShortcuts" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "MultiSelectScrollIntoView" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Popover" ] . Slot , {
name : "block-toolbar"
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "Typewriter" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "CopyHandler" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "WritingFlow" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "ObserveTyping" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "CopyHandler" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTitle" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "BlockList" ] , null ) ) ) ) ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "__experimentalBlockSettingsMenuFirstItem" ] , null , function ( _ref ) {
2020-01-08 12:57:23 +01:00
var onClose = _ref . onClose ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( block _inspector _button , {
onClick : onClose
} ) ;
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "__experimentalBlockSettingsMenuPluginsExtension" ] , null , function ( _ref2 ) {
var clientIds = _ref2 . clientIds ,
onClose = _ref2 . onClose ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( plugin _block _settings _menu _group . Slot , {
fillProps : {
clientIds : clientIds ,
onClose : onClose
}
} ) ;
} ) ) ;
}
/* harmony default export */ var visual _editor = ( VisualEditor ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcuts/index.js
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
2020-01-22 23:06:21 +01:00
function KeyboardShortcuts ( ) {
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var settings = select ( 'core/editor' ) . getEditorSettings ( ) ;
return {
getBlockSelectionStart : select ( 'core/block-editor' ) . getBlockSelectionStart ,
getEditorMode : select ( 'core/edit-post' ) . getEditorMode ,
isEditorSidebarOpened : select ( 'core/edit-post' ) . isEditorSidebarOpened ,
richEditingEnabled : settings . richEditingEnabled ,
codeEditingEnabled : settings . codeEditingEnabled
} ;
} ) ,
getBlockSelectionStart = _useSelect . getBlockSelectionStart ,
getEditorMode = _useSelect . getEditorMode ,
2020-02-06 22:03:31 +01:00
isEditorSidebarOpened = _useSelect . isEditorSidebarOpened ,
2020-01-22 23:06:21 +01:00
richEditingEnabled = _useSelect . richEditingEnabled ,
codeEditingEnabled = _useSelect . codeEditingEnabled ;
var _useDispatch = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( 'core/edit-post' ) ,
switchEditorMode = _useDispatch . switchEditorMode ,
openGeneralSidebar = _useDispatch . openGeneralSidebar ,
closeGeneralSidebar = _useDispatch . closeGeneralSidebar ;
2018-12-17 05:52:00 +01:00
2020-01-22 23:06:21 +01:00
var _useDispatch2 = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( 'core/keyboard-shortcuts' ) ,
registerShortcut = _useDispatch2 . registerShortcut ;
2018-12-17 05:52:00 +01:00
2020-01-22 23:06:21 +01:00
Object ( external _this _wp _element _ [ "useEffect" ] ) ( function ( ) {
registerShortcut ( {
name : 'core/edit-post/toggle-mode' ,
category : 'global' ,
description : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Switch between Visual editor and Code editor.' ) ,
keyCombination : {
modifier : 'secondary' ,
character : 'm'
}
} ) ;
registerShortcut ( {
name : 'core/edit-post/toggle-block-navigation' ,
category : 'global' ,
description : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Open the block navigation menu.' ) ,
keyCombination : {
modifier : 'access' ,
character : 'o'
}
} ) ;
registerShortcut ( {
name : 'core/edit-post/toggle-sidebar' ,
category : 'global' ,
description : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Show or hide the settings sidebar.' ) ,
keyCombination : {
modifier : 'primaryShift' ,
character : ','
}
} ) ;
registerShortcut ( {
name : 'core/edit-post/next-region' ,
category : 'global' ,
description : Object ( external _this _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 _this _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 _this _wp _i18n _ [ "__" ] ) ( 'Display these keyboard shortcuts.' ) ,
keyCombination : {
modifier : 'access' ,
character : 'h'
}
} ) ;
} , [ ] ) ;
Object ( external _this _wp _keyboardShortcuts _ [ "useShortcut" ] ) ( 'core/edit-post/toggle-mode' , function ( ) {
switchEditorMode ( getEditorMode ( ) === 'visual' ? 'text' : 'visual' ) ;
} , {
bindGlobal : true ,
isDisabled : ! richEditingEnabled || ! codeEditingEnabled
} ) ;
Object ( external _this _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 ( ) ;
2018-12-17 05:52:00 +01:00
2020-02-06 22:03:31 +01:00
if ( isEditorSidebarOpened ( ) ) {
2020-01-22 23:06:21 +01:00
closeGeneralSidebar ( ) ;
} else {
var sidebarToOpen = getBlockSelectionStart ( ) ? 'edit-post/block' : 'edit-post/document' ;
openGeneralSidebar ( sidebarToOpen ) ;
}
} , {
bindGlobal : true
} ) ;
return null ;
}
2018-12-17 05:52:00 +01:00
2020-01-22 23:06:21 +01:00
/* harmony default export */ var keyboard _shortcuts = ( KeyboardShortcuts ) ;
2018-12-17 05:52:00 +01:00
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcut-help-modal/config.js
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-17 05:52:00 +01:00
2020-01-22 23:06:21 +01:00
var textFormattingShortcuts = [ {
keyCombination : {
modifier : 'primary' ,
character : 'b'
} ,
description : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Make the selected text bold.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'i'
} ,
description : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Make the selected text italic.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'k'
} ,
description : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Convert the selected text into a link.' )
} , {
keyCombination : {
modifier : 'primaryShift' ,
character : 'k'
} ,
description : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Remove a link.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'u'
} ,
description : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Underline the selected text.' )
} ] ;
2018-12-17 05:52:00 +01:00
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcut-help-modal/shortcut.js
2018-12-17 05:52:00 +01:00
2018-12-14 05:53:54 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2020-01-22 23:06:21 +01:00
* External dependencies
2019-10-15 17:37:08 +02:00
* /
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
2020-01-22 23:06:21 +01:00
function KeyCombination ( _ref ) {
var keyCombination = _ref . keyCombination ,
forceAriaLabel = _ref . forceAriaLabel ;
var shortcut = keyCombination . modifier ? external _this _wp _keycodes _ [ "displayShortcutList" ] [ keyCombination . modifier ] ( keyCombination . character ) : keyCombination . character ;
var ariaLabel = keyCombination . modifier ? external _this _wp _keycodes _ [ "shortcutAriaLabel" ] [ keyCombination . modifier ] ( keyCombination . character ) : keyCombination . character ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "kbd" , {
className : "edit-post-keyboard-shortcut-help-modal__shortcut-key-combination" ,
"aria-label" : forceAriaLabel || ariaLabel
} , Object ( external _this _lodash _ [ "castArray" ] ) ( shortcut ) . map ( function ( character , index ) {
if ( character === '+' ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , {
key : index
} , character ) ;
2020-01-08 12:57:23 +01:00
}
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "kbd" , {
key : index ,
className : "edit-post-keyboard-shortcut-help-modal__shortcut-key"
} , character ) ;
} ) ) ;
}
2019-09-19 17:19:18 +02:00
2020-01-22 23:06:21 +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 _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-keyboard-shortcut-help-modal__shortcut-description"
} , description ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-keyboard-shortcut-help-modal__shortcut-term"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( KeyCombination , {
keyCombination : keyCombination ,
forceAriaLabel : ariaLabel
} ) , aliases . map ( function ( alias , index ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( KeyCombination , {
keyCombination : alias ,
forceAriaLabel : ariaLabel ,
key : index
} ) ;
} ) ) ) ;
}
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
/* harmony default export */ var keyboard _shortcut _help _modal _shortcut = ( Shortcut ) ;
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
2018-12-14 05:53:54 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
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
2020-01-22 23:06:21 +01:00
function DynamicShortcut ( _ref ) {
var name = _ref . name ;
2019-09-19 17:19:18 +02:00
2020-01-22 23:06:21 +01:00
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select = select ( 'core/keyboard-shortcuts' ) ,
getShortcutKeyCombination = _select . getShortcutKeyCombination ,
getShortcutDescription = _select . getShortcutDescription ,
getShortcutAliases = _select . getShortcutAliases ;
return {
keyCombination : getShortcutKeyCombination ( name ) ,
aliases : getShortcutAliases ( name ) ,
description : getShortcutDescription ( name )
} ;
} ) ,
keyCombination = _useSelect . keyCombination ,
description = _useSelect . description ,
aliases = _useSelect . aliases ;
2018-12-14 05:41:57 +01:00
2020-01-22 23:06:21 +01:00
if ( ! keyCombination ) {
return null ;
}
return Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _shortcut , {
keyCombination : keyCombination ,
description : description ,
aliases : aliases
} ) ;
}
/* harmony default export */ var dynamic _shortcut = ( DynamicShortcut ) ;
2018-12-14 05:41:57 +01:00
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcut-help-modal/index.js
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
/ * *
* External dependencies
* /
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
* /
2019-03-07 10:09:59 +01:00
2020-01-22 23:06:21 +01:00
var MODAL _NAME = 'edit-post/keyboard-shortcut-help' ;
2019-03-07 10:09:59 +01:00
2020-01-08 12:57:23 +01:00
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 .
* /
2019-03-07 10:09:59 +01:00
2020-01-08 12:57:23 +01:00
/* eslint-disable jsx-a11y/no-redundant-roles */
Object ( external _this _wp _element _ [ "createElement" ] ) ( "ul" , {
2020-01-22 23:06:21 +01:00
className : "edit-post-keyboard-shortcut-help-modal__shortcut-list" ,
2020-01-08 12:57:23 +01:00
role : "list"
2020-01-22 23:06:21 +01:00
} , shortcuts . map ( function ( shortcut , index ) {
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "li" , {
2020-01-22 23:06:21 +01:00
className : "edit-post-keyboard-shortcut-help-modal__shortcut" ,
2020-01-08 12:57:23 +01:00
key : index
2020-01-22 23:06:21 +01:00
} , Object ( external _this _lodash _ [ "isString" ] ) ( shortcut ) ? Object ( external _this _wp _element _ [ "createElement" ] ) ( dynamic _shortcut , {
name : shortcut
} ) : Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _shortcut , shortcut ) ) ;
2020-01-08 12:57:23 +01:00
} ) )
/* eslint-enable jsx-a11y/no-redundant-roles */
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
) ;
} ;
2018-12-14 05:41:57 +01:00
2020-01-22 23:06:21 +01:00
var keyboard _shortcut _help _modal _ShortcutSection = function ShortcutSection ( _ref2 ) {
var title = _ref2 . title ,
shortcuts = _ref2 . shortcuts ,
className = _ref2 . className ;
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "section" , {
2020-01-22 23:06:21 +01:00
className : classnames _default ( ) ( 'edit-post-keyboard-shortcut-help-modal__section' , className )
2020-01-08 12:57:23 +01:00
} , ! ! title && Object ( external _this _wp _element _ [ "createElement" ] ) ( "h2" , {
2020-01-22 23:06:21 +01:00
className : "edit-post-keyboard-shortcut-help-modal__section-title"
2020-01-08 12:57:23 +01:00
} , title ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutList , {
shortcuts : shortcuts
} ) ) ;
} ;
2018-12-14 05:41:57 +01:00
2020-02-10 23:33:27 +01:00
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 _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return select ( 'core/keyboard-shortcuts' ) . getCategoryShortcuts ( categoryName ) ;
} , [ categoryName ] ) ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutSection , {
title : title ,
shortcuts : categoryShortcuts . concat ( additionalShortcuts )
} ) ;
} ;
function KeyboardShortcutHelpModal ( _ref4 ) {
var isModalActive = _ref4 . isModalActive ,
toggleModal = _ref4 . toggleModal ;
2020-01-22 23:06:21 +01:00
Object ( external _this _wp _keyboardShortcuts _ [ "useShortcut" ] ) ( 'core/edit-post/keyboard-shortcuts' , toggleModal , {
bindGlobal : true
} ) ;
if ( ! isModalActive ) {
return null ;
}
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Modal" ] , {
className : "edit-post-keyboard-shortcut-help-modal" ,
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Keyboard shortcuts' ) ,
2020-01-08 12:57:23 +01:00
closeLabel : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Close' ) ,
onRequestClose : toggleModal
2020-01-22 23:06:21 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutSection , {
className : "edit-post-keyboard-shortcut-help-modal__main-shortcuts" ,
shortcuts : [ 'core/edit-post/keyboard-shortcuts' ]
2020-02-10 23:33:27 +01:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutCategorySection , {
2020-01-22 23:06:21 +01:00
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Global shortcuts' ) ,
2020-02-10 23:33:27 +01:00
categoryName : "global"
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutCategorySection , {
2020-01-22 23:06:21 +01:00
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Selection shortcuts' ) ,
2020-02-10 23:33:27 +01:00
categoryName : "selection"
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutCategorySection , {
2020-01-22 23:06:21 +01:00
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Block shortcuts' ) ,
2020-02-10 23:33:27 +01:00
categoryName : "block" ,
additionalShortcuts : [ {
2020-01-22 23:06:21 +01:00
keyCombination : {
character : '/'
} ,
description : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Change the block type after adding a new paragraph.' ) ,
/* translators: The forward-slash character. e.g. '/'. */
ariaLabel : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Forward-slash' )
} ]
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal _ShortcutSection , {
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Text formatting' ) ,
shortcuts : textFormattingShortcuts
} ) ) ;
2020-01-08 12:57:23 +01:00
}
/* harmony default export */ var keyboard _shortcut _help _modal = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( [ Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
2019-10-15 17:37:08 +02:00
return {
2020-01-08 12:57:23 +01:00
isModalActive : select ( 'core/edit-post' ) . isModalActive ( MODAL _NAME )
2019-10-15 17:37:08 +02:00
} ;
2020-02-10 23:33:27 +01:00
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , _ref5 ) {
var isModalActive = _ref5 . isModalActive ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
var _dispatch = dispatch ( 'core/edit-post' ) ,
2020-01-08 12:57:23 +01:00
openModal = _dispatch . openModal ,
closeModal = _dispatch . closeModal ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return {
2020-01-08 12:57:23 +01:00
toggleModal : function toggleModal ( ) {
return isModalActive ? closeModal ( ) : openModal ( MODAL _NAME ) ;
}
2019-10-15 17:37:08 +02:00
} ;
2020-01-08 12:57:23 +01:00
} ) ] ) ( KeyboardShortcutHelpModal ) ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/manage-blocks-modal/checklist.js
2018-12-14 05:41:57 +01:00
/ * *
2020-01-08 12:57:23 +01:00
* External dependencies
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
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
function BlockTypesChecklist ( _ref ) {
var blockTypes = _ref . blockTypes ,
value = _ref . value ,
onItemChange = _ref . onItemChange ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "ul" , {
className : "edit-post-manage-blocks-modal__checklist"
} , blockTypes . map ( function ( blockType ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "li" , {
key : blockType . name ,
className : "edit-post-manage-blocks-modal__checklist-item"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "CheckboxControl" ] , {
label : Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , blockType . title , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "BlockIcon" ] , {
icon : blockType . icon
} ) ) ,
checked : value . includes ( blockType . name ) ,
onChange : Object ( external _this _lodash _ [ "partial" ] ) ( onItemChange , blockType . name )
} ) ) ;
} ) ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var checklist = ( BlockTypesChecklist ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/edit-post-settings/index.js
/ * *
* WordPress dependencies
* /
var EditPostSettings = Object ( external _this _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
2018-12-14 05:41:57 +01:00
/ * *
2019-03-07 10:09:59 +01:00
* External dependencies
2018-12-14 05:41:57 +01:00
* /
2018-12-18 04:14:52 +01:00
/ * *
2019-03-07 10:09:59 +01:00
* WordPress dependencies
2018-12-18 04:14:52 +01:00
* /
2018-12-14 05:41:57 +01:00
2018-12-14 05:53:54 +01:00
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* Internal dependencies
* /
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
function BlockManagerCategory ( _ref ) {
var instanceId = _ref . instanceId ,
category = _ref . category ,
blockTypes = _ref . blockTypes ,
hiddenBlockTypes = _ref . hiddenBlockTypes ,
toggleVisible = _ref . toggleVisible ,
toggleAllVisible = _ref . toggleAllVisible ;
var settings = Object ( external _this _wp _element _ [ "useContext" ] ) ( edit _post _settings ) ;
var allowedBlockTypes = settings . allowedBlockTypes ;
var filteredBlockTypes = Object ( external _this _wp _element _ [ "useMemo" ] ) ( function ( ) {
if ( allowedBlockTypes === true ) {
return blockTypes ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
return blockTypes . filter ( function ( _ref2 ) {
var name = _ref2 . name ;
return Object ( external _this _lodash _ [ "includes" ] ) ( allowedBlockTypes || [ ] , name ) ;
} ) ;
} , [ allowedBlockTypes , blockTypes ] ) ;
if ( ! filteredBlockTypes . length ) {
return null ;
}
var checkedBlockNames = external _this _lodash _ [ "without" ] . apply ( void 0 , [ Object ( external _this _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 _this _wp _element _ [ "createElement" ] ) ( "div" , {
role : "group" ,
"aria-labelledby" : titleId ,
className : "edit-post-manage-blocks-modal__category"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "CheckboxControl" ] , {
checked : isAllChecked ,
onChange : toggleAllVisible ,
className : "edit-post-manage-blocks-modal__category-title" ,
"aria-checked" : ariaChecked ,
label : Object ( external _this _wp _element _ [ "createElement" ] ) ( "span" , {
id : titleId
} , category . title )
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( checklist , {
blockTypes : filteredBlockTypes ,
value : checkedBlockNames ,
onItemChange : toggleVisible
} ) ) ;
2019-09-19 17:19:18 +02:00
}
2020-01-08 12:57:23 +01:00
/* harmony default export */ var manage _blocks _modal _category = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( [ external _this _wp _compose _ [ "withInstanceId" ] , Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/edit-post' ) ,
getPreference = _select . getPreference ;
2018-12-18 04:14:52 +01:00
return {
2020-01-08 12:57:23 +01:00
hiddenBlockTypes : getPreference ( 'hiddenBlockTypes' )
2018-12-18 04:14:52 +01:00
} ;
2020-01-08 12:57:23 +01:00
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , ownProps ) {
var _dispatch = dispatch ( 'core/edit-post' ) ,
showBlockTypes = _dispatch . showBlockTypes ,
hideBlockTypes = _dispatch . hideBlockTypes ;
2019-09-19 17:19:18 +02:00
return {
2020-01-08 12:57:23 +01:00
toggleVisible : function toggleVisible ( blockName , nextIsChecked ) {
if ( nextIsChecked ) {
showBlockTypes ( blockName ) ;
} else {
hideBlockTypes ( blockName ) ;
}
2019-10-15 17:37:08 +02:00
} ,
2020-01-08 12:57:23 +01:00
toggleAllVisible : function toggleAllVisible ( nextIsChecked ) {
var blockNames = Object ( external _this _lodash _ [ "map" ] ) ( ownProps . blockTypes , 'name' ) ;
2018-12-18 04:14:52 +01:00
2020-01-08 12:57:23 +01:00
if ( nextIsChecked ) {
showBlockTypes ( blockNames ) ;
} else {
hideBlockTypes ( blockNames ) ;
}
}
} ;
} ) ] ) ( BlockManagerCategory ) ) ;
2018-12-18 04:14:52 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/manage-blocks-modal/manager.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
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
/ * *
* Internal dependencies
* /
2020-01-08 12:57:23 +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 ;
// Filtering occurs here (as opposed to `withSelect`) to avoid wasted
// wasted renders by consequence of `Array#filter` producing a new
// value reference on each call.
blockTypes = blockTypes . filter ( function ( blockType ) {
2020-02-06 22:03:31 +01:00
return hasBlockSupport ( blockType , 'inserter' , true ) && ( ! search || isMatchingSearchTerm ( blockType , search ) ) && ( ! blockType . parent || Object ( external _this _lodash _ [ "includes" ] ) ( blockType . parent , 'core/post-content' ) ) ;
2020-01-08 12:57:23 +01:00
} ) ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-manage-blocks-modal__content"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "TextControl" ] , {
type : "search" ,
label : Object ( external _this _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 _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-manage-blocks-modal__disabled-blocks-count"
} , Object ( external _this _wp _i18n _ [ "sprintf" ] ) ( Object ( external _this _wp _i18n _ [ "_n" ] ) ( '%1$d block is disabled.' , '%1$d blocks are disabled.' , numberOfHiddenBlocks ) , numberOfHiddenBlocks ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
tabIndex : "0" ,
role : "region" ,
"aria-label" : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Available block types' ) ,
className : "edit-post-manage-blocks-modal__results"
} , blockTypes . length === 0 && Object ( external _this _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-manage-blocks-modal__no-results"
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'No blocks found.' ) ) , categories . map ( function ( category ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( manage _blocks _modal _category , {
key : category . slug ,
category : category ,
blockTypes : Object ( external _this _lodash _ [ "filter" ] ) ( blockTypes , {
category : category . slug
} )
2019-10-15 17:37:08 +02:00
} ) ;
2020-01-08 12:57:23 +01:00
} ) ) ) ;
2019-10-15 17:37:08 +02:00
}
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var manager = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( [ Object ( external _this _wp _compose _ [ "withState" ] ) ( {
search : ''
} ) , Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/blocks' ) ,
getBlockTypes = _select . getBlockTypes ,
getCategories = _select . getCategories ,
hasBlockSupport = _select . hasBlockSupport ,
isMatchingSearchTerm = _select . isMatchingSearchTerm ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
var _select2 = select ( 'core/edit-post' ) ,
getPreference = _select2 . getPreference ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
var hiddenBlockTypes = getPreference ( 'hiddenBlockTypes' ) ;
var numberOfHiddenBlocks = Object ( external _this _lodash _ [ "isArray" ] ) ( hiddenBlockTypes ) && hiddenBlockTypes . length ;
return {
blockTypes : getBlockTypes ( ) ,
categories : getCategories ( ) ,
hasBlockSupport : hasBlockSupport ,
isMatchingSearchTerm : isMatchingSearchTerm ,
numberOfHiddenBlocks : numberOfHiddenBlocks
} ;
} ) ] ) ( BlockManager ) ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/manage-blocks-modal/index.js
2018-12-14 05:41:57 +01:00
/ * *
* WordPress dependencies
* /
2019-10-15 17:37:08 +02:00
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/ * *
* Unique identifier for Manage Blocks modal .
*
* @ type { string }
* /
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
var manage _blocks _modal _MODAL _NAME = 'edit-post/manage-blocks' ;
function ManageBlocksModal ( _ref ) {
var isActive = _ref . isActive ,
closeModal = _ref . closeModal ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
if ( ! isActive ) {
return null ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Modal" ] , {
className : "edit-post-manage-blocks-modal" ,
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Block Manager' ) ,
closeLabel : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Close' ) ,
onRequestClose : closeModal
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( manager , null ) ) ;
}
/* harmony default export */ var manage _blocks _modal = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( [ Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/edit-post' ) ,
isModalActive = _select . isModalActive ;
2018-12-14 05:53:54 +01:00
2020-01-08 12:57:23 +01:00
return {
isActive : isModalActive ( manage _blocks _modal _MODAL _NAME )
} ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/edit-post' ) ,
closeModal = _dispatch . closeModal ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
return {
closeModal : closeModal
} ;
} ) ] ) ( ManageBlocksModal ) ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/options-modal/section.js
2018-12-19 04:16:48 +01:00
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
var section _Section = function Section ( _ref ) {
var title = _ref . title ,
children = _ref . children ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "section" , {
className : "edit-post-options-modal__section"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "h2" , {
className : "edit-post-options-modal__section-title"
} , title ) , children ) ;
} ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var section = ( section _Section ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/options-modal/options/base.js
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
* /
2020-01-08 12:57:23 +01:00
function BaseOption ( _ref ) {
var label = _ref . label ,
isChecked = _ref . isChecked ,
onChange = _ref . onChange ,
children = _ref . children ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-options-modal__option"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "CheckboxControl" ] , {
label : label ,
checked : isChecked ,
onChange : onChange
} ) , children ) ;
}
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var base = ( BaseOption ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/options-modal/options/enable-custom-fields.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
2018-12-18 04:14:52 +01:00
/ * *
2020-01-08 12:57:23 +01:00
* Internal 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
function CustomFieldsConfirmation ( _ref ) {
var willEnable = _ref . willEnable ;
var _useState = Object ( external _this _wp _element _ [ "useState" ] ) ( false ) ,
_useState2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _useState , 2 ) ,
isReloading = _useState2 [ 0 ] ,
setIsReloading = _useState2 [ 1 ] ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-options-modal__custom-fields-confirmation-message"
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'A page reload is required for this change. Make sure your content is saved before reloading.' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
className : "edit-post-options-modal__custom-fields-confirmation-button" ,
2020-01-22 23:06:21 +01:00
isSecondary : true ,
2020-01-08 12:57:23 +01:00
isBusy : isReloading ,
disabled : isReloading ,
onClick : function onClick ( ) {
setIsReloading ( true ) ;
document . getElementById ( 'toggle-custom-fields-form' ) . submit ( ) ;
}
} , willEnable ? Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Enable & Reload' ) : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Disable & Reload' ) ) ) ;
}
function EnableCustomFieldsOption ( _ref2 ) {
var label = _ref2 . label ,
areCustomFieldsEnabled = _ref2 . areCustomFieldsEnabled ;
var _useState3 = Object ( external _this _wp _element _ [ "useState" ] ) ( areCustomFieldsEnabled ) ,
_useState4 = Object ( slicedToArray [ "a" /* default */ ] ) ( _useState3 , 2 ) ,
isChecked = _useState4 [ 0 ] ,
setIsChecked = _useState4 [ 1 ] ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( base , {
label : label ,
isChecked : isChecked ,
onChange : setIsChecked
} , isChecked !== areCustomFieldsEnabled && Object ( external _this _wp _element _ [ "createElement" ] ) ( CustomFieldsConfirmation , {
willEnable : isChecked
} ) ) ;
}
/* harmony default export */ var enable _custom _fields = ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
areCustomFieldsEnabled : ! ! select ( 'core/editor' ) . getEditorSettings ( ) . enableCustomFields
} ;
} ) ( EnableCustomFieldsOption ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/options-modal/options/enable-panel.js
2018-12-14 05:41:57 +01:00
/ * *
* WordPress dependencies
* /
2020-01-08 12:57:23 +01:00
/ * *
* Internal dependencies
* /
/* harmony default export */ var enable _panel = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref ) {
var panelName = _ref . panelName ;
var _select = select ( 'core/edit-post' ) ,
isEditorPanelEnabled = _select . isEditorPanelEnabled ,
isEditorPanelRemoved = _select . isEditorPanelRemoved ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
return {
isRemoved : isEditorPanelRemoved ( panelName ) ,
isChecked : isEditorPanelEnabled ( panelName )
} ;
} ) , Object ( external _this _wp _compose _ [ "ifCondition" ] ) ( function ( _ref2 ) {
var isRemoved = _ref2 . isRemoved ;
return ! isRemoved ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , _ref3 ) {
var panelName = _ref3 . panelName ;
return {
onChange : function onChange ( ) {
return dispatch ( 'core/edit-post' ) . toggleEditorPanelEnabled ( panelName ) ;
}
} ;
} ) ) ( base ) ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/options-modal/options/enable-plugin-document-setting-panel.js
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +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
* /
2020-01-08 12:57:23 +01:00
var enable _plugin _document _setting _panel _createSlotFill = Object ( external _this _wp _components _ [ "createSlotFill" ] ) ( 'EnablePluginDocumentSettingPanelOption' ) ,
Fill = enable _plugin _document _setting _panel _createSlotFill . Fill ,
enable _plugin _document _setting _panel _Slot = enable _plugin _document _setting _panel _createSlotFill . Slot ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
var enable _plugin _document _setting _panel _EnablePluginDocumentSettingPanelOption = function EnablePluginDocumentSettingPanelOption ( _ref ) {
var label = _ref . label ,
panelName = _ref . panelName ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( Fill , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _panel , {
label : label ,
panelName : panelName
} ) ) ;
2019-10-15 17:37:08 +02:00
} ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
enable _plugin _document _setting _panel _EnablePluginDocumentSettingPanelOption . Slot = enable _plugin _document _setting _panel _Slot ;
/* harmony default export */ var enable _plugin _document _setting _panel = ( enable _plugin _document _setting _panel _EnablePluginDocumentSettingPanelOption ) ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/options-modal/options/enable-publish-sidebar.js
/ * *
* WordPress dependencies
* /
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
/ * *
* Internal dependencies
* /
/* harmony default export */ var enable _publish _sidebar = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
2019-10-15 17:37:08 +02:00
return {
2020-01-08 12:57:23 +01:00
isChecked : select ( 'core/editor' ) . isPublishSidebarEnabled ( )
2018-12-18 04:14:52 +01:00
} ;
2020-01-08 12:57:23 +01:00
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/editor' ) ,
enablePublishSidebar = _dispatch . enablePublishSidebar ,
disablePublishSidebar = _dispatch . disablePublishSidebar ;
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 _this _wp _viewport _ [ "ifViewportMatches" ] ) ( 'medium' ) ) ( base ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/options-modal/options/enable-feature.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
/* harmony default export */ var enable _feature = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref ) {
var feature = _ref . feature ;
return {
isChecked : select ( 'core/edit-post' ) . isFeatureActive ( feature )
} ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , _ref2 ) {
var feature = _ref2 . feature ;
2019-10-15 17:37:08 +02:00
2019-09-19 17:19:18 +02:00
var _dispatch = dispatch ( 'core/edit-post' ) ,
2020-01-08 12:57:23 +01:00
toggleFeature = _dispatch . toggleFeature ;
2019-09-19 17:19:18 +02:00
2018-12-18 04:14:52 +01:00
return {
2020-01-08 12:57:23 +01:00
onChange : function onChange ( ) {
toggleFeature ( feature ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-18 04:14:52 +01:00
} ;
2020-01-08 12:57:23 +01:00
} ) ) ( base ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/options-modal/options/index.js
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/options-modal/meta-boxes-section.js
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
/ * *
* WordPress dependencies
* /
2020-01-08 12:57:23 +01:00
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
function MetaBoxesSection ( _ref ) {
var areCustomFieldsRegistered = _ref . areCustomFieldsRegistered ,
metaBoxes = _ref . metaBoxes ,
sectionProps = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "areCustomFieldsRegistered" , "metaBoxes" ] ) ;
// The 'Custom Fields' meta box is a special case that we handle separately.
var thirdPartyMetaBoxes = Object ( external _this _lodash _ [ "filter" ] ) ( metaBoxes , function ( _ref2 ) {
var id = _ref2 . id ;
return id !== 'postcustom' ;
} ) ;
if ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes . length === 0 ) {
return null ;
}
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( section , sectionProps , areCustomFieldsRegistered && Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _custom _fields , {
2020-01-22 23:06:21 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Custom fields' )
2020-01-08 12:57:23 +01:00
} ) , Object ( external _this _lodash _ [ "map" ] ) ( thirdPartyMetaBoxes , function ( _ref3 ) {
var id = _ref3 . id ,
title = _ref3 . title ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _panel , {
key : id ,
label : title ,
panelName : "meta-box-" . concat ( id )
} ) ;
} ) ) ;
}
/* harmony default export */ var meta _boxes _section = ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getEditorSettings = _select . getEditorSettings ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
var _select2 = select ( 'core/edit-post' ) ,
getAllMetaBoxes = _select2 . getAllMetaBoxes ;
return {
// This setting should not live in the block editor's store.
areCustomFieldsRegistered : getEditorSettings ( ) . enableCustomFields !== undefined ,
metaBoxes : getAllMetaBoxes ( )
} ;
} ) ( MetaBoxesSection ) ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/options-modal/index.js
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* External dependencies
* /
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
2020-01-08 12:57:23 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
var options _modal _MODAL _NAME = 'edit-post/options' ;
function OptionsModal ( _ref ) {
var isModalActive = _ref . isModalActive ,
isViewable = _ref . isViewable ,
closeModal = _ref . closeModal ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
if ( ! isModalActive ) {
2019-10-15 17:37:08 +02:00
return null ;
}
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Modal" ] , {
className : "edit-post-options-modal" ,
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Options' ) ,
closeLabel : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Close' ) ,
onRequestClose : closeModal
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( section , {
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'General' )
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _publish _sidebar , {
2020-01-22 23:06:21 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Pre-publish checks' )
2020-01-08 12:57:23 +01:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _feature , {
feature : "showInserterHelpPanel" ,
2020-01-22 23:06:21 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Inserter help panel' )
2020-01-08 12:57:23 +01:00
} ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( section , {
2020-01-22 23:06:21 +01:00
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Document panels' )
2020-01-08 12:57:23 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _plugin _document _setting _panel . Slot , null ) , isViewable && Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _panel , {
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Permalink' ) ,
panelName : "post-link"
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTaxonomies" ] , {
taxonomyWrapper : function taxonomyWrapper ( content , taxonomy ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _panel , {
label : Object ( external _this _lodash _ [ "get" ] ) ( taxonomy , [ 'labels' , 'menu_name' ] ) ,
panelName : "taxonomy-panel-" . concat ( taxonomy . slug )
} ) ;
}
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostFeaturedImageCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _panel , {
2020-01-22 23:06:21 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Featured image' ) ,
2020-01-08 12:57:23 +01:00
panelName : "featured-image"
} ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostExcerptCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _panel , {
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Excerpt' ) ,
panelName : "post-excerpt"
} ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTypeSupportCheck" ] , {
supportKeys : [ 'comments' , 'trackbacks' ]
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _panel , {
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Discussion' ) ,
panelName : "discussion-panel"
} ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PageAttributesCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _panel , {
2020-01-22 23:06:21 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Page attributes' ) ,
2020-01-08 12:57:23 +01:00
panelName : "page-attributes"
} ) ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( meta _boxes _section , {
2020-01-22 23:06:21 +01:00
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Advanced panels' )
2019-10-15 17:37:08 +02:00
} ) ) ;
}
2020-01-08 12:57:23 +01:00
/* harmony default export */ var options _modal = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getEditedPostAttribute = _select . getEditedPostAttribute ;
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
var _select2 = select ( 'core' ) ,
getPostType = _select2 . getPostType ;
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
var postType = getPostType ( getEditedPostAttribute ( 'type' ) ) ;
2019-10-15 17:37:08 +02:00
return {
2020-01-08 12:57:23 +01:00
isModalActive : select ( 'core/edit-post' ) . isModalActive ( options _modal _MODAL _NAME ) ,
isViewable : Object ( external _this _lodash _ [ "get" ] ) ( postType , [ 'viewable' ] , false )
2019-10-15 17:37:08 +02:00
} ;
2020-01-08 12:57:23 +01:00
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
2019-10-15 17:37:08 +02:00
return {
2020-01-08 12:57:23 +01:00
closeModal : function closeModal ( ) {
return dispatch ( 'core/edit-post' ) . closeModal ( ) ;
2019-10-15 17:37:08 +02:00
}
} ;
2020-01-08 12:57:23 +01:00
} ) ) ( OptionsModal ) ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/fullscreen-mode/index.js
2018-12-18 04:14:52 +01:00
2019-09-19 17:19:18 +02:00
2018-12-18 04:14:52 +01:00
/ * *
2020-01-08 12:57:23 +01:00
* WordPress dependencies
2018-12-18 04:14:52 +01:00
* /
2018-12-14 12:02:53 +01:00
2020-01-08 12:57:23 +01:00
var fullscreen _mode _FullscreenMode =
/*#__PURE__*/
function ( _Component ) {
Object ( inherits [ "a" /* default */ ] ) ( FullscreenMode , _Component ) ;
2018-12-14 12:02:53 +01:00
2020-01-08 12:57:23 +01:00
function FullscreenMode ( ) {
Object ( classCallCheck [ "a" /* default */ ] ) ( this , FullscreenMode ) ;
2018-12-14 12:02:53 +01:00
2020-01-08 12:57:23 +01:00
return Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , Object ( getPrototypeOf [ "a" /* default */ ] ) ( FullscreenMode ) . apply ( this , arguments ) ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 12:02:53 +01:00
2020-01-08 12:57:23 +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
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +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' ) ;
}
}
} , {
key : "componentDidUpdate" ,
value : function componentDidUpdate ( prevProps ) {
if ( this . props . isActive !== prevProps . isActive ) {
this . sync ( ) ;
}
}
} , {
key : "sync" ,
value : function sync ( ) {
var isActive = this . props . isActive ;
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 12:02:53 +01:00
2020-01-08 12:57:23 +01:00
return FullscreenMode ;
} ( external _this _wp _element _ [ "Component" ] ) ;
/* harmony default export */ var fullscreen _mode = ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
2018-12-18 04:14:52 +01:00
return {
2020-01-08 12:57:23 +01:00
isActive : select ( 'core/edit-post' ) . isFeatureActive ( 'fullscreenMode' )
2018-12-18 04:14:52 +01:00
} ;
2020-01-08 12:57:23 +01:00
} ) ( fullscreen _mode _FullscreenMode ) ) ;
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/browser-url/index.js
2019-03-21 13:48:00 +01: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
2019-03-21 13:48:00 +01:00
/ * *
2020-01-08 12:57:23 +01:00
* Returns the Post ' s Edit URL .
*
* @ param { number } postId Post ID .
*
* @ return { string } Post edit URL .
2019-03-21 13:48:00 +01:00
* /
2020-01-08 12:57:23 +01:00
function getPostEditURL ( postId ) {
return Object ( external _this _wp _url _ [ "addQueryArgs" ] ) ( 'post.php' , {
post : postId ,
action : 'edit'
} ) ;
}
2019-09-19 17:19:18 +02:00
/ * *
2020-01-08 12:57:23 +01:00
* Returns the Post ' s Trashed URL .
*
* @ param { number } postId Post ID .
* @ param { string } postType Post Type .
*
* @ return { string } Post trashed URL .
2019-09-19 17:19:18 +02:00
* /
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
function getPostTrashedURL ( postId , postType ) {
return Object ( external _this _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 ) ;
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
function BrowserURL ( ) {
var _this ;
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
Object ( classCallCheck [ "a" /* default */ ] ) ( this , BrowserURL ) ;
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
_this = Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , Object ( getPrototypeOf [ "a" /* default */ ] ) ( BrowserURL ) . apply ( this , arguments ) ) ;
_this . state = {
historyId : null
} ;
return _this ;
}
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +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.
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
if ( postStatus === 'trash' && ! isSavingPost ) {
this . setTrashURL ( postId , postType ) ;
return ;
}
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
if ( ( postId !== prevProps . postId || postId !== historyId ) && postStatus !== 'auto-draft' ) {
this . setBrowserURL ( postId ) ;
}
}
/ * *
* 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 .
* /
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
} , {
key : "setTrashURL" ,
value : function setTrashURL ( postId , postType ) {
window . location . href = getPostTrashedURL ( postId , postType ) ;
}
/ * *
* 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 .
* /
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +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 ;
}
} ] ) ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
return BrowserURL ;
} ( external _this _wp _element _ [ "Component" ] ) ;
/* harmony default export */ var browser _url = ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getCurrentPost = _select . getCurrentPost ,
isSavingPost = _select . isSavingPost ;
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
var _getCurrentPost = getCurrentPost ( ) ,
id = _getCurrentPost . id ,
status = _getCurrentPost . status ,
type = _getCurrentPost . type ;
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
return {
2020-01-08 12:57:23 +01:00
postId : id ,
postStatus : status ,
postType : type ,
isSavingPost : isSavingPost ( )
2019-10-15 17:37:08 +02:00
} ;
2020-01-08 12:57:23 +01:00
} ) ( browser _url _BrowserURL ) ) ;
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/fullscreen-mode-close/index.js
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2020-01-08 12:57:23 +01:00
* External dependencies
2019-10-15 17:37:08 +02:00
* /
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2020-01-08 12:57:23 +01:00
* WordPress dependencies
2019-10-15 17:37:08 +02:00
* /
2019-03-21 13:48:00 +01:00
2020-03-10 15:53:18 +01:00
var wordPressLogo = Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "SVG" ] , {
2020-03-27 23:08:24 +01:00
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "-2 -2 24 24"
2020-03-10 15:53:18 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "Path" ] , {
2020-03-27 23:08:24 +01:00
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"
2020-03-10 15:53:18 +01:00
} ) ) ;
2020-02-10 23:33:27 +01:00
2020-03-10 15:53:18 +01:00
function FullscreenModeClose ( ) {
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getCurrentPostType = _select . getCurrentPostType ;
var _select2 = select ( 'core/edit-post' ) ,
isFeatureActive = _select2 . isFeatureActive ;
var _select3 = select ( 'core' ) ,
getPostType = _select3 . getPostType ;
return {
isActive : isFeatureActive ( 'fullscreenMode' ) ,
postType : getPostType ( getCurrentPostType ( ) )
} ;
} , [ ] ) ,
isActive = _useSelect . isActive ,
postType = _useSelect . postType ;
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
if ( ! isActive || ! postType ) {
return null ;
}
2019-09-19 17:19:18 +02:00
2020-03-10 15:53:18 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
className : "edit-post-fullscreen-mode-close" ,
icon : wordPressLogo ,
iconSize : 36 ,
2020-01-08 12:57:23 +01:00
href : Object ( external _this _wp _url _ [ "addQueryArgs" ] ) ( 'edit.php' , {
post _type : postType . slug
} ) ,
label : Object ( external _this _lodash _ [ "get" ] ) ( postType , [ 'labels' , 'view_items' ] , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Back' ) )
2020-03-10 15:53:18 +01:00
} ) ;
2020-01-08 12:57:23 +01:00
}
2019-10-15 17:37:08 +02:00
2020-03-10 15:53:18 +01:00
/* harmony default export */ var fullscreen _mode _close = ( FullscreenModeClose ) ;
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/header-toolbar/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
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
function HeaderToolbar ( ) {
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
hasFixedToolbar : select ( 'core/edit-post' ) . isFeatureActive ( 'fixedToolbar' ) ,
// This setting (richEditingEnabled) should not live in the block editor's setting.
showInserter : select ( 'core/edit-post' ) . getEditorMode ( ) === 'visual' && select ( 'core/editor' ) . getEditorSettings ( ) . richEditingEnabled ,
isTextModeEnabled : select ( 'core/edit-post' ) . getEditorMode ( ) === 'text'
} ;
2020-01-22 23:06:21 +01:00
} , [ ] ) ,
2020-01-08 12:57:23 +01:00
hasFixedToolbar = _useSelect . hasFixedToolbar ,
showInserter = _useSelect . showInserter ,
isTextModeEnabled = _useSelect . isTextModeEnabled ;
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
var isLargeViewport = Object ( external _this _wp _compose _ [ "useViewportMatch" ] ) ( 'medium' ) ;
var toolbarAriaLabel = hasFixedToolbar ?
/* translators: accessibility text for the editor toolbar when Top Toolbar is on */
Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Document and block tools' ) :
/* translators: accessibility text for the editor toolbar when Top Toolbar is off */
Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Document tools' ) ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "NavigableToolbar" ] , {
className : "edit-post-header-toolbar" ,
"aria-label" : toolbarAriaLabel
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "Inserter" ] , {
disabled : ! showInserter ,
position : "bottom right" ,
showInserterHelpPanel : true
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "EditorHistoryUndo" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "EditorHistoryRedo" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "TableOfContents" ] , {
hasOutlineItemsDisabled : isTextModeEnabled
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "BlockNavigationDropdown" ] , {
isDisabled : isTextModeEnabled
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "ToolSelector" ] , null ) , ( hasFixedToolbar || ! isLargeViewport ) && Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-header-toolbar__block-toolbar"
2020-02-10 23:33:27 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "BlockToolbar" ] , {
hideDragHandle : true
} ) ) ) ;
2020-01-08 12:57:23 +01:00
}
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var header _toolbar = ( HeaderToolbar ) ;
2019-09-19 17:19:18 +02:00
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/more-horizontal.js
2020-03-24 00:40:19 +01:00
var more _horizontal = _ _webpack _require _ _ ( 284 ) ;
2020-02-10 23:33:27 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/mode-switcher/index.js
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
2020-02-06 22:03:31 +01:00
function mode _switcher _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 mode _switcher _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { mode _switcher _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 { mode _switcher _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
* /
2020-01-08 12:57:23 +01:00
/ * *
* Set of available mode options .
*
* @ type { Array }
* /
var MODES = [ {
value : 'visual' ,
2020-01-22 23:06:21 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Visual editor' )
2020-01-08 12:57:23 +01:00
} , {
value : 'text' ,
2020-01-22 23:06:21 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Code editor' )
2020-01-08 12:57:23 +01:00
} ] ;
2020-01-22 23:06:21 +01:00
function ModeSwitcher ( ) {
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
shortcut : select ( 'core/keyboard-shortcuts' ) . getShortcutRepresentation ( 'core/edit-post/toggle-mode' ) ,
isRichEditingEnabled : select ( 'core/editor' ) . getEditorSettings ( ) . richEditingEnabled ,
isCodeEditingEnabled : select ( 'core/editor' ) . getEditorSettings ( ) . codeEditingEnabled ,
mode : select ( 'core/edit-post' ) . getEditorMode ( )
} ;
} , [ ] ) ,
shortcut = _useSelect . shortcut ,
isRichEditingEnabled = _useSelect . isRichEditingEnabled ,
isCodeEditingEnabled = _useSelect . isCodeEditingEnabled ,
mode = _useSelect . mode ;
var _useDispatch = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( 'core/edit-post' ) ,
switchEditorMode = _useDispatch . switchEditorMode ;
2020-01-08 12:57:23 +01:00
var choices = MODES . map ( function ( choice ) {
if ( choice . value !== mode ) {
2020-02-06 22:03:31 +01:00
return mode _switcher _objectSpread ( { } , choice , {
2020-01-22 23:06:21 +01:00
shortcut : shortcut
2020-01-08 12:57:23 +01:00
} ) ;
}
return choice ;
} ) ;
2020-01-22 23:06:21 +01:00
if ( ! isRichEditingEnabled || ! isCodeEditingEnabled ) {
return null ;
}
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuGroup" ] , {
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Editor' )
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItemsChoice" ] , {
choices : choices ,
value : mode ,
2020-01-22 23:06:21 +01:00
onSelect : switchEditorMode
2020-01-08 12:57:23 +01:00
} ) ) ;
}
2020-01-22 23:06:21 +01:00
/* harmony default export */ var mode _switcher = ( ModeSwitcher ) ;
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/plugins-more-menu-group/index.js
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2020-01-08 12:57:23 +01:00
* External dependencies
2019-10-15 17:37:08 +02:00
* /
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2020-01-08 12:57:23 +01:00
* WordPress dependencies
2019-10-15 17:37:08 +02:00
* /
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
var plugins _more _menu _group _createSlotFill = Object ( external _this _wp _components _ [ "createSlotFill" ] ) ( 'PluginsMoreMenuGroup' ) ,
PluginsMoreMenuGroup = plugins _more _menu _group _createSlotFill . Fill ,
plugins _more _menu _group _Slot = plugins _more _menu _group _createSlotFill . Slot ;
PluginsMoreMenuGroup . Slot = function ( _ref ) {
var fillProps = _ref . fillProps ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( plugins _more _menu _group _Slot , {
fillProps : fillProps
} , function ( fills ) {
return ! Object ( external _this _lodash _ [ "isEmpty" ] ) ( fills ) && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuGroup" ] , {
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Plugins' )
} , fills ) ;
} ) ;
} ;
2019-03-21 13:48:00 +01:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var plugins _more _menu _group = ( PluginsMoreMenuGroup ) ;
2018-12-14 12:02:53 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/options-menu-item/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
2020-01-08 12:57:23 +01:00
function OptionsMenuItem ( _ref ) {
var openModal = _ref . openModal ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItem" ] , {
onClick : function onClick ( ) {
openModal ( 'edit-post/options' ) ;
}
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Options' ) ) ;
}
/* harmony default export */ var options _menu _item = ( Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/edit-post' ) ,
openModal = _dispatch . openModal ;
2018-12-14 12:02:53 +01:00
2020-01-08 12:57:23 +01:00
return {
openModal : openModal
} ;
} ) ( OptionsMenuItem ) ) ;
2018-12-14 05:41:57 +01:00
2020-02-06 22:03:31 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
2020-03-24 00:40:19 +01:00
var check = _ _webpack _require _ _ ( 193 ) ;
2020-02-06 22:03:31 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/feature-toggle/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
/ * *
* 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
2020-02-06 22:03:31 +01:00
2020-01-08 12:57:23 +01:00
function FeatureToggle ( _ref ) {
var onToggle = _ref . onToggle ,
isActive = _ref . isActive ,
label = _ref . label ,
info = _ref . info ,
messageActivated = _ref . messageActivated ,
messageDeactivated = _ref . messageDeactivated ,
speak = _ref . speak ;
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
var speakMessage = function speakMessage ( ) {
if ( isActive ) {
speak ( messageDeactivated || Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Feature deactivated' ) ) ;
} else {
speak ( messageActivated || Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Feature activated' ) ) ;
}
} ;
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItem" ] , {
2020-02-06 22:03:31 +01:00
icon : isActive && check [ "a" /* default */ ] ,
2020-01-08 12:57:23 +01:00
isSelected : isActive ,
onClick : Object ( external _this _lodash _ [ "flow" ] ) ( onToggle , speakMessage ) ,
role : "menuitemcheckbox" ,
info : info
} , label ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var feature _toggle = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( [ Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref2 ) {
var feature = _ref2 . feature ;
2019-10-15 17:37:08 +02:00
return {
2020-01-08 12:57:23 +01:00
isActive : select ( 'core/edit-post' ) . isFeatureActive ( feature )
2019-10-15 17:37:08 +02:00
} ;
2020-01-08 12:57:23 +01:00
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , ownProps ) {
return {
onToggle : function onToggle ( ) {
dispatch ( 'core/edit-post' ) . toggleFeature ( ownProps . feature ) ;
}
} ;
} ) , external _this _wp _components _ [ "withSpokenMessages" ] ] ) ( FeatureToggle ) ) ;
2018-12-18 04:14:52 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/writing-menu/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
2020-01-08 12:57:23 +01:00
function WritingMenu ( ) {
var isLargeViewport = Object ( external _this _wp _compose _ [ "useViewportMatch" ] ) ( 'medium' ) ;
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
if ( ! isLargeViewport ) {
2019-10-15 17:37:08 +02:00
return null ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuGroup" ] , {
label : Object ( external _this _wp _i18n _ [ "_x" ] ) ( 'View' , 'noun' )
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( feature _toggle , {
feature : "fixedToolbar" ,
2020-01-22 23:06:21 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Top toolbar' ) ,
2020-01-08 12:57:23 +01:00
info : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Access all block and document tools in a single place' ) ,
messageActivated : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Top toolbar activated' ) ,
messageDeactivated : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Top toolbar deactivated' )
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( feature _toggle , {
feature : "focusMode" ,
2020-01-22 23:06:21 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Spotlight mode' ) ,
2020-01-08 12:57:23 +01:00
info : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Focus on one block at a time' ) ,
messageActivated : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Spotlight mode activated' ) ,
messageDeactivated : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Spotlight mode deactivated' )
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( feature _toggle , {
feature : "fullscreenMode" ,
2020-01-22 23:06:21 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Fullscreen mode' ) ,
2020-01-08 12:57:23 +01:00
info : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Work without distraction' ) ,
messageActivated : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Fullscreen mode activated' ) ,
messageDeactivated : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Fullscreen mode deactivated' )
2019-10-15 17:37:08 +02:00
} ) ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var writing _menu = ( WritingMenu ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/more-menu/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
* /
2020-02-10 23:33:27 +01:00
2020-01-08 12:57:23 +01:00
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
var POPOVER _PROPS = {
className : 'edit-post-more-menu__content' ,
position : 'bottom left'
} ;
var TOGGLE _PROPS = {
2020-01-22 23:06:21 +01:00
tooltipPosition : 'bottom'
2020-01-08 12:57:23 +01:00
} ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
var more _menu _MoreMenu = function MoreMenu ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "DropdownMenu" ] , {
className : "edit-post-more-menu" ,
2020-02-10 23:33:27 +01:00
icon : more _horizontal [ "a" /* default */ ] ,
2020-01-08 12:57:23 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'More tools & options' ) ,
popoverProps : POPOVER _PROPS ,
toggleProps : TOGGLE _PROPS
} , function ( _ref ) {
var onClose = _ref . onClose ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( writing _menu , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( mode _switcher , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( plugins _more _menu _group . Slot , {
fillProps : {
onClose : onClose
}
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( tools _more _menu _group . Slot , {
fillProps : {
onClose : onClose
}
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuGroup" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( options _menu _item , null ) ) ) ;
} ) ;
} ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var more _menu = ( more _menu _MoreMenu ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/pinned-plugins/index.js
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/ * *
* External dependencies
* /
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
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
var pinned _plugins _createSlotFill = Object ( external _this _wp _components _ [ "createSlotFill" ] ) ( 'PinnedPlugins' ) ,
PinnedPlugins = pinned _plugins _createSlotFill . Fill ,
pinned _plugins _Slot = pinned _plugins _createSlotFill . Slot ;
PinnedPlugins . Slot = function ( props ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( pinned _plugins _Slot , props , function ( fills ) {
return ! Object ( external _this _lodash _ [ "isEmpty" ] ) ( fills ) && Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-pinned-plugins"
} , fills ) ;
} ) ;
} ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var pinned _plugins = ( PinnedPlugins ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/post-publish-button-or-toggle.js
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
/ * *
* External dependencies
* /
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2020-01-08 12:57:23 +01:00
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 ;
var IS _TOGGLE = 'toggle' ;
var IS _BUTTON = 'button' ;
var isSmallerThanMediumViewport = Object ( external _this _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
* /
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +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 ;
2019-10-15 17:37:08 +02:00
}
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostPublishButton" ] , {
forceIsDirty : forceIsDirty ,
forceIsSaving : forceIsSaving ,
isOpen : isPublishSidebarOpened ,
isToggle : component === IS _TOGGLE ,
onToggle : togglePublishSidebar
} ) ;
}
/* harmony default export */ var post _publish _button _or _toggle = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
2019-10-15 17:37:08 +02:00
return {
2020-01-08 12:57:23 +01:00
hasPublishAction : Object ( external _this _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 ( 'core/edit-post' ) . isPublishSidebarOpened ( ) ,
isScheduled : select ( 'core/editor' ) . isCurrentPostScheduled ( )
2019-10-15 17:37:08 +02:00
} ;
2020-01-08 12:57:23 +01:00
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/edit-post' ) ,
togglePublishSidebar = _dispatch . togglePublishSidebar ;
2018-12-18 04:14:52 +01:00
2020-01-08 12:57:23 +01:00
return {
togglePublishSidebar : togglePublishSidebar
} ;
} ) ) ( PostPublishButtonOrToggle ) ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/index.js
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
* /
2020-01-08 12:57:23 +01:00
2020-02-10 23:33:27 +01:00
2018-12-18 04:14:52 +01:00
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
2020-01-22 23:06:21 +01:00
function Header ( ) {
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
shortcut : select ( 'core/keyboard-shortcuts' ) . getShortcutRepresentation ( 'core/edit-post/toggle-sidebar' ) ,
hasActiveMetaboxes : select ( 'core/edit-post' ) . hasMetaBoxes ( ) ,
isEditorSidebarOpened : select ( 'core/edit-post' ) . isEditorSidebarOpened ( ) ,
isPublishSidebarOpened : select ( 'core/edit-post' ) . isPublishSidebarOpened ( ) ,
isSaving : select ( 'core/edit-post' ) . isSavingMetaBoxes ( ) ,
getBlockSelectionStart : select ( 'core/block-editor' ) . getBlockSelectionStart
} ;
} , [ ] ) ,
shortcut = _useSelect . shortcut ,
hasActiveMetaboxes = _useSelect . hasActiveMetaboxes ,
isEditorSidebarOpened = _useSelect . isEditorSidebarOpened ,
isPublishSidebarOpened = _useSelect . isPublishSidebarOpened ,
isSaving = _useSelect . isSaving ,
getBlockSelectionStart = _useSelect . getBlockSelectionStart ;
var _useDispatch = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( 'core/edit-post' ) ,
openGeneralSidebar = _useDispatch . openGeneralSidebar ,
closeGeneralSidebar = _useDispatch . closeGeneralSidebar ;
2020-01-08 12:57:23 +01:00
2020-01-22 23:06:21 +01:00
var toggleGeneralSidebar = isEditorSidebarOpened ? closeGeneralSidebar : function ( ) {
return openGeneralSidebar ( getBlockSelectionStart ( ) ? 'edit-post/block' : 'edit-post/document' ) ;
} ;
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-header"
2020-03-10 15:53:18 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( fullscreen _mode _close , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
2020-03-03 00:21:15 +01:00
className : "edit-post-header__toolbar"
2020-03-10 15:53:18 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( header _toolbar , null ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
2020-01-08 12:57:23 +01:00
className : "edit-post-header__settings"
} , ! 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 _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostSavedState" ] , {
forceIsDirty : hasActiveMetaboxes ,
forceIsSaving : isSaving
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostPreviewButton" ] , {
forceIsAutosaveable : hasActiveMetaboxes ,
forcePreviewLink : isSaving ? null : undefined
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _publish _button _or _toggle , {
forceIsDirty : hasActiveMetaboxes ,
forceIsSaving : isSaving
2020-01-22 23:06:21 +01:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
2020-02-10 23:33:27 +01:00
icon : library _cog ,
2020-01-08 12:57:23 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Settings' ) ,
onClick : toggleGeneralSidebar ,
2020-01-22 23:06:21 +01:00
isPressed : isEditorSidebarOpened ,
2020-01-08 12:57:23 +01:00
"aria-expanded" : isEditorSidebarOpened ,
2020-01-22 23:06:21 +01:00
shortcut : shortcut
2020-03-03 00:21:15 +01:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( pinned _plugins . Slot , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( more _menu , null ) ) ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
2020-02-10 23:33:27 +01:00
/* harmony default export */ var header = ( Header ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/index.js
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-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var sidebar _createSlotFill = Object ( external _this _wp _components _ [ "createSlotFill" ] ) ( 'Sidebar' ) ,
sidebar _Fill = sidebar _createSlotFill . Fill ,
sidebar _Slot = sidebar _createSlotFill . Slot ;
/ * *
* Renders a sidebar with its content .
*
* @ return { Object } The rendered sidebar .
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function Sidebar ( _ref ) {
var children = _ref . children ,
className = _ref . className ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
2020-01-08 12:57:23 +01:00
className : classnames _default ( ) ( 'edit-post-sidebar' , className )
2019-10-15 17:37:08 +02:00
} , children ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
Sidebar = Object ( external _this _wp _components _ [ "withFocusReturn" ] ) ( {
onFocusReturn : function onFocusReturn ( ) {
var button = document . querySelector ( '.edit-post-header__settings [aria-label="Settings"]' ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
if ( button ) {
button . focus ( ) ;
return false ;
}
}
} ) ( Sidebar ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function AnimatedSidebarFill ( props ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( sidebar _Fill , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Animate" ] , {
type : "slide-in" ,
options : {
origin : 'left'
}
} , function ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( Sidebar , props ) ;
} ) ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var WrappedSidebar = Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref2 ) {
var name = _ref2 . name ;
return {
isActive : select ( 'core/edit-post' ) . getActiveGeneralSidebarName ( ) === name
} ;
} ) , Object ( external _this _wp _compose _ [ "ifCondition" ] ) ( function ( _ref3 ) {
var isActive = _ref3 . isActive ;
return isActive ;
} ) ) ( AnimatedSidebarFill ) ;
WrappedSidebar . Slot = sidebar _Slot ;
2020-02-10 23:33:27 +01:00
/* harmony default export */ var sidebar = ( WrappedSidebar ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/sidebar-header/index.js
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02: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-18 04:14:52 +01:00
2018-12-14 05:41:57 +01:00
2020-02-10 23:33:27 +01:00
2019-10-15 17:37:08 +02:00
var sidebar _header _SidebarHeader = function SidebarHeader ( _ref ) {
var children = _ref . children ,
className = _ref . className ,
2020-01-22 23:06:21 +01:00
closeLabel = _ref . closeLabel ;
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
shortcut : select ( 'core/keyboard-shortcuts' ) . getShortcutRepresentation ( 'core/edit-post/toggle-sidebar' ) ,
title : select ( 'core/editor' ) . getEditedPostAttribute ( 'title' )
} ;
} , [ ] ) ,
shortcut = _useSelect . shortcut ,
title = _useSelect . title ;
var _useDispatch = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( 'core/edit-post' ) ,
2020-03-24 00:40:19 +01:00
closeGeneralSidebar = _useDispatch . closeGeneralSidebar ; // The `tabIndex` serves the purpose of normalizing browser behavior of
// button clicks and focus. Notably, without making the header focusable, a
// Button click would not trigger a focus event in macOS Firefox. Thus, when
// the sidebar is unmounted, the corresponding "focus return" behavior to
// shift focus back to the heading toolbar would not be run.
//
// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
2020-01-22 23:06:21 +01:00
2019-10-15 17:37:08 +02:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "components-panel__header edit-post-sidebar-header__small"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "span" , {
className : "edit-post-sidebar-header__title"
2020-01-22 23:06:21 +01:00
} , title || Object ( external _this _wp _i18n _ [ "__" ] ) ( '(no title)' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
onClick : closeGeneralSidebar ,
2020-02-10 23:33:27 +01:00
icon : library _close [ "a" /* default */ ] ,
2019-10-15 17:37:08 +02:00
label : closeLabel
} ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
2020-03-24 00:40:19 +01:00
className : classnames _default ( ) ( 'components-panel__header edit-post-sidebar-header' , className ) ,
tabIndex : - 1
2020-01-22 23:06:21 +01:00
} , children , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
onClick : closeGeneralSidebar ,
2020-02-10 23:33:27 +01:00
icon : library _close [ "a" /* default */ ] ,
2019-10-15 17:37:08 +02:00
label : closeLabel ,
2020-01-22 23:06:21 +01:00
shortcut : shortcut
2019-10-15 17:37:08 +02:00
} ) ) ) ;
} ;
2018-12-14 05:41:57 +01:00
2020-01-22 23:06:21 +01:00
/* harmony default export */ var sidebar _header = ( sidebar _header _SidebarHeader ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/settings-header/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
2018-12-18 04:14:52 +01:00
2020-01-08 12:57:23 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* Internal dependencies
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var settings _header _SettingsHeader = function SettingsHeader ( _ref ) {
var openDocumentSettings = _ref . openDocumentSettings ,
openBlockSettings = _ref . openBlockSettings ,
sidebarName = _ref . sidebarName ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var blockLabel = Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Block' ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var _ref2 = sidebarName === 'edit-post/document' ? // translators: ARIA label for the Document sidebar tab, selected.
[ Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Document (selected)' ) , 'is-active' ] : // translators: ARIA label for the Document sidebar tab, not selected.
[ Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Document' ) , '' ] ,
_ref3 = Object ( slicedToArray [ "a" /* default */ ] ) ( _ref2 , 2 ) ,
documentAriaLabel = _ref3 [ 0 ] ,
documentActiveClass = _ref3 [ 1 ] ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var _ref4 = sidebarName === 'edit-post/block' ? // translators: ARIA label for the Settings Sidebar tab, selected.
[ Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Block (selected)' ) , 'is-active' ] : // translators: ARIA label for the Settings Sidebar tab, not selected.
[ Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Block' ) , '' ] ,
_ref5 = Object ( slicedToArray [ "a" /* default */ ] ) ( _ref4 , 2 ) ,
blockAriaLabel = _ref5 [ 0 ] ,
blockActiveClass = _ref5 [ 1 ] ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( sidebar _header , {
className : "edit-post-sidebar__panel-tabs" ,
closeLabel : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Close settings' )
2020-01-08 12:57:23 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "ul" , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( "li" , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
2019-10-15 17:37:08 +02:00
onClick : openDocumentSettings ,
className : "edit-post-sidebar__panel-tab " . concat ( documentActiveClass ) ,
"aria-label" : documentAriaLabel ,
"data-label" : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Document' )
2020-01-08 12:57:23 +01:00
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Document' ) ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "li" , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
2019-10-15 17:37:08 +02:00
onClick : openBlockSettings ,
className : "edit-post-sidebar__panel-tab " . concat ( blockActiveClass ) ,
"aria-label" : blockAriaLabel ,
"data-label" : blockLabel
} , blockLabel ) ) ) ) ;
} ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var settings _header = ( Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/edit-post' ) ,
openGeneralSidebar = _dispatch . openGeneralSidebar ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return {
openDocumentSettings : function openDocumentSettings ( ) {
openGeneralSidebar ( 'edit-post/document' ) ;
} ,
openBlockSettings : function openBlockSettings ( ) {
openGeneralSidebar ( 'edit-post/block' ) ;
}
} ;
} ) ( settings _header _SettingsHeader ) ) ;
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
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-visibility/index.js
2018-12-14 05:41:57 +01: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
* /
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
2019-10-15 17:37:08 +02:00
function PostVisibility ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostVisibilityCheck" ] , {
render : function render ( _ref ) {
var canEdit = _ref . canEdit ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , {
className : "edit-post-post-visibility"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "span" , null , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Visibility' ) ) , ! canEdit && Object ( external _this _wp _element _ [ "createElement" ] ) ( "span" , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostVisibilityLabel" ] , null ) ) , canEdit && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _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 _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
"aria-expanded" : isOpen ,
className : "edit-post-post-visibility__toggle" ,
onClick : onToggle ,
isLink : true
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostVisibilityLabel" ] , null ) ) ;
} ,
renderContent : function renderContent ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostVisibility" ] , null ) ;
}
} ) ) ;
}
} ) ;
}
/* harmony default export */ var post _visibility = ( PostVisibility ) ;
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
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-trash/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
function PostTrash ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTrashCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTrash" ] , null ) ) ) ;
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-schedule/index.js
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2018-12-19 04:16:48 +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
function PostSchedule ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostScheduleCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , {
className : "edit-post-post-schedule"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "span" , null , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Publish' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _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 _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
className : "edit-post-post-schedule__toggle" ,
onClick : onToggle ,
"aria-expanded" : isOpen ,
isLink : true
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostScheduleLabel" ] , null ) ) ) ;
} ,
renderContent : function renderContent ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostSchedule" ] , null ) ;
}
} ) ) ) ;
}
/* harmony default export */ var post _schedule = ( PostSchedule ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-sticky/index.js
2018-12-14 05:41:57 +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
function PostSticky ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostStickyCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostSticky" ] , null ) ) ) ;
}
/* harmony default export */ var post _sticky = ( PostSticky ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-author/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
function PostAuthor ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostAuthorCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostAuthor" ] , null ) ) ) ;
}
/* harmony default export */ var post _author = ( PostAuthor ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-slug/index.js
/ * *
* WordPress dependencies
* /
function PostSlug ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostSlugCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostSlug" ] , null ) ) ) ;
}
/* harmony default export */ var post _slug = ( PostSlug ) ;
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-format/index.js
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
function PostFormat ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostFormatCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostFormat" ] , null ) ) ) ;
}
/* harmony default export */ var post _format = ( PostFormat ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-pending-status/index.js
2018-12-18 04:14:52 +01:00
2019-03-07 10:09:59 +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
function PostPendingStatus ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostPendingStatusCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostPendingStatus" ] , null ) ) ) ;
}
/* harmony default export */ var post _pending _status = ( PostPendingStatus ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-status-info/index.js
2018-12-18 04:14:52 +01:00
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2020-01-22 23:06:21 +01:00
* Defines as extensibility slot for the Status & visibility panel .
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
2019-10-15 17:37:08 +02:00
var plugin _post _status _info _createSlotFill = Object ( external _this _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 ;
/ * *
2020-01-22 23:06:21 +01:00
* Renders a row in the Status & visibility panel of the Document sidebar .
2019-10-15 17:37:08 +02:00
* 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 .
*
* @ 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
* const { _ _ } = wp . i18n ;
* const { PluginPostStatusInfo } = wp . editPost ;
*
* 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 >
* ) ;
* ` ` `
*
2020-01-08 12:57:23 +01:00
* @ return { WPComponent } The component to be rendered .
2019-10-15 17:37:08 +02:00
* /
2019-03-21 13:48:00 +01:00
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var plugin _post _status _info _PluginPostStatusInfo = function PluginPostStatusInfo ( _ref ) {
var children = _ref . children ,
className = _ref . className ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( plugin _post _status _info _Fill , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , {
className : className
} , children ) ) ;
} ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02: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 ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-status/index.js
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
* /
2018-12-18 04:14:52 +01:00
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* Module Constants
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var PANEL _NAME = 'post-status' ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function PostStatus ( _ref ) {
var isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
className : "edit-post-post-status" ,
2020-01-22 23:06:21 +01:00
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Status & visibility' ) ,
2019-10-15 17:37:08 +02:00
opened : isOpened ,
onToggle : onTogglePanel
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( plugin _post _status _info . Slot , null , function ( fills ) {
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _visibility , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _schedule , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _format , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _sticky , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _pending _status , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _slug , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _author , null ) , fills , Object ( external _this _wp _element _ [ "createElement" ] ) ( PostTrash , null ) ) ;
2019-10-15 17:37:08 +02:00
} ) ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var post _status = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( [ Object ( external _this _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 ( 'core/edit-post' ) ,
isEditorPanelRemoved = _select . isEditorPanelRemoved ,
isEditorPanelOpened = _select . isEditorPanelOpened ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return {
isRemoved : isEditorPanelRemoved ( PANEL _NAME ) ,
isOpened : isEditorPanelOpened ( PANEL _NAME )
} ;
} ) , Object ( external _this _wp _compose _ [ "ifCondition" ] ) ( function ( _ref2 ) {
var isRemoved = _ref2 . isRemoved ;
return ! isRemoved ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
return {
onTogglePanel : function onTogglePanel ( ) {
return dispatch ( 'core/edit-post' ) . toggleEditorPanelOpened ( PANEL _NAME ) ;
}
} ;
} ) ] ) ( PostStatus ) ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/last-revision/index.js
2018-12-14 05:41:57 +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
function LastRevision ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostLastRevisionCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
className : "edit-post-last-revision__panel"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostLastRevision" ] , null ) ) ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var last _revision = ( LastRevision ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02: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
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
2019-10-15 17:37:08 +02:00
function TaxonomyPanel ( _ref ) {
var isEnabled = _ref . isEnabled ,
taxonomy = _ref . taxonomy ,
isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ,
children = _ref . children ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
if ( ! isEnabled ) {
return null ;
}
2018-12-14 05:41:57 +01:00
2020-01-03 14:17:24 +01:00
var taxonomyMenuName = Object ( external _this _lodash _ [ "get" ] ) ( taxonomy , [ 'labels' , 'menu_name' ] ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
if ( ! taxonomyMenuName ) {
return null ;
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
title : taxonomyMenuName ,
opened : isOpened ,
onToggle : onTogglePanel
} , children ) ;
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var taxonomy _panel = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , ownProps ) {
2020-01-03 14:17:24 +01:00
var slug = Object ( external _this _lodash _ [ "get" ] ) ( ownProps . taxonomy , [ 'slug' ] ) ;
2019-10-15 17:37:08 +02:00
var panelName = slug ? "taxonomy-panel-" . concat ( slug ) : '' ;
return {
panelName : panelName ,
isEnabled : slug ? select ( 'core/edit-post' ) . isEditorPanelEnabled ( panelName ) : false ,
isOpened : slug ? select ( 'core/edit-post' ) . isEditorPanelOpened ( panelName ) : false
} ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , ownProps ) {
return {
onTogglePanel : function onTogglePanel ( ) {
dispatch ( 'core/edit-post' ) . toggleEditorPanelOpened ( ownProps . panelName ) ;
}
} ;
} ) ) ( TaxonomyPanel ) ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-taxonomies/index.js
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
/ * *
2019-09-19 17:19:18 +02:00
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
function PostTaxonomies ( ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTaxonomiesCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTaxonomies" ] , {
taxonomyWrapper : function taxonomyWrapper ( content , taxonomy ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( taxonomy _panel , {
taxonomy : taxonomy
} , content ) ;
}
} ) ) ;
}
/* harmony default export */ var post _taxonomies = ( PostTaxonomies ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/featured-image/index.js
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* External dependencies
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
* /
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* Module Constants
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var featured _image _PANEL _NAME = 'featured-image' ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function FeaturedImage ( _ref ) {
var isEnabled = _ref . isEnabled ,
isOpened = _ref . isOpened ,
postType = _ref . postType ,
onTogglePanel = _ref . onTogglePanel ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
if ( ! isEnabled ) {
return null ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostFeaturedImageCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
2020-01-22 23:06:21 +01:00
title : Object ( external _this _lodash _ [ "get" ] ) ( postType , [ 'labels' , 'featured_image' ] , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Featured image' ) ) ,
2019-10-15 17:37:08 +02:00
opened : isOpened ,
onToggle : onTogglePanel
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostFeaturedImage" ] , null ) ) ) ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var applyWithSelect = Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getEditedPostAttribute = _select . getEditedPostAttribute ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var _select2 = select ( 'core' ) ,
getPostType = _select2 . getPostType ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var _select3 = select ( 'core/edit-post' ) ,
isEditorPanelEnabled = _select3 . isEditorPanelEnabled ,
isEditorPanelOpened = _select3 . isEditorPanelOpened ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return {
postType : getPostType ( getEditedPostAttribute ( 'type' ) ) ,
isEnabled : isEditorPanelEnabled ( featured _image _PANEL _NAME ) ,
isOpened : isEditorPanelOpened ( featured _image _PANEL _NAME )
} ;
2019-09-19 17:19:18 +02:00
} ) ;
2019-10-15 17:37:08 +02:00
var applyWithDispatch = Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/edit-post' ) ,
toggleEditorPanelOpened = _dispatch . toggleEditorPanelOpened ;
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
return {
2020-01-03 14:17:24 +01:00
onTogglePanel : Object ( external _this _lodash _ [ "partial" ] ) ( toggleEditorPanelOpened , featured _image _PANEL _NAME )
2019-10-15 17:37:08 +02:00
} ;
} ) ;
/* harmony default export */ var featured _image = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( applyWithSelect , applyWithDispatch ) ( FeaturedImage ) ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-excerpt/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
/ * *
2019-10-15 17:37:08 +02:00
* Module Constants
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
var post _excerpt _PANEL _NAME = 'post-excerpt' ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function PostExcerpt ( _ref ) {
var isEnabled = _ref . isEnabled ,
isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
if ( ! isEnabled ) {
return null ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostExcerptCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Excerpt' ) ,
opened : isOpened ,
onToggle : onTogglePanel
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostExcerpt" ] , null ) ) ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var post _excerpt = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( [ Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
isEnabled : select ( 'core/edit-post' ) . isEditorPanelEnabled ( post _excerpt _PANEL _NAME ) ,
isOpened : select ( 'core/edit-post' ) . isEditorPanelOpened ( post _excerpt _PANEL _NAME )
} ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
return {
onTogglePanel : function onTogglePanel ( ) {
return dispatch ( 'core/edit-post' ) . toggleEditorPanelOpened ( post _excerpt _PANEL _NAME ) ;
}
} ;
} ) ] ) ( PostExcerpt ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-link/index.js
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
* /
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
/ * *
2019-10-15 17:37:08 +02:00
* Module Constants
2018-12-14 05:53:54 +01:00
* /
2019-10-15 17:37:08 +02:00
var post _link _PANEL _NAME = 'post-link' ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
function PostLink ( _ref ) {
var isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ,
isEditable = _ref . isEditable ,
postLink = _ref . postLink ,
permalinkParts = _ref . permalinkParts ,
editPermalink = _ref . editPermalink ,
forceEmptyField = _ref . forceEmptyField ,
setState = _ref . setState ,
postTitle = _ref . postTitle ,
postSlug = _ref . postSlug ,
postID = _ref . postID ,
postTypeLabel = _ref . postTypeLabel ;
var prefix = permalinkParts . prefix ,
suffix = permalinkParts . suffix ;
var prefixElement , postNameElement , suffixElement ;
var currentSlug = Object ( external _this _wp _url _ [ "safeDecodeURIComponent" ] ) ( postSlug ) || Object ( external _this _wp _editor _ [ "cleanForSlug" ] ) ( postTitle ) || postID ;
if ( isEditable ) {
prefixElement = prefix && Object ( external _this _wp _element _ [ "createElement" ] ) ( "span" , {
className : "edit-post-post-link__link-prefix"
} , prefix ) ;
postNameElement = currentSlug && Object ( external _this _wp _element _ [ "createElement" ] ) ( "span" , {
className : "edit-post-post-link__link-post-name"
} , currentSlug ) ;
suffixElement = suffix && Object ( external _this _wp _element _ [ "createElement" ] ) ( "span" , {
className : "edit-post-post-link__link-suffix"
} , suffix ) ;
2019-09-19 17:19:18 +02:00
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Permalink' ) ,
opened : isOpened ,
onToggle : onTogglePanel
} , isEditable && Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "editor-post-link"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "TextControl" ] , {
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'URL Slug' ) ,
value : forceEmptyField ? '' : currentSlug ,
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.
if ( ! newValue ) {
if ( ! forceEmptyField ) {
setState ( {
forceEmptyField : true
} ) ;
}
return ;
}
if ( forceEmptyField ) {
setState ( {
forceEmptyField : false
} ) ;
}
} ,
onBlur : function onBlur ( event ) {
editPermalink ( Object ( external _this _wp _editor _ [ "cleanForSlug" ] ) ( event . target . value ) ) ;
if ( forceEmptyField ) {
setState ( {
forceEmptyField : false
} ) ;
}
}
2019-10-15 18:17:12 +02:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "p" , null , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'The last part of the URL.' ) , ' ' , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "ExternalLink" ] , {
2019-10-15 17:37:08 +02:00
href : "https://wordpress.org/support/article/writing-posts/#post-field-descriptions"
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Read about permalinks' ) ) ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-post-link__preview-label"
2020-01-22 23:06:21 +01:00
} , postTypeLabel || Object ( external _this _wp _i18n _ [ "__" ] ) ( 'View post' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
2019-10-15 17:37:08 +02:00
className : "edit-post-post-link__preview-link-container"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "ExternalLink" ] , {
className : "edit-post-post-link__link" ,
href : postLink ,
target : "_blank"
} , isEditable ? Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , prefixElement , postNameElement , suffixElement ) : postLink ) ) ) ;
2018-12-14 05:41:57 +01:00
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var post _link = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( [ Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
isEditedPostNew = _select . isEditedPostNew ,
isPermalinkEditable = _select . isPermalinkEditable ,
getCurrentPost = _select . getCurrentPost ,
isCurrentPostPublished = _select . isCurrentPostPublished ,
getPermalinkParts = _select . getPermalinkParts ,
getEditedPostAttribute = _select . getEditedPostAttribute ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var _select2 = select ( 'core/edit-post' ) ,
isEditorPanelEnabled = _select2 . isEditorPanelEnabled ,
isEditorPanelOpened = _select2 . isEditorPanelOpened ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var _select3 = select ( 'core' ) ,
getPostType = _select3 . getPostType ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
var _getCurrentPost = getCurrentPost ( ) ,
link = _getCurrentPost . link ,
id = _getCurrentPost . id ;
var postTypeName = getEditedPostAttribute ( 'type' ) ;
var postType = getPostType ( postTypeName ) ;
return {
isNew : isEditedPostNew ( ) ,
postLink : link ,
isEditable : isPermalinkEditable ( ) ,
isPublished : isCurrentPostPublished ( ) ,
isOpened : isEditorPanelOpened ( post _link _PANEL _NAME ) ,
permalinkParts : getPermalinkParts ( ) ,
isEnabled : isEditorPanelEnabled ( post _link _PANEL _NAME ) ,
2020-01-03 14:17:24 +01:00
isViewable : Object ( external _this _lodash _ [ "get" ] ) ( postType , [ 'viewable' ] , false ) ,
2019-10-15 17:37:08 +02:00
postTitle : getEditedPostAttribute ( 'title' ) ,
postSlug : getEditedPostAttribute ( 'slug' ) ,
postID : id ,
2020-01-03 14:17:24 +01:00
postTypeLabel : Object ( external _this _lodash _ [ "get" ] ) ( postType , [ 'labels' , 'view_item' ] )
2019-10-15 17:37:08 +02:00
} ;
} ) , Object ( external _this _wp _compose _ [ "ifCondition" ] ) ( function ( _ref2 ) {
var isEnabled = _ref2 . isEnabled ,
isNew = _ref2 . isNew ,
postLink = _ref2 . postLink ,
isViewable = _ref2 . isViewable ,
permalinkParts = _ref2 . permalinkParts ;
return isEnabled && ! isNew && postLink && isViewable && permalinkParts ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/edit-post' ) ,
toggleEditorPanelOpened = _dispatch . toggleEditorPanelOpened ;
var _dispatch2 = dispatch ( 'core/editor' ) ,
editPost = _dispatch2 . editPost ;
return {
onTogglePanel : function onTogglePanel ( ) {
return toggleEditorPanelOpened ( post _link _PANEL _NAME ) ;
} ,
editPermalink : function editPermalink ( newSlug ) {
editPost ( {
slug : newSlug
} ) ;
}
} ;
} ) , Object ( external _this _wp _compose _ [ "withState" ] ) ( {
forceEmptyField : false
} ) ] ) ( PostLink ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/discussion-panel/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
/ * *
2019-10-15 17:37:08 +02:00
* Module Constants
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
var discussion _panel _PANEL _NAME = 'discussion-panel' ;
function DiscussionPanel ( _ref ) {
var isEnabled = _ref . isEnabled ,
isOpened = _ref . isOpened ,
onTogglePanel = _ref . onTogglePanel ;
if ( ! isEnabled ) {
return null ;
}
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTypeSupportCheck" ] , {
supportKeys : [ 'comments' , 'trackbacks' ]
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Discussion' ) ,
opened : isOpened ,
onToggle : onTogglePanel
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTypeSupportCheck" ] , {
supportKeys : "comments"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostComments" ] , null ) ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostTypeSupportCheck" ] , {
supportKeys : "trackbacks"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostPingbacks" ] , null ) ) ) ) ) ;
2018-12-18 04:14:52 +01:00
}
2019-10-15 17:37:08 +02:00
/* harmony default export */ var discussion _panel = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( [ Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
2018-12-14 05:41:57 +01:00
return {
2019-10-15 17:37:08 +02:00
isEnabled : select ( 'core/edit-post' ) . isEditorPanelEnabled ( discussion _panel _PANEL _NAME ) ,
isOpened : select ( 'core/edit-post' ) . isEditorPanelOpened ( discussion _panel _PANEL _NAME )
2018-12-14 05:41:57 +01:00
} ;
2019-10-15 17:37:08 +02:00
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
2018-12-14 05:41:57 +01:00
return {
2019-10-15 17:37:08 +02:00
onTogglePanel : function onTogglePanel ( ) {
return dispatch ( 'core/edit-post' ) . toggleEditorPanelOpened ( discussion _panel _PANEL _NAME ) ;
}
2018-12-14 05:41:57 +01:00
} ;
2019-10-15 17:37:08 +02:00
} ) ] ) ( DiscussionPanel ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/page-attributes/index.js
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
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Module Constants
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
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 _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PageAttributesCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
2020-01-22 23:06:21 +01:00
title : Object ( external _this _lodash _ [ "get" ] ) ( postType , [ 'labels' , 'attributes' ] , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Page attributes' ) ) ,
2019-10-15 17:37:08 +02:00
opened : isOpened ,
onToggle : onTogglePanel
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PageTemplate" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PageAttributesParent" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelRow" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PageAttributesOrder" ] , null ) ) ) ) ;
2019-09-19 17:19:18 +02:00
}
2019-10-15 17:37:08 +02:00
var page _attributes _applyWithSelect = Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/editor' ) ,
getEditedPostAttribute = _select . getEditedPostAttribute ;
var _select2 = select ( 'core/edit-post' ) ,
isEditorPanelEnabled = _select2 . isEditorPanelEnabled ,
isEditorPanelOpened = _select2 . isEditorPanelOpened ;
var _select3 = select ( 'core' ) ,
getPostType = _select3 . getPostType ;
2018-12-18 04:14:52 +01:00
2019-09-19 17:19:18 +02:00
return {
2019-10-15 17:37:08 +02:00
isEnabled : isEditorPanelEnabled ( page _attributes _PANEL _NAME ) ,
isOpened : isEditorPanelOpened ( page _attributes _PANEL _NAME ) ,
postType : getPostType ( getEditedPostAttribute ( 'type' ) )
2019-09-19 17:19:18 +02:00
} ;
2019-10-15 17:37:08 +02:00
} ) ;
var page _attributes _applyWithDispatch = Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
var _dispatch = dispatch ( 'core/edit-post' ) ,
toggleEditorPanelOpened = _dispatch . toggleEditorPanelOpened ;
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
return {
2020-01-08 12:57:23 +01:00
onTogglePanel : Object ( external _this _lodash _ [ "partial" ] ) ( toggleEditorPanelOpened , page _attributes _PANEL _NAME )
} ;
} ) ;
/* harmony default export */ var page _attributes = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( page _attributes _applyWithSelect , page _attributes _applyWithDispatch ) ( PageAttributes ) ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = _ _webpack _require _ _ ( 7 ) ;
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-boxes-area/index.js
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
var meta _boxes _area _MetaBoxesArea =
/*#__PURE__*/
function ( _Component ) {
Object ( inherits [ "a" /* default */ ] ) ( MetaBoxesArea , _Component ) ;
/ * *
* @ inheritdoc
* /
function MetaBoxesArea ( ) {
var _this ;
Object ( classCallCheck [ "a" /* default */ ] ) ( this , MetaBoxesArea ) ;
_this = Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , Object ( getPrototypeOf [ "a" /* default */ ] ) ( MetaBoxesArea ) . 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 _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : classes
} , isSaving && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Spinner" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-meta-boxes-area__container" ,
ref : this . bindContainerNode
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-meta-boxes-area__clear"
} ) ) ;
}
} ] ) ;
return MetaBoxesArea ;
} ( external _this _wp _element _ [ "Component" ] ) ;
/* harmony default export */ var meta _boxes _area = ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
return {
isSaving : select ( 'core/edit-post' ) . isSavingMetaBoxes ( )
} ;
} ) ( meta _boxes _area _MetaBoxesArea ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-box-visibility.js
/ * *
* WordPress dependencies
* /
var meta _box _visibility _MetaBoxVisibility =
/*#__PURE__*/
function ( _Component ) {
Object ( inherits [ "a" /* default */ ] ) ( MetaBoxVisibility , _Component ) ;
function MetaBoxVisibility ( ) {
Object ( classCallCheck [ "a" /* default */ ] ) ( this , MetaBoxVisibility ) ;
return Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , Object ( getPrototypeOf [ "a" /* default */ ] ) ( MetaBoxVisibility ) . apply ( this , arguments ) ) ;
}
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 ) ;
if ( ! element ) {
return ;
}
if ( isVisible ) {
element . classList . remove ( 'is-hidden' ) ;
} else {
element . classList . add ( 'is-hidden' ) ;
}
}
} , {
key : "render" ,
value : function render ( ) {
return null ;
}
} ] ) ;
return MetaBoxVisibility ;
} ( external _this _wp _element _ [ "Component" ] ) ;
/* harmony default export */ var meta _box _visibility = ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref ) {
var id = _ref . id ;
return {
isVisible : select ( 'core/edit-post' ) . isEditorPanelEnabled ( "meta-box-" . concat ( id ) )
} ;
} ) ( meta _box _visibility _MetaBoxVisibility ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/index.js
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
function MetaBoxes ( _ref ) {
var location = _ref . location ,
isVisible = _ref . isVisible ,
metaBoxes = _ref . metaBoxes ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _lodash _ [ "map" ] ) ( metaBoxes , function ( _ref2 ) {
var id = _ref2 . id ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( meta _box _visibility , {
key : id ,
id : id
} ) ;
} ) , isVisible && Object ( external _this _wp _element _ [ "createElement" ] ) ( meta _boxes _area , {
location : location
} ) ) ;
}
/* harmony default export */ var meta _boxes = ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref3 ) {
var location = _ref3 . location ;
var _select = select ( 'core/edit-post' ) ,
isMetaBoxLocationVisible = _select . isMetaBoxLocationVisible ,
getMetaBoxesPerLocation = _select . getMetaBoxesPerLocation ;
return {
metaBoxes : getMetaBoxesPerLocation ( location ) ,
isVisible : isMetaBoxLocationVisible ( location )
2019-09-19 17:19:18 +02:00
} ;
2020-01-08 12:57:23 +01:00
} ) ( MetaBoxes ) ) ;
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-document-setting-panel/index.js
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* Defines as extensibility slot for the Settings sidebar
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01: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
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02: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
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var plugin _document _setting _panel _createSlotFill = Object ( external _this _wp _components _ [ "createSlotFill" ] ) ( 'PluginDocumentSettingPanel' ) ,
plugin _document _setting _panel _Fill = plugin _document _setting _panel _createSlotFill . Fill ,
plugin _document _setting _panel _Slot = plugin _document _setting _panel _createSlotFill . Slot ;
var plugin _document _setting _panel _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 ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( enable _plugin _document _setting _panel , {
label : title ,
panelName : panelName
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( plugin _document _setting _panel _Fill , null , isEnabled && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
className : className ,
title : title ,
icon : icon ,
opened : opened ,
onToggle : onToggle
} , children ) ) ) ;
} ;
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* Renders items below the Status & Availability panel in the Document Sidebar .
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ 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
2020-01-08 12:57:23 +01:00
* @ 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.
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ 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 ;
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* function MyDocumentSettingPlugin ( ) {
* return el (
* PluginDocumentSettingPanel ,
* {
* className : 'my-document-setting-plugin' ,
* title : 'My Panel' ,
* } ,
* _ _ ( 'My Document Setting Panel' )
* ) ;
* }
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* registerPlugin ( 'my-document-setting-plugin' , {
* render : MyDocumentSettingPlugin
* } ) ;
* ` ` `
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ example < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
* const { registerPlugin } = wp . plugins ;
* const { PluginDocumentSettingPanel } = wp . editPost ;
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +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 >
* ) ;
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* registerPlugin ( 'document-setting-test' , { render : MyDocumentSettingTest } ) ;
* ` ` `
2019-09-19 17:19:18 +02:00
*
2020-01-08 12:57:23 +01:00
* @ return { WPComponent } The component to be rendered .
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
var PluginDocumentSettingPanel = Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _plugins _ [ "withPluginContext" ] ) ( function ( context , ownProps ) {
2019-09-19 17:19:18 +02:00
return {
2019-10-15 17:37:08 +02:00
icon : ownProps . icon || context . icon ,
panelName : "" . concat ( context . name , "/" ) . concat ( ownProps . name )
2019-09-19 17:19:18 +02:00
} ;
2019-10-15 17:37:08 +02:00
} ) , Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref2 ) {
var panelName = _ref2 . panelName ;
2018-12-18 04:14:52 +01:00
return {
2019-10-15 17:37:08 +02:00
opened : select ( 'core/edit-post' ) . isEditorPanelOpened ( panelName ) ,
isEnabled : select ( 'core/edit-post' ) . isEditorPanelEnabled ( panelName )
2018-12-18 04:14:52 +01:00
} ;
2019-10-15 17:37:08 +02:00
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , _ref3 ) {
var panelName = _ref3 . panelName ;
2018-12-18 04:14:52 +01:00
return {
2019-10-15 17:37:08 +02:00
onToggle : function onToggle ( ) {
return dispatch ( 'core/edit-post' ) . toggleEditorPanelOpened ( panelName ) ;
}
2018-12-18 04:14:52 +01:00
} ;
2019-10-15 17:37:08 +02:00
} ) ) ( plugin _document _setting _panel _PluginDocumentSettingFill ) ;
PluginDocumentSettingPanel . Slot = plugin _document _setting _panel _Slot ;
/* harmony default export */ var plugin _document _setting _panel = ( PluginDocumentSettingPanel ) ;
// 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-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +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
* /
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
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var settings _sidebar _SettingsSidebar = function SettingsSidebar ( _ref ) {
var sidebarName = _ref . sidebarName ;
2020-02-10 23:33:27 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( sidebar , {
2020-01-08 12:57:23 +01:00
name : sidebarName
2019-10-15 17:37:08 +02:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( settings _header , {
sidebarName : sidebarName
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Panel" ] , null , sidebarName === 'edit-post/document' && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _status , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( plugin _document _setting _panel . Slot , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( last _revision , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _link , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _taxonomies , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( featured _image , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( post _excerpt , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( discussion _panel , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( page _attributes , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( meta _boxes , {
location : "side"
2020-01-08 12:57:23 +01:00
} ) ) , sidebarName === 'edit-post/block' && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "BlockInspector" ] , null ) ) ) ;
2019-10-15 17:37:08 +02:00
} ;
/* harmony default export */ var settings _sidebar = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select ) {
var _select = select ( 'core/edit-post' ) ,
getActiveGeneralSidebarName = _select . getActiveGeneralSidebarName ,
isEditorSidebarOpened = _select . isEditorSidebarOpened ;
return {
isEditorSidebarOpened : isEditorSidebarOpened ( ) ,
sidebarName : getActiveGeneralSidebarName ( )
} ;
} ) , Object ( external _this _wp _compose _ [ "ifCondition" ] ) ( function ( _ref2 ) {
var isEditorSidebarOpened = _ref2 . isEditorSidebarOpened ;
return isEditorSidebarOpened ;
} ) ) ( settings _sidebar _SettingsSidebar ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-publish-panel/index.js
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
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var plugin _post _publish _panel _createSlotFill = Object ( external _this _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 ;
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 _this _wp _element _ [ "createElement" ] ) ( plugin _post _publish _panel _Fill , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
className : className ,
initialOpen : initialOpen || ! title ,
title : title ,
icon : icon
} , children ) ) ;
} ;
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* Renders provided content to the post - publish panel in the publish flow
* ( side panel that opens after a user publishes the post ) .
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ 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 .
2020-01-08 12:57:23 +01:00
* @ 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.
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ example < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
* var PluginPostPublishPanel = wp . editPost . PluginPostPublishPanel ;
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* function MyPluginPostPublishPanel ( ) {
* return wp . element . createElement (
* PluginPostPublishPanel ,
* {
* className : 'my-plugin-post-publish-panel' ,
* title : _ _ ( 'My panel title' ) ,
* initialOpen : true ,
* } ,
* _ _ ( 'My panel content' )
* ) ;
* }
* ` ` `
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ example < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
* const { _ _ } = wp . i18n ;
* const { PluginPostPublishPanel } = wp . editPost ;
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* 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 >
* ) ;
* ` ` `
2019-09-19 17:19:18 +02:00
*
2020-01-08 12:57:23 +01:00
* @ return { WPComponent } The component to be rendered .
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
var PluginPostPublishPanel = Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _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 ) ;
// 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
* 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
var plugin _pre _publish _panel _createSlotFill = Object ( external _this _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 ;
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 _this _wp _element _ [ "createElement" ] ) ( plugin _pre _publish _panel _Fill , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "PanelBody" ] , {
className : className ,
initialOpen : initialOpen || ! title ,
title : title ,
icon : icon
} , children ) ) ;
} ;
2019-09-19 17:19:18 +02:00
/ * *
2019-10-15 17:37:08 +02:00
* 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 ) .
2019-09-19 17:19:18 +02:00
*
2020-01-08 12:57:23 +01:00
* @ 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 .
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ example < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
* var PluginPrePublishPanel = wp . editPost . PluginPrePublishPanel ;
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* function MyPluginPrePublishPanel ( ) {
* return wp . element . createElement (
* PluginPrePublishPanel ,
* {
* className : 'my-plugin-pre-publish-panel' ,
* title : _ _ ( 'My panel title' ) ,
* initialOpen : true ,
* } ,
* _ _ ( 'My panel content' )
* ) ;
* }
* ` ` `
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ example < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
* const { _ _ } = wp . i18n ;
* const { PluginPrePublishPanel } = wp . editPost ;
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* 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 >
* ) ;
* ` ` `
*
2020-01-08 12:57:23 +01:00
* @ return { WPComponent } The component to be rendered .
2019-09-19 17:19:18 +02: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
var PluginPrePublishPanel = Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _plugins _ [ "withPluginContext" ] ) ( function ( context , ownProps ) {
return {
icon : ownProps . icon || context . icon
} ;
} ) ) ( plugin _pre _publish _panel _PluginPrePublishPanelFill ) ;
PluginPrePublishPanel . Slot = plugin _pre _publish _panel _Slot ;
/* harmony default export */ var plugin _pre _publish _panel = ( PluginPrePublishPanel ) ;
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/images.js
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
/ * *
* WordPress dependencies
* /
var images _CanvasImage = function CanvasImage ( props ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
alt : "" ,
src : " data : image / svg + xml , % 3 Csvg width = '306' height = '286' viewBox = '0 0 306 286' fill = 'none' xmlns = 'http://www.w3.org/2000/svg' % 3 E % 3 Crect width = '306' height = '286' rx = '4' fill = '%2366C6E4' / % 3 E % 3 Crect x = '36' y = '30' width = '234' height = '256' fill = 'white' / % 3 E % 3 Crect x = '36' y = '80' width = '234' height = '94' fill = '%23E2E4E7' / % 3 E % 3 Cpath d = 'M140.237 121.47L142.109 125H157.255V133H140.237V121.47ZM159.382 119H155.128L157.255 123H154.064L151.937 119H149.809L151.937 123H148.746L146.618 119H144.491L146.618 123H143.428L141.3 119H140.237C139.067 119 138.12 119.9 138.12 121L138.109 133C138.109 134.1 139.067 135 140.237 135H157.255C158.425 135 159.382 134.1 159.382 133V119Z' fill = '%23444444' / % 3 E % 3 Crect x = '57' y = '182' width = '91.4727' height = '59' fill = '%23E2E4E7' / % 3 E % 3 Crect x = '156.982' y = '182' width = '91.4727' height = '59' fill = '%23E2E4E7' / % 3 E % 3 Cpath fill - rule = 'evenodd' clip - rule = 'evenodd' d = 'M112.309 203H93.1634C92.0998 203 91.0361 204 91.0361 205V219C91.0361 220.1 91.9934 221 93.1634 221H112.309C113.372 221 114.436 220 114.436 219V205C114.436 204 113.372 203 112.309 203ZM112.309 218.92C112.294 218.941 112.269 218.962 112.248 218.979L112.248 218.979C112.239 218.987 112.23 218.994 112.224 219H93.1634V205.08L93.2485 205H112.213C112.235 205.014 112.258 205.038 112.276 205.057C112.284 205.066 112.292 205.074 112.298 205.08V218.92H112.309ZM99.0134 212.5L101.672 215.51L105.395 211L110.182 217H95.2907L99.0134 212.5Z' fill = '%2340464D' / % 3 E % 3 Cmask id = 'mask0' mask - type = 'alpha' maskUnits = 'userSpaceOnUse' x = '91' y = '203' width = '24' height = '18' % 3 E % 3 Cpath fill - rule = 'evenodd' clip - rule = 'evenodd' d = 'M112.309 203H93.1634C92.0998 203 91.0361 204 91.0361 205V219C91.0361 220.1 91.9934 221 93.1634 221H112.309C113.372 221 114.436 220 114.436 219V205C114.436 204 113.372 203 112.309 203ZM112.309 218.92C112.294 218.941 112.269 218.962 112.248 218.979L112.248 218.979C112.239 218.987 112.23 218.994 112.224 219H93.1634V205.08L93.2485 205H112.213C112.235 205.014 112.258 205.038 112.276 205.057C112.284 205.066 112.292 205.074 112.298 205.08V218.92H112.309ZM99.0134 212.5L101.672 215.51L105.395 211L110.182 217H95.2907L99.0134 212.5Z' fill = 'white' / % 3 E % 3 C / mask % 3 E % 3 Cg mask = 'url(%23mask0)' % 3 E % 3 Crect x = '89.9727' y = '200' width = '25.5273' height = '24' fill = '%2340464D' / % 3 E % 3 C / g % 3 E % 3 Cpath fill - rule = 'evenodd' clip - rule = 'evenodd' d = 'M212.291 203H193.145C192.082 203 191.018 204 191.018 205V219C191.018 220.1 191.975 221 193.145 221H212.291C213.354 221 214.418 220 214.418 219V205C214.418 204 213.354 203 212.291 203ZM212.291 218.92C212.276 218.941 212.251 218.962 212.23 218.979L212.23 218.979C212.221 218.987 212.212 218.994 212.206 219H193.145V205.08L193.23 205H212.195C212.217 205.014 212.24 205.038 212.258 205.057C212.266 205.066 212.274 205.074 212.28 205.08V218.92H212.291ZM198.995 212.5L201.654 215.51L205.377 211L210.164 217H195.273L198.995 212.5Z' fill = '%2340464D' / % 3 E % 3 Cmask id = 'mask1' mask - type = 'alpha' maskUnits = 'userSpaceOnUse' x = '191' y = '203' width = '24' height = '18' % 3 E % 3 Cpath fill - rule = 'evenodd' clip - rule = 'evenodd' d = 'M212.291 203H193.145C192.082 203 191.018 204 191.018 205V219C191.018 220.1 191.975 221 193.145 221H212.291C213.354 221 214.418 220 214.418 219V205C214.418 204 213.354 203 212.291 203ZM212.291 218.92C212.276 218.941 212.251 218.962 212.23 218.979L212.23 218.979C212.221 218.987 212.212 218.994 212.206 219H193.145V205.08L193.23 205H212.195C212.217 205.014 212.24 205.038 212.258 205.057C212.266 205.066 212.274 205.074 212.28 205.08V218.92H212.291ZM198.995 212.5L201.654 215.51L205.377 211L210.164 217H195.273L198.995 212.5Z' fill = 'white' / % 3 E % 3 C / mask % 3 E % 3 Cg mask = 'url(%23mask1)' % 3 E % 3 Crect x = '189.955' y = '200' width = '25.5273' height = '24' fill = '%2340464D' / % 3 E % 3 C / g % 3 E % 3 Crect x = '57' y = '38' width = '191.455' height = '34' fill = '%23E2E4E7' / % 3 E % 3 Cpath d = 'M155.918 47.8V54.04H149.537V47.8H146.346V63.4H149.537V57.16H155.918V63.4H159.109V47.8' fill = '%2340464D' / % 3 E % 3 Crect x = '58' y = '249' width = '191' height = '37' fill = '%23E2E4E7' / % 3 E % 3 Cpath d = ' M160 . 127 261.4 H150 . 606 C149 . 546 261.4 148.576 261.64 147.696 262.12 C146 . 802 262.612 146.1 263.272 145.59 264.1 C145 . 066 264.928 144.811 265.84 144.811 266.824 C14
} , props ) ) ;
} ;
var images _EditorImage = function EditorImage ( props ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
alt : "" ,
src : "data:image/svg+xml,%3Csvg width='306' height='286' viewBox='0 0 306 286' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='306' height='286' rx='4' fill='%2366C6E4'/%3E%3Crect x='34.5' y='89.9424' width='237' height='113.423' fill='white' stroke='%238D96A0'/%3E%3Crect x='42.2383' y='98.5962' width='219.692' height='95.6618' fill='%23E2E4E7'/%3E%3Crect x='34.5' y='71.6346' width='27.0718' height='18.1324' fill='white' stroke='%238D96A0'/%3E%3Crect x='152.89' y='71.6346' width='18.5282' height='18.1324' fill='white' stroke='%238D96A0'/%3E%3Crect x='61.3516' y='71.6346' width='51.482' height='18.1324' fill='white' stroke='%238D96A0'/%3E%3Crect x='112.613' y='71.6346' width='40.4974' height='18.1324' fill='white' stroke='%238D96A0'/%3E%3Cpath d='M157.577 137.408H149.383C148.471 137.408 147.636 137.628 146.878 138.068C146.109 138.518 145.505 139.122 145.066 139.88C144.615 140.638 144.396 141.473 144.396 142.373C144.396 143.274 144.615 144.109 145.066 144.867C145.505 145.625 146.109 146.229 146.878 146.668C147.636 147.119 148.471 147.339 149.383 147.339H149.855V153.885C149.855 154.182 149.965 154.446 150.173 154.665C150.393 154.874 150.657 154.984 150.953 154.984C151.261 154.984 151.514 154.874 151.733 154.665C151.953 154.446 152.063 154.182 152.063 153.885V140.704C152.063 140.407 152.162 140.144 152.381 139.924C152.601 139.715 152.865 139.605 153.161 139.605C153.458 139.605 153.721 139.715 153.941 139.924C154.15 140.144 154.26 140.407 154.26 140.704V153.885C154.26 154.182 154.37 154.446 154.589 154.665C154.809 154.874 155.062 154.984 155.369 154.984C155.666 154.984 155.929 154.874 156.149 154.665C156.358 154.446 156.468 154.182 156.468 153.885V139.605H157.577C157.874 139.605 158.126 139.496 158.346 139.276C158.566 139.067 158.676 138.803 158.676 138.507C158.676 138.21 158.566 137.947 158.346 137.727C158.126 137.518 157.874 137.408 157.577 137.408Z' fill='%2340464D'/%3E%3Crect x='41.3232' y='77.1135' width='15.8667' height='7.17464' fill='%23E2E4E7'/%3E%3Crect x='66.9536' y='77.1135' width='7.32308' height='7.17464' fill='%23E2E4E7'/%3E%3Crect x='77.9385' y='77.1135' width='7.32308' height='7.17464' fill='%23E2E4E7'/%3E%3Crect x='88.9229' y='77.1135' width='7.32308' height='7.17464' fill='%23E2E4E7'/%3E%3Crect x='99.9077' y='77.1135' width='7.32308' height='7.17464' fill='%23E2E4E7'/%3E%3Crect x='118.215' y='77.1135' width='7.32308' height='7.17464' fill='%23E2E4E7'/%3E%3Crect x='129.2' y='77.1135' width='7.32308' height='7.17464' fill='%23E2E4E7'/%3E%3Crect x='140.185' y='77.1135' width='7.32308' height='7.17464' fill='%23E2E4E7'/%3E%3Crect x='158.492' y='77.1135' width='7.32308' height='7.17464' fill='%23E2E4E7'/%3E%3C/svg%3E%0A"
} , props ) ) ;
} ;
var images _BlockLibraryImage = function BlockLibraryImage ( props ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
alt : "" ,
src : " data : image / svg + xml , % 3 Csvg width = '306' height = '286' viewBox = '0 0 306 286' fill = 'none' xmlns = 'http://www.w3.org/2000/svg' % 3 E % 3 Crect width = '306' height = '286' rx = '4' fill = '%2366C6E4' / % 3 E % 3 Cmask id = 'mask0' mask - type = 'alpha' maskUnits = 'userSpaceOnUse' x = '141' y = '25' width = '24' height = '24' % 3 E % 3 Cpath fill - rule = 'evenodd' clip - rule = 'evenodd' d = 'M152.765 25C146.294 25 141 30.2943 141 36.7651C141 43.2359 146.294 48.5302 152.765 48.5302C159.236 48.5302 164.53 43.2359 164.53 36.7651C164.53 30.2943 159.236 25 152.765 25ZM151.589 32.0591V35.5886H148.059V37.9416H151.589V41.4711H153.942V37.9416H157.471V35.5886H153.942V32.0591H151.589ZM143.353 36.7651C143.353 41.9417 147.588 46.1772 152.765 46.1772C157.942 46.1772 162.177 41.9417 162.177 36.7651C162.177 31.5885 157.942 27.353 152.765 27.353C147.588 27.353 143.353 31.5885 143.353 36.7651Z' fill = 'white' / % 3 E % 3 C / mask % 3 E % 3 Cg mask = 'url(%23mask0)' % 3 E % 3 Crect x = '141' y = '25' width = '23.5253' height = '23.5253' fill = 'white' / % 3 E % 3 C / g % 3 E % 3 Cg filter = 'url(%23filter0_d)' % 3 E % 3 Crect x = '48' y = '63' width = '210' height = '190' fill = 'white' / % 3 E % 3 C / g % 3 E % 3 Cmask id = 'mask1' mask - type = 'alpha' maskUnits = 'userSpaceOnUse' x = '143' y = '139' width = '20' height = '16' % 3 E % 3 Cpath fill - rule = 'evenodd' clip - rule = 'evenodd' d = 'M143.75 141C143.75 140.17 144.42 139.5 145.25 139.5C146.08 139.5 146.75 140.17 146.75 141C146.75 141.83 146.08 142.5 145.25 142.5C144.42 142.5 143.75 141.83 143.75 141ZM143.75 147C143.75 146.17 144.42 145.5 145.25 145.5C146.08 145.5 146.75 146.17 146.75 147C146.75 147.83 146.08 148.5 145.25 148.5C144.42 148.5 143.75 147.83 143.75 147ZM145.25 151.5C144.42 151.5 143.75 152.18 143.75 153C143.75 153.82 144.43 154.5 145.25 154.5C146.07 154.5 146.75 153.82 146.75 153C146.75 152.18 146.08 151.5 145.25 151.5ZM162.25 154H148.25V152H162.25V154ZM148.25 148H162.25V146H148.25V148ZM148.25 142V140H162.25V142H148.25Z' fill = 'white' / % 3 E % 3 C / mask % 3 E % 3 Cg mask = 'url(%23mask1)' % 3 E % 3 Crect x = '141' y = '135' width = '24' height = '24' fill = '%23444444' / % 3 E % 3 C / g % 3 E % 3 Cmask id = 'mask2' mask - type = 'alpha' maskUnits = 'userSpaceOnUse' x = '139' y = '54' width = '28' height = '11' % 3 E % 3 Crect x = '139' y = '54' width = '28' height = '11' fill = '%23C4C4C4' / % 3 E % 3 C / mask % 3 E % 3 Cg mask = 'url(%23mask2)' % 3 E % 3 Cpath fill - rule = 'evenodd' clip - rule = 'evenodd' d = 'M139 67L153 54L167 67H139Z' fill = 'white' / % 3 E % 3 C / g % 3 E % 3 Crect x = '59' y = '74' width = '188' height = '28' rx = '3' stroke = '%231486B8' stroke - width = '2' / % 3 E % 3 Cpath d = 'M211 207.47L212.76 211H227V219H211V207.47ZM229 205H225L227 209H224L222 205H220L222 209H219L217 205H215L217 209H214L212 205H211C209.9 205 209.01 205.9 209.01 207L209 219C209 220.1 209.9 221 211 221H227C228.1 221 229 220.1 229 219V205Z' fill = '%23444444' / % 3 E % 3 Cpath d = 'M94.0001 136.4H85.0481C84.0521 136.4 83.1401 136.64 82.3121 137.12C81.4721 137.612 80.8121 138.272 80.3321 139.1C79.8401 139.928 79.6001 140.84 79.6001 141.824C79.6001 142.808 79.8401 143.72 80.3321 144.548C80.8121 145.376 81.4721 146.036 82.3121 146.516C83.1401 147.008 84.0521 147.248 85.0481 147.248H85.5641V154.4C85.5641 154.724 85.6841 155.012 85.9121 155.252C86.1521 155.48 86.4401 155.6 86.7641 155.6C87.1001 155.6 87.3761 155.48 87.6161 155.252C87.8561 155.012 87.9761 154.724 87.9761 154.4V140C87.9761 139.676 88.0841 139.388 88.3241 139.148C88.5641 138.92 88.8521 138.8 89.1761 138.8C89.5001 138.8 89.7881 138.92 90.0281 139.148C90.2561 139.388 90.3761 139.676 90.3761 140V154.4C90.3761 154.724 90.4961 155.012 90.7361 155.252C90.9761 155.48 91.2521 155.6 91.5881 155.6C91.9121 155.6 92.2001 155.48 92.4401 155.252C92.6681 155.012 92.7881 154.724 92.7881 154.4V138.8H94.0001C94.3241 138.8 94.6001 138.68 94.8401 138.44C95.0801 138.212 95.2001 137.924 95.2001 137.6C95.2001 137.276 95.0801 136.988 94.8401 136.748C94.6001 136.52 94.3241 136.4 94.0001 136.4Z' fill = '%23444444' / % 3 E % 3 Cmask id = 'mask3' mask - type = 'alpha' maskUnits = 'userSpaceOnUse' x = '76' y = '204' width = '22' height = '18' % 3 E % 3 Cpath fill - rule = 'evenodd' clip - rule = 'evenodd' d = ' M96 204 H78C77 204 76 205 76 206 V220C76 221.1 76.9 222 78 222 H96C97 222 98 221 98 220 V206C98 205 97 204 96 204 ZM96 219.92 C95 . 9861 219.941 95.9624 219.962 95.9426 219.979 C95 . 9339 219.987 95.9261
} , props ) ) ;
} ;
2020-01-22 23:06:21 +01:00
var images _DocumentationImage = function DocumentationImage ( props ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
alt : "" ,
src : " data : image / svg + xml , % 3 C % 3 Fxml version = '1.0' encoding = 'UTF-8' % 3 F % 3 E % 3 Csvg width = '306px' height = '286px' viewBox = '0 0 306 286' version = '1.1' xmlns = 'http://www.w3.org/2000/svg' xmlns : xlink = 'http://www.w3.org/1999/xlink' % 3 E % 3 C ! -- Generator : Sketch 61.2 ( 89653 ) - https : //sketch.com --%3E%3Ctitle%3EPage 1%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Documentation'%3E%3Crect id='bg' fill='%2361C6E6' x='0' y='0' width='306' height='286' rx='4'%3E%3C/rect%3E%3Crect id='page' fill='%23FFFFFF' x='36' y='30' width='234' height='256'%3E%3C/rect%3E%3Crect id='text' fill='%23E2E4E7' x='124' y='119' width='106' height='13'%3E%3C/rect%3E%3Crect id='heading' fill='%23E2E4E7' x='76' y='96' width='154' height='13'%3E%3C/rect%3E%3Crect id='header' fill='%2340464D' x='36' y='30' width='234' height='41'%3E%3C/rect%3E%3Cimage id='WordPress-logotype-wmark-white' x='45' y='32' width='37' height='37' xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoCAYAAABNo9TkAAAABGdBTUEAALGOfPtRkwAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAD6KADAAQAAAABAAAD6AAAAAAYK4+nAABAAElEQVR4AezdB7gkRdX/8UV2yTmDhMuSkQySQUCSpBWUvCACggFFRPQVRREB/6+gooiB8BphEVCygESRIEmyBAlLRiTnzP93oGeZe/eGmek63VXV33qeeubemelTpz49PV013dMzahQFAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBA
} , props ) ) ;
} ;
2020-01-08 12:57:23 +01:00
var images _InserterIconImage = function InserterIconImage ( props ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( "img" , Object ( esm _extends [ "a" /* default */ ] ) ( {
alt : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'inserter' ) ,
src : "data:image/svg+xml;charset=utf8,%3Csvg width='18' height='18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.824 0C3.97 0 0 3.97 0 8.824c0 4.853 3.97 8.824 8.824 8.824 4.853 0 8.824-3.971 8.824-8.824S13.677 0 8.824 0zM7.94 5.294v2.647H5.294v1.765h2.647v2.647h1.765V9.706h2.647V7.941H9.706V5.294H7.941zm-6.176 3.53c0 3.882 3.176 7.059 7.059 7.059 3.882 0 7.059-3.177 7.059-7.06 0-3.882-3.177-7.058-7.06-7.058-3.882 0-7.058 3.176-7.058 7.059z' fill='%234A4A4A'/%3E%3Cmask id='a' maskUnits='userSpaceOnUse' x='0' y='0' width='18' height='18'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.824 0C3.97 0 0 3.97 0 8.824c0 4.853 3.97 8.824 8.824 8.824 4.853 0 8.824-3.971 8.824-8.824S13.677 0 8.824 0zM7.94 5.294v2.647H5.294v1.765h2.647v2.647h1.765V9.706h2.647V7.941H9.706V5.294H7.941zm-6.176 3.53c0 3.882 3.176 7.059 7.059 7.059 3.882 0 7.059-3.177 7.059-7.06 0-3.882-3.177-7.058-7.06-7.058-3.882 0-7.058 3.176-7.058 7.059z' fill='%23fff'/%3E%3C/mask%3E%3Cg mask='url(%23a)'%3E%3Cpath fill='%23444' d='M0 0h17.644v17.644H0z'/%3E%3C/g%3E%3C/svg%3E"
} , props ) ) ;
} ;
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/index.js
2019-10-15 17:37:08 +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-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
/ * *
* Internal dependencies
* /
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
2020-01-08 12:57:23 +01:00
function WelcomeGuide ( ) {
2020-01-22 23:06:21 +01:00
var isActive = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return select ( 'core/edit-post' ) . isFeatureActive ( 'welcomeGuide' ) ;
} , [ ] ) ;
2019-10-15 17:37:08 +02:00
2020-01-22 23:06:21 +01:00
var _useDispatch = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( 'core/edit-post' ) ,
toggleFeature = _useDispatch . toggleFeature ;
2019-10-15 17:37:08 +02:00
2020-01-22 23:06:21 +01:00
if ( ! isActive ) {
2020-01-08 12:57:23 +01:00
return null ;
}
2019-09-19 17:19:18 +02:00
2020-01-08 12:57:23 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Guide" ] , {
className : "edit-post-welcome-guide" ,
2020-01-22 23:06:21 +01:00
contentLabel : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Welcome to the Block Editor' ) ,
2020-01-08 12:57:23 +01:00
finishButtonText : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Get started' ) ,
2020-01-22 23:06:21 +01:00
onFinish : function onFinish ( ) {
return toggleFeature ( 'welcomeGuide' ) ;
}
2020-01-08 12:57:23 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "GuidePage" ] , {
className : "edit-post-welcome-guide__page"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "h1" , {
className : "edit-post-welcome-guide__heading"
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Welcome to the Block Editor' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( images _CanvasImage , {
className : "edit-post-welcome-guide__image"
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-welcome-guide__text"
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.' ) ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "GuidePage" ] , {
className : "edit-post-welcome-guide__page"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "h1" , {
className : "edit-post-welcome-guide__heading"
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Make each block your own' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( images _EditorImage , {
className : "edit-post-welcome-guide__image"
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-welcome-guide__text"
} , Object ( external _this _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.' ) ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "GuidePage" ] , {
className : "edit-post-welcome-guide__page"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "h1" , {
className : "edit-post-welcome-guide__heading"
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Get to know the Block Library' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( images _BlockLibraryImage , {
className : "edit-post-welcome-guide__image"
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-welcome-guide__text"
} , Object ( external _this _wp _element _ [ "__experimentalCreateInterpolateElement" ] ) ( Object ( external _this _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 _this _wp _element _ [ "createElement" ] ) ( images _InserterIconImage , {
className : "edit-post-welcome-guide__inserter-icon"
} )
2020-01-22 23:06:21 +01:00
} ) ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "GuidePage" ] , {
className : "edit-post-welcome-guide__page"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "h1" , {
className : "edit-post-welcome-guide__heading"
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Learn how to use the Block Editor' ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( images _DocumentationImage , {
className : "edit-post-welcome-guide__image"
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "p" , {
className : "edit-post-welcome-guide__text"
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'New to the Block Editor? Want to learn more about using it? ' ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "ExternalLink" ] , {
href : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'https://wordpress.org/support/article/wordpress-editor/' )
2020-02-06 22:03:31 +01:00
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( "Here's a detailed guide." ) ) ) ) ) ;
2020-01-08 12:57:23 +01:00
}
2018-12-18 04:14:52 +01:00
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/index.js
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
* /
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
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
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
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
function Layout ( ) {
var isMobileViewport = Object ( external _this _wp _compose _ [ "useViewportMatch" ] ) ( 'small' , '<' ) ;
var _useDispatch = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( 'core/edit-post' ) ,
closePublishSidebar = _useDispatch . closePublishSidebar ,
2020-02-10 23:33:27 +01:00
openGeneralSidebar = _useDispatch . openGeneralSidebar ,
2020-01-08 12:57:23 +01:00
togglePublishSidebar = _useDispatch . togglePublishSidebar ;
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
hasFixedToolbar : select ( 'core/edit-post' ) . isFeatureActive ( 'fixedToolbar' ) ,
editorSidebarOpened : select ( 'core/edit-post' ) . isEditorSidebarOpened ( ) ,
pluginSidebarOpened : select ( 'core/edit-post' ) . isPluginSidebarOpened ( ) ,
publishSidebarOpened : select ( 'core/edit-post' ) . isPublishSidebarOpened ( ) ,
mode : select ( 'core/edit-post' ) . getEditorMode ( ) ,
isRichEditingEnabled : select ( 'core/editor' ) . getEditorSettings ( ) . richEditingEnabled ,
hasActiveMetaboxes : select ( 'core/edit-post' ) . hasMetaBoxes ( ) ,
2020-01-22 23:06:21 +01:00
isSaving : select ( 'core/edit-post' ) . isSavingMetaBoxes ( ) ,
previousShortcut : select ( 'core/keyboard-shortcuts' ) . getAllShortcutRawKeyCombinations ( 'core/edit-post/previous-region' ) ,
2020-02-10 23:33:27 +01:00
nextShortcut : select ( 'core/keyboard-shortcuts' ) . getAllShortcutRawKeyCombinations ( 'core/edit-post/next-region' ) ,
hasBlockSelected : select ( 'core/block-editor' ) . getBlockSelectionStart ( )
2020-01-08 12:57:23 +01:00
} ;
2020-01-22 23:06:21 +01:00
} , [ ] ) ,
2020-01-08 12:57:23 +01:00
mode = _useSelect . mode ,
isRichEditingEnabled = _useSelect . isRichEditingEnabled ,
editorSidebarOpened = _useSelect . editorSidebarOpened ,
pluginSidebarOpened = _useSelect . pluginSidebarOpened ,
publishSidebarOpened = _useSelect . publishSidebarOpened ,
hasActiveMetaboxes = _useSelect . hasActiveMetaboxes ,
isSaving = _useSelect . isSaving ,
2020-01-22 23:06:21 +01:00
hasFixedToolbar = _useSelect . hasFixedToolbar ,
previousShortcut = _useSelect . previousShortcut ,
2020-02-10 23:33:27 +01:00
nextShortcut = _useSelect . nextShortcut ,
hasBlockSelected = _useSelect . hasBlockSelected ;
2020-01-08 12:57:23 +01:00
var showPageTemplatePicker = Object ( external _this _wp _blockEditor _ [ "__experimentalUsePageTemplatePickerVisible" ] ) ( ) ;
2019-10-15 17:37:08 +02:00
var sidebarIsOpened = editorSidebarOpened || pluginSidebarOpened || publishSidebarOpened ;
2020-01-08 12:57:23 +01:00
var className = classnames _default ( ) ( 'edit-post-layout' , 'is-mode-' + mode , {
2019-10-15 17:37:08 +02:00
'is-sidebar-opened' : sidebarIsOpened ,
'has-fixed-toolbar' : hasFixedToolbar ,
'has-metaboxes' : hasActiveMetaboxes
} ) ;
2020-02-10 23:33:27 +01:00
var openSidebarPanel = function openSidebarPanel ( ) {
return openGeneralSidebar ( hasBlockSelected ? 'edit-post/block' : 'edit-post/document' ) ;
} ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( fullscreen _mode , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( browser _url , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "UnsavedChangesWarning" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "AutosaveMonitor" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "LocalAutosaveMonitor" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcuts , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "EditorKeyboardShortcutsRegister" ] , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "FocusReturnProvider" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "__experimentalEditorSkeleton" ] , {
2020-01-08 12:57:23 +01:00
className : className ,
2020-02-10 23:33:27 +01:00
header : Object ( external _this _wp _element _ [ "createElement" ] ) ( header , null ) ,
sidebar : Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , ! sidebarIsOpened && Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-layout__toogle-sidebar-panel"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
isSecondary : true ,
className : "edit-post-layout__toogle-sidebar-panel-button" ,
onClick : openSidebarPanel ,
"aria-expanded" : false
} , hasBlockSelected ? Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Open block settings' ) : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Open document settings' ) ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( settings _sidebar , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( sidebar . Slot , null ) ) ,
2020-02-06 22:03:31 +01:00
content : Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "EditorNotices" ] , null ) , ( mode === 'text' || ! isRichEditingEnabled ) && Object ( external _this _wp _element _ [ "createElement" ] ) ( text _editor , null ) , isRichEditingEnabled && mode === 'visual' && Object ( external _this _wp _element _ [ "createElement" ] ) ( visual _editor , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
2020-01-08 12:57:23 +01:00
className : "edit-post-layout__metaboxes"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( meta _boxes , {
location : "normal"
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( meta _boxes , {
location : "advanced"
} ) ) , isMobileViewport && sidebarIsOpened && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "ScrollLock" ] , null ) ) ,
footer : isRichEditingEnabled && mode === 'visual' && Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
className : "edit-post-layout__footer"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "BlockBreadcrumb" ] , null ) ) ,
publish : publishSidebarOpened ? Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostPublishPanel" ] , {
onClose : closePublishSidebar ,
forceIsDirty : hasActiveMetaboxes ,
forceIsSaving : isSaving ,
PrePublishExtension : plugin _pre _publish _panel . Slot ,
PostPublishExtension : plugin _post _publish _panel . Slot
} ) : Object ( external _this _wp _element _ [ "createElement" ] ) ( "div" , {
2020-02-10 23:33:27 +01:00
className : "edit-post-layout__toogle-publish-panel"
2020-01-08 12:57:23 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
2020-01-22 23:06:21 +01:00
isSecondary : true ,
2020-02-10 23:33:27 +01:00
className : "edit-post-layout__toogle-publish-panel-button" ,
2020-01-08 12:57:23 +01:00
onClick : togglePublishSidebar ,
"aria-expanded" : false
2020-01-22 23:06:21 +01:00
} , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Open publish panel' ) ) ) ,
shortcuts : {
previous : previousShortcut ,
next : nextShortcut
}
2020-01-08 12:57:23 +01:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( manage _blocks _modal , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( options _modal , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( keyboard _shortcut _help _modal , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( WelcomeGuide , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Popover" ] . Slot , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _plugins _ [ "PluginArea" ] , null ) , showPageTemplatePicker && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "__experimentalPageTemplatePicker" ] , null ) ) ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/* harmony default export */ var layout = ( Layout ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/listener-hooks.js
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
* /
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
/ * *
* Internal 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
* This listener hook monitors for block selection and triggers the appropriate
* sidebar state .
2019-09-19 17:19:18 +02:00
*
2019-10-15 17:37:08 +02:00
* @ param { number } postId The current post id .
2019-09-19 17:19:18 +02:00
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var listener _hooks _useBlockSelectionListener = function useBlockSelectionListener ( postId ) {
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
hasBlockSelection : ! ! select ( 'core/block-editor' ) . getBlockSelectionStart ( ) ,
isEditorSidebarOpened : select ( STORE _KEY ) . isEditorSidebarOpened ( )
} ;
} , [ postId ] ) ,
hasBlockSelection = _useSelect . hasBlockSelection ,
isEditorSidebarOpened = _useSelect . isEditorSidebarOpened ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var _useDispatch = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( STORE _KEY ) ,
openGeneralSidebar = _useDispatch . openGeneralSidebar ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
Object ( external _this _wp _element _ [ "useEffect" ] ) ( function ( ) {
if ( ! isEditorSidebarOpened ) {
return ;
2019-09-19 17:19:18 +02:00
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
if ( hasBlockSelection ) {
openGeneralSidebar ( 'edit-post/block' ) ;
} else {
openGeneralSidebar ( 'edit-post/document' ) ;
}
} , [ hasBlockSelection , isEditorSidebarOpened ] ) ;
} ;
/ * *
* This listener hook is used to monitor viewport size and adjust the sidebar
* accordingly .
*
* @ param { number } postId The current post id .
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var listener _hooks _useAdjustSidebarListener = function useAdjustSidebarListener ( postId ) {
var _useSelect2 = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
isSmall : select ( 'core/viewport' ) . isViewportMatch ( '< medium' ) ,
2019-10-15 18:17:12 +02:00
activeGeneralSidebarName : select ( STORE _KEY ) . getActiveGeneralSidebarName ( )
2019-10-15 17:37:08 +02:00
} ;
} , [ postId ] ) ,
isSmall = _useSelect2 . isSmall ,
2019-10-15 18:17:12 +02:00
activeGeneralSidebarName = _useSelect2 . activeGeneralSidebarName ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var _useDispatch2 = Object ( external _this _wp _data _ [ "useDispatch" ] ) ( STORE _KEY ) ,
openGeneralSidebar = _useDispatch2 . openGeneralSidebar ,
closeGeneralSidebar = _useDispatch2 . closeGeneralSidebar ;
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 18:17:12 +02:00
var previousIsSmall = Object ( external _this _wp _element _ [ "useRef" ] ) ( null ) ;
var sidebarToReOpenOnExpand = Object ( external _this _wp _element _ [ "useRef" ] ) ( null ) ;
2019-10-15 17:37:08 +02:00
Object ( external _this _wp _element _ [ "useEffect" ] ) ( function ( ) {
2019-10-15 18:17:12 +02:00
if ( previousIsSmall . current === isSmall ) {
return ;
}
previousIsSmall . current = isSmall ;
if ( isSmall ) {
sidebarToReOpenOnExpand . current = activeGeneralSidebarName ;
if ( activeGeneralSidebarName ) {
closeGeneralSidebar ( ) ;
}
} else if ( sidebarToReOpenOnExpand . current && ! activeGeneralSidebarName ) {
openGeneralSidebar ( sidebarToReOpenOnExpand . current ) ;
sidebarToReOpenOnExpand . current = null ;
2019-10-15 17:37:08 +02:00
}
2019-10-15 18:17:12 +02:00
} , [ isSmall , activeGeneralSidebarName ] ) ;
2019-10-15 17:37:08 +02:00
} ;
2019-03-21 13:48:00 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* This listener hook monitors any change in permalink and updates the view
* post link in the admin bar .
2019-03-21 13:48:00 +01:00
*
2019-10-15 17:37:08 +02:00
* @ param { number } postId
2019-03-21 13:48:00 +01:00
* /
2019-10-15 17:37:08 +02:00
var listener _hooks _useUpdatePostLinkListener = function useUpdatePostLinkListener ( postId ) {
var _useSelect3 = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return {
newPermalink : select ( 'core/editor' ) . getCurrentPost ( ) . link
} ;
} , [ postId ] ) ,
newPermalink = _useSelect3 . newPermalink ;
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
var nodeToUpdate = Object ( external _this _wp _element _ [ "useRef" ] ) ( ) ;
Object ( external _this _wp _element _ [ "useEffect" ] ) ( function ( ) {
nodeToUpdate . current = document . querySelector ( VIEW _AS _PREVIEW _LINK _SELECTOR ) || document . querySelector ( VIEW _AS _LINK _SELECTOR ) ;
} , [ postId ] ) ;
Object ( external _this _wp _element _ [ "useEffect" ] ) ( function ( ) {
if ( ! newPermalink || ! nodeToUpdate . current ) {
return ;
}
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
nodeToUpdate . current . setAttribute ( 'href' , newPermalink ) ;
} , [ newPermalink ] ) ;
2018-12-18 04:14:52 +01:00
} ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/index.js
2019-03-21 13:48:00 +01:00
/ * *
2019-09-19 17:19:18 +02:00
* Internal dependencies
2019-03-21 13:48:00 +01:00
* /
2019-10-15 17:37:08 +02:00
/ * *
* 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 .
* /
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var editor _initialization = ( function ( _ref ) {
var postId = _ref . postId ;
listener _hooks _useBlockSelectionListener ( postId ) ;
2019-10-15 18:17:12 +02:00
listener _hooks _useAdjustSidebarListener ( postId ) ;
2019-10-15 17:37:08 +02:00
listener _hooks _useUpdatePostLinkListener ( postId ) ;
return null ;
} ) ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/editor.js
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
2018-12-14 05:41:57 +01:00
2020-02-06 22:03:31 +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 ; }
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 ; }
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
/ * *
2019-10-15 17:37:08 +02:00
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
2019-10-15 17:37:08 +02:00
var editor _Editor =
/*#__PURE__*/
function ( _Component ) {
Object ( inherits [ "a" /* default */ ] ) ( Editor , _Component ) ;
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
function Editor ( ) {
var _this ;
2018-12-14 05:53:54 +01:00
2019-10-15 17:37:08 +02:00
Object ( classCallCheck [ "a" /* default */ ] ) ( this , Editor ) ;
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
_this = Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , Object ( getPrototypeOf [ "a" /* default */ ] ) ( Editor ) . apply ( this , arguments ) ) ;
_this . getEditorSettings = memize _default ( ) ( _this . getEditorSettings , {
maxSize : 1
} ) ;
return _this ;
}
2018-12-14 05:53:54 +01:00
2019-10-15 17:37:08 +02:00
Object ( createClass [ "a" /* default */ ] ) ( Editor , [ {
key : "getEditorSettings" ,
value : function getEditorSettings ( settings , hasFixedToolbar , showInserterHelpPanel , focusMode , hiddenBlockTypes , blockTypes , preferredStyleVariations , _ _experimentalLocalAutosaveInterval , updatePreferredStyleVariations ) {
2020-02-06 22:03:31 +01:00
settings = editor _objectSpread ( { } , settings , {
2019-10-15 17:37:08 +02:00
_ _experimentalPreferredStyleVariations : {
value : preferredStyleVariations ,
onChange : updatePreferredStyleVariations
} ,
hasFixedToolbar : hasFixedToolbar ,
focusMode : focusMode ,
showInserterHelpPanel : showInserterHelpPanel ,
_ _experimentalLocalAutosaveInterval : _ _experimentalLocalAutosaveInterval
} ) ; // Omit hidden block types if exists and non-empty.
2018-12-14 05:41:57 +01:00
2020-01-03 14:17:24 +01:00
if ( Object ( external _this _lodash _ [ "size" ] ) ( hiddenBlockTypes ) > 0 ) {
2019-10-15 17:37:08 +02:00
// Defer to passed setting for `allowedBlockTypes` if provided as
// anything other than `true` (where `true` is equivalent to allow
// all block types).
2020-01-03 14:17:24 +01:00
var defaultAllowedBlockTypes = true === settings . allowedBlockTypes ? Object ( external _this _lodash _ [ "map" ] ) ( blockTypes , 'name' ) : settings . allowedBlockTypes || [ ] ;
settings . allowedBlockTypes = external _this _lodash _ [ "without" ] . apply ( void 0 , [ defaultAllowedBlockTypes ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( hiddenBlockTypes ) ) ) ;
2019-10-15 17:37:08 +02:00
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
return settings ;
2019-09-19 17:19:18 +02:00
}
2019-10-15 17:37:08 +02:00
} , {
key : "render" ,
value : function render ( ) {
var _this$props = this . props ,
settings = _this$props . settings ,
hasFixedToolbar = _this$props . hasFixedToolbar ,
focusMode = _this$props . focusMode ,
post = _this$props . post ,
postId = _this$props . postId ,
initialEdits = _this$props . initialEdits ,
onError = _this$props . onError ,
hiddenBlockTypes = _this$props . hiddenBlockTypes ,
blockTypes = _this$props . blockTypes ,
preferredStyleVariations = _this$props . preferredStyleVariations ,
_ _experimentalLocalAutosaveInterval = _this$props . _ _experimentalLocalAutosaveInterval ,
showInserterHelpPanel = _this$props . showInserterHelpPanel ,
updatePreferredStyleVariations = _this$props . updatePreferredStyleVariations ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _this$props , [ "settings" , "hasFixedToolbar" , "focusMode" , "post" , "postId" , "initialEdits" , "onError" , "hiddenBlockTypes" , "blockTypes" , "preferredStyleVariations" , "__experimentalLocalAutosaveInterval" , "showInserterHelpPanel" , "updatePreferredStyleVariations" ] ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
if ( ! post ) {
return null ;
}
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var editorSettings = this . getEditorSettings ( settings , hasFixedToolbar , showInserterHelpPanel , focusMode , hiddenBlockTypes , blockTypes , preferredStyleVariations , _ _experimentalLocalAutosaveInterval , updatePreferredStyleVariations ) ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "StrictMode" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( edit _post _settings . Provider , {
value : settings
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "SlotFillProvider" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "DropZoneProvider" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "EditorProvider" ] , Object ( esm _extends [ "a" /* default */ ] ) ( {
settings : editorSettings ,
post : post ,
initialEdits : initialEdits ,
useSubRegistry : false
} , props ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "ErrorBoundary" ] , {
onError : onError
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( editor _initialization , {
postId : postId
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( layout , null ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "KeyboardShortcuts" ] , {
shortcuts : prevent _event _discovery
} ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _editor _ [ "PostLockedModal" ] , null ) ) ) ) ) ) ;
}
} ] ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
return Editor ;
} ( external _this _wp _element _ [ "Component" ] ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var editor = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( [ Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref ) {
var postId = _ref . postId ,
postType = _ref . postType ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var _select = select ( 'core/edit-post' ) ,
isFeatureActive = _select . isFeatureActive ,
getPreference = _select . getPreference ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var _select2 = select ( 'core' ) ,
getEntityRecord = _select2 . getEntityRecord ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var _select3 = select ( 'core/blocks' ) ,
getBlockTypes = _select3 . getBlockTypes ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
return {
showInserterHelpPanel : isFeatureActive ( 'showInserterHelpPanel' ) ,
hasFixedToolbar : isFeatureActive ( 'fixedToolbar' ) ,
focusMode : isFeatureActive ( 'focusMode' ) ,
post : getEntityRecord ( 'postType' , postType , postId ) ,
preferredStyleVariations : getPreference ( 'preferredStyleVariations' ) ,
hiddenBlockTypes : getPreference ( 'hiddenBlockTypes' ) ,
blockTypes : getBlockTypes ( ) ,
_ _experimentalLocalAutosaveInterval : getPreference ( 'localAutosaveInterval' )
} ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch ) {
2018-12-18 04:14:52 +01:00
var _dispatch = dispatch ( 'core/edit-post' ) ,
2019-10-15 17:37:08 +02:00
updatePreferredStyleVariations = _dispatch . updatePreferredStyleVariations ;
2018-12-18 04:14:52 +01:00
return {
2019-10-15 17:37:08 +02:00
updatePreferredStyleVariations : updatePreferredStyleVariations
2018-12-18 04:14:52 +01:00
} ;
2019-10-15 17:37:08 +02:00
} ) ] ) ( editor _Editor ) ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
/ * *
* External dependencies
* /
2019-09-19 17:19:18 +02:00
/ * *
* WordPress dependencies
* /
2018-12-18 04:14:52 +01:00
2019-09-19 17:19:18 +02:00
/ * *
* Internal dependencies
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
var plugin _block _settings _menu _item _isEverySelectedBlockAllowed = function isEverySelectedBlockAllowed ( selected , allowed ) {
2020-01-03 14:17:24 +01:00
return Object ( external _this _lodash _ [ "difference" ] ) ( selected , allowed ) . length === 0 ;
2019-10-15 17:37:08 +02:00
} ;
/ * *
* 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 .
* /
2018-12-18 04:14:52 +01:00
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02: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 whitelist .
2020-01-08 12:57:23 +01:00
* @ param { WPBlockTypeIconRender } [ props . icon ] The [ Dashicon ] ( https : //developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element.
2019-10-15 17:37:08 +02:00
* @ param { string } props . label The menu item text .
* @ param { Function } props . onClick Callback function to be executed when the user click 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 wp . i18n ;
* import { PluginBlockSettingsMenuItem } from wp . editPost ;
*
* 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 } / >
* ) ;
* ` ` `
*
2020-01-08 12:57:23 +01:00
* @ return { WPComponent } The component to be rendered .
2019-10-15 17:37:08 +02:00
* /
2019-03-07 10:09:59 +01:00
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02: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 _this _wp _element _ [ "createElement" ] ) ( plugin _block _settings _menu _group , null , function ( _ref2 ) {
var selectedBlocks = _ref2 . selectedBlocks ,
onClose = _ref2 . onClose ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
if ( ! shouldRenderItem ( selectedBlocks , allowedBlocks ) ) {
return null ;
}
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItem" ] , {
onClick : Object ( external _this _wp _compose _ [ "compose" ] ) ( onClick , onClose ) ,
icon : icon || 'admin-plugins' ,
label : small ? label : undefined ,
role : role
} , ! small && label ) ;
} ) ;
} ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/* harmony default export */ var plugin _block _settings _menu _item = ( plugin _block _settings _menu _item _PluginBlockSettingsMenuItem ) ;
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/plugin-more-menu-item/index.js
2018-12-18 04:14:52 +01:00
2018-12-19 04:16:48 +01:00
2019-03-07 10:09:59 +01:00
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* External dependencies
* /
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-19 04:16:48 +01:00
2018-12-18 04:14:52 +01:00
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* Internal dependencies
* /
2019-03-07 10:09:59 +01:00
2018-12-18 04:14:52 +01:00
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
var plugin _more _menu _item _PluginMoreMenuItem = function PluginMoreMenuItem ( _ref ) {
var _ref$onClick = _ref . onClick ,
2020-01-03 14:17:24 +01:00
onClick = _ref$onClick === void 0 ? external _this _lodash _ [ "noop" ] : _ref$onClick ,
2019-10-15 17:37:08 +02:00
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "onClick" ] ) ;
2019-03-21 13:48:00 +01:00
2019-10-15 17:37:08 +02:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( plugins _more _menu _group , null , function ( fillProps ) {
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "MenuItem" ] , Object ( esm _extends [ "a" /* default */ ] ) ( { } , props , {
2020-01-22 23:06:21 +01:00
onClick : Object ( external _this _wp _compose _ [ "compose" ] ) ( onClick , fillProps . onClose )
} ) ) ;
} ) ;
2019-10-15 17:37:08 +02:00
} ;
2018-12-18 04:14:52 +01:00
/ * *
2020-01-22 23:06:21 +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 .
2019-10-15 17:37:08 +02:00
* The text within the component appears as the menu item label .
*
2020-01-22 23:06:21 +01:00
* @ 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 .
2020-01-08 12:57:23 +01:00
* @ 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.
2020-01-22 23:06:21 +01:00
* @ 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 .
2019-10-15 17:37:08 +02:00
*
* @ example < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
2020-01-22 23:06:21 +01:00
* var PluginMoreMenuItem = wp . editPost . PluginMoreMenuItem ;
2020-02-10 23:33:27 +01:00
* var moreIcon = wp . element . createElement ( 'svg' ) ; //... svg element.
2019-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +01:00
* function onButtonClick ( ) {
* alert ( 'Button clicked.' ) ;
* }
*
* function MyButtonMoreMenuItem ( ) {
2019-10-15 17:37:08 +02:00
* return wp . element . createElement (
2020-01-22 23:06:21 +01:00
* PluginMoreMenuItem ,
2019-10-15 17:37:08 +02:00
* {
2020-02-10 23:33:27 +01:00
* icon : moreIcon ,
* onClick : onButtonClick ,
2019-10-15 17:37:08 +02:00
* } ,
2020-01-22 23:06:21 +01:00
* _ _ ( 'My button title' )
2020-02-10 23:33:27 +01:00
* ) ;
2019-10-15 17:37:08 +02:00
* }
* ` ` `
*
* @ example < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
2020-02-10 23:33:27 +01:00
* import { _ _ } from '@wordpress/i18n' ;
* import { PluginMoreMenuItem } from '@wordpress/edit-post' ;
* import { more } from '@wordpress/icons' ;
2019-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +01:00
* function onButtonClick ( ) {
* alert ( 'Button clicked.' ) ;
* }
*
* const MyButtonMoreMenuItem = ( ) => (
* < PluginMoreMenuItem
2020-02-10 23:33:27 +01:00
* icon = { more }
2020-01-22 23:06:21 +01:00
* onClick = { onButtonClick }
2019-10-15 17:37:08 +02:00
* >
2020-01-22 23:06:21 +01:00
* { _ _ ( 'My button title' ) }
* < / P l u g i n M o r e M e n u I t e m >
2019-10-15 17:37:08 +02:00
* ) ;
* ` ` `
*
2020-01-08 12:57:23 +01:00
* @ return { WPComponent } The component to be rendered .
2018-12-14 05:41:57 +01:00
* /
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
/* harmony default export */ var plugin _more _menu _item = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _plugins _ [ "withPluginContext" ] ) ( function ( context , ownProps ) {
2019-10-15 17:37:08 +02:00
return {
2020-01-22 23:06:21 +01:00
icon : ownProps . icon || context . icon
2019-10-15 17:37:08 +02:00
} ;
2020-01-22 23:06:21 +01:00
} ) ) ( plugin _more _menu _item _PluginMoreMenuItem ) ) ;
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-sidebar/index.js
2018-12-18 04:14:52 +01:00
2019-03-21 13:48:00 +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
/ * *
* Internal dependencies
* /
2018-12-19 04:16:48 +01:00
2020-01-22 23:06:21 +01:00
function PluginSidebar ( props ) {
var children = props . children ,
className = props . className ,
icon = props . icon ,
isActive = props . isActive ,
_props$isPinnable = props . isPinnable ,
isPinnable = _props$isPinnable === void 0 ? true : _props$isPinnable ,
isPinned = props . isPinned ,
sidebarName = props . sidebarName ,
title = props . title ,
togglePin = props . togglePin ,
toggleSidebar = props . toggleSidebar ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , isPinnable && Object ( external _this _wp _element _ [ "createElement" ] ) ( pinned _plugins , null , isPinned && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
icon : icon ,
label : title ,
onClick : toggleSidebar ,
isPressed : isActive ,
"aria-expanded" : isActive
2020-02-10 23:33:27 +01:00
} ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( sidebar , {
2020-01-22 23:06:21 +01:00
name : sidebarName
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( sidebar _header , {
closeLabel : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Close plugin' )
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "strong" , null , title ) , isPinnable && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
icon : isPinned ? 'star-filled' : 'star-empty' ,
label : isPinned ? Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Unpin from toolbar' ) : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Pin to toolbar' ) ,
onClick : togglePin ,
isPressed : isPinned ,
"aria-expanded" : isPinned
} ) ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Panel" ] , {
className : className
} , children ) ) ) ;
2019-10-15 17:37:08 +02:00
}
/ * *
2020-01-22 23:06:21 +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 :
2019-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +01:00
* ` ` ` js
* wp . data . dispatch ( 'core/edit-post' ) . openGeneralSidebar ( 'plugin-name/sidebar-name' ) ;
* ` ` `
2019-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +01:00
* @ 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 ;
2020-02-10 23:33:27 +01:00
* var moreIcon = wp . element . createElement ( 'svg' ) ; //... svg element.
2020-01-22 23:06:21 +01:00
*
* function MyPluginSidebar ( ) {
* return el (
* PluginSidebar ,
* {
* name : 'my-sidebar' ,
* title : 'My sidebar title' ,
2020-02-10 23:33:27 +01:00
* icon : moreIcon ,
2020-01-22 23:06:21 +01:00
* } ,
* el (
* PanelBody ,
* { } ,
* _ _ ( 'My sidebar content' )
* )
* ) ;
* }
* ` ` `
*
* @ example < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
2020-02-10 23:33:27 +01:00
* import { _ _ } from '@wordpress/i18n' ;
* import { PanelBody } from '@wordpress/components' ;
* import { PluginSidebar } from '@wordpress/edit-post' ;
* import { more } from '@wordpress/icons' ;
2020-01-22 23:06:21 +01:00
*
* const MyPluginSidebar = ( ) => (
* < PluginSidebar
* name = "my-sidebar"
* title = "My sidebar title"
2020-02-10 23:33:27 +01:00
* icon = { more }
2020-01-22 23:06:21 +01:00
* >
* < 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 >
* ) ;
* ` ` `
*
* @ return { WPComponent } Plugin sidebar component .
* /
2018-12-18 04:14:52 +01:00
2020-01-22 23:06:21 +01:00
/* harmony default export */ var plugin _sidebar = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _plugins _ [ "withPluginContext" ] ) ( function ( context , ownProps ) {
return {
icon : ownProps . icon || context . icon ,
sidebarName : "" . concat ( context . name , "/" ) . concat ( ownProps . name )
} ;
} ) , Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref ) {
var sidebarName = _ref . sidebarName ;
2018-12-18 04:14:52 +01:00
2020-01-22 23:06:21 +01:00
var _select = select ( 'core/edit-post' ) ,
getActiveGeneralSidebarName = _select . getActiveGeneralSidebarName ,
isPluginItemPinned = _select . isPluginItemPinned ;
2018-12-14 05:41:57 +01:00
2020-01-22 23:06:21 +01:00
return {
isActive : getActiveGeneralSidebarName ( ) === sidebarName ,
isPinned : isPluginItemPinned ( sidebarName )
} ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , _ref2 ) {
var isActive = _ref2 . isActive ,
sidebarName = _ref2 . sidebarName ;
2018-12-14 05:41:57 +01:00
2020-01-22 23:06:21 +01:00
var _dispatch = dispatch ( 'core/edit-post' ) ,
closeGeneralSidebar = _dispatch . closeGeneralSidebar ,
openGeneralSidebar = _dispatch . openGeneralSidebar ,
togglePinnedPluginItem = _dispatch . togglePinnedPluginItem ;
2020-01-08 12:57:23 +01:00
2020-01-22 23:06:21 +01:00
return {
togglePin : function togglePin ( ) {
togglePinnedPluginItem ( sidebarName ) ;
} ,
toggleSidebar : function toggleSidebar ( ) {
if ( isActive ) {
closeGeneralSidebar ( ) ;
} else {
openGeneralSidebar ( sidebarName ) ;
}
}
} ;
} ) ) ( PluginSidebar ) ) ;
2020-01-08 12:57:23 +01:00
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/plugin-sidebar-more-menu-item/index.js
2020-01-08 12:57:23 +01:00
2019-03-21 13:48:00 +01:00
2020-01-22 23:06:21 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
2018-12-14 05:53:54 +01:00
2020-02-06 22:03:31 +01:00
2018-12-14 05:53:54 +01:00
/ * *
2020-01-22 23:06:21 +01:00
* Internal dependencies
2018-12-14 05:53:54 +01:00
* /
2019-09-19 17:19:18 +02:00
2019-03-21 13:48:00 +01:00
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
var plugin _sidebar _more _menu _item _PluginSidebarMoreMenuItem = function PluginSidebarMoreMenuItem ( _ref ) {
var children = _ref . children ,
icon = _ref . icon ,
isSelected = _ref . isSelected ,
onClick = _ref . onClick ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( plugin _more _menu _item , {
2020-02-06 22:03:31 +01:00
icon : isSelected ? check [ "a" /* default */ ] : icon ,
2020-01-22 23:06:21 +01:00
isSelected : isSelected ,
role : "menuitemcheckbox" ,
onClick : onClick
} , children ) ;
} ;
2019-10-15 17:37:08 +02:00
/ * *
2020-01-22 23:06:21 +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 .
2019-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +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-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +01:00
* @ example < caption > ES5 < / c a p t i o n >
* ` ` ` js
* // Using ES5 syntax
* var _ _ = wp . i18n . _ _ ;
* var PluginSidebarMoreMenuItem = wp . editPost . PluginSidebarMoreMenuItem ;
2020-02-10 23:33:27 +01:00
* var moreIcon = wp . element . createElement ( 'svg' ) ; //... svg element.
2019-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +01:00
* function MySidebarMoreMenuItem ( ) {
* return wp . element . createElement (
* PluginSidebarMoreMenuItem ,
* {
* target : 'my-sidebar' ,
2020-02-10 23:33:27 +01:00
* icon : moreIcon ,
2020-01-22 23:06:21 +01:00
* } ,
* _ _ ( 'My sidebar title' )
* )
* }
* ` ` `
2019-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +01:00
* @ example < caption > ESNext < / c a p t i o n >
* ` ` ` jsx
* // Using ESNext syntax
2020-02-10 23:33:27 +01:00
* import { _ _ } from '@wordpress/i18n' ;
* import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post' ;
* import { more } from '@wordpress/icons' ;
2019-10-15 17:37:08 +02:00
*
2020-01-22 23:06:21 +01:00
* const MySidebarMoreMenuItem = ( ) => (
* < PluginSidebarMoreMenuItem
* target = "my-sidebar"
2020-02-10 23:33:27 +01:00
* icon = { more }
2020-01-22 23:06:21 +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 >
* ) ;
* ` ` `
*
* @ return { WPComponent } The component to be rendered .
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
/* harmony default export */ var plugin _sidebar _more _menu _item = ( Object ( external _this _wp _compose _ [ "compose" ] ) ( Object ( external _this _wp _plugins _ [ "withPluginContext" ] ) ( function ( context , ownProps ) {
return {
icon : ownProps . icon || context . icon ,
sidebarName : "" . concat ( context . name , "/" ) . concat ( ownProps . target )
} ;
} ) , Object ( external _this _wp _data _ [ "withSelect" ] ) ( function ( select , _ref2 ) {
var sidebarName = _ref2 . sidebarName ;
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
var _select = select ( 'core/edit-post' ) ,
getActiveGeneralSidebarName = _select . getActiveGeneralSidebarName ;
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
return {
isSelected : getActiveGeneralSidebarName ( ) === sidebarName
} ;
} ) , Object ( external _this _wp _data _ [ "withDispatch" ] ) ( function ( dispatch , _ref3 ) {
var isSelected = _ref3 . isSelected ,
sidebarName = _ref3 . sidebarName ;
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
var _dispatch = dispatch ( 'core/edit-post' ) ,
closeGeneralSidebar = _dispatch . closeGeneralSidebar ,
openGeneralSidebar = _dispatch . openGeneralSidebar ;
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
var onClick = isSelected ? closeGeneralSidebar : function ( ) {
return openGeneralSidebar ( sidebarName ) ;
} ;
return {
onClick : onClick
} ;
} ) ) ( plugin _sidebar _more _menu _item _PluginSidebarMoreMenuItem ) ) ;
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/index.js
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "reinitializeEditor" , function ( ) { return reinitializeEditor ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "initializeEditor" , function ( ) { return initializeEditor ; } ) ;
/* concated harmony reexport PluginBlockSettingsMenuItem */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginBlockSettingsMenuItem" , function ( ) { return plugin _block _settings _menu _item ; } ) ;
/* concated harmony reexport PluginDocumentSettingPanel */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginDocumentSettingPanel" , function ( ) { return plugin _document _setting _panel ; } ) ;
/* concated harmony reexport PluginMoreMenuItem */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginMoreMenuItem" , function ( ) { return plugin _more _menu _item ; } ) ;
/* concated harmony reexport PluginPostPublishPanel */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginPostPublishPanel" , function ( ) { return plugin _post _publish _panel ; } ) ;
/* concated harmony reexport PluginPostStatusInfo */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginPostStatusInfo" , function ( ) { return plugin _post _status _info ; } ) ;
/* concated harmony reexport PluginPrePublishPanel */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginPrePublishPanel" , function ( ) { return plugin _pre _publish _panel ; } ) ;
/* concated harmony reexport PluginSidebar */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginSidebar" , function ( ) { return plugin _sidebar ; } ) ;
/* concated harmony reexport PluginSidebarMoreMenuItem */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PluginSidebarMoreMenuItem" , function ( ) { return plugin _sidebar _more _menu _item ; } ) ;
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
2019-09-19 17:19:18 +02:00
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
/ * *
* Internal dependencies
* /
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
/ * *
* 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 ) .
* /
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
function reinitializeEditor ( postType , postId , target , settings , initialEdits ) {
Object ( external _this _wp _element _ [ "unmountComponentAtNode" ] ) ( target ) ;
var reboot = reinitializeEditor . bind ( null , postType , postId , target , settings , initialEdits ) ;
Object ( external _this _wp _element _ [ "render" ] ) ( Object ( external _this _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:53:54 +01:00
2020-01-22 23:06:21 +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 _this _wp _blockLibrary _ [ "registerCoreBlocks" ] ) ( ) ;
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
if ( false ) { } // Show a console log warning if the browser is not in Standards rendering mode.
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
var documentMode = document . compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks' ;
2019-03-07 10:09:59 +01:00
2020-01-22 23:06:21 +01:00
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
2020-02-10 23:33:27 +01:00
// Specifically, we scroll `block-editor-editor-skeleton__body` to enable a fixed top toolbar.
2020-01-22 23:06:21 +01:00
// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.
2018-12-14 05:41:57 +01:00
2020-01-22 23:06:21 +01:00
var isIphone = window . navigator . userAgent . indexOf ( 'iPhone' ) !== - 1 ;
2018-12-14 05:41:57 +01:00
2020-01-22 23:06:21 +01:00
if ( isIphone ) {
window . addEventListener ( 'scroll' , function ( event ) {
2020-02-10 23:33:27 +01:00
var editorScrollContainer = document . getElementsByClassName ( 'block-editor-editor-skeleton__body' ) [ 0 ] ;
2018-12-14 05:41:57 +01:00
2020-01-22 23:06:21 +01:00
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
2018-12-14 05:41:57 +01:00
2020-01-22 23:06:21 +01:00
window . scrollTo ( 0 , 0 ) ;
}
} ) ;
}
Object ( external _this _wp _element _ [ "render" ] ) ( Object ( external _this _wp _element _ [ "createElement" ] ) ( editor , {
settings : settings ,
onError : reboot ,
postId : postId ,
postType : postType ,
initialEdits : initialEdits
} ) , target ) ;
}
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 43 :
/***/ ( 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 ;
for ( i = 0 ; i < sourceKeys . length ; i ++ ) {
key = sourceKeys [ i ] ;
if ( excluded . indexOf ( key ) >= 0 ) continue ;
target [ key ] = source [ key ] ;
}
return target ;
}
/***/ } ) ,
/***/ 46 :
2019-10-15 17:37:08 +02:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2019-03-07 10:09:59 +01:00
2020-03-10 15:53:18 +01:00
/ * *
* Memize options object .
*
* @ typedef MemizeOptions
*
* @ property { number } [ maxSize ] Maximum size of the cache .
* /
2019-03-07 10:09:59 +01:00
2020-03-10 15:53:18 +01:00
/ * *
* Internal cache entry .
*
* @ typedef MemizeCacheNode
*
* @ property { ? MemizeCacheNode | undefined } [ prev ] Previous node .
* @ property { ? MemizeCacheNode | undefined } [ next ] Next node .
* @ property { Array < * > } args Function arguments for cache
* entry .
* @ property { * } val Function result .
* /
/ * *
* Properties of the enhanced function for controlling cache .
*
* @ typedef MemizeMemoizedFunction
*
* @ property { ( ) => void } clear Clear the cache .
* /
/ * *
* Accepts a function to be memoized , and returns a new memoized function , with
* optional options .
*
* @ template { Function } F
*
* @ param { F } fn Function to memoize .
* @ param { MemizeOptions } [ options ] Options object .
*
* @ return { F & MemizeMemoizedFunction } Memoized function .
* /
function memize ( fn , options ) {
var size = 0 ;
/** @type {?MemizeCacheNode|undefined} */
var head ;
/** @type {?MemizeCacheNode|undefined} */
var tail ;
options = options || { } ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
function memoized ( /* ...args */ ) {
var node = head ,
len = arguments . length ,
args , i ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
searchCache : while ( node ) {
// Perform a shallow equality test to confirm that whether the node
// under test is a candidate for the arguments passed. Two arrays
// are shallowly equal if their length matches and each entry is
// strictly equal between the two sets. Avoid abstracting to a
// function which could incur an arguments leaking deoptimization.
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// Check whether node arguments match arguments length
if ( node . args . length !== arguments . length ) {
node = node . next ;
continue ;
}
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// Check whether node arguments match arguments values
for ( i = 0 ; i < len ; i ++ ) {
if ( node . args [ i ] !== arguments [ i ] ) {
node = node . next ;
continue searchCache ;
}
}
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// At this point we can assume we've found a match
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// Surface matched node to head if not already
if ( node !== head ) {
// As tail, shift to previous. Must only shift if not also
// head, since if both head and tail, there is no previous.
if ( node === tail ) {
tail = node . prev ;
}
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// Adjust siblings to point to each other. If node was tail,
// this also handles new tail's empty `next` assignment.
2020-03-10 15:53:18 +01:00
/** @type {MemizeCacheNode} */ ( node . prev ) . next = node . next ;
2019-10-15 17:37:08 +02:00
if ( node . next ) {
node . next . prev = node . prev ;
}
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
node . next = head ;
node . prev = null ;
2020-03-10 15:53:18 +01:00
/** @type {MemizeCacheNode} */ ( head ) . prev = node ;
2019-10-15 17:37:08 +02:00
head = node ;
}
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// Return immediately
return node . val ;
}
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// No cached value found. Continue to insertion phase:
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// Create a copy of arguments (avoid leaking deoptimization)
args = new Array ( len ) ;
for ( i = 0 ; i < len ; i ++ ) {
args [ i ] = arguments [ i ] ;
}
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
node = {
args : args ,
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// Generate the result from original function
2020-03-10 15:53:18 +01:00
val : fn . apply ( null , args ) ,
2019-10-15 17:37:08 +02:00
} ;
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// Don't need to check whether node is already head, since it would
// have been returned above already if it was
2019-03-07 10:09:59 +01:00
2019-10-15 17:37:08 +02:00
// Shift existing head down list
if ( head ) {
head . prev = node ;
node . next = head ;
} else {
// If no head, follows that there's no tail (at initial or reset)
tail = node ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
// Trim tail if we're reached max size and are pending cache insertion
2020-03-10 15:53:18 +01:00
if ( size === /** @type {MemizeOptions} */ ( options ) . maxSize ) {
tail = /** @type {MemizeCacheNode} */ ( tail ) . prev ;
/** @type {MemizeCacheNode} */ ( tail ) . next = null ;
2019-10-15 17:37:08 +02:00
} else {
size ++ ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
head = node ;
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
return node . val ;
}
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
memoized . clear = function ( ) {
head = null ;
tail = null ;
size = 0 ;
} ;
if ( false ) { }
2020-03-10 15:53:18 +01:00
// Ignore reason: There's not a clear solution to create an intersection of
// the function with additional properties, where the goal is to retain the
// function signature of the incoming argument and add control properties
// on the return value.
// @ts-ignore
2019-10-15 17:37:08 +02:00
return memoized ;
2020-03-10 15:53:18 +01:00
}
module . exports = memize ;
2018-12-14 05:41:57 +01:00
/***/ } ) ,
2020-02-06 22:03:31 +01:00
/***/ 48 :
2020-01-08 12:57:23 +01:00
/***/ ( function ( module , exports ) {
2018-12-14 05:41:57 +01:00
2020-03-24 00:40:19 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "keyboardShortcuts" ] ; } ( ) ) ;
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
/***/ } ) ,
/***/ 5 :
2020-02-06 22:03:31 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-01-08 12:57:23 +01:00
2020-02-06 22:03:31 +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 ;
}
return obj ;
}
2018-12-14 05:41:57 +01:00
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 50 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "a11y" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 55 :
2019-12-09 23:29:08 +01:00
/***/ ( function ( module , exports ) {
2020-01-22 23:06:21 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "plugins" ] ; } ( ) ) ;
2019-09-19 17:19:18 +02:00
2019-10-15 17:37:08 +02:00
/***/ } ) ,
2019-09-19 17:19:18 +02:00
2020-03-24 00:40:19 +01:00
/***/ 56 :
2019-10-15 17:37:08 +02:00
/***/ ( function ( module , exports ) {
2019-09-19 17:19:18 +02:00
2020-01-22 23:06:21 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "viewport" ] ; } ( ) ) ;
2019-09-19 17:19:18 +02:00
/***/ } ) ,
2020-01-22 23:06:21 +01:00
/***/ 6 :
/***/ ( function ( module , exports ) {
2020-02-06 22:03:31 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "blockEditor" ] ; } ( ) ) ;
2020-01-22 23:06:21 +01:00
/***/ } ) ,
/***/ 7 :
/***/ ( 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" ) ;
}
return self ;
}
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 75 :
2020-02-06 22:03:31 +01:00
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "coreData" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 8 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "compose" ] ; } ( ) ) ;
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 89 :
2018-12-18 04:14:52 +01:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
"use strict" ;
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
function flattenIntoMap ( map , effects ) {
var i ;
if ( Array . isArray ( effects ) ) {
for ( i = 0 ; i < effects . length ; i ++ ) {
flattenIntoMap ( map , effects [ i ] ) ;
}
} else {
for ( i in effects ) {
map [ i ] = ( map [ i ] || [ ] ) . concat ( effects [ i ] ) ;
}
}
}
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
function refx ( effects ) {
var map = { } ,
middleware ;
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
flattenIntoMap ( map , effects ) ;
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
middleware = function ( store ) {
return function ( next ) {
return function ( action ) {
var handlers = map [ action . type ] ,
result = next ( action ) ,
i , handlerAction ;
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
if ( handlers ) {
for ( i = 0 ; i < handlers . length ; i ++ ) {
handlerAction = handlers [ i ] ( action , store ) ;
if ( handlerAction ) {
store . dispatch ( handlerAction ) ;
}
}
}
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
return result ;
} ;
} ;
} ;
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
middleware . effects = map ;
return middleware ;
}
module . exports = refx ;
2018-12-14 05:41:57 +01:00
2019-09-19 17:19:18 +02:00
/***/ } ) ,
2019-10-15 17:37:08 +02:00
/***/ 9 :
2019-09-19 17:19:18 +02:00
/***/ ( function ( module , exports ) {
2020-02-10 23:33:27 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "primitives" ] ; } ( ) ) ;
2018-12-14 05:41:57 +01:00
/***/ } )
2018-12-18 04:14:52 +01:00
/******/ } ) ;