Tests: Fix failing unit tests caused by [43840].
See #45145. Built from https://develop.svn.wordpress.org/branches/5.0@43841 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ebb5e6dd0d
commit
9b3cee6428
|
@ -275,6 +275,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _middlewares_fetch_all_middleware__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./middlewares/fetch-all-middleware */ "./node_modules/@wordpress/api-fetch/build-module/middlewares/fetch-all-middleware.js");
|
||||
/* harmony import */ var _middlewares_namespace_endpoint__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./middlewares/namespace-endpoint */ "./node_modules/@wordpress/api-fetch/build-module/middlewares/namespace-endpoint.js");
|
||||
/* harmony import */ var _middlewares_http_v1__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./middlewares/http-v1 */ "./node_modules/@wordpress/api-fetch/build-module/middlewares/http-v1.js");
|
||||
/* harmony import */ var _middlewares_user_locale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./middlewares/user-locale */ "./node_modules/@wordpress/api-fetch/build-module/middlewares/user-locale.js");
|
||||
|
||||
|
||||
|
||||
|
@ -293,6 +294,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
var middlewares = [];
|
||||
|
||||
function registerMiddleware(middleware) {
|
||||
|
@ -402,7 +404,7 @@ function apiFetch(options) {
|
|||
});
|
||||
};
|
||||
|
||||
var steps = [raw, _middlewares_fetch_all_middleware__WEBPACK_IMPORTED_MODULE_7__["default"], _middlewares_http_v1__WEBPACK_IMPORTED_MODULE_9__["default"], _middlewares_namespace_endpoint__WEBPACK_IMPORTED_MODULE_8__["default"]].concat(middlewares).reverse();
|
||||
var steps = [raw, _middlewares_fetch_all_middleware__WEBPACK_IMPORTED_MODULE_7__["default"], _middlewares_http_v1__WEBPACK_IMPORTED_MODULE_9__["default"], _middlewares_namespace_endpoint__WEBPACK_IMPORTED_MODULE_8__["default"], _middlewares_user_locale__WEBPACK_IMPORTED_MODULE_10__["default"]].concat(middlewares).reverse();
|
||||
|
||||
var runMiddleware = function runMiddleware(index) {
|
||||
return function (nextOptions) {
|
||||
|
@ -851,6 +853,43 @@ var createRootURLMiddleware = function createRootURLMiddleware(rootURL) {
|
|||
/* harmony default export */ __webpack_exports__["default"] = (createRootURLMiddleware);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/api-fetch/build-module/middlewares/user-locale.js":
|
||||
/*!***********************************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/api-fetch/build-module/middlewares/user-locale.js ***!
|
||||
\***********************************************************************************/
|
||||
/*! exports provided: default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url");
|
||||
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
function userLocaleMiddleware(options, next) {
|
||||
if (typeof options.url === 'string' && !Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__["hasQueryArg"])(options.url, '_locale')) {
|
||||
options.url = Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__["addQueryArgs"])(options.url, {
|
||||
_locale: 'user'
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof options.path === 'string' && !Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__["hasQueryArg"])(options.path, '_locale')) {
|
||||
options.path = Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__["addQueryArgs"])(options.path, {
|
||||
_locale: 'user'
|
||||
});
|
||||
}
|
||||
|
||||
return next(options, next);
|
||||
}
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (userLocaleMiddleware);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/hooks":
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1000,7 +1000,7 @@ function switchToBlockType(blocks, name) {
|
|||
/*!******************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/blocks/build-module/api/index.js ***!
|
||||
\******************************************************************/
|
||||
/*! exports provided: createBlock, cloneBlock, getPossibleBlockTransformations, switchToBlockType, getBlockTransforms, findTransform, parse, getBlockAttributes, parseWithAttributeSchema, rawHandler, getPhrasingContentSchema, serialize, getBlockContent, getBlockDefaultClassName, getBlockMenuDefaultClassName, getSaveElement, getSaveContent, isValidBlock, getCategories, setCategories, registerBlockType, unregisterBlockType, setUnknownTypeHandlerName, getUnknownTypeHandlerName, setFreeformContentHandlerName, getFreeformContentHandlerName, setUnregisteredTypeHandlerName, getUnregisteredTypeHandlerName, setDefaultBlockName, getDefaultBlockName, getBlockType, getBlockTypes, getBlockSupport, hasBlockSupport, isReusableBlock, getChildBlockNames, hasChildBlocks, hasChildBlocksWithInserterSupport, unstable__bootstrapServerSideBlockDefinitions, registerBlockStyle, isUnmodifiedDefaultBlock, normalizeIconObject, isValidIcon, doBlocksMatchTemplate, synchronizeBlocksWithTemplate, children, node */
|
||||
/*! exports provided: createBlock, cloneBlock, getPossibleBlockTransformations, switchToBlockType, getBlockTransforms, findTransform, parse, getBlockAttributes, parseWithAttributeSchema, rawHandler, getPhrasingContentSchema, serialize, getBlockContent, getBlockDefaultClassName, getBlockMenuDefaultClassName, getSaveElement, getSaveContent, isValidBlock, getCategories, setCategories, registerBlockType, unregisterBlockType, setFreeformContentHandlerName, getFreeformContentHandlerName, setUnregisteredTypeHandlerName, getUnregisteredTypeHandlerName, setDefaultBlockName, getDefaultBlockName, getBlockType, getBlockTypes, getBlockSupport, hasBlockSupport, isReusableBlock, getChildBlockNames, hasChildBlocks, hasChildBlocksWithInserterSupport, unstable__bootstrapServerSideBlockDefinitions, registerBlockStyle, unregisterBlockStyle, isUnmodifiedDefaultBlock, normalizeIconObject, isValidIcon, doBlocksMatchTemplate, synchronizeBlocksWithTemplate, children, node */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -1056,10 +1056,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unregisterBlockType", function() { return _registration__WEBPACK_IMPORTED_MODULE_6__["unregisterBlockType"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setUnknownTypeHandlerName", function() { return _registration__WEBPACK_IMPORTED_MODULE_6__["setUnknownTypeHandlerName"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUnknownTypeHandlerName", function() { return _registration__WEBPACK_IMPORTED_MODULE_6__["getUnknownTypeHandlerName"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setFreeformContentHandlerName", function() { return _registration__WEBPACK_IMPORTED_MODULE_6__["setFreeformContentHandlerName"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFreeformContentHandlerName", function() { return _registration__WEBPACK_IMPORTED_MODULE_6__["getFreeformContentHandlerName"]; });
|
||||
|
@ -1092,6 +1088,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerBlockStyle", function() { return _registration__WEBPACK_IMPORTED_MODULE_6__["registerBlockStyle"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unregisterBlockStyle", function() { return _registration__WEBPACK_IMPORTED_MODULE_6__["unregisterBlockStyle"]; });
|
||||
|
||||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils */ "./node_modules/@wordpress/blocks/build-module/api/utils.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isUnmodifiedDefaultBlock", function() { return _utils__WEBPACK_IMPORTED_MODULE_7__["isUnmodifiedDefaultBlock"]; });
|
||||
|
||||
|
@ -1376,13 +1374,11 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__);
|
||||
/* harmony import */ var _wordpress_block_serialization_default_parser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-serialization-default-parser */ "@wordpress/block-serialization-default-parser");
|
||||
/* harmony import */ var _wordpress_block_serialization_default_parser__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_serialization_default_parser__WEBPACK_IMPORTED_MODULE_6__);
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/deprecated */ "@wordpress/deprecated");
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7__);
|
||||
/* harmony import */ var _registration__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./registration */ "./node_modules/@wordpress/blocks/build-module/api/registration.js");
|
||||
/* harmony import */ var _factory__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./factory */ "./node_modules/@wordpress/blocks/build-module/api/factory.js");
|
||||
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./validation */ "./node_modules/@wordpress/blocks/build-module/api/validation.js");
|
||||
/* harmony import */ var _serializer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./serializer */ "./node_modules/@wordpress/blocks/build-module/api/serializer.js");
|
||||
/* harmony import */ var _matchers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./matchers */ "./node_modules/@wordpress/blocks/build-module/api/matchers.js");
|
||||
/* harmony import */ var _registration__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./registration */ "./node_modules/@wordpress/blocks/build-module/api/registration.js");
|
||||
/* harmony import */ var _factory__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./factory */ "./node_modules/@wordpress/blocks/build-module/api/factory.js");
|
||||
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./validation */ "./node_modules/@wordpress/blocks/build-module/api/validation.js");
|
||||
/* harmony import */ var _serializer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./serializer */ "./node_modules/@wordpress/blocks/build-module/api/serializer.js");
|
||||
/* harmony import */ var _matchers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./matchers */ "./node_modules/@wordpress/blocks/build-module/api/matchers.js");
|
||||
|
||||
|
||||
|
||||
|
@ -1398,7 +1394,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
@ -1569,7 +1564,7 @@ function asType(value, type) {
|
|||
function matcherFromSource(sourceConfig) {
|
||||
switch (sourceConfig.source) {
|
||||
case 'attribute':
|
||||
var matcher = Object(_matchers__WEBPACK_IMPORTED_MODULE_12__["attr"])(sourceConfig.selector, sourceConfig.attribute);
|
||||
var matcher = Object(_matchers__WEBPACK_IMPORTED_MODULE_11__["attr"])(sourceConfig.selector, sourceConfig.attribute);
|
||||
|
||||
if (sourceConfig.type === 'boolean') {
|
||||
matcher = toBooleanAttributeMatcher(matcher);
|
||||
|
@ -1578,23 +1573,23 @@ function matcherFromSource(sourceConfig) {
|
|||
return matcher;
|
||||
|
||||
case 'html':
|
||||
return Object(_matchers__WEBPACK_IMPORTED_MODULE_12__["html"])(sourceConfig.selector, sourceConfig.multiline);
|
||||
return Object(_matchers__WEBPACK_IMPORTED_MODULE_11__["html"])(sourceConfig.selector, sourceConfig.multiline);
|
||||
|
||||
case 'text':
|
||||
return Object(_matchers__WEBPACK_IMPORTED_MODULE_12__["text"])(sourceConfig.selector);
|
||||
return Object(_matchers__WEBPACK_IMPORTED_MODULE_11__["text"])(sourceConfig.selector);
|
||||
|
||||
case 'children':
|
||||
return Object(_matchers__WEBPACK_IMPORTED_MODULE_12__["children"])(sourceConfig.selector);
|
||||
return Object(_matchers__WEBPACK_IMPORTED_MODULE_11__["children"])(sourceConfig.selector);
|
||||
|
||||
case 'node':
|
||||
return Object(_matchers__WEBPACK_IMPORTED_MODULE_12__["node"])(sourceConfig.selector);
|
||||
return Object(_matchers__WEBPACK_IMPORTED_MODULE_11__["node"])(sourceConfig.selector);
|
||||
|
||||
case 'query':
|
||||
var subMatchers = Object(lodash__WEBPACK_IMPORTED_MODULE_3__["mapValues"])(sourceConfig.query, matcherFromSource);
|
||||
return Object(_matchers__WEBPACK_IMPORTED_MODULE_12__["query"])(sourceConfig.selector, subMatchers);
|
||||
return Object(_matchers__WEBPACK_IMPORTED_MODULE_11__["query"])(sourceConfig.selector, subMatchers);
|
||||
|
||||
case 'tag':
|
||||
return Object(lodash__WEBPACK_IMPORTED_MODULE_3__["flow"])([Object(_matchers__WEBPACK_IMPORTED_MODULE_12__["prop"])(sourceConfig.selector, 'nodeName'), function (value) {
|
||||
return Object(lodash__WEBPACK_IMPORTED_MODULE_3__["flow"])([Object(_matchers__WEBPACK_IMPORTED_MODULE_11__["prop"])(sourceConfig.selector, 'nodeName'), function (value) {
|
||||
return value.toLowerCase();
|
||||
}]);
|
||||
|
||||
|
@ -1651,21 +1646,10 @@ function getBlockAttribute(attributeKey, attributeSchema, innerHTML, commentAttr
|
|||
break;
|
||||
}
|
||||
|
||||
if (value !== undefined) {
|
||||
if (isAmbiguousStringSource(attributeSchema)) {
|
||||
if (!isOfTypes(value, Object(lodash__WEBPACK_IMPORTED_MODULE_3__["castArray"])(type))) {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7___default()('Attribute type coercion', {
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2',
|
||||
hint: 'Omit the source to preserve type via serialized ' + 'comment demarcation.'
|
||||
});
|
||||
value = asType(value, type);
|
||||
}
|
||||
} else if (type !== undefined && !isOfTypes(value, Object(lodash__WEBPACK_IMPORTED_MODULE_3__["castArray"])(type))) {
|
||||
// Reject the value if it is not valid of type. Reverting to the
|
||||
// undefined value ensures the default is restored, if applicable.
|
||||
value = undefined;
|
||||
}
|
||||
if (type !== undefined && !isOfTypes(value, Object(lodash__WEBPACK_IMPORTED_MODULE_3__["castArray"])(type))) {
|
||||
// Reject the value if it is not valid of type. Reverting to the
|
||||
// undefined value ensures the default is restored, if applicable.
|
||||
value = undefined;
|
||||
}
|
||||
|
||||
if (value === undefined) {
|
||||
|
@ -1701,7 +1685,7 @@ function getBlockAttributes(blockType, innerHTML, attributes) {
|
|||
*/
|
||||
|
||||
function getMigratedBlock(block) {
|
||||
var blockType = Object(_registration__WEBPACK_IMPORTED_MODULE_8__["getBlockType"])(block.name);
|
||||
var blockType = Object(_registration__WEBPACK_IMPORTED_MODULE_7__["getBlockType"])(block.name);
|
||||
var deprecatedDefinitions = blockType.deprecated;
|
||||
|
||||
if (!deprecatedDefinitions || !deprecatedDefinitions.length) {
|
||||
|
@ -1730,7 +1714,7 @@ function getMigratedBlock(block) {
|
|||
var deprecatedBlockType = Object.assign(Object(lodash__WEBPACK_IMPORTED_MODULE_3__["omit"])(blockType, ['attributes', 'save', 'supports']), deprecatedDefinitions[i]);
|
||||
var migratedAttributes = getBlockAttributes(deprecatedBlockType, originalContent, attributes); // Ignore the deprecation if it produces a block which is not valid.
|
||||
|
||||
var isValid = Object(_validation__WEBPACK_IMPORTED_MODULE_10__["isValidBlock"])(originalContent, deprecatedBlockType, migratedAttributes);
|
||||
var isValid = Object(_validation__WEBPACK_IMPORTED_MODULE_9__["isValidBlock"])(originalContent, deprecatedBlockType, migratedAttributes);
|
||||
|
||||
if (!isValid) {
|
||||
continue;
|
||||
|
@ -1775,8 +1759,8 @@ function createBlockWithFallback(blockNode) {
|
|||
_blockNode$innerBlock = blockNode.innerBlocks,
|
||||
innerBlocks = _blockNode$innerBlock === void 0 ? [] : _blockNode$innerBlock,
|
||||
innerHTML = blockNode.innerHTML;
|
||||
var freeformContentFallbackBlock = Object(_registration__WEBPACK_IMPORTED_MODULE_8__["getFreeformContentHandlerName"])();
|
||||
var unregisteredFallbackBlock = Object(_registration__WEBPACK_IMPORTED_MODULE_8__["getUnregisteredTypeHandlerName"])() || freeformContentFallbackBlock;
|
||||
var freeformContentFallbackBlock = Object(_registration__WEBPACK_IMPORTED_MODULE_7__["getFreeformContentHandlerName"])();
|
||||
var unregisteredFallbackBlock = Object(_registration__WEBPACK_IMPORTED_MODULE_7__["getUnregisteredTypeHandlerName"])() || freeformContentFallbackBlock;
|
||||
attributes = attributes || {}; // Trim content to avoid creation of intermediary freeform segments.
|
||||
|
||||
innerHTML = innerHTML.trim(); // Use type from block content if available. Otherwise, default to the
|
||||
|
@ -1801,7 +1785,7 @@ function createBlockWithFallback(blockNode) {
|
|||
} // Try finding the type for known block name, else fall back again.
|
||||
|
||||
|
||||
var blockType = Object(_registration__WEBPACK_IMPORTED_MODULE_8__["getBlockType"])(name);
|
||||
var blockType = Object(_registration__WEBPACK_IMPORTED_MODULE_7__["getBlockType"])(name);
|
||||
|
||||
if (!blockType) {
|
||||
// Preserve undelimited content for use by the unregistered type handler.
|
||||
|
@ -1809,7 +1793,7 @@ function createBlockWithFallback(blockNode) {
|
|||
// delimiters in content of unregistered type handler.
|
||||
|
||||
if (name) {
|
||||
innerHTML = Object(_serializer__WEBPACK_IMPORTED_MODULE_11__["getCommentDelimitedContent"])(name, attributes, innerHTML);
|
||||
innerHTML = Object(_serializer__WEBPACK_IMPORTED_MODULE_10__["getCommentDelimitedContent"])(name, attributes, innerHTML);
|
||||
}
|
||||
|
||||
name = unregisteredFallbackBlock;
|
||||
|
@ -1817,7 +1801,7 @@ function createBlockWithFallback(blockNode) {
|
|||
originalName: originalName,
|
||||
originalUndelimitedContent: originalUndelimitedContent
|
||||
};
|
||||
blockType = Object(_registration__WEBPACK_IMPORTED_MODULE_8__["getBlockType"])(name);
|
||||
blockType = Object(_registration__WEBPACK_IMPORTED_MODULE_7__["getBlockType"])(name);
|
||||
} // Coerce inner blocks from parsed form to canonical form.
|
||||
|
||||
|
||||
|
@ -1828,13 +1812,13 @@ function createBlockWithFallback(blockNode) {
|
|||
return;
|
||||
}
|
||||
|
||||
var block = Object(_factory__WEBPACK_IMPORTED_MODULE_9__["createBlock"])(name, getBlockAttributes(blockType, innerHTML, attributes), innerBlocks); // Block validation assumes an idempotent operation from source block to serialized block
|
||||
var block = Object(_factory__WEBPACK_IMPORTED_MODULE_8__["createBlock"])(name, getBlockAttributes(blockType, innerHTML, attributes), innerBlocks); // Block validation assumes an idempotent operation from source block to serialized block
|
||||
// provided there are no changes in attributes. The validation procedure thus compares the
|
||||
// provided source value with the serialized output before there are any modifications to
|
||||
// the block. When both match, the block is marked as valid.
|
||||
|
||||
if (!isFallbackBlock) {
|
||||
block.isValid = Object(_validation__WEBPACK_IMPORTED_MODULE_10__["isValidBlock"])(innerHTML, blockType, block.attributes);
|
||||
block.isValid = Object(_validation__WEBPACK_IMPORTED_MODULE_9__["isValidBlock"])(innerHTML, blockType, block.attributes);
|
||||
} // Preserve original content for future use in case the block is parsed as
|
||||
// invalid, or future serialization attempt results in an error.
|
||||
|
||||
|
@ -3368,7 +3352,7 @@ function removeInvalidHTML(HTML, schema, inline) {
|
|||
/*!*************************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/blocks/build-module/api/registration.js ***!
|
||||
\*************************************************************************/
|
||||
/*! exports provided: unstable__bootstrapServerSideBlockDefinitions, registerBlockType, unregisterBlockType, setUnknownTypeHandlerName, getUnknownTypeHandlerName, setFreeformContentHandlerName, getFreeformContentHandlerName, setUnregisteredTypeHandlerName, getUnregisteredTypeHandlerName, setDefaultBlockName, getDefaultBlockName, getBlockType, getBlockTypes, getBlockSupport, hasBlockSupport, isReusableBlock, getChildBlockNames, hasChildBlocks, hasChildBlocksWithInserterSupport, registerBlockStyle */
|
||||
/*! exports provided: unstable__bootstrapServerSideBlockDefinitions, registerBlockType, unregisterBlockType, setFreeformContentHandlerName, getFreeformContentHandlerName, setUnregisteredTypeHandlerName, getUnregisteredTypeHandlerName, setDefaultBlockName, getDefaultBlockName, getBlockType, getBlockTypes, getBlockSupport, hasBlockSupport, isReusableBlock, getChildBlockNames, hasChildBlocks, hasChildBlocksWithInserterSupport, registerBlockStyle, unregisterBlockStyle */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -3376,8 +3360,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unstable__bootstrapServerSideBlockDefinitions", function() { return unstable__bootstrapServerSideBlockDefinitions; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerBlockType", function() { return registerBlockType; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterBlockType", function() { return unregisterBlockType; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUnknownTypeHandlerName", function() { return setUnknownTypeHandlerName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUnknownTypeHandlerName", function() { return getUnknownTypeHandlerName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFreeformContentHandlerName", function() { return setFreeformContentHandlerName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFreeformContentHandlerName", function() { return getFreeformContentHandlerName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUnregisteredTypeHandlerName", function() { return setUnregisteredTypeHandlerName; });
|
||||
|
@ -3393,6 +3375,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasChildBlocks", function() { return hasChildBlocks; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasChildBlocksWithInserterSupport", function() { return hasChildBlocksWithInserterSupport; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerBlockStyle", function() { return registerBlockStyle; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterBlockStyle", function() { return unregisterBlockStyle; });
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash");
|
||||
|
@ -3401,9 +3384,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/deprecated */ "@wordpress/deprecated");
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__);
|
||||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils */ "./node_modules/@wordpress/blocks/build-module/api/utils.js");
|
||||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./node_modules/@wordpress/blocks/build-module/api/utils.js");
|
||||
|
||||
|
||||
|
||||
|
@ -3419,7 +3400,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
@ -3532,9 +3512,9 @@ function registerBlockType(name, settings) {
|
|||
return;
|
||||
}
|
||||
|
||||
settings.icon = Object(_utils__WEBPACK_IMPORTED_MODULE_6__["normalizeIconObject"])(settings.icon);
|
||||
settings.icon = Object(_utils__WEBPACK_IMPORTED_MODULE_5__["normalizeIconObject"])(settings.icon);
|
||||
|
||||
if (!Object(_utils__WEBPACK_IMPORTED_MODULE_6__["isValidIcon"])(settings.icon.src)) {
|
||||
if (!Object(_utils__WEBPACK_IMPORTED_MODULE_5__["isValidIcon"])(settings.icon.src)) {
|
||||
console.error('The icon passed is invalid. ' + 'The icon should be a string, an element, a function, or an object following the specifications documented in https://wordpress.org/gutenberg/handbook/block-api/#icon-optional');
|
||||
return;
|
||||
}
|
||||
|
@ -3562,35 +3542,6 @@ function unregisterBlockType(name) {
|
|||
Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["dispatch"])('core/blocks').removeBlockTypes(name);
|
||||
return oldBlock;
|
||||
}
|
||||
/**
|
||||
* Assigns name of block handling unknown block types.
|
||||
*
|
||||
* @param {string} name Block name.
|
||||
*/
|
||||
|
||||
function setUnknownTypeHandlerName(name) {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5___default()('setUnknownTypeHandlerName', {
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2',
|
||||
alternative: 'setFreeformContentHandlerName and setUnregisteredTypeHandlerName'
|
||||
});
|
||||
setFreeformContentHandlerName(name);
|
||||
}
|
||||
/**
|
||||
* Retrieves name of block handling unknown block types, or undefined if no
|
||||
* handler has been defined.
|
||||
*
|
||||
* @return {?string} Blog name.
|
||||
*/
|
||||
|
||||
function getUnknownTypeHandlerName() {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5___default()('getUnknownTypeHandlerName', {
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2',
|
||||
alternative: 'getFreeformContentHandlerName and getUnregisteredTypeHandlerName'
|
||||
});
|
||||
return getFreeformContentHandlerName();
|
||||
}
|
||||
/**
|
||||
* Assigns name of block for handling non-block content.
|
||||
*
|
||||
|
@ -3760,6 +3711,26 @@ var registerBlockStyle = function registerBlockStyle(blockName, styleVariation)
|
|||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Unregisters a block style variation for the given block.
|
||||
*
|
||||
* @param {string} blockName Name of block (example: “core/latest-posts”).
|
||||
* @param {string} styleVariationName Name of class applied to the block.
|
||||
*/
|
||||
|
||||
var unregisterBlockStyle = function unregisterBlockStyle(blockName, styleVariationName) {
|
||||
Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__["addFilter"])('blocks.registerBlockType', "".concat(blockName, "/").concat(styleVariationName, "/unregister"), function (settings, name) {
|
||||
if (blockName !== name) {
|
||||
return settings;
|
||||
}
|
||||
|
||||
return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__["default"])({}, settings, {
|
||||
styles: Object(lodash__WEBPACK_IMPORTED_MODULE_2__["reject"])(Object(lodash__WEBPACK_IMPORTED_MODULE_2__["get"])(settings, ['styles'], []), {
|
||||
name: styleVariationName
|
||||
})
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
@ -4211,19 +4182,18 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidIcon", function() { return isValidIcon; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeIconObject", function() { return normalizeIconObject; });
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tinycolor2 */ "./node_modules/tinycolor2/tinycolor.js");
|
||||
/* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(tinycolor2__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks");
|
||||
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tinycolor2 */ "./node_modules/tinycolor2/tinycolor.js");
|
||||
/* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(tinycolor2__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks");
|
||||
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var _registration__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./registration */ "./node_modules/@wordpress/blocks/build-module/api/registration.js");
|
||||
/* harmony import */ var _factory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./factory */ "./node_modules/@wordpress/blocks/build-module/api/factory.js");
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
@ -4267,9 +4237,9 @@ function isUnmodifiedDefaultBlock(block) {
|
|||
}
|
||||
|
||||
var newDefaultBlock = Object(_factory__WEBPACK_IMPORTED_MODULE_6__["createBlock"])(defaultBlockName);
|
||||
var attributeKeys = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__["applyFilters"])('blocks.isUnmodifiedDefaultBlock.attributes', Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(lodash__WEBPACK_IMPORTED_MODULE_2__["keys"])(newDefaultBlock.attributes)).concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(lodash__WEBPACK_IMPORTED_MODULE_2__["keys"])(block.attributes))));
|
||||
return Object(lodash__WEBPACK_IMPORTED_MODULE_2__["every"])(attributeKeys, function (key) {
|
||||
return Object(lodash__WEBPACK_IMPORTED_MODULE_2__["isEqual"])(newDefaultBlock.attributes[key], block.attributes[key]);
|
||||
var attributeKeys = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__["applyFilters"])('blocks.isUnmodifiedDefaultBlock.attributes', Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(lodash__WEBPACK_IMPORTED_MODULE_1__["keys"])(newDefaultBlock.attributes)).concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(lodash__WEBPACK_IMPORTED_MODULE_1__["keys"])(block.attributes))));
|
||||
return Object(lodash__WEBPACK_IMPORTED_MODULE_1__["every"])(attributeKeys, function (key) {
|
||||
return Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isEqual"])(newDefaultBlock.attributes[key], block.attributes[key]);
|
||||
});
|
||||
}
|
||||
/**
|
||||
|
@ -4281,7 +4251,7 @@ function isUnmodifiedDefaultBlock(block) {
|
|||
*/
|
||||
|
||||
function isValidIcon(icon) {
|
||||
return !!icon && (Object(lodash__WEBPACK_IMPORTED_MODULE_2__["isString"])(icon) || Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["isValidElement"])(icon) || Object(lodash__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(icon) || icon instanceof _wordpress_element__WEBPACK_IMPORTED_MODULE_1__["Component"]);
|
||||
return !!icon && (Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isString"])(icon) || Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__["isValidElement"])(icon) || Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(icon) || icon instanceof _wordpress_element__WEBPACK_IMPORTED_MODULE_4__["Component"]);
|
||||
}
|
||||
/**
|
||||
* Function that receives an icon as set by the blocks during the registration
|
||||
|
@ -4298,12 +4268,7 @@ function isValidIcon(icon) {
|
|||
function normalizeIconObject(icon) {
|
||||
if (!icon) {
|
||||
return {
|
||||
src: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("svg", {
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
viewBox: "0 0 24 24"
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("path", {
|
||||
d: "M19 7h-1V5h-4v2h-4V5H6v2H5c-1.1 0-2 .9-2 2v10h18V9c0-1.1-.9-2-2-2zm0 10H5V9h14v8z"
|
||||
}))
|
||||
src: 'block-default'
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -4314,10 +4279,10 @@ function normalizeIconObject(icon) {
|
|||
}
|
||||
|
||||
if (icon.background) {
|
||||
var tinyBgColor = tinycolor2__WEBPACK_IMPORTED_MODULE_3___default()(icon.background);
|
||||
var tinyBgColor = tinycolor2__WEBPACK_IMPORTED_MODULE_2___default()(icon.background);
|
||||
|
||||
if (!icon.foreground) {
|
||||
var foreground = Object(tinycolor2__WEBPACK_IMPORTED_MODULE_3__["mostReadable"])(tinyBgColor, ICON_COLORS, {
|
||||
var foreground = Object(tinycolor2__WEBPACK_IMPORTED_MODULE_2__["mostReadable"])(tinyBgColor, ICON_COLORS, {
|
||||
includeFallbackColors: true,
|
||||
level: 'AA',
|
||||
size: 'large'
|
||||
|
@ -4416,7 +4381,7 @@ var REGEXP_STYLE_URL_TYPE = /^url\s*\(['"\s]*(.*?)['"\s]*\)$/;
|
|||
* @type {Array}
|
||||
*/
|
||||
|
||||
var BOOLEAN_ATTRIBUTES = ['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch'];
|
||||
var BOOLEAN_ATTRIBUTES = ['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'download', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch'];
|
||||
/**
|
||||
* Enumerated attributes are attributes which must be of a specific value form.
|
||||
* Like boolean attributes, these are meaningful if specified, even if not of a
|
||||
|
@ -4935,7 +4900,7 @@ var withBlockContentContext = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE
|
|||
/*!**************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/blocks/build-module/index.js ***!
|
||||
\**************************************************************/
|
||||
/*! exports provided: withBlockContentContext, createBlock, cloneBlock, getPossibleBlockTransformations, switchToBlockType, getBlockTransforms, findTransform, parse, getBlockAttributes, parseWithAttributeSchema, rawHandler, getPhrasingContentSchema, serialize, getBlockContent, getBlockDefaultClassName, getBlockMenuDefaultClassName, getSaveElement, getSaveContent, isValidBlock, getCategories, setCategories, registerBlockType, unregisterBlockType, setUnknownTypeHandlerName, getUnknownTypeHandlerName, setFreeformContentHandlerName, getFreeformContentHandlerName, setUnregisteredTypeHandlerName, getUnregisteredTypeHandlerName, setDefaultBlockName, getDefaultBlockName, getBlockType, getBlockTypes, getBlockSupport, hasBlockSupport, isReusableBlock, getChildBlockNames, hasChildBlocks, hasChildBlocksWithInserterSupport, unstable__bootstrapServerSideBlockDefinitions, registerBlockStyle, isUnmodifiedDefaultBlock, normalizeIconObject, isValidIcon, doBlocksMatchTemplate, synchronizeBlocksWithTemplate, children, node */
|
||||
/*! exports provided: withBlockContentContext, createBlock, cloneBlock, getPossibleBlockTransformations, switchToBlockType, getBlockTransforms, findTransform, parse, getBlockAttributes, parseWithAttributeSchema, rawHandler, getPhrasingContentSchema, serialize, getBlockContent, getBlockDefaultClassName, getBlockMenuDefaultClassName, getSaveElement, getSaveContent, isValidBlock, getCategories, setCategories, registerBlockType, unregisterBlockType, setFreeformContentHandlerName, getFreeformContentHandlerName, setUnregisteredTypeHandlerName, getUnregisteredTypeHandlerName, setDefaultBlockName, getDefaultBlockName, getBlockType, getBlockTypes, getBlockSupport, hasBlockSupport, isReusableBlock, getChildBlockNames, hasChildBlocks, hasChildBlocksWithInserterSupport, unstable__bootstrapServerSideBlockDefinitions, registerBlockStyle, unregisterBlockStyle, isUnmodifiedDefaultBlock, normalizeIconObject, isValidIcon, doBlocksMatchTemplate, synchronizeBlocksWithTemplate, children, node */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -4986,10 +4951,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unregisterBlockType", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["unregisterBlockType"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setUnknownTypeHandlerName", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["setUnknownTypeHandlerName"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUnknownTypeHandlerName", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["getUnknownTypeHandlerName"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setFreeformContentHandlerName", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["setFreeformContentHandlerName"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFreeformContentHandlerName", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["getFreeformContentHandlerName"]; });
|
||||
|
@ -5022,6 +4983,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerBlockStyle", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["registerBlockStyle"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unregisterBlockStyle", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["unregisterBlockStyle"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isUnmodifiedDefaultBlock", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["isUnmodifiedDefaultBlock"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "normalizeIconObject", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["normalizeIconObject"]; });
|
||||
|
@ -5059,7 +5022,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/*!**********************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/blocks/build-module/store/actions.js ***!
|
||||
\**********************************************************************/
|
||||
/*! exports provided: addBlockTypes, removeBlockTypes, setDefaultBlockName, setFallbackBlockName, setFreeformFallbackBlockName, setUnregisteredFallbackBlockName, setCategories */
|
||||
/*! exports provided: addBlockTypes, removeBlockTypes, setDefaultBlockName, setFreeformFallbackBlockName, setUnregisteredFallbackBlockName, setCategories */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -5067,23 +5030,15 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addBlockTypes", function() { return addBlockTypes; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeBlockTypes", function() { return removeBlockTypes; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDefaultBlockName", function() { return setDefaultBlockName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFallbackBlockName", function() { return setFallbackBlockName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFreeformFallbackBlockName", function() { return setFreeformFallbackBlockName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUnregisteredFallbackBlockName", function() { return setUnregisteredFallbackBlockName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCategories", function() { return setCategories; });
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/deprecated */ "@wordpress/deprecated");
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Returns an action object used in signalling that block types have been added.
|
||||
*
|
||||
|
@ -5135,23 +5090,6 @@ function setDefaultBlockName(name) {
|
|||
* @return {Object} Action object.
|
||||
*/
|
||||
|
||||
function setFallbackBlockName(name) {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_1___default()('setFallbackBlockName', {
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2',
|
||||
alternative: 'setFreeformFallbackBlockName and setUnregisteredFallbackBlockName'
|
||||
});
|
||||
return setFreeformFallbackBlockName(name);
|
||||
}
|
||||
/**
|
||||
* Returns an action object used to set the name of the block used as a fallback
|
||||
* for non-block content.
|
||||
*
|
||||
* @param {string} name Block name.
|
||||
*
|
||||
* @return {Object} Action object.
|
||||
*/
|
||||
|
||||
function setFreeformFallbackBlockName(name) {
|
||||
return {
|
||||
type: 'SET_FREEFORM_FALLBACK_BLOCK_NAME',
|
||||
|
@ -5371,7 +5309,7 @@ function categories() {
|
|||
/*!************************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/blocks/build-module/store/selectors.js ***!
|
||||
\************************************************************************/
|
||||
/*! exports provided: getBlockTypes, getBlockType, getCategories, getDefaultBlockName, getFallbackBlockName, getFreeformFallbackBlockName, getUnregisteredFallbackBlockName, getChildBlockNames, getBlockSupport, hasBlockSupport, hasChildBlocks, hasChildBlocksWithInserterSupport */
|
||||
/*! exports provided: getBlockTypes, getBlockType, getCategories, getDefaultBlockName, getFreeformFallbackBlockName, getUnregisteredFallbackBlockName, getChildBlockNames, getBlockSupport, hasBlockSupport, hasChildBlocks, hasChildBlocksWithInserterSupport */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -5380,7 +5318,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBlockType", function() { return getBlockType; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCategories", function() { return getCategories; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultBlockName", function() { return getDefaultBlockName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFallbackBlockName", function() { return getFallbackBlockName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFreeformFallbackBlockName", function() { return getFreeformFallbackBlockName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUnregisteredFallbackBlockName", function() { return getUnregisteredFallbackBlockName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getChildBlockNames", function() { return getChildBlockNames; });
|
||||
|
@ -5391,18 +5328,11 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var rememo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rememo */ "./node_modules/rememo/es/rememo.js");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/deprecated */ "@wordpress/deprecated");
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Returns all the available block types.
|
||||
*
|
||||
|
@ -5450,22 +5380,6 @@ function getCategories(state) {
|
|||
function getDefaultBlockName(state) {
|
||||
return state.defaultBlockName;
|
||||
}
|
||||
/**
|
||||
* Returns the name of the fallback block name.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
*
|
||||
* @return {string?} Fallback block name.
|
||||
*/
|
||||
|
||||
function getFallbackBlockName(state) {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2___default()('getFallbackBlockName', {
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2',
|
||||
alternative: 'getFreeformFallbackBlockName and getUnregisteredFallbackBlockName'
|
||||
});
|
||||
return getFreeformFallbackBlockName(state);
|
||||
}
|
||||
/**
|
||||
* Returns the name of the block for handling non-block content.
|
||||
*
|
||||
|
@ -12680,17 +12594,6 @@ module.exports = v4;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/deprecated":
|
||||
/*!*********************************************!*\
|
||||
!*** external {"this":["wp","deprecated"]} ***!
|
||||
\*********************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["deprecated"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/dom":
|
||||
/*!**************************************!*\
|
||||
!*** external {"this":["wp","dom"]} ***!
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -575,7 +575,9 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);
|
||||
/* harmony import */ var _create_higher_order_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../create-higher-order-component */ "./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js");
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/deprecated */ "@wordpress/deprecated");
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7__);
|
||||
/* harmony import */ var _create_higher_order_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../create-higher-order-component */ "./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js");
|
||||
|
||||
|
||||
|
||||
|
@ -588,6 +590,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
@ -603,7 +606,11 @@ __webpack_require__.r(__webpack_exports__);
|
|||
*/
|
||||
|
||||
var remountOnPropChange = function remountOnPropChange(propName) {
|
||||
return Object(_create_higher_order_component__WEBPACK_IMPORTED_MODULE_7__["default"])(function (WrappedComponent) {
|
||||
return Object(_create_higher_order_component__WEBPACK_IMPORTED_MODULE_8__["default"])(function (WrappedComponent) {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7___default()('remountOnPropChange', {
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.4.0'
|
||||
});
|
||||
return (
|
||||
/*#__PURE__*/
|
||||
function (_Component) {
|
||||
|
@ -1159,6 +1166,17 @@ function withState() {
|
|||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/deprecated":
|
||||
/*!*********************************************!*\
|
||||
!*** external {"this":["wp","deprecated"]} ***!
|
||||
\*********************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["deprecated"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/element":
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -319,7 +319,7 @@ function _toConsumableArray(arr) {
|
|||
/*!*******************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/core-data/build-module/actions.js ***!
|
||||
\*******************************************************************/
|
||||
/*! exports provided: receiveUserQuery, addEntities, receiveEntityRecords, receiveThemeSupports, receiveEmbedPreview */
|
||||
/*! exports provided: receiveUserQuery, addEntities, receiveEntityRecords, receiveThemeSupports, receiveEmbedPreview, saveEntityRecord */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -329,12 +329,19 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "receiveEntityRecords", function() { return receiveEntityRecords; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "receiveThemeSupports", function() { return receiveThemeSupports; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "receiveEmbedPreview", function() { return receiveEmbedPreview; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saveEntityRecord", function() { return saveEntityRecord; });
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _queried_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./queried-data */ "./node_modules/@wordpress/core-data/build-module/queried-data/index.js");
|
||||
/* harmony import */ var _entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./entities */ "./node_modules/@wordpress/core-data/build-module/entities.js");
|
||||
/* harmony import */ var _controls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./controls */ "./node_modules/@wordpress/core-data/build-module/controls.js");
|
||||
|
||||
|
||||
var _marked =
|
||||
/*#__PURE__*/
|
||||
regeneratorRuntime.mark(saveEntityRecord);
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
@ -344,6 +351,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns an action object used in signalling that authors have been received.
|
||||
*
|
||||
|
@ -377,15 +386,17 @@ function addEntities(entities) {
|
|||
/**
|
||||
* Returns an action object used in signalling that entity records have been received.
|
||||
*
|
||||
* @param {string} kind Kind of the received entity.
|
||||
* @param {string} name Name of the received entity.
|
||||
* @param {Array|Object} records Records received.
|
||||
* @param {?Object} query Query Object.
|
||||
* @param {string} kind Kind of the received entity.
|
||||
* @param {string} name Name of the received entity.
|
||||
* @param {Array|Object} records Records received.
|
||||
* @param {?Object} query Query Object.
|
||||
* @param {?boolean} invalidateCache Should invalidate query caches
|
||||
*
|
||||
* @return {Object} Action object.
|
||||
*/
|
||||
|
||||
function receiveEntityRecords(kind, name, records, query) {
|
||||
var invalidateCache = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
||||
var action;
|
||||
|
||||
if (query) {
|
||||
|
@ -396,7 +407,8 @@ function receiveEntityRecords(kind, name, records, query) {
|
|||
|
||||
return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, action, {
|
||||
kind: kind,
|
||||
name: name
|
||||
name: name,
|
||||
invalidateCache: invalidateCache
|
||||
});
|
||||
}
|
||||
/**
|
||||
|
@ -430,6 +442,64 @@ function receiveEmbedPreview(url, preview) {
|
|||
preview: preview
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Action triggered to save an entity record.
|
||||
*
|
||||
* @param {string} kind Kind of the received entity.
|
||||
* @param {string} name Name of the received entity.
|
||||
* @param {Object} record Record to be saved.
|
||||
*
|
||||
* @return {Object} Updated record.
|
||||
*/
|
||||
|
||||
function saveEntityRecord(kind, name, record) {
|
||||
var entities, entity, key, recordId, updatedRecord;
|
||||
return regeneratorRuntime.wrap(function saveEntityRecord$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return Object(_entities__WEBPACK_IMPORTED_MODULE_3__["getKindEntities"])(kind);
|
||||
|
||||
case 2:
|
||||
entities = _context.sent;
|
||||
entity = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["find"])(entities, {
|
||||
kind: kind,
|
||||
name: name
|
||||
});
|
||||
|
||||
if (entity) {
|
||||
_context.next = 6;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context.abrupt("return");
|
||||
|
||||
case 6:
|
||||
key = entity.key || _entities__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_ENTITY_KEY"];
|
||||
recordId = record[key];
|
||||
_context.next = 10;
|
||||
return Object(_controls__WEBPACK_IMPORTED_MODULE_4__["apiFetch"])({
|
||||
path: "".concat(entity.baseURL).concat(recordId ? '/' + recordId : ''),
|
||||
method: recordId ? 'PUT' : 'POST',
|
||||
data: record
|
||||
});
|
||||
|
||||
case 10:
|
||||
updatedRecord = _context.sent;
|
||||
_context.next = 13;
|
||||
return receiveEntityRecords(kind, name, updatedRecord, undefined, true);
|
||||
|
||||
case 13:
|
||||
return _context.abrupt("return", updatedRecord);
|
||||
|
||||
case 14:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _marked, this);
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
@ -511,11 +581,12 @@ var controls = {
|
|||
/*!********************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/core-data/build-module/entities.js ***!
|
||||
\********************************************************************/
|
||||
/*! exports provided: defaultEntities, kinds, getMethodName, getKindEntities */
|
||||
/*! exports provided: DEFAULT_ENTITY_KEY, defaultEntities, kinds, getMethodName, getKindEntities */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_ENTITY_KEY", function() { return DEFAULT_ENTITY_KEY; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultEntities", function() { return defaultEntities; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kinds", function() { return kinds; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMethodName", function() { return getMethodName; });
|
||||
|
@ -544,6 +615,7 @@ regeneratorRuntime.mark(getKindEntities);
|
|||
|
||||
|
||||
|
||||
var DEFAULT_ENTITY_KEY = 'id';
|
||||
var defaultEntities = [{
|
||||
name: 'postType',
|
||||
kind: 'root',
|
||||
|
@ -758,56 +830,73 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
// The entity selectors/resolvers and actions are shortcuts to their generic equivalents
|
||||
// (getEntityRecord, getEntityRecords, updateEntityRecord, updateEntityRecordss)
|
||||
// Instead of getEntityRecord, the consumer could use more user-frieldly named selector: getPostType, getTaxonomy...
|
||||
// The "kind" and the "name" of the entity are combined to generate these shortcuts.
|
||||
|
||||
var entitySelectors = _entities__WEBPACK_IMPORTED_MODULE_7__["defaultEntities"].reduce(function (result, entity) {
|
||||
var kind = entity.kind,
|
||||
name = entity.name;
|
||||
|
||||
var createEntityRecordSelector = function createEntityRecordSelector(source) {
|
||||
return _entities__WEBPACK_IMPORTED_MODULE_7__["defaultEntities"].reduce(function (result, entity) {
|
||||
var kind = entity.kind,
|
||||
name = entity.name;
|
||||
result[Object(_entities__WEBPACK_IMPORTED_MODULE_7__["getMethodName"])(kind, name)] = function (state, key) {
|
||||
return _selectors__WEBPACK_IMPORTED_MODULE_4__["getEntityRecord"](state, kind, name, key);
|
||||
};
|
||||
|
||||
result[Object(_entities__WEBPACK_IMPORTED_MODULE_7__["getMethodName"])(kind, name)] = function (state, key) {
|
||||
return source.getEntityRecord(state, kind, name, key);
|
||||
};
|
||||
result[Object(_entities__WEBPACK_IMPORTED_MODULE_7__["getMethodName"])(kind, name, 'get', true)] = function (state) {
|
||||
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
result[Object(_entities__WEBPACK_IMPORTED_MODULE_7__["getMethodName"])(kind, name, 'get', true)] = function (state) {
|
||||
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
return _selectors__WEBPACK_IMPORTED_MODULE_4__["getEntityRecords"].apply(_selectors__WEBPACK_IMPORTED_MODULE_4__, [state, kind, name].concat(args));
|
||||
};
|
||||
|
||||
return source.getEntityRecords.apply(source, [state, kind, name].concat(args));
|
||||
};
|
||||
return result;
|
||||
}, {});
|
||||
var entityResolvers = _entities__WEBPACK_IMPORTED_MODULE_7__["defaultEntities"].reduce(function (result, entity) {
|
||||
var kind = entity.kind,
|
||||
name = entity.name;
|
||||
|
||||
return result;
|
||||
}, {});
|
||||
};
|
||||
result[Object(_entities__WEBPACK_IMPORTED_MODULE_7__["getMethodName"])(kind, name)] = function (key) {
|
||||
return _resolvers__WEBPACK_IMPORTED_MODULE_6__["getEntityRecord"](kind, name, key);
|
||||
};
|
||||
|
||||
var createEntityRecordResolver = function createEntityRecordResolver(source) {
|
||||
return _entities__WEBPACK_IMPORTED_MODULE_7__["defaultEntities"].reduce(function (result, entity) {
|
||||
var kind = entity.kind,
|
||||
name = entity.name;
|
||||
var pluralMethodName = Object(_entities__WEBPACK_IMPORTED_MODULE_7__["getMethodName"])(kind, name, 'get', true);
|
||||
|
||||
result[Object(_entities__WEBPACK_IMPORTED_MODULE_7__["getMethodName"])(kind, name)] = function (key) {
|
||||
return source.getEntityRecord(kind, name, key);
|
||||
};
|
||||
result[pluralMethodName] = function () {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
args[_key2] = arguments[_key2];
|
||||
}
|
||||
|
||||
result[Object(_entities__WEBPACK_IMPORTED_MODULE_7__["getMethodName"])(kind, name, 'get', true)] = function () {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
args[_key2] = arguments[_key2];
|
||||
}
|
||||
return _resolvers__WEBPACK_IMPORTED_MODULE_6__["getEntityRecords"].apply(_resolvers__WEBPACK_IMPORTED_MODULE_6__, [kind, name].concat(args));
|
||||
};
|
||||
|
||||
return source.getEntityRecords.apply(source, [kind, name].concat(args));
|
||||
};
|
||||
result[pluralMethodName].shouldInvalidate = function (action) {
|
||||
var _resolvers$getEntityR;
|
||||
|
||||
return result;
|
||||
}, {});
|
||||
};
|
||||
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
||||
args[_key3 - 1] = arguments[_key3];
|
||||
}
|
||||
|
||||
var entityResolvers = createEntityRecordResolver(_resolvers__WEBPACK_IMPORTED_MODULE_6__);
|
||||
var entitySelectors = createEntityRecordSelector(_selectors__WEBPACK_IMPORTED_MODULE_4__);
|
||||
return (_resolvers$getEntityR = _resolvers__WEBPACK_IMPORTED_MODULE_6__["getEntityRecords"]).shouldInvalidate.apply(_resolvers$getEntityR, [action, kind, name].concat(args));
|
||||
};
|
||||
|
||||
return result;
|
||||
}, {});
|
||||
var entityActions = _entities__WEBPACK_IMPORTED_MODULE_7__["defaultEntities"].reduce(function (result, entity) {
|
||||
var kind = entity.kind,
|
||||
name = entity.name;
|
||||
|
||||
result[Object(_entities__WEBPACK_IMPORTED_MODULE_7__["getMethodName"])(kind, name, 'save')] = function (key) {
|
||||
return _actions__WEBPACK_IMPORTED_MODULE_5__["saveEntityRecord"](kind, name, key);
|
||||
};
|
||||
|
||||
return result;
|
||||
}, {});
|
||||
var store = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["registerStore"])(_name__WEBPACK_IMPORTED_MODULE_8__["REDUCER_KEY"], {
|
||||
reducer: _reducer__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
actions: _actions__WEBPACK_IMPORTED_MODULE_5__,
|
||||
controls: _controls__WEBPACK_IMPORTED_MODULE_3__["default"],
|
||||
actions: Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _actions__WEBPACK_IMPORTED_MODULE_5__, entityActions),
|
||||
selectors: Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _selectors__WEBPACK_IMPORTED_MODULE_4__, entitySelectors),
|
||||
resolvers: Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _resolvers__WEBPACK_IMPORTED_MODULE_6__, entityResolvers)
|
||||
});
|
||||
|
@ -1023,7 +1112,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./node_modules/@wordpress/core-data/build-module/utils/index.js");
|
||||
/* harmony import */ var _get_query_parts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get-query-parts */ "./node_modules/@wordpress/core-data/build-module/queried-data/get-query-parts.js");
|
||||
/* harmony import */ var _entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../entities */ "./node_modules/@wordpress/core-data/build-module/entities.js");
|
||||
/* harmony import */ var _get_query_parts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./get-query-parts */ "./node_modules/@wordpress/core-data/build-module/queried-data/get-query-parts.js");
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1037,6 +1127,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns a merged array of item IDs, given details of the received paginated
|
||||
* items. The array is sparse-like with `undefined` entries where holes exist.
|
||||
|
@ -1081,7 +1172,7 @@ function items() {
|
|||
|
||||
switch (action.type) {
|
||||
case 'RECEIVE_ITEMS':
|
||||
return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, state, Object(lodash__WEBPACK_IMPORTED_MODULE_2__["keyBy"])(action.items, action.key || 'id'));
|
||||
return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, state, Object(lodash__WEBPACK_IMPORTED_MODULE_2__["keyBy"])(action.items, action.key || _entities__WEBPACK_IMPORTED_MODULE_4__["DEFAULT_ENTITY_KEY"]));
|
||||
}
|
||||
|
||||
return state;
|
||||
|
@ -1107,7 +1198,7 @@ Object(_utils__WEBPACK_IMPORTED_MODULE_3__["replaceAction"])(function (action) {
|
|||
// undefined and a query is not assigned. Avoid attempting to parse
|
||||
// parts. `onSubKey` will omit by lack of `stableKey`.
|
||||
if (action.query) {
|
||||
return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, action, Object(_get_query_parts__WEBPACK_IMPORTED_MODULE_4__["default"])(action.query));
|
||||
return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, action, Object(_get_query_parts__WEBPACK_IMPORTED_MODULE_5__["default"])(action.query));
|
||||
}
|
||||
|
||||
return action;
|
||||
|
@ -1120,7 +1211,7 @@ Object(_utils__WEBPACK_IMPORTED_MODULE_3__["onSubKey"])('stableKey')])(function
|
|||
page = action.page,
|
||||
perPage = action.perPage,
|
||||
_action$key = action.key,
|
||||
key = _action$key === void 0 ? 'id' : _action$key;
|
||||
key = _action$key === void 0 ? _entities__WEBPACK_IMPORTED_MODULE_4__["DEFAULT_ENTITY_KEY"] : _action$key;
|
||||
|
||||
if (type !== 'RECEIVE_ITEMS') {
|
||||
return state;
|
||||
|
@ -1400,7 +1491,7 @@ function entity(entityConfig) {
|
|||
}), // Inject the entity config into the action.
|
||||
Object(_utils__WEBPACK_IMPORTED_MODULE_6__["replaceAction"])(function (action) {
|
||||
return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_3__["default"])({}, action, {
|
||||
key: entityConfig.key || 'id'
|
||||
key: entityConfig.key || _entities__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_ENTITY_KEY"]
|
||||
});
|
||||
})])(_queried_data__WEBPACK_IMPORTED_MODULE_7__["reducer"]);
|
||||
}
|
||||
|
@ -1692,10 +1783,15 @@ function getEntityRecords(kind, name) {
|
|||
}
|
||||
}, _marked3, this);
|
||||
}
|
||||
|
||||
getEntityRecords.shouldInvalidate = function (action, kind, name) {
|
||||
return action.type === 'RECEIVE_ITEMS' && action.invalidateCache && kind === action.kind && name === action.name;
|
||||
};
|
||||
/**
|
||||
* Requests theme supports data from the index.
|
||||
*/
|
||||
|
||||
|
||||
function getThemeSupports() {
|
||||
var activeThemes;
|
||||
return regeneratorRuntime.wrap(function getThemeSupports$(_context4) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1165,14 +1165,15 @@ function HeaderToolbar(_ref) {
|
|||
var hasFixedToolbar = _ref.hasFixedToolbar,
|
||||
isLargeViewport = _ref.isLargeViewport,
|
||||
mode = _ref.mode;
|
||||
var toolbarAriaLabel = hasFixedToolbar ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__["__"])('Document and block tools') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__["__"])('Document tools');
|
||||
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_6__["NavigableToolbar"], {
|
||||
className: "edit-post-header-toolbar",
|
||||
"aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__["__"])('Editor Toolbar')
|
||||
"aria-label": toolbarAriaLabel
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_fullscreen_mode_close__WEBPACK_IMPORTED_MODULE_7__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_6__["Inserter"], {
|
||||
disabled: mode !== 'visual',
|
||||
position: "bottom right"
|
||||
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_nux__WEBPACK_IMPORTED_MODULE_4__["DotTip"], {
|
||||
id: "core/editor.inserter"
|
||||
tipId: "core/editor.inserter"
|
||||
}, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__["__"])('Welcome to the wonderful world of blocks! Click the “+” (“Add block”) button to add a new block. There are blocks available for all kinds of content: you can insert text, headings, images, lists, and lots more!'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_6__["EditorHistoryUndo"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_6__["EditorHistoryRedo"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_6__["TableOfContents"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_6__["BlockNavigationDropdown"], null), hasFixedToolbar && isLargeViewport && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
||||
className: "edit-post-header-toolbar__block-toolbar"
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_6__["BlockToolbar"], null)));
|
||||
|
@ -1217,6 +1218,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _header_toolbar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./header-toolbar */ "./node_modules/@wordpress/edit-post/build-module/components/header/header-toolbar/index.js");
|
||||
/* harmony import */ var _pinned_plugins__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./pinned-plugins */ "./node_modules/@wordpress/edit-post/build-module/components/header/pinned-plugins/index.js");
|
||||
/* harmony import */ var _keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../keyboard-shortcuts */ "./node_modules/@wordpress/edit-post/build-module/keyboard-shortcuts.js");
|
||||
/* harmony import */ var _post_publish_button_or_toggle__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./post-publish-button-or-toggle */ "./node_modules/@wordpress/edit-post/build-module/components/header/post-publish-button-or-toggle.js");
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1237,15 +1239,14 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
function Header(_ref) {
|
||||
var isEditorSidebarOpened = _ref.isEditorSidebarOpened,
|
||||
openGeneralSidebar = _ref.openGeneralSidebar,
|
||||
closeGeneralSidebar = _ref.closeGeneralSidebar,
|
||||
isPublishSidebarOpened = _ref.isPublishSidebarOpened,
|
||||
isPublishSidebarEnabled = _ref.isPublishSidebarEnabled,
|
||||
togglePublishSidebar = _ref.togglePublishSidebar,
|
||||
var closeGeneralSidebar = _ref.closeGeneralSidebar,
|
||||
hasActiveMetaboxes = _ref.hasActiveMetaboxes,
|
||||
isSaving = _ref.isSaving;
|
||||
isEditorSidebarOpened = _ref.isEditorSidebarOpened,
|
||||
isPublishSidebarOpened = _ref.isPublishSidebarOpened,
|
||||
isSaving = _ref.isSaving,
|
||||
openGeneralSidebar = _ref.openGeneralSidebar;
|
||||
var toggleGeneralSidebar = isEditorSidebarOpened ? closeGeneralSidebar : openGeneralSidebar;
|
||||
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
||||
role: "region"
|
||||
|
@ -1259,12 +1260,7 @@ function Header(_ref) {
|
|||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_3__["PostSavedState"], {
|
||||
forceIsDirty: hasActiveMetaboxes,
|
||||
forceIsSaving: isSaving
|
||||
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_3__["PostPreviewButton"], null), isPublishSidebarEnabled ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_3__["PostPublishPanelToggle"], {
|
||||
isOpen: isPublishSidebarOpened,
|
||||
onToggle: togglePublishSidebar,
|
||||
forceIsDirty: hasActiveMetaboxes,
|
||||
forceIsSaving: isSaving
|
||||
}) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_3__["PostPublishButton"], {
|
||||
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_3__["PostPreviewButton"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_publish_button_or_toggle__WEBPACK_IMPORTED_MODULE_11__["default"], {
|
||||
forceIsDirty: hasActiveMetaboxes,
|
||||
forceIsSaving: isSaving
|
||||
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["IconButton"], {
|
||||
|
@ -1275,26 +1271,24 @@ function Header(_ref) {
|
|||
"aria-expanded": isEditorSidebarOpened,
|
||||
shortcut: _keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_10__["default"].toggleSidebar
|
||||
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_nux__WEBPACK_IMPORTED_MODULE_6__["DotTip"], {
|
||||
id: "core/editor.settings"
|
||||
tipId: "core/editor.settings"
|
||||
}, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('You’ll find more settings for your page and blocks in the sidebar. Click “Settings” to open it.'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_pinned_plugins__WEBPACK_IMPORTED_MODULE_9__["default"].Slot, null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_more_menu__WEBPACK_IMPORTED_MODULE_7__["default"], null)));
|
||||
}
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select) {
|
||||
return {
|
||||
hasActiveMetaboxes: select('core/edit-post').hasMetaBoxes(),
|
||||
hasBlockSelection: !!select('core/editor').getBlockSelectionStart(),
|
||||
isEditorSidebarOpened: select('core/edit-post').isEditorSidebarOpened(),
|
||||
isPublishSidebarOpened: select('core/edit-post').isPublishSidebarOpened(),
|
||||
isPublishSidebarEnabled: select('core/editor').isPublishSidebarEnabled(),
|
||||
hasActiveMetaboxes: select('core/edit-post').hasMetaBoxes(),
|
||||
isSaving: select('core/edit-post').isSavingMetaBoxes(),
|
||||
hasBlockSelection: !!select('core/editor').getBlockSelectionStart()
|
||||
isSaving: select('core/edit-post').isSavingMetaBoxes()
|
||||
};
|
||||
}), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withDispatch"])(function (dispatch, _ref2) {
|
||||
var hasBlockSelection = _ref2.hasBlockSelection;
|
||||
|
||||
var _dispatch = dispatch('core/edit-post'),
|
||||
_openGeneralSidebar = _dispatch.openGeneralSidebar,
|
||||
closeGeneralSidebar = _dispatch.closeGeneralSidebar,
|
||||
togglePublishSidebar = _dispatch.togglePublishSidebar;
|
||||
closeGeneralSidebar = _dispatch.closeGeneralSidebar;
|
||||
|
||||
var sidebarToOpen = hasBlockSelection ? 'edit-post/block' : 'edit-post/document';
|
||||
return {
|
||||
|
@ -1302,7 +1296,6 @@ function Header(_ref) {
|
|||
return _openGeneralSidebar(sidebarToOpen);
|
||||
},
|
||||
closeGeneralSidebar: closeGeneralSidebar,
|
||||
togglePublishSidebar: togglePublishSidebar,
|
||||
hasBlockSelection: undefined
|
||||
};
|
||||
}))(Header));
|
||||
|
@ -1699,6 +1692,119 @@ PluginsMoreMenuGroup.Slot = function (_ref) {
|
|||
/* harmony default export */ __webpack_exports__["default"] = (PluginsMoreMenuGroup);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/edit-post/build-module/components/header/post-publish-button-or-toggle.js":
|
||||
/*!***********************************************************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/edit-post/build-module/components/header/post-publish-button-or-toggle.js ***!
|
||||
\***********************************************************************************************************/
|
||||
/*! exports provided: PostPublishButtonOrToggle, default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostPublishButtonOrToggle", function() { return PostPublishButtonOrToggle; });
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/editor */ "@wordpress/editor");
|
||||
/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_editor__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/viewport */ "@wordpress/viewport");
|
||||
/* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
/**
|
||||
* External Dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* WordPress dependencies.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function PostPublishButtonOrToggle(_ref) {
|
||||
var forceIsDirty = _ref.forceIsDirty,
|
||||
forceIsSaving = _ref.forceIsSaving,
|
||||
hasPublishAction = _ref.hasPublishAction,
|
||||
isBeingScheduled = _ref.isBeingScheduled,
|
||||
isLessThanMediumViewport = _ref.isLessThanMediumViewport,
|
||||
isPending = _ref.isPending,
|
||||
isPublished = _ref.isPublished,
|
||||
isPublishSidebarEnabled = _ref.isPublishSidebarEnabled,
|
||||
isPublishSidebarOpened = _ref.isPublishSidebarOpened,
|
||||
isScheduled = _ref.isScheduled,
|
||||
togglePublishSidebar = _ref.togglePublishSidebar;
|
||||
var button = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_2__["PostPublishButton"], {
|
||||
forceIsDirty: forceIsDirty,
|
||||
forceIsSaving: forceIsSaving
|
||||
});
|
||||
var toggle = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_2__["PostPublishPanelToggle"], {
|
||||
isOpen: isPublishSidebarOpened,
|
||||
onToggle: togglePublishSidebar,
|
||||
forceIsSaving: forceIsSaving
|
||||
});
|
||||
/**
|
||||
* We want to show a BUTTON when the post status is at the _final stage_
|
||||
* for a particular role (see https://codex.wordpress.org/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 ex, for a contributor role).
|
||||
* Some languages can have really long translations for "Submit for review",
|
||||
* so given the lack of UI real state we decided to take into account the viewport
|
||||
* in that particular case.
|
||||
*/
|
||||
|
||||
if (isPublished || isScheduled && isBeingScheduled || isPending && !hasPublishAction && !isLessThanMediumViewport) {
|
||||
return button;
|
||||
}
|
||||
/**
|
||||
* Then, we take other things into account:
|
||||
*
|
||||
* - Show TOGGLE if it is small viewport.
|
||||
* - Otherwise, use publish sidebar status to decide - TOGGLE if enabled, BUTTON if not.
|
||||
*/
|
||||
|
||||
|
||||
if (isLessThanMediumViewport) {
|
||||
return toggle;
|
||||
}
|
||||
|
||||
return isPublishSidebarEnabled ? toggle : button;
|
||||
}
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select) {
|
||||
return {
|
||||
hasPublishAction: Object(lodash__WEBPACK_IMPORTED_MODULE_1__["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()
|
||||
};
|
||||
}), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withDispatch"])(function (dispatch) {
|
||||
var _dispatch = dispatch('core/edit-post'),
|
||||
togglePublishSidebar = _dispatch.togglePublishSidebar;
|
||||
|
||||
return {
|
||||
togglePublishSidebar: togglePublishSidebar
|
||||
};
|
||||
}), Object(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_5__["withViewportMatch"])({
|
||||
isLessThanMediumViewport: '< medium'
|
||||
}))(PostPublishButtonOrToggle));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/edit-post/build-module/components/header/tools-more-menu-group/index.js":
|
||||
|
@ -2238,19 +2344,18 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__);
|
||||
/* harmony import */ var _browser_url__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../browser-url */ "./node_modules/@wordpress/edit-post/build-module/components/browser-url/index.js");
|
||||
/* harmony import */ var _sidebar_block_sidebar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../sidebar/block-sidebar */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/block-sidebar/index.js");
|
||||
/* harmony import */ var _sidebar_document_sidebar__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../sidebar/document-sidebar */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/document-sidebar/index.js");
|
||||
/* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../header */ "./node_modules/@wordpress/edit-post/build-module/components/header/index.js");
|
||||
/* harmony import */ var _text_editor__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../text-editor */ "./node_modules/@wordpress/edit-post/build-module/components/text-editor/index.js");
|
||||
/* harmony import */ var _visual_editor__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../visual-editor */ "./node_modules/@wordpress/edit-post/build-module/components/visual-editor/index.js");
|
||||
/* harmony import */ var _keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../keyboard-shortcuts */ "./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcuts/index.js");
|
||||
/* harmony import */ var _keyboard_shortcut_help_modal__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../keyboard-shortcut-help-modal */ "./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcut-help-modal/index.js");
|
||||
/* harmony import */ var _options_modal__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../options-modal */ "./node_modules/@wordpress/edit-post/build-module/components/options-modal/index.js");
|
||||
/* harmony import */ var _meta_boxes__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../meta-boxes */ "./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/index.js");
|
||||
/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../sidebar */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/index.js");
|
||||
/* harmony import */ var _sidebar_plugin_post_publish_panel__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../sidebar/plugin-post-publish-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-publish-panel/index.js");
|
||||
/* harmony import */ var _sidebar_plugin_pre_publish_panel__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../sidebar/plugin-pre-publish-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-pre-publish-panel/index.js");
|
||||
/* harmony import */ var _fullscreen_mode__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../fullscreen-mode */ "./node_modules/@wordpress/edit-post/build-module/components/fullscreen-mode/index.js");
|
||||
/* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../header */ "./node_modules/@wordpress/edit-post/build-module/components/header/index.js");
|
||||
/* harmony import */ var _text_editor__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../text-editor */ "./node_modules/@wordpress/edit-post/build-module/components/text-editor/index.js");
|
||||
/* harmony import */ var _visual_editor__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../visual-editor */ "./node_modules/@wordpress/edit-post/build-module/components/visual-editor/index.js");
|
||||
/* harmony import */ var _keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../keyboard-shortcuts */ "./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcuts/index.js");
|
||||
/* harmony import */ var _keyboard_shortcut_help_modal__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../keyboard-shortcut-help-modal */ "./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcut-help-modal/index.js");
|
||||
/* harmony import */ var _options_modal__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../options-modal */ "./node_modules/@wordpress/edit-post/build-module/components/options-modal/index.js");
|
||||
/* harmony import */ var _meta_boxes__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../meta-boxes */ "./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/index.js");
|
||||
/* harmony import */ var _sidebar_settings_sidebar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../sidebar/settings-sidebar */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/settings-sidebar/index.js");
|
||||
/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../sidebar */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/index.js");
|
||||
/* harmony import */ var _sidebar_plugin_post_publish_panel__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../sidebar/plugin-post-publish-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-publish-panel/index.js");
|
||||
/* harmony import */ var _sidebar_plugin_pre_publish_panel__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../sidebar/plugin-pre-publish-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-pre-publish-panel/index.js");
|
||||
/* harmony import */ var _fullscreen_mode__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../fullscreen-mode */ "./node_modules/@wordpress/edit-post/build-module/components/fullscreen-mode/index.js");
|
||||
|
||||
|
||||
|
||||
|
@ -2288,7 +2393,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
function Layout(_ref) {
|
||||
var mode = _ref.mode,
|
||||
editorSidebarOpened = _ref.editorSidebarOpened,
|
||||
|
@ -2314,27 +2418,27 @@ function Layout(_ref) {
|
|||
};
|
||||
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
|
||||
className: className
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_fullscreen_mode__WEBPACK_IMPORTED_MODULE_23__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_browser_url__WEBPACK_IMPORTED_MODULE_10__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["UnsavedChangesWarning"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["AutosaveMonitor"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_header__WEBPACK_IMPORTED_MODULE_13__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_fullscreen_mode__WEBPACK_IMPORTED_MODULE_22__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_browser_url__WEBPACK_IMPORTED_MODULE_10__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["UnsavedChangesWarning"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["AutosaveMonitor"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_header__WEBPACK_IMPORTED_MODULE_11__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
|
||||
className: "edit-post-layout__content",
|
||||
role: "region"
|
||||
/* translators: accessibility text for the content landmark region. */
|
||||
,
|
||||
"aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Editor content'),
|
||||
tabIndex: "-1"
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["EditorNotices"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["PreserveScrollInReorder"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_16__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_keyboard_shortcut_help_modal__WEBPACK_IMPORTED_MODULE_17__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_options_modal__WEBPACK_IMPORTED_MODULE_18__["default"], null), mode === 'text' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_text_editor__WEBPACK_IMPORTED_MODULE_14__["default"], null), mode === 'visual' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_visual_editor__WEBPACK_IMPORTED_MODULE_15__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["EditorNotices"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["PreserveScrollInReorder"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_14__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_keyboard_shortcut_help_modal__WEBPACK_IMPORTED_MODULE_15__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_options_modal__WEBPACK_IMPORTED_MODULE_16__["default"], null), mode === 'text' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_text_editor__WEBPACK_IMPORTED_MODULE_12__["default"], null), mode === 'visual' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_visual_editor__WEBPACK_IMPORTED_MODULE_13__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
|
||||
className: "edit-post-layout__metaboxes"
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_meta_boxes__WEBPACK_IMPORTED_MODULE_19__["default"], {
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_meta_boxes__WEBPACK_IMPORTED_MODULE_17__["default"], {
|
||||
location: "normal"
|
||||
})), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
|
||||
className: "edit-post-layout__metaboxes"
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_meta_boxes__WEBPACK_IMPORTED_MODULE_19__["default"], {
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_meta_boxes__WEBPACK_IMPORTED_MODULE_17__["default"], {
|
||||
location: "advanced"
|
||||
}))), publishSidebarOpened ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["PostPublishPanel"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, publishLandmarkProps, {
|
||||
onClose: closePublishSidebar,
|
||||
forceIsDirty: hasActiveMetaboxes,
|
||||
forceIsSaving: isSaving,
|
||||
PrePublishExtension: _sidebar_plugin_pre_publish_panel__WEBPACK_IMPORTED_MODULE_22__["default"].Slot,
|
||||
PostPublishExtension: _sidebar_plugin_post_publish_panel__WEBPACK_IMPORTED_MODULE_21__["default"].Slot
|
||||
PrePublishExtension: _sidebar_plugin_pre_publish_panel__WEBPACK_IMPORTED_MODULE_21__["default"].Slot,
|
||||
PostPublishExtension: _sidebar_plugin_post_publish_panel__WEBPACK_IMPORTED_MODULE_20__["default"].Slot
|
||||
})) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({
|
||||
className: "edit-post-toggle-publish-panel"
|
||||
}, publishLandmarkProps), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Button"], {
|
||||
|
@ -2343,7 +2447,7 @@ function Layout(_ref) {
|
|||
className: "edit-post-toggle-publish-panel__button",
|
||||
onClick: togglePublishSidebar,
|
||||
"aria-expanded": false
|
||||
}, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Open publish panel'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_sidebar_document_sidebar__WEBPACK_IMPORTED_MODULE_12__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_sidebar_block_sidebar__WEBPACK_IMPORTED_MODULE_11__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_sidebar__WEBPACK_IMPORTED_MODULE_20__["default"].Slot, null), isMobileViewport && sidebarIsOpened && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["ScrollLock"], null)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Popover"].Slot, null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_7__["PluginArea"], null));
|
||||
}, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Open publish panel'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_sidebar_settings_sidebar__WEBPACK_IMPORTED_MODULE_18__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_sidebar__WEBPACK_IMPORTED_MODULE_19__["default"].Slot, null), isMobileViewport && sidebarIsOpened && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["ScrollLock"], null)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Popover"].Slot, null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_7__["PluginArea"], null));
|
||||
}
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select) {
|
||||
|
@ -2801,6 +2905,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__);
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__);
|
||||
/* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/viewport */ "@wordpress/viewport");
|
||||
/* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_9__);
|
||||
|
||||
|
||||
|
||||
|
@ -2816,6 +2922,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
function Option(_ref) {
|
||||
var label = _ref.label,
|
||||
isChecked = _ref.isChecked,
|
||||
|
@ -2888,7 +2995,9 @@ var EnablePublishSidebarOption = Object(_wordpress_compose__WEBPACK_IMPORTED_MOD
|
|||
return isEnabled ? enablePublishSidebar() : disablePublishSidebar();
|
||||
}
|
||||
};
|
||||
}))(Option);
|
||||
}), // 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(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_9__["ifViewportMatches"])('medium'))(Option);
|
||||
var EnableTipsOption = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__["withSelect"])(function (select) {
|
||||
return {
|
||||
isChecked: select('core/nux').areTipsEnabled()
|
||||
|
@ -2950,57 +3059,6 @@ var Section = function Section(_ref) {
|
|||
/* harmony default export */ __webpack_exports__["default"] = (Section);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/block-sidebar/index.js":
|
||||
/*!**************************************************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/edit-post/build-module/components/sidebar/block-sidebar/index.js ***!
|
||||
\**************************************************************************************************/
|
||||
/*! exports provided: default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/editor */ "@wordpress/editor");
|
||||
/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_editor__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _settings_header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../settings-header */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/settings-header/index.js");
|
||||
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/index.js");
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal Dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var SIDEBAR_NAME = 'edit-post/block';
|
||||
|
||||
var BlockSidebar = function BlockSidebar() {
|
||||
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(___WEBPACK_IMPORTED_MODULE_5__["default"], {
|
||||
name: SIDEBAR_NAME,
|
||||
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Editor settings')
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_settings_header__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
||||
sidebarName: SIDEBAR_NAME
|
||||
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Panel"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["PanelBody"], {
|
||||
className: "edit-post-block-sidebar__panel"
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_2__["BlockInspector"], null))));
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (BlockSidebar);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/discussion-panel/index.js":
|
||||
|
@ -3076,70 +3134,6 @@ function DiscussionPanel(_ref) {
|
|||
})])(DiscussionPanel));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/document-sidebar/index.js":
|
||||
/*!*****************************************************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/edit-post/build-module/components/sidebar/document-sidebar/index.js ***!
|
||||
\*****************************************************************************************************/
|
||||
/*! exports provided: default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _post_status__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../post-status */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-status/index.js");
|
||||
/* harmony import */ var _post_excerpt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../post-excerpt */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-excerpt/index.js");
|
||||
/* harmony import */ var _post_taxonomies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../post-taxonomies */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-taxonomies/index.js");
|
||||
/* harmony import */ var _featured_image__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../featured-image */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/featured-image/index.js");
|
||||
/* harmony import */ var _discussion_panel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../discussion-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/discussion-panel/index.js");
|
||||
/* harmony import */ var _last_revision__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../last-revision */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/last-revision/index.js");
|
||||
/* harmony import */ var _page_attributes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../page-attributes */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/page-attributes/index.js");
|
||||
/* harmony import */ var _meta_boxes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../meta-boxes */ "./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/index.js");
|
||||
/* harmony import */ var _settings_header__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../settings-header */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/settings-header/index.js");
|
||||
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../ */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/index.js");
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal Dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var SIDEBAR_NAME = 'edit-post/document';
|
||||
|
||||
var DocumentSidebar = function DocumentSidebar() {
|
||||
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(___WEBPACK_IMPORTED_MODULE_12__["default"], {
|
||||
name: SIDEBAR_NAME,
|
||||
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Editor settings')
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_settings_header__WEBPACK_IMPORTED_MODULE_11__["default"], {
|
||||
sidebarName: SIDEBAR_NAME
|
||||
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Panel"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_status__WEBPACK_IMPORTED_MODULE_3__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_last_revision__WEBPACK_IMPORTED_MODULE_8__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_taxonomies__WEBPACK_IMPORTED_MODULE_5__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_featured_image__WEBPACK_IMPORTED_MODULE_6__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_excerpt__WEBPACK_IMPORTED_MODULE_4__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_discussion_panel__WEBPACK_IMPORTED_MODULE_7__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_page_attributes__WEBPACK_IMPORTED_MODULE_9__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_meta_boxes__WEBPACK_IMPORTED_MODULE_10__["default"], {
|
||||
location: "side"
|
||||
})));
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (DocumentSidebar);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/featured-image/index.js":
|
||||
|
@ -4230,15 +4224,17 @@ function PostVisibility() {
|
|||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _sidebar_header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../sidebar-header */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/sidebar-header/index.js");
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var _sidebar_header__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../sidebar-header */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/sidebar-header/index.js");
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -4260,28 +4256,43 @@ var SettingsHeader = function SettingsHeader(_ref) {
|
|||
sidebarName = _ref.sidebarName;
|
||||
// Do not display "0 Blocks".
|
||||
var blockCount = count === 0 ? 1 : count;
|
||||
var blockLabel = blockCount === 1 ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Block') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["_n"])('%d Block', '%d Blocks', blockCount), blockCount);
|
||||
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_sidebar_header__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
||||
var blockLabel = blockCount === 1 ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Block') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["_n"])('%d Block', '%d Blocks', blockCount), blockCount);
|
||||
|
||||
var _ref2 = sidebarName === 'edit-post/document' ? // translators: ARIA label for the Document Settings sidebar tab, selected.
|
||||
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Document settings (selected)'), 'is-active'] : // translators: ARIA label for the Document Settings sidebar tab, not selected.
|
||||
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Document settings'), ''],
|
||||
_ref3 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref2, 2),
|
||||
documentAriaLabel = _ref3[0],
|
||||
documentActiveClass = _ref3[1];
|
||||
|
||||
var _ref4 = sidebarName === 'edit-post/block' ? // translators: ARIA label for the Block Settings sidebar tab, selected.
|
||||
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Block settings (selected)'), 'is-active'] : // translators: ARIA label for the Block Settings sidebar tab, not selected.
|
||||
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Block settings'), ''],
|
||||
_ref5 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref4, 2),
|
||||
blockAriaLabel = _ref5[0],
|
||||
blockActiveClass = _ref5[1];
|
||||
|
||||
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_sidebar_header__WEBPACK_IMPORTED_MODULE_5__["default"], {
|
||||
className: "edit-post-sidebar__panel-tabs",
|
||||
closeLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Close settings')
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("button", {
|
||||
closeLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Close settings')
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("ul", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("li", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("button", {
|
||||
onClick: openDocumentSettings,
|
||||
className: "edit-post-sidebar__panel-tab ".concat(sidebarName === 'edit-post/document' ? 'is-active' : ''),
|
||||
"aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Document settings'),
|
||||
"data-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Document')
|
||||
}, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Document')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("button", {
|
||||
className: "edit-post-sidebar__panel-tab ".concat(documentActiveClass),
|
||||
"aria-label": documentAriaLabel,
|
||||
"data-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Document')
|
||||
}, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Document'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("li", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("button", {
|
||||
onClick: openBlockSettings,
|
||||
className: "edit-post-sidebar__panel-tab ".concat(sidebarName === 'edit-post/block' ? 'is-active' : ''),
|
||||
"aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Block settings'),
|
||||
className: "edit-post-sidebar__panel-tab ".concat(blockActiveClass),
|
||||
"aria-label": blockAriaLabel,
|
||||
"data-label": blockLabel
|
||||
}, blockLabel));
|
||||
}, blockLabel))));
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) {
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select) {
|
||||
return {
|
||||
count: select('core/editor').getSelectedBlockCount()
|
||||
};
|
||||
}), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withDispatch"])(function (dispatch) {
|
||||
}), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withDispatch"])(function (dispatch) {
|
||||
var _dispatch = dispatch('core/edit-post'),
|
||||
openGeneralSidebar = _dispatch.openGeneralSidebar;
|
||||
|
||||
|
@ -4300,6 +4311,94 @@ var SettingsHeader = function SettingsHeader(_ref) {
|
|||
}))(SettingsHeader));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/settings-sidebar/index.js":
|
||||
/*!*****************************************************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/edit-post/build-module/components/sidebar/settings-sidebar/index.js ***!
|
||||
\*****************************************************************************************************/
|
||||
/*! exports provided: default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/editor */ "@wordpress/editor");
|
||||
/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_editor__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
|
||||
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/index.js");
|
||||
/* harmony import */ var _settings_header__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../settings-header */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/settings-header/index.js");
|
||||
/* harmony import */ var _post_status__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../post-status */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-status/index.js");
|
||||
/* harmony import */ var _last_revision__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../last-revision */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/last-revision/index.js");
|
||||
/* harmony import */ var _post_taxonomies__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../post-taxonomies */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-taxonomies/index.js");
|
||||
/* harmony import */ var _featured_image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../featured-image */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/featured-image/index.js");
|
||||
/* harmony import */ var _post_excerpt__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../post-excerpt */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-excerpt/index.js");
|
||||
/* harmony import */ var _discussion_panel__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../discussion-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/discussion-panel/index.js");
|
||||
/* harmony import */ var _page_attributes__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../page-attributes */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/page-attributes/index.js");
|
||||
/* harmony import */ var _meta_boxes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../meta-boxes */ "./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/index.js");
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal Dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var SettingsSidebar = function SettingsSidebar(_ref) {
|
||||
var sidebarName = _ref.sidebarName;
|
||||
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(___WEBPACK_IMPORTED_MODULE_6__["default"], {
|
||||
name: sidebarName,
|
||||
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__["__"])('Editor settings')
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_settings_header__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
||||
sidebarName: sidebarName
|
||||
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Panel"], null, sidebarName === 'edit-post/document' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_status__WEBPACK_IMPORTED_MODULE_8__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_last_revision__WEBPACK_IMPORTED_MODULE_9__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_taxonomies__WEBPACK_IMPORTED_MODULE_10__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_featured_image__WEBPACK_IMPORTED_MODULE_11__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_excerpt__WEBPACK_IMPORTED_MODULE_12__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_discussion_panel__WEBPACK_IMPORTED_MODULE_13__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_page_attributes__WEBPACK_IMPORTED_MODULE_14__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_meta_boxes__WEBPACK_IMPORTED_MODULE_15__["default"], {
|
||||
location: "side"
|
||||
})), sidebarName === 'edit-post/block' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["PanelBody"], {
|
||||
className: "edit-post-settings-sidebar__panel-block"
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_4__["BlockInspector"], null))));
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) {
|
||||
var _select = select('core/edit-post'),
|
||||
getActiveGeneralSidebarName = _select.getActiveGeneralSidebarName,
|
||||
isEditorSidebarOpened = _select.isEditorSidebarOpened;
|
||||
|
||||
return {
|
||||
isEditorSidebarOpened: isEditorSidebarOpened(),
|
||||
sidebarName: getActiveGeneralSidebarName()
|
||||
};
|
||||
}), Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["ifCondition"])(function (_ref2) {
|
||||
var isEditorSidebarOpened = _ref2.isEditorSidebarOpened;
|
||||
return isEditorSidebarOpened;
|
||||
}))(SettingsSidebar));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/sidebar-header/index.js":
|
||||
|
@ -4555,7 +4654,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
function VisualEditor() {
|
||||
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_1__["BlockSelectionClearer"], {
|
||||
className: "edit-post-visual-editor"
|
||||
className: "edit-post-visual-editor editor-styles-wrapper"
|
||||
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_1__["EditorGlobalKeyboardShortcuts"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_1__["CopyHandler"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_1__["MultiSelectScrollIntoView"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_1__["WritingFlow"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_1__["ObserveTyping"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_1__["PostTitle"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_1__["BlockList"], null))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_1__["_BlockSettingsMenuFirstItem"], null, function (_ref) {
|
||||
var onClose = _ref.onClose;
|
||||
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_inspector_button__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
||||
|
@ -4705,8 +4804,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/deprecated */ "@wordpress/deprecated");
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_9__);
|
||||
|
||||
|
||||
|
||||
|
@ -4723,7 +4820,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
*/
|
||||
|
||||
|
||||
|
||||
// Getter for the sake of unit tests.
|
||||
|
||||
var getGalleryDetailsMediaFrame = function getGalleryDetailsMediaFrame() {
|
||||
|
@ -4790,7 +4886,6 @@ function (_Component) {
|
|||
var _this;
|
||||
|
||||
var allowedTypes = _ref.allowedTypes,
|
||||
deprecatedType = _ref.type,
|
||||
_ref$multiple = _ref.multiple,
|
||||
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
|
||||
_ref$gallery = _ref.gallery,
|
||||
|
@ -4808,20 +4903,6 @@ function (_Component) {
|
|||
_this.onSelect = _this.onSelect.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this)));
|
||||
_this.onUpdate = _this.onUpdate.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this)));
|
||||
_this.onClose = _this.onClose.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this)));
|
||||
var allowedTypesToUse = allowedTypes;
|
||||
|
||||
if (!allowedTypes && deprecatedType) {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_9___default()('type property of wp.editor.MediaUpload', {
|
||||
version: '4.2',
|
||||
alternative: 'allowedTypes property containing an array with the allowedTypes or do not pass any property if all types are allowed'
|
||||
});
|
||||
|
||||
if (deprecatedType === '*') {
|
||||
allowedTypesToUse = undefined;
|
||||
} else {
|
||||
allowedTypesToUse = [deprecatedType];
|
||||
}
|
||||
}
|
||||
|
||||
if (gallery) {
|
||||
var currentState = value ? 'gallery-edit' : 'gallery';
|
||||
|
@ -4832,7 +4913,7 @@ function (_Component) {
|
|||
multiple: multiple
|
||||
});
|
||||
_this.frame = new GalleryDetailsMediaFrame({
|
||||
mimeType: allowedTypesToUse,
|
||||
mimeType: allowedTypes,
|
||||
state: currentState,
|
||||
multiple: multiple,
|
||||
selection: selection,
|
||||
|
@ -4848,9 +4929,9 @@ function (_Component) {
|
|||
multiple: multiple
|
||||
};
|
||||
|
||||
if (!!allowedTypesToUse) {
|
||||
if (!!allowedTypes) {
|
||||
frameConfig.library = {
|
||||
type: allowedTypesToUse
|
||||
type: allowedTypes
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -5162,30 +5243,27 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _wordpress_block_library__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_library__WEBPACK_IMPORTED_MODULE_5__);
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__);
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/deprecated */ "@wordpress/deprecated");
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7__);
|
||||
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./hooks */ "./node_modules/@wordpress/edit-post/build-module/hooks/index.js");
|
||||
/* harmony import */ var _plugins__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./plugins */ "./node_modules/@wordpress/edit-post/build-module/plugins/index.js");
|
||||
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./store */ "./node_modules/@wordpress/edit-post/build-module/store/index.js");
|
||||
/* harmony import */ var _store_actions__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./store/actions */ "./node_modules/@wordpress/edit-post/build-module/store/actions.js");
|
||||
/* harmony import */ var _editor__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./editor */ "./node_modules/@wordpress/edit-post/build-module/editor.js");
|
||||
/* harmony import */ var _components_block_settings_menu_plugin_block_settings_menu_item__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./components/block-settings-menu/plugin-block-settings-menu-item */ "./node_modules/@wordpress/edit-post/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginBlockSettingsMenuItem", function() { return _components_block_settings_menu_plugin_block_settings_menu_item__WEBPACK_IMPORTED_MODULE_13__["default"]; });
|
||||
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./hooks */ "./node_modules/@wordpress/edit-post/build-module/hooks/index.js");
|
||||
/* harmony import */ var _plugins__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./plugins */ "./node_modules/@wordpress/edit-post/build-module/plugins/index.js");
|
||||
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./store */ "./node_modules/@wordpress/edit-post/build-module/store/index.js");
|
||||
/* harmony import */ var _editor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./editor */ "./node_modules/@wordpress/edit-post/build-module/editor.js");
|
||||
/* harmony import */ var _components_block_settings_menu_plugin_block_settings_menu_item__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/block-settings-menu/plugin-block-settings-menu-item */ "./node_modules/@wordpress/edit-post/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginBlockSettingsMenuItem", function() { return _components_block_settings_menu_plugin_block_settings_menu_item__WEBPACK_IMPORTED_MODULE_11__["default"]; });
|
||||
|
||||
/* harmony import */ var _components_sidebar_plugin_post_publish_panel__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/sidebar/plugin-post-publish-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-publish-panel/index.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginPostPublishPanel", function() { return _components_sidebar_plugin_post_publish_panel__WEBPACK_IMPORTED_MODULE_14__["default"]; });
|
||||
/* harmony import */ var _components_sidebar_plugin_post_publish_panel__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./components/sidebar/plugin-post-publish-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-publish-panel/index.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginPostPublishPanel", function() { return _components_sidebar_plugin_post_publish_panel__WEBPACK_IMPORTED_MODULE_12__["default"]; });
|
||||
|
||||
/* harmony import */ var _components_sidebar_plugin_post_status_info__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./components/sidebar/plugin-post-status-info */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-status-info/index.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginPostStatusInfo", function() { return _components_sidebar_plugin_post_status_info__WEBPACK_IMPORTED_MODULE_15__["default"]; });
|
||||
/* harmony import */ var _components_sidebar_plugin_post_status_info__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./components/sidebar/plugin-post-status-info */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-status-info/index.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginPostStatusInfo", function() { return _components_sidebar_plugin_post_status_info__WEBPACK_IMPORTED_MODULE_13__["default"]; });
|
||||
|
||||
/* harmony import */ var _components_sidebar_plugin_pre_publish_panel__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./components/sidebar/plugin-pre-publish-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-pre-publish-panel/index.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginPrePublishPanel", function() { return _components_sidebar_plugin_pre_publish_panel__WEBPACK_IMPORTED_MODULE_16__["default"]; });
|
||||
/* harmony import */ var _components_sidebar_plugin_pre_publish_panel__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/sidebar/plugin-pre-publish-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-pre-publish-panel/index.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginPrePublishPanel", function() { return _components_sidebar_plugin_pre_publish_panel__WEBPACK_IMPORTED_MODULE_14__["default"]; });
|
||||
|
||||
/* harmony import */ var _components_sidebar_plugin_sidebar__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./components/sidebar/plugin-sidebar */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-sidebar/index.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginSidebar", function() { return _components_sidebar_plugin_sidebar__WEBPACK_IMPORTED_MODULE_17__["default"]; });
|
||||
/* harmony import */ var _components_sidebar_plugin_sidebar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./components/sidebar/plugin-sidebar */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-sidebar/index.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginSidebar", function() { return _components_sidebar_plugin_sidebar__WEBPACK_IMPORTED_MODULE_15__["default"]; });
|
||||
|
||||
/* harmony import */ var _components_header_plugin_sidebar_more_menu_item__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./components/header/plugin-sidebar-more-menu-item */ "./node_modules/@wordpress/edit-post/build-module/components/header/plugin-sidebar-more-menu-item/index.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginSidebarMoreMenuItem", function() { return _components_header_plugin_sidebar_more_menu_item__WEBPACK_IMPORTED_MODULE_18__["default"]; });
|
||||
/* harmony import */ var _components_header_plugin_sidebar_more_menu_item__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./components/header/plugin-sidebar-more-menu-item */ "./node_modules/@wordpress/edit-post/build-module/components/header/plugin-sidebar-more-menu-item/index.js");
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginSidebarMoreMenuItem", function() { return _components_header_plugin_sidebar_more_menu_item__WEBPACK_IMPORTED_MODULE_16__["default"]; });
|
||||
|
||||
|
||||
|
||||
|
@ -5199,7 +5277,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
@ -5208,7 +5285,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reinitializes the editor after the user chooses to reboot the editor after
|
||||
* an unhandled error occurs, replacing previously mounted editor element using
|
||||
|
@ -5224,7 +5300,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
function reinitializeEditor(postType, postId, target, settings, overridePost) {
|
||||
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["unmountComponentAtNode"])(target);
|
||||
var reboot = reinitializeEditor.bind(null, postType, postId, target, settings, overridePost);
|
||||
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_editor__WEBPACK_IMPORTED_MODULE_12__["default"], {
|
||||
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_editor__WEBPACK_IMPORTED_MODULE_10__["default"], {
|
||||
settings: settings,
|
||||
onError: reboot,
|
||||
postId: postId,
|
||||
|
@ -5244,8 +5320,6 @@ function reinitializeEditor(postType, postId, target, settings, overridePost) {
|
|||
* @param {Object} postId ID of the post to edit.
|
||||
* @param {?Object} settings Editor settings object.
|
||||
* @param {Object} overridePost Post properties to override.
|
||||
*
|
||||
* @return {Object} Editor interface.
|
||||
*/
|
||||
|
||||
function initializeEditor(id, postType, postId, settings, overridePost) {
|
||||
|
@ -5253,23 +5327,13 @@ function initializeEditor(id, postType, postId, settings, overridePost) {
|
|||
var reboot = reinitializeEditor.bind(null, postType, postId, target, settings, overridePost);
|
||||
Object(_wordpress_block_library__WEBPACK_IMPORTED_MODULE_5__["registerCoreBlocks"])();
|
||||
Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["dispatch"])('core/nux').triggerGuide(['core/editor.inserter', 'core/editor.settings', 'core/editor.preview', 'core/editor.publish']);
|
||||
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_editor__WEBPACK_IMPORTED_MODULE_12__["default"], {
|
||||
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_editor__WEBPACK_IMPORTED_MODULE_10__["default"], {
|
||||
settings: settings,
|
||||
onError: reboot,
|
||||
postId: postId,
|
||||
postType: postType,
|
||||
overridePost: overridePost
|
||||
}), target);
|
||||
return {
|
||||
initializeMetaBoxes: function initializeMetaBoxes(metaBoxes) {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_7___default()('editor.initializeMetaBoxes', {
|
||||
alternative: 'setActiveMetaBoxLocations action (`core/edit-post`)',
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2'
|
||||
});
|
||||
_store__WEBPACK_IMPORTED_MODULE_10__["default"].dispatch(Object(_store_actions__WEBPACK_IMPORTED_MODULE_11__["initializeMetaBoxState"])(metaBoxes));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -5480,7 +5544,7 @@ function KeyboardShortcutsHelpMenuItem(_ref) {
|
|||
/*!*************************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/edit-post/build-module/store/actions.js ***!
|
||||
\*************************************************************************/
|
||||
/*! exports provided: openGeneralSidebar, closeGeneralSidebar, openModal, closeModal, openPublishSidebar, closePublishSidebar, togglePublishSidebar, toggleEditorPanelEnabled, toggleEditorPanelOpened, toggleGeneralSidebarEditorPanel, toggleFeature, switchEditorMode, togglePinnedPluginItem, initializeMetaBoxState, setActiveMetaBoxLocations, setAvailableMetaBoxesPerLocation, requestMetaBoxUpdates, metaBoxUpdatesSuccess, setMetaBoxSavedData */
|
||||
/*! exports provided: openGeneralSidebar, closeGeneralSidebar, openModal, closeModal, openPublishSidebar, closePublishSidebar, togglePublishSidebar, toggleEditorPanelEnabled, toggleEditorPanelOpened, toggleGeneralSidebarEditorPanel, toggleFeature, switchEditorMode, togglePinnedPluginItem, setAvailableMetaBoxesPerLocation, requestMetaBoxUpdates, metaBoxUpdatesSuccess */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -5498,12 +5562,9 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toggleFeature", function() { return toggleFeature; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchEditorMode", function() { return switchEditorMode; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "togglePinnedPluginItem", function() { return togglePinnedPluginItem; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initializeMetaBoxState", function() { return initializeMetaBoxState; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setActiveMetaBoxLocations", function() { return setActiveMetaBoxLocations; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAvailableMetaBoxesPerLocation", function() { return setAvailableMetaBoxesPerLocation; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "requestMetaBoxUpdates", function() { return requestMetaBoxUpdates; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "metaBoxUpdatesSuccess", function() { return metaBoxUpdatesSuccess; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMetaBoxSavedData", function() { return setMetaBoxSavedData; });
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/deprecated */ "@wordpress/deprecated");
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/**
|
||||
|
@ -5673,24 +5734,6 @@ function togglePinnedPluginItem(pluginName) {
|
|||
pluginName: pluginName
|
||||
};
|
||||
}
|
||||
function initializeMetaBoxState() {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_0___default()('initializeMetaBoxState action (`core/edit-post`)', {
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2'
|
||||
});
|
||||
return {
|
||||
type: 'DO_NOTHING'
|
||||
};
|
||||
}
|
||||
function setActiveMetaBoxLocations() {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_0___default()('setActiveMetaBoxLocations action (`core/edit-post`)', {
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2'
|
||||
});
|
||||
return {
|
||||
type: 'DO_NOTHING'
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Returns an action object used in signaling
|
||||
* what Meta boxes are available in which location.
|
||||
|
@ -5728,25 +5771,6 @@ function metaBoxUpdatesSuccess() {
|
|||
type: 'META_BOX_UPDATES_SUCCESS'
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Returns an action object used to set the saved meta boxes data.
|
||||
* This is used to check if the meta boxes have been touched when leaving the editor.
|
||||
*
|
||||
* @param {Object} dataPerLocation Meta Boxes Data per location.
|
||||
*
|
||||
* @return {Object} Action object.
|
||||
*/
|
||||
|
||||
function setMetaBoxSavedData(dataPerLocation) {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_0___default()('setMetaBoxSavedData action (`core/edit-post`)', {
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2'
|
||||
});
|
||||
return {
|
||||
type: 'META_BOX_SET_SAVED_DATA',
|
||||
dataPerLocation: dataPerLocation
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
@ -6353,7 +6377,7 @@ var metaBoxes = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["combineRedu
|
|||
/*!***************************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/edit-post/build-module/store/selectors.js ***!
|
||||
\***************************************************************************/
|
||||
/*! exports provided: getEditorMode, isEditorSidebarOpened, isPluginSidebarOpened, getActiveGeneralSidebarName, getPreferences, getPreference, isPublishSidebarOpened, isEditorPanelEnabled, isEditorSidebarPanelOpened, isEditorPanelOpened, isModalActive, isFeatureActive, isPluginItemPinned, getMetaBoxes, getActiveMetaBoxLocations, isMetaBoxLocationVisible, isMetaBoxLocationActive, getMetaBoxesPerLocation, getAllMetaBoxes, getMetaBox, hasMetaBoxes, isSavingMetaBoxes */
|
||||
/*! exports provided: getEditorMode, isEditorSidebarOpened, isPluginSidebarOpened, getActiveGeneralSidebarName, getPreferences, getPreference, isPublishSidebarOpened, isEditorPanelEnabled, isEditorSidebarPanelOpened, isEditorPanelOpened, isModalActive, isFeatureActive, isPluginItemPinned, getActiveMetaBoxLocations, isMetaBoxLocationVisible, isMetaBoxLocationActive, getMetaBoxesPerLocation, getAllMetaBoxes, hasMetaBoxes, isSavingMetaBoxes */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -6371,13 +6395,11 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isModalActive", function() { return isModalActive; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFeatureActive", function() { return isFeatureActive; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPluginItemPinned", function() { return isPluginItemPinned; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMetaBoxes", function() { return getMetaBoxes; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActiveMetaBoxLocations", function() { return getActiveMetaBoxLocations; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMetaBoxLocationVisible", function() { return isMetaBoxLocationVisible; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMetaBoxLocationActive", function() { return isMetaBoxLocationActive; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMetaBoxesPerLocation", function() { return getMetaBoxesPerLocation; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllMetaBoxes", function() { return getAllMetaBoxes; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMetaBox", function() { return getMetaBox; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasMetaBoxes", function() { return hasMetaBoxes; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSavingMetaBoxes", function() { return isSavingMetaBoxes; });
|
||||
/* harmony import */ var rememo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rememo */ "./node_modules/rememo/es/rememo.js");
|
||||
|
@ -6574,27 +6596,6 @@ function isPluginItemPinned(state, pluginName) {
|
|||
var pinnedPluginItems = getPreference(state, 'pinnedPluginItems', {});
|
||||
return Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(pinnedPluginItems, [pluginName], true);
|
||||
}
|
||||
/**
|
||||
* Returns the state of legacy meta boxes.
|
||||
*
|
||||
* @param {Object} state Global application state.
|
||||
*
|
||||
* @return {Object} State of meta boxes.
|
||||
*/
|
||||
|
||||
function getMetaBoxes(state) {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2___default()('getMetaBox selector (`core/edit-post`)', {
|
||||
alternative: 'getActiveMetaBoxLocations selector',
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2'
|
||||
});
|
||||
return ['normal', 'side', 'advanced'].reduce(function (result, location) {
|
||||
result[location] = {
|
||||
isActive: isMetaBoxLocationActive(state, location)
|
||||
};
|
||||
return result;
|
||||
}, {});
|
||||
}
|
||||
/**
|
||||
* Returns an array of active meta box locations.
|
||||
*
|
||||
|
@ -6664,23 +6665,6 @@ var getAllMetaBoxes = Object(rememo__WEBPACK_IMPORTED_MODULE_0__["default"])(fun
|
|||
}, function (state) {
|
||||
return [state.metaBoxes.locations];
|
||||
});
|
||||
/**
|
||||
* Returns the state of legacy meta boxes.
|
||||
*
|
||||
* @param {Object} state Global application state.
|
||||
* @param {string} location Location of the meta box.
|
||||
*
|
||||
* @return {Object} State of meta box at specified location.
|
||||
*/
|
||||
|
||||
function getMetaBox(state, location) {
|
||||
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2___default()('getMetaBox selector (`core/edit-post`)', {
|
||||
alternative: 'isMetaBoxLocationActive selector',
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.2'
|
||||
});
|
||||
return getMetaBoxes(state)[location];
|
||||
}
|
||||
/**
|
||||
* Returns true if the post is using Meta Boxes
|
||||
*
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -685,7 +685,7 @@ var SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed'
|
|||
* @type {Set}
|
||||
*/
|
||||
|
||||
var BOOLEAN_ATTRIBUTES = new Set(['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch']);
|
||||
var BOOLEAN_ATTRIBUTES = new Set(['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'download', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch']);
|
||||
/**
|
||||
* Enumerated attributes are attributes which must be of a specific value form.
|
||||
* Like boolean attributes, these are meaningful if specified, even if not of a
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -565,13 +565,6 @@ function createRunHook(hooks, returnFirstArg) {
|
|||
|
||||
hooks.__current.push(hookInfo);
|
||||
|
||||
if (!hooks[hookName]) {
|
||||
hooks[hookName] = {
|
||||
runs: 0,
|
||||
handlers: []
|
||||
};
|
||||
}
|
||||
|
||||
while (hookInfo.currentIndex < handlers.length) {
|
||||
var handler = handlers[hookInfo.currentIndex];
|
||||
var result = handler.callback.apply(null, args);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -545,7 +545,7 @@ function (_Component) {
|
|||
disabled: !file || isLoading,
|
||||
isDefault: true,
|
||||
className: "list-reusable-blocks-import-form__button"
|
||||
}, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Import')));
|
||||
}, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["_x"])('Import', 'button label')));
|
||||
}
|
||||
}]);
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,813 @@
|
|||
this["wp"] = this["wp"] || {}; this["wp"]["notices"] =
|
||||
/******/ (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
|
||||
/******/ return __webpack_require__(__webpack_require__.s = "./node_modules/@wordpress/notices/build/index.js");
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
|
||||
/*!******************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
|
||||
\******************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _arrayWithoutHoles(arr) {
|
||||
if (Array.isArray(arr)) {
|
||||
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
||||
arr2[i] = arr[i];
|
||||
}
|
||||
|
||||
return arr2;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _arrayWithoutHoles;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js":
|
||||
/*!***************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
|
||||
\***************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
module.exports = _defineProperty;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js":
|
||||
/*!**********************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
|
||||
\**********************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = _interopRequireDefault;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/interopRequireWildcard.js":
|
||||
/*!***********************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/interopRequireWildcard.js ***!
|
||||
\***********************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {};
|
||||
|
||||
if (obj != null) {
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
newObj.default = obj;
|
||||
return newObj;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _interopRequireWildcard;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js":
|
||||
/*!****************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
|
||||
\****************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _iterableToArray(iter) {
|
||||
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
||||
}
|
||||
|
||||
module.exports = _iterableToArray;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js":
|
||||
/*!******************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
|
||||
\******************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _nonIterableSpread() {
|
||||
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
||||
}
|
||||
|
||||
module.exports = _nonIterableSpread;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/objectSpread.js":
|
||||
/*!*************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/objectSpread.js ***!
|
||||
\*************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var defineProperty = __webpack_require__(/*! ./defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
}));
|
||||
}
|
||||
|
||||
ownKeys.forEach(function (key) {
|
||||
defineProperty(target, key, source[key]);
|
||||
});
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
module.exports = _objectSpread;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js":
|
||||
/*!******************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
|
||||
\******************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js");
|
||||
|
||||
var iterableToArray = __webpack_require__(/*! ./iterableToArray */ "./node_modules/@babel/runtime/helpers/iterableToArray.js");
|
||||
|
||||
var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js");
|
||||
|
||||
function _toConsumableArray(arr) {
|
||||
return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();
|
||||
}
|
||||
|
||||
module.exports = _toConsumableArray;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/notices/build/index.js":
|
||||
/*!********************************************************!*\
|
||||
!*** ./node_modules/@wordpress/notices/build/index.js ***!
|
||||
\********************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
__webpack_require__(/*! ./store */ "./node_modules/@wordpress/notices/build/store/index.js");
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/notices/build/store/actions.js":
|
||||
/*!****************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/notices/build/store/actions.js ***!
|
||||
\****************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createNotice = createNotice;
|
||||
exports.createSuccessNotice = createSuccessNotice;
|
||||
exports.createInfoNotice = createInfoNotice;
|
||||
exports.createErrorNotice = createErrorNotice;
|
||||
exports.createWarningNotice = createWarningNotice;
|
||||
exports.removeNotice = removeNotice;
|
||||
|
||||
var _lodash = __webpack_require__(/*! lodash */ "lodash");
|
||||
|
||||
var _constants = __webpack_require__(/*! ./constants */ "./node_modules/@wordpress/notices/build/store/constants.js");
|
||||
|
||||
var _marked =
|
||||
/*#__PURE__*/
|
||||
regeneratorRuntime.mark(createNotice);
|
||||
|
||||
/**
|
||||
* Yields action objects used in signalling that a notice is to be created.
|
||||
*
|
||||
* @param {?string} status Notice status.
|
||||
* Defaults to `info`.
|
||||
* @param {string} content Notice message.
|
||||
* @param {?Object} options Notice options.
|
||||
* @param {?string} options.context Context under which to
|
||||
* group notice.
|
||||
* @param {?string} options.id Identifier for notice.
|
||||
* Automatically assigned
|
||||
* if not specified.
|
||||
* @param {?boolean} options.isDismissible Whether the notice can
|
||||
* be dismissed by user.
|
||||
* Defaults to `true`.
|
||||
* @param {?Array<WPNoticeAction>} options.actions User actions to be
|
||||
* presented with notice.
|
||||
*/
|
||||
function createNotice() {
|
||||
var status,
|
||||
content,
|
||||
options,
|
||||
_options$isDismissibl,
|
||||
isDismissible,
|
||||
_options$context,
|
||||
context,
|
||||
_options$id,
|
||||
id,
|
||||
_options$actions,
|
||||
actions,
|
||||
_args = arguments;
|
||||
|
||||
return regeneratorRuntime.wrap(function createNotice$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
status = _args.length > 0 && _args[0] !== undefined ? _args[0] : 'info';
|
||||
content = _args.length > 1 ? _args[1] : undefined;
|
||||
options = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
|
||||
_options$isDismissibl = options.isDismissible, isDismissible = _options$isDismissibl === void 0 ? true : _options$isDismissibl, _options$context = options.context, context = _options$context === void 0 ? _constants.DEFAULT_CONTEXT : _options$context, _options$id = options.id, id = _options$id === void 0 ? (0, _lodash.uniqueId)(context) : _options$id, _options$actions = options.actions, actions = _options$actions === void 0 ? [] : _options$actions;
|
||||
_context.next = 6;
|
||||
return {
|
||||
type: 'SPEAK',
|
||||
message: content
|
||||
};
|
||||
|
||||
case 6:
|
||||
_context.next = 8;
|
||||
return {
|
||||
type: 'CREATE_NOTICE',
|
||||
context: context,
|
||||
notice: {
|
||||
id: id,
|
||||
status: status,
|
||||
content: content,
|
||||
isDismissible: isDismissible,
|
||||
actions: actions
|
||||
}
|
||||
};
|
||||
|
||||
case 8:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _marked, this);
|
||||
}
|
||||
/**
|
||||
* Returns an action object used in signalling that a success notice is to be
|
||||
* created. Refer to `createNotice` for options documentation.
|
||||
*
|
||||
* @see createNotice
|
||||
*
|
||||
* @param {string} content Notice message.
|
||||
* @param {?Object} options Optional notice options.
|
||||
*
|
||||
* @return {Object} Action object.
|
||||
*/
|
||||
|
||||
|
||||
function createSuccessNotice(content, options) {
|
||||
return createNotice('success', content, options);
|
||||
}
|
||||
/**
|
||||
* Returns an action object used in signalling that an info notice is to be
|
||||
* created. Refer to `createNotice` for options documentation.
|
||||
*
|
||||
* @see createNotice
|
||||
*
|
||||
* @param {string} content Notice message.
|
||||
* @param {?Object} options Optional notice options.
|
||||
*
|
||||
* @return {Object} Action object.
|
||||
*/
|
||||
|
||||
|
||||
function createInfoNotice(content, options) {
|
||||
return createNotice('info', content, options);
|
||||
}
|
||||
/**
|
||||
* Returns an action object used in signalling that an error notice is to be
|
||||
* created. Refer to `createNotice` for options documentation.
|
||||
*
|
||||
* @see createNotice
|
||||
*
|
||||
* @param {string} content Notice message.
|
||||
* @param {?Object} options Optional notice options.
|
||||
*
|
||||
* @return {Object} Action object.
|
||||
*/
|
||||
|
||||
|
||||
function createErrorNotice(content, options) {
|
||||
return createNotice('error', content, options);
|
||||
}
|
||||
/**
|
||||
* Returns an action object used in signalling that a warning notice is to be
|
||||
* created. Refer to `createNotice` for options documentation.
|
||||
*
|
||||
* @see createNotice
|
||||
*
|
||||
* @param {string} content Notice message.
|
||||
* @param {?Object} options Optional notice options.
|
||||
*
|
||||
* @return {Object} Action object.
|
||||
*/
|
||||
|
||||
|
||||
function createWarningNotice(content, options) {
|
||||
return createNotice('warning', content, options);
|
||||
}
|
||||
/**
|
||||
* Returns an action object used in signalling that a notice is to be removed.
|
||||
*
|
||||
* @param {string} id Notice unique identifier.
|
||||
* @param {?string} context Optional context (grouping) in which the notice is
|
||||
* intended to appear. Defaults to default context.
|
||||
*
|
||||
* @return {Object} Action object.
|
||||
*/
|
||||
|
||||
|
||||
function removeNotice(id) {
|
||||
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.DEFAULT_CONTEXT;
|
||||
return {
|
||||
type: 'REMOVE_NOTICE',
|
||||
id: id,
|
||||
context: context
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/notices/build/store/constants.js":
|
||||
/*!******************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/notices/build/store/constants.js ***!
|
||||
\******************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.DEFAULT_CONTEXT = void 0;
|
||||
|
||||
/**
|
||||
* Default context to use for notice grouping when not otherwise specified. Its
|
||||
* specific value doesn't hold much meaning, but it must be reasonably unique
|
||||
* and, more importantly, referenced consistently in the store implementation.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
var DEFAULT_CONTEXT = 'global';
|
||||
exports.DEFAULT_CONTEXT = DEFAULT_CONTEXT;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/notices/build/store/controls.js":
|
||||
/*!*****************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/notices/build/store/controls.js ***!
|
||||
\*****************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _a11y = __webpack_require__(/*! @wordpress/a11y */ "@wordpress/a11y");
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
var _default = {
|
||||
SPEAK: function SPEAK(action) {
|
||||
(0, _a11y.speak)(action.message, 'assertive');
|
||||
}
|
||||
};
|
||||
exports.default = _default;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/notices/build/store/index.js":
|
||||
/*!**************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/notices/build/store/index.js ***!
|
||||
\**************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "./node_modules/@babel/runtime/helpers/interopRequireWildcard.js");
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _data = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||
|
||||
var _reducer = _interopRequireDefault(__webpack_require__(/*! ./reducer */ "./node_modules/@wordpress/notices/build/store/reducer.js"));
|
||||
|
||||
var actions = _interopRequireWildcard(__webpack_require__(/*! ./actions */ "./node_modules/@wordpress/notices/build/store/actions.js"));
|
||||
|
||||
var selectors = _interopRequireWildcard(__webpack_require__(/*! ./selectors */ "./node_modules/@wordpress/notices/build/store/selectors.js"));
|
||||
|
||||
var _controls = _interopRequireDefault(__webpack_require__(/*! ./controls */ "./node_modules/@wordpress/notices/build/store/controls.js"));
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
var _default = (0, _data.registerStore)('core/notices', {
|
||||
reducer: _reducer.default,
|
||||
actions: actions,
|
||||
selectors: selectors,
|
||||
controls: _controls.default
|
||||
});
|
||||
|
||||
exports.default = _default;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/notices/build/store/reducer.js":
|
||||
/*!****************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/notices/build/store/reducer.js ***!
|
||||
\****************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"));
|
||||
|
||||
var _lodash = __webpack_require__(/*! lodash */ "lodash");
|
||||
|
||||
var _onSubKey = _interopRequireDefault(__webpack_require__(/*! ./utils/on-sub-key */ "./node_modules/@wordpress/notices/build/store/utils/on-sub-key.js"));
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Reducer returning the next notices state. The notices state is an object
|
||||
* where each key is a context, its value an array of notice objects.
|
||||
*
|
||||
* @param {Object} state Current state.
|
||||
* @param {Object} action Dispatched action.
|
||||
*
|
||||
* @return {Object} Updated state.
|
||||
*/
|
||||
var notices = (0, _onSubKey.default)('context')(function () {
|
||||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
||||
var action = arguments.length > 1 ? arguments[1] : undefined;
|
||||
|
||||
switch (action.type) {
|
||||
case 'CREATE_NOTICE':
|
||||
// Avoid duplicates on ID.
|
||||
return (0, _toConsumableArray2.default)((0, _lodash.reject)(state, {
|
||||
id: action.notice.id
|
||||
})).concat([action.notice]);
|
||||
|
||||
case 'REMOVE_NOTICE':
|
||||
return (0, _lodash.reject)(state, {
|
||||
id: action.id
|
||||
});
|
||||
}
|
||||
|
||||
return state;
|
||||
});
|
||||
var _default = notices;
|
||||
exports.default = _default;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/notices/build/store/selectors.js":
|
||||
/*!******************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/notices/build/store/selectors.js ***!
|
||||
\******************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getNotices = getNotices;
|
||||
|
||||
var _constants = __webpack_require__(/*! ./constants */ "./node_modules/@wordpress/notices/build/store/constants.js");
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* The default empty set of notices to return when there are no notices
|
||||
* assigned for a given notices context. This can occur if the getNotices
|
||||
* selector is called without a notice ever having been created for the
|
||||
* context. A shared value is used to ensure referential equality between
|
||||
* sequential selector calls, since otherwise `[] !== []`.
|
||||
*
|
||||
* @type {Array}
|
||||
*/
|
||||
var DEFAULT_NOTICES = [];
|
||||
/**
|
||||
* Notice object.
|
||||
*
|
||||
* @property {string} id Unique identifier of notice.
|
||||
* @property {string} status Status of notice, one of `success`,
|
||||
* `info`, `error`, or `warning`. Defaults
|
||||
* to `info`.
|
||||
* @property {string} content Notice message.
|
||||
* @property {boolean} isDismissible Whether the notice can be dismissed by
|
||||
* user. Defaults to `true`.
|
||||
* @property {WPNoticeAction[]} actions User actions to present with notice.
|
||||
*
|
||||
* @typedef {Notice}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Object describing a user action option associated with a notice.
|
||||
*
|
||||
* @property {string} label Message to use as action label.
|
||||
* @property {?string} url Optional URL of resource if action incurs
|
||||
* browser navigation.
|
||||
* @property {?Function} callback Optional function to invoke when action is
|
||||
* triggered by user.
|
||||
*
|
||||
* @typedef {WPNoticeAction}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns all notices as an array, optionally for a given context. Defaults to
|
||||
* the global context.
|
||||
*
|
||||
* @param {Object} state Notices state.
|
||||
* @param {?string} context Optional grouping context.
|
||||
*
|
||||
* @return {Notice[]} Array of notices.
|
||||
*/
|
||||
|
||||
function getNotices(state) {
|
||||
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.DEFAULT_CONTEXT;
|
||||
return state[context] || DEFAULT_NOTICES;
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@wordpress/notices/build/store/utils/on-sub-key.js":
|
||||
/*!*************************************************************************!*\
|
||||
!*** ./node_modules/@wordpress/notices/build/store/utils/on-sub-key.js ***!
|
||||
\*************************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.onSubKey = void 0;
|
||||
|
||||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js"));
|
||||
|
||||
var _objectSpread3 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread */ "./node_modules/@babel/runtime/helpers/objectSpread.js"));
|
||||
|
||||
/**
|
||||
* Higher-order reducer creator which creates a combined reducer object, keyed
|
||||
* by a property on the action object.
|
||||
*
|
||||
* @param {string} actionProperty Action property by which to key object.
|
||||
*
|
||||
* @return {Function} Higher-order reducer.
|
||||
*/
|
||||
var onSubKey = function onSubKey(actionProperty) {
|
||||
return function (reducer) {
|
||||
return function () {
|
||||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
var action = arguments.length > 1 ? arguments[1] : undefined;
|
||||
// Retrieve subkey from action. Do not track if undefined; useful for cases
|
||||
// where reducer is scoped by action shape.
|
||||
var key = action[actionProperty];
|
||||
|
||||
if (key === undefined) {
|
||||
return state;
|
||||
} // Avoid updating state if unchanged. Note that this also accounts for a
|
||||
// reducer which returns undefined on a key which is not yet tracked.
|
||||
|
||||
|
||||
var nextKeyState = reducer(state[key], action);
|
||||
|
||||
if (nextKeyState === state[key]) {
|
||||
return state;
|
||||
}
|
||||
|
||||
return (0, _objectSpread3.default)({}, state, (0, _defineProperty2.default)({}, key, nextKeyState));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
exports.onSubKey = onSubKey;
|
||||
var _default = onSubKey;
|
||||
exports.default = _default;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/a11y":
|
||||
/*!***************************************!*\
|
||||
!*** external {"this":["wp","a11y"]} ***!
|
||||
\***************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["a11y"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/data":
|
||||
/*!***************************************!*\
|
||||
!*** external {"this":["wp","data"]} ***!
|
||||
\***************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["data"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "lodash":
|
||||
/*!*************************!*\
|
||||
!*** external "lodash" ***!
|
||||
\*************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["lodash"]; }());
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
//# sourceMappingURL=notices.js.map
|
File diff suppressed because one or more lines are too long
|
@ -335,6 +335,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/deprecated */ "@wordpress/deprecated");
|
||||
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -345,6 +347,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
function getAnchorRect(anchor) {
|
||||
// The default getAnchorRect() excludes an element's top and bottom padding
|
||||
// from its calculation. We want tips to point to the outer margin of an
|
||||
|
@ -389,19 +392,30 @@ function DotTip(_ref) {
|
|||
}));
|
||||
}
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select, _ref2) {
|
||||
var id = _ref2.id;
|
||||
var tipId = _ref2.tipId,
|
||||
id = _ref2.id;
|
||||
|
||||
if (id) {
|
||||
tipId = id;
|
||||
Object(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__["deprecated"])('The id prop of wp.nux.DotTip', {
|
||||
plugin: 'Gutenberg',
|
||||
version: '4.4',
|
||||
alternative: 'the tipId prop'
|
||||
});
|
||||
}
|
||||
|
||||
var _select = select('core/nux'),
|
||||
isTipVisible = _select.isTipVisible,
|
||||
getAssociatedGuide = _select.getAssociatedGuide;
|
||||
|
||||
var associatedGuide = getAssociatedGuide(id);
|
||||
var associatedGuide = getAssociatedGuide(tipId);
|
||||
return {
|
||||
isVisible: isTipVisible(id),
|
||||
isVisible: isTipVisible(tipId),
|
||||
hasNextTip: !!(associatedGuide && associatedGuide.nextTipId)
|
||||
};
|
||||
}), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withDispatch"])(function (dispatch, _ref3) {
|
||||
var id = _ref3.id;
|
||||
var tipId = _ref3.tipId,
|
||||
id = _ref3.id;
|
||||
|
||||
var _dispatch = dispatch('core/nux'),
|
||||
dismissTip = _dispatch.dismissTip,
|
||||
|
@ -409,7 +423,7 @@ function DotTip(_ref) {
|
|||
|
||||
return {
|
||||
onDismiss: function onDismiss() {
|
||||
dismissTip(id);
|
||||
dismissTip(tipId || id);
|
||||
},
|
||||
onDisable: function onDisable() {
|
||||
disableTips();
|
||||
|
@ -1101,6 +1115,17 @@ function isShallowEqual( a, b, fromIndex ) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/deprecated":
|
||||
/*!*********************************************!*\
|
||||
!*** external {"this":["wp","deprecated"]} ***!
|
||||
\*********************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["deprecated"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/element":
|
||||
/*!******************************************!*\
|
||||
!*** external {"this":["wp","element"]} ***!
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -151,15 +151,19 @@ function _objectSpread(target) {
|
|||
/*!***********************************************************!*\
|
||||
!*** ./node_modules/@wordpress/url/build-module/index.js ***!
|
||||
\***********************************************************/
|
||||
/*! exports provided: isURL, addQueryArgs, prependHTTP, safeDecodeURI */
|
||||
/*! exports provided: isURL, addQueryArgs, getQueryArg, hasQueryArg, removeQueryArgs, prependHTTP, safeDecodeURI, filterURLForDisplay */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isURL", function() { return isURL; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addQueryArgs", function() { return addQueryArgs; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getQueryArg", function() { return getQueryArg; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasQueryArg", function() { return hasQueryArg; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeQueryArgs", function() { return removeQueryArgs; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prependHTTP", function() { return prependHTTP; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "safeDecodeURI", function() { return safeDecodeURI; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterURLForDisplay", function() { return filterURLForDisplay; });
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js");
|
||||
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ "./node_modules/qs/lib/index.js");
|
||||
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
|
||||
|
@ -186,10 +190,10 @@ function isURL(url) {
|
|||
/**
|
||||
* Appends arguments to the query string of the url
|
||||
*
|
||||
* @param {string} url URL
|
||||
* @param {Object} args Query Args
|
||||
* @param {string} url URL
|
||||
* @param {Object} args Query Args
|
||||
*
|
||||
* @return {string} Updated URL
|
||||
* @return {string} Updated URL
|
||||
*/
|
||||
|
||||
function addQueryArgs(url, args) {
|
||||
|
@ -198,6 +202,55 @@ function addQueryArgs(url, args) {
|
|||
var baseUrl = queryStringIndex !== -1 ? url.substr(0, queryStringIndex) : url;
|
||||
return baseUrl + '?' + Object(qs__WEBPACK_IMPORTED_MODULE_1__["stringify"])(Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, query, args));
|
||||
}
|
||||
/**
|
||||
* Returns a single query argument of the url
|
||||
*
|
||||
* @param {string} url URL
|
||||
* @param {string} arg Query arg name
|
||||
*
|
||||
* @return {Array|string} Query arg value.
|
||||
*/
|
||||
|
||||
function getQueryArg(url, arg) {
|
||||
var queryStringIndex = url.indexOf('?');
|
||||
var query = queryStringIndex !== -1 ? Object(qs__WEBPACK_IMPORTED_MODULE_1__["parse"])(url.substr(queryStringIndex + 1)) : {};
|
||||
return query[arg];
|
||||
}
|
||||
/**
|
||||
* Determines whether the URL contains a given query arg.
|
||||
*
|
||||
* @param {string} url URL
|
||||
* @param {string} arg Query arg name
|
||||
*
|
||||
* @return {boolean} Whether or not the URL contains the query aeg.
|
||||
*/
|
||||
|
||||
function hasQueryArg(url, arg) {
|
||||
return getQueryArg(url, arg) !== undefined;
|
||||
}
|
||||
/**
|
||||
* Removes arguments from the query string of the url
|
||||
*
|
||||
* @param {string} url URL
|
||||
* @param {...string} args Query Args
|
||||
*
|
||||
* @return {string} Updated URL
|
||||
*/
|
||||
|
||||
function removeQueryArgs(url) {
|
||||
var queryStringIndex = url.indexOf('?');
|
||||
var query = queryStringIndex !== -1 ? Object(qs__WEBPACK_IMPORTED_MODULE_1__["parse"])(url.substr(queryStringIndex + 1)) : {};
|
||||
var baseUrl = queryStringIndex !== -1 ? url.substr(0, queryStringIndex) : url;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
args.forEach(function (arg) {
|
||||
return delete query[arg];
|
||||
});
|
||||
return baseUrl + '?' + Object(qs__WEBPACK_IMPORTED_MODULE_1__["stringify"])(query);
|
||||
}
|
||||
/**
|
||||
* Prepends "http://" to a url, if it looks like something that is meant to be a TLD.
|
||||
*
|
||||
|
@ -229,6 +282,24 @@ function safeDecodeURI(uri) {
|
|||
return uri;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Returns a URL for display.
|
||||
*
|
||||
* @param {string} url Original URL.
|
||||
*
|
||||
* @return {string} Displayed URL.
|
||||
*/
|
||||
|
||||
function filterURLForDisplay(url) {
|
||||
// Remove protocol and www prefixes.
|
||||
var filteredURL = url.replace(/^(?:https?:)\/\/(?:www\.)?/, ''); // Ends with / and only has that single slash, strip it.
|
||||
|
||||
if (filteredURL.match(/^[^\/]+\/$/)) {
|
||||
return filteredURL.replace('/', '');
|
||||
}
|
||||
|
||||
return filteredURL;
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -264,9 +264,12 @@ function matchCharacters(text, regex, settings) {
|
|||
|
||||
|
||||
function count(text, type, userSettings) {
|
||||
var settings = loadSettings(type, userSettings);
|
||||
if ('' === text) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (text) {
|
||||
var settings = loadSettings(type, userSettings);
|
||||
var matchRegExp = settings[type + 'RegExp'];
|
||||
var results = 'words' === settings.type ? matchWords(text, matchRegExp, settings) : matchCharacters(text, matchRegExp, settings);
|
||||
return results ? results.length : 0;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-beta1-43840';
|
||||
$wp_version = '5.0-beta1-43841';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue