@wordpress/block-library 9.8.6 → 9.8.8
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.
- package/build/navigation/edit/index.js +23 -2
- package/build/navigation/edit/index.js.map +1 -1
- package/build/post-content/edit.js +29 -2
- package/build/post-content/edit.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +3 -3
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +23 -2
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/post-content/edit.js +31 -3
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +3 -3
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-style/cover/style-rtl.css +5 -0
- package/build-style/cover/style.css +5 -0
- package/build-style/editor-rtl.css +1 -0
- package/build-style/editor.css +1 -0
- package/build-style/navigation/editor-rtl.css +1 -0
- package/build-style/navigation/editor.css +1 -0
- package/build-style/post-content/style-rtl.css +2 -4
- package/build-style/post-content/style.css +2 -4
- package/build-style/style-rtl.css +7 -4
- package/build-style/style.css +7 -4
- package/package.json +11 -11
- package/src/cover/index.php +38 -19
- package/src/cover/style.scss +6 -0
- package/src/image/index.php +1 -1
- package/src/navigation/edit/index.js +30 -3
- package/src/navigation/editor.scss +1 -0
- package/src/post-content/edit.js +30 -1
- package/src/post-content/style.scss +2 -4
- package/src/query/edit/inspector-controls/index.js +5 -8
|
@@ -109,12 +109,12 @@ export default function QueryInspectorControls(props) {
|
|
|
109
109
|
return onChangeDebounced.cancel;
|
|
110
110
|
}, [querySearch, onChangeDebounced]);
|
|
111
111
|
const showInheritControl = isTemplate && isControlAllowed(allowedControls, 'inherit');
|
|
112
|
-
const showPostTypeControl = !inherit && isControlAllowed(allowedControls, 'postType')
|
|
112
|
+
const showPostTypeControl = !inherit && isControlAllowed(allowedControls, 'postType');
|
|
113
113
|
const postTypeControlLabel = __('Post type');
|
|
114
114
|
const postTypeControlHelp = __('Select the type of content to display: posts, pages, or custom post types.');
|
|
115
115
|
const showColumnsControl = false;
|
|
116
|
-
const showOrderControl = !inherit && isControlAllowed(allowedControls, 'order')
|
|
117
|
-
const showStickyControl = !inherit && showSticky && isControlAllowed(allowedControls, 'sticky')
|
|
116
|
+
const showOrderControl = !inherit && isControlAllowed(allowedControls, 'order');
|
|
117
|
+
const showStickyControl = !inherit && showSticky && isControlAllowed(allowedControls, 'sticky');
|
|
118
118
|
const showSettingsPanel = showInheritControl || showPostTypeControl || showColumnsControl || showOrderControl || showStickyControl;
|
|
119
119
|
const showTaxControl = !!taxonomies?.length && isControlAllowed(allowedControls, 'taxQuery');
|
|
120
120
|
const showAuthorControl = isControlAllowed(allowedControls, 'author');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PanelBody","TextControl","SelectControl","RangeControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","Notice","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","useSelect","store","coreStore","__","privateApis","blockEditorPrivateApis","debounce","useEffect","useState","useCallback","OrderControl","AuthorControl","ParentControl","TaxonomyControls","FormatControls","StickyControl","CreateNewPostLink","PerPageControl","OffsetControl","PagesControl","unlock","usePostTypes","useIsPostTypeHierarchical","useAllowedControls","isControlAllowed","useTaxonomies","useToolsPanelDropdownMenuProps","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","BlockInfo","QueryInspectorControls","props","attributes","setQuery","setDisplayLayout","isTemplate","query","displayLayout","order","orderBy","author","authorIds","pages","postType","perPage","offset","sticky","inherit","taxQuery","parents","format","allowedControls","showSticky","setShowSticky","postTypesTaxonomiesMap","postTypesSelectOptions","postTypeFormatSupportMap","taxonomies","isPostTypeHierarchical","onPostTypeChange","newValue","updateQuery","supportedTaxonomies","updatedTaxQuery","Object","entries","reduce","accumulator","taxonomySlug","terms","includes","keys","length","undefined","hasFormatSupport","querySearch","setQuerySearch","search","onChangeDebounced","cancel","showInheritControl","showPostTypeControl","postTypeControlLabel","postTypeControlHelp","showColumnsControl","showOrderControl","showStickyControl","showSettingsPanel","showTaxControl","showAuthorControl","showSearchControl","showParentControl","postTypeHasFormatSupport","showFormatControl","select","themeSupports","getThemeSupports","formats","some","type","showFiltersPanel","dropdownMenuProps","showPostCountControl","showOffSetControl","showPagesControl","showDisplayPanel","children","title","__next40pxDefaultSize","__nextHasNoMarginBottom","label","isBlock","onChange","value","help","options","map","option","columns","min","max","Math","status","isDismissible","className","resetAll","hasValue","onDeselect","values"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tTextControl,\n\tSelectControl,\n\tRangeControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tNotice,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { debounce } from '@wordpress/compose';\nimport { useEffect, useState, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport OrderControl from './order-control';\nimport AuthorControl from './author-control';\nimport ParentControl from './parent-control';\nimport { TaxonomyControls } from './taxonomy-controls';\nimport FormatControls from './format-controls';\nimport StickyControl from './sticky-control';\nimport CreateNewPostLink from './create-new-post-link';\nimport PerPageControl from './per-page-control';\nimport OffsetControl from './offset-controls';\nimport PagesControl from './pages-control';\nimport { unlock } from '../../../lock-unlock';\nimport {\n\tusePostTypes,\n\tuseIsPostTypeHierarchical,\n\tuseAllowedControls,\n\tisControlAllowed,\n\tuseTaxonomies,\n} from '../../utils';\nimport { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';\n\nconst { BlockInfo } = unlock( blockEditorPrivateApis );\n\nexport default function QueryInspectorControls( props ) {\n\tconst { attributes, setQuery, setDisplayLayout, isTemplate } = props;\n\tconst { query, displayLayout } = attributes;\n\tconst {\n\t\torder,\n\t\torderBy,\n\t\tauthor: authorIds,\n\t\tpages,\n\t\tpostType,\n\t\tperPage,\n\t\toffset,\n\t\tsticky,\n\t\tinherit,\n\t\ttaxQuery,\n\t\tparents,\n\t\tformat,\n\t} = query;\n\tconst allowedControls = useAllowedControls( attributes );\n\tconst [ showSticky, setShowSticky ] = useState( postType === 'post' );\n\tconst {\n\t\tpostTypesTaxonomiesMap,\n\t\tpostTypesSelectOptions,\n\t\tpostTypeFormatSupportMap,\n\t} = usePostTypes();\n\tconst taxonomies = useTaxonomies( postType );\n\tconst isPostTypeHierarchical = useIsPostTypeHierarchical( postType );\n\tuseEffect( () => {\n\t\tsetShowSticky( postType === 'post' );\n\t}, [ postType ] );\n\tconst onPostTypeChange = ( newValue ) => {\n\t\tconst updateQuery = { postType: newValue };\n\t\t// We need to dynamically update the `taxQuery` property,\n\t\t// by removing any not supported taxonomy from the query.\n\t\tconst supportedTaxonomies = postTypesTaxonomiesMap[ newValue ];\n\t\tconst updatedTaxQuery = Object.entries( taxQuery || {} ).reduce(\n\t\t\t( accumulator, [ taxonomySlug, terms ] ) => {\n\t\t\t\tif ( supportedTaxonomies.includes( taxonomySlug ) ) {\n\t\t\t\t\taccumulator[ taxonomySlug ] = terms;\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t\tupdateQuery.taxQuery = !! Object.keys( updatedTaxQuery ).length\n\t\t\t? updatedTaxQuery\n\t\t\t: undefined;\n\n\t\tif ( newValue !== 'post' ) {\n\t\t\tupdateQuery.sticky = '';\n\t\t}\n\t\t// We need to reset `parents` because they are tied to each post type.\n\t\tupdateQuery.parents = [];\n\t\t// Post types can register post format support with `add_post_type_support`.\n\t\t// But we need to reset the `format` property when switching to post types\n\t\t// that do not support post formats.\n\t\tconst hasFormatSupport = postTypeFormatSupportMap[ newValue ];\n\t\tif ( ! hasFormatSupport ) {\n\t\t\tupdateQuery.format = [];\n\t\t}\n\n\t\tsetQuery( updateQuery );\n\t};\n\tconst [ querySearch, setQuerySearch ] = useState( query.search );\n\tconst onChangeDebounced = useCallback(\n\t\tdebounce( () => {\n\t\t\tif ( query.search !== querySearch ) {\n\t\t\t\tsetQuery( { search: querySearch } );\n\t\t\t}\n\t\t}, 250 ),\n\t\t[ querySearch, query.search ]\n\t);\n\tuseEffect( () => {\n\t\tonChangeDebounced();\n\t\treturn onChangeDebounced.cancel;\n\t}, [ querySearch, onChangeDebounced ] );\n\n\tconst showInheritControl =\n\t\tisTemplate && isControlAllowed( allowedControls, 'inherit' );\n\tconst showPostTypeControl =\n\t\t( ! inherit && isControlAllowed( allowedControls, 'postType' ) ) ||\n\t\t! isTemplate;\n\tconst postTypeControlLabel = __( 'Post type' );\n\tconst postTypeControlHelp = __(\n\t\t'Select the type of content to display: posts, pages, or custom post types.'\n\t);\n\tconst showColumnsControl = false;\n\tconst showOrderControl =\n\t\t( ! inherit && isControlAllowed( allowedControls, 'order' ) ) ||\n\t\t! isTemplate;\n\tconst showStickyControl =\n\t\t( ! inherit &&\n\t\t\tshowSticky &&\n\t\t\tisControlAllowed( allowedControls, 'sticky' ) ) ||\n\t\t( showSticky && ! isTemplate );\n\tconst showSettingsPanel =\n\t\tshowInheritControl ||\n\t\tshowPostTypeControl ||\n\t\tshowColumnsControl ||\n\t\tshowOrderControl ||\n\t\tshowStickyControl;\n\tconst showTaxControl =\n\t\t!! taxonomies?.length &&\n\t\tisControlAllowed( allowedControls, 'taxQuery' );\n\tconst showAuthorControl = isControlAllowed( allowedControls, 'author' );\n\tconst showSearchControl = isControlAllowed( allowedControls, 'search' );\n\tconst showParentControl =\n\t\tisControlAllowed( allowedControls, 'parents' ) &&\n\t\tisPostTypeHierarchical;\n\n\tconst postTypeHasFormatSupport = postTypeFormatSupportMap[ postType ];\n\tconst showFormatControl = useSelect(\n\t\t( select ) => {\n\t\t\t// Check if the post type supports post formats and if the control is allowed.\n\t\t\tif (\n\t\t\t\t! postTypeHasFormatSupport ||\n\t\t\t\t! isControlAllowed( allowedControls, 'format' )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst themeSupports = select( coreStore ).getThemeSupports();\n\n\t\t\t// If there are no supported formats, getThemeSupports still includes the default 'standard' format,\n\t\t\t// and in this case the control should not be shown since the user has no other formats to choose from.\n\t\t\treturn (\n\t\t\t\tthemeSupports.formats &&\n\t\t\t\tthemeSupports.formats.length > 0 &&\n\t\t\t\tthemeSupports.formats.some( ( type ) => type !== 'standard' )\n\t\t\t);\n\t\t},\n\t\t[ allowedControls, postTypeHasFormatSupport ]\n\t);\n\n\tconst showFiltersPanel =\n\t\tshowTaxControl ||\n\t\tshowAuthorControl ||\n\t\tshowSearchControl ||\n\t\tshowParentControl ||\n\t\tshowFormatControl;\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst showPostCountControl = isControlAllowed(\n\t\tallowedControls,\n\t\t'postCount'\n\t);\n\tconst showOffSetControl = isControlAllowed( allowedControls, 'offset' );\n\tconst showPagesControl = isControlAllowed( allowedControls, 'pages' );\n\n\tconst showDisplayPanel =\n\t\tshowPostCountControl || showOffSetControl || showPagesControl;\n\n\treturn (\n\t\t<>\n\t\t\t{ !! postType && (\n\t\t\t\t<BlockInfo>\n\t\t\t\t\t<CreateNewPostLink postType={ postType } />\n\t\t\t\t</BlockInfo>\n\t\t\t) }\n\t\t\t{ showSettingsPanel && (\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t{ showInheritControl && (\n\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Query type' ) }\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetQuery( { inherit: !! value } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\tinherit\n\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t'Display a list of posts or custom post types based on the current template.'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t'Display a list of posts or custom post types based on specific criteria.'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ !! inherit }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\tvalue={ false }\n\t\t\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showPostTypeControl &&\n\t\t\t\t\t\t( postTypesSelectOptions.length > 2 ? (\n\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\toptions={ postTypesSelectOptions }\n\t\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\t\tlabel={ postTypeControlLabel }\n\t\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\t\thelp={ postTypeControlHelp }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\t\tlabel={ postTypeControlLabel }\n\t\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\t\thelp={ postTypeControlHelp }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ postTypesSelectOptions.map( ( option ) => (\n\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\tkey={ option.value }\n\t\t\t\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\t\t\t\tlabel={ option.label }\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</ToggleGroupControl>\n\t\t\t\t\t\t) ) }\n\n\t\t\t\t\t{ showColumnsControl && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\t\t\tvalue={ displayLayout.columns }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetDisplayLayout( {\n\t\t\t\t\t\t\t\t\t\tcolumns: value,\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\tmin={ 2 }\n\t\t\t\t\t\t\t\tmax={ Math.max( 6, displayLayout.columns ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ displayLayout.columns > 6 && (\n\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'This column count exceeds the recommended amount and may cause visual breakage.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</Notice>\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{ showOrderControl && (\n\t\t\t\t\t\t<OrderControl\n\t\t\t\t\t\t\t{ ...{ order, orderBy } }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showStickyControl && (\n\t\t\t\t\t\t<StickyControl\n\t\t\t\t\t\t\tvalue={ sticky }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetQuery( { sticky: value } )\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</PanelBody>\n\t\t\t) }\n\t\t\t{ ! inherit && showDisplayPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tclassName=\"block-library-query-toolspanel__display\"\n\t\t\t\t\tlabel={ __( 'Display' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\t\tpages: 0,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Items' ) }\n\t\t\t\t\t\thasValue={ () => perPage > 0 }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PerPageControl\n\t\t\t\t\t\t\tperPage={ perPage }\n\t\t\t\t\t\t\toffset={ offset }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Offset' ) }\n\t\t\t\t\t\thasValue={ () => offset > 0 }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { offset: 0 } ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<OffsetControl\n\t\t\t\t\t\t\toffset={ offset }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Max Pages to Show' ) }\n\t\t\t\t\t\thasValue={ () => pages > 0 }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { pages: 0 } ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PagesControl pages={ pages } onChange={ setQuery } />\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t\t{ ! inherit && showFiltersPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tclassName=\"block-library-query-toolspanel__filters\" // unused but kept for backward compatibility\n\t\t\t\t\tlabel={ __( 'Filters' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\tauthor: '',\n\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\tsearch: '',\n\t\t\t\t\t\t\ttaxQuery: null,\n\t\t\t\t\t\t\tformat: [],\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tsetQuerySearch( '' );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ showTaxControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Taxonomies' ) }\n\t\t\t\t\t\t\thasValue={ () =>\n\t\t\t\t\t\t\t\tObject.values( taxQuery || {} ).some(\n\t\t\t\t\t\t\t\t\t( terms ) => !! terms.length\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { taxQuery: null } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TaxonomyControls\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showAuthorControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! authorIds }\n\t\t\t\t\t\t\tlabel={ __( 'Authors' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { author: '' } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<AuthorControl\n\t\t\t\t\t\t\t\tvalue={ authorIds }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSearchControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! querySearch }\n\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuerySearch( '' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\t\tvalue={ querySearch }\n\t\t\t\t\t\t\t\tonChange={ setQuerySearch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showParentControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! parents?.length }\n\t\t\t\t\t\t\tlabel={ __( 'Parents' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { parents: [] } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ParentControl\n\t\t\t\t\t\t\t\tparents={ parents }\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showFormatControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! format?.length }\n\t\t\t\t\t\t\tlabel={ __( 'Formats' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { format: [] } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormatControls\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,gCAAgC,IAAIC,kBAAkB,EACtDC,sCAAsC,IAAIC,wBAAwB,EAClEC,MAAM,EACNC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,SAAS,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,oBAAoB;;AAErE;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,O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;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["PanelBody","TextControl","SelectControl","RangeControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","Notice","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","useSelect","store","coreStore","__","privateApis","blockEditorPrivateApis","debounce","useEffect","useState","useCallback","OrderControl","AuthorControl","ParentControl","TaxonomyControls","FormatControls","StickyControl","CreateNewPostLink","PerPageControl","OffsetControl","PagesControl","unlock","usePostTypes","useIsPostTypeHierarchical","useAllowedControls","isControlAllowed","useTaxonomies","useToolsPanelDropdownMenuProps","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","BlockInfo","QueryInspectorControls","props","attributes","setQuery","setDisplayLayout","isTemplate","query","displayLayout","order","orderBy","author","authorIds","pages","postType","perPage","offset","sticky","inherit","taxQuery","parents","format","allowedControls","showSticky","setShowSticky","postTypesTaxonomiesMap","postTypesSelectOptions","postTypeFormatSupportMap","taxonomies","isPostTypeHierarchical","onPostTypeChange","newValue","updateQuery","supportedTaxonomies","updatedTaxQuery","Object","entries","reduce","accumulator","taxonomySlug","terms","includes","keys","length","undefined","hasFormatSupport","querySearch","setQuerySearch","search","onChangeDebounced","cancel","showInheritControl","showPostTypeControl","postTypeControlLabel","postTypeControlHelp","showColumnsControl","showOrderControl","showStickyControl","showSettingsPanel","showTaxControl","showAuthorControl","showSearchControl","showParentControl","postTypeHasFormatSupport","showFormatControl","select","themeSupports","getThemeSupports","formats","some","type","showFiltersPanel","dropdownMenuProps","showPostCountControl","showOffSetControl","showPagesControl","showDisplayPanel","children","title","__next40pxDefaultSize","__nextHasNoMarginBottom","label","isBlock","onChange","value","help","options","map","option","columns","min","max","Math","status","isDismissible","className","resetAll","hasValue","onDeselect","values"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tTextControl,\n\tSelectControl,\n\tRangeControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tNotice,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { debounce } from '@wordpress/compose';\nimport { useEffect, useState, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport OrderControl from './order-control';\nimport AuthorControl from './author-control';\nimport ParentControl from './parent-control';\nimport { TaxonomyControls } from './taxonomy-controls';\nimport FormatControls from './format-controls';\nimport StickyControl from './sticky-control';\nimport CreateNewPostLink from './create-new-post-link';\nimport PerPageControl from './per-page-control';\nimport OffsetControl from './offset-controls';\nimport PagesControl from './pages-control';\nimport { unlock } from '../../../lock-unlock';\nimport {\n\tusePostTypes,\n\tuseIsPostTypeHierarchical,\n\tuseAllowedControls,\n\tisControlAllowed,\n\tuseTaxonomies,\n} from '../../utils';\nimport { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';\n\nconst { BlockInfo } = unlock( blockEditorPrivateApis );\n\nexport default function QueryInspectorControls( props ) {\n\tconst { attributes, setQuery, setDisplayLayout, isTemplate } = props;\n\tconst { query, displayLayout } = attributes;\n\tconst {\n\t\torder,\n\t\torderBy,\n\t\tauthor: authorIds,\n\t\tpages,\n\t\tpostType,\n\t\tperPage,\n\t\toffset,\n\t\tsticky,\n\t\tinherit,\n\t\ttaxQuery,\n\t\tparents,\n\t\tformat,\n\t} = query;\n\tconst allowedControls = useAllowedControls( attributes );\n\tconst [ showSticky, setShowSticky ] = useState( postType === 'post' );\n\tconst {\n\t\tpostTypesTaxonomiesMap,\n\t\tpostTypesSelectOptions,\n\t\tpostTypeFormatSupportMap,\n\t} = usePostTypes();\n\tconst taxonomies = useTaxonomies( postType );\n\tconst isPostTypeHierarchical = useIsPostTypeHierarchical( postType );\n\tuseEffect( () => {\n\t\tsetShowSticky( postType === 'post' );\n\t}, [ postType ] );\n\tconst onPostTypeChange = ( newValue ) => {\n\t\tconst updateQuery = { postType: newValue };\n\t\t// We need to dynamically update the `taxQuery` property,\n\t\t// by removing any not supported taxonomy from the query.\n\t\tconst supportedTaxonomies = postTypesTaxonomiesMap[ newValue ];\n\t\tconst updatedTaxQuery = Object.entries( taxQuery || {} ).reduce(\n\t\t\t( accumulator, [ taxonomySlug, terms ] ) => {\n\t\t\t\tif ( supportedTaxonomies.includes( taxonomySlug ) ) {\n\t\t\t\t\taccumulator[ taxonomySlug ] = terms;\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t\tupdateQuery.taxQuery = !! Object.keys( updatedTaxQuery ).length\n\t\t\t? updatedTaxQuery\n\t\t\t: undefined;\n\n\t\tif ( newValue !== 'post' ) {\n\t\t\tupdateQuery.sticky = '';\n\t\t}\n\t\t// We need to reset `parents` because they are tied to each post type.\n\t\tupdateQuery.parents = [];\n\t\t// Post types can register post format support with `add_post_type_support`.\n\t\t// But we need to reset the `format` property when switching to post types\n\t\t// that do not support post formats.\n\t\tconst hasFormatSupport = postTypeFormatSupportMap[ newValue ];\n\t\tif ( ! hasFormatSupport ) {\n\t\t\tupdateQuery.format = [];\n\t\t}\n\n\t\tsetQuery( updateQuery );\n\t};\n\tconst [ querySearch, setQuerySearch ] = useState( query.search );\n\tconst onChangeDebounced = useCallback(\n\t\tdebounce( () => {\n\t\t\tif ( query.search !== querySearch ) {\n\t\t\t\tsetQuery( { search: querySearch } );\n\t\t\t}\n\t\t}, 250 ),\n\t\t[ querySearch, query.search ]\n\t);\n\tuseEffect( () => {\n\t\tonChangeDebounced();\n\t\treturn onChangeDebounced.cancel;\n\t}, [ querySearch, onChangeDebounced ] );\n\n\tconst showInheritControl =\n\t\tisTemplate && isControlAllowed( allowedControls, 'inherit' );\n\tconst showPostTypeControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'postType' );\n\tconst postTypeControlLabel = __( 'Post type' );\n\tconst postTypeControlHelp = __(\n\t\t'Select the type of content to display: posts, pages, or custom post types.'\n\t);\n\tconst showColumnsControl = false;\n\tconst showOrderControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'order' );\n\tconst showStickyControl =\n\t\t! inherit &&\n\t\tshowSticky &&\n\t\tisControlAllowed( allowedControls, 'sticky' );\n\tconst showSettingsPanel =\n\t\tshowInheritControl ||\n\t\tshowPostTypeControl ||\n\t\tshowColumnsControl ||\n\t\tshowOrderControl ||\n\t\tshowStickyControl;\n\tconst showTaxControl =\n\t\t!! taxonomies?.length &&\n\t\tisControlAllowed( allowedControls, 'taxQuery' );\n\tconst showAuthorControl = isControlAllowed( allowedControls, 'author' );\n\tconst showSearchControl = isControlAllowed( allowedControls, 'search' );\n\tconst showParentControl =\n\t\tisControlAllowed( allowedControls, 'parents' ) &&\n\t\tisPostTypeHierarchical;\n\n\tconst postTypeHasFormatSupport = postTypeFormatSupportMap[ postType ];\n\tconst showFormatControl = useSelect(\n\t\t( select ) => {\n\t\t\t// Check if the post type supports post formats and if the control is allowed.\n\t\t\tif (\n\t\t\t\t! postTypeHasFormatSupport ||\n\t\t\t\t! isControlAllowed( allowedControls, 'format' )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst themeSupports = select( coreStore ).getThemeSupports();\n\n\t\t\t// If there are no supported formats, getThemeSupports still includes the default 'standard' format,\n\t\t\t// and in this case the control should not be shown since the user has no other formats to choose from.\n\t\t\treturn (\n\t\t\t\tthemeSupports.formats &&\n\t\t\t\tthemeSupports.formats.length > 0 &&\n\t\t\t\tthemeSupports.formats.some( ( type ) => type !== 'standard' )\n\t\t\t);\n\t\t},\n\t\t[ allowedControls, postTypeHasFormatSupport ]\n\t);\n\n\tconst showFiltersPanel =\n\t\tshowTaxControl ||\n\t\tshowAuthorControl ||\n\t\tshowSearchControl ||\n\t\tshowParentControl ||\n\t\tshowFormatControl;\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst showPostCountControl = isControlAllowed(\n\t\tallowedControls,\n\t\t'postCount'\n\t);\n\tconst showOffSetControl = isControlAllowed( allowedControls, 'offset' );\n\tconst showPagesControl = isControlAllowed( allowedControls, 'pages' );\n\n\tconst showDisplayPanel =\n\t\tshowPostCountControl || showOffSetControl || showPagesControl;\n\n\treturn (\n\t\t<>\n\t\t\t{ !! postType && (\n\t\t\t\t<BlockInfo>\n\t\t\t\t\t<CreateNewPostLink postType={ postType } />\n\t\t\t\t</BlockInfo>\n\t\t\t) }\n\t\t\t{ showSettingsPanel && (\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t{ showInheritControl && (\n\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Query type' ) }\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetQuery( { inherit: !! value } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\tinherit\n\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t'Display a list of posts or custom post types based on the current template.'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t'Display a list of posts or custom post types based on specific criteria.'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ !! inherit }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\tvalue={ false }\n\t\t\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showPostTypeControl &&\n\t\t\t\t\t\t( postTypesSelectOptions.length > 2 ? (\n\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\toptions={ postTypesSelectOptions }\n\t\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\t\tlabel={ postTypeControlLabel }\n\t\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\t\thelp={ postTypeControlHelp }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\t\tlabel={ postTypeControlLabel }\n\t\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\t\thelp={ postTypeControlHelp }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ postTypesSelectOptions.map( ( option ) => (\n\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\tkey={ option.value }\n\t\t\t\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\t\t\t\tlabel={ option.label }\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</ToggleGroupControl>\n\t\t\t\t\t\t) ) }\n\n\t\t\t\t\t{ showColumnsControl && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\t\t\tvalue={ displayLayout.columns }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetDisplayLayout( {\n\t\t\t\t\t\t\t\t\t\tcolumns: value,\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\tmin={ 2 }\n\t\t\t\t\t\t\t\tmax={ Math.max( 6, displayLayout.columns ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ displayLayout.columns > 6 && (\n\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'This column count exceeds the recommended amount and may cause visual breakage.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</Notice>\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{ showOrderControl && (\n\t\t\t\t\t\t<OrderControl\n\t\t\t\t\t\t\t{ ...{ order, orderBy } }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showStickyControl && (\n\t\t\t\t\t\t<StickyControl\n\t\t\t\t\t\t\tvalue={ sticky }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetQuery( { sticky: value } )\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</PanelBody>\n\t\t\t) }\n\t\t\t{ ! inherit && showDisplayPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tclassName=\"block-library-query-toolspanel__display\"\n\t\t\t\t\tlabel={ __( 'Display' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\t\tpages: 0,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Items' ) }\n\t\t\t\t\t\thasValue={ () => perPage > 0 }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PerPageControl\n\t\t\t\t\t\t\tperPage={ perPage }\n\t\t\t\t\t\t\toffset={ offset }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Offset' ) }\n\t\t\t\t\t\thasValue={ () => offset > 0 }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { offset: 0 } ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<OffsetControl\n\t\t\t\t\t\t\toffset={ offset }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Max Pages to Show' ) }\n\t\t\t\t\t\thasValue={ () => pages > 0 }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { pages: 0 } ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PagesControl pages={ pages } onChange={ setQuery } />\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t\t{ ! inherit && showFiltersPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tclassName=\"block-library-query-toolspanel__filters\" // unused but kept for backward compatibility\n\t\t\t\t\tlabel={ __( 'Filters' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\tauthor: '',\n\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\tsearch: '',\n\t\t\t\t\t\t\ttaxQuery: null,\n\t\t\t\t\t\t\tformat: [],\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tsetQuerySearch( '' );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ showTaxControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Taxonomies' ) }\n\t\t\t\t\t\t\thasValue={ () =>\n\t\t\t\t\t\t\t\tObject.values( taxQuery || {} ).some(\n\t\t\t\t\t\t\t\t\t( terms ) => !! terms.length\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { taxQuery: null } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TaxonomyControls\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showAuthorControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! authorIds }\n\t\t\t\t\t\t\tlabel={ __( 'Authors' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { author: '' } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<AuthorControl\n\t\t\t\t\t\t\t\tvalue={ authorIds }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSearchControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! querySearch }\n\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuerySearch( '' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\t\tvalue={ querySearch }\n\t\t\t\t\t\t\t\tonChange={ setQuerySearch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showParentControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! parents?.length }\n\t\t\t\t\t\t\tlabel={ __( 'Parents' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { parents: [] } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ParentControl\n\t\t\t\t\t\t\t\tparents={ parents }\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showFormatControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! format?.length }\n\t\t\t\t\t\t\tlabel={ __( 'Formats' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { format: [] } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormatControls\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AAC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G;QACzBgI,UAAU,EAAGA,CAAA,KAAM9F,QAAQ,CAAE;UAAEgB,OAAO,EAAE;QAAG,CAAE,CAAG;QAAAyD,QAAA,eAEhDlF,IAAA,CAAChB,aAAa;UACbyC,OAAO,EAAGA,OAAS;UACnBN,QAAQ,EAAGA,QAAU;UACrBqE,QAAQ,EAAG/E;QAAU,CACrB;MAAC,CACa,CAChB,EACC4D,iBAAiB,iBAClBrE,IAAA,CAAC7B,cAAc;QACdmI,QAAQ,EAAGA,CAAA,KAAM,CAAC,CAAE5E,MAAM,EAAEsB,MAAQ;QACpCsC,KAAK,EAAG/G,EAAE,CAAE,SAAU,CAAG;QACzBgI,UAAU,EAAGA,CAAA,KAAM9F,QAAQ,CAAE;UAAEiB,MAAM,EAAE;QAAG,CAAE,CAAG;QAAAwD,QAAA,eAE/ClF,IAAA,CAACd,cAAc;UACdsG,QAAQ,EAAG/E,QAAU;UACrBG,KAAK,EAAGA;QAAO,CACf;MAAC,CACa,CAChB;IAAA,CACU,CACZ;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
|
|
@@ -305,6 +305,11 @@
|
|
|
305
305
|
z-index: 1;
|
|
306
306
|
color: inherit; direction: rtl;
|
|
307
307
|
}
|
|
308
|
+
.has-modal-open .wp-block-cover-image .wp-block-cover__inner-container,
|
|
309
|
+
.has-modal-open .wp-block-cover .wp-block-cover__inner-container {
|
|
310
|
+
z-index: auto;
|
|
311
|
+
}
|
|
312
|
+
|
|
308
313
|
.wp-block-cover-image.is-position-top-left,
|
|
309
314
|
.wp-block-cover.is-position-top-left {
|
|
310
315
|
align-items: flex-start;
|
|
@@ -307,6 +307,11 @@
|
|
|
307
307
|
color: inherit;
|
|
308
308
|
/*rtl:raw: direction: rtl; */
|
|
309
309
|
}
|
|
310
|
+
.has-modal-open .wp-block-cover-image .wp-block-cover__inner-container,
|
|
311
|
+
.has-modal-open .wp-block-cover .wp-block-cover__inner-container {
|
|
312
|
+
z-index: auto;
|
|
313
|
+
}
|
|
314
|
+
|
|
310
315
|
.wp-block-cover-image.is-position-top-left,
|
|
311
316
|
.wp-block-cover.is-position-top-left {
|
|
312
317
|
align-items: flex-start;
|
|
@@ -1576,6 +1576,7 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
1576
1576
|
.wp-block-navigation .wp-block + .block-list-appender .block-editor-button-block-appender {
|
|
1577
1577
|
background-color: #1e1e1e;
|
|
1578
1578
|
color: #fff;
|
|
1579
|
+
height: 24px;
|
|
1579
1580
|
}
|
|
1580
1581
|
.wp-block-navigation .wp-block + .block-list-appender .block-editor-button-block-appender.block-editor-button-block-appender.block-editor-button-block-appender {
|
|
1581
1582
|
padding: 0;
|
package/build-style/editor.css
CHANGED
|
@@ -1585,6 +1585,7 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
1585
1585
|
.wp-block-navigation .wp-block + .block-list-appender .block-editor-button-block-appender {
|
|
1586
1586
|
background-color: #1e1e1e;
|
|
1587
1587
|
color: #fff;
|
|
1588
|
+
height: 24px;
|
|
1588
1589
|
}
|
|
1589
1590
|
.wp-block-navigation .wp-block + .block-list-appender .block-editor-button-block-appender.block-editor-button-block-appender.block-editor-button-block-appender {
|
|
1590
1591
|
padding: 0;
|
|
@@ -222,6 +222,7 @@
|
|
|
222
222
|
.wp-block-navigation .wp-block + .block-list-appender .block-editor-button-block-appender {
|
|
223
223
|
background-color: #1e1e1e;
|
|
224
224
|
color: #fff;
|
|
225
|
+
height: 24px;
|
|
225
226
|
}
|
|
226
227
|
.wp-block-navigation .wp-block + .block-list-appender .block-editor-button-block-appender.block-editor-button-block-appender.block-editor-button-block-appender {
|
|
227
228
|
padding: 0;
|
|
@@ -222,6 +222,7 @@
|
|
|
222
222
|
.wp-block-navigation .wp-block + .block-list-appender .block-editor-button-block-appender {
|
|
223
223
|
background-color: #1e1e1e;
|
|
224
224
|
color: #fff;
|
|
225
|
+
height: 24px;
|
|
225
226
|
}
|
|
226
227
|
.wp-block-navigation .wp-block + .block-list-appender .block-editor-button-block-appender.block-editor-button-block-appender.block-editor-button-block-appender {
|
|
227
228
|
padding: 0;
|
|
@@ -820,6 +820,11 @@
|
|
|
820
820
|
z-index: 1;
|
|
821
821
|
color: inherit; direction: rtl;
|
|
822
822
|
}
|
|
823
|
+
.has-modal-open .wp-block-cover-image .wp-block-cover__inner-container,
|
|
824
|
+
.has-modal-open .wp-block-cover .wp-block-cover__inner-container {
|
|
825
|
+
z-index: auto;
|
|
826
|
+
}
|
|
827
|
+
|
|
823
828
|
.wp-block-cover-image.is-position-top-left,
|
|
824
829
|
.wp-block-cover.is-position-top-left {
|
|
825
830
|
align-items: flex-start;
|
|
@@ -2883,10 +2888,8 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
2883
2888
|
margin-right: 0.5em;
|
|
2884
2889
|
}
|
|
2885
2890
|
|
|
2886
|
-
.wp-block-post-content
|
|
2887
|
-
|
|
2888
|
-
display: table;
|
|
2889
|
-
clear: both;
|
|
2891
|
+
.wp-block-post-content {
|
|
2892
|
+
display: flow-root;
|
|
2890
2893
|
}
|
|
2891
2894
|
|
|
2892
2895
|
.wp-block-post-date {
|
package/build-style/style.css
CHANGED
|
@@ -827,6 +827,11 @@
|
|
|
827
827
|
color: inherit;
|
|
828
828
|
/*rtl:raw: direction: rtl; */
|
|
829
829
|
}
|
|
830
|
+
.has-modal-open .wp-block-cover-image .wp-block-cover__inner-container,
|
|
831
|
+
.has-modal-open .wp-block-cover .wp-block-cover__inner-container {
|
|
832
|
+
z-index: auto;
|
|
833
|
+
}
|
|
834
|
+
|
|
830
835
|
.wp-block-cover-image.is-position-top-left,
|
|
831
836
|
.wp-block-cover.is-position-top-left {
|
|
832
837
|
align-items: flex-start;
|
|
@@ -2913,10 +2918,8 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
2913
2918
|
margin-left: 0.5em;
|
|
2914
2919
|
}
|
|
2915
2920
|
|
|
2916
|
-
.wp-block-post-content
|
|
2917
|
-
|
|
2918
|
-
display: table;
|
|
2919
|
-
clear: both;
|
|
2921
|
+
.wp-block-post-content {
|
|
2922
|
+
display: flow-root;
|
|
2920
2923
|
}
|
|
2921
2924
|
|
|
2922
2925
|
.wp-block-post-date {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.8.
|
|
3
|
+
"version": "9.8.8",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"@wordpress/api-fetch": "^7.8.2",
|
|
44
44
|
"@wordpress/autop": "^4.8.1",
|
|
45
45
|
"@wordpress/blob": "^4.8.1",
|
|
46
|
-
"@wordpress/block-editor": "^14.3.
|
|
47
|
-
"@wordpress/blocks": "^13.8.
|
|
48
|
-
"@wordpress/components": "^28.8.
|
|
46
|
+
"@wordpress/block-editor": "^14.3.7",
|
|
47
|
+
"@wordpress/blocks": "^13.8.5",
|
|
48
|
+
"@wordpress/components": "^28.8.7",
|
|
49
49
|
"@wordpress/compose": "^7.8.3",
|
|
50
|
-
"@wordpress/core-data": "^7.8.
|
|
50
|
+
"@wordpress/core-data": "^7.8.7",
|
|
51
51
|
"@wordpress/data": "^10.8.3",
|
|
52
52
|
"@wordpress/date": "^5.8.2",
|
|
53
53
|
"@wordpress/deprecated": "^4.8.2",
|
|
@@ -58,17 +58,17 @@
|
|
|
58
58
|
"@wordpress/html-entities": "^4.8.1",
|
|
59
59
|
"@wordpress/i18n": "^5.8.2",
|
|
60
60
|
"@wordpress/icons": "^10.8.2",
|
|
61
|
-
"@wordpress/interactivity": "^6.8.
|
|
62
|
-
"@wordpress/interactivity-router": "^2.8.
|
|
61
|
+
"@wordpress/interactivity": "^6.8.5",
|
|
62
|
+
"@wordpress/interactivity-router": "^2.8.6",
|
|
63
63
|
"@wordpress/keyboard-shortcuts": "^5.8.3",
|
|
64
64
|
"@wordpress/keycodes": "^4.8.2",
|
|
65
65
|
"@wordpress/notices": "^5.8.3",
|
|
66
|
-
"@wordpress/patterns": "^2.8.
|
|
66
|
+
"@wordpress/patterns": "^2.8.7",
|
|
67
67
|
"@wordpress/primitives": "^4.8.1",
|
|
68
68
|
"@wordpress/private-apis": "^1.8.1",
|
|
69
|
-
"@wordpress/reusable-blocks": "^5.8.
|
|
69
|
+
"@wordpress/reusable-blocks": "^5.8.7",
|
|
70
70
|
"@wordpress/rich-text": "^7.8.3",
|
|
71
|
-
"@wordpress/server-side-render": "^5.8.
|
|
71
|
+
"@wordpress/server-side-render": "^5.8.7",
|
|
72
72
|
"@wordpress/url": "^4.8.1",
|
|
73
73
|
"@wordpress/viewport": "^6.8.3",
|
|
74
74
|
"@wordpress/wordcount": "^4.8.1",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"publishConfig": {
|
|
90
90
|
"access": "public"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "b1ace05ee94f0803e51b205306c19fc706499ede"
|
|
93
93
|
}
|
package/src/cover/index.php
CHANGED
|
@@ -20,29 +20,22 @@ function render_block_core_cover( $attributes, $content ) {
|
|
|
20
20
|
return $content;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
$object_position = isset( $attributes['focalPoint'] )
|
|
24
|
+
? round( $attributes['focalPoint']['x'] * 100 ) . '% ' . round( $attributes['focalPoint']['y'] * 100 ) . '%'
|
|
25
|
+
: null;
|
|
26
|
+
|
|
23
27
|
if ( ! ( $attributes['hasParallax'] || $attributes['isRepeated'] ) ) {
|
|
24
28
|
$attr = array(
|
|
25
29
|
'class' => 'wp-block-cover__image-background',
|
|
26
30
|
'data-object-fit' => 'cover',
|
|
27
31
|
);
|
|
28
32
|
|
|
29
|
-
if (
|
|
30
|
-
$object_position = round( $attributes['focalPoint']['x'] * 100 ) . '% ' . round( $attributes['focalPoint']['y'] * 100 ) . '%';
|
|
33
|
+
if ( $object_position ) {
|
|
31
34
|
$attr['data-object-position'] = $object_position;
|
|
32
|
-
$attr['style'] = 'object-position:
|
|
35
|
+
$attr['style'] = 'object-position:' . $object_position . ';';
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
$image = get_the_post_thumbnail( null, 'post-thumbnail', $attr );
|
|
36
|
-
|
|
37
|
-
/*
|
|
38
|
-
* Inserts the featured image between the (1st) cover 'background' `span` and 'inner_container' `div`,
|
|
39
|
-
* and removes eventual whitespace characters between the two (typically introduced at template level)
|
|
40
|
-
*/
|
|
41
|
-
$inner_container_start = '/<div\b[^>]+wp-block-cover__inner-container[\s|"][^>]*>/U';
|
|
42
|
-
if ( 1 === preg_match( $inner_container_start, $content, $matches, PREG_OFFSET_CAPTURE ) ) {
|
|
43
|
-
$offset = $matches[0][1];
|
|
44
|
-
$content = substr( $content, 0, $offset ) . $image . substr( $content, $offset );
|
|
45
|
-
}
|
|
46
39
|
} else {
|
|
47
40
|
if ( in_the_loop() ) {
|
|
48
41
|
update_post_thumbnail_cache();
|
|
@@ -52,15 +45,41 @@ function render_block_core_cover( $attributes, $content ) {
|
|
|
52
45
|
return $content;
|
|
53
46
|
}
|
|
54
47
|
|
|
55
|
-
$
|
|
48
|
+
$current_thumbnail_id = get_post_thumbnail_id();
|
|
49
|
+
|
|
50
|
+
$processor = new WP_HTML_Tag_Processor( '<div></div>' );
|
|
56
51
|
$processor->next_tag();
|
|
57
52
|
|
|
58
|
-
$
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
$current_alt = trim( strip_tags( get_post_meta( $current_thumbnail_id, '_wp_attachment_image_alt', true ) ) );
|
|
54
|
+
if ( $current_alt ) {
|
|
55
|
+
$processor->set_attribute( 'role', 'img' );
|
|
56
|
+
$processor->set_attribute( 'aria-label', $current_alt );
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
$processor->add_class( 'wp-block-cover__image-background' );
|
|
60
|
+
$processor->add_class( 'wp-image-' . $current_thumbnail_id );
|
|
61
|
+
if ( $attributes['hasParallax'] ) {
|
|
62
|
+
$processor->add_class( 'has-parallax' );
|
|
63
|
+
}
|
|
64
|
+
if ( $attributes['isRepeated'] ) {
|
|
65
|
+
$processor->add_class( 'is-repeated' );
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
$styles = 'background-position:' . ( $object_position ?? '50% 50%' ) . ';';
|
|
69
|
+
$styles .= 'background-image:url(' . esc_url( $current_featured_image ) . ');';
|
|
70
|
+
$processor->set_attribute( 'style', $styles );
|
|
71
|
+
|
|
72
|
+
$image = $processor->get_updated_html();
|
|
73
|
+
}
|
|
61
74
|
|
|
62
|
-
|
|
63
|
-
|
|
75
|
+
/*
|
|
76
|
+
* Inserts the featured image between the (1st) cover 'background' `span` and 'inner_container' `div`,
|
|
77
|
+
* and removes eventual whitespace characters between the two (typically introduced at template level)
|
|
78
|
+
*/
|
|
79
|
+
$inner_container_start = '/<div\b[^>]+wp-block-cover__inner-container[\s|"][^>]*>/U';
|
|
80
|
+
if ( 1 === preg_match( $inner_container_start, $content, $matches, PREG_OFFSET_CAPTURE ) ) {
|
|
81
|
+
$offset = $matches[0][1];
|
|
82
|
+
$content = substr( $content, 0, $offset ) . $image . substr( $content, $offset );
|
|
64
83
|
}
|
|
65
84
|
|
|
66
85
|
return $content;
|
package/src/cover/style.scss
CHANGED
|
@@ -100,6 +100,12 @@
|
|
|
100
100
|
color: inherit;
|
|
101
101
|
// Reset the fixed LTR direction at the root of the block in RTL languages.
|
|
102
102
|
/*rtl:raw: direction: rtl; */
|
|
103
|
+
|
|
104
|
+
// Reset the z-index to auto when the body has a modal open. So when the
|
|
105
|
+
// modal is inside the cover, it doesn't create a stacking context.
|
|
106
|
+
@at-root .has-modal-open & {
|
|
107
|
+
z-index: auto;
|
|
108
|
+
}
|
|
103
109
|
}
|
|
104
110
|
|
|
105
111
|
// Position: Top
|
package/src/image/index.php
CHANGED
|
@@ -24,7 +24,7 @@ function render_block_core_image( $attributes, $content, $block ) {
|
|
|
24
24
|
|
|
25
25
|
$p = new WP_HTML_Tag_Processor( $content );
|
|
26
26
|
|
|
27
|
-
if ( ! $p->next_tag( 'img' ) ||
|
|
27
|
+
if ( ! $p->next_tag( 'img' ) || ! $p->get_attribute( 'src' ) ) {
|
|
28
28
|
return '';
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -73,6 +73,33 @@ import AccessibleDescription from './accessible-description';
|
|
|
73
73
|
import AccessibleMenuDescription from './accessible-menu-description';
|
|
74
74
|
import { unlock } from '../../lock-unlock';
|
|
75
75
|
|
|
76
|
+
function useResponsiveMenu( navRef ) {
|
|
77
|
+
const [ isResponsiveMenuOpen, setResponsiveMenuVisibility ] =
|
|
78
|
+
useState( false );
|
|
79
|
+
|
|
80
|
+
useEffect( () => {
|
|
81
|
+
if ( ! navRef.current ) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const htmlElement = navRef.current.ownerDocument.documentElement;
|
|
86
|
+
|
|
87
|
+
// Add a `has-modal-open` class to the <html> when the responsive
|
|
88
|
+
// menu is open. This reproduces the same behavior of the frontend.
|
|
89
|
+
if ( isResponsiveMenuOpen ) {
|
|
90
|
+
htmlElement.classList.add( 'has-modal-open' );
|
|
91
|
+
} else {
|
|
92
|
+
htmlElement.classList.remove( 'has-modal-open' );
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return () => {
|
|
96
|
+
htmlElement?.classList.remove( 'has-modal-open' );
|
|
97
|
+
};
|
|
98
|
+
}, [ navRef, isResponsiveMenuOpen ] );
|
|
99
|
+
|
|
100
|
+
return [ isResponsiveMenuOpen, setResponsiveMenuVisibility ];
|
|
101
|
+
}
|
|
102
|
+
|
|
76
103
|
function ColorTools( {
|
|
77
104
|
textColor,
|
|
78
105
|
setTextColor,
|
|
@@ -284,8 +311,10 @@ function Navigation( {
|
|
|
284
311
|
__unstableMarkNextChangeAsNotPersistent,
|
|
285
312
|
} = useDispatch( blockEditorStore );
|
|
286
313
|
|
|
314
|
+
const navRef = useRef();
|
|
315
|
+
|
|
287
316
|
const [ isResponsiveMenuOpen, setResponsiveMenuVisibility ] =
|
|
288
|
-
|
|
317
|
+
useResponsiveMenu( navRef );
|
|
289
318
|
|
|
290
319
|
const [ overlayMenuPreview, setOverlayMenuPreview ] = useState( false );
|
|
291
320
|
|
|
@@ -367,8 +396,6 @@ function Navigation( {
|
|
|
367
396
|
__unstableMarkNextChangeAsNotPersistent,
|
|
368
397
|
] );
|
|
369
398
|
|
|
370
|
-
const navRef = useRef();
|
|
371
|
-
|
|
372
399
|
// The standard HTML5 tag for the block wrapper.
|
|
373
400
|
const TagName = 'nav';
|
|
374
401
|
|
|
@@ -203,6 +203,7 @@ $color-control-label-height: 20px;
|
|
|
203
203
|
.wp-block-navigation .wp-block + .block-list-appender .block-editor-button-block-appender {
|
|
204
204
|
background-color: $gray-900;
|
|
205
205
|
color: $white;
|
|
206
|
+
height: $button-size-small;
|
|
206
207
|
|
|
207
208
|
// This needs specificity to override an inherited padding.
|
|
208
209
|
// That source padding in turn has high specificity to protect
|
package/src/post-content/edit.js
CHANGED
|
@@ -8,19 +8,24 @@ import {
|
|
|
8
8
|
RecursionProvider,
|
|
9
9
|
useHasRecursion,
|
|
10
10
|
Warning,
|
|
11
|
+
__experimentalUseBlockPreview as useBlockPreview,
|
|
11
12
|
} from '@wordpress/block-editor';
|
|
13
|
+
import { parse } from '@wordpress/blocks';
|
|
12
14
|
import {
|
|
13
15
|
useEntityProp,
|
|
14
16
|
useEntityBlockEditor,
|
|
15
17
|
store as coreStore,
|
|
16
18
|
} from '@wordpress/core-data';
|
|
17
19
|
import { useSelect } from '@wordpress/data';
|
|
20
|
+
import { useMemo } from '@wordpress/element';
|
|
21
|
+
|
|
18
22
|
/**
|
|
19
23
|
* Internal dependencies
|
|
20
24
|
*/
|
|
21
25
|
import { useCanEditEntity } from '../utils/hooks';
|
|
22
26
|
|
|
23
27
|
function ReadOnlyContent( {
|
|
28
|
+
parentLayout,
|
|
24
29
|
layoutClassNames,
|
|
25
30
|
userCanEdit,
|
|
26
31
|
postType,
|
|
@@ -33,7 +38,28 @@ function ReadOnlyContent( {
|
|
|
33
38
|
postId
|
|
34
39
|
);
|
|
35
40
|
const blockProps = useBlockProps( { className: layoutClassNames } );
|
|
36
|
-
|
|
41
|
+
const blocks = useMemo( () => {
|
|
42
|
+
return content?.raw ? parse( content.raw ) : [];
|
|
43
|
+
}, [ content?.raw ] );
|
|
44
|
+
const blockPreviewProps = useBlockPreview( {
|
|
45
|
+
blocks,
|
|
46
|
+
props: blockProps,
|
|
47
|
+
layout: parentLayout,
|
|
48
|
+
} );
|
|
49
|
+
|
|
50
|
+
if ( userCanEdit ) {
|
|
51
|
+
/*
|
|
52
|
+
* Rendering the block preview using the raw content blocks allows for
|
|
53
|
+
* block support styles to be generated and applied by the editor.
|
|
54
|
+
*
|
|
55
|
+
* The preview using the raw blocks can only be presented to users with
|
|
56
|
+
* edit permissions for the post to prevent potential exposure of private
|
|
57
|
+
* block content.
|
|
58
|
+
*/
|
|
59
|
+
return <div { ...blockPreviewProps }></div>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return content?.protected ? (
|
|
37
63
|
<div { ...blockProps }>
|
|
38
64
|
<Warning>{ __( 'This content is password protected.' ) }</Warning>
|
|
39
65
|
</div>
|
|
@@ -96,6 +122,7 @@ function Content( props ) {
|
|
|
96
122
|
<EditableContent { ...props } />
|
|
97
123
|
) : (
|
|
98
124
|
<ReadOnlyContent
|
|
125
|
+
parentLayout={ props.parentLayout }
|
|
99
126
|
layoutClassNames={ layoutClassNames }
|
|
100
127
|
userCanEdit={ userCanEdit }
|
|
101
128
|
postType={ postType }
|
|
@@ -141,6 +168,7 @@ function RecursionError() {
|
|
|
141
168
|
export default function PostContentEdit( {
|
|
142
169
|
context,
|
|
143
170
|
__unstableLayoutClassNames: layoutClassNames,
|
|
171
|
+
__unstableParentLayout: parentLayout,
|
|
144
172
|
} ) {
|
|
145
173
|
const { postId: contextPostId, postType: contextPostType } = context;
|
|
146
174
|
const hasAlreadyRendered = useHasRecursion( contextPostId );
|
|
@@ -154,6 +182,7 @@ export default function PostContentEdit( {
|
|
|
154
182
|
{ contextPostId && contextPostType ? (
|
|
155
183
|
<Content
|
|
156
184
|
context={ context }
|
|
185
|
+
parentLayout={ parentLayout }
|
|
157
186
|
layoutClassNames={ layoutClassNames }
|
|
158
187
|
/>
|
|
159
188
|
) : (
|
|
@@ -123,21 +123,18 @@ export default function QueryInspectorControls( props ) {
|
|
|
123
123
|
const showInheritControl =
|
|
124
124
|
isTemplate && isControlAllowed( allowedControls, 'inherit' );
|
|
125
125
|
const showPostTypeControl =
|
|
126
|
-
|
|
127
|
-
! isTemplate;
|
|
126
|
+
! inherit && isControlAllowed( allowedControls, 'postType' );
|
|
128
127
|
const postTypeControlLabel = __( 'Post type' );
|
|
129
128
|
const postTypeControlHelp = __(
|
|
130
129
|
'Select the type of content to display: posts, pages, or custom post types.'
|
|
131
130
|
);
|
|
132
131
|
const showColumnsControl = false;
|
|
133
132
|
const showOrderControl =
|
|
134
|
-
|
|
135
|
-
! isTemplate;
|
|
133
|
+
! inherit && isControlAllowed( allowedControls, 'order' );
|
|
136
134
|
const showStickyControl =
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
( showSticky && ! isTemplate );
|
|
135
|
+
! inherit &&
|
|
136
|
+
showSticky &&
|
|
137
|
+
isControlAllowed( allowedControls, 'sticky' );
|
|
141
138
|
const showSettingsPanel =
|
|
142
139
|
showInheritControl ||
|
|
143
140
|
showPostTypeControl ||
|