UNPKG

@wordpress/block-library

Version:
1 lines • 15.1 kB
{"version":3,"file":"edit.cjs","names":["__","useSelect","blockEditorStore","useDispatch","useState","BlockControls","ToolbarGroup","ToolbarButton","isRTL","formatListBulletsRTL","formatListBullets","formatListNumberedRTL","formatListNumbered","ConfirmDialog","createBlock","createListItemBlocks","useHeadings","useBlockProps","useInstanceId","noticeStore","useToolsPanelDropdownMenuProps","linearToNestedHeadingList","InspectorControls","ToolsPanel","ToolsPanelItem","ToggleControl","SelectControl","Placeholder","BlockIcon","icon","TableOfContentsList"],"sources":["../../src/table-of-contents/edit.jsx"],"sourcesContent":["import {\n\tBlockControls,\n\tBlockIcon,\n\tInspectorControls,\n\tstore as blockEditorStore,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\nimport {\n\tPlaceholder,\n\tToggleControl,\n\tToolbarButton,\n\tToolbarGroup,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { SelectControl } from '@wordpress/ui';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as noticeStore } from '@wordpress/notices';\nimport {\n\ttableOfContents as icon,\n\tformatListBullets,\n\tformatListBulletsRTL,\n\tformatListNumbered,\n\tformatListNumberedRTL,\n} from '@wordpress/icons';\nimport TableOfContentsList from './list';\nimport { createListItemBlocks, linearToNestedHeadingList } from './utils';\nimport { useHeadings } from './hooks';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nconst HEADING_LEVEL_ITEMS = [\n\t{ value: 'all', label: __( 'All levels' ) },\n\t{ value: '1', label: __( 'Heading 1' ) },\n\t{ value: '2', label: __( 'Heading 2' ) },\n\t{ value: '3', label: __( 'Heading 3' ) },\n\t{ value: '4', label: __( 'Heading 4' ) },\n\t{ value: '5', label: __( 'Heading 5' ) },\n\t{ value: '6', label: __( 'Heading 6' ) },\n];\n\n/** @typedef {import('./utils').HeadingData} HeadingData */\n\nfunction TableOfContentsToolbar( {\n\tcanDetach,\n\tclientId,\n\theadingTree,\n\tordered,\n\tsetAttributes,\n} ) {\n\tconst canInsertList = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, canInsertBlockType } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\n\t\t\treturn canInsertBlockType( 'core/list', rootClientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst [ isConfirmingDetach, setIsConfirmingDetach ] = useState( false );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\tisRTL() ? formatListBulletsRTL : formatListBullets\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttitle={ __( 'Unordered' ) }\n\t\t\t\t\t\tdescription={ __( 'Convert to unordered list' ) }\n\t\t\t\t\t\tonClick={ () => setAttributes( { ordered: false } ) }\n\t\t\t\t\t\tisActive={ ordered === false }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\tisRTL() ? formatListNumberedRTL : formatListNumbered\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttitle={ __( 'Ordered' ) }\n\t\t\t\t\t\tdescription={ __( 'Convert to ordered list' ) }\n\t\t\t\t\t\tonClick={ () => setAttributes( { ordered: true } ) }\n\t\t\t\t\t\tisActive={ ordered === true }\n\t\t\t\t\t/>\n\t\t\t\t</ToolbarGroup>\n\t\t\t\t{ canDetach && canInsertList && (\n\t\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tonClick={ () => setIsConfirmingDetach( true ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Detach' ) }\n\t\t\t\t\t\t</ToolbarButton>\n\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t) }\n\t\t\t</BlockControls>\n\t\t\t{ isConfirmingDetach && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen\n\t\t\t\t\ttitle={ __( 'Detach Table of Contents' ) }\n\t\t\t\t\t__experimentalHideHeader={ false }\n\t\t\t\t\tconfirmButtonText={ __( 'Detach' ) }\n\t\t\t\t\tonConfirm={ () => {\n\t\t\t\t\t\tsetIsConfirmingDetach( false );\n\t\t\t\t\t\treplaceBlocks(\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t\t'core/list',\n\t\t\t\t\t\t\t\t{ ordered },\n\t\t\t\t\t\t\t\tcreateListItemBlocks( headingTree, ordered )\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\tonCancel={ () => setIsConfirmingDetach( false ) }\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'The Table of Contents block lists the headings in the post. Detaching will enable you to edit, reorder, or remove entries. However, new headings will no longer be added automatically.'\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default function TableOfContentsEdit( {\n\tattributes: { onlyIncludeCurrentPage, maxLevel, ordered = true },\n\tclientId,\n\tcontext: { postId, postType },\n\tsetAttributes,\n} ) {\n\tconst postHeadings = useHeadings( {\n\t\tclientId,\n\t\tpostId,\n\t\tpostType,\n\t\tonlyIncludeCurrentPage,\n\t\tmaxLevel,\n\t} );\n\t// Without a post in context, e.g. in a template or a block preview, show\n\t// sample entries standing in for the headings of the post being viewed.\n\tconst headings = postId\n\t\t? postHeadings\n\t\t: [\n\t\t\t\t{\n\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t'Headings from the post being viewed appear here'\n\t\t\t\t\t),\n\t\t\t\t\tlevel: 2,\n\t\t\t\t},\n\t\t\t\t{ content: __( 'Subheading' ), level: 3 },\n\t\t\t];\n\n\tconst blockProps = useBlockProps();\n\tconst instanceId = useInstanceId(\n\t\tTableOfContentsEdit,\n\t\t'table-of-contents'\n\t);\n\n\t// If a user clicks to a link prevent redirection and show a warning.\n\tconst { createWarningNotice } = useDispatch( noticeStore );\n\tconst showRedirectionPreventedNotice = ( event ) => {\n\t\tevent.preventDefault();\n\t\tcreateWarningNotice( __( 'Links are disabled in the editor.' ), {\n\t\t\tid: `block-library/core/table-of-contents/redirection-prevented/${ instanceId }`,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t};\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\tconst headingTree = linearToNestedHeadingList( headings );\n\n\t// Without a post, the entries are samples, so there is nothing to detach.\n\t// The list style still applies, so its buttons stay available.\n\tconst toolbarControls = (\n\t\t<TableOfContentsToolbar\n\t\t\tcanDetach={ !! postId }\n\t\t\tclientId={ clientId }\n\t\t\theadingTree={ headingTree }\n\t\t\tordered={ ordered }\n\t\t\tsetAttributes={ setAttributes }\n\t\t/>\n\t);\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<ToolsPanel\n\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\tresetAll={ () => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tonlyIncludeCurrentPage: false,\n\t\t\t\t\t\tmaxLevel: undefined,\n\t\t\t\t\t\tordered: true,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t>\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! onlyIncludeCurrentPage }\n\t\t\t\t\tlabel={ __( 'Only include current page' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( { onlyIncludeCurrentPage: false } )\n\t\t\t\t\t}\n\t\t\t\t\tisShownByDefault\n\t\t\t\t>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Only include current page' ) }\n\t\t\t\t\t\tchecked={ onlyIncludeCurrentPage }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { onlyIncludeCurrentPage: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\tonlyIncludeCurrentPage\n\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t'Only including headings from the current page (if the post is paginated).'\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\t\t\t'Include headings from all pages (if the post is paginated).'\n\t\t\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</ToolsPanelItem>\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! maxLevel }\n\t\t\t\t\tlabel={ __( 'Limit heading levels' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( { maxLevel: undefined } )\n\t\t\t\t\t}\n\t\t\t\t\tisShownByDefault\n\t\t\t\t>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Include headings down to level' ) }\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tHEADING_LEVEL_ITEMS.find(\n\t\t\t\t\t\t\t\t( item ) =>\n\t\t\t\t\t\t\t\t\titem.value ===\n\t\t\t\t\t\t\t\t\t( maxLevel ? String( maxLevel ) : 'all' )\n\t\t\t\t\t\t\t) ?? HEADING_LEVEL_ITEMS[ 0 ]\n\t\t\t\t\t\t}\n\t\t\t\t\t\titems={ HEADING_LEVEL_ITEMS }\n\t\t\t\t\t\tonValueChange={ ( item ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tmaxLevel:\n\t\t\t\t\t\t\t\t\titem?.value && item.value !== 'all'\n\t\t\t\t\t\t\t\t\t\t? parseInt( item.value, 10 )\n\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t! maxLevel\n\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t'Including all heading levels in the table of contents.'\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\t\t\t'Only include headings up to and including this level.'\n\t\t\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</ToolsPanelItem>\n\t\t\t</ToolsPanel>\n\t\t</InspectorControls>\n\t);\n\n\t// If there are no headings or the only heading is empty.\n\t// Note that the toolbar controls are intentionally omitted since the\n\t// \"Detach\" option is useless to the placeholder state.\n\tif ( headings.length === 0 ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\ticon={ <BlockIcon icon={ icon } /> }\n\t\t\t\t\t\tlabel={ __( 'Table of Contents' ) }\n\t\t\t\t\t\tinstructions={ __(\n\t\t\t\t\t\t\t'Start adding Heading blocks to create a table of contents automatically.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t{ inspectorControls }\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst ListTag = ordered ? 'ol' : 'ul';\n\n\treturn (\n\t\t<>\n\t\t\t<nav { ...blockProps }>\n\t\t\t\t<ListTag>\n\t\t\t\t\t<TableOfContentsList\n\t\t\t\t\t\tnestedHeadingList={ headingTree }\n\t\t\t\t\t\tdisableLinkActivation\n\t\t\t\t\t\tonClick={ showRedirectionPreventedNotice }\n\t\t\t\t\t\tordered={ ordered }\n\t\t\t\t\t/>\n\t\t\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