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
renderToggle: renderToggleComponent(other),
[56500] Fix | Delete
renderContent: () => children
[56501] Fix | Delete
});
[56502] Fix | Delete
};
[56503] Fix | Delete
/* harmony default export */ const color_style_selector = (BlockColorsStyleSelector);
[56504] Fix | Delete
[56505] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list-view.js
[56506] Fix | Delete
/**
[56507] Fix | Delete
* WordPress dependencies
[56508] Fix | Delete
*/
[56509] Fix | Delete
[56510] Fix | Delete
[56511] Fix | Delete
const listView = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[56512] Fix | Delete
viewBox: "0 0 24 24",
[56513] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[56514] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[56515] Fix | Delete
d: "M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"
[56516] Fix | Delete
})
[56517] Fix | Delete
});
[56518] Fix | Delete
/* harmony default export */ const list_view = (listView);
[56519] Fix | Delete
[56520] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/list-view/context.js
[56521] Fix | Delete
/**
[56522] Fix | Delete
* WordPress dependencies
[56523] Fix | Delete
*/
[56524] Fix | Delete
[56525] Fix | Delete
const ListViewContext = (0,external_wp_element_namespaceObject.createContext)({});
[56526] Fix | Delete
const useListViewContext = () => (0,external_wp_element_namespaceObject.useContext)(ListViewContext);
[56527] Fix | Delete
[56528] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/list-view/aria-referenced-text.js
[56529] Fix | Delete
/**
[56530] Fix | Delete
* WordPress dependencies
[56531] Fix | Delete
*/
[56532] Fix | Delete
[56533] Fix | Delete
[56534] Fix | Delete
/**
[56535] Fix | Delete
* A component specifically designed to be used as an element referenced
[56536] Fix | Delete
* by ARIA attributes such as `aria-labelledby` or `aria-describedby`.
[56537] Fix | Delete
*
[56538] Fix | Delete
* @param {Object} props Props.
[56539] Fix | Delete
* @param {import('react').ReactNode} props.children
[56540] Fix | Delete
*/
[56541] Fix | Delete
[56542] Fix | Delete
function AriaReferencedText({
[56543] Fix | Delete
children,
[56544] Fix | Delete
...props
[56545] Fix | Delete
}) {
[56546] Fix | Delete
const ref = (0,external_wp_element_namespaceObject.useRef)();
[56547] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[56548] Fix | Delete
if (ref.current) {
[56549] Fix | Delete
// This seems like a no-op, but it fixes a bug in Firefox where
[56550] Fix | Delete
// it fails to recompute the text when only the text node changes.
[56551] Fix | Delete
// @see https://github.com/WordPress/gutenberg/pull/51035
[56552] Fix | Delete
ref.current.textContent = ref.current.textContent;
[56553] Fix | Delete
}
[56554] Fix | Delete
}, [children]);
[56555] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[56556] Fix | Delete
hidden: true,
[56557] Fix | Delete
...props,
[56558] Fix | Delete
ref: ref,
[56559] Fix | Delete
children: children
[56560] Fix | Delete
});
[56561] Fix | Delete
}
[56562] Fix | Delete
[56563] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/list-view/appender.js
[56564] Fix | Delete
/**
[56565] Fix | Delete
* WordPress dependencies
[56566] Fix | Delete
*/
[56567] Fix | Delete
[56568] Fix | Delete
[56569] Fix | Delete
[56570] Fix | Delete
[56571] Fix | Delete
[56572] Fix | Delete
[56573] Fix | Delete
/**
[56574] Fix | Delete
* Internal dependencies
[56575] Fix | Delete
*/
[56576] Fix | Delete
[56577] Fix | Delete
[56578] Fix | Delete
[56579] Fix | Delete
[56580] Fix | Delete
[56581] Fix | Delete
[56582] Fix | Delete
[56583] Fix | Delete
const Appender = (0,external_wp_element_namespaceObject.forwardRef)(({
[56584] Fix | Delete
nestingLevel,
[56585] Fix | Delete
blockCount,
[56586] Fix | Delete
clientId,
[56587] Fix | Delete
...props
[56588] Fix | Delete
}, ref) => {
[56589] Fix | Delete
const {
[56590] Fix | Delete
insertedBlock,
[56591] Fix | Delete
setInsertedBlock
[56592] Fix | Delete
} = useListViewContext();
[56593] Fix | Delete
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(Appender);
[56594] Fix | Delete
const hideInserter = (0,external_wp_data_namespaceObject.useSelect)(select => {
[56595] Fix | Delete
const {
[56596] Fix | Delete
getTemplateLock,
[56597] Fix | Delete
__unstableGetEditorMode
[56598] Fix | Delete
} = select(store);
[56599] Fix | Delete
return !!getTemplateLock(clientId) || __unstableGetEditorMode() === 'zoom-out';
[56600] Fix | Delete
}, [clientId]);
[56601] Fix | Delete
const blockTitle = useBlockDisplayTitle({
[56602] Fix | Delete
clientId,
[56603] Fix | Delete
context: 'list-view'
[56604] Fix | Delete
});
[56605] Fix | Delete
const insertedBlockTitle = useBlockDisplayTitle({
[56606] Fix | Delete
clientId: insertedBlock?.clientId,
[56607] Fix | Delete
context: 'list-view'
[56608] Fix | Delete
});
[56609] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[56610] Fix | Delete
if (!insertedBlockTitle?.length) {
[56611] Fix | Delete
return;
[56612] Fix | Delete
}
[56613] Fix | Delete
(0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.sprintf)(
[56614] Fix | Delete
// translators: %s: name of block being inserted (i.e. Paragraph, Image, Group etc)
[56615] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('%s block inserted'), insertedBlockTitle), 'assertive');
[56616] Fix | Delete
}, [insertedBlockTitle]);
[56617] Fix | Delete
if (hideInserter) {
[56618] Fix | Delete
return null;
[56619] Fix | Delete
}
[56620] Fix | Delete
const descriptionId = `list-view-appender__${instanceId}`;
[56621] Fix | Delete
const description = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: The name of the block. 2: The numerical position of the block. 3: The level of nesting for the block. */
[56622] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Append to %1$s block at position %2$d, Level %3$d'), blockTitle, blockCount + 1, nestingLevel);
[56623] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[56624] Fix | Delete
className: "list-view-appender",
[56625] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(inserter, {
[56626] Fix | Delete
ref: ref,
[56627] Fix | Delete
rootClientId: clientId,
[56628] Fix | Delete
position: "bottom right",
[56629] Fix | Delete
isAppender: true,
[56630] Fix | Delete
selectBlockOnInsert: false,
[56631] Fix | Delete
shouldDirectInsert: false,
[56632] Fix | Delete
__experimentalIsQuick: true,
[56633] Fix | Delete
...props,
[56634] Fix | Delete
toggleProps: {
[56635] Fix | Delete
'aria-describedby': descriptionId
[56636] Fix | Delete
},
[56637] Fix | Delete
onSelectOrClose: maybeInsertedBlock => {
[56638] Fix | Delete
if (maybeInsertedBlock?.clientId) {
[56639] Fix | Delete
setInsertedBlock(maybeInsertedBlock);
[56640] Fix | Delete
}
[56641] Fix | Delete
}
[56642] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AriaReferencedText, {
[56643] Fix | Delete
id: descriptionId,
[56644] Fix | Delete
children: description
[56645] Fix | Delete
})]
[56646] Fix | Delete
});
[56647] Fix | Delete
});
[56648] Fix | Delete
[56649] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/list-view/leaf.js
[56650] Fix | Delete
/**
[56651] Fix | Delete
* External dependencies
[56652] Fix | Delete
*/
[56653] Fix | Delete
[56654] Fix | Delete
[56655] Fix | Delete
[56656] Fix | Delete
/**
[56657] Fix | Delete
* WordPress dependencies
[56658] Fix | Delete
*/
[56659] Fix | Delete
[56660] Fix | Delete
[56661] Fix | Delete
[56662] Fix | Delete
[56663] Fix | Delete
/**
[56664] Fix | Delete
* Internal dependencies
[56665] Fix | Delete
*/
[56666] Fix | Delete
[56667] Fix | Delete
[56668] Fix | Delete
const AnimatedTreeGridRow = dist_esm_it(external_wp_components_namespaceObject.__experimentalTreeGridRow);
[56669] Fix | Delete
const ListViewLeaf = (0,external_wp_element_namespaceObject.forwardRef)(({
[56670] Fix | Delete
isDragged,
[56671] Fix | Delete
isSelected,
[56672] Fix | Delete
position,
[56673] Fix | Delete
level,
[56674] Fix | Delete
rowCount,
[56675] Fix | Delete
children,
[56676] Fix | Delete
className,
[56677] Fix | Delete
path,
[56678] Fix | Delete
...props
[56679] Fix | Delete
}, ref) => {
[56680] Fix | Delete
const animationRef = use_moving_animation({
[56681] Fix | Delete
clientId: props['data-block'],
[56682] Fix | Delete
enableAnimation: true,
[56683] Fix | Delete
triggerAnimationOnChange: path
[56684] Fix | Delete
});
[56685] Fix | Delete
const mergedRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, animationRef]);
[56686] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AnimatedTreeGridRow, {
[56687] Fix | Delete
ref: mergedRef,
[56688] Fix | Delete
className: dist_clsx('block-editor-list-view-leaf', className),
[56689] Fix | Delete
level: level,
[56690] Fix | Delete
positionInSet: position,
[56691] Fix | Delete
setSize: rowCount,
[56692] Fix | Delete
isExpanded: undefined,
[56693] Fix | Delete
...props,
[56694] Fix | Delete
children: children
[56695] Fix | Delete
});
[56696] Fix | Delete
});
[56697] Fix | Delete
/* harmony default export */ const leaf = (ListViewLeaf);
[56698] Fix | Delete
[56699] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/list-view/use-list-view-scroll-into-view.js
[56700] Fix | Delete
/**
[56701] Fix | Delete
* WordPress dependencies
[56702] Fix | Delete
*/
[56703] Fix | Delete
[56704] Fix | Delete
[56705] Fix | Delete
function useListViewScrollIntoView({
[56706] Fix | Delete
isSelected,
[56707] Fix | Delete
selectedClientIds,
[56708] Fix | Delete
rowItemRef
[56709] Fix | Delete
}) {
[56710] Fix | Delete
const isSingleSelection = selectedClientIds.length === 1;
[56711] Fix | Delete
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
[56712] Fix | Delete
// Skip scrolling into view if this particular block isn't selected,
[56713] Fix | Delete
// or if more than one block is selected overall. This is to avoid
[56714] Fix | Delete
// scrolling the view in a multi selection where the user has intentionally
[56715] Fix | Delete
// selected multiple blocks within the list view, but the initially
[56716] Fix | Delete
// selected block may be out of view.
[56717] Fix | Delete
if (!isSelected || !isSingleSelection || !rowItemRef.current) {
[56718] Fix | Delete
return;
[56719] Fix | Delete
}
[56720] Fix | Delete
const scrollContainer = (0,external_wp_dom_namespaceObject.getScrollContainer)(rowItemRef.current);
[56721] Fix | Delete
const {
[56722] Fix | Delete
ownerDocument
[56723] Fix | Delete
} = rowItemRef.current;
[56724] Fix | Delete
const windowScroll = scrollContainer === ownerDocument.body || scrollContainer === ownerDocument.documentElement;
[56725] Fix | Delete
[56726] Fix | Delete
// If the there is no scroll container, of if the scroll container is the window,
[56727] Fix | Delete
// do not scroll into view, as the block is already in view.
[56728] Fix | Delete
if (windowScroll || !scrollContainer) {
[56729] Fix | Delete
return;
[56730] Fix | Delete
}
[56731] Fix | Delete
const rowRect = rowItemRef.current.getBoundingClientRect();
[56732] Fix | Delete
const scrollContainerRect = scrollContainer.getBoundingClientRect();
[56733] Fix | Delete
[56734] Fix | Delete
// If the selected block is not currently visible, scroll to it.
[56735] Fix | Delete
if (rowRect.top < scrollContainerRect.top || rowRect.bottom > scrollContainerRect.bottom) {
[56736] Fix | Delete
rowItemRef.current.scrollIntoView();
[56737] Fix | Delete
}
[56738] Fix | Delete
}, [isSelected, isSingleSelection, rowItemRef]);
[56739] Fix | Delete
}
[56740] Fix | Delete
[56741] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pin-small.js
[56742] Fix | Delete
/**
[56743] Fix | Delete
* WordPress dependencies
[56744] Fix | Delete
*/
[56745] Fix | Delete
[56746] Fix | Delete
[56747] Fix | Delete
const pinSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[56748] Fix | Delete
width: "24",
[56749] Fix | Delete
height: "24",
[56750] Fix | Delete
viewBox: "0 0 24 24",
[56751] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[56752] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[56753] Fix | Delete
d: "M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"
[56754] Fix | Delete
})
[56755] Fix | Delete
});
[56756] Fix | Delete
/* harmony default export */ const pin_small = (pinSmall);
[56757] Fix | Delete
[56758] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/lock-small.js
[56759] Fix | Delete
/**
[56760] Fix | Delete
* WordPress dependencies
[56761] Fix | Delete
*/
[56762] Fix | Delete
[56763] Fix | Delete
[56764] Fix | Delete
const lockSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[56765] Fix | Delete
viewBox: "0 0 24 24",
[56766] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[56767] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[56768] Fix | Delete
fillRule: "evenodd",
[56769] Fix | Delete
clipRule: "evenodd",
[56770] Fix | Delete
d: "M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"
[56771] Fix | Delete
})
[56772] Fix | Delete
});
[56773] Fix | Delete
/* harmony default export */ const lock_small = (lockSmall);
[56774] Fix | Delete
[56775] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/list-view/expander.js
[56776] Fix | Delete
/**
[56777] Fix | Delete
* WordPress dependencies
[56778] Fix | Delete
*/
[56779] Fix | Delete
[56780] Fix | Delete
[56781] Fix | Delete
[56782] Fix | Delete
function ListViewExpander({
[56783] Fix | Delete
onClick
[56784] Fix | Delete
}) {
[56785] Fix | Delete
return (
[56786] Fix | Delete
/*#__PURE__*/
[56787] Fix | Delete
// Keyboard events are handled by TreeGrid see: components/src/tree-grid/index.js
[56788] Fix | Delete
//
[56789] Fix | Delete
// The expander component is implemented as a pseudo element in the w3 example
[56790] Fix | Delete
// https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html
[56791] Fix | Delete
//
[56792] Fix | Delete
// We've mimicked this by adding an icon with aria-hidden set to true to hide this from the accessibility tree.
[56793] Fix | Delete
// For the current tree grid implementation, please do not try to make this a button.
[56794] Fix | Delete
//
[56795] Fix | Delete
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
[56796] Fix | Delete
(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[56797] Fix | Delete
className: "block-editor-list-view__expander",
[56798] Fix | Delete
onClick: event => onClick(event, {
[56799] Fix | Delete
forceToggle: true
[56800] Fix | Delete
}),
[56801] Fix | Delete
"aria-hidden": "true",
[56802] Fix | Delete
"data-testid": "list-view-expander",
[56803] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
[56804] Fix | Delete
icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left_small : chevron_right_small
[56805] Fix | Delete
})
[56806] Fix | Delete
})
[56807] Fix | Delete
);
[56808] Fix | Delete
}
[56809] Fix | Delete
[56810] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/list-view/use-list-view-images.js
[56811] Fix | Delete
/**
[56812] Fix | Delete
* WordPress dependencies
[56813] Fix | Delete
*/
[56814] Fix | Delete
[56815] Fix | Delete
[56816] Fix | Delete
[56817] Fix | Delete
/**
[56818] Fix | Delete
* Internal dependencies
[56819] Fix | Delete
*/
[56820] Fix | Delete
[56821] Fix | Delete
[56822] Fix | Delete
// Maximum number of images to display in a list view row.
[56823] Fix | Delete
const MAX_IMAGES = 3;
[56824] Fix | Delete
function getImage(block) {
[56825] Fix | Delete
if (block.name !== 'core/image') {
[56826] Fix | Delete
return;
[56827] Fix | Delete
}
[56828] Fix | Delete
if (block.attributes?.url) {
[56829] Fix | Delete
return {
[56830] Fix | Delete
url: block.attributes.url,
[56831] Fix | Delete
alt: block.attributes.alt,
[56832] Fix | Delete
clientId: block.clientId
[56833] Fix | Delete
};
[56834] Fix | Delete
}
[56835] Fix | Delete
}
[56836] Fix | Delete
function getImagesFromGallery(block) {
[56837] Fix | Delete
if (block.name !== 'core/gallery' || !block.innerBlocks) {
[56838] Fix | Delete
return [];
[56839] Fix | Delete
}
[56840] Fix | Delete
const images = [];
[56841] Fix | Delete
for (const innerBlock of block.innerBlocks) {
[56842] Fix | Delete
const img = getImage(innerBlock);
[56843] Fix | Delete
if (img) {
[56844] Fix | Delete
images.push(img);
[56845] Fix | Delete
}
[56846] Fix | Delete
if (images.length >= MAX_IMAGES) {
[56847] Fix | Delete
return images;
[56848] Fix | Delete
}
[56849] Fix | Delete
}
[56850] Fix | Delete
return images;
[56851] Fix | Delete
}
[56852] Fix | Delete
function getImagesFromBlock(block, isExpanded) {
[56853] Fix | Delete
const img = getImage(block);
[56854] Fix | Delete
if (img) {
[56855] Fix | Delete
return [img];
[56856] Fix | Delete
}
[56857] Fix | Delete
return isExpanded ? [] : getImagesFromGallery(block);
[56858] Fix | Delete
}
[56859] Fix | Delete
[56860] Fix | Delete
/**
[56861] Fix | Delete
* Get a block's preview images for display within a list view row.
[56862] Fix | Delete
*
[56863] Fix | Delete
* TODO: Currently only supports images from the core/image and core/gallery
[56864] Fix | Delete
* blocks. This should be expanded to support other blocks that have images,
[56865] Fix | Delete
* potentially via an API that blocks can opt into / provide their own logic.
[56866] Fix | Delete
*
[56867] Fix | Delete
* @param {Object} props Hook properties.
[56868] Fix | Delete
* @param {string} props.clientId The block's clientId.
[56869] Fix | Delete
* @param {boolean} props.isExpanded Whether or not the block is expanded in the list view.
[56870] Fix | Delete
* @return {Array} Images.
[56871] Fix | Delete
*/
[56872] Fix | Delete
function useListViewImages({
[56873] Fix | Delete
clientId,
[56874] Fix | Delete
isExpanded
[56875] Fix | Delete
}) {
[56876] Fix | Delete
const {
[56877] Fix | Delete
block
[56878] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[56879] Fix | Delete
const _block = select(store).getBlock(clientId);
[56880] Fix | Delete
return {
[56881] Fix | Delete
block: _block
[56882] Fix | Delete
};
[56883] Fix | Delete
}, [clientId]);
[56884] Fix | Delete
const images = (0,external_wp_element_namespaceObject.useMemo)(() => {
[56885] Fix | Delete
return getImagesFromBlock(block, isExpanded);
[56886] Fix | Delete
}, [block, isExpanded]);
[56887] Fix | Delete
return images;
[56888] Fix | Delete
}
[56889] Fix | Delete
[56890] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/list-view/block-select-button.js
[56891] Fix | Delete
/**
[56892] Fix | Delete
* External dependencies
[56893] Fix | Delete
*/
[56894] Fix | Delete
[56895] Fix | Delete
[56896] Fix | Delete
/**
[56897] Fix | Delete
* WordPress dependencies
[56898] Fix | Delete
*/
[56899] Fix | Delete
[56900] Fix | Delete
[56901] Fix | Delete
[56902] Fix | Delete
[56903] Fix | Delete
[56904] Fix | Delete
[56905] Fix | Delete
[56906] Fix | Delete
/**
[56907] Fix | Delete
* Internal dependencies
[56908] Fix | Delete
*/
[56909] Fix | Delete
[56910] Fix | Delete
[56911] Fix | Delete
[56912] Fix | Delete
[56913] Fix | Delete
[56914] Fix | Delete
[56915] Fix | Delete
[56916] Fix | Delete
[56917] Fix | Delete
[56918] Fix | Delete
function ListViewBlockSelectButton({
[56919] Fix | Delete
className,
[56920] Fix | Delete
block: {
[56921] Fix | Delete
clientId
[56922] Fix | Delete
},
[56923] Fix | Delete
onClick,
[56924] Fix | Delete
onContextMenu,
[56925] Fix | Delete
onMouseDown,
[56926] Fix | Delete
onToggleExpanded,
[56927] Fix | Delete
tabIndex,
[56928] Fix | Delete
onFocus,
[56929] Fix | Delete
onDragStart,
[56930] Fix | Delete
onDragEnd,
[56931] Fix | Delete
draggable,
[56932] Fix | Delete
isExpanded,
[56933] Fix | Delete
ariaDescribedBy
[56934] Fix | Delete
}, ref) {
[56935] Fix | Delete
const blockInformation = useBlockDisplayInformation(clientId);
[56936] Fix | Delete
const blockTitle = useBlockDisplayTitle({
[56937] Fix | Delete
clientId,
[56938] Fix | Delete
context: 'list-view'
[56939] Fix | Delete
});
[56940] Fix | Delete
const {
[56941] Fix | Delete
isLocked
[56942] Fix | Delete
} = useBlockLock(clientId);
[56943] Fix | Delete
const {
[56944] Fix | Delete
isContentOnly
[56945] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
[56946] Fix | Delete
isContentOnly: select(store).getBlockEditingMode(clientId) === 'contentOnly'
[56947] Fix | Delete
}), [clientId]);
[56948] Fix | Delete
const shouldShowLockIcon = isLocked && !isContentOnly;
[56949] Fix | Delete
const isSticky = blockInformation?.positionType === 'sticky';
[56950] Fix | Delete
const images = useListViewImages({
[56951] Fix | Delete
clientId,
[56952] Fix | Delete
isExpanded
[56953] Fix | Delete
});
[56954] Fix | Delete
const positionLabel = blockInformation?.positionLabel ? (0,external_wp_i18n_namespaceObject.sprintf)(
[56955] Fix | Delete
// translators: 1: Position of selected block, e.g. "Sticky" or "Fixed".
[56956] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Position: %1$s'), blockInformation.positionLabel) : '';
[56957] Fix | Delete
[56958] Fix | Delete
// The `href` attribute triggers the browser's native HTML drag operations.
[56959] Fix | Delete
// When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html.
[56960] Fix | Delete
// We need to clear any HTML drag data to prevent `pasteHandler` from firing
[56961] Fix | Delete
// inside the `useOnBlockDrop` hook.
[56962] Fix | Delete
const onDragStartHandler = event => {
[56963] Fix | Delete
event.dataTransfer.clearData();
[56964] Fix | Delete
onDragStart?.(event);
[56965] Fix | Delete
};
[56966] Fix | Delete
[56967] Fix | Delete
/**
[56968] Fix | Delete
* @param {KeyboardEvent} event
[56969] Fix | Delete
*/
[56970] Fix | Delete
function onKeyDown(event) {
[56971] Fix | Delete
if (event.keyCode === external_wp_keycodes_namespaceObject.ENTER || event.keyCode === external_wp_keycodes_namespaceObject.SPACE) {
[56972] Fix | Delete
onClick(event);
[56973] Fix | Delete
}
[56974] Fix | Delete
}
[56975] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Button, {
[56976] Fix | Delete
className: dist_clsx('block-editor-list-view-block-select-button', className),
[56977] Fix | Delete
onClick: onClick,
[56978] Fix | Delete
onContextMenu: onContextMenu,
[56979] Fix | Delete
onKeyDown: onKeyDown,
[56980] Fix | Delete
onMouseDown: onMouseDown,
[56981] Fix | Delete
ref: ref,
[56982] Fix | Delete
tabIndex: tabIndex,
[56983] Fix | Delete
onFocus: onFocus,
[56984] Fix | Delete
onDragStart: onDragStartHandler,
[56985] Fix | Delete
onDragEnd: onDragEnd,
[56986] Fix | Delete
draggable: draggable,
[56987] Fix | Delete
href: `#block-${clientId}`,
[56988] Fix | Delete
"aria-describedby": ariaDescribedBy,
[56989] Fix | Delete
"aria-expanded": isExpanded,
[56990] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ListViewExpander, {
[56991] Fix | Delete
onClick: onToggleExpanded
[56992] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_icon, {
[56993] Fix | Delete
icon: blockInformation?.icon,
[56994] Fix | Delete
showColors: true,
[56995] Fix | Delete
context: "list-view"
[56996] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
[56997] Fix | Delete
alignment: "center",
[56998] Fix | Delete
className: "block-editor-list-view-block-select-button__label-wrapper",
[56999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function