Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: block-editor.js
getSelectedBlockClientIds,
[55000] Fix | Delete
isBlockValid,
[55001] Fix | Delete
getBlockRootClientId,
[55002] Fix | Delete
getBlockEditingMode,
[55003] Fix | Delete
getBlockAttributes
[55004] Fix | Delete
} = select(store);
[55005] Fix | Delete
const selectedBlockClientIds = getSelectedBlockClientIds();
[55006] Fix | Delete
const selectedBlockClientId = selectedBlockClientIds[0];
[55007] Fix | Delete
const blockRootClientId = getBlockRootClientId(selectedBlockClientId);
[55008] Fix | Delete
const parents = getBlockParents(selectedBlockClientId);
[55009] Fix | Delete
const firstParentClientId = parents[parents.length - 1];
[55010] Fix | Delete
const parentBlockName = getBlockName(firstParentClientId);
[55011] Fix | Delete
const parentBlockType = (0,external_wp_blocks_namespaceObject.getBlockType)(parentBlockName);
[55012] Fix | Delete
const _isDefaultEditingMode = getBlockEditingMode(selectedBlockClientId) === 'default';
[55013] Fix | Delete
const _blockName = getBlockName(selectedBlockClientId);
[55014] Fix | Delete
const isValid = selectedBlockClientIds.every(id => isBlockValid(id));
[55015] Fix | Delete
const isVisual = selectedBlockClientIds.every(id => getBlockMode(id) === 'visual');
[55016] Fix | Delete
const _isUsingBindings = selectedBlockClientIds.every(clientId => !!getBlockAttributes(clientId)?.metadata?.bindings);
[55017] Fix | Delete
return {
[55018] Fix | Delete
blockClientId: selectedBlockClientId,
[55019] Fix | Delete
blockClientIds: selectedBlockClientIds,
[55020] Fix | Delete
isDefaultEditingMode: _isDefaultEditingMode,
[55021] Fix | Delete
blockType: selectedBlockClientId && (0,external_wp_blocks_namespaceObject.getBlockType)(_blockName),
[55022] Fix | Delete
shouldShowVisualToolbar: isValid && isVisual,
[55023] Fix | Delete
rootClientId: blockRootClientId,
[55024] Fix | Delete
toolbarKey: `${selectedBlockClientId}${firstParentClientId}`,
[55025] Fix | Delete
showParentSelector: parentBlockType && getBlockEditingMode(firstParentClientId) === 'default' && (0,external_wp_blocks_namespaceObject.hasBlockSupport)(parentBlockType, '__experimentalParentSelector', true) && selectedBlockClientIds.length === 1 && _isDefaultEditingMode,
[55026] Fix | Delete
isUsingBindings: _isUsingBindings
[55027] Fix | Delete
};
[55028] Fix | Delete
}, []);
[55029] Fix | Delete
const toolbarWrapperRef = (0,external_wp_element_namespaceObject.useRef)(null);
[55030] Fix | Delete
[55031] Fix | Delete
// Handles highlighting the current block outline on hover or focus of the
[55032] Fix | Delete
// block type toolbar area.
[55033] Fix | Delete
const nodeRef = (0,external_wp_element_namespaceObject.useRef)();
[55034] Fix | Delete
const showHoveredOrFocusedGestures = useShowHoveredOrFocusedGestures({
[55035] Fix | Delete
ref: nodeRef
[55036] Fix | Delete
});
[55037] Fix | Delete
const isLargeViewport = !(0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
[55038] Fix | Delete
const hasBlockToolbar = useHasBlockToolbar();
[55039] Fix | Delete
if (!hasBlockToolbar) {
[55040] Fix | Delete
return null;
[55041] Fix | Delete
}
[55042] Fix | Delete
const isMultiToolbar = blockClientIds.length > 1;
[55043] Fix | Delete
const isSynced = (0,external_wp_blocks_namespaceObject.isReusableBlock)(blockType) || (0,external_wp_blocks_namespaceObject.isTemplatePart)(blockType);
[55044] Fix | Delete
[55045] Fix | Delete
// Shifts the toolbar to make room for the parent block selector.
[55046] Fix | Delete
const classes = dist_clsx('block-editor-block-contextual-toolbar', {
[55047] Fix | Delete
'has-parent': showParentSelector
[55048] Fix | Delete
});
[55049] Fix | Delete
const innerClasses = dist_clsx('block-editor-block-toolbar', {
[55050] Fix | Delete
'is-synced': isSynced,
[55051] Fix | Delete
'is-connected': isUsingBindings
[55052] Fix | Delete
});
[55053] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableToolbar, {
[55054] Fix | Delete
focusEditorOnEscape: true,
[55055] Fix | Delete
className: classes
[55056] Fix | Delete
/* translators: accessibility text for the block toolbar */,
[55057] Fix | Delete
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Block tools')
[55058] Fix | Delete
// The variant is applied as "toolbar" when undefined, which is the black border style of the dropdown from the toolbar popover.
[55059] Fix | Delete
,
[55060] Fix | Delete
variant: variant === 'toolbar' ? undefined : variant,
[55061] Fix | Delete
focusOnMount: focusOnMount,
[55062] Fix | Delete
__experimentalInitialIndex: __experimentalInitialIndex,
[55063] Fix | Delete
__experimentalOnIndexChange: __experimentalOnIndexChange
[55064] Fix | Delete
// Resets the index whenever the active block changes so
[55065] Fix | Delete
// this is not persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169
[55066] Fix | Delete
,
[55067] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[55068] Fix | Delete
ref: toolbarWrapperRef,
[55069] Fix | Delete
className: innerClasses,
[55070] Fix | Delete
children: [!isMultiToolbar && isLargeViewport && isDefaultEditingMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockParentSelector, {}), (shouldShowVisualToolbar || isMultiToolbar) && (isDefaultEditingMode || isSynced) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[55071] Fix | Delete
ref: nodeRef,
[55072] Fix | Delete
...showHoveredOrFocusedGestures,
[55073] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, {
[55074] Fix | Delete
className: "block-editor-block-toolbar__block-controls",
[55075] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_switcher, {
[55076] Fix | Delete
clientIds: blockClientIds,
[55077] Fix | Delete
disabled: !isDefaultEditingMode,
[55078] Fix | Delete
isUsingBindings: isUsingBindings
[55079] Fix | Delete
}), isDefaultEditingMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[55080] Fix | Delete
children: [!isMultiToolbar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockLockToolbar, {
[55081] Fix | Delete
clientId: blockClientId
[55082] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_mover, {
[55083] Fix | Delete
clientIds: blockClientIds,
[55084] Fix | Delete
hideDragHandle: hideDragHandle
[55085] Fix | Delete
})]
[55086] Fix | Delete
})]
[55087] Fix | Delete
})
[55088] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Shuffle, {
[55089] Fix | Delete
clientId: blockClientId
[55090] Fix | Delete
}), shouldShowVisualToolbar && isMultiToolbar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(toolbar, {}), shouldShowVisualToolbar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[55091] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_controls.Slot, {
[55092] Fix | Delete
group: "parent",
[55093] Fix | Delete
className: "block-editor-block-toolbar__slot"
[55094] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_controls.Slot, {
[55095] Fix | Delete
group: "block",
[55096] Fix | Delete
className: "block-editor-block-toolbar__slot"
[55097] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_controls.Slot, {
[55098] Fix | Delete
className: "block-editor-block-toolbar__slot"
[55099] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_controls.Slot, {
[55100] Fix | Delete
group: "inline",
[55101] Fix | Delete
className: "block-editor-block-toolbar__slot"
[55102] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_controls.Slot, {
[55103] Fix | Delete
group: "other",
[55104] Fix | Delete
className: "block-editor-block-toolbar__slot"
[55105] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_name_context.Provider, {
[55106] Fix | Delete
value: blockType?.name,
[55107] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_toolbar_last_item.Slot, {})
[55108] Fix | Delete
})]
[55109] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEditVisuallyButton, {
[55110] Fix | Delete
clientIds: blockClientIds
[55111] Fix | Delete
}), isDefaultEditingMode && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_settings_menu, {
[55112] Fix | Delete
clientIds: blockClientIds
[55113] Fix | Delete
})]
[55114] Fix | Delete
})
[55115] Fix | Delete
}, toolbarKey);
[55116] Fix | Delete
}
[55117] Fix | Delete
[55118] Fix | Delete
/**
[55119] Fix | Delete
* Renders the block toolbar.
[55120] Fix | Delete
*
[55121] Fix | Delete
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-toolbar/README.md
[55122] Fix | Delete
*
[55123] Fix | Delete
* @param {Object} props Components props.
[55124] Fix | Delete
* @param {boolean} props.hideDragHandle Show or hide the Drag Handle for drag and drop functionality.
[55125] Fix | Delete
* @param {string} props.variant Style variant of the toolbar, also passed to the Dropdowns rendered from Block Toolbar Buttons.
[55126] Fix | Delete
*/
[55127] Fix | Delete
function BlockToolbar({
[55128] Fix | Delete
hideDragHandle,
[55129] Fix | Delete
variant
[55130] Fix | Delete
}) {
[55131] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PrivateBlockToolbar, {
[55132] Fix | Delete
hideDragHandle: hideDragHandle,
[55133] Fix | Delete
variant: variant,
[55134] Fix | Delete
focusOnMount: undefined,
[55135] Fix | Delete
__experimentalInitialIndex: undefined,
[55136] Fix | Delete
__experimentalOnIndexChange: undefined
[55137] Fix | Delete
});
[55138] Fix | Delete
}
[55139] Fix | Delete
[55140] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/block-toolbar-popover.js
[55141] Fix | Delete
/**
[55142] Fix | Delete
* External dependencies
[55143] Fix | Delete
*/
[55144] Fix | Delete
[55145] Fix | Delete
/**
[55146] Fix | Delete
* WordPress dependencies
[55147] Fix | Delete
*/
[55148] Fix | Delete
[55149] Fix | Delete
[55150] Fix | Delete
[55151] Fix | Delete
/**
[55152] Fix | Delete
* Internal dependencies
[55153] Fix | Delete
*/
[55154] Fix | Delete
[55155] Fix | Delete
[55156] Fix | Delete
[55157] Fix | Delete
[55158] Fix | Delete
[55159] Fix | Delete
[55160] Fix | Delete
function BlockToolbarPopover({
[55161] Fix | Delete
clientId,
[55162] Fix | Delete
isTyping,
[55163] Fix | Delete
__unstableContentRef
[55164] Fix | Delete
}) {
[55165] Fix | Delete
const {
[55166] Fix | Delete
capturingClientId,
[55167] Fix | Delete
isInsertionPointVisible,
[55168] Fix | Delete
lastClientId
[55169] Fix | Delete
} = useSelectedBlockToolProps(clientId);
[55170] Fix | Delete
[55171] Fix | Delete
// Stores the active toolbar item index so the block toolbar can return focus
[55172] Fix | Delete
// to it when re-mounting.
[55173] Fix | Delete
const initialToolbarItemIndexRef = (0,external_wp_element_namespaceObject.useRef)();
[55174] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[55175] Fix | Delete
// Resets the index whenever the active block changes so this is not
[55176] Fix | Delete
// persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169
[55177] Fix | Delete
initialToolbarItemIndexRef.current = undefined;
[55178] Fix | Delete
}, [clientId]);
[55179] Fix | Delete
const {
[55180] Fix | Delete
stopTyping
[55181] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[55182] Fix | Delete
const isToolbarForced = (0,external_wp_element_namespaceObject.useRef)(false);
[55183] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/block-editor/focus-toolbar', () => {
[55184] Fix | Delete
isToolbarForced.current = true;
[55185] Fix | Delete
stopTyping(true);
[55186] Fix | Delete
});
[55187] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[55188] Fix | Delete
isToolbarForced.current = false;
[55189] Fix | Delete
});
[55190] Fix | Delete
const popoverProps = useBlockToolbarPopoverProps({
[55191] Fix | Delete
contentElement: __unstableContentRef?.current,
[55192] Fix | Delete
clientId
[55193] Fix | Delete
});
[55194] Fix | Delete
return !isTyping && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_popover, {
[55195] Fix | Delete
clientId: capturingClientId || clientId,
[55196] Fix | Delete
bottomClientId: lastClientId,
[55197] Fix | Delete
className: dist_clsx('block-editor-block-list__block-popover', {
[55198] Fix | Delete
'is-insertion-point-visible': isInsertionPointVisible
[55199] Fix | Delete
}),
[55200] Fix | Delete
resize: false,
[55201] Fix | Delete
...popoverProps,
[55202] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PrivateBlockToolbar
[55203] Fix | Delete
// If the toolbar is being shown because of being forced
[55204] Fix | Delete
// it should focus the toolbar right after the mount.
[55205] Fix | Delete
, {
[55206] Fix | Delete
focusOnMount: isToolbarForced.current,
[55207] Fix | Delete
__experimentalInitialIndex: initialToolbarItemIndexRef.current,
[55208] Fix | Delete
__experimentalOnIndexChange: index => {
[55209] Fix | Delete
initialToolbarItemIndexRef.current = index;
[55210] Fix | Delete
},
[55211] Fix | Delete
variant: "toolbar"
[55212] Fix | Delete
})
[55213] Fix | Delete
});
[55214] Fix | Delete
}
[55215] Fix | Delete
[55216] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/trash.js
[55217] Fix | Delete
/**
[55218] Fix | Delete
* WordPress dependencies
[55219] Fix | Delete
*/
[55220] Fix | Delete
[55221] Fix | Delete
[55222] Fix | Delete
const trash = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[55223] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[55224] Fix | Delete
viewBox: "0 0 24 24",
[55225] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[55226] Fix | Delete
fillRule: "evenodd",
[55227] Fix | Delete
clipRule: "evenodd",
[55228] Fix | Delete
d: "M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"
[55229] Fix | Delete
})
[55230] Fix | Delete
});
[55231] Fix | Delete
/* harmony default export */ const library_trash = (trash);
[55232] Fix | Delete
[55233] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/block-selection-button.js
[55234] Fix | Delete
/**
[55235] Fix | Delete
* External dependencies
[55236] Fix | Delete
*/
[55237] Fix | Delete
[55238] Fix | Delete
[55239] Fix | Delete
/**
[55240] Fix | Delete
* WordPress dependencies
[55241] Fix | Delete
*/
[55242] Fix | Delete
[55243] Fix | Delete
[55244] Fix | Delete
[55245] Fix | Delete
[55246] Fix | Delete
[55247] Fix | Delete
[55248] Fix | Delete
[55249] Fix | Delete
[55250] Fix | Delete
[55251] Fix | Delete
[55252] Fix | Delete
/**
[55253] Fix | Delete
* Internal dependencies
[55254] Fix | Delete
*/
[55255] Fix | Delete
[55256] Fix | Delete
[55257] Fix | Delete
[55258] Fix | Delete
[55259] Fix | Delete
[55260] Fix | Delete
[55261] Fix | Delete
[55262] Fix | Delete
[55263] Fix | Delete
/**
[55264] Fix | Delete
* Block selection button component, displaying the label of the block. If the block
[55265] Fix | Delete
* descends from a root block, a button is displayed enabling the user to select
[55266] Fix | Delete
* the root block.
[55267] Fix | Delete
*
[55268] Fix | Delete
* @param {string} props Component props.
[55269] Fix | Delete
* @param {string} props.clientId Client ID of block.
[55270] Fix | Delete
*
[55271] Fix | Delete
* @return {Component} The component to be rendered.
[55272] Fix | Delete
*/
[55273] Fix | Delete
[55274] Fix | Delete
[55275] Fix | Delete
function BlockSelectionButton({
[55276] Fix | Delete
clientId,
[55277] Fix | Delete
rootClientId
[55278] Fix | Delete
}) {
[55279] Fix | Delete
const selected = (0,external_wp_data_namespaceObject.useSelect)(select => {
[55280] Fix | Delete
const {
[55281] Fix | Delete
getBlock,
[55282] Fix | Delete
getBlockIndex,
[55283] Fix | Delete
hasBlockMovingClientId,
[55284] Fix | Delete
getBlockListSettings,
[55285] Fix | Delete
__unstableGetEditorMode,
[55286] Fix | Delete
getNextBlockClientId,
[55287] Fix | Delete
getPreviousBlockClientId,
[55288] Fix | Delete
canRemoveBlock,
[55289] Fix | Delete
canMoveBlock
[55290] Fix | Delete
} = select(store);
[55291] Fix | Delete
const {
[55292] Fix | Delete
getActiveBlockVariation,
[55293] Fix | Delete
getBlockType
[55294] Fix | Delete
} = select(external_wp_blocks_namespaceObject.store);
[55295] Fix | Delete
const index = getBlockIndex(clientId);
[55296] Fix | Delete
const {
[55297] Fix | Delete
name,
[55298] Fix | Delete
attributes
[55299] Fix | Delete
} = getBlock(clientId);
[55300] Fix | Delete
const blockType = getBlockType(name);
[55301] Fix | Delete
const orientation = getBlockListSettings(rootClientId)?.orientation;
[55302] Fix | Delete
const match = getActiveBlockVariation(name, attributes);
[55303] Fix | Delete
const isBlockTemplatePart = blockType?.name === 'core/template-part';
[55304] Fix | Delete
let isNextBlockTemplatePart = false;
[55305] Fix | Delete
const nextClientId = getNextBlockClientId();
[55306] Fix | Delete
if (nextClientId) {
[55307] Fix | Delete
const {
[55308] Fix | Delete
name: nextName
[55309] Fix | Delete
} = getBlock(nextClientId);
[55310] Fix | Delete
const nextBlockType = getBlockType(nextName);
[55311] Fix | Delete
isNextBlockTemplatePart = nextBlockType?.name === 'core/template-part';
[55312] Fix | Delete
}
[55313] Fix | Delete
let isPrevBlockTemplatePart = false;
[55314] Fix | Delete
const prevClientId = getPreviousBlockClientId();
[55315] Fix | Delete
if (prevClientId) {
[55316] Fix | Delete
const {
[55317] Fix | Delete
name: prevName
[55318] Fix | Delete
} = getBlock(prevClientId);
[55319] Fix | Delete
const prevBlockType = getBlockType(prevName);
[55320] Fix | Delete
isPrevBlockTemplatePart = prevBlockType?.name === 'core/template-part';
[55321] Fix | Delete
}
[55322] Fix | Delete
return {
[55323] Fix | Delete
blockMovingMode: hasBlockMovingClientId(),
[55324] Fix | Delete
editorMode: __unstableGetEditorMode(),
[55325] Fix | Delete
icon: match?.icon || blockType.icon,
[55326] Fix | Delete
label: (0,external_wp_blocks_namespaceObject.__experimentalGetAccessibleBlockLabel)(blockType, attributes, index + 1, orientation),
[55327] Fix | Delete
isBlockTemplatePart,
[55328] Fix | Delete
isNextBlockTemplatePart,
[55329] Fix | Delete
isPrevBlockTemplatePart,
[55330] Fix | Delete
canRemove: canRemoveBlock(clientId),
[55331] Fix | Delete
canMove: canMoveBlock(clientId)
[55332] Fix | Delete
};
[55333] Fix | Delete
}, [clientId, rootClientId]);
[55334] Fix | Delete
const {
[55335] Fix | Delete
label,
[55336] Fix | Delete
icon,
[55337] Fix | Delete
blockMovingMode,
[55338] Fix | Delete
editorMode,
[55339] Fix | Delete
isBlockTemplatePart,
[55340] Fix | Delete
isNextBlockTemplatePart,
[55341] Fix | Delete
isPrevBlockTemplatePart,
[55342] Fix | Delete
canRemove,
[55343] Fix | Delete
canMove
[55344] Fix | Delete
} = selected;
[55345] Fix | Delete
const {
[55346] Fix | Delete
setNavigationMode,
[55347] Fix | Delete
removeBlock
[55348] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[55349] Fix | Delete
const ref = (0,external_wp_element_namespaceObject.useRef)();
[55350] Fix | Delete
[55351] Fix | Delete
// Focus the breadcrumb in navigation mode.
[55352] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[55353] Fix | Delete
if (editorMode === 'navigation') {
[55354] Fix | Delete
ref.current.focus();
[55355] Fix | Delete
(0,external_wp_a11y_namespaceObject.speak)(label);
[55356] Fix | Delete
}
[55357] Fix | Delete
}, [label, editorMode]);
[55358] Fix | Delete
const blockElement = useBlockElement(clientId);
[55359] Fix | Delete
const {
[55360] Fix | Delete
hasBlockMovingClientId,
[55361] Fix | Delete
getBlockIndex,
[55362] Fix | Delete
getBlockRootClientId,
[55363] Fix | Delete
getClientIdsOfDescendants,
[55364] Fix | Delete
getSelectedBlockClientId,
[55365] Fix | Delete
getMultiSelectedBlocksEndClientId,
[55366] Fix | Delete
getPreviousBlockClientId,
[55367] Fix | Delete
getNextBlockClientId
[55368] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store);
[55369] Fix | Delete
const {
[55370] Fix | Delete
selectBlock,
[55371] Fix | Delete
clearSelectedBlock,
[55372] Fix | Delete
setBlockMovingClientId,
[55373] Fix | Delete
moveBlockToPosition
[55374] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[55375] Fix | Delete
function onKeyDown(event) {
[55376] Fix | Delete
const {
[55377] Fix | Delete
keyCode
[55378] Fix | Delete
} = event;
[55379] Fix | Delete
const isUp = keyCode === external_wp_keycodes_namespaceObject.UP;
[55380] Fix | Delete
const isDown = keyCode === external_wp_keycodes_namespaceObject.DOWN;
[55381] Fix | Delete
const isLeft = keyCode === external_wp_keycodes_namespaceObject.LEFT;
[55382] Fix | Delete
const isRight = keyCode === external_wp_keycodes_namespaceObject.RIGHT;
[55383] Fix | Delete
const isTab = keyCode === external_wp_keycodes_namespaceObject.TAB;
[55384] Fix | Delete
const isEscape = keyCode === external_wp_keycodes_namespaceObject.ESCAPE;
[55385] Fix | Delete
const isEnter = keyCode === external_wp_keycodes_namespaceObject.ENTER;
[55386] Fix | Delete
const isSpace = keyCode === external_wp_keycodes_namespaceObject.SPACE;
[55387] Fix | Delete
const isShift = event.shiftKey;
[55388] Fix | Delete
if (isEscape && editorMode === 'navigation') {
[55389] Fix | Delete
setNavigationMode(false);
[55390] Fix | Delete
event.preventDefault();
[55391] Fix | Delete
return;
[55392] Fix | Delete
}
[55393] Fix | Delete
if (keyCode === external_wp_keycodes_namespaceObject.BACKSPACE || keyCode === external_wp_keycodes_namespaceObject.DELETE) {
[55394] Fix | Delete
removeBlock(clientId);
[55395] Fix | Delete
event.preventDefault();
[55396] Fix | Delete
return;
[55397] Fix | Delete
}
[55398] Fix | Delete
const selectedBlockClientId = getSelectedBlockClientId();
[55399] Fix | Delete
const selectionEndClientId = getMultiSelectedBlocksEndClientId();
[55400] Fix | Delete
const selectionBeforeEndClientId = getPreviousBlockClientId(selectionEndClientId || selectedBlockClientId);
[55401] Fix | Delete
const selectionAfterEndClientId = getNextBlockClientId(selectionEndClientId || selectedBlockClientId);
[55402] Fix | Delete
const navigateUp = isTab && isShift || isUp;
[55403] Fix | Delete
const navigateDown = isTab && !isShift || isDown;
[55404] Fix | Delete
// Move out of current nesting level (no effect if at root level).
[55405] Fix | Delete
const navigateOut = isLeft;
[55406] Fix | Delete
// Move into next nesting level (no effect if the current block has no innerBlocks).
[55407] Fix | Delete
const navigateIn = isRight;
[55408] Fix | Delete
let focusedBlockUid;
[55409] Fix | Delete
if (navigateUp) {
[55410] Fix | Delete
focusedBlockUid = selectionBeforeEndClientId;
[55411] Fix | Delete
} else if (navigateDown) {
[55412] Fix | Delete
focusedBlockUid = selectionAfterEndClientId;
[55413] Fix | Delete
} else if (navigateOut) {
[55414] Fix | Delete
var _getBlockRootClientId;
[55415] Fix | Delete
focusedBlockUid = (_getBlockRootClientId = getBlockRootClientId(selectedBlockClientId)) !== null && _getBlockRootClientId !== void 0 ? _getBlockRootClientId : selectedBlockClientId;
[55416] Fix | Delete
} else if (navigateIn) {
[55417] Fix | Delete
var _getClientIdsOfDescen;
[55418] Fix | Delete
focusedBlockUid = (_getClientIdsOfDescen = getClientIdsOfDescendants(selectedBlockClientId)[0]) !== null && _getClientIdsOfDescen !== void 0 ? _getClientIdsOfDescen : selectedBlockClientId;
[55419] Fix | Delete
}
[55420] Fix | Delete
const startingBlockClientId = hasBlockMovingClientId();
[55421] Fix | Delete
if (isEscape && startingBlockClientId && !event.defaultPrevented) {
[55422] Fix | Delete
setBlockMovingClientId(null);
[55423] Fix | Delete
event.preventDefault();
[55424] Fix | Delete
}
[55425] Fix | Delete
if ((isEnter || isSpace) && startingBlockClientId) {
[55426] Fix | Delete
const sourceRoot = getBlockRootClientId(startingBlockClientId);
[55427] Fix | Delete
const destRoot = getBlockRootClientId(selectedBlockClientId);
[55428] Fix | Delete
const sourceBlockIndex = getBlockIndex(startingBlockClientId);
[55429] Fix | Delete
let destinationBlockIndex = getBlockIndex(selectedBlockClientId);
[55430] Fix | Delete
if (sourceBlockIndex < destinationBlockIndex && sourceRoot === destRoot) {
[55431] Fix | Delete
destinationBlockIndex -= 1;
[55432] Fix | Delete
}
[55433] Fix | Delete
moveBlockToPosition(startingBlockClientId, sourceRoot, destRoot, destinationBlockIndex);
[55434] Fix | Delete
selectBlock(startingBlockClientId);
[55435] Fix | Delete
setBlockMovingClientId(null);
[55436] Fix | Delete
}
[55437] Fix | Delete
// Prevent the block from being moved into itself.
[55438] Fix | Delete
if (startingBlockClientId && selectedBlockClientId === startingBlockClientId && navigateIn) {
[55439] Fix | Delete
return;
[55440] Fix | Delete
}
[55441] Fix | Delete
if (navigateDown || navigateUp || navigateOut || navigateIn) {
[55442] Fix | Delete
if (focusedBlockUid) {
[55443] Fix | Delete
event.preventDefault();
[55444] Fix | Delete
selectBlock(focusedBlockUid);
[55445] Fix | Delete
} else if (isTab && selectedBlockClientId) {
[55446] Fix | Delete
let nextTabbable;
[55447] Fix | Delete
if (navigateDown) {
[55448] Fix | Delete
nextTabbable = blockElement;
[55449] Fix | Delete
do {
[55450] Fix | Delete
nextTabbable = external_wp_dom_namespaceObject.focus.tabbable.findNext(nextTabbable);
[55451] Fix | Delete
} while (nextTabbable && blockElement.contains(nextTabbable));
[55452] Fix | Delete
if (!nextTabbable) {
[55453] Fix | Delete
nextTabbable = blockElement.ownerDocument.defaultView.frameElement;
[55454] Fix | Delete
nextTabbable = external_wp_dom_namespaceObject.focus.tabbable.findNext(nextTabbable);
[55455] Fix | Delete
}
[55456] Fix | Delete
} else {
[55457] Fix | Delete
nextTabbable = external_wp_dom_namespaceObject.focus.tabbable.findPrevious(blockElement);
[55458] Fix | Delete
}
[55459] Fix | Delete
if (nextTabbable) {
[55460] Fix | Delete
event.preventDefault();
[55461] Fix | Delete
nextTabbable.focus();
[55462] Fix | Delete
clearSelectedBlock();
[55463] Fix | Delete
}
[55464] Fix | Delete
}
[55465] Fix | Delete
}
[55466] Fix | Delete
}
[55467] Fix | Delete
const classNames = dist_clsx('block-editor-block-list__block-selection-button', {
[55468] Fix | Delete
'is-block-moving-mode': !!blockMovingMode
[55469] Fix | Delete
});
[55470] Fix | Delete
const dragHandleLabel = (0,external_wp_i18n_namespaceObject.__)('Drag');
[55471] Fix | Delete
const showBlockDraggable = canMove && editorMode === 'navigation' || editorMode === 'zoom-out' && canMove && !isBlockTemplatePart;
[55472] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[55473] Fix | Delete
className: classNames,
[55474] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
[55475] Fix | Delete
justify: "center",
[55476] Fix | Delete
className: "block-editor-block-list__block-selection-button__content",
[55477] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
[55478] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_icon, {
[55479] Fix | Delete
icon: icon,
[55480] Fix | Delete
showColors: true
[55481] Fix | Delete
})
[55482] Fix | Delete
}), showBlockDraggable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
[55483] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_draggable, {
[55484] Fix | Delete
clientIds: [clientId],
[55485] Fix | Delete
children: draggableProps => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[55486] Fix | Delete
icon: drag_handle,
[55487] Fix | Delete
className: "block-selection-button_drag-handle",
[55488] Fix | Delete
"aria-hidden": "true",
[55489] Fix | Delete
label: dragHandleLabel
[55490] Fix | Delete
// Should not be able to tab to drag handle as this
[55491] Fix | Delete
// button can only be used with a pointer device.
[55492] Fix | Delete
,
[55493] Fix | Delete
tabIndex: "-1",
[55494] Fix | Delete
...draggableProps
[55495] Fix | Delete
})
[55496] Fix | Delete
})
[55497] Fix | Delete
}), editorMode === 'zoom-out' && !isBlockTemplatePart && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
[55498] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_mover, {
[55499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function