Block Editor: Upgrade @WordPress packages to the latest version (4.7.1)
Updated packages: - @wordpress/block-library@2.2.11 - @wordpress/edit-post@3.1.6 - @wordpress/editor@9.0.6 - @wordpress/format-library@1.2.9 Props youknowriad, pento. Merges [44287] to trunk. Fixes #45637. Built from https://develop.svn.wordpress.org/trunk@44319 git-svn-id: http://core.svn.wordpress.org/trunk@44149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
11c11199d9
commit
413050b191
|
@ -7883,8 +7883,9 @@ __webpack_require__.d(selectors_namespaceObject, "isEditedPostDateFloating", fun
|
||||||
__webpack_require__.d(selectors_namespaceObject, "getBlockDependantsCacheBust", function() { return getBlockDependantsCacheBust; });
|
__webpack_require__.d(selectors_namespaceObject, "getBlockDependantsCacheBust", function() { return getBlockDependantsCacheBust; });
|
||||||
__webpack_require__.d(selectors_namespaceObject, "getBlockName", function() { return selectors_getBlockName; });
|
__webpack_require__.d(selectors_namespaceObject, "getBlockName", function() { return selectors_getBlockName; });
|
||||||
__webpack_require__.d(selectors_namespaceObject, "isBlockValid", function() { return selectors_isBlockValid; });
|
__webpack_require__.d(selectors_namespaceObject, "isBlockValid", function() { return selectors_isBlockValid; });
|
||||||
__webpack_require__.d(selectors_namespaceObject, "getBlockAttributes", function() { return selectors_getBlockAttributes; });
|
__webpack_require__.d(selectors_namespaceObject, "getBlockAttributes", function() { return getBlockAttributes; });
|
||||||
__webpack_require__.d(selectors_namespaceObject, "getBlock", function() { return selectors_getBlock; });
|
__webpack_require__.d(selectors_namespaceObject, "getBlock", function() { return selectors_getBlock; });
|
||||||
|
__webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithoutInnerBlocks", function() { return selectors_unstableGetBlockWithoutInnerBlocks; });
|
||||||
__webpack_require__.d(selectors_namespaceObject, "getBlocks", function() { return selectors_getBlocks; });
|
__webpack_require__.d(selectors_namespaceObject, "getBlocks", function() { return selectors_getBlocks; });
|
||||||
__webpack_require__.d(selectors_namespaceObject, "getClientIdsOfDescendants", function() { return selectors_getClientIdsOfDescendants; });
|
__webpack_require__.d(selectors_namespaceObject, "getClientIdsOfDescendants", function() { return selectors_getClientIdsOfDescendants; });
|
||||||
__webpack_require__.d(selectors_namespaceObject, "getClientIdsWithDescendants", function() { return getClientIdsWithDescendants; });
|
__webpack_require__.d(selectors_namespaceObject, "getClientIdsWithDescendants", function() { return getClientIdsWithDescendants; });
|
||||||
|
@ -11088,7 +11089,7 @@ function selectors_isBlockValid(state, clientId) {
|
||||||
* @return {Object?} Block attributes.
|
* @return {Object?} Block attributes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var selectors_getBlockAttributes = Object(rememo["a" /* default */])(function (state, clientId) {
|
var getBlockAttributes = Object(rememo["a" /* default */])(function (state, clientId) {
|
||||||
var block = state.editor.present.blocks.byClientId[clientId];
|
var block = state.editor.present.blocks.byClientId[clientId];
|
||||||
|
|
||||||
if (!block) {
|
if (!block) {
|
||||||
|
@ -11140,11 +11141,24 @@ var selectors_getBlock = Object(rememo["a" /* default */])(function (state, clie
|
||||||
}
|
}
|
||||||
|
|
||||||
return Object(objectSpread["a" /* default */])({}, block, {
|
return Object(objectSpread["a" /* default */])({}, block, {
|
||||||
attributes: selectors_getBlockAttributes(state, clientId),
|
attributes: getBlockAttributes(state, clientId),
|
||||||
innerBlocks: selectors_getBlocks(state, clientId)
|
innerBlocks: selectors_getBlocks(state, clientId)
|
||||||
});
|
});
|
||||||
}, function (state, clientId) {
|
}, function (state, clientId) {
|
||||||
return [state.editor.present.blocks.byClientId[clientId], getBlockDependantsCacheBust(state, clientId)].concat(Object(toConsumableArray["a" /* default */])(selectors_getBlockAttributes.getDependants(state, clientId)));
|
return [state.editor.present.blocks.byClientId[clientId], getBlockDependantsCacheBust(state, clientId)].concat(Object(toConsumableArray["a" /* default */])(getBlockAttributes.getDependants(state, clientId)));
|
||||||
|
});
|
||||||
|
var selectors_unstableGetBlockWithoutInnerBlocks = Object(rememo["a" /* default */])(function (state, clientId) {
|
||||||
|
var block = state.editor.present.blocks.byClientId[clientId];
|
||||||
|
|
||||||
|
if (!block) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Object(objectSpread["a" /* default */])({}, block, {
|
||||||
|
attributes: getBlockAttributes(state, clientId)
|
||||||
|
});
|
||||||
|
}, function (state, clientId) {
|
||||||
|
return [state.editor.present.blocks.byClientId[clientId]].concat(Object(toConsumableArray["a" /* default */])(getBlockAttributes.getDependants(state, clientId)));
|
||||||
});
|
});
|
||||||
|
|
||||||
function getPostMeta(state, key) {
|
function getPostMeta(state, key) {
|
||||||
|
@ -19052,9 +19066,6 @@ var applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (sel
|
||||||
|
|
||||||
var _select = select('core/editor'),
|
var _select = select('core/editor'),
|
||||||
isBlockSelected = _select.isBlockSelected,
|
isBlockSelected = _select.isBlockSelected,
|
||||||
getBlockName = _select.getBlockName,
|
|
||||||
isBlockValid = _select.isBlockValid,
|
|
||||||
getBlockAttributes = _select.getBlockAttributes,
|
|
||||||
isAncestorMultiSelected = _select.isAncestorMultiSelected,
|
isAncestorMultiSelected = _select.isAncestorMultiSelected,
|
||||||
isBlockMultiSelected = _select.isBlockMultiSelected,
|
isBlockMultiSelected = _select.isBlockMultiSelected,
|
||||||
isFirstMultiSelectedBlock = _select.isFirstMultiSelectedBlock,
|
isFirstMultiSelectedBlock = _select.isFirstMultiSelectedBlock,
|
||||||
|
@ -19069,7 +19080,10 @@ var applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (sel
|
||||||
hasSelectedInnerBlock = _select.hasSelectedInnerBlock,
|
hasSelectedInnerBlock = _select.hasSelectedInnerBlock,
|
||||||
getTemplateLock = _select.getTemplateLock,
|
getTemplateLock = _select.getTemplateLock,
|
||||||
getPreviousBlockClientId = _select.getPreviousBlockClientId,
|
getPreviousBlockClientId = _select.getPreviousBlockClientId,
|
||||||
getNextBlockClientId = _select.getNextBlockClientId;
|
getNextBlockClientId = _select.getNextBlockClientId,
|
||||||
|
__unstableGetBlockWithoutInnerBlocks = _select.__unstableGetBlockWithoutInnerBlocks;
|
||||||
|
|
||||||
|
var block = __unstableGetBlockWithoutInnerBlocks(clientId);
|
||||||
|
|
||||||
var isSelected = isBlockSelected(clientId);
|
var isSelected = isBlockSelected(clientId);
|
||||||
|
|
||||||
|
@ -19078,9 +19092,15 @@ var applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (sel
|
||||||
focusMode = _getEditorSettings.focusMode;
|
focusMode = _getEditorSettings.focusMode;
|
||||||
|
|
||||||
var templateLock = getTemplateLock(rootClientId);
|
var templateLock = getTemplateLock(rootClientId);
|
||||||
var isParentOfSelectedBlock = hasSelectedInnerBlock(clientId, true);
|
var isParentOfSelectedBlock = hasSelectedInnerBlock(clientId, true); // The fallback to `{}` is a temporary fix.
|
||||||
var name = getBlockName(clientId);
|
// This function should never be called when a block is not present in the state.
|
||||||
var attributes = getBlockAttributes(clientId);
|
// It happens now because the order in withSelect rendering is not correct.
|
||||||
|
|
||||||
|
var _ref3 = block || {},
|
||||||
|
name = _ref3.name,
|
||||||
|
attributes = _ref3.attributes,
|
||||||
|
isValid = _ref3.isValid;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isPartOfMultiSelection: isBlockMultiSelected(clientId) || isAncestorMultiSelected(clientId),
|
isPartOfMultiSelection: isBlockMultiSelected(clientId) || isAncestorMultiSelected(clientId),
|
||||||
isFirstMultiSelected: isFirstMultiSelectedBlock(clientId),
|
isFirstMultiSelected: isFirstMultiSelectedBlock(clientId),
|
||||||
|
@ -19097,13 +19117,17 @@ var applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (sel
|
||||||
name: name,
|
name: name,
|
||||||
attributes: attributes
|
attributes: attributes
|
||||||
}),
|
}),
|
||||||
isValid: isBlockValid(clientId),
|
|
||||||
isMovable: 'all' !== templateLock,
|
isMovable: 'all' !== templateLock,
|
||||||
isLocked: !!templateLock,
|
isLocked: !!templateLock,
|
||||||
isFocusMode: focusMode && isLargeViewport,
|
isFocusMode: focusMode && isLargeViewport,
|
||||||
hasFixedToolbar: hasFixedToolbar && isLargeViewport,
|
hasFixedToolbar: hasFixedToolbar && isLargeViewport,
|
||||||
|
// Users of the editor.BlockListBlock filter used to be able to access the block prop
|
||||||
|
// Ideally these blocks would rely on the clientId prop only.
|
||||||
|
// This is kept for backward compatibility reasons.
|
||||||
|
block: block,
|
||||||
name: name,
|
name: name,
|
||||||
attributes: attributes,
|
attributes: attributes,
|
||||||
|
isValid: isValid,
|
||||||
isSelected: isSelected,
|
isSelected: isSelected,
|
||||||
isParentOfSelectedBlock: isParentOfSelectedBlock,
|
isParentOfSelectedBlock: isParentOfSelectedBlock,
|
||||||
// We only care about these selectors when events are triggered.
|
// We only care about these selectors when events are triggered.
|
||||||
|
@ -19112,8 +19136,8 @@ var applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (sel
|
||||||
getNextBlockClientId: getNextBlockClientId
|
getNextBlockClientId: getNextBlockClientId
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
var applyWithDispatch = Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps, _ref3) {
|
var applyWithDispatch = Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps, _ref4) {
|
||||||
var select = _ref3.select;
|
var select = _ref4.select;
|
||||||
|
|
||||||
var _select2 = select('core/editor'),
|
var _select2 = select('core/editor'),
|
||||||
getBlockSelectionStart = _select2.getBlockSelectionStart;
|
getBlockSelectionStart = _select2.getBlockSelectionStart;
|
||||||
|
@ -19178,9 +19202,9 @@ var applyWithDispatch = Object(external_this_wp_data_["withDispatch"])(function
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
/* harmony default export */ var block_list_block = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_components_["withFilters"])('editor.BlockListBlock'), Object(external_this_wp_viewport_["withViewportMatch"])({
|
/* harmony default export */ var block_list_block = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_viewport_["withViewportMatch"])({
|
||||||
isLargeViewport: 'medium'
|
isLargeViewport: 'medium'
|
||||||
}), applyWithSelect, applyWithDispatch, Object(external_this_wp_components_["withFilters"])('editor.__experimentalBlockListBlock'))(block_BlockListBlock));
|
}), applyWithSelect, applyWithDispatch, Object(external_this_wp_components_["withFilters"])('editor.BlockListBlock'))(block_BlockListBlock));
|
||||||
|
|
||||||
// EXTERNAL MODULE: external {"this":["wp","htmlEntities"]}
|
// EXTERNAL MODULE: external {"this":["wp","htmlEntities"]}
|
||||||
var external_this_wp_htmlEntities_ = __webpack_require__(49);
|
var external_this_wp_htmlEntities_ = __webpack_require__(49);
|
||||||
|
@ -33178,7 +33202,7 @@ function addAssignedAlign(props, blockType, attributes) {
|
||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/align/addAttribute', addAttribute);
|
Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/align/addAttribute', addAttribute);
|
||||||
Object(external_this_wp_hooks_["addFilter"])('editor.__experimentalBlockListBlock', 'core/editor/align/with-data-align', withDataAlign);
|
Object(external_this_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/editor/align/with-data-align', withDataAlign);
|
||||||
Object(external_this_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/align/with-toolbar-controls', withToolbarControls);
|
Object(external_this_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/align/with-toolbar-controls', withToolbarControls);
|
||||||
Object(external_this_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/align/addAssignedAlign', addAssignedAlign);
|
Object(external_this_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/align/addAssignedAlign', addAssignedAlign);
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -229,7 +229,7 @@ function wp_default_packages_scripts( &$scripts ) {
|
||||||
'annotations' => '1.0.4',
|
'annotations' => '1.0.4',
|
||||||
'autop' => '2.0.2',
|
'autop' => '2.0.2',
|
||||||
'blob' => '2.1.0',
|
'blob' => '2.1.0',
|
||||||
'block-library' => '2.2.10',
|
'block-library' => '2.2.11',
|
||||||
'block-serialization-default-parser' => '2.0.2',
|
'block-serialization-default-parser' => '2.0.2',
|
||||||
'blocks' => '6.0.4',
|
'blocks' => '6.0.4',
|
||||||
'components' => '7.0.4',
|
'components' => '7.0.4',
|
||||||
|
@ -240,11 +240,11 @@ function wp_default_packages_scripts( &$scripts ) {
|
||||||
'deprecated' => '2.0.3',
|
'deprecated' => '2.0.3',
|
||||||
'dom' => '2.0.7',
|
'dom' => '2.0.7',
|
||||||
'dom-ready' => '2.0.2',
|
'dom-ready' => '2.0.2',
|
||||||
'edit-post' => '3.1.5',
|
'edit-post' => '3.1.6',
|
||||||
'editor' => '9.0.5',
|
'editor' => '9.0.6',
|
||||||
'element' => '2.1.8',
|
'element' => '2.1.8',
|
||||||
'escape-html' => '1.0.1',
|
'escape-html' => '1.0.1',
|
||||||
'format-library' => '1.2.8',
|
'format-library' => '1.2.9',
|
||||||
'hooks' => '2.0.3',
|
'hooks' => '2.0.3',
|
||||||
'html-entities' => '2.0.4',
|
'html-entities' => '2.0.4',
|
||||||
'i18n' => '3.1.0',
|
'i18n' => '3.1.0',
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.1-alpha-44318';
|
$wp_version = '5.1-alpha-44319';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue