mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Editor: Update WordPress packages for 6.0 Beta 2
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovered after WordPress 6.0 Beta 1. Props zieladam, ndiego. See #55567. Built from https://develop.svn.wordpress.org/trunk@53219 git-svn-id: http://core.svn.wordpress.org/trunk@52808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c795115b0a
commit
6aead54d17
File diff suppressed because one or more lines are too long
@ -13,6 +13,12 @@
|
||||
* @return string
|
||||
*/
|
||||
function block_core_comment_template_render_comments( $comments, $block ) {
|
||||
global $comment_depth;
|
||||
|
||||
if ( empty( $comment_depth ) ) {
|
||||
$comment_depth = 1;
|
||||
}
|
||||
|
||||
$content = '';
|
||||
foreach ( $comments as $comment ) {
|
||||
|
||||
@ -28,14 +34,20 @@ function block_core_comment_template_render_comments( $comments, $block ) {
|
||||
// If the comment has children, recurse to create the HTML for the nested
|
||||
// comments.
|
||||
if ( ! empty( $children ) ) {
|
||||
$comment_depth += 1;
|
||||
$inner_content = block_core_comment_template_render_comments(
|
||||
$children,
|
||||
$block
|
||||
);
|
||||
$block_content .= sprintf( '<ol>%1$s</ol>', $inner_content );
|
||||
$comment_depth -= 1;
|
||||
}
|
||||
|
||||
$content .= '<li>' . $block_content . '</li>';
|
||||
// The `false` parameter at the end means that we do NOT want the function to `echo` the output but to return a string.
|
||||
// See https://developer.wordpress.org/reference/functions/comment_class/#parameters.
|
||||
$comment_classes = comment_class( '', $comment->comment_ID, $comment->comment_post_ID, false );
|
||||
|
||||
$content .= sprintf( '<li id="comment-%1$s" %2$s>%3$s</li>', $comment->comment_ID, $comment_classes, $block_content );
|
||||
}
|
||||
|
||||
return $content;
|
||||
|
@ -1,26 +0,0 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/list-item",
|
||||
"title": "List item",
|
||||
"category": "text",
|
||||
"parent": [ "core/list" ],
|
||||
"description": "Create a list item.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"placeholder": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"selector": "li",
|
||||
"default": "",
|
||||
"__experimentalRole": "content"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"className": false,
|
||||
"__experimentalSelector": "li"
|
||||
}
|
||||
}
|
@ -855,8 +855,7 @@
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
.block-editor-block-lock-toolbar .components-button.has-icon:focus::before {
|
||||
right: 0 !important;
|
||||
left: 12px !important;
|
||||
left: 8px !important;
|
||||
}
|
||||
|
||||
.block-editor-block-breadcrumb {
|
||||
|
File diff suppressed because one or more lines are too long
3
wp-includes/css/dist/block-editor/style.css
vendored
3
wp-includes/css/dist/block-editor/style.css
vendored
@ -855,8 +855,7 @@
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
.block-editor-block-lock-toolbar .components-button.has-icon:focus::before {
|
||||
left: 0 !important;
|
||||
right: 12px !important;
|
||||
right: 8px !important;
|
||||
}
|
||||
|
||||
.block-editor-block-breadcrumb {
|
||||
|
File diff suppressed because one or more lines are too long
@ -3036,9 +3036,6 @@ body.is-dragging-components-draggable {
|
||||
.components-button.components-guide__finish-button {
|
||||
left: 32px;
|
||||
}
|
||||
.components-button.components-guide__inline-finish-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[role=region] {
|
||||
position: relative;
|
||||
|
File diff suppressed because one or more lines are too long
3
wp-includes/css/dist/components/style.css
vendored
3
wp-includes/css/dist/components/style.css
vendored
@ -3044,9 +3044,6 @@ body.is-dragging-components-draggable {
|
||||
.components-button.components-guide__finish-button {
|
||||
right: 32px;
|
||||
}
|
||||
.components-button.components-guide__inline-finish-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[role=region] {
|
||||
position: relative;
|
||||
|
File diff suppressed because one or more lines are too long
1
wp-includes/js/dist/block-directory.js
vendored
1
wp-includes/js/dist/block-directory.js
vendored
@ -1186,6 +1186,7 @@ function DownloadableBlockListItem(_ref3) {
|
||||
}
|
||||
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableCompositeItem, _extends({
|
||||
__experimentalIsFocusable: true,
|
||||
role: "option",
|
||||
as: external_wp_components_namespaceObject.Button
|
||||
}, composite, {
|
||||
|
2
wp-includes/js/dist/block-directory.min.js
vendored
2
wp-includes/js/dist/block-directory.min.js
vendored
File diff suppressed because one or more lines are too long
218
wp-includes/js/dist/block-editor.js
vendored
218
wp-includes/js/dist/block-editor.js
vendored
@ -2912,8 +2912,10 @@ __webpack_require__.d(selectors_namespaceObject, {
|
||||
"__unstableGetBlockWithoutInnerBlocks": function() { return __unstableGetBlockWithoutInnerBlocks; },
|
||||
"__unstableGetClientIdWithClientIdsTree": function() { return __unstableGetClientIdWithClientIdsTree; },
|
||||
"__unstableGetClientIdsTree": function() { return __unstableGetClientIdsTree; },
|
||||
"__unstableGetSelectedBlocksWithPartialSelection": function() { return __unstableGetSelectedBlocksWithPartialSelection; },
|
||||
"__unstableIsFullySelected": function() { return __unstableIsFullySelected; },
|
||||
"__unstableIsLastBlockChangeIgnored": function() { return __unstableIsLastBlockChangeIgnored; },
|
||||
"__unstableIsSelectionCollapsed": function() { return __unstableIsSelectionCollapsed; },
|
||||
"__unstableIsSelectionMergeable": function() { return __unstableIsSelectionMergeable; },
|
||||
"areInnerBlocksControlled": function() { return areInnerBlocksControlled; },
|
||||
"canEditBlock": function() { return canEditBlock; },
|
||||
@ -5361,6 +5363,29 @@ const symbol = (0,external_wp_element_namespaceObject.createElement)(external_wp
|
||||
}));
|
||||
/* harmony default export */ var library_symbol = (symbol);
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","richText"]
|
||||
var external_wp_richText_namespaceObject = window["wp"]["richText"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/utils.js
|
||||
/**
|
||||
* Helper function that maps attribute definition properties to the
|
||||
* ones used by RichText utils like `create, toHTMLString, etc..`.
|
||||
*
|
||||
* @param {Object} attributeDefinition A block's attribute definition object.
|
||||
* @return {Object} The mapped object.
|
||||
*/
|
||||
function mapRichTextSettings(attributeDefinition) {
|
||||
const {
|
||||
multiline: multilineTag,
|
||||
__unstableMultilineWrapperTags: multilineWrapperTags,
|
||||
__unstablePreserveWhiteSpace: preserveWhiteSpace
|
||||
} = attributeDefinition;
|
||||
return {
|
||||
multilineTag,
|
||||
multilineWrapperTags,
|
||||
preserveWhiteSpace
|
||||
};
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/selectors.js
|
||||
/**
|
||||
* External dependencies
|
||||
@ -5376,6 +5401,12 @@ const symbol = (0,external_wp_element_namespaceObject.createElement)(external_wp
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A block selection object.
|
||||
*
|
||||
@ -6217,6 +6248,19 @@ function __unstableIsFullySelected(state) {
|
||||
const selectionFocus = getSelectionEnd(state);
|
||||
return !selectionAnchor.attributeKey && !selectionFocus.attributeKey && typeof selectionAnchor.offset === 'undefined' && typeof selectionFocus.offset === 'undefined';
|
||||
}
|
||||
/**
|
||||
* Returns true if the selection is collapsed.
|
||||
*
|
||||
* @param {Object} state Editor state.
|
||||
*
|
||||
* @return {boolean} Whether the selection is collapsed.
|
||||
*/
|
||||
|
||||
function __unstableIsSelectionCollapsed(state) {
|
||||
const selectionAnchor = getSelectionStart(state);
|
||||
const selectionFocus = getSelectionEnd(state);
|
||||
return !!selectionAnchor && !!selectionFocus && selectionAnchor.clientId === selectionFocus.clientId && selectionAnchor.attributeKey === selectionFocus.attributeKey && selectionAnchor.offset === selectionFocus.offset;
|
||||
}
|
||||
/**
|
||||
* Check whether the selection is mergeable.
|
||||
*
|
||||
@ -6268,6 +6312,75 @@ function __unstableIsSelectionMergeable(state, isForward) {
|
||||
const blocksToMerge = (0,external_wp_blocks_namespaceObject.switchToBlockType)(blockToMerge, targetBlock.name);
|
||||
return blocksToMerge && blocksToMerge.length;
|
||||
}
|
||||
/**
|
||||
* Get partial selected blocks with their content updated
|
||||
* based on the selection.
|
||||
*
|
||||
* @param {Object} state Editor state.
|
||||
*
|
||||
* @return {Object[]} Updated partial selected blocks.
|
||||
*/
|
||||
|
||||
const __unstableGetSelectedBlocksWithPartialSelection = state => {
|
||||
const selectionAnchor = getSelectionStart(state);
|
||||
const selectionFocus = getSelectionEnd(state);
|
||||
|
||||
if (selectionAnchor.clientId === selectionFocus.clientId) {
|
||||
return EMPTY_ARRAY;
|
||||
} // Can't split if the selection is not set.
|
||||
|
||||
|
||||
if (!selectionAnchor.attributeKey || !selectionFocus.attributeKey || typeof selectionAnchor.offset === 'undefined' || typeof selectionFocus.offset === 'undefined') {
|
||||
return EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
const anchorRootClientId = getBlockRootClientId(state, selectionAnchor.clientId);
|
||||
const focusRootClientId = getBlockRootClientId(state, selectionFocus.clientId); // It's not splittable if the selection doesn't start and end in the same
|
||||
// block list. Maybe in the future it should be allowed.
|
||||
|
||||
if (anchorRootClientId !== focusRootClientId) {
|
||||
return EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
const blockOrder = getBlockOrder(state, anchorRootClientId);
|
||||
const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
|
||||
const focusIndex = blockOrder.indexOf(selectionFocus.clientId); // Reassign selection start and end based on order.
|
||||
|
||||
const [selectionStart, selectionEnd] = anchorIndex > focusIndex ? [selectionFocus, selectionAnchor] : [selectionAnchor, selectionFocus];
|
||||
const blockA = getBlock(state, selectionStart.clientId);
|
||||
const blockAType = (0,external_wp_blocks_namespaceObject.getBlockType)(blockA.name);
|
||||
const blockB = getBlock(state, selectionEnd.clientId);
|
||||
const blockBType = (0,external_wp_blocks_namespaceObject.getBlockType)(blockB.name);
|
||||
const htmlA = blockA.attributes[selectionStart.attributeKey];
|
||||
const htmlB = blockB.attributes[selectionEnd.attributeKey];
|
||||
const attributeDefinitionA = blockAType.attributes[selectionStart.attributeKey];
|
||||
const attributeDefinitionB = blockBType.attributes[selectionEnd.attributeKey];
|
||||
let valueA = (0,external_wp_richText_namespaceObject.create)({
|
||||
html: htmlA,
|
||||
...mapRichTextSettings(attributeDefinitionA)
|
||||
});
|
||||
let valueB = (0,external_wp_richText_namespaceObject.create)({
|
||||
html: htmlB,
|
||||
...mapRichTextSettings(attributeDefinitionB)
|
||||
});
|
||||
valueA = (0,external_wp_richText_namespaceObject.remove)(valueA, 0, selectionStart.offset);
|
||||
valueB = (0,external_wp_richText_namespaceObject.remove)(valueB, selectionEnd.offset, valueB.text.length);
|
||||
return [{ ...blockA,
|
||||
attributes: { ...blockA.attributes,
|
||||
[selectionStart.attributeKey]: (0,external_wp_richText_namespaceObject.toHTMLString)({
|
||||
value: valueA,
|
||||
...mapRichTextSettings(attributeDefinitionA)
|
||||
})
|
||||
}
|
||||
}, { ...blockB,
|
||||
attributes: { ...blockB.attributes,
|
||||
[selectionEnd.attributeKey]: (0,external_wp_richText_namespaceObject.toHTMLString)({
|
||||
value: valueB,
|
||||
...mapRichTextSettings(attributeDefinitionB)
|
||||
})
|
||||
}
|
||||
}];
|
||||
};
|
||||
/**
|
||||
* Returns an array containing all block client IDs in the editor in the order
|
||||
* they appear. Optionally accepts a root client ID of the block list for which
|
||||
@ -7695,8 +7808,6 @@ function wasBlockJustInserted(state, clientId, source) {
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","a11y"]
|
||||
var external_wp_a11y_namespaceObject = window["wp"]["a11y"];
|
||||
;// CONCATENATED MODULE: external ["wp","richText"]
|
||||
var external_wp_richText_namespaceObject = window["wp"]["richText"];
|
||||
;// CONCATENATED MODULE: external ["wp","deprecated"]
|
||||
var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
|
||||
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
|
||||
@ -7714,6 +7825,11 @@ var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Action which will insert a default block insert action if there
|
||||
* are no other blocks at the root of the editor. This action should be used
|
||||
@ -8369,26 +8485,12 @@ const synchronizeTemplate = () => _ref11 => {
|
||||
const updatedBlockList = (0,external_wp_blocks_namespaceObject.synchronizeBlocksWithTemplate)(blocks, template);
|
||||
dispatch.resetBlocks(updatedBlockList);
|
||||
};
|
||||
|
||||
function mapRichTextSettings(attributeDefinition) {
|
||||
const {
|
||||
multiline: multilineTag,
|
||||
__unstableMultilineWrapperTags: multilineWrapperTags,
|
||||
__unstablePreserveWhiteSpace: preserveWhiteSpace
|
||||
} = attributeDefinition;
|
||||
return {
|
||||
multilineTag,
|
||||
multilineWrapperTags,
|
||||
preserveWhiteSpace
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Delete the current selection.
|
||||
*
|
||||
* @param {boolean} isForward
|
||||
*/
|
||||
|
||||
|
||||
const __unstableDeleteSelection = isForward => _ref12 => {
|
||||
let {
|
||||
registry,
|
||||
@ -11929,7 +12031,7 @@ function useAvailableAlignments() {
|
||||
const ui_BLOCK_ALIGNMENTS_CONTROLS = {
|
||||
none: {
|
||||
icon: align_none,
|
||||
title: (0,external_wp_i18n_namespaceObject.__)('None')
|
||||
title: (0,external_wp_i18n_namespaceObject._x)('None', 'Alignment option')
|
||||
},
|
||||
left: {
|
||||
icon: position_left,
|
||||
@ -28567,12 +28669,18 @@ function useClipboardHandler() {
|
||||
getBlocksByClientId,
|
||||
getSelectedBlockClientIds,
|
||||
hasMultiSelection,
|
||||
getSettings
|
||||
getSettings,
|
||||
__unstableIsFullySelected,
|
||||
__unstableIsSelectionCollapsed,
|
||||
__unstableIsSelectionMergeable,
|
||||
__unstableGetSelectedBlocksWithPartialSelection
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(store);
|
||||
const {
|
||||
flashBlock,
|
||||
removeBlocks,
|
||||
replaceBlocks
|
||||
replaceBlocks,
|
||||
__unstableDeleteSelection,
|
||||
__unstableExpandSelection
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
|
||||
const notifyCopy = useNotifyCopy();
|
||||
return (0,external_wp_compose_namespaceObject.useRefEffect)(node => {
|
||||
@ -28607,20 +28715,49 @@ function useClipboardHandler() {
|
||||
const eventDefaultPrevented = event.defaultPrevented;
|
||||
event.preventDefault();
|
||||
|
||||
const isSelectionMergeable = __unstableIsSelectionMergeable();
|
||||
|
||||
const shouldHandleWholeBlocks = __unstableIsSelectionCollapsed() || __unstableIsFullySelected();
|
||||
|
||||
const expandSelectionIsNeeded = !shouldHandleWholeBlocks && !isSelectionMergeable;
|
||||
|
||||
if (event.type === 'copy' || event.type === 'cut') {
|
||||
if (selectedBlockClientIds.length === 1) {
|
||||
flashBlock(selectedBlockClientIds[0]);
|
||||
} // If we have a partial selection that is not mergeable, just
|
||||
// expand the selection to the whole blocks.
|
||||
|
||||
|
||||
if (expandSelectionIsNeeded) {
|
||||
__unstableExpandSelection();
|
||||
} else {
|
||||
notifyCopy(event.type, selectedBlockClientIds);
|
||||
let blocks; // Check if we have partial selection.
|
||||
|
||||
if (shouldHandleWholeBlocks) {
|
||||
blocks = getBlocksByClientId(selectedBlockClientIds);
|
||||
} else {
|
||||
const [head, tail] = __unstableGetSelectedBlocksWithPartialSelection();
|
||||
|
||||
const inBetweenBlocks = getBlocksByClientId(selectedBlockClientIds.slice(1, selectedBlockClientIds.length - 1));
|
||||
blocks = [head, ...inBetweenBlocks, tail];
|
||||
}
|
||||
|
||||
notifyCopy(event.type, selectedBlockClientIds);
|
||||
const blocks = getBlocksByClientId(selectedBlockClientIds);
|
||||
const serialized = (0,external_wp_blocks_namespaceObject.serialize)(blocks);
|
||||
event.clipboardData.setData('text/plain', serialized);
|
||||
event.clipboardData.setData('text/html', serialized);
|
||||
}
|
||||
}
|
||||
|
||||
if (event.type === 'cut') {
|
||||
// We need to also check if at the start we needed to
|
||||
// expand the selection, as in this point we might have
|
||||
// programmatically fully selected the blocks above.
|
||||
if (shouldHandleWholeBlocks && !expandSelectionIsNeeded) {
|
||||
removeBlocks(selectedBlockClientIds);
|
||||
} else {
|
||||
__unstableDeleteSelection();
|
||||
}
|
||||
} else if (event.type === 'paste') {
|
||||
if (eventDefaultPrevented) {
|
||||
// This was likely already handled in rich-text/use-paste-handler.js.
|
||||
@ -29140,14 +29277,11 @@ const lock = (0,external_wp_element_namespaceObject.createElement)(external_wp_p
|
||||
* Return details about the block lock status.
|
||||
*
|
||||
* @param {string} clientId The block client Id.
|
||||
* @param {boolean} checkParent Optional. The status is derived from the parent `templateLock`
|
||||
* when the current block's lock state isn't defined.
|
||||
*
|
||||
* @return {Object} Block lock status
|
||||
*/
|
||||
|
||||
function useBlockLock(clientId) {
|
||||
let checkParent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||||
return (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
canEditBlock,
|
||||
@ -29157,7 +29291,7 @@ function useBlockLock(clientId) {
|
||||
getBlockName,
|
||||
getBlockRootClientId
|
||||
} = select(store);
|
||||
const rootClientId = checkParent ? getBlockRootClientId(clientId) : null;
|
||||
const rootClientId = getBlockRootClientId(clientId);
|
||||
const canEdit = canEditBlock(clientId);
|
||||
const canMove = canMoveBlock(clientId, rootClientId);
|
||||
const canRemove = canRemoveBlock(clientId, rootClientId);
|
||||
@ -29168,7 +29302,7 @@ function useBlockLock(clientId) {
|
||||
canLock: canLockBlockType(getBlockName(clientId)),
|
||||
isLocked: !canEdit || !canMove || !canRemove
|
||||
};
|
||||
}, [clientId, checkParent]);
|
||||
}, [clientId]);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-lock/modal.js
|
||||
@ -29204,7 +29338,7 @@ function BlockLockModal(_ref) {
|
||||
canEdit,
|
||||
canMove,
|
||||
canRemove
|
||||
} = useBlockLock(clientId, true);
|
||||
} = useBlockLock(clientId);
|
||||
const {
|
||||
isReusable
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
@ -29333,7 +29467,7 @@ function BlockLockMenuItem(_ref) {
|
||||
const {
|
||||
canLock,
|
||||
isLocked
|
||||
} = useBlockLock(clientId, true);
|
||||
} = useBlockLock(clientId);
|
||||
const [isModalOpen, toggleModal] = (0,external_wp_element_namespaceObject.useReducer)(isActive => !isActive, false);
|
||||
|
||||
if (!canLock) {
|
||||
@ -38624,6 +38758,7 @@ function getCommonDepthClientIds(startId, endId, startParents, endParents) {
|
||||
|
||||
|
||||
|
||||
|
||||
function ListViewBlock(_ref) {
|
||||
let {
|
||||
block,
|
||||
@ -38652,11 +38787,21 @@ function ListViewBlock(_ref) {
|
||||
toggleBlockHighlight
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
|
||||
const blockInformation = useBlockDisplayInformation(clientId);
|
||||
const {
|
||||
isLocked
|
||||
} = useBlockLock(clientId);
|
||||
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(ListViewBlock);
|
||||
const descriptionId = `list-view-block-select-button__${instanceId}`;
|
||||
const blockPositionDescription = getBlockPositionDescription(position, siblingBlockCount, level);
|
||||
const blockAriaLabel = blockInformation ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: The title of the block. This string indicates a link to select the block.
|
||||
(0,external_wp_i18n_namespaceObject.__)('%s link'), blockInformation.title) : (0,external_wp_i18n_namespaceObject.__)('Link');
|
||||
|
||||
let blockAriaLabel = (0,external_wp_i18n_namespaceObject.__)('Link');
|
||||
|
||||
if (blockInformation) {
|
||||
blockAriaLabel = isLocked ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: The title of the block. This string indicates a link to select the locked block.
|
||||
(0,external_wp_i18n_namespaceObject.__)('%s link (locked)'), blockInformation.title) : (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: The title of the block. This string indicates a link to select the block.
|
||||
(0,external_wp_i18n_namespaceObject.__)('%s link'), blockInformation.title);
|
||||
}
|
||||
|
||||
const settingsAriaLabel = blockInformation ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: The title of the block.
|
||||
(0,external_wp_i18n_namespaceObject.__)('Options for %s block'), blockInformation.title) : (0,external_wp_i18n_namespaceObject.__)('Options');
|
||||
const {
|
||||
@ -44267,6 +44412,11 @@ function LinkControl(_ref) {
|
||||
const [isEditingLink, setIsEditingLink] = (0,external_wp_element_namespaceObject.useState)(forceIsEditingLink !== undefined ? forceIsEditingLink : !value || !value.url);
|
||||
const isEndingEditWithFocus = (0,external_wp_element_namespaceObject.useRef)(false);
|
||||
const currentInputIsEmpty = !(currentInputValue !== null && currentInputValue !== void 0 && (_currentInputValue$tr = currentInputValue.trim()) !== null && _currentInputValue$tr !== void 0 && _currentInputValue$tr.length);
|
||||
const {
|
||||
createPage,
|
||||
isCreatingPage,
|
||||
errorMessage
|
||||
} = useCreatePage(createSuggestion);
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
if (forceIsEditingLink !== undefined && forceIsEditingLink !== isEditingLink) {
|
||||
setIsEditingLink(forceIsEditingLink);
|
||||
@ -44295,7 +44445,7 @@ function LinkControl(_ref) {
|
||||
const nextFocusTarget = external_wp_dom_namespaceObject.focus.focusable.find(wrapperNode.current)[whichFocusTargetIndex] || wrapperNode.current;
|
||||
nextFocusTarget.focus();
|
||||
isEndingEditWithFocus.current = false;
|
||||
}, [isEditingLink]);
|
||||
}, [isEditingLink, isCreatingPage]);
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
/**
|
||||
* If the value's `text` property changes then sync this
|
||||
@ -44326,12 +44476,6 @@ function LinkControl(_ref) {
|
||||
setIsEditingLink(false);
|
||||
}
|
||||
|
||||
const {
|
||||
createPage,
|
||||
isCreatingPage,
|
||||
errorMessage
|
||||
} = useCreatePage(createSuggestion);
|
||||
|
||||
const handleSelectSuggestion = updatedValue => {
|
||||
onChange({ ...updatedValue,
|
||||
title: internalTextValue || (updatedValue === null || updatedValue === void 0 ? void 0 : updatedValue.title)
|
||||
|
2
wp-includes/js/dist/block-editor.min.js
vendored
2
wp-includes/js/dist/block-editor.min.js
vendored
File diff suppressed because one or more lines are too long
1468
wp-includes/js/dist/block-library.js
vendored
1468
wp-includes/js/dist/block-library.js
vendored
File diff suppressed because it is too large
Load Diff
2
wp-includes/js/dist/block-library.min.js
vendored
2
wp-includes/js/dist/block-library.min.js
vendored
File diff suppressed because one or more lines are too long
307
wp-includes/js/dist/components.js
vendored
307
wp-includes/js/dist/components.js
vendored
@ -1300,15 +1300,21 @@ module.exports = function getPolyfill() {
|
||||
|
||||
|
||||
var define = __webpack_require__(9170);
|
||||
var shimUnscopables = __webpack_require__(2505);
|
||||
|
||||
var getPolyfill = __webpack_require__(616);
|
||||
|
||||
module.exports = function shimFlat() {
|
||||
var polyfill = getPolyfill();
|
||||
|
||||
define(
|
||||
Array.prototype,
|
||||
{ flat: polyfill },
|
||||
{ flat: function () { return Array.prototype.flat !== polyfill; } }
|
||||
);
|
||||
|
||||
shimUnscopables('flat');
|
||||
|
||||
return polyfill;
|
||||
};
|
||||
|
||||
@ -2469,6 +2475,35 @@ if (true) {
|
||||
} else {}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2505:
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var has = __webpack_require__(9284);
|
||||
|
||||
var hasUnscopables = typeof Symbol === 'function' && typeof Symbol.unscopables === 'symbol';
|
||||
|
||||
var map = hasUnscopables && Array.prototype[Symbol.unscopables];
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
module.exports = function shimUnscopables(method) {
|
||||
if (typeof method !== 'string' || !method) {
|
||||
throw new $TypeError('method must be a non-empty string');
|
||||
}
|
||||
if (!has(Array.prototype, method)) {
|
||||
throw new $TypeError('method must be on Array.prototype');
|
||||
}
|
||||
if (hasUnscopables) {
|
||||
map[method] = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5249:
|
||||
@ -2552,59 +2587,6 @@ module.exports = function ToPrimitive(input) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8023:
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var toStr = Object.prototype.toString;
|
||||
|
||||
var isPrimitive = __webpack_require__(3777);
|
||||
|
||||
var isCallable = __webpack_require__(5443);
|
||||
|
||||
// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8
|
||||
var ES5internalSlots = {
|
||||
'[[DefaultValue]]': function (O) {
|
||||
var actualHint;
|
||||
if (arguments.length > 1) {
|
||||
actualHint = arguments[1];
|
||||
} else {
|
||||
actualHint = toStr.call(O) === '[object Date]' ? String : Number;
|
||||
}
|
||||
|
||||
if (actualHint === String || actualHint === Number) {
|
||||
var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
|
||||
var value, i;
|
||||
for (i = 0; i < methods.length; ++i) {
|
||||
if (isCallable(O[methods[i]])) {
|
||||
value = O[methods[i]]();
|
||||
if (isPrimitive(value)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new TypeError('No default value');
|
||||
}
|
||||
throw new TypeError('invalid [[DefaultValue]] hint supplied');
|
||||
}
|
||||
};
|
||||
|
||||
// http://ecma-international.org/ecma-262/5.1/#sec-9.1
|
||||
module.exports = function ToPrimitive(input) {
|
||||
if (isPrimitive(input)) {
|
||||
return input;
|
||||
}
|
||||
if (arguments.length > 1) {
|
||||
return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]);
|
||||
}
|
||||
return ES5internalSlots['[[DefaultValue]]'](input);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3777:
|
||||
@ -14545,8 +14527,8 @@ module.exports = function CreateDataProperty(O, P, V) {
|
||||
}
|
||||
var oldDesc = OrdinaryGetOwnProperty(O, P);
|
||||
var extensible = !oldDesc || IsExtensible(O);
|
||||
var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']);
|
||||
if (immutable || !extensible) {
|
||||
var nonConfigurable = oldDesc && !oldDesc['[[Configurable]]'];
|
||||
if (nonConfigurable || !extensible) {
|
||||
return false;
|
||||
}
|
||||
return DefineOwnProperty(
|
||||
@ -14783,12 +14765,7 @@ var inspect = __webpack_require__(3205);
|
||||
var IsPropertyKey = __webpack_require__(3290);
|
||||
var Type = __webpack_require__(9747);
|
||||
|
||||
/**
|
||||
* 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p
|
||||
* 1. Assert: Type(O) is Object.
|
||||
* 2. Assert: IsPropertyKey(P) is true.
|
||||
* 3. Return O.[[Get]](P, O).
|
||||
*/
|
||||
// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p
|
||||
|
||||
module.exports = function Get(O, P) {
|
||||
// 7.3.1.1
|
||||
@ -14987,13 +14964,11 @@ module.exports = function IsDataDescriptor(Desc) {
|
||||
|
||||
var GetIntrinsic = __webpack_require__(4219);
|
||||
|
||||
var $Object = GetIntrinsic('%Object%');
|
||||
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
|
||||
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
|
||||
|
||||
var isPrimitive = __webpack_require__(5019);
|
||||
|
||||
var $preventExtensions = $Object.preventExtensions;
|
||||
var $isExtensible = $Object.isExtensible;
|
||||
|
||||
// https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o
|
||||
|
||||
module.exports = $preventExtensions
|
||||
@ -15211,18 +15186,21 @@ module.exports = function ToBoolean(value) { return !!value; };
|
||||
"use strict";
|
||||
|
||||
|
||||
var ES5ToInteger = __webpack_require__(8537);
|
||||
|
||||
var abs = __webpack_require__(13);
|
||||
var floor = __webpack_require__(5127);
|
||||
var ToNumber = __webpack_require__(5541);
|
||||
|
||||
// https://www.ecma-international.org/ecma-262/11.0/#sec-tointeger
|
||||
var $isNaN = __webpack_require__(3234);
|
||||
var $isFinite = __webpack_require__(7061);
|
||||
var $sign = __webpack_require__(2163);
|
||||
|
||||
module.exports = function ToInteger(value) {
|
||||
// https://262.ecma-international.org/12.0/#sec-tointegerorinfinity
|
||||
|
||||
module.exports = function ToIntegerOrInfinity(value) {
|
||||
var number = ToNumber(value);
|
||||
if (number !== 0) {
|
||||
number = ES5ToInteger(number);
|
||||
}
|
||||
return number === 0 ? 0 : number;
|
||||
if ($isNaN(number) || number === 0) { return 0; }
|
||||
if (!$isFinite(number)) { return number; }
|
||||
return $sign(number) * floor(abs(number));
|
||||
};
|
||||
|
||||
|
||||
@ -15524,73 +15502,6 @@ module.exports = function CheckObjectCoercible(value, optMessage) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8537:
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var abs = __webpack_require__(6195);
|
||||
var floor = __webpack_require__(7914);
|
||||
var ToNumber = __webpack_require__(4018);
|
||||
|
||||
var $isNaN = __webpack_require__(3234);
|
||||
var $isFinite = __webpack_require__(7061);
|
||||
var $sign = __webpack_require__(2163);
|
||||
|
||||
// http://262.ecma-international.org/5.1/#sec-9.4
|
||||
|
||||
module.exports = function ToInteger(value) {
|
||||
var number = ToNumber(value);
|
||||
if ($isNaN(number)) { return 0; }
|
||||
if (number === 0 || !$isFinite(number)) { return number; }
|
||||
return $sign(number) * floor(abs(number));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4018:
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var ToPrimitive = __webpack_require__(583);
|
||||
|
||||
// http://262.ecma-international.org/5.1/#sec-9.3
|
||||
|
||||
module.exports = function ToNumber(value) {
|
||||
var prim = ToPrimitive(value, Number);
|
||||
if (typeof prim !== 'string') {
|
||||
return +prim; // eslint-disable-line no-implicit-coercion
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-control-regex
|
||||
var trimmed = prim.replace(/^[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+|[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+$/g, '');
|
||||
if ((/^0[ob]|^[+-]0x/).test(trimmed)) {
|
||||
return NaN;
|
||||
}
|
||||
|
||||
return +trimmed; // eslint-disable-line no-implicit-coercion
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 583:
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// http://262.ecma-international.org/5.1/#sec-9.1
|
||||
|
||||
module.exports = __webpack_require__(8023);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 290:
|
||||
@ -15623,44 +15534,6 @@ module.exports = function Type(x) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6195:
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var GetIntrinsic = __webpack_require__(4219);
|
||||
|
||||
var $abs = GetIntrinsic('%Math.abs%');
|
||||
|
||||
// http://262.ecma-international.org/5.1/#sec-5.2
|
||||
|
||||
module.exports = function abs(x) {
|
||||
return $abs(x);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 7914:
|
||||
/***/ (function(module) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// var modulo = require('./modulo');
|
||||
var $floor = Math.floor;
|
||||
|
||||
// http://262.ecma-international.org/5.1/#sec-5.2
|
||||
|
||||
module.exports = function floor(x) {
|
||||
// return x - modulo(x, 1);
|
||||
return $floor(x);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 137:
|
||||
@ -15696,7 +15569,13 @@ if ($defineProperty) {
|
||||
}
|
||||
|
||||
// node v0.6 has a bug where array lengths can be Set but not Defined
|
||||
var hasArrayLengthDefineBug = Object.defineProperty && Object.defineProperty([], 'length', { value: 1 }).length === 0;
|
||||
var hasArrayLengthDefineBug;
|
||||
try {
|
||||
hasArrayLengthDefineBug = $defineProperty && $defineProperty([], 'length', { value: 1 }).length === 0;
|
||||
} catch (e) {
|
||||
// In Firefox 4-22, defining length on an array throws an exception.
|
||||
hasArrayLengthDefineBug = true;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line global-require
|
||||
var isArray = hasArrayLengthDefineBug && __webpack_require__(7472); // this does not depend on any other AOs.
|
||||
@ -15926,14 +15805,12 @@ module.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1;
|
||||
"use strict";
|
||||
|
||||
|
||||
var GetIntrinsic = __webpack_require__(4219);
|
||||
var callBound = __webpack_require__(9630);
|
||||
|
||||
var $test = GetIntrinsic('RegExp.prototype.test');
|
||||
|
||||
var callBind = __webpack_require__(9961);
|
||||
var $exec = callBound('RegExp.prototype.exec');
|
||||
|
||||
module.exports = function regexTester(regex) {
|
||||
return callBind($test, regex);
|
||||
return function test(s) { return $exec(regex, s) !== null; };
|
||||
};
|
||||
|
||||
|
||||
@ -30352,7 +30229,7 @@ function createProjectionNode(_a) {
|
||||
}
|
||||
// TODO: Check here if an animation exists
|
||||
var layoutTransition = (_c = (_b = _this.options.transition) !== null && _b !== void 0 ? _b : visualElement.getDefaultTransition()) !== null && _c !== void 0 ? _c : defaultLayoutTransition;
|
||||
var onLayoutAnimationComplete = visualElement.getProps().onLayoutAnimationComplete;
|
||||
var _g = visualElement.getProps(), onLayoutAnimationStart = _g.onLayoutAnimationStart, onLayoutAnimationComplete = _g.onLayoutAnimationComplete;
|
||||
/**
|
||||
* The target layout of the element might stay the same,
|
||||
* but its position relative to its parent has changed.
|
||||
@ -30375,7 +30252,7 @@ function createProjectionNode(_a) {
|
||||
_this.resumingFrom.resumingFrom = undefined;
|
||||
}
|
||||
_this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
||||
var animationOptions = __assign(__assign({}, getValueTransition(layoutTransition, "layout")), { onComplete: onLayoutAnimationComplete });
|
||||
var animationOptions = __assign(__assign({}, getValueTransition(layoutTransition, "layout")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });
|
||||
if (visualElement.shouldReduceMotion) {
|
||||
animationOptions.delay = 0;
|
||||
animationOptions.type = false;
|
||||
@ -30908,6 +30785,7 @@ function createProjectionNode(_a) {
|
||||
ProjectionNode.prototype.startAnimation = function (options) {
|
||||
var _this = this;
|
||||
var _a, _b;
|
||||
this.notifyListeners("animationStart");
|
||||
(_a = this.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();
|
||||
if (this.resumingFrom) {
|
||||
(_b = this.resumingFrom.currentAnimation) === null || _b === void 0 ? void 0 : _b.stop();
|
||||
@ -31915,6 +31793,7 @@ var validMotionProps = new Set([
|
||||
"layout",
|
||||
"layoutId",
|
||||
"layoutDependency",
|
||||
"onLayoutAnimationStart",
|
||||
"onLayoutAnimationComplete",
|
||||
"onLayoutMeasure",
|
||||
"onBeforeLayoutMeasure",
|
||||
@ -34723,6 +34602,7 @@ var lifecycles_names = [
|
||||
"AnimationComplete",
|
||||
"LayoutAnimationComplete",
|
||||
"AnimationStart",
|
||||
"LayoutAnimationStart",
|
||||
"SetAxisTarget",
|
||||
"Unmount",
|
||||
];
|
||||
@ -66502,41 +66382,6 @@ function PageControl(_ref) {
|
||||
}))));
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/guide/finish-button.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
function FinishButton(props) {
|
||||
const ref = (0,external_wp_element_namespaceObject.useRef)(); // Focus the button on mount if nothing else is focused. This prevents a
|
||||
// focus loss when the 'Next' button is swapped out.
|
||||
|
||||
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
|
||||
const {
|
||||
ownerDocument
|
||||
} = ref.current;
|
||||
const {
|
||||
activeElement,
|
||||
body
|
||||
} = ownerDocument;
|
||||
|
||||
if (!activeElement || activeElement === body) {
|
||||
ref.current.focus();
|
||||
}
|
||||
}, []);
|
||||
return (0,external_wp_element_namespaceObject.createElement)(build_module_button, extends_extends({}, props, {
|
||||
ref: ref
|
||||
}));
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/guide/index.js
|
||||
|
||||
|
||||
@ -66552,6 +66397,7 @@ function FinishButton(props) {
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
@ -66559,7 +66405,6 @@ function FinishButton(props) {
|
||||
|
||||
|
||||
|
||||
|
||||
function Guide(_ref) {
|
||||
let {
|
||||
children,
|
||||
@ -66569,6 +66414,7 @@ function Guide(_ref) {
|
||||
onFinish,
|
||||
pages = []
|
||||
} = _ref;
|
||||
const guideContainer = (0,external_wp_element_namespaceObject.useRef)();
|
||||
const [currentPage, setCurrentPage] = (0,external_wp_element_namespaceObject.useState)(0);
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
if (external_wp_element_namespaceObject.Children.count(children)) {
|
||||
@ -66578,6 +66424,13 @@ function Guide(_ref) {
|
||||
});
|
||||
}
|
||||
}, [children]);
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
var _focus$tabbable$find, _focus$tabbable$find$;
|
||||
|
||||
// Each time we change the current page, start from the first element of the page.
|
||||
// This also solves any focus loss that can happen.
|
||||
(_focus$tabbable$find = external_wp_dom_namespaceObject.focus.tabbable.find(guideContainer.current)) === null || _focus$tabbable$find === void 0 ? void 0 : (_focus$tabbable$find$ = _focus$tabbable$find[0]) === null || _focus$tabbable$find$ === void 0 ? void 0 : _focus$tabbable$find$.focus();
|
||||
}, [currentPage]);
|
||||
|
||||
if (external_wp_element_namespaceObject.Children.count(children)) {
|
||||
pages = external_wp_element_namespaceObject.Children.map(children, child => ({
|
||||
@ -66614,7 +66467,8 @@ function Guide(_ref) {
|
||||
} else if (event.keyCode === external_wp_keycodes_namespaceObject.RIGHT) {
|
||||
goForward();
|
||||
}
|
||||
}
|
||||
},
|
||||
ref: guideContainer
|
||||
}, (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
className: "components-guide__container"
|
||||
}, (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
@ -66623,10 +66477,7 @@ function Guide(_ref) {
|
||||
currentPage: currentPage,
|
||||
numberOfPages: pages.length,
|
||||
setCurrentPage: setCurrentPage
|
||||
}), pages[currentPage].content, !canGoForward && (0,external_wp_element_namespaceObject.createElement)(FinishButton, {
|
||||
className: "components-guide__inline-finish-button",
|
||||
onClick: onFinish
|
||||
}, finishButtonText || (0,external_wp_i18n_namespaceObject.__)('Finish'))), (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
}), pages[currentPage].content), (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
className: "components-guide__footer"
|
||||
}, canGoBack && (0,external_wp_element_namespaceObject.createElement)(build_module_button, {
|
||||
className: "components-guide__back-button",
|
||||
@ -66634,7 +66485,7 @@ function Guide(_ref) {
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Previous')), canGoForward && (0,external_wp_element_namespaceObject.createElement)(build_module_button, {
|
||||
className: "components-guide__forward-button",
|
||||
onClick: goForward
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Next')), !canGoForward && (0,external_wp_element_namespaceObject.createElement)(FinishButton, {
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Next')), !canGoForward && (0,external_wp_element_namespaceObject.createElement)(build_module_button, {
|
||||
className: "components-guide__finish-button",
|
||||
onClick: onFinish
|
||||
}, finishButtonText || (0,external_wp_i18n_namespaceObject.__)('Finish')))));
|
||||
|
10
wp-includes/js/dist/components.min.js
vendored
10
wp-includes/js/dist/components.min.js
vendored
File diff suppressed because one or more lines are too long
68
wp-includes/js/dist/data.js
vendored
68
wp-includes/js/dist/data.js
vendored
@ -675,29 +675,29 @@ function kindOf(val) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Redux store that holds the state tree.
|
||||
* The only way to change the data in the store is to call `dispatch()` on it.
|
||||
* @deprecated
|
||||
*
|
||||
* There should only be a single store in your app. To specify how different
|
||||
* parts of the state tree respond to actions, you may combine several reducers
|
||||
* into a single reducer function by using `combineReducers`.
|
||||
* **We recommend using the `configureStore` method
|
||||
* of the `@reduxjs/toolkit` package**, which replaces `createStore`.
|
||||
*
|
||||
* @param {Function} reducer A function that returns the next state tree, given
|
||||
* the current state tree and the action to handle.
|
||||
* Redux Toolkit is our recommended approach for writing Redux logic today,
|
||||
* including store setup, reducers, data fetching, and more.
|
||||
*
|
||||
* @param {any} [preloadedState] The initial state. You may optionally specify it
|
||||
* to hydrate the state from the server in universal apps, or to restore a
|
||||
* previously serialized user session.
|
||||
* If you use `combineReducers` to produce the root reducer function, this must be
|
||||
* an object with the same shape as `combineReducers` keys.
|
||||
* **For more details, please read this Redux docs page:**
|
||||
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
|
||||
*
|
||||
* @param {Function} [enhancer] The store enhancer. You may optionally specify it
|
||||
* to enhance the store with third-party capabilities such as middleware,
|
||||
* time travel, persistence, etc. The only store enhancer that ships with Redux
|
||||
* is `applyMiddleware()`.
|
||||
* `configureStore` from Redux Toolkit is an improved version of `createStore` that
|
||||
* simplifies setup and helps avoid common bugs.
|
||||
*
|
||||
* You should not be using the `redux` core package by itself today, except for learning purposes.
|
||||
* The `createStore` method from the core `redux` package will not be removed, but we encourage
|
||||
* all users to migrate to using Redux Toolkit for all Redux code.
|
||||
*
|
||||
* If you want to use `createStore` without this visual deprecation warning, use
|
||||
* the `legacy_createStore` import instead:
|
||||
*
|
||||
* `import { legacy_createStore as createStore} from 'redux'`
|
||||
*
|
||||
* @returns {Store} A Redux store that lets you read the state, dispatch actions
|
||||
* and subscribe to changes.
|
||||
*/
|
||||
|
||||
function createStore(reducer, preloadedState, enhancer) {
|
||||
@ -947,6 +947,38 @@ function createStore(reducer, preloadedState, enhancer) {
|
||||
replaceReducer: replaceReducer
|
||||
}, _ref2[$$observable] = observable, _ref2;
|
||||
}
|
||||
/**
|
||||
* Creates a Redux store that holds the state tree.
|
||||
*
|
||||
* **We recommend using `configureStore` from the
|
||||
* `@reduxjs/toolkit` package**, which replaces `createStore`:
|
||||
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
|
||||
*
|
||||
* The only way to change the data in the store is to call `dispatch()` on it.
|
||||
*
|
||||
* There should only be a single store in your app. To specify how different
|
||||
* parts of the state tree respond to actions, you may combine several reducers
|
||||
* into a single reducer function by using `combineReducers`.
|
||||
*
|
||||
* @param {Function} reducer A function that returns the next state tree, given
|
||||
* the current state tree and the action to handle.
|
||||
*
|
||||
* @param {any} [preloadedState] The initial state. You may optionally specify it
|
||||
* to hydrate the state from the server in universal apps, or to restore a
|
||||
* previously serialized user session.
|
||||
* If you use `combineReducers` to produce the root reducer function, this must be
|
||||
* an object with the same shape as `combineReducers` keys.
|
||||
*
|
||||
* @param {Function} [enhancer] The store enhancer. You may optionally specify it
|
||||
* to enhance the store with third-party capabilities such as middleware,
|
||||
* time travel, persistence, etc. The only store enhancer that ships with Redux
|
||||
* is `applyMiddleware()`.
|
||||
*
|
||||
* @returns {Store} A Redux store that lets you read the state, dispatch actions
|
||||
* and subscribe to changes.
|
||||
*/
|
||||
|
||||
var legacy_createStore = (/* unused pure expression or super */ null && (createStore));
|
||||
|
||||
/**
|
||||
* Prints a warning in the console if it exists.
|
||||
|
7
wp-includes/js/dist/edit-post.js
vendored
7
wp-includes/js/dist/edit-post.js
vendored
@ -8653,8 +8653,6 @@ function StartPageOptions() {
|
||||
|
||||
|
||||
const interfaceLabels = {
|
||||
secondarySidebar: (0,external_wp_i18n_namespaceObject.__)('Block library'),
|
||||
|
||||
/* translators: accessibility text for the editor top bar landmark region. */
|
||||
header: (0,external_wp_i18n_namespaceObject.__)('Editor top bar'),
|
||||
|
||||
@ -8758,6 +8756,7 @@ function Layout(_ref) {
|
||||
|
||||
setEntitiesSavedStatesCallback(false);
|
||||
}, [entitiesSavedStatesCallback]);
|
||||
const secondarySidebarLabel = isListViewOpened ? (0,external_wp_i18n_namespaceObject.__)('List View') : (0,external_wp_i18n_namespaceObject.__)('Block Library');
|
||||
|
||||
const secondarySidebar = () => {
|
||||
if (mode === 'visual' && isInserterOpened) {
|
||||
@ -8781,7 +8780,9 @@ function Layout(_ref) {
|
||||
isActive: isFullscreenActive
|
||||
}), (0,external_wp_element_namespaceObject.createElement)(browser_url, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.UnsavedChangesWarning, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.AutosaveMonitor, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.LocalAutosaveMonitor, null), (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.EditorKeyboardShortcutsRegister, null), (0,external_wp_element_namespaceObject.createElement)(settings_sidebar, null), (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, {
|
||||
className: className,
|
||||
labels: interfaceLabels,
|
||||
labels: { ...interfaceLabels,
|
||||
secondarySidebar: secondarySidebarLabel
|
||||
},
|
||||
header: (0,external_wp_element_namespaceObject.createElement)(header, {
|
||||
setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback
|
||||
}),
|
||||
|
2
wp-includes/js/dist/edit-post.min.js
vendored
2
wp-includes/js/dist/edit-post.min.js
vendored
File diff suppressed because one or more lines are too long
10
wp-includes/js/dist/edit-site.js
vendored
10
wp-includes/js/dist/edit-site.js
vendored
@ -12021,7 +12021,6 @@ function useTitle(title) {
|
||||
|
||||
|
||||
const interfaceLabels = {
|
||||
secondarySidebar: (0,external_wp_i18n_namespaceObject.__)('Block Library'),
|
||||
drawer: (0,external_wp_i18n_namespaceObject.__)('Navigation Sidebar')
|
||||
};
|
||||
|
||||
@ -12118,13 +12117,14 @@ function Editor(_ref) {
|
||||
}, [enableComplementaryArea]); // Don't render the Editor until the settings are set and loaded.
|
||||
|
||||
const isReady = (settings === null || settings === void 0 ? void 0 : settings.siteUrl) && templateType !== undefined && entityId !== undefined;
|
||||
const secondarySidebarLabel = isListViewOpen ? (0,external_wp_i18n_namespaceObject.__)('List View') : (0,external_wp_i18n_namespaceObject.__)('Block Library');
|
||||
|
||||
const secondarySidebar = () => {
|
||||
if (isInserterOpen) {
|
||||
if (editorMode === 'visual' && isInserterOpen) {
|
||||
return (0,external_wp_element_namespaceObject.createElement)(InserterSidebar, null);
|
||||
}
|
||||
|
||||
if (isListViewOpen) {
|
||||
if (editorMode === 'visual' && isListViewOpen) {
|
||||
return (0,external_wp_element_namespaceObject.createElement)(ListViewSidebar, null);
|
||||
}
|
||||
|
||||
@ -12146,7 +12146,9 @@ function Editor(_ref) {
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(GlobalStylesRenderer, null), (0,external_wp_element_namespaceObject.createElement)(ErrorBoundary, {
|
||||
onError: onError
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts.Register, null), (0,external_wp_element_namespaceObject.createElement)(SidebarComplementaryAreaFills, null), (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, {
|
||||
labels: interfaceLabels,
|
||||
labels: { ...interfaceLabels,
|
||||
secondarySidebar: secondarySidebarLabel
|
||||
},
|
||||
className: showIconLabels && 'show-icon-labels',
|
||||
secondarySidebar: secondarySidebar(),
|
||||
sidebar: sidebarIsOpened && (0,external_wp_element_namespaceObject.createElement)(complementary_area.Slot, {
|
||||
|
2
wp-includes/js/dist/edit-site.min.js
vendored
2
wp-includes/js/dist/edit-site.min.js
vendored
File diff suppressed because one or more lines are too long
5
wp-includes/js/dist/edit-widgets.js
vendored
5
wp-includes/js/dist/edit-widgets.js
vendored
@ -4308,9 +4308,12 @@ function Interface(_ref) {
|
||||
closeGeneralSidebar();
|
||||
}
|
||||
}, [isInserterOpened, isListViewOpened, isHugeViewport]);
|
||||
const secondarySidebarLabel = isListViewOpened ? (0,external_wp_i18n_namespaceObject.__)('List View') : (0,external_wp_i18n_namespaceObject.__)('Block Library');
|
||||
const hasSecondarySidebar = isListViewOpened || isInserterOpened;
|
||||
return (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, {
|
||||
labels: interfaceLabels,
|
||||
labels: { ...interfaceLabels,
|
||||
secondarySidebar: secondarySidebarLabel
|
||||
},
|
||||
header: (0,external_wp_element_namespaceObject.createElement)(header, null),
|
||||
secondarySidebar: hasSecondarySidebar && (0,external_wp_element_namespaceObject.createElement)(SecondarySidebar, null),
|
||||
sidebar: hasSidebarEnabled && (0,external_wp_element_namespaceObject.createElement)(complementary_area.Slot, {
|
||||
|
2
wp-includes/js/dist/edit-widgets.min.js
vendored
2
wp-includes/js/dist/edit-widgets.min.js
vendored
File diff suppressed because one or more lines are too long
16
wp-includes/js/dist/editor.js
vendored
16
wp-includes/js/dist/editor.js
vendored
@ -5384,13 +5384,13 @@ function EntityRecordItem(_ref) {
|
||||
|
||||
|
||||
|
||||
function getEntityDescription(entity, length) {
|
||||
function getEntityDescription(entity, count) {
|
||||
switch (entity) {
|
||||
case 'site':
|
||||
return (0,external_wp_i18n_namespaceObject._n)('This change will affect your whole site.', 'These changes will affect your whole site.', length);
|
||||
return 1 === count ? (0,external_wp_i18n_namespaceObject.__)('This change will affect your whole site.') : (0,external_wp_i18n_namespaceObject.__)('These changes will affect your whole site.');
|
||||
|
||||
case 'wp_template':
|
||||
return (0,external_wp_i18n_namespaceObject._n)('This change will affect pages and posts that use this template.', 'These changes will affect pages and posts that use these templates.', length);
|
||||
return (0,external_wp_i18n_namespaceObject.__)('This change will affect pages and posts that use this template.');
|
||||
|
||||
case 'page':
|
||||
case 'post':
|
||||
@ -5405,14 +5405,20 @@ function EntityTypeList(_ref) {
|
||||
setUnselectedEntities,
|
||||
closePanel
|
||||
} = _ref;
|
||||
const count = list.length;
|
||||
const firstRecord = list[0];
|
||||
const entityConfig = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getEntityConfig(firstRecord.kind, firstRecord.name), [firstRecord.kind, firstRecord.name]);
|
||||
const {
|
||||
name
|
||||
} = firstRecord;
|
||||
const entityLabel = name === 'wp_template_part' ? (0,external_wp_i18n_namespaceObject._n)('Template Part', 'Template Parts', list.length) : entityConfig.label; // Set description based on type of entity.
|
||||
let entityLabel = entityConfig.label;
|
||||
|
||||
const description = getEntityDescription(name, list.length);
|
||||
if (name === 'wp_template_part') {
|
||||
entityLabel = 1 === count ? (0,external_wp_i18n_namespaceObject.__)('Template Part') : (0,external_wp_i18n_namespaceObject.__)('Template Parts');
|
||||
} // Set description based on type of entity.
|
||||
|
||||
|
||||
const description = getEntityDescription(name, count);
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
|
||||
title: entityLabel,
|
||||
initialOpen: true
|
||||
|
2
wp-includes/js/dist/editor.min.js
vendored
2
wp-includes/js/dist/editor.min.js
vendored
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-beta1-53218';
|
||||
$wp_version = '6.0-beta1-53219';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user