@wordpress/block-editor 14.14.2 → 14.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/block-breadcrumb/index.js +3 -1
  3. package/build/components/block-breadcrumb/index.js.map +1 -1
  4. package/build/components/block-switcher/preview-block-popover.js +1 -1
  5. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  6. package/build/components/block-tools/index.js +9 -0
  7. package/build/components/block-tools/index.js.map +1 -1
  8. package/build/components/block-variation-transforms/index.js +5 -8
  9. package/build/components/block-variation-transforms/index.js.map +1 -1
  10. package/build/components/global-styles/border-panel.js +4 -8
  11. package/build/components/global-styles/border-panel.js.map +1 -1
  12. package/build/components/global-styles/filters-panel.js +1 -1
  13. package/build/components/global-styles/filters-panel.js.map +1 -1
  14. package/build/components/global-styles/shadow-panel-components.js +1 -1
  15. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  16. package/build/components/keyboard-shortcuts/index.js +9 -0
  17. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  18. package/build/components/list-view/block.js +9 -0
  19. package/build/components/list-view/block.js.map +1 -1
  20. package/build/components/media-replace-flow/index.js +2 -1
  21. package/build/components/media-replace-flow/index.js.map +1 -1
  22. package/build-module/components/block-breadcrumb/index.js +3 -1
  23. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  24. package/build-module/components/block-switcher/preview-block-popover.js +1 -1
  25. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  26. package/build-module/components/block-tools/index.js +9 -0
  27. package/build-module/components/block-tools/index.js.map +1 -1
  28. package/build-module/components/block-variation-transforms/index.js +5 -8
  29. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  30. package/build-module/components/global-styles/border-panel.js +5 -9
  31. package/build-module/components/global-styles/border-panel.js.map +1 -1
  32. package/build-module/components/global-styles/filters-panel.js +1 -1
  33. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  34. package/build-module/components/global-styles/shadow-panel-components.js +1 -1
  35. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  36. package/build-module/components/keyboard-shortcuts/index.js +9 -0
  37. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  38. package/build-module/components/list-view/block.js +9 -0
  39. package/build-module/components/list-view/block.js.map +1 -1
  40. package/build-module/components/media-replace-flow/index.js +2 -1
  41. package/build-module/components/media-replace-flow/index.js.map +1 -1
  42. package/build-style/style-rtl.css +8 -10
  43. package/build-style/style.css +8 -10
  44. package/package.json +34 -34
  45. package/src/components/block-breadcrumb/index.js +1 -1
  46. package/src/components/block-breadcrumb/test/__snapshots__/index.js.snap +3 -1
  47. package/src/components/block-switcher/preview-block-popover.js +4 -1
  48. package/src/components/block-tools/index.js +9 -0
  49. package/src/components/block-variation-transforms/index.js +7 -9
  50. package/src/components/global-styles/border-panel.js +5 -8
  51. package/src/components/global-styles/filters-panel.js +4 -1
  52. package/src/components/global-styles/shadow-panel-components.js +4 -1
  53. package/src/components/global-styles/style.scss +9 -11
  54. package/src/components/inserter/style.scss +1 -1
  55. package/src/components/keyboard-shortcuts/index.js +12 -0
  56. package/src/components/list-view/block.js +10 -0
  57. package/src/components/media-replace-flow/index.js +3 -0
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","hasBlockSupport","switchToBlockType","store","blocksStore","__experimentalTreeGridCell","TreeGridCell","__experimentalTreeGridItem","TreeGridItem","useInstanceId","moreVertical","useCallback","useMemo","useState","useRef","memo","useDispatch","useSelect","__","BACKSPACE","DELETE","isShallowEqual","__unstableUseShortcutEventMatch","useShortcutEventMatch","speak","ListViewLeaf","useListViewScrollIntoView","BlockMoverUpButton","BlockMoverDownButton","ListViewBlockContents","useListViewContext","getBlockPositionDescription","getBlockPropertiesDescription","focusListItem","blockEditorStore","useBlockDisplayInformation","useBlockLock","AriaReferencedText","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ListViewBlock","block","clientId","displacement","isAfterDraggedBlocks","isDragged","isNesting","isSelected","isBranchSelected","selectBlock","position","level","rowCount","siblingBlockCount","showBlockMovers","path","isExpanded","selectedClientIds","isSyncedBranch","cellRef","rowRef","settingsRef","isHovered","setIsHovered","settingsAnchorRect","setSettingsAnchorRect","isLocked","canEdit","canMove","isFirstSelectedBlock","isLastSelectedBlock","length","toggleBlockHighlight","duplicateBlocks","multiSelect","replaceBlocks","removeBlocks","insertAfterBlock","insertBeforeBlock","setOpenedBlockSettingsMenu","canInsertBlockType","getSelectedBlockClientIds","getPreviousBlockClientId","getBlockRootClientId","getBlockOrder","getBlockParents","getBlocksByClientId","canRemoveBlocks","isGroupable","getGroupingBlockName","blockInformation","blockName","allowRightClickOverrides","select","getBlock","getBlockName","getSettings","showBlockActions","instanceId","descriptionId","expand","collapse","collapseAll","BlockSettingsMenu","listViewInstanceId","expandedState","setInsertedBlock","treeGridElementRef","rootClientId","isMatch","getBlocksToUpdate","selectedBlockClientIds","isUpdatingSelectedBlocks","includes","firstBlockClientId","firstBlockRootClientId","blocksToUpdate","onKeyDown","event","defaultPrevented","target","closest","isDeleteKey","keyCode","stopPropagation","preventDefault","undefined","_getPreviousBlockClie","blocksToDelete","blockToFocus","shouldUpdateSelection","updateFocusAndSelection","canDuplicate","every","blockToUpdate","name","updatedBlocks","newlySelectedBlocks","at","blockClientIds","blockParents","blocks","groupingBlockName","newBlocks","onMouseEnter","onMouseLeave","selectEditorBlock","focusClientId","shouldSelectBlock","current","toggleExpanded","onContextMenu","click","window","DOMRect","clientX","clientY","onMouseDown","button","settingsPopoverAnchor","ownerDocument","getBoundingClientRect","clearSettingsAnchorRect","rowItemRef","blockPositionDescription","blockPropertiesDescription","hasSiblings","hasRenderedMovers","moverCellClassName","listViewBlockSettingsClassName","colSpan","classes","isSynced","dropdownClientIds","currentlyEditingBlockInCanvas","className","onFocus","onBlur","id","ref","children","tabIndex","onClick","onToggleExpanded","ariaDescribedBy","filter","Boolean","join","withoutGridItem","orientation","clientIds","icon","label","popoverProps","anchor","toggleProps","disableOpenOnArrowDown","__experimentalSelectBlock"],"sources":["@wordpress/block-editor/src/components/list-view/block.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\thasBlockSupport,\n\tswitchToBlockType,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\t__experimentalTreeGridCell as TreeGridCell,\n\t__experimentalTreeGridItem as TreeGridItem,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { moreVertical } from '@wordpress/icons';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseState,\n\tuseRef,\n\tmemo,\n} from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport ListViewLeaf from './leaf';\nimport useListViewScrollIntoView from './use-list-view-scroll-into-view';\nimport {\n\tBlockMoverUpButton,\n\tBlockMoverDownButton,\n} from '../block-mover/button';\nimport ListViewBlockContents from './block-contents';\nimport { useListViewContext } from './context';\nimport {\n\tgetBlockPositionDescription,\n\tgetBlockPropertiesDescription,\n\tfocusListItem,\n} from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { useBlockLock } from '../block-lock';\nimport AriaReferencedText from './aria-referenced-text';\nimport { unlock } from '../../lock-unlock';\n\nfunction ListViewBlock( {\n\tblock: { clientId },\n\tdisplacement,\n\tisAfterDraggedBlocks,\n\tisDragged,\n\tisNesting,\n\tisSelected,\n\tisBranchSelected,\n\tselectBlock,\n\tposition,\n\tlevel,\n\trowCount,\n\tsiblingBlockCount,\n\tshowBlockMovers,\n\tpath,\n\tisExpanded,\n\tselectedClientIds,\n\tisSyncedBranch,\n} ) {\n\tconst cellRef = useRef( null );\n\tconst rowRef = useRef( null );\n\tconst settingsRef = useRef( null );\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ settingsAnchorRect, setSettingsAnchorRect ] = useState();\n\n\tconst { isLocked, canEdit, canMove } = useBlockLock( clientId );\n\n\tconst isFirstSelectedBlock =\n\t\tisSelected && selectedClientIds[ 0 ] === clientId;\n\tconst isLastSelectedBlock =\n\t\tisSelected &&\n\t\tselectedClientIds[ selectedClientIds.length - 1 ] === clientId;\n\n\tconst {\n\t\ttoggleBlockHighlight,\n\t\tduplicateBlocks,\n\t\tmultiSelect,\n\t\treplaceBlocks,\n\t\tremoveBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tsetOpenedBlockSettingsMenu,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst {\n\t\tcanInsertBlockType,\n\t\tgetSelectedBlockClientIds,\n\t\tgetPreviousBlockClientId,\n\t\tgetBlockRootClientId,\n\t\tgetBlockOrder,\n\t\tgetBlockParents,\n\t\tgetBlocksByClientId,\n\t\tcanRemoveBlocks,\n\t\tisGroupable,\n\t} = useSelect( blockEditorStore );\n\tconst { getGroupingBlockName } = useSelect( blocksStore );\n\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\tconst { block, blockName, allowRightClickOverrides } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock, getBlockName, getSettings } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\tblock: getBlock( clientId ),\n\t\t\t\tblockName: getBlockName( clientId ),\n\t\t\t\tallowRightClickOverrides:\n\t\t\t\t\tgetSettings().allowRightClickOverrides,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst showBlockActions =\n\t\t// When a block hides its toolbar it also hides the block settings menu,\n\t\t// since that menu is part of the toolbar in the editor canvas.\n\t\t// List View respects this by also hiding the block settings menu.\n\t\thasBlockSupport( blockName, '__experimentalToolbar', true );\n\tconst instanceId = useInstanceId( ListViewBlock );\n\tconst descriptionId = `list-view-block-select-button__description-${ instanceId }`;\n\n\tconst {\n\t\texpand,\n\t\tcollapse,\n\t\tcollapseAll,\n\t\tBlockSettingsMenu,\n\t\tlistViewInstanceId,\n\t\texpandedState,\n\t\tsetInsertedBlock,\n\t\ttreeGridElementRef,\n\t\trootClientId,\n\t} = useListViewContext();\n\tconst isMatch = useShortcutEventMatch();\n\n\t// Determine which blocks to update:\n\t// If the current (focused) block is part of the block selection, use the whole selection.\n\t// If the focused block is not part of the block selection, only update the focused block.\n\tfunction getBlocksToUpdate() {\n\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\tconst isUpdatingSelectedBlocks =\n\t\t\tselectedBlockClientIds.includes( clientId );\n\t\tconst firstBlockClientId = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds[ 0 ]\n\t\t\t: clientId;\n\t\tconst firstBlockRootClientId =\n\t\t\tgetBlockRootClientId( firstBlockClientId );\n\n\t\tconst blocksToUpdate = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds\n\t\t\t: [ clientId ];\n\n\t\treturn {\n\t\t\tblocksToUpdate,\n\t\t\tfirstBlockClientId,\n\t\t\tfirstBlockRootClientId,\n\t\t\tselectedBlockClientIds,\n\t\t};\n\t}\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tasync function onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not handle events if it comes from modals;\n\t\t// retain the default behavior for these keys.\n\t\tif ( event.target.closest( '[role=dialog]' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isDeleteKey = [ BACKSPACE, DELETE ].includes( event.keyCode );\n\n\t\t// If multiple blocks are selected, deselect all blocks when the user\n\t\t// presses the escape key.\n\t\tif (\n\t\t\tisMatch( 'core/block-editor/unselect', event ) &&\n\t\t\tselectedClientIds.length > 0\n\t\t) {\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\t\t\tselectBlock( event, undefined );\n\t\t} else if (\n\t\t\tisDeleteKey ||\n\t\t\tisMatch( 'core/block-editor/remove', event )\n\t\t) {\n\t\t\tconst {\n\t\t\t\tblocksToUpdate: blocksToDelete,\n\t\t\t\tfirstBlockClientId,\n\t\t\t\tfirstBlockRootClientId,\n\t\t\t\tselectedBlockClientIds,\n\t\t\t} = getBlocksToUpdate();\n\n\t\t\t// Don't update the selection if the blocks cannot be deleted.\n\t\t\tif ( ! canRemoveBlocks( blocksToDelete ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet blockToFocus =\n\t\t\t\tgetPreviousBlockClientId( firstBlockClientId ) ??\n\t\t\t\t// If the previous block is not found (when the first block is deleted),\n\t\t\t\t// fallback to focus the parent block.\n\t\t\t\tfirstBlockRootClientId;\n\n\t\t\tremoveBlocks( blocksToDelete, false );\n\n\t\t\t// Update the selection if the original selection has been removed.\n\t\t\tconst shouldUpdateSelection =\n\t\t\t\tselectedBlockClientIds.length > 0 &&\n\t\t\t\tgetSelectedBlockClientIds().length === 0;\n\n\t\t\t// If there's no previous block nor parent block, focus the first block.\n\t\t\tif ( ! blockToFocus ) {\n\t\t\t\tblockToFocus = getBlockOrder()[ 0 ];\n\t\t\t}\n\n\t\t\tupdateFocusAndSelection( blockToFocus, shouldUpdateSelection );\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate, firstBlockRootClientId } =\n\t\t\t\tgetBlocksToUpdate();\n\n\t\t\tconst canDuplicate = getBlocksByClientId( blocksToUpdate ).every(\n\t\t\t\t( blockToUpdate ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t!! blockToUpdate &&\n\t\t\t\t\t\thasBlockSupport(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\t'multiple',\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\tfirstBlockRootClientId\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( canDuplicate ) {\n\t\t\t\tconst updatedBlocks = await duplicateBlocks(\n\t\t\t\t\tblocksToUpdate,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\n\t\t\t\tif ( updatedBlocks?.length ) {\n\t\t\t\t\t// If blocks have been duplicated, focus the first duplicated block.\n\t\t\t\t\tupdateFocusAndSelection( updatedBlocks[ 0 ], false );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertBeforeBlock( blocksToUpdate[ 0 ] );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertAfterBlock( blocksToUpdate.at( -1 ) );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/select-all', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { firstBlockRootClientId, selectedBlockClientIds } =\n\t\t\t\tgetBlocksToUpdate();\n\t\t\tconst blockClientIds = getBlockOrder( firstBlockRootClientId );\n\t\t\tif ( ! blockClientIds.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If we have selected all sibling nested blocks, try selecting up a level.\n\t\t\t// This is a similar implementation to that used by `useSelectAll`.\n\t\t\t// `isShallowEqual` is used for the list view instead of a length check,\n\t\t\t// as the array of siblings of the currently focused block may be a different\n\t\t\t// set of blocks from the current block selection if the user is focused\n\t\t\t// on a different part of the list view from the block selection.\n\t\t\tif ( isShallowEqual( selectedBlockClientIds, blockClientIds ) ) {\n\t\t\t\t// Only select up a level if the first block is not the root block.\n\t\t\t\t// This ensures that the block selection can't break out of the root block\n\t\t\t\t// used by the list view, if the list view is only showing a partial hierarchy.\n\t\t\t\tif (\n\t\t\t\t\tfirstBlockRootClientId &&\n\t\t\t\t\tfirstBlockRootClientId !== rootClientId\n\t\t\t\t) {\n\t\t\t\t\tupdateFocusAndSelection( firstBlockRootClientId, true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Select all while passing `null` to skip focusing to the editor canvas,\n\t\t\t// and retain focus within the list view.\n\t\t\tmultiSelect(\n\t\t\t\tblockClientIds[ 0 ],\n\t\t\t\tblockClientIds[ blockClientIds.length - 1 ],\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {\n\t\t\tevent.preventDefault();\n\t\t\tconst { firstBlockClientId } = getBlocksToUpdate();\n\t\t\tconst blockParents = getBlockParents( firstBlockClientId, false );\n\t\t\t// Collapse all blocks.\n\t\t\tcollapseAll();\n\t\t\t// Expand all parents of the current block.\n\t\t\texpand( blockParents );\n\t\t} else if ( isMatch( 'core/block-editor/group', event ) ) {\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tif ( blocksToUpdate.length > 1 && isGroupable( blocksToUpdate ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\t\t\t\tconst groupingBlockName = getGroupingBlockName();\n\t\t\t\tconst newBlocks = switchToBlockType(\n\t\t\t\t\tblocks,\n\t\t\t\t\tgroupingBlockName\n\t\t\t\t);\n\t\t\t\treplaceBlocks( blocksToUpdate, newBlocks );\n\t\t\t\tspeak( __( 'Selected blocks are grouped.' ) );\n\t\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\t\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onMouseEnter = useCallback( () => {\n\t\tsetIsHovered( true );\n\t\ttoggleBlockHighlight( clientId, true );\n\t}, [ clientId, setIsHovered, toggleBlockHighlight ] );\n\tconst onMouseLeave = useCallback( () => {\n\t\tsetIsHovered( false );\n\t\ttoggleBlockHighlight( clientId, false );\n\t}, [ clientId, setIsHovered, toggleBlockHighlight ] );\n\n\tconst selectEditorBlock = useCallback(\n\t\t( event ) => {\n\t\t\tselectBlock( event, clientId );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t[ clientId, selectBlock ]\n\t);\n\n\tconst updateFocusAndSelection = useCallback(\n\t\t( focusClientId, shouldSelectBlock ) => {\n\t\t\tif ( shouldSelectBlock ) {\n\t\t\t\tselectBlock( undefined, focusClientId, null, null );\n\t\t\t}\n\n\t\t\tfocusListItem( focusClientId, treeGridElementRef?.current );\n\t\t},\n\t\t[ selectBlock, treeGridElementRef ]\n\t);\n\n\tconst toggleExpanded = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent shift+click from opening link in a new window when toggling.\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tif ( isExpanded === true ) {\n\t\t\t\tcollapse( clientId );\n\t\t\t} else if ( isExpanded === false ) {\n\t\t\t\texpand( clientId );\n\t\t\t}\n\t\t},\n\t\t[ clientId, expand, collapse, isExpanded ]\n\t);\n\n\t// Allow right-clicking an item in the List View to open up the block settings dropdown.\n\tconst onContextMenu = useCallback(\n\t\t( event ) => {\n\t\t\tif ( showBlockActions && allowRightClickOverrides ) {\n\t\t\t\tsettingsRef.current?.click();\n\t\t\t\t// Ensure the position of the settings dropdown is at the cursor.\n\t\t\t\tsetSettingsAnchorRect(\n\t\t\t\t\tnew window.DOMRect( event.clientX, event.clientY, 0, 0 )\n\t\t\t\t);\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides, settingsRef, showBlockActions ]\n\t);\n\n\tconst onMouseDown = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent right-click from focusing the block,\n\t\t\t// because focus will be handled when opening the block settings dropdown.\n\t\t\tif ( allowRightClickOverrides && event.button === 2 ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides ]\n\t);\n\n\tconst settingsPopoverAnchor = useMemo( () => {\n\t\tconst { ownerDocument } = rowRef?.current || {};\n\n\t\t// If no custom position is set, the settings dropdown will be anchored to the\n\t\t// DropdownMenu toggle button.\n\t\tif ( ! settingsAnchorRect || ! ownerDocument ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Position the settings dropdown at the cursor when right-clicking a block.\n\t\treturn {\n\t\t\townerDocument,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn settingsAnchorRect;\n\t\t\t},\n\t\t};\n\t}, [ settingsAnchorRect ] );\n\n\tconst clearSettingsAnchorRect = useCallback( () => {\n\t\t// Clear the custom position for the settings dropdown so that it is restored back\n\t\t// to being anchored to the DropdownMenu toggle button.\n\t\tsetSettingsAnchorRect( undefined );\n\t}, [ setSettingsAnchorRect ] );\n\n\t// Pass in a ref to the row, so that it can be scrolled\n\t// into view when selected. For long lists, the placeholder for the\n\t// selected block is also observed, within ListViewLeafPlaceholder.\n\tuseListViewScrollIntoView( {\n\t\tisSelected,\n\t\trowItemRef: rowRef,\n\t\tselectedClientIds,\n\t} );\n\n\t// When switching between rendering modes (such as template preview and content only),\n\t// it is possible for a block to temporarily be unavailable. In this case, we should not\n\t// render the leaf, to avoid errors further down the tree.\n\tif ( ! block ) {\n\t\treturn null;\n\t}\n\n\tconst blockPositionDescription = getBlockPositionDescription(\n\t\tposition,\n\t\tsiblingBlockCount,\n\t\tlevel\n\t);\n\n\tconst blockPropertiesDescription = getBlockPropertiesDescription(\n\t\tblockInformation,\n\t\tisLocked\n\t);\n\n\tconst hasSiblings = siblingBlockCount > 0;\n\tconst hasRenderedMovers = showBlockMovers && hasSiblings;\n\tconst moverCellClassName = clsx(\n\t\t'block-editor-list-view-block__mover-cell',\n\t\t{ 'is-visible': isHovered || isSelected }\n\t);\n\n\tconst listViewBlockSettingsClassName = clsx(\n\t\t'block-editor-list-view-block__menu-cell',\n\t\t{ 'is-visible': isHovered || isFirstSelectedBlock }\n\t);\n\n\tlet colSpan;\n\tif ( hasRenderedMovers ) {\n\t\tcolSpan = 2;\n\t} else if ( ! showBlockActions ) {\n\t\tcolSpan = 3;\n\t}\n\n\tconst classes = clsx( {\n\t\t'is-selected': isSelected,\n\t\t'is-first-selected': isFirstSelectedBlock,\n\t\t'is-last-selected': isLastSelectedBlock,\n\t\t'is-branch-selected': isBranchSelected,\n\t\t'is-synced-branch': isSyncedBranch,\n\t\t'is-dragging': isDragged,\n\t\t'has-single-cell': ! showBlockActions,\n\t\t'is-synced': blockInformation?.isSynced,\n\t\t'is-draggable': canMove,\n\t\t'is-displacement-normal': displacement === 'normal',\n\t\t'is-displacement-up': displacement === 'up',\n\t\t'is-displacement-down': displacement === 'down',\n\t\t'is-after-dragged-blocks': isAfterDraggedBlocks,\n\t\t'is-nesting': isNesting,\n\t} );\n\n\t// Only include all selected blocks if the currently clicked on block\n\t// is one of the selected blocks. This ensures that if a user attempts\n\t// to alter a block that isn't part of the selection, they're still able\n\t// to do so.\n\tconst dropdownClientIds = selectedClientIds.includes( clientId )\n\t\t? selectedClientIds\n\t\t: [ clientId ];\n\n\t// Detect if there is a block in the canvas currently being edited and multi-selection is not happening.\n\tconst currentlyEditingBlockInCanvas =\n\t\tisSelected && selectedClientIds.length === 1;\n\n\treturn (\n\t\t<ListViewLeaf\n\t\t\tclassName={ classes }\n\t\t\tisDragged={ isDragged }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\tonFocus={ onMouseEnter }\n\t\t\tonBlur={ onMouseLeave }\n\t\t\tlevel={ level }\n\t\t\tposition={ position }\n\t\t\trowCount={ rowCount }\n\t\t\tpath={ path }\n\t\t\tid={ `list-view-${ listViewInstanceId }-block-${ clientId }` }\n\t\t\tdata-block={ clientId }\n\t\t\tdata-expanded={ canEdit ? isExpanded : undefined }\n\t\t\tref={ rowRef }\n\t\t>\n\t\t\t<TreeGridCell\n\t\t\t\tclassName=\"block-editor-list-view-block__contents-cell\"\n\t\t\t\tcolSpan={ colSpan }\n\t\t\t\tref={ cellRef }\n\t\t\t\taria-selected={ !! isSelected }\n\t\t\t>\n\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t<div className=\"block-editor-list-view-block__contents-container\">\n\t\t\t\t\t\t<ListViewBlockContents\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\tonClick={ selectEditorBlock }\n\t\t\t\t\t\t\tonContextMenu={ onContextMenu }\n\t\t\t\t\t\t\tonMouseDown={ onMouseDown }\n\t\t\t\t\t\t\tonToggleExpanded={ toggleExpanded }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\tsiblingBlockCount={ siblingBlockCount }\n\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\ttabIndex={\n\t\t\t\t\t\t\t\tcurrentlyEditingBlockInCanvas ? 0 : tabIndex\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tisExpanded={ canEdit ? isExpanded : undefined }\n\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\tariaDescribedBy={ descriptionId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<AriaReferencedText id={ descriptionId }>\n\t\t\t\t\t\t\t{ [\n\t\t\t\t\t\t\t\tblockPositionDescription,\n\t\t\t\t\t\t\t\tblockPropertiesDescription,\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t\t\t.join( ' ' ) }\n\t\t\t\t\t\t</AriaReferencedText>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</TreeGridCell>\n\t\t\t{ hasRenderedMovers && (\n\t\t\t\t<>\n\t\t\t\t\t<TreeGridCell\n\t\t\t\t\t\tclassName={ moverCellClassName }\n\t\t\t\t\t\twithoutGridItem\n\t\t\t\t\t>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverUpButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverDownButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ showBlockActions && BlockSettingsMenu && (\n\t\t\t\t<TreeGridCell\n\t\t\t\t\tclassName={ listViewBlockSettingsClassName }\n\t\t\t\t\taria-selected={ !! isSelected }\n\t\t\t\t\tref={ settingsRef }\n\t\t\t\t>\n\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t<BlockSettingsMenu\n\t\t\t\t\t\t\tclientIds={ dropdownClientIds }\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\t\tanchor: settingsPopoverAnchor, // Used to position the settings at the cursor on right-click.\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t\t\tclassName: 'block-editor-list-view-block__menu',\n\t\t\t\t\t\t\t\ttabIndex,\n\t\t\t\t\t\t\t\tonClick: clearSettingsAnchorRect,\n\t\t\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisableOpenOnArrowDown\n\t\t\t\t\t\t\texpand={ expand }\n\t\t\t\t\t\t\texpandedState={ expandedState }\n\t\t\t\t\t\t\tsetInsertedBlock={ setInsertedBlock }\n\t\t\t\t\t\t\t__experimentalSelectBlock={\n\t\t\t\t\t\t\t\tupdateFocusAndSelection\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</TreeGridCell>\n\t\t\t) }\n\t\t</ListViewLeaf>\n\t);\n}\n\nexport default memo( ListViewBlock );\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UAAY;MAC/BoI,GAAG,EAAGtH,WAAa;MAAAuH,QAAA,EAEjBA,CAAE;QAAED,GAAG;QAAEE,QAAQ;QAAEL;MAAQ,CAAC,kBAC7B7I,IAAA,CAACoE,iBAAiB;QACjBuF,SAAS,EAAGjB,iBAAmB;QAC/BpI,KAAK,EAAGA,KAAO;QACfsJ,IAAI,EAAG1L,YAAc;QACrB2L,KAAK,EAAGnL,EAAE,CAAE,SAAU,CAAG;QACzBoL,YAAY,EAAG;UACdC,MAAM,EAAEnC,qBAAqB,CAAE;QAChC,CAAG;QACHoC,WAAW,EAAG;UACbhB,GAAG;UACHJ,SAAS,EAAE,oCAAoC;UAC/CM,QAAQ;UACRC,OAAO,EAAEpB,uBAAuB;UAChCc;QACD,CAAG;QACHoB,sBAAsB;QACtBhG,MAAM,EAAGA,MAAQ;QACjBK,aAAa,EAAGA,aAAe;QAC/BC,gBAAgB,EAAGA,gBAAkB;QACrC2F,yBAAyB,EACxBlE;MACA,CACD;IACD,CACY,CACd;EAAA,CACY,CAAC;AAEjB;AAEA,eAAezH,IAAI,CAAE8B,aAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["clsx","hasBlockSupport","switchToBlockType","store","blocksStore","__experimentalTreeGridCell","TreeGridCell","__experimentalTreeGridItem","TreeGridItem","useInstanceId","moreVertical","useCallback","useMemo","useState","useRef","memo","useDispatch","useSelect","__","BACKSPACE","DELETE","isShallowEqual","__unstableUseShortcutEventMatch","useShortcutEventMatch","speak","ListViewLeaf","useListViewScrollIntoView","BlockMoverUpButton","BlockMoverDownButton","ListViewBlockContents","useListViewContext","getBlockPositionDescription","getBlockPropertiesDescription","focusListItem","blockEditorStore","useBlockDisplayInformation","useBlockLock","AriaReferencedText","unlock","usePasteStyles","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ListViewBlock","block","clientId","displacement","isAfterDraggedBlocks","isDragged","isNesting","isSelected","isBranchSelected","selectBlock","position","level","rowCount","siblingBlockCount","showBlockMovers","path","isExpanded","selectedClientIds","isSyncedBranch","cellRef","rowRef","settingsRef","isHovered","setIsHovered","settingsAnchorRect","setSettingsAnchorRect","isLocked","canEdit","canMove","isFirstSelectedBlock","isLastSelectedBlock","length","toggleBlockHighlight","duplicateBlocks","multiSelect","replaceBlocks","removeBlocks","insertAfterBlock","insertBeforeBlock","setOpenedBlockSettingsMenu","canInsertBlockType","getSelectedBlockClientIds","getPreviousBlockClientId","getBlockRootClientId","getBlockOrder","getBlockParents","getBlocksByClientId","canRemoveBlocks","isGroupable","getGroupingBlockName","blockInformation","pasteStyles","blockName","allowRightClickOverrides","select","getBlock","getBlockName","getSettings","showBlockActions","instanceId","descriptionId","expand","collapse","collapseAll","BlockSettingsMenu","listViewInstanceId","expandedState","setInsertedBlock","treeGridElementRef","rootClientId","isMatch","getBlocksToUpdate","selectedBlockClientIds","isUpdatingSelectedBlocks","includes","firstBlockClientId","firstBlockRootClientId","blocksToUpdate","onKeyDown","event","defaultPrevented","target","closest","isDeleteKey","keyCode","stopPropagation","preventDefault","undefined","_getPreviousBlockClie","blocksToDelete","blockToFocus","shouldUpdateSelection","updateFocusAndSelection","blocks","canDuplicate","every","blockToUpdate","name","updatedBlocks","newlySelectedBlocks","at","blockClientIds","blockParents","groupingBlockName","newBlocks","onMouseEnter","onMouseLeave","selectEditorBlock","focusClientId","shouldSelectBlock","current","toggleExpanded","onContextMenu","click","window","DOMRect","clientX","clientY","onMouseDown","button","settingsPopoverAnchor","ownerDocument","getBoundingClientRect","clearSettingsAnchorRect","rowItemRef","blockPositionDescription","blockPropertiesDescription","hasSiblings","hasRenderedMovers","moverCellClassName","listViewBlockSettingsClassName","colSpan","classes","isSynced","dropdownClientIds","currentlyEditingBlockInCanvas","className","onFocus","onBlur","id","ref","children","tabIndex","onClick","onToggleExpanded","ariaDescribedBy","filter","Boolean","join","withoutGridItem","orientation","clientIds","icon","label","popoverProps","anchor","toggleProps","disableOpenOnArrowDown","__experimentalSelectBlock"],"sources":["@wordpress/block-editor/src/components/list-view/block.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\thasBlockSupport,\n\tswitchToBlockType,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\t__experimentalTreeGridCell as TreeGridCell,\n\t__experimentalTreeGridItem as TreeGridItem,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { moreVertical } from '@wordpress/icons';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseState,\n\tuseRef,\n\tmemo,\n} from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport ListViewLeaf from './leaf';\nimport useListViewScrollIntoView from './use-list-view-scroll-into-view';\nimport {\n\tBlockMoverUpButton,\n\tBlockMoverDownButton,\n} from '../block-mover/button';\nimport ListViewBlockContents from './block-contents';\nimport { useListViewContext } from './context';\nimport {\n\tgetBlockPositionDescription,\n\tgetBlockPropertiesDescription,\n\tfocusListItem,\n} from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { useBlockLock } from '../block-lock';\nimport AriaReferencedText from './aria-referenced-text';\nimport { unlock } from '../../lock-unlock';\nimport usePasteStyles from '../use-paste-styles';\n\nfunction ListViewBlock( {\n\tblock: { clientId },\n\tdisplacement,\n\tisAfterDraggedBlocks,\n\tisDragged,\n\tisNesting,\n\tisSelected,\n\tisBranchSelected,\n\tselectBlock,\n\tposition,\n\tlevel,\n\trowCount,\n\tsiblingBlockCount,\n\tshowBlockMovers,\n\tpath,\n\tisExpanded,\n\tselectedClientIds,\n\tisSyncedBranch,\n} ) {\n\tconst cellRef = useRef( null );\n\tconst rowRef = useRef( null );\n\tconst settingsRef = useRef( null );\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ settingsAnchorRect, setSettingsAnchorRect ] = useState();\n\n\tconst { isLocked, canEdit, canMove } = useBlockLock( clientId );\n\n\tconst isFirstSelectedBlock =\n\t\tisSelected && selectedClientIds[ 0 ] === clientId;\n\tconst isLastSelectedBlock =\n\t\tisSelected &&\n\t\tselectedClientIds[ selectedClientIds.length - 1 ] === clientId;\n\n\tconst {\n\t\ttoggleBlockHighlight,\n\t\tduplicateBlocks,\n\t\tmultiSelect,\n\t\treplaceBlocks,\n\t\tremoveBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tsetOpenedBlockSettingsMenu,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst {\n\t\tcanInsertBlockType,\n\t\tgetSelectedBlockClientIds,\n\t\tgetPreviousBlockClientId,\n\t\tgetBlockRootClientId,\n\t\tgetBlockOrder,\n\t\tgetBlockParents,\n\t\tgetBlocksByClientId,\n\t\tcanRemoveBlocks,\n\t\tisGroupable,\n\t} = useSelect( blockEditorStore );\n\tconst { getGroupingBlockName } = useSelect( blocksStore );\n\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\tconst pasteStyles = usePasteStyles();\n\n\tconst { block, blockName, allowRightClickOverrides } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock, getBlockName, getSettings } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\tblock: getBlock( clientId ),\n\t\t\t\tblockName: getBlockName( clientId ),\n\t\t\t\tallowRightClickOverrides:\n\t\t\t\t\tgetSettings().allowRightClickOverrides,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst showBlockActions =\n\t\t// When a block hides its toolbar it also hides the block settings menu,\n\t\t// since that menu is part of the toolbar in the editor canvas.\n\t\t// List View respects this by also hiding the block settings menu.\n\t\thasBlockSupport( blockName, '__experimentalToolbar', true );\n\tconst instanceId = useInstanceId( ListViewBlock );\n\tconst descriptionId = `list-view-block-select-button__description-${ instanceId }`;\n\n\tconst {\n\t\texpand,\n\t\tcollapse,\n\t\tcollapseAll,\n\t\tBlockSettingsMenu,\n\t\tlistViewInstanceId,\n\t\texpandedState,\n\t\tsetInsertedBlock,\n\t\ttreeGridElementRef,\n\t\trootClientId,\n\t} = useListViewContext();\n\tconst isMatch = useShortcutEventMatch();\n\n\t// Determine which blocks to update:\n\t// If the current (focused) block is part of the block selection, use the whole selection.\n\t// If the focused block is not part of the block selection, only update the focused block.\n\tfunction getBlocksToUpdate() {\n\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\tconst isUpdatingSelectedBlocks =\n\t\t\tselectedBlockClientIds.includes( clientId );\n\t\tconst firstBlockClientId = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds[ 0 ]\n\t\t\t: clientId;\n\t\tconst firstBlockRootClientId =\n\t\t\tgetBlockRootClientId( firstBlockClientId );\n\n\t\tconst blocksToUpdate = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds\n\t\t\t: [ clientId ];\n\n\t\treturn {\n\t\t\tblocksToUpdate,\n\t\t\tfirstBlockClientId,\n\t\t\tfirstBlockRootClientId,\n\t\t\tselectedBlockClientIds,\n\t\t};\n\t}\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tasync function onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not handle events if it comes from modals;\n\t\t// retain the default behavior for these keys.\n\t\tif ( event.target.closest( '[role=dialog]' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isDeleteKey = [ BACKSPACE, DELETE ].includes( event.keyCode );\n\n\t\t// If multiple blocks are selected, deselect all blocks when the user\n\t\t// presses the escape key.\n\t\tif (\n\t\t\tisMatch( 'core/block-editor/unselect', event ) &&\n\t\t\tselectedClientIds.length > 0\n\t\t) {\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\t\t\tselectBlock( event, undefined );\n\t\t} else if (\n\t\t\tisDeleteKey ||\n\t\t\tisMatch( 'core/block-editor/remove', event )\n\t\t) {\n\t\t\tconst {\n\t\t\t\tblocksToUpdate: blocksToDelete,\n\t\t\t\tfirstBlockClientId,\n\t\t\t\tfirstBlockRootClientId,\n\t\t\t\tselectedBlockClientIds,\n\t\t\t} = getBlocksToUpdate();\n\n\t\t\t// Don't update the selection if the blocks cannot be deleted.\n\t\t\tif ( ! canRemoveBlocks( blocksToDelete ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet blockToFocus =\n\t\t\t\tgetPreviousBlockClientId( firstBlockClientId ) ??\n\t\t\t\t// If the previous block is not found (when the first block is deleted),\n\t\t\t\t// fallback to focus the parent block.\n\t\t\t\tfirstBlockRootClientId;\n\n\t\t\tremoveBlocks( blocksToDelete, false );\n\n\t\t\t// Update the selection if the original selection has been removed.\n\t\t\tconst shouldUpdateSelection =\n\t\t\t\tselectedBlockClientIds.length > 0 &&\n\t\t\t\tgetSelectedBlockClientIds().length === 0;\n\n\t\t\t// If there's no previous block nor parent block, focus the first block.\n\t\t\tif ( ! blockToFocus ) {\n\t\t\t\tblockToFocus = getBlockOrder()[ 0 ];\n\t\t\t}\n\n\t\t\tupdateFocusAndSelection( blockToFocus, shouldUpdateSelection );\n\t\t} else if ( isMatch( 'core/block-editor/paste-styles', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\n\t\t\tpasteStyles( blocks );\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate, firstBlockRootClientId } =\n\t\t\t\tgetBlocksToUpdate();\n\n\t\t\tconst canDuplicate = getBlocksByClientId( blocksToUpdate ).every(\n\t\t\t\t( blockToUpdate ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t!! blockToUpdate &&\n\t\t\t\t\t\thasBlockSupport(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\t'multiple',\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\tfirstBlockRootClientId\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( canDuplicate ) {\n\t\t\t\tconst updatedBlocks = await duplicateBlocks(\n\t\t\t\t\tblocksToUpdate,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\n\t\t\t\tif ( updatedBlocks?.length ) {\n\t\t\t\t\t// If blocks have been duplicated, focus the first duplicated block.\n\t\t\t\t\tupdateFocusAndSelection( updatedBlocks[ 0 ], false );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertBeforeBlock( blocksToUpdate[ 0 ] );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertAfterBlock( blocksToUpdate.at( -1 ) );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/select-all', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { firstBlockRootClientId, selectedBlockClientIds } =\n\t\t\t\tgetBlocksToUpdate();\n\t\t\tconst blockClientIds = getBlockOrder( firstBlockRootClientId );\n\t\t\tif ( ! blockClientIds.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If we have selected all sibling nested blocks, try selecting up a level.\n\t\t\t// This is a similar implementation to that used by `useSelectAll`.\n\t\t\t// `isShallowEqual` is used for the list view instead of a length check,\n\t\t\t// as the array of siblings of the currently focused block may be a different\n\t\t\t// set of blocks from the current block selection if the user is focused\n\t\t\t// on a different part of the list view from the block selection.\n\t\t\tif ( isShallowEqual( selectedBlockClientIds, blockClientIds ) ) {\n\t\t\t\t// Only select up a level if the first block is not the root block.\n\t\t\t\t// This ensures that the block selection can't break out of the root block\n\t\t\t\t// used by the list view, if the list view is only showing a partial hierarchy.\n\t\t\t\tif (\n\t\t\t\t\tfirstBlockRootClientId &&\n\t\t\t\t\tfirstBlockRootClientId !== rootClientId\n\t\t\t\t) {\n\t\t\t\t\tupdateFocusAndSelection( firstBlockRootClientId, true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Select all while passing `null` to skip focusing to the editor canvas,\n\t\t\t// and retain focus within the list view.\n\t\t\tmultiSelect(\n\t\t\t\tblockClientIds[ 0 ],\n\t\t\t\tblockClientIds[ blockClientIds.length - 1 ],\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {\n\t\t\tevent.preventDefault();\n\t\t\tconst { firstBlockClientId } = getBlocksToUpdate();\n\t\t\tconst blockParents = getBlockParents( firstBlockClientId, false );\n\t\t\t// Collapse all blocks.\n\t\t\tcollapseAll();\n\t\t\t// Expand all parents of the current block.\n\t\t\texpand( blockParents );\n\t\t} else if ( isMatch( 'core/block-editor/group', event ) ) {\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tif ( blocksToUpdate.length > 1 && isGroupable( blocksToUpdate ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\t\t\t\tconst groupingBlockName = getGroupingBlockName();\n\t\t\t\tconst newBlocks = switchToBlockType(\n\t\t\t\t\tblocks,\n\t\t\t\t\tgroupingBlockName\n\t\t\t\t);\n\t\t\t\treplaceBlocks( blocksToUpdate, newBlocks );\n\t\t\t\tspeak( __( 'Selected blocks are grouped.' ) );\n\t\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\t\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onMouseEnter = useCallback( () => {\n\t\tsetIsHovered( true );\n\t\ttoggleBlockHighlight( clientId, true );\n\t}, [ clientId, setIsHovered, toggleBlockHighlight ] );\n\tconst onMouseLeave = useCallback( () => {\n\t\tsetIsHovered( false );\n\t\ttoggleBlockHighlight( clientId, false );\n\t}, [ clientId, setIsHovered, toggleBlockHighlight ] );\n\n\tconst selectEditorBlock = useCallback(\n\t\t( event ) => {\n\t\t\tselectBlock( event, clientId );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t[ clientId, selectBlock ]\n\t);\n\n\tconst updateFocusAndSelection = useCallback(\n\t\t( focusClientId, shouldSelectBlock ) => {\n\t\t\tif ( shouldSelectBlock ) {\n\t\t\t\tselectBlock( undefined, focusClientId, null, null );\n\t\t\t}\n\n\t\t\tfocusListItem( focusClientId, treeGridElementRef?.current );\n\t\t},\n\t\t[ selectBlock, treeGridElementRef ]\n\t);\n\n\tconst toggleExpanded = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent shift+click from opening link in a new window when toggling.\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tif ( isExpanded === true ) {\n\t\t\t\tcollapse( clientId );\n\t\t\t} else if ( isExpanded === false ) {\n\t\t\t\texpand( clientId );\n\t\t\t}\n\t\t},\n\t\t[ clientId, expand, collapse, isExpanded ]\n\t);\n\n\t// Allow right-clicking an item in the List View to open up the block settings dropdown.\n\tconst onContextMenu = useCallback(\n\t\t( event ) => {\n\t\t\tif ( showBlockActions && allowRightClickOverrides ) {\n\t\t\t\tsettingsRef.current?.click();\n\t\t\t\t// Ensure the position of the settings dropdown is at the cursor.\n\t\t\t\tsetSettingsAnchorRect(\n\t\t\t\t\tnew window.DOMRect( event.clientX, event.clientY, 0, 0 )\n\t\t\t\t);\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides, settingsRef, showBlockActions ]\n\t);\n\n\tconst onMouseDown = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent right-click from focusing the block,\n\t\t\t// because focus will be handled when opening the block settings dropdown.\n\t\t\tif ( allowRightClickOverrides && event.button === 2 ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides ]\n\t);\n\n\tconst settingsPopoverAnchor = useMemo( () => {\n\t\tconst { ownerDocument } = rowRef?.current || {};\n\n\t\t// If no custom position is set, the settings dropdown will be anchored to the\n\t\t// DropdownMenu toggle button.\n\t\tif ( ! settingsAnchorRect || ! ownerDocument ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Position the settings dropdown at the cursor when right-clicking a block.\n\t\treturn {\n\t\t\townerDocument,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn settingsAnchorRect;\n\t\t\t},\n\t\t};\n\t}, [ settingsAnchorRect ] );\n\n\tconst clearSettingsAnchorRect = useCallback( () => {\n\t\t// Clear the custom position for the settings dropdown so that it is restored back\n\t\t// to being anchored to the DropdownMenu toggle button.\n\t\tsetSettingsAnchorRect( undefined );\n\t}, [ setSettingsAnchorRect ] );\n\n\t// Pass in a ref to the row, so that it can be scrolled\n\t// into view when selected. For long lists, the placeholder for the\n\t// selected block is also observed, within ListViewLeafPlaceholder.\n\tuseListViewScrollIntoView( {\n\t\tisSelected,\n\t\trowItemRef: rowRef,\n\t\tselectedClientIds,\n\t} );\n\n\t// When switching between rendering modes (such as template preview and content only),\n\t// it is possible for a block to temporarily be unavailable. In this case, we should not\n\t// render the leaf, to avoid errors further down the tree.\n\tif ( ! block ) {\n\t\treturn null;\n\t}\n\n\tconst blockPositionDescription = getBlockPositionDescription(\n\t\tposition,\n\t\tsiblingBlockCount,\n\t\tlevel\n\t);\n\n\tconst blockPropertiesDescription = getBlockPropertiesDescription(\n\t\tblockInformation,\n\t\tisLocked\n\t);\n\n\tconst hasSiblings = siblingBlockCount > 0;\n\tconst hasRenderedMovers = showBlockMovers && hasSiblings;\n\tconst moverCellClassName = clsx(\n\t\t'block-editor-list-view-block__mover-cell',\n\t\t{ 'is-visible': isHovered || isSelected }\n\t);\n\n\tconst listViewBlockSettingsClassName = clsx(\n\t\t'block-editor-list-view-block__menu-cell',\n\t\t{ 'is-visible': isHovered || isFirstSelectedBlock }\n\t);\n\n\tlet colSpan;\n\tif ( hasRenderedMovers ) {\n\t\tcolSpan = 2;\n\t} else if ( ! showBlockActions ) {\n\t\tcolSpan = 3;\n\t}\n\n\tconst classes = clsx( {\n\t\t'is-selected': isSelected,\n\t\t'is-first-selected': isFirstSelectedBlock,\n\t\t'is-last-selected': isLastSelectedBlock,\n\t\t'is-branch-selected': isBranchSelected,\n\t\t'is-synced-branch': isSyncedBranch,\n\t\t'is-dragging': isDragged,\n\t\t'has-single-cell': ! showBlockActions,\n\t\t'is-synced': blockInformation?.isSynced,\n\t\t'is-draggable': canMove,\n\t\t'is-displacement-normal': displacement === 'normal',\n\t\t'is-displacement-up': displacement === 'up',\n\t\t'is-displacement-down': displacement === 'down',\n\t\t'is-after-dragged-blocks': isAfterDraggedBlocks,\n\t\t'is-nesting': isNesting,\n\t} );\n\n\t// Only include all selected blocks if the currently clicked on block\n\t// is one of the selected blocks. This ensures that if a user attempts\n\t// to alter a block that isn't part of the selection, they're still able\n\t// to do so.\n\tconst dropdownClientIds = selectedClientIds.includes( clientId )\n\t\t? selectedClientIds\n\t\t: [ clientId ];\n\n\t// Detect if there is a block in the canvas currently being edited and multi-selection is not happening.\n\tconst currentlyEditingBlockInCanvas =\n\t\tisSelected && selectedClientIds.length === 1;\n\n\treturn (\n\t\t<ListViewLeaf\n\t\t\tclassName={ classes }\n\t\t\tisDragged={ isDragged }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\tonFocus={ onMouseEnter }\n\t\t\tonBlur={ onMouseLeave }\n\t\t\tlevel={ level }\n\t\t\tposition={ position }\n\t\t\trowCount={ rowCount }\n\t\t\tpath={ path }\n\t\t\tid={ `list-view-${ listViewInstanceId }-block-${ clientId }` }\n\t\t\tdata-block={ clientId }\n\t\t\tdata-expanded={ canEdit ? isExpanded : undefined }\n\t\t\tref={ rowRef }\n\t\t>\n\t\t\t<TreeGridCell\n\t\t\t\tclassName=\"block-editor-list-view-block__contents-cell\"\n\t\t\t\tcolSpan={ colSpan }\n\t\t\t\tref={ cellRef }\n\t\t\t\taria-selected={ !! isSelected }\n\t\t\t>\n\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t<div className=\"block-editor-list-view-block__contents-container\">\n\t\t\t\t\t\t<ListViewBlockContents\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\tonClick={ selectEditorBlock }\n\t\t\t\t\t\t\tonContextMenu={ onContextMenu }\n\t\t\t\t\t\t\tonMouseDown={ onMouseDown }\n\t\t\t\t\t\t\tonToggleExpanded={ toggleExpanded }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\tsiblingBlockCount={ siblingBlockCount }\n\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\ttabIndex={\n\t\t\t\t\t\t\t\tcurrentlyEditingBlockInCanvas ? 0 : tabIndex\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tisExpanded={ canEdit ? isExpanded : undefined }\n\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\tariaDescribedBy={ descriptionId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<AriaReferencedText id={ descriptionId }>\n\t\t\t\t\t\t\t{ [\n\t\t\t\t\t\t\t\tblockPositionDescription,\n\t\t\t\t\t\t\t\tblockPropertiesDescription,\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t\t\t.join( ' ' ) }\n\t\t\t\t\t\t</AriaReferencedText>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</TreeGridCell>\n\t\t\t{ hasRenderedMovers && (\n\t\t\t\t<>\n\t\t\t\t\t<TreeGridCell\n\t\t\t\t\t\tclassName={ moverCellClassName }\n\t\t\t\t\t\twithoutGridItem\n\t\t\t\t\t>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverUpButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverDownButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ showBlockActions && BlockSettingsMenu && (\n\t\t\t\t<TreeGridCell\n\t\t\t\t\tclassName={ listViewBlockSettingsClassName }\n\t\t\t\t\taria-selected={ !! isSelected }\n\t\t\t\t\tref={ settingsRef }\n\t\t\t\t>\n\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t<BlockSettingsMenu\n\t\t\t\t\t\t\tclientIds={ dropdownClientIds }\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\t\tanchor: settingsPopoverAnchor, // Used to position the settings at the cursor on right-click.\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t\t\tclassName: 'block-editor-list-view-block__menu',\n\t\t\t\t\t\t\t\ttabIndex,\n\t\t\t\t\t\t\t\tonClick: clearSettingsAnchorRect,\n\t\t\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisableOpenOnArrowDown\n\t\t\t\t\t\t\texpand={ expand }\n\t\t\t\t\t\t\texpandedState={ expandedState }\n\t\t\t\t\t\t\tsetInsertedBlock={ setInsertedBlock }\n\t\t\t\t\t\t\t__experimentalSelectBlock={\n\t\t\t\t\t\t\t\tupdateFocusAndSelection\n\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
  onSelectURL(url);
