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
// vertical position of the visible content area, plus the height
[51000] Fix | Delete
// of the block toolbar.
[51001] Fix | Delete
const restrictedTopArea = topOfContentElementInViewport + toolbarHeight;
[51002] Fix | Delete
const hasSpaceForToolbarAbove = blockRect.top > restrictedTopArea;
[51003] Fix | Delete
const isBlockTallerThanViewport = blockRect.height > viewportHeight - toolbarHeight;
[51004] Fix | Delete
[51005] Fix | Delete
// Sticky blocks are treated as if they will never have enough space for the toolbar above.
[51006] Fix | Delete
if (!isSticky && (hasSpaceForToolbarAbove || isBlockTallerThanViewport)) {
[51007] Fix | Delete
return DEFAULT_PROPS;
[51008] Fix | Delete
}
[51009] Fix | Delete
return RESTRICTED_HEIGHT_PROPS;
[51010] Fix | Delete
}
[51011] Fix | Delete
[51012] Fix | Delete
/**
[51013] Fix | Delete
* Determines the desired popover positioning behavior, returning a set of appropriate props.
[51014] Fix | Delete
*
[51015] Fix | Delete
* @param {Object} elements
[51016] Fix | Delete
* @param {Element} elements.contentElement The DOM element that represents the editor content or canvas.
[51017] Fix | Delete
* @param {string} elements.clientId The clientId of the first selected block.
[51018] Fix | Delete
*
[51019] Fix | Delete
* @return {Object} The popover props used to determine the position of the toolbar.
[51020] Fix | Delete
*/
[51021] Fix | Delete
function useBlockToolbarPopoverProps({
[51022] Fix | Delete
contentElement,
[51023] Fix | Delete
clientId
[51024] Fix | Delete
}) {
[51025] Fix | Delete
const selectedBlockElement = useBlockElement(clientId);
[51026] Fix | Delete
const [toolbarHeight, setToolbarHeight] = (0,external_wp_element_namespaceObject.useState)(0);
[51027] Fix | Delete
const {
[51028] Fix | Delete
blockIndex,
[51029] Fix | Delete
isSticky
[51030] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[51031] Fix | Delete
const {
[51032] Fix | Delete
getBlockIndex,
[51033] Fix | Delete
getBlockAttributes
[51034] Fix | Delete
} = select(store);
[51035] Fix | Delete
return {
[51036] Fix | Delete
blockIndex: getBlockIndex(clientId),
[51037] Fix | Delete
isSticky: hasStickyOrFixedPositionValue(getBlockAttributes(clientId))
[51038] Fix | Delete
};
[51039] Fix | Delete
}, [clientId]);
[51040] Fix | Delete
const scrollContainer = (0,external_wp_element_namespaceObject.useMemo)(() => {
[51041] Fix | Delete
if (!contentElement) {
[51042] Fix | Delete
return;
[51043] Fix | Delete
}
[51044] Fix | Delete
return (0,external_wp_dom_namespaceObject.getScrollContainer)(contentElement);
[51045] Fix | Delete
}, [contentElement]);
[51046] Fix | Delete
const [props, setProps] = (0,external_wp_element_namespaceObject.useState)(() => getProps(contentElement, selectedBlockElement, scrollContainer, toolbarHeight, isSticky));
[51047] Fix | Delete
const popoverRef = (0,external_wp_compose_namespaceObject.useRefEffect)(popoverNode => {
[51048] Fix | Delete
setToolbarHeight(popoverNode.offsetHeight);
[51049] Fix | Delete
}, []);
[51050] Fix | Delete
const updateProps = (0,external_wp_element_namespaceObject.useCallback)(() => setProps(getProps(contentElement, selectedBlockElement, scrollContainer, toolbarHeight, isSticky)), [contentElement, selectedBlockElement, scrollContainer, toolbarHeight]);
[51051] Fix | Delete
[51052] Fix | Delete
// Update props when the block is moved. This also ensures the props are
[51053] Fix | Delete
// correct on initial mount, and when the selected block or content element
[51054] Fix | Delete
// changes (since the callback ref will update).
[51055] Fix | Delete
(0,external_wp_element_namespaceObject.useLayoutEffect)(updateProps, [blockIndex, updateProps]);
[51056] Fix | Delete
[51057] Fix | Delete
// Update props when the viewport is resized or the block is resized.
[51058] Fix | Delete
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
[51059] Fix | Delete
if (!contentElement || !selectedBlockElement) {
[51060] Fix | Delete
return;
[51061] Fix | Delete
}
[51062] Fix | Delete
[51063] Fix | Delete
// Update the toolbar props on viewport resize.
[51064] Fix | Delete
const contentView = contentElement?.ownerDocument?.defaultView;
[51065] Fix | Delete
contentView?.addEventHandler?.('resize', updateProps);
[51066] Fix | Delete
[51067] Fix | Delete
// Update the toolbar props on block resize.
[51068] Fix | Delete
let resizeObserver;
[51069] Fix | Delete
const blockView = selectedBlockElement?.ownerDocument?.defaultView;
[51070] Fix | Delete
if (blockView.ResizeObserver) {
[51071] Fix | Delete
resizeObserver = new blockView.ResizeObserver(updateProps);
[51072] Fix | Delete
resizeObserver.observe(selectedBlockElement);
[51073] Fix | Delete
}
[51074] Fix | Delete
return () => {
[51075] Fix | Delete
contentView?.removeEventHandler?.('resize', updateProps);
[51076] Fix | Delete
if (resizeObserver) {
[51077] Fix | Delete
resizeObserver.disconnect();
[51078] Fix | Delete
}
[51079] Fix | Delete
};
[51080] Fix | Delete
}, [updateProps, contentElement, selectedBlockElement]);
[51081] Fix | Delete
return {
[51082] Fix | Delete
...props,
[51083] Fix | Delete
ref: popoverRef
[51084] Fix | Delete
};
[51085] Fix | Delete
}
[51086] Fix | Delete
[51087] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/use-selected-block-tool-props.js
[51088] Fix | Delete
/**
[51089] Fix | Delete
* WordPress dependencies
[51090] Fix | Delete
*/
[51091] Fix | Delete
[51092] Fix | Delete
[51093] Fix | Delete
/**
[51094] Fix | Delete
* Internal dependencies
[51095] Fix | Delete
*/
[51096] Fix | Delete
[51097] Fix | Delete
[51098] Fix | Delete
/**
[51099] Fix | Delete
* Returns props for the selected block tools and empty block inserter.
[51100] Fix | Delete
*
[51101] Fix | Delete
* @param {string} clientId Selected block client ID.
[51102] Fix | Delete
*/
[51103] Fix | Delete
function useSelectedBlockToolProps(clientId) {
[51104] Fix | Delete
const selectedBlockProps = (0,external_wp_data_namespaceObject.useSelect)(select => {
[51105] Fix | Delete
const {
[51106] Fix | Delete
getBlockRootClientId,
[51107] Fix | Delete
getBlockParents,
[51108] Fix | Delete
__experimentalGetBlockListSettingsForBlocks,
[51109] Fix | Delete
isBlockInsertionPointVisible,
[51110] Fix | Delete
getBlockInsertionPoint,
[51111] Fix | Delete
getBlockOrder,
[51112] Fix | Delete
hasMultiSelection,
[51113] Fix | Delete
getLastMultiSelectedBlockClientId
[51114] Fix | Delete
} = select(store);
[51115] Fix | Delete
const blockParentsClientIds = getBlockParents(clientId);
[51116] Fix | Delete
[51117] Fix | Delete
// Get Block List Settings for all ancestors of the current Block clientId.
[51118] Fix | Delete
const parentBlockListSettings = __experimentalGetBlockListSettingsForBlocks(blockParentsClientIds);
[51119] Fix | Delete
[51120] Fix | Delete
// Get the clientId of the topmost parent with the capture toolbars setting.
[51121] Fix | Delete
const capturingClientId = blockParentsClientIds.find(parentClientId => parentBlockListSettings[parentClientId]?.__experimentalCaptureToolbars);
[51122] Fix | Delete
let isInsertionPointVisible = false;
[51123] Fix | Delete
if (isBlockInsertionPointVisible()) {
[51124] Fix | Delete
const insertionPoint = getBlockInsertionPoint();
[51125] Fix | Delete
const order = getBlockOrder(insertionPoint.rootClientId);
[51126] Fix | Delete
isInsertionPointVisible = order[insertionPoint.index] === clientId;
[51127] Fix | Delete
}
[51128] Fix | Delete
return {
[51129] Fix | Delete
capturingClientId,
[51130] Fix | Delete
isInsertionPointVisible,
[51131] Fix | Delete
lastClientId: hasMultiSelection() ? getLastMultiSelectedBlockClientId() : null,
[51132] Fix | Delete
rootClientId: getBlockRootClientId(clientId)
[51133] Fix | Delete
};
[51134] Fix | Delete
}, [clientId]);
[51135] Fix | Delete
return selectedBlockProps;
[51136] Fix | Delete
}
[51137] Fix | Delete
[51138] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/empty-block-inserter.js
[51139] Fix | Delete
/**
[51140] Fix | Delete
* External dependencies
[51141] Fix | Delete
*/
[51142] Fix | Delete
[51143] Fix | Delete
[51144] Fix | Delete
/**
[51145] Fix | Delete
* Internal dependencies
[51146] Fix | Delete
*/
[51147] Fix | Delete
[51148] Fix | Delete
[51149] Fix | Delete
[51150] Fix | Delete
[51151] Fix | Delete
[51152] Fix | Delete
function EmptyBlockInserter({
[51153] Fix | Delete
clientId,
[51154] Fix | Delete
__unstableContentRef
[51155] Fix | Delete
}) {
[51156] Fix | Delete
const {
[51157] Fix | Delete
capturingClientId,
[51158] Fix | Delete
isInsertionPointVisible,
[51159] Fix | Delete
lastClientId,
[51160] Fix | Delete
rootClientId
[51161] Fix | Delete
} = useSelectedBlockToolProps(clientId);
[51162] Fix | Delete
const popoverProps = useBlockToolbarPopoverProps({
[51163] Fix | Delete
contentElement: __unstableContentRef?.current,
[51164] Fix | Delete
clientId
[51165] Fix | Delete
});
[51166] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(cover, {
[51167] Fix | Delete
clientId: capturingClientId || clientId,
[51168] Fix | Delete
bottomClientId: lastClientId,
[51169] Fix | Delete
className: dist_clsx('block-editor-block-list__block-side-inserter-popover', {
[51170] Fix | Delete
'is-insertion-point-visible': isInsertionPointVisible
[51171] Fix | Delete
}),
[51172] Fix | Delete
__unstableContentRef: __unstableContentRef,
[51173] Fix | Delete
...popoverProps,
[51174] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[51175] Fix | Delete
className: "block-editor-block-list__empty-block-inserter",
[51176] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(inserter, {
[51177] Fix | Delete
position: "bottom right",
[51178] Fix | Delete
rootClientId: rootClientId,
[51179] Fix | Delete
clientId: clientId,
[51180] Fix | Delete
__experimentalIsQuick: true
[51181] Fix | Delete
})
[51182] Fix | Delete
})
[51183] Fix | Delete
});
[51184] Fix | Delete
}
[51185] Fix | Delete
[51186] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-draggable/use-scroll-when-dragging.js
[51187] Fix | Delete
/**
[51188] Fix | Delete
* WordPress dependencies
[51189] Fix | Delete
*/
[51190] Fix | Delete
[51191] Fix | Delete
[51192] Fix | Delete
const SCROLL_INACTIVE_DISTANCE_PX = 50;
[51193] Fix | Delete
const SCROLL_INTERVAL_MS = 25;
[51194] Fix | Delete
const PIXELS_PER_SECOND_PER_PERCENTAGE = 1000;
[51195] Fix | Delete
const VELOCITY_MULTIPLIER = PIXELS_PER_SECOND_PER_PERCENTAGE * (SCROLL_INTERVAL_MS / 1000);
[51196] Fix | Delete
[51197] Fix | Delete
/**
[51198] Fix | Delete
* React hook that scrolls the scroll container when a block is being dragged.
[51199] Fix | Delete
*
[51200] Fix | Delete
* @return {Function[]} `startScrolling`, `scrollOnDragOver`, `stopScrolling`
[51201] Fix | Delete
* functions to be called in `onDragStart`, `onDragOver`
[51202] Fix | Delete
* and `onDragEnd` events respectively.
[51203] Fix | Delete
*/
[51204] Fix | Delete
function useScrollWhenDragging() {
[51205] Fix | Delete
const dragStartY = (0,external_wp_element_namespaceObject.useRef)(null);
[51206] Fix | Delete
const velocityY = (0,external_wp_element_namespaceObject.useRef)(null);
[51207] Fix | Delete
const scrollParentY = (0,external_wp_element_namespaceObject.useRef)(null);
[51208] Fix | Delete
const scrollEditorInterval = (0,external_wp_element_namespaceObject.useRef)(null);
[51209] Fix | Delete
[51210] Fix | Delete
// Clear interval when unmounting.
[51211] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => () => {
[51212] Fix | Delete
if (scrollEditorInterval.current) {
[51213] Fix | Delete
clearInterval(scrollEditorInterval.current);
[51214] Fix | Delete
scrollEditorInterval.current = null;
[51215] Fix | Delete
}
[51216] Fix | Delete
}, []);
[51217] Fix | Delete
const startScrolling = (0,external_wp_element_namespaceObject.useCallback)(event => {
[51218] Fix | Delete
dragStartY.current = event.clientY;
[51219] Fix | Delete
[51220] Fix | Delete
// Find nearest parent(s) to scroll.
[51221] Fix | Delete
scrollParentY.current = (0,external_wp_dom_namespaceObject.getScrollContainer)(event.target);
[51222] Fix | Delete
scrollEditorInterval.current = setInterval(() => {
[51223] Fix | Delete
if (scrollParentY.current && velocityY.current) {
[51224] Fix | Delete
const newTop = scrollParentY.current.scrollTop + velocityY.current;
[51225] Fix | Delete
[51226] Fix | Delete
// Setting `behavior: 'smooth'` as a scroll property seems to hurt performance.
[51227] Fix | Delete
// Better to use a small scroll interval.
[51228] Fix | Delete
scrollParentY.current.scroll({
[51229] Fix | Delete
top: newTop
[51230] Fix | Delete
});
[51231] Fix | Delete
}
[51232] Fix | Delete
}, SCROLL_INTERVAL_MS);
[51233] Fix | Delete
}, []);
[51234] Fix | Delete
const scrollOnDragOver = (0,external_wp_element_namespaceObject.useCallback)(event => {
[51235] Fix | Delete
if (!scrollParentY.current) {
[51236] Fix | Delete
return;
[51237] Fix | Delete
}
[51238] Fix | Delete
const scrollParentHeight = scrollParentY.current.offsetHeight;
[51239] Fix | Delete
const offsetDragStartPosition = dragStartY.current - scrollParentY.current.offsetTop;
[51240] Fix | Delete
const offsetDragPosition = event.clientY - scrollParentY.current.offsetTop;
[51241] Fix | Delete
if (event.clientY > offsetDragStartPosition) {
[51242] Fix | Delete
// User is dragging downwards.
[51243] Fix | Delete
const moveableDistance = Math.max(scrollParentHeight - offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
[51244] Fix | Delete
const dragDistance = Math.max(offsetDragPosition - offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
[51245] Fix | Delete
const distancePercentage = moveableDistance === 0 || dragDistance === 0 ? 0 : dragDistance / moveableDistance;
[51246] Fix | Delete
velocityY.current = VELOCITY_MULTIPLIER * distancePercentage;
[51247] Fix | Delete
} else if (event.clientY < offsetDragStartPosition) {
[51248] Fix | Delete
// User is dragging upwards.
[51249] Fix | Delete
const moveableDistance = Math.max(offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
[51250] Fix | Delete
const dragDistance = Math.max(offsetDragStartPosition - offsetDragPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
[51251] Fix | Delete
const distancePercentage = moveableDistance === 0 || dragDistance === 0 ? 0 : dragDistance / moveableDistance;
[51252] Fix | Delete
velocityY.current = -VELOCITY_MULTIPLIER * distancePercentage;
[51253] Fix | Delete
} else {
[51254] Fix | Delete
velocityY.current = 0;
[51255] Fix | Delete
}
[51256] Fix | Delete
}, []);
[51257] Fix | Delete
const stopScrolling = () => {
[51258] Fix | Delete
dragStartY.current = null;
[51259] Fix | Delete
scrollParentY.current = null;
[51260] Fix | Delete
if (scrollEditorInterval.current) {
[51261] Fix | Delete
clearInterval(scrollEditorInterval.current);
[51262] Fix | Delete
scrollEditorInterval.current = null;
[51263] Fix | Delete
}
[51264] Fix | Delete
};
[51265] Fix | Delete
return [startScrolling, scrollOnDragOver, stopScrolling];
[51266] Fix | Delete
}
[51267] Fix | Delete
[51268] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-draggable/index.js
[51269] Fix | Delete
/**
[51270] Fix | Delete
* WordPress dependencies
[51271] Fix | Delete
*/
[51272] Fix | Delete
[51273] Fix | Delete
[51274] Fix | Delete
[51275] Fix | Delete
[51276] Fix | Delete
[51277] Fix | Delete
[51278] Fix | Delete
/**
[51279] Fix | Delete
* Internal dependencies
[51280] Fix | Delete
*/
[51281] Fix | Delete
[51282] Fix | Delete
[51283] Fix | Delete
[51284] Fix | Delete
[51285] Fix | Delete
[51286] Fix | Delete
[51287] Fix | Delete
const BlockDraggable = ({
[51288] Fix | Delete
appendToOwnerDocument,
[51289] Fix | Delete
children,
[51290] Fix | Delete
clientIds,
[51291] Fix | Delete
cloneClassname,
[51292] Fix | Delete
elementId,
[51293] Fix | Delete
onDragStart,
[51294] Fix | Delete
onDragEnd,
[51295] Fix | Delete
fadeWhenDisabled = false,
[51296] Fix | Delete
dragComponent
[51297] Fix | Delete
}) => {
[51298] Fix | Delete
const {
[51299] Fix | Delete
srcRootClientId,
[51300] Fix | Delete
isDraggable,
[51301] Fix | Delete
icon,
[51302] Fix | Delete
visibleInserter,
[51303] Fix | Delete
getBlockType
[51304] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[51305] Fix | Delete
const {
[51306] Fix | Delete
canMoveBlocks,
[51307] Fix | Delete
getBlockRootClientId,
[51308] Fix | Delete
getBlockName,
[51309] Fix | Delete
getBlockAttributes,
[51310] Fix | Delete
isBlockInsertionPointVisible
[51311] Fix | Delete
} = select(store);
[51312] Fix | Delete
const {
[51313] Fix | Delete
getBlockType: _getBlockType,
[51314] Fix | Delete
getActiveBlockVariation
[51315] Fix | Delete
} = select(external_wp_blocks_namespaceObject.store);
[51316] Fix | Delete
const rootClientId = getBlockRootClientId(clientIds[0]);
[51317] Fix | Delete
const blockName = getBlockName(clientIds[0]);
[51318] Fix | Delete
const variation = getActiveBlockVariation(blockName, getBlockAttributes(clientIds[0]));
[51319] Fix | Delete
return {
[51320] Fix | Delete
srcRootClientId: rootClientId,
[51321] Fix | Delete
isDraggable: canMoveBlocks(clientIds),
[51322] Fix | Delete
icon: variation?.icon || _getBlockType(blockName)?.icon,
[51323] Fix | Delete
visibleInserter: isBlockInsertionPointVisible(),
[51324] Fix | Delete
getBlockType: _getBlockType
[51325] Fix | Delete
};
[51326] Fix | Delete
}, [clientIds]);
[51327] Fix | Delete
const isDragging = (0,external_wp_element_namespaceObject.useRef)(false);
[51328] Fix | Delete
const [startScrolling, scrollOnDragOver, stopScrolling] = useScrollWhenDragging();
[51329] Fix | Delete
const {
[51330] Fix | Delete
getAllowedBlocks,
[51331] Fix | Delete
getBlockNamesByClientId,
[51332] Fix | Delete
getBlockRootClientId
[51333] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store);
[51334] Fix | Delete
const {
[51335] Fix | Delete
startDraggingBlocks,
[51336] Fix | Delete
stopDraggingBlocks
[51337] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[51338] Fix | Delete
[51339] Fix | Delete
// Stop dragging blocks if the block draggable is unmounted.
[51340] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[51341] Fix | Delete
return () => {
[51342] Fix | Delete
if (isDragging.current) {
[51343] Fix | Delete
stopDraggingBlocks();
[51344] Fix | Delete
}
[51345] Fix | Delete
};
[51346] Fix | Delete
}, []);
[51347] Fix | Delete
[51348] Fix | Delete
// Find the root of the editor iframe.
[51349] Fix | Delete
const blockRef = useBlockRef(clientIds[0]);
[51350] Fix | Delete
const editorRoot = blockRef.current?.closest('body');
[51351] Fix | Delete
[51352] Fix | Delete
/*
[51353] Fix | Delete
* Add a dragover event listener to the editor root to track the blocks being dragged over.
[51354] Fix | Delete
* The listener has to be inside the editor iframe otherwise the target isn't accessible.
[51355] Fix | Delete
*/
[51356] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[51357] Fix | Delete
if (!editorRoot || !fadeWhenDisabled) {
[51358] Fix | Delete
return;
[51359] Fix | Delete
}
[51360] Fix | Delete
const onDragOver = event => {
[51361] Fix | Delete
if (!event.target.closest('[data-block]')) {
[51362] Fix | Delete
return;
[51363] Fix | Delete
}
[51364] Fix | Delete
const draggedBlockNames = getBlockNamesByClientId(clientIds);
[51365] Fix | Delete
const targetClientId = event.target.closest('[data-block]').getAttribute('data-block');
[51366] Fix | Delete
const allowedBlocks = getAllowedBlocks(targetClientId);
[51367] Fix | Delete
const targetBlockName = getBlockNamesByClientId([targetClientId])[0];
[51368] Fix | Delete
[51369] Fix | Delete
/*
[51370] Fix | Delete
* Check if the target is valid to drop in.
[51371] Fix | Delete
* If the target's allowedBlocks is an empty array,
[51372] Fix | Delete
* it isn't a container block, in which case we check
[51373] Fix | Delete
* its parent's validity instead.
[51374] Fix | Delete
*/
[51375] Fix | Delete
let dropTargetValid;
[51376] Fix | Delete
if (allowedBlocks?.length === 0) {
[51377] Fix | Delete
const targetRootClientId = getBlockRootClientId(targetClientId);
[51378] Fix | Delete
const targetRootBlockName = getBlockNamesByClientId([targetRootClientId])[0];
[51379] Fix | Delete
const rootAllowedBlocks = getAllowedBlocks(targetRootClientId);
[51380] Fix | Delete
dropTargetValid = isDropTargetValid(getBlockType, rootAllowedBlocks, draggedBlockNames, targetRootBlockName);
[51381] Fix | Delete
} else {
[51382] Fix | Delete
dropTargetValid = isDropTargetValid(getBlockType, allowedBlocks, draggedBlockNames, targetBlockName);
[51383] Fix | Delete
}
[51384] Fix | Delete
[51385] Fix | Delete
/*
[51386] Fix | Delete
* Update the body class to reflect if drop target is valid.
[51387] Fix | Delete
* This has to be done on the document body because the draggable
[51388] Fix | Delete
* chip is rendered outside of the editor iframe.
[51389] Fix | Delete
*/
[51390] Fix | Delete
if (!dropTargetValid && !visibleInserter) {
[51391] Fix | Delete
window?.document?.body?.classList?.add('block-draggable-invalid-drag-token');
[51392] Fix | Delete
} else {
[51393] Fix | Delete
window?.document?.body?.classList?.remove('block-draggable-invalid-drag-token');
[51394] Fix | Delete
}
[51395] Fix | Delete
};
[51396] Fix | Delete
const throttledOnDragOver = (0,external_wp_compose_namespaceObject.throttle)(onDragOver, 200);
[51397] Fix | Delete
editorRoot.addEventListener('dragover', throttledOnDragOver);
[51398] Fix | Delete
return () => {
[51399] Fix | Delete
editorRoot.removeEventListener('dragover', throttledOnDragOver);
[51400] Fix | Delete
};
[51401] Fix | Delete
}, [clientIds, editorRoot, fadeWhenDisabled, getAllowedBlocks, getBlockNamesByClientId, getBlockRootClientId, getBlockType, visibleInserter]);
[51402] Fix | Delete
if (!isDraggable) {
[51403] Fix | Delete
return children({
[51404] Fix | Delete
draggable: false
[51405] Fix | Delete
});
[51406] Fix | Delete
}
[51407] Fix | Delete
const transferData = {
[51408] Fix | Delete
type: 'block',
[51409] Fix | Delete
srcClientIds: clientIds,
[51410] Fix | Delete
srcRootClientId
[51411] Fix | Delete
};
[51412] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Draggable, {
[51413] Fix | Delete
appendToOwnerDocument: appendToOwnerDocument,
[51414] Fix | Delete
cloneClassname: cloneClassname,
[51415] Fix | Delete
__experimentalTransferDataType: "wp-blocks",
[51416] Fix | Delete
transferData: transferData,
[51417] Fix | Delete
onDragStart: event => {
[51418] Fix | Delete
// Defer hiding the dragged source element to the next
[51419] Fix | Delete
// frame to enable dragging.
[51420] Fix | Delete
window.requestAnimationFrame(() => {
[51421] Fix | Delete
startDraggingBlocks(clientIds);
[51422] Fix | Delete
isDragging.current = true;
[51423] Fix | Delete
startScrolling(event);
[51424] Fix | Delete
if (onDragStart) {
[51425] Fix | Delete
onDragStart();
[51426] Fix | Delete
}
[51427] Fix | Delete
});
[51428] Fix | Delete
},
[51429] Fix | Delete
onDragOver: scrollOnDragOver,
[51430] Fix | Delete
onDragEnd: () => {
[51431] Fix | Delete
stopDraggingBlocks();
[51432] Fix | Delete
isDragging.current = false;
[51433] Fix | Delete
stopScrolling();
[51434] Fix | Delete
if (onDragEnd) {
[51435] Fix | Delete
onDragEnd();
[51436] Fix | Delete
}
[51437] Fix | Delete
},
[51438] Fix | Delete
__experimentalDragComponent:
[51439] Fix | Delete
// Check against `undefined` so that `null` can be used to disable
[51440] Fix | Delete
// the default drag component.
[51441] Fix | Delete
dragComponent !== undefined ? dragComponent : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockDraggableChip, {
[51442] Fix | Delete
count: clientIds.length,
[51443] Fix | Delete
icon: icon,
[51444] Fix | Delete
fadeWhenDisabled: true
[51445] Fix | Delete
}),
[51446] Fix | Delete
elementId: elementId,
[51447] Fix | Delete
children: ({
[51448] Fix | Delete
onDraggableStart,
[51449] Fix | Delete
onDraggableEnd
[51450] Fix | Delete
}) => {
[51451] Fix | Delete
return children({
[51452] Fix | Delete
draggable: true,
[51453] Fix | Delete
onDragStart: onDraggableStart,
[51454] Fix | Delete
onDragEnd: onDraggableEnd
[51455] Fix | Delete
});
[51456] Fix | Delete
}
[51457] Fix | Delete
});
[51458] Fix | Delete
};
[51459] Fix | Delete
/* harmony default export */ const block_draggable = (BlockDraggable);
[51460] Fix | Delete
[51461] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-up.js
[51462] Fix | Delete
/**
[51463] Fix | Delete
* WordPress dependencies
[51464] Fix | Delete
*/
[51465] Fix | Delete
[51466] Fix | Delete
[51467] Fix | Delete
const chevronUp = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[51468] Fix | Delete
viewBox: "0 0 24 24",
[51469] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[51470] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[51471] Fix | Delete
d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"
[51472] Fix | Delete
})
[51473] Fix | Delete
});
[51474] Fix | Delete
/* harmony default export */ const chevron_up = (chevronUp);
[51475] Fix | Delete
[51476] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
[51477] Fix | Delete
/**
[51478] Fix | Delete
* WordPress dependencies
[51479] Fix | Delete
*/
[51480] Fix | Delete
[51481] Fix | Delete
[51482] Fix | Delete
const chevronDown = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[51483] Fix | Delete
viewBox: "0 0 24 24",
[51484] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[51485] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[51486] Fix | Delete
d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"
[51487] Fix | Delete
})
[51488] Fix | Delete
});
[51489] Fix | Delete
/* harmony default export */ const chevron_down = (chevronDown);
[51490] Fix | Delete
[51491] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-mover/mover-description.js
[51492] Fix | Delete
/**
[51493] Fix | Delete
* WordPress dependencies
[51494] Fix | Delete
*/
[51495] Fix | Delete
[51496] Fix | Delete
const getMovementDirection = (moveDirection, orientation) => {
[51497] Fix | Delete
if (moveDirection === 'up') {
[51498] Fix | Delete
if (orientation === 'horizontal') {
[51499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function