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
return (0,external_wp_i18n_namespaceObject.isRTL)() ? 'right' : 'left';
[51500] Fix | Delete
}
[51501] Fix | Delete
return 'up';
[51502] Fix | Delete
} else if (moveDirection === 'down') {
[51503] Fix | Delete
if (orientation === 'horizontal') {
[51504] Fix | Delete
return (0,external_wp_i18n_namespaceObject.isRTL)() ? 'left' : 'right';
[51505] Fix | Delete
}
[51506] Fix | Delete
return 'down';
[51507] Fix | Delete
}
[51508] Fix | Delete
return null;
[51509] Fix | Delete
};
[51510] Fix | Delete
[51511] Fix | Delete
/**
[51512] Fix | Delete
* Return a label for the block movement controls depending on block position.
[51513] Fix | Delete
*
[51514] Fix | Delete
* @param {number} selectedCount Number of blocks selected.
[51515] Fix | Delete
* @param {string} type Block type - in the case of a single block, should
[51516] Fix | Delete
* define its 'type'. I.e. 'Text', 'Heading', 'Image' etc.
[51517] Fix | Delete
* @param {number} firstIndex The index (position - 1) of the first block selected.
[51518] Fix | Delete
* @param {boolean} isFirst This is the first block.
[51519] Fix | Delete
* @param {boolean} isLast This is the last block.
[51520] Fix | Delete
* @param {number} dir Direction of movement (> 0 is considered to be going
[51521] Fix | Delete
* down, < 0 is up).
[51522] Fix | Delete
* @param {string} orientation The orientation of the block movers, vertical or
[51523] Fix | Delete
* horizontal.
[51524] Fix | Delete
*
[51525] Fix | Delete
* @return {string | undefined} Label for the block movement controls.
[51526] Fix | Delete
*/
[51527] Fix | Delete
function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLast, dir, orientation) {
[51528] Fix | Delete
const position = firstIndex + 1;
[51529] Fix | Delete
if (selectedCount > 1) {
[51530] Fix | Delete
return getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir, orientation);
[51531] Fix | Delete
}
[51532] Fix | Delete
if (isFirst && isLast) {
[51533] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51534] Fix | Delete
// translators: %s: Type of block (i.e. Text, Image etc)
[51535] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Block %s is the only block, and cannot be moved'), type);
[51536] Fix | Delete
}
[51537] Fix | Delete
if (dir > 0 && !isLast) {
[51538] Fix | Delete
// Moving down.
[51539] Fix | Delete
const movementDirection = getMovementDirection('down', orientation);
[51540] Fix | Delete
if (movementDirection === 'down') {
[51541] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51542] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
[51543] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$s block from position %2$d down to position %3$d'), type, position, position + 1);
[51544] Fix | Delete
}
[51545] Fix | Delete
if (movementDirection === 'left') {
[51546] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51547] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
[51548] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$s block from position %2$d left to position %3$d'), type, position, position + 1);
[51549] Fix | Delete
}
[51550] Fix | Delete
if (movementDirection === 'right') {
[51551] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51552] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
[51553] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$s block from position %2$d right to position %3$d'), type, position, position + 1);
[51554] Fix | Delete
}
[51555] Fix | Delete
}
[51556] Fix | Delete
if (dir > 0 && isLast) {
[51557] Fix | Delete
// Moving down, and is the last item.
[51558] Fix | Delete
const movementDirection = getMovementDirection('down', orientation);
[51559] Fix | Delete
if (movementDirection === 'down') {
[51560] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51561] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc)
[51562] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Block %1$s is at the end of the content and can’t be moved down'), type);
[51563] Fix | Delete
}
[51564] Fix | Delete
if (movementDirection === 'left') {
[51565] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51566] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc)
[51567] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Block %1$s is at the end of the content and can’t be moved left'), type);
[51568] Fix | Delete
}
[51569] Fix | Delete
if (movementDirection === 'right') {
[51570] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51571] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc)
[51572] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Block %1$s is at the end of the content and can’t be moved right'), type);
[51573] Fix | Delete
}
[51574] Fix | Delete
}
[51575] Fix | Delete
if (dir < 0 && !isFirst) {
[51576] Fix | Delete
// Moving up.
[51577] Fix | Delete
const movementDirection = getMovementDirection('up', orientation);
[51578] Fix | Delete
if (movementDirection === 'up') {
[51579] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51580] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
[51581] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$s block from position %2$d up to position %3$d'), type, position, position - 1);
[51582] Fix | Delete
}
[51583] Fix | Delete
if (movementDirection === 'left') {
[51584] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51585] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
[51586] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$s block from position %2$d left to position %3$d'), type, position, position - 1);
[51587] Fix | Delete
}
[51588] Fix | Delete
if (movementDirection === 'right') {
[51589] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51590] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
[51591] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$s block from position %2$d right to position %3$d'), type, position, position - 1);
[51592] Fix | Delete
}
[51593] Fix | Delete
}
[51594] Fix | Delete
if (dir < 0 && isFirst) {
[51595] Fix | Delete
// Moving up, and is the first item.
[51596] Fix | Delete
const movementDirection = getMovementDirection('up', orientation);
[51597] Fix | Delete
if (movementDirection === 'up') {
[51598] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51599] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc)
[51600] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Block %1$s is at the beginning of the content and can’t be moved up'), type);
[51601] Fix | Delete
}
[51602] Fix | Delete
if (movementDirection === 'left') {
[51603] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51604] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc)
[51605] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Block %1$s is at the beginning of the content and can’t be moved left'), type);
[51606] Fix | Delete
}
[51607] Fix | Delete
if (movementDirection === 'right') {
[51608] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51609] Fix | Delete
// translators: 1: Type of block (i.e. Text, Image etc)
[51610] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Block %1$s is at the beginning of the content and can’t be moved right'), type);
[51611] Fix | Delete
}
[51612] Fix | Delete
}
[51613] Fix | Delete
}
[51614] Fix | Delete
[51615] Fix | Delete
/**
[51616] Fix | Delete
* Return a label for the block movement controls depending on block position.
[51617] Fix | Delete
*
[51618] Fix | Delete
* @param {number} selectedCount Number of blocks selected.
[51619] Fix | Delete
* @param {number} firstIndex The index (position - 1) of the first block selected.
[51620] Fix | Delete
* @param {boolean} isFirst This is the first block.
[51621] Fix | Delete
* @param {boolean} isLast This is the last block.
[51622] Fix | Delete
* @param {number} dir Direction of movement (> 0 is considered to be going
[51623] Fix | Delete
* down, < 0 is up).
[51624] Fix | Delete
* @param {string} orientation The orientation of the block movers, vertical or
[51625] Fix | Delete
* horizontal.
[51626] Fix | Delete
*
[51627] Fix | Delete
* @return {string | undefined} Label for the block movement controls.
[51628] Fix | Delete
*/
[51629] Fix | Delete
function getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir, orientation) {
[51630] Fix | Delete
const position = firstIndex + 1;
[51631] Fix | Delete
if (isFirst && isLast) {
[51632] Fix | Delete
// All blocks are selected
[51633] Fix | Delete
return (0,external_wp_i18n_namespaceObject.__)('All blocks are selected, and cannot be moved');
[51634] Fix | Delete
}
[51635] Fix | Delete
if (dir > 0 && !isLast) {
[51636] Fix | Delete
// moving down
[51637] Fix | Delete
const movementDirection = getMovementDirection('down', orientation);
[51638] Fix | Delete
if (movementDirection === 'down') {
[51639] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51640] Fix | Delete
// translators: 1: Number of selected blocks, 2: Position of selected blocks
[51641] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$d blocks from position %2$d down by one place'), selectedCount, position);
[51642] Fix | Delete
}
[51643] Fix | Delete
if (movementDirection === 'left') {
[51644] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51645] Fix | Delete
// translators: 1: Number of selected blocks, 2: Position of selected blocks
[51646] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$d blocks from position %2$d left by one place'), selectedCount, position);
[51647] Fix | Delete
}
[51648] Fix | Delete
if (movementDirection === 'right') {
[51649] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51650] Fix | Delete
// translators: 1: Number of selected blocks, 2: Position of selected blocks
[51651] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$d blocks from position %2$d right by one place'), selectedCount, position);
[51652] Fix | Delete
}
[51653] Fix | Delete
}
[51654] Fix | Delete
if (dir > 0 && isLast) {
[51655] Fix | Delete
// moving down, and the selected blocks are the last item
[51656] Fix | Delete
const movementDirection = getMovementDirection('down', orientation);
[51657] Fix | Delete
if (movementDirection === 'down') {
[51658] Fix | Delete
return (0,external_wp_i18n_namespaceObject.__)('Blocks cannot be moved down as they are already at the bottom');
[51659] Fix | Delete
}
[51660] Fix | Delete
if (movementDirection === 'left') {
[51661] Fix | Delete
return (0,external_wp_i18n_namespaceObject.__)('Blocks cannot be moved left as they are already are at the leftmost position');
[51662] Fix | Delete
}
[51663] Fix | Delete
if (movementDirection === 'right') {
[51664] Fix | Delete
return (0,external_wp_i18n_namespaceObject.__)('Blocks cannot be moved right as they are already are at the rightmost position');
[51665] Fix | Delete
}
[51666] Fix | Delete
}
[51667] Fix | Delete
if (dir < 0 && !isFirst) {
[51668] Fix | Delete
// moving up
[51669] Fix | Delete
const movementDirection = getMovementDirection('up', orientation);
[51670] Fix | Delete
if (movementDirection === 'up') {
[51671] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51672] Fix | Delete
// translators: 1: Number of selected blocks, 2: Position of selected blocks
[51673] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$d blocks from position %2$d up by one place'), selectedCount, position);
[51674] Fix | Delete
}
[51675] Fix | Delete
if (movementDirection === 'left') {
[51676] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51677] Fix | Delete
// translators: 1: Number of selected blocks, 2: Position of selected blocks
[51678] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$d blocks from position %2$d left by one place'), selectedCount, position);
[51679] Fix | Delete
}
[51680] Fix | Delete
if (movementDirection === 'right') {
[51681] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[51682] Fix | Delete
// translators: 1: Number of selected blocks, 2: Position of selected blocks
[51683] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Move %1$d blocks from position %2$d right by one place'), selectedCount, position);
[51684] Fix | Delete
}
[51685] Fix | Delete
}
[51686] Fix | Delete
if (dir < 0 && isFirst) {
[51687] Fix | Delete
// moving up, and the selected blocks are the first item
[51688] Fix | Delete
const movementDirection = getMovementDirection('up', orientation);
[51689] Fix | Delete
if (movementDirection === 'up') {
[51690] Fix | Delete
return (0,external_wp_i18n_namespaceObject.__)('Blocks cannot be moved up as they are already at the top');
[51691] Fix | Delete
}
[51692] Fix | Delete
if (movementDirection === 'left') {
[51693] Fix | Delete
return (0,external_wp_i18n_namespaceObject.__)('Blocks cannot be moved left as they are already are at the leftmost position');
[51694] Fix | Delete
}
[51695] Fix | Delete
if (movementDirection === 'right') {
[51696] Fix | Delete
return (0,external_wp_i18n_namespaceObject.__)('Blocks cannot be moved right as they are already are at the rightmost position');
[51697] Fix | Delete
}
[51698] Fix | Delete
}
[51699] Fix | Delete
}
[51700] Fix | Delete
[51701] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-mover/button.js
[51702] Fix | Delete
/**
[51703] Fix | Delete
* External dependencies
[51704] Fix | Delete
*/
[51705] Fix | Delete
[51706] Fix | Delete
[51707] Fix | Delete
/**
[51708] Fix | Delete
* WordPress dependencies
[51709] Fix | Delete
*/
[51710] Fix | Delete
[51711] Fix | Delete
[51712] Fix | Delete
[51713] Fix | Delete
[51714] Fix | Delete
[51715] Fix | Delete
[51716] Fix | Delete
[51717] Fix | Delete
/**
[51718] Fix | Delete
* Internal dependencies
[51719] Fix | Delete
*/
[51720] Fix | Delete
[51721] Fix | Delete
[51722] Fix | Delete
[51723] Fix | Delete
[51724] Fix | Delete
[51725] Fix | Delete
[51726] Fix | Delete
const getArrowIcon = (direction, orientation) => {
[51727] Fix | Delete
if (direction === 'up') {
[51728] Fix | Delete
if (orientation === 'horizontal') {
[51729] Fix | Delete
return (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right : chevron_left;
[51730] Fix | Delete
}
[51731] Fix | Delete
return chevron_up;
[51732] Fix | Delete
} else if (direction === 'down') {
[51733] Fix | Delete
if (orientation === 'horizontal') {
[51734] Fix | Delete
return (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left : chevron_right;
[51735] Fix | Delete
}
[51736] Fix | Delete
return chevron_down;
[51737] Fix | Delete
}
[51738] Fix | Delete
return null;
[51739] Fix | Delete
};
[51740] Fix | Delete
const getMovementDirectionLabel = (moveDirection, orientation) => {
[51741] Fix | Delete
if (moveDirection === 'up') {
[51742] Fix | Delete
if (orientation === 'horizontal') {
[51743] Fix | Delete
return (0,external_wp_i18n_namespaceObject.isRTL)() ? (0,external_wp_i18n_namespaceObject.__)('Move right') : (0,external_wp_i18n_namespaceObject.__)('Move left');
[51744] Fix | Delete
}
[51745] Fix | Delete
return (0,external_wp_i18n_namespaceObject.__)('Move up');
[51746] Fix | Delete
} else if (moveDirection === 'down') {
[51747] Fix | Delete
if (orientation === 'horizontal') {
[51748] Fix | Delete
return (0,external_wp_i18n_namespaceObject.isRTL)() ? (0,external_wp_i18n_namespaceObject.__)('Move left') : (0,external_wp_i18n_namespaceObject.__)('Move right');
[51749] Fix | Delete
}
[51750] Fix | Delete
return (0,external_wp_i18n_namespaceObject.__)('Move down');
[51751] Fix | Delete
}
[51752] Fix | Delete
return null;
[51753] Fix | Delete
};
[51754] Fix | Delete
const BlockMoverButton = (0,external_wp_element_namespaceObject.forwardRef)(({
[51755] Fix | Delete
clientIds,
[51756] Fix | Delete
direction,
[51757] Fix | Delete
orientation: moverOrientation,
[51758] Fix | Delete
...props
[51759] Fix | Delete
}, ref) => {
[51760] Fix | Delete
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(BlockMoverButton);
[51761] Fix | Delete
const normalizedClientIds = Array.isArray(clientIds) ? clientIds : [clientIds];
[51762] Fix | Delete
const blocksCount = normalizedClientIds.length;
[51763] Fix | Delete
const {
[51764] Fix | Delete
disabled
[51765] Fix | Delete
} = props;
[51766] Fix | Delete
const {
[51767] Fix | Delete
blockType,
[51768] Fix | Delete
isDisabled,
[51769] Fix | Delete
rootClientId,
[51770] Fix | Delete
isFirst,
[51771] Fix | Delete
isLast,
[51772] Fix | Delete
firstIndex,
[51773] Fix | Delete
orientation = 'vertical'
[51774] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[51775] Fix | Delete
const {
[51776] Fix | Delete
getBlockIndex,
[51777] Fix | Delete
getBlockRootClientId,
[51778] Fix | Delete
getBlockOrder,
[51779] Fix | Delete
getBlock,
[51780] Fix | Delete
getBlockListSettings
[51781] Fix | Delete
} = select(store);
[51782] Fix | Delete
const firstClientId = normalizedClientIds[0];
[51783] Fix | Delete
const blockRootClientId = getBlockRootClientId(firstClientId);
[51784] Fix | Delete
const firstBlockIndex = getBlockIndex(firstClientId);
[51785] Fix | Delete
const lastBlockIndex = getBlockIndex(normalizedClientIds[normalizedClientIds.length - 1]);
[51786] Fix | Delete
const blockOrder = getBlockOrder(blockRootClientId);
[51787] Fix | Delete
const block = getBlock(firstClientId);
[51788] Fix | Delete
const isFirstBlock = firstBlockIndex === 0;
[51789] Fix | Delete
const isLastBlock = lastBlockIndex === blockOrder.length - 1;
[51790] Fix | Delete
const {
[51791] Fix | Delete
orientation: blockListOrientation
[51792] Fix | Delete
} = getBlockListSettings(blockRootClientId) || {};
[51793] Fix | Delete
return {
[51794] Fix | Delete
blockType: block ? (0,external_wp_blocks_namespaceObject.getBlockType)(block.name) : null,
[51795] Fix | Delete
isDisabled: disabled || (direction === 'up' ? isFirstBlock : isLastBlock),
[51796] Fix | Delete
rootClientId: blockRootClientId,
[51797] Fix | Delete
firstIndex: firstBlockIndex,
[51798] Fix | Delete
isFirst: isFirstBlock,
[51799] Fix | Delete
isLast: isLastBlock,
[51800] Fix | Delete
orientation: moverOrientation || blockListOrientation
[51801] Fix | Delete
};
[51802] Fix | Delete
}, [clientIds, direction]);
[51803] Fix | Delete
const {
[51804] Fix | Delete
moveBlocksDown,
[51805] Fix | Delete
moveBlocksUp
[51806] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[51807] Fix | Delete
const moverFunction = direction === 'up' ? moveBlocksUp : moveBlocksDown;
[51808] Fix | Delete
const onClick = event => {
[51809] Fix | Delete
moverFunction(clientIds, rootClientId);
[51810] Fix | Delete
if (props.onClick) {
[51811] Fix | Delete
props.onClick(event);
[51812] Fix | Delete
}
[51813] Fix | Delete
};
[51814] Fix | Delete
const descriptionId = `block-editor-block-mover-button__description-${instanceId}`;
[51815] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[51816] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[51817] Fix | Delete
ref: ref,
[51818] Fix | Delete
className: dist_clsx('block-editor-block-mover-button', `is-${direction}-button`),
[51819] Fix | Delete
icon: getArrowIcon(direction, orientation),
[51820] Fix | Delete
label: getMovementDirectionLabel(direction, orientation),
[51821] Fix | Delete
"aria-describedby": descriptionId,
[51822] Fix | Delete
...props,
[51823] Fix | Delete
onClick: isDisabled ? null : onClick,
[51824] Fix | Delete
disabled: isDisabled,
[51825] Fix | Delete
__experimentalIsFocusable: true
[51826] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
[51827] Fix | Delete
id: descriptionId,
[51828] Fix | Delete
children: getBlockMoverDescription(blocksCount, blockType && blockType.title, firstIndex, isFirst, isLast, direction === 'up' ? -1 : 1, orientation)
[51829] Fix | Delete
})]
[51830] Fix | Delete
});
[51831] Fix | Delete
});
[51832] Fix | Delete
const BlockMoverUpButton = (0,external_wp_element_namespaceObject.forwardRef)((props, ref) => {
[51833] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockMoverButton, {
[51834] Fix | Delete
direction: "up",
[51835] Fix | Delete
ref: ref,
[51836] Fix | Delete
...props
[51837] Fix | Delete
});
[51838] Fix | Delete
});
[51839] Fix | Delete
const BlockMoverDownButton = (0,external_wp_element_namespaceObject.forwardRef)((props, ref) => {
[51840] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockMoverButton, {
[51841] Fix | Delete
direction: "down",
[51842] Fix | Delete
ref: ref,
[51843] Fix | Delete
...props
[51844] Fix | Delete
});
[51845] Fix | Delete
});
[51846] Fix | Delete
[51847] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-mover/index.js
[51848] Fix | Delete
/**
[51849] Fix | Delete
* External dependencies
[51850] Fix | Delete
*/
[51851] Fix | Delete
[51852] Fix | Delete
[51853] Fix | Delete
/**
[51854] Fix | Delete
* WordPress dependencies
[51855] Fix | Delete
*/
[51856] Fix | Delete
[51857] Fix | Delete
[51858] Fix | Delete
[51859] Fix | Delete
[51860] Fix | Delete
[51861] Fix | Delete
[51862] Fix | Delete
/**
[51863] Fix | Delete
* Internal dependencies
[51864] Fix | Delete
*/
[51865] Fix | Delete
[51866] Fix | Delete
[51867] Fix | Delete
[51868] Fix | Delete
[51869] Fix | Delete
[51870] Fix | Delete
function BlockMover({
[51871] Fix | Delete
clientIds,
[51872] Fix | Delete
hideDragHandle,
[51873] Fix | Delete
isBlockMoverUpButtonDisabled,
[51874] Fix | Delete
isBlockMoverDownButtonDisabled
[51875] Fix | Delete
}) {
[51876] Fix | Delete
const {
[51877] Fix | Delete
canMove,
[51878] Fix | Delete
rootClientId,
[51879] Fix | Delete
isFirst,
[51880] Fix | Delete
isLast,
[51881] Fix | Delete
orientation
[51882] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[51883] Fix | Delete
const {
[51884] Fix | Delete
getBlockIndex,
[51885] Fix | Delete
getBlockListSettings,
[51886] Fix | Delete
canMoveBlocks,
[51887] Fix | Delete
getBlockOrder,
[51888] Fix | Delete
getBlockRootClientId
[51889] Fix | Delete
} = select(store);
[51890] Fix | Delete
const normalizedClientIds = Array.isArray(clientIds) ? clientIds : [clientIds];
[51891] Fix | Delete
const firstClientId = normalizedClientIds[0];
[51892] Fix | Delete
const _rootClientId = getBlockRootClientId(firstClientId);
[51893] Fix | Delete
const firstIndex = getBlockIndex(firstClientId);
[51894] Fix | Delete
const lastIndex = getBlockIndex(normalizedClientIds[normalizedClientIds.length - 1]);
[51895] Fix | Delete
const blockOrder = getBlockOrder(_rootClientId);
[51896] Fix | Delete
return {
[51897] Fix | Delete
canMove: canMoveBlocks(clientIds),
[51898] Fix | Delete
rootClientId: _rootClientId,
[51899] Fix | Delete
isFirst: firstIndex === 0,
[51900] Fix | Delete
isLast: lastIndex === blockOrder.length - 1,
[51901] Fix | Delete
orientation: getBlockListSettings(_rootClientId)?.orientation
[51902] Fix | Delete
};
[51903] Fix | Delete
}, [clientIds]);
[51904] Fix | Delete
if (!canMove || isFirst && isLast && !rootClientId) {
[51905] Fix | Delete
return null;
[51906] Fix | Delete
}
[51907] Fix | Delete
const dragHandleLabel = (0,external_wp_i18n_namespaceObject.__)('Drag');
[51908] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, {
[51909] Fix | Delete
className: dist_clsx('block-editor-block-mover', {
[51910] Fix | Delete
'is-horizontal': orientation === 'horizontal'
[51911] Fix | Delete
}),
[51912] Fix | Delete
children: [!hideDragHandle && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_draggable, {
[51913] Fix | Delete
clientIds: clientIds,
[51914] Fix | Delete
fadeWhenDisabled: true,
[51915] Fix | Delete
children: draggableProps => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[51916] Fix | Delete
icon: drag_handle,
[51917] Fix | Delete
className: "block-editor-block-mover__drag-handle",
[51918] Fix | Delete
"aria-hidden": "true",
[51919] Fix | Delete
label: dragHandleLabel
[51920] Fix | Delete
// Should not be able to tab to drag handle as this
[51921] Fix | Delete
// button can only be used with a pointer device.
[51922] Fix | Delete
,
[51923] Fix | Delete
tabIndex: "-1",
[51924] Fix | Delete
...draggableProps
[51925] Fix | Delete
})
[51926] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[51927] Fix | Delete
className: "block-editor-block-mover__move-button-container",
[51928] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
[51929] Fix | Delete
children: itemProps => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockMoverUpButton, {
[51930] Fix | Delete
disabled: isBlockMoverUpButtonDisabled,
[51931] Fix | Delete
clientIds: clientIds,
[51932] Fix | Delete
...itemProps
[51933] Fix | Delete
})
[51934] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
[51935] Fix | Delete
children: itemProps => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockMoverDownButton, {
[51936] Fix | Delete
disabled: isBlockMoverDownButtonDisabled,
[51937] Fix | Delete
clientIds: clientIds,
[51938] Fix | Delete
...itemProps
[51939] Fix | Delete
})
[51940] Fix | Delete
})]
[51941] Fix | Delete
})]
[51942] Fix | Delete
});
[51943] Fix | Delete
}
[51944] Fix | Delete
[51945] Fix | Delete
/**
[51946] Fix | Delete
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-mover/README.md
[51947] Fix | Delete
*/
[51948] Fix | Delete
/* harmony default export */ const block_mover = (BlockMover);
[51949] Fix | Delete
[51950] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-toolbar/utils.js
[51951] Fix | Delete
/**
[51952] Fix | Delete
* WordPress dependencies
[51953] Fix | Delete
*/
[51954] Fix | Delete
[51955] Fix | Delete
[51956] Fix | Delete
[51957] Fix | Delete
/**
[51958] Fix | Delete
* Internal dependencies
[51959] Fix | Delete
*/
[51960] Fix | Delete
[51961] Fix | Delete
const {
[51962] Fix | Delete
clearTimeout: utils_clearTimeout,
[51963] Fix | Delete
setTimeout: utils_setTimeout
[51964] Fix | Delete
} = window;
[51965] Fix | Delete
const DEBOUNCE_TIMEOUT = 200;
[51966] Fix | Delete
[51967] Fix | Delete
/**
[51968] Fix | Delete
* Hook that creates debounced callbacks when the node is hovered or focused.
[51969] Fix | Delete
*
[51970] Fix | Delete
* @param {Object} props Component props.
[51971] Fix | Delete
* @param {Object} props.ref Element reference.
[51972] Fix | Delete
* @param {boolean} props.isFocused Whether the component has current focus.
[51973] Fix | Delete
* @param {number} props.highlightParent Whether to highlight the parent block. It defaults in highlighting the selected block.
[51974] Fix | Delete
* @param {number} [props.debounceTimeout=250] Debounce timeout in milliseconds.
[51975] Fix | Delete
*/
[51976] Fix | Delete
function useDebouncedShowGestures({
[51977] Fix | Delete
ref,
[51978] Fix | Delete
isFocused,
[51979] Fix | Delete
highlightParent,
[51980] Fix | Delete
debounceTimeout = DEBOUNCE_TIMEOUT
[51981] Fix | Delete
}) {
[51982] Fix | Delete
const {
[51983] Fix | Delete
getSelectedBlockClientId,
[51984] Fix | Delete
getBlockRootClientId
[51985] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store);
[51986] Fix | Delete
const {
[51987] Fix | Delete
toggleBlockHighlight
[51988] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[51989] Fix | Delete
const timeoutRef = (0,external_wp_element_namespaceObject.useRef)();
[51990] Fix | Delete
const isDistractionFree = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getSettings().isDistractionFree, []);
[51991] Fix | Delete
const handleOnChange = nextIsFocused => {
[51992] Fix | Delete
if (nextIsFocused && isDistractionFree) {
[51993] Fix | Delete
return;
[51994] Fix | Delete
}
[51995] Fix | Delete
const selectedBlockClientId = getSelectedBlockClientId();
[51996] Fix | Delete
const clientId = highlightParent ? getBlockRootClientId(selectedBlockClientId) : selectedBlockClientId;
[51997] Fix | Delete
toggleBlockHighlight(clientId, nextIsFocused);
[51998] Fix | Delete
};
[51999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function