@wordpress/global-styles-ui
Version:
Global Styles UI components for WordPress.
8 lines (7 loc) • 17.1 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../src/screen-block-list.tsx"],
"sourcesContent": ["import { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport {\n\tButton,\n\tFlexItem,\n\tprivateApis as componentsPrivateApis,\n\tSearchControl,\n\t__experimentalHStack as HStack,\n\t__experimentalText as WCText,\n} from '@wordpress/components';\nimport { VisuallyHidden } from '@wordpress/ui';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseState,\n\tuseContext,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseDeferredValue,\n\tmemo,\n} from '@wordpress/element';\nimport type { GlobalStylesConfig } from '@wordpress/global-styles-engine';\nimport {\n\tBlockIcon,\n\tprivateApis as blockEditorPrivateApis,\n\t// @ts-expect-error: Not typed yet.\n} from '@wordpress/block-editor';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { funnel } from '@wordpress/icons';\nimport { useBlockVariations } from './variations/variations-panel';\nimport { ScreenHeader } from './screen-header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\nimport { GlobalStylesContext } from './context';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasBackgroundPanel,\n} = unlock( blockEditorPrivateApis );\n\nconst { Menu } = unlock( componentsPrivateApis );\n\n/**\n * Whether a value, or anything nested inside it, holds a real user value.\n *\n * A user entry can survive as an empty husk: clearing a value writes\n * `undefined` in place rather than removing the key, so\n * `{ color: { text: undefined } }` means \"not customized\". An empty string\n * and zero are real values — an intentionally blank CSS string is still a\n * user entry.\n *\n * @param value The value to inspect.\n * @return Whether the value holds at least one leaf value.\n */\nfunction hasAnyValue( value: unknown ): boolean {\n\tif ( value === undefined || value === null ) {\n\t\treturn false;\n\t}\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.length > 0;\n\t}\n\tif ( typeof value === 'object' ) {\n\t\treturn Object.values( value ).some( hasAnyValue );\n\t}\n\treturn true;\n}\n\n/**\n * Whether the user has customized a block.\n *\n * Per-block user data lives under two roots: `styles.blocks` for style values\n * and `settings.blocks` for things like a block-specific color palette. Either\n * one counts as a customization, and both are resettable by the user.\n *\n * Reads the user layer only. The merged config would match nearly every block,\n * because themes style most of them.\n *\n * @param user The user's global styles config.\n * @param blockName The block to check, e.g. `core/quote`.\n * @return Whether the user has any styles or settings for that block.\n */\nexport function hasUserStylesForBlock(\n\tuser: GlobalStylesConfig | undefined,\n\tblockName: string\n): boolean {\n\treturn (\n\t\thasAnyValue( user?.styles?.blocks?.[ blockName ] ) ||\n\t\thasAnyValue( user?.settings?.blocks?.[ blockName ] )\n\t);\n}\n\ntype StyleFilter = 'all' | 'customized';\n\nfunction useSortedBlockTypes() {\n\tconst blockItems = useSelect(\n\t\t( select ) => select( blocksStore ).getBlockTypes(),\n\t\t[]\n\t);\n\t// Ensure core blocks are prioritized in the returned results,\n\t// because third party blocks can be registered earlier than\n\t// the core blocks (usually by using the `init` action),\n\t// thus affecting the display order.\n\t// We don't sort reusable blocks as they are handled differently.\n\tconst groupByType = ( blocks: any, block: any ) => {\n\t\tconst { core, noncore } = blocks;\n\t\tconst type = block.name.startsWith( 'core/' ) ? core : noncore;\n\t\ttype.push( block );\n\t\treturn blocks;\n\t};\n\tconst { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(\n\t\tgroupByType,\n\t\t{ core: [], noncore: [] }\n\t);\n\treturn [ ...coreItems, ...nonCoreItems ];\n}\n\nexport function useBlockHasGlobalStyles( blockName: string ) {\n\tconst [ rawSettings ] = useSetting( '', blockName );\n\tconst settings = useSettingsForBlockElement( rawSettings, blockName );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;\n\tconst hasVariationsPanel = !! useBlockVariations( blockName )?.length;\n\tconst hasGlobalStyles =\n\t\thasTypographyPanel ||\n\t\thasColorPanel ||\n\t\thasBackgroundPanel ||\n\t\thasLayoutPanel ||\n\t\thasVariationsPanel;\n\treturn hasGlobalStyles;\n}\n\ninterface BlockMenuItemProps {\n\tblock: any;\n\tisCustomized: boolean;\n}\n\nfunction BlockMenuItem( { block, isCustomized }: BlockMenuItemProps ) {\n\tconst hasBlockMenuItem = useBlockHasGlobalStyles( block.name );\n\tif ( ! hasBlockMenuItem ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\" spacing={ 2 }>\n\t\t\t\t<BlockIcon\n\t\t\t\t\tclassName=\"global-styles-ui-block-types-item__icon\"\n\t\t\t\t\ticon={ block.icon }\n\t\t\t\t/>\n\t\t\t\t<FlexItem>{ block.title }</FlexItem>\n\t\t\t\t{ isCustomized && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t\t{ __( 'Has custom styles' ) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\tclassName=\"global-styles-ui-block-types-item__indicator\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction EmptyBlockList( {\n\tfilterValue,\n\tstyleFilter,\n}: {\n\tfilterValue: string;\n\tstyleFilter: StyleFilter;\n} ) {\n\t// While searching, an empty list means the search matched nothing, whether\n\t// or not the customized filter is also on.\n\tconst label =\n\t\t'customized' === styleFilter && ! filterValue\n\t\t\t? __( \"You haven't customized any blocks yet.\" )\n\t\t\t: __( 'No blocks found.' );\n\treturn (\n\t\t<WCText\n\t\t\talign=\"center\"\n\t\t\tas=\"p\"\n\t\t\tclassName=\"global-styles-ui-block-types-item-list__no-results\"\n\t\t>\n\t\t\t{ label }\n\t\t</WCText>\n\t);\n}\n\ninterface BlockListProps {\n\tfilterValue: string;\n\tstyleFilter: StyleFilter;\n}\n\nfunction BlockList( { filterValue, styleFilter }: BlockListProps ) {\n\tconst sortedBlockTypes = useSortedBlockTypes();\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst { isMatchingSearchTerm } = useSelect( blocksStore );\n\tconst { user } = useContext( GlobalStylesContext );\n\n\t// Computed once for the whole list rather than per row, so the list does\n\t// not open a context subscription for every registered block.\n\tconst customizedBlockNames = useMemo( () => {\n\t\tconst names = new Set< string >();\n\t\tconst blockNames = [\n\t\t\t...Object.keys( user?.styles?.blocks ?? {} ),\n\t\t\t...Object.keys( user?.settings?.blocks ?? {} ),\n\t\t];\n\t\tblockNames.forEach( ( blockName ) => {\n\t\t\tif ( hasUserStylesForBlock( user, blockName ) ) {\n\t\t\t\tnames.add( blockName );\n\t\t\t}\n\t\t} );\n\t\treturn names;\n\t}, [ user ] );\n\n\tconst searchedBlockTypes = ! filterValue\n\t\t? sortedBlockTypes\n\t\t: sortedBlockTypes.filter( ( blockType ) =>\n\t\t\t\tisMatchingSearchTerm( blockType, filterValue )\n\t\t );\n\n\tconst filteredBlockTypes =\n\t\tstyleFilter === 'customized'\n\t\t\t? searchedBlockTypes.filter( ( blockType ) =>\n\t\t\t\t\tcustomizedBlockNames.has( blockType.name )\n\t\t\t )\n\t\t\t: searchedBlockTypes;\n\n\tconst blockTypesListRef = useRef< HTMLDivElement >( null );\n\n\t// Announce result count on change\n\tconst hasResults = filteredBlockTypes.length > 0;\n\tuseEffect( () => {\n\t\tif ( ! filterValue && styleFilter === 'all' ) {\n\t\t\treturn;\n\t\t}\n\t\t// We extract the results from the wrapper div's `ref` because\n\t\t// filtered items can contain items that will eventually not\n\t\t// render and there is no reliable way to detect when a child\n\t\t// will return `null`.\n\t\t// TODO: We should find a better way of handling this as it's\n\t\t// fragile and depends on the number of rendered elements of `BlockMenuItem`,\n\t\t// which is now one.\n\t\t// @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116\n\t\t// An empty list renders the empty state message as its only child, so\n\t\t// only count the children when there are results to count.\n\t\tconst count = hasResults\n\t\t\t? blockTypesListRef.current?.childElementCount || 0\n\t\t\t: 0;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage, 'polite' );\n\t}, [ filterValue, styleFilter, hasResults, debouncedSpeak ] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ blockTypesListRef }\n\t\t\tclassName=\"global-styles-ui-block-types-item-list\"\n\t\t\t// By default, BlockMenuItem has a role=listitem so this div must have a list role.\n\t\t\trole=\"list\"\n\t\t>\n\t\t\t{ filteredBlockTypes.length === 0 ? (\n\t\t\t\t<EmptyBlockList\n\t\t\t\t\tfilterValue={ filterValue }\n\t\t\t\t\tstyleFilter={ styleFilter }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\tfilteredBlockTypes.map( ( block ) => (\n\t\t\t\t\t<BlockMenuItem\n\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\tisCustomized={ customizedBlockNames.has( block.name ) }\n\t\t\t\t\t\tkey={ 'menu-itemblock-' + block.name }\n\t\t\t\t\t/>\n\t\t\t\t) )\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nconst MemoizedBlockList = memo( BlockList );\n\nfunction ScreenBlockList() {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst [ styleFilter, setStyleFilter ] = useState< StyleFilter >( 'all' );\n\tconst deferredFilterValue = useDeferredValue( filterValue );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Blocks' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Customize the appearance of specific blocks and for the whole site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<HStack\n\t\t\t\tclassName=\"global-styles-ui-block-types-filter\"\n\t\t\t\talignment=\"center\"\n\t\t\t\tspacing={ 2 }\n\t\t\t>\n\t\t\t\t<SearchControl\n\t\t\t\t\tclassName=\"global-styles-ui-block-types-search\"\n\t\t\t\t\tonChange={ setFilterValue }\n\t\t\t\t\tvalue={ filterValue }\n\t\t\t\t\tlabel={ __( 'Search' ) }\n\t\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t\t<Menu>\n\t\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\ticon={ funnel }\n\t\t\t\t\t\t\t\tlabel={ __( 'Filter blocks' ) }\n\t\t\t\t\t\t\t\tisPressed={ styleFilter !== 'all' }\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\t<Menu.Popover>\n\t\t\t\t\t\t<Menu.RadioItem\n\t\t\t\t\t\t\tname=\"global-styles-block-filter\"\n\t\t\t\t\t\t\tvalue=\"all\"\n\t\t\t\t\t\t\tchecked={ styleFilter === 'all' }\n\t\t\t\t\t\t\tonChange={ () => setStyleFilter( 'all' ) }\n\t\t\t\t\t\t\thideOnClick\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t{ __( 'All blocks' ) }\n\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t</Menu.RadioItem>\n\t\t\t\t\t\t<Menu.RadioItem\n\t\t\t\t\t\t\tname=\"global-styles-block-filter\"\n\t\t\t\t\t\t\tvalue=\"customized\"\n\t\t\t\t\t\t\tchecked={ styleFilter === 'customized' }\n\t\t\t\t\t\t\tonChange={ () => setStyleFilter( 'customized' ) }\n\t\t\t\t\t\t\thideOnClick\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t{ __( 'Customized' ) }\n\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t</Menu.RadioItem>\n\t\t\t\t\t</Menu.Popover>\n\t\t\t\t</Menu>\n\t\t\t</HStack>\n\t\t\t<MemoizedBlockList\n\t\t\t\tfilterValue={ deferredFilterValue }\n\t\t\t\tstyleFilter={ styleFilter }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenBlockList;\n"],
"mappings": ";AAAA,SAAS,SAAS,mBAAmB;AACrC,SAAS,IAAI,SAAS,UAAU;AAChC;AAAA,EACC;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,OAChB;AACP,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEP;AAAA,EACC;AAAA,EACA,eAAe;AAAA,OAET;AACP,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,SAAS,2BAA2B;AA0HhC,SAMC,UAND,KAMC,YAND;AAxHJ,IAAM;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,IAAI,OAAQ,sBAAuB;AAEnC,IAAM,EAAE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