204
- }
204
+ },
205
+ searchInputPlaceholder: __('Paste or type URL')
205
206
  })]
206
207
  })]
207
208
  })
@@ -1 +1 @@
1
- {"version":3,"names":["__","_x","speak","FormFileUpload","NavigableMenu","MenuItem","Dropdown","withFilters","ToolbarButton","useSelect","withDispatch","DOWN","postFeaturedImage","upload","media","mediaIcon","compose","__unstableStripHTML","stripHTML","store","noticesStore","MediaUpload","MediaUploadCheck","LinkControl","blockEditorStore","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","noop","uniqueId","MediaReplaceFlow","mediaURL","mediaId","mediaIds","allowedTypes","accept","onError","onSelect","onSelectURL","onReset","onToggleFeaturedImage","useFeaturedImage","onFilesUpload","name","createNotice","removeNotice","children","multiple","addToGallery","handleUpload","popoverProps","renderToggle","getSettings","errorNoticeID","onUploadError","message","safeMessage","setTimeout","id","isDismissible","selectMedia","closeMenu","uploadFiles","event","files","target","mediaUpload","filesList","onFileChange","openOnArrowDown","keyCode","preventDefault","click","onlyAllowsImages","length","every","allowedType","startsWith","gallery","contentClassName","isOpen","onToggle","onClick","onKeyDown","renderContent","onClose","className","value","render","open","icon","onChange","openFileDialog","isPressed","url","settings","showSuggestions","dispatch"],"sources":["@wordpress/block-editor/src/components/media-replace-flow/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { speak } from '@wordpress/a11y';\nimport {\n\tFormFileUpload,\n\tNavigableMenu,\n\tMenuItem,\n\tDropdown,\n\twithFilters,\n\tToolbarButton,\n} from '@wordpress/components';\nimport { useSelect, withDispatch } from '@wordpress/data';\nimport { DOWN } from '@wordpress/keycodes';\nimport {\n\tpostFeaturedImage,\n\tupload,\n\tmedia as mediaIcon,\n} from '@wordpress/icons';\nimport { compose } from '@wordpress/compose';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport MediaUpload from '../media-upload';\nimport MediaUploadCheck from '../media-upload/check';\nimport LinkControl from '../link-control';\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\nlet uniqueId = 0;\n\nconst MediaReplaceFlow = ( {\n\tmediaURL,\n\tmediaId,\n\tmediaIds,\n\tallowedTypes,\n\taccept,\n\tonError,\n\tonSelect,\n\tonSelectURL,\n\tonReset,\n\tonToggleFeaturedImage,\n\tuseFeaturedImage,\n\tonFilesUpload = noop,\n\tname = __( 'Replace' ),\n\tcreateNotice,\n\tremoveNotice,\n\tchildren,\n\tmultiple = false,\n\taddToGallery,\n\thandleUpload = true,\n\tpopoverProps,\n\trenderToggle,\n} ) => {\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst errorNoticeID = `block-editor/media-replace-flow/error-notice/${ ++uniqueId }`;\n\n\tconst onUploadError = ( message ) => {\n\t\tconst safeMessage = stripHTML( message );\n\t\tif ( onError ) {\n\t\t\tonError( safeMessage );\n\t\t\treturn;\n\t\t}\n\t\t// We need to set a timeout for showing the notice\n\t\t// so that VoiceOver and possibly other screen readers\n\t\t// can announce the error after the toolbar button\n\t\t// regains focus once the upload dialog closes.\n\t\t// Otherwise VO simply skips over the notice and announces\n\t\t// the focused element and the open menu.\n\t\tsetTimeout( () => {\n\t\t\tcreateNotice( 'error', safeMessage, {\n\t\t\t\tspeak: true,\n\t\t\t\tid: errorNoticeID,\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t}, 1000 );\n\t};\n\n\tconst selectMedia = ( media, closeMenu ) => {\n\t\tif ( useFeaturedImage && onToggleFeaturedImage ) {\n\t\t\tonToggleFeaturedImage();\n\t\t}\n\t\tcloseMenu();\n\t\t// Calling `onSelect` after the state update since it might unmount the component.\n\t\tonSelect( media );\n\t\tspeak( __( 'The media file has been replaced' ) );\n\t\tremoveNotice( errorNoticeID );\n\t};\n\n\tconst uploadFiles = ( event, closeMenu ) => {\n\t\tconst files = event.target.files;\n\t\tif ( ! handleUpload ) {\n\t\t\tcloseMenu();\n\t\t\treturn onSelect( files );\n\t\t}\n\t\tonFilesUpload( files );\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes,\n\t\t\tfilesList: files,\n\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\tselectMedia( media, closeMenu );\n\t\t\t},\n\t\t\tonError: onUploadError,\n\t\t} );\n\t};\n\n\tconst openOnArrowDown = ( event ) => {\n\t\tif ( event.keyCode === DOWN ) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.target.click();\n\t\t}\n\t};\n\n\tconst onlyAllowsImages = () => {\n\t\tif ( ! allowedTypes || allowedTypes.length === 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn allowedTypes.every(\n\t\t\t( allowedType ) =>\n\t\t\t\tallowedType === 'image' || allowedType.startsWith( 'image/' )\n\t\t);\n\t};\n\n\tconst gallery = multiple && onlyAllowsImages();\n\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tcontentClassName=\"block-editor-media-replace-flow__options\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => {\n\t\t\t\tif ( renderToggle ) {\n\t\t\t\t\treturn renderToggle( {\n\t\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t\t\t'aria-haspopup': 'true',\n\t\t\t\t\t\tonClick: onToggle,\n\t\t\t\t\t\tonKeyDown: openOnArrowDown,\n\t\t\t\t\t\tchildren: name,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\tonKeyDown={ openOnArrowDown }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ name }\n\t\t\t\t\t</ToolbarButton>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<NavigableMenu className=\"block-editor-media-replace-flow__media-upload-menu\">\n\t\t\t\t\t\t<MediaUploadCheck>\n\t\t\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\t\t\tgallery={ gallery }\n\t\t\t\t\t\t\t\taddToGallery={ addToGallery }\n\t\t\t\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\t\t\t\tvalue={ multiple ? mediaIds : mediaId }\n\t\t\t\t\t\t\t\tonSelect={ ( media ) =>\n\t\t\t\t\t\t\t\t\tselectMedia( media, onClose )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tallowedTypes={ allowedTypes }\n\t\t\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\ticon={ mediaIcon }\n\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Open Media Library' ) }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormFileUpload\n\t\t\t\t\t\t\t\tonChange={ ( event ) => {\n\t\t\t\t\t\t\t\t\tuploadFiles( event, onClose );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\taccept={ accept }\n\t\t\t\t\t\t\t\tmultiple={ !! multiple }\n\t\t\t\t\t\t\t\trender={ ( { openFileDialog } ) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\topenFileDialog();\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ _x( 'Upload', 'verb' ) }\n\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MediaUploadCheck>\n\t\t\t\t\t\t{ onToggleFeaturedImage && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ postFeaturedImage }\n\t\t\t\t\t\t\t\tonClick={ onToggleFeaturedImage }\n\t\t\t\t\t\t\t\tisPressed={ useFeaturedImage }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Use featured image' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ mediaURL && onReset && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ typeof children === 'function'\n\t\t\t\t\t\t\t? children( { onClose } )\n\t\t\t\t\t\t\t: children }\n\t\t\t\t\t</NavigableMenu>\n\t\t\t\t\t{ onSelectURL && (\n\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n\t\t\t\t\t\t<form className=\"block-editor-media-flow__url-input\">\n\t\t\t\t\t\t\t<span className=\"block-editor-media-replace-flow__image-url-label\">\n\t\t\t\t\t\t\t\t{ __( 'Current media URL:' ) }\n\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t<LinkControl\n\t\t\t\t\t\t\t\tvalue={ { url: mediaURL } }\n\t\t\t\t\t\t\t\tsettings={ [] }\n\t\t\t\t\t\t\t\tshowSuggestions={ false }\n\t\t\t\t\t\t\t\tonChange={ ( { url } ) => {\n\t\t\t\t\t\t\t\t\tonSelectURL( url );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t/>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-replace-flow/README.md\n */\nexport default compose( [\n\twithDispatch( ( dispatch ) => {\n\t\tconst { createNotice, removeNotice } = dispatch( noticesStore );\n\t\treturn {\n\t\t\tcreateNotice,\n\t\t\tremoveNotice,\n\t\t};\n\t} ),\n\twithFilters( 'editor.MediaReplaceFlow' ),\n] )( MediaReplaceFlow );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SACCC,cAAc,EACdC,aAAa,EACbC,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,aAAa,QACP,uBAAuB;AAC9B,SAASC,SAAS,EAAEC,YAAY,QAAQ,iBAAiB;AACzD,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,SACCC,iBAAiB,EACjBC,MAAM,EACNC,KAAK,IAAIC,SAAS,QACZ,kBAAkB;AACzB,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,mBAAmB,IAAIC,SAAS,QAAQ,gBAAgB;AACjE,SAASC,KAAK,IAAIC,YAAY,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,OAAOC,WAAW,MAAM,iBAAiB;AACzC,SAASJ,KAAK,IAAIK,gBAAgB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAExD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB,IAAIC,QAAQ,GAAG,CAAC;AAEhB,MAAMC,gBAAgB,GAAGA,CA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CAAC;AAEJ,CAAC;;AAED;AACA;AACA;AACA,eAAejF,OAAO,CAAE,CACvBN,YAAY,CAAI0F,QAAQ,IAAM;EAC7B,MAAM;IAAErD,YAAY;IAAEC;EAAa,CAAC,GAAGoD,QAAQ,CAAEhF,YAAa,CAAC;EAC/D,OAAO;IACN2B,YAAY;IACZC;EACD,CAAC;AACF,CAAE,CAAC,EACHzC,WAAW,CAAE,yBAA0B,CAAC,CACvC,CAAC,CAAE0B,gBAAiB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__","_x","speak","FormFileUpload","NavigableMenu","MenuItem","Dropdown","withFilters","ToolbarButton","useSelect","withDispatch","DOWN","postFeaturedImage","upload","media","mediaIcon","compose","__unstableStripHTML","stripHTML","store","noticesStore","MediaUpload","MediaUploadCheck","LinkControl","blockEditorStore","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","noop","uniqueId","MediaReplaceFlow","mediaURL","mediaId","mediaIds","allowedTypes","accept","onError","onSelect","onSelectURL","onReset","onToggleFeaturedImage","useFeaturedImage","onFilesUpload","name","createNotice","removeNotice","children","multiple","addToGallery","handleUpload","popoverProps","renderToggle","getSettings","errorNoticeID","onUploadError","message","safeMessage","setTimeout","id","isDismissible","selectMedia","closeMenu","uploadFiles","event","files","target","mediaUpload","filesList","onFileChange","openOnArrowDown","keyCode","preventDefault","click","onlyAllowsImages","length","every","allowedType","startsWith","gallery","contentClassName","isOpen","onToggle","onClick","onKeyDown","renderContent","onClose","className","value","render","open","icon","onChange","openFileDialog","isPressed","url","settings","showSuggestions","searchInputPlaceholder","dispatch"],"sources":["@wordpress/block-editor/src/components/media-replace-flow/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { speak } from '@wordpress/a11y';\nimport {\n\tFormFileUpload,\n\tNavigableMenu,\n\tMenuItem,\n\tDropdown,\n\twithFilters,\n\tToolbarButton,\n} from '@wordpress/components';\nimport { useSelect, withDispatch } from '@wordpress/data';\nimport { DOWN } from '@wordpress/keycodes';\nimport {\n\tpostFeaturedImage,\n\tupload,\n\tmedia as mediaIcon,\n} from '@wordpress/icons';\nimport { compose } from '@wordpress/compose';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport MediaUpload from '../media-upload';\nimport MediaUploadCheck from '../media-upload/check';\nimport LinkControl from '../link-control';\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\nlet uniqueId = 0;\n\nconst MediaReplaceFlow = ( {\n\tmediaURL,\n\tmediaId,\n\tmediaIds,\n\tallowedTypes,\n\taccept,\n\tonError,\n\tonSelect,\n\tonSelectURL,\n\tonReset,\n\tonToggleFeaturedImage,\n\tuseFeaturedImage,\n\tonFilesUpload = noop,\n\tname = __( 'Replace' ),\n\tcreateNotice,\n\tremoveNotice,\n\tchildren,\n\tmultiple = false,\n\taddToGallery,\n\thandleUpload = true,\n\tpopoverProps,\n\trenderToggle,\n} ) => {\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst errorNoticeID = `block-editor/media-replace-flow/error-notice/${ ++uniqueId }`;\n\n\tconst onUploadError = ( message ) => {\n\t\tconst safeMessage = stripHTML( message );\n\t\tif ( onError ) {\n\t\t\tonError( safeMessage );\n\t\t\treturn;\n\t\t}\n\t\t// We need to set a timeout for showing the notice\n\t\t// so that VoiceOver and possibly other screen readers\n\t\t// can announce the error after the toolbar button\n\t\t// regains focus once the upload dialog closes.\n\t\t// Otherwise VO simply skips over the notice and announces\n\t\t// the focused element and the open menu.\n\t\tsetTimeout( () => {\n\t\t\tcreateNotice( 'error', safeMessage, {\n\t\t\t\tspeak: true,\n\t\t\t\tid: errorNoticeID,\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t}, 1000 );\n\t};\n\n\tconst selectMedia = ( media, closeMenu ) => {\n\t\tif ( useFeaturedImage && onToggleFeaturedImage ) {\n\t\t\tonToggleFeaturedImage();\n\t\t}\n\t\tcloseMenu();\n\t\t// Calling `onSelect` after the state update since it might unmount the component.\n\t\tonSelect( media );\n\t\tspeak( __( 'The media file has been replaced' ) );\n\t\tremoveNotice( errorNoticeID );\n\t};\n\n\tconst uploadFiles = ( event, closeMenu ) => {\n\t\tconst files = event.target.files;\n\t\tif ( ! handleUpload ) {\n\t\t\tcloseMenu();\n\t\t\treturn onSelect( files );\n\t\t}\n\t\tonFilesUpload( files );\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes,\n\t\t\tfilesList: files,\n\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\tselectMedia( media, closeMenu );\n\t\t\t},\n\t\t\tonError: onUploadError,\n\t\t} );\n\t};\n\n\tconst openOnArrowDown = ( event ) => {\n\t\tif ( event.keyCode === DOWN ) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.target.click();\n\t\t}\n\t};\n\n\tconst onlyAllowsImages = () => {\n\t\tif ( ! allowedTypes || allowedTypes.length === 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn allowedTypes.every(\n\t\t\t( allowedType ) =>\n\t\t\t\tallowedType === 'image' || allowedType.startsWith( 'image/' )\n\t\t);\n\t};\n\n\tconst gallery = multiple && onlyAllowsImages();\n\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tcontentClassName=\"block-editor-media-replace-flow__options\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => {\n\t\t\t\tif ( renderToggle ) {\n\t\t\t\t\treturn renderToggle( {\n\t\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t\t\t'aria-haspopup': 'true',\n\t\t\t\t\t\tonClick: onToggle,\n\t\t\t\t\t\tonKeyDown: openOnArrowDown,\n\t\t\t\t\t\tchildren: name,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\tonKeyDown={ openOnArrowDown }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ name }\n\t\t\t\t\t</ToolbarButton>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<NavigableMenu className=\"block-editor-media-replace-flow__media-upload-menu\">\n\t\t\t\t\t\t<MediaUploadCheck>\n\t\t\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\t\t\tgallery={ gallery }\n\t\t\t\t\t\t\t\taddToGallery={ addToGallery }\n\t\t\t\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\t\t\t\tvalue={ multiple ? mediaIds : mediaId }\n\t\t\t\t\t\t\t\tonSelect={ ( media ) =>\n\t\t\t\t\t\t\t\t\tselectMedia( media, onClose )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tallowedTypes={ allowedTypes }\n\t\t\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\ticon={ mediaIcon }\n\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Open Media Library' ) }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormFileUpload\n\t\t\t\t\t\t\t\tonChange={ ( event ) => {\n\t\t\t\t\t\t\t\t\tuploadFiles( event, onClose );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\taccept={ accept }\n\t\t\t\t\t\t\t\tmultiple={ !! multiple }\n\t\t\t\t\t\t\t\trender={ ( { openFileDialog } ) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\topenFileDialog();\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ _x( 'Upload', 'verb' ) }\n\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MediaUploadCheck>\n\t\t\t\t\t\t{ onToggleFeaturedImage && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ postFeaturedImage }\n\t\t\t\t\t\t\t\tonClick={ onToggleFeaturedImage }\n\t\t\t\t\t\t\t\tisPressed={ useFeaturedImage }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Use featured image' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ mediaURL && onReset && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ typeof children === 'function'\n\t\t\t\t\t\t\t? children( { onClose } )\n\t\t\t\t\t\t\t: children }\n\t\t\t\t\t</NavigableMenu>\n\t\t\t\t\t{ onSelectURL && (\n\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n\t\t\t\t\t\t<form className=\"block-editor-media-flow__url-input\">\n\t\t\t\t\t\t\t<span className=\"block-editor-media-replace-flow__image-url-label\">\n\t\t\t\t\t\t\t\t{ __( 'Current media URL:' ) }\n\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t<LinkControl\n\t\t\t\t\t\t\t\tvalue={ { url: mediaURL } }\n\t\t\t\t\t\t\t\tsettings={ [] }\n\t\t\t\t\t\t\t\tshowSuggestions={ false }\n\t\t\t\t\t\t\t\tonChange={ ( { url } ) => {\n\t\t\t\t\t\t\t\t\tonSelectURL( url );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tsearchInputPlaceholder={ __(\n\t\t\t\t\t\t\t\t\t'Paste or type URL'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t/>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-replace-flow/README.md\n */\nexport default compose( [\n\twithDispatch( ( dispatch ) => {\n\t\tconst { createNotice, removeNotice } = dispatch( noticesStore );\n\t\treturn {\n\t\t\tcreateNotice,\n\t\t\tremoveNotice,\n\t\t};\n\t} ),\n\twithFilters( 'editor.MediaReplaceFlow' ),\n] )( MediaReplaceFlow );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SACCC,cAAc,EACdC,aAAa,EACbC,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,aAAa,QACP,uBAAuB;AAC9B,SAASC,SAAS,EAAEC,YAAY,QAAQ,iBAAiB;AACzD,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,SACCC,iBAAiB,EACjBC,MAAM,EACNC,KAAK,IAAIC,SAAS,QACZ,kBAAkB;AACzB,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,mBAAmB,IAAIC,SAAS,QAAQ,gBAAgB;AACjE,SAASC,KAAK,IAAIC,YAAY,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,OAAOC,WAAW,MAAM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,EAC/DjD,EAAE,CAAE,oBAAqB;QAAC,CACvB,CAAC,eAEP0B,IAAA,CAACH,WAAW;UACXmE,KAAK,EAAG;YAAEO,GAAG,EAAE/D;UAAS,CAAG;UAC3BgE,QAAQ,EAAG,EAAI;UACfC,eAAe,EAAG,KAAO;UACzBL,QAAQ,EAAGA,CAAE;YAAEG;UAAI,CAAC,KAAM;YACzBxD,WAAW,CAAEwD,GAAI,CAAC;UACnB,CAAG;UACHG,sBAAsB,EAAGpG,EAAE,CAC1B,mBACD;QAAG,CACH,CAAC;MAAA,CACG,CACN;IAAA,CACA;EACA,CACH,CAAC;AAEJ,CAAC;;AAED;AACA;AACA;AACA,eAAegB,OAAO,CAAE,CACvBN,YAAY,CAAI2F,QAAQ,IAAM;EAC7B,MAAM;IAAEtD,YAAY;IAAEC;EAAa,CAAC,GAAGqD,QAAQ,CAAEjF,YAAa,CAAC;EAC/D,OAAO;IACN2B,YAAY;IACZC;EACD,CAAC;AACF,CAAE,CAAC,EACHzC,WAAW,CAAE,yBAA0B,CAAC,CACvC,CAAC,CAAE0B,gBAAiB,CAAC","ignoreList":[]}
@@ -1739,14 +1739,17 @@ iframe[name=editor-canvas] {
1739
1739
  display: block;
1740
1740
  padding: 0;
1741
1741
  position: relative;
1742
+ border: 1px solid #ddd;
1743
+ border-radius: 2px;
1742
1744
  }
1743
- .block-editor-global-styles-filters-panel__dropdown button,
1744
- .block-editor-global-styles__shadow-dropdown button {
1745
+
1746
+ .block-editor-global-styles-filters-panel__dropdown-toggle,
1747
+ .block-editor-global-styles__shadow-dropdown-toggle {
1745
1748
  width: 100%;
1746
1749
  padding: 8px;
1747
1750
  }
1748
- .block-editor-global-styles-filters-panel__dropdown button.is-open,
1749
- .block-editor-global-styles__shadow-dropdown button.is-open {
1751
+ .block-editor-global-styles-filters-panel__dropdown-toggle.is-open,
1752
+ .block-editor-global-styles__shadow-dropdown-toggle.is-open {
1750
1753
  background-color: #f0f0f0;
1751
1754
  }
1752
1755
 
@@ -1771,11 +1774,6 @@ iframe[name=editor-canvas] {
1771
1774
  }
1772
1775
  }
1773
1776
 
1774
- .block-editor-global-styles-filters-panel__dropdown {
1775
- border: 1px solid #ddd;
1776
- border-radius: 2px;
1777
- }
1778
-
1779
1777
  .block-editor-global-styles__shadow-indicator {
1780
1778
  appearance: none;
1781
1779
  background: none;
@@ -4135,7 +4133,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4135
4133
  width: 280px;
4136
4134
  padding: 24px 32px 32px;
4137
4135
  overflow-x: visible;
4138
- overflow-y: scroll;
4136
+ overflow-y: auto;
4139
4137
  }
4140
4138
  .block-editor-block-patterns-explorer__sidebar__categories-list__item {
4141
4139
  display: block;
@@ -1739,14 +1739,17 @@ iframe[name=editor-canvas] {
1739
1739
  display: block;
1740
1740
  padding: 0;
1741
1741
  position: relative;
1742
+ border: 1px solid #ddd;
1743
+ border-radius: 2px;
1742
1744
  }
1743
- .block-editor-global-styles-filters-panel__dropdown button,
1744
- .block-editor-global-styles__shadow-dropdown button {
1745
+
1746
+ .block-editor-global-styles-filters-panel__dropdown-toggle,
1747
+ .block-editor-global-styles__shadow-dropdown-toggle {
1745
1748
  width: 100%;
1746
1749
  padding: 8px;
1747
1750
  }
1748
- .block-editor-global-styles-filters-panel__dropdown button.is-open,
1749
- .block-editor-global-styles__shadow-dropdown button.is-open {
1751
+ .block-editor-global-styles-filters-panel__dropdown-toggle.is-open,
1752
+ .block-editor-global-styles__shadow-dropdown-toggle.is-open {
1750
1753
  background-color: #f0f0f0;
1751
1754
  }
1752
1755
 
@@ -1771,11 +1774,6 @@ iframe[name=editor-canvas] {
1771
1774
  }
1772
1775
  }
1773
1776
 
1774
- .block-editor-global-styles-filters-panel__dropdown {
1775
- border: 1px solid #ddd;
1776
- border-radius: 2px;
1777
- }
1778
-
1779
1777
  .block-editor-global-styles__shadow-indicator {
1780
1778
  appearance: none;
1781
1779
  background: none;
@@ -4136,7 +4134,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4136
4134
  width: 280px;
4137
4135
  padding: 24px 32px 32px;
4138
4136
  overflow-x: visible;
4139
- overflow-y: scroll;
4137
+ overflow-y: auto;
4140
4138
  }
4141
4139
  .block-editor-block-patterns-explorer__sidebar__categories-list__item {
4142
4140
  display: block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "14.14.2",
3
+ "version": "14.16.0",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -37,38 +37,38 @@
37
37
  "@emotion/react": "^11.7.1",
38
38
  "@emotion/styled": "^11.6.0",
39
39
  "@react-spring/web": "^9.4.5",
40
- "@wordpress/a11y": "^4.19.1",
41
- "@wordpress/api-fetch": "^7.19.1",
42
- "@wordpress/blob": "^4.19.1",
43
- "@wordpress/block-serialization-default-parser": "^5.19.1",
44
- "@wordpress/blocks": "^14.8.1",
45
- "@wordpress/commands": "^1.19.1",
46
- "@wordpress/components": "^29.5.1",
47
- "@wordpress/compose": "^7.19.1",
48
- "@wordpress/data": "^10.19.1",
49
- "@wordpress/date": "^5.19.1",
50
- "@wordpress/deprecated": "^4.19.1",
51
- "@wordpress/dom": "^4.19.1",
52
- "@wordpress/element": "^6.19.1",
53
- "@wordpress/escape-html": "^3.19.1",
54
- "@wordpress/hooks": "^4.19.1",
55
- "@wordpress/html-entities": "^4.19.1",
56
- "@wordpress/i18n": "^5.19.1",
57
- "@wordpress/icons": "^10.19.1",
58
- "@wordpress/is-shallow-equal": "^5.19.1",
59
- "@wordpress/keyboard-shortcuts": "^5.19.1",
60
- "@wordpress/keycodes": "^4.19.1",
61
- "@wordpress/notices": "^5.19.1",
62
- "@wordpress/preferences": "^4.19.1",
63
- "@wordpress/priority-queue": "^3.19.1",
64
- "@wordpress/private-apis": "^1.19.1",
65
- "@wordpress/rich-text": "^7.19.1",
66
- "@wordpress/style-engine": "^2.19.1",
67
- "@wordpress/token-list": "^3.19.1",
68
- "@wordpress/upload-media": "^0.4.1",
69
- "@wordpress/url": "^4.19.1",
70
- "@wordpress/warning": "^3.19.1",
71
- "@wordpress/wordcount": "^4.19.1",
40
+ "@wordpress/a11y": "^4.21.0",
41
+ "@wordpress/api-fetch": "^7.21.0",
42
+ "@wordpress/blob": "^4.21.0",
43
+ "@wordpress/block-serialization-default-parser": "^5.21.0",
44
+ "@wordpress/blocks": "^14.10.0",
45
+ "@wordpress/commands": "^1.21.0",
46
+ "@wordpress/components": "^29.7.0",
47
+ "@wordpress/compose": "^7.21.0",
48
+ "@wordpress/data": "^10.21.0",
49
+ "@wordpress/date": "^5.21.0",
50
+ "@wordpress/deprecated": "^4.21.0",
51
+ "@wordpress/dom": "^4.21.0",
52
+ "@wordpress/element": "^6.21.0",
53
+ "@wordpress/escape-html": "^3.21.0",
54
+ "@wordpress/hooks": "^4.21.0",
55
+ "@wordpress/html-entities": "^4.21.0",
56
+ "@wordpress/i18n": "^5.21.0",
57
+ "@wordpress/icons": "^10.21.0",
58
+ "@wordpress/is-shallow-equal": "^5.21.0",
59
+ "@wordpress/keyboard-shortcuts": "^5.21.0",
60
+ "@wordpress/keycodes": "^4.21.0",
61
+ "@wordpress/notices": "^5.21.0",
62
+ "@wordpress/preferences": "^4.21.0",
63
+ "@wordpress/priority-queue": "^3.21.0",
64
+ "@wordpress/private-apis": "^1.21.0",
65
+ "@wordpress/rich-text": "^7.21.0",
66
+ "@wordpress/style-engine": "^2.21.0",
67
+ "@wordpress/token-list": "^3.21.0",
68
+ "@wordpress/upload-media": "^0.6.0",
69
+ "@wordpress/url": "^4.21.0",
70
+ "@wordpress/warning": "^3.21.0",
71
+ "@wordpress/wordcount": "^4.21.0",
72
72
  "change-case": "^4.1.2",
73
73
  "clsx": "^2.1.1",
74
74
  "colord": "^2.7.0",
@@ -91,5 +91,5 @@
91
91
  "publishConfig": {
92
92
  "access": "public"
93
93
  },
94
- "gitHead": "ebddb7a8df3d45e83f318436516d9b6225486703"
94
+ "gitHead": "104af00f9abcd7a4d36b87e648f148c72cc4ea5f"
95
95
  }
@@ -82,7 +82,7 @@ function BlockBreadcrumb( { rootLabelText } ) {
82
82
  { rootLabel }
83
83
  </Button>
84
84
  ) }
85
- { ! hasSelection && rootLabel }
85
+ { ! hasSelection && <span>{ rootLabel }</span> }
86
86
  { !! clientId && (
87
87
  <Icon
88
88
  icon={ chevronRightSmall }
@@ -11,7 +11,9 @@ exports[`BlockBreadcrumb should render correctly 1`] = `
11
11
  aria-current="true"
12
12
  class="block-editor-block-breadcrumb__current"
13
13
  >
14
- Document
14
+ <span>
15
+ Document
16
+ </span>
15
17
  </li>
16
18
  </ul>
17
19
  </div>
@@ -29,7 +29,10 @@ export default function PreviewBlockPopover( { blocks } ) {
29
29
  <div className="block-editor-block-switcher__preview-title">
30
30
  { __( 'Preview' ) }
31
31
  </div>
32
- <BlockPreview viewportWidth={ 500 } blocks={ blocks } />
32
+ { /* 600px is the value of $break-small in base-styles/_breakpoints.scss.
33
+ We set the viewport width to 601px to make sure that the media-text
34
+ block which uses this breakpoint has the correct padding. */ }
35
+ <BlockPreview viewportWidth={ 601 } blocks={ blocks } />
33
36
  </div>
34
37
  </Popover>
35
38
  </div>
@@ -24,6 +24,7 @@ import usePopoverScroll from '../block-popover/use-popover-scroll';
24
24
  import ZoomOutModeInserters from './zoom-out-mode-inserters';
25
25
  import { useShowBlockTools } from './use-show-block-tools';
26
26
  import { unlock } from '../../lock-unlock';
27
+ import usePasteStyles from '../use-paste-styles';
27
28
 
28
29
  function selector( select ) {
29
30
  const {
@@ -74,6 +75,7 @@ export default function BlockTools( {
74
75
  const { getGroupingBlockName } = useSelect( blocksStore );
75
76
  const { showEmptyBlockSideInserter, showBlockToolbarPopover } =
76
77
  useShowBlockTools();
78
+ const pasteStyles = usePasteStyles();
77
79
 
78
80
  const {
79
81
  duplicateBlocks,
@@ -134,6 +136,13 @@ export default function BlockTools( {
134
136
  event.preventDefault();
135
137
  removeBlocks( clientIds );
136
138
  }
139
+ } else if ( isMatch( 'core/block-editor/paste-styles', event ) ) {
140
+ const clientIds = getSelectedBlockClientIds();
141
+ if ( clientIds.length ) {
142
+ event.preventDefault();
143
+ const blocks = getBlocksByClientId( clientIds );
144
+ pasteStyles( blocks );
145
+ }
137
146
  } else if ( isMatch( 'core/block-editor/insert-after', event ) ) {
138
147
  const clientIds = getSelectedBlockClientIds();
139
148
  if ( clientIds.length ) {
@@ -86,15 +86,13 @@ function VariationsDropdown( {
86
86
  toggleProps={ { iconPosition: 'right' } }
87
87
  >
88
88
  { () => (
89
- <div className={ `${ className }__container` }>
90
- <MenuGroup>
91
- <MenuItemsChoice
92
- choices={ selectOptions }
93
- value={ selectedValue }
94
- onSelect={ onSelectVariation }
95
- />
96
- </MenuGroup>
97
- </div>
89
+ <MenuGroup>
90
+ <MenuItemsChoice
91
+ choices={ selectOptions }
92
+ value={ selectedValue }
93
+ onSelect={ onSelectVariation }
94
+ />
95
+ </MenuGroup>
98
96
  ) }
99
97
  </DropdownMenu>
100
98
  );
@@ -7,7 +7,6 @@ import {
7
7
  __experimentalIsDefinedBorder as isDefinedBorder,
8
8
  __experimentalToolsPanel as ToolsPanel,
9
9
  __experimentalToolsPanelItem as ToolsPanelItem,
10
- __experimentalItemGroup as ItemGroup,
11
10
  BaseControl,
12
11
  } from '@wordpress/components';
13
12
  import { useCallback, useMemo } from '@wordpress/element';
@@ -298,13 +297,11 @@ export default function BorderPanel( {
298
297
  </BaseControl.VisualLabel>
299
298
  ) : null }
300
299
 
301
- <ItemGroup isBordered isSeparated>
302
- <ShadowPopover
303
- shadow={ shadow }
304
- onShadowChange={ setShadow }
305
- settings={ settings }
306
- />
307
- </ItemGroup>
300
+ <ShadowPopover
301
+ shadow={ shadow }
302
+ onShadowChange={ setShadow }
303
+ settings={ settings }
304
+ />
308
305
  </ToolsPanelItem>
309
306
  ) }
310
307
  </Wrapper>
@@ -124,7 +124,10 @@ const renderToggle =
124
124
 
125
125
  const toggleProps = {
126
126
  onClick: onToggle,
127
- className: clsx( { 'is-open': isOpen } ),
127
+ className: clsx(
128
+ 'block-editor-global-styles-filters-panel__dropdown-toggle',
129
+ { 'is-open': isOpen }
130
+ ),
128
131
  'aria-expanded': isOpen,
129
132
  ref: duotoneButtonRef,
130
133
  };
@@ -141,7 +141,10 @@ function renderShadowToggle( shadow, onShadowChange ) {
141
141
 
142
142
  const toggleProps = {
143
143
  onClick: onToggle,
144
- className: clsx( { 'is-open': isOpen } ),
144
+ className: clsx(
145
+ 'block-editor-global-styles__shadow-dropdown-toggle',
146
+ { 'is-open': isOpen }
147
+ ),
145
148
  'aria-expanded': isOpen,
146
149
  ref: shadowButtonRef,
147
150
  };