@wordpress/block-library 9.12.0 → 9.12.1-next.082ed6819.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.
- package/build/block-keyboard-shortcuts/index.js +7 -7
- package/build/block-keyboard-shortcuts/index.js.map +1 -1
- package/build/cover/edit/index.js +1 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/index.js +10 -10
- package/build/cover/index.js.map +1 -1
- package/build/cover/shared.js +6 -7
- package/build/cover/shared.js.map +1 -1
- package/build/details/index.js +19 -0
- package/build/details/index.js.map +1 -1
- package/build/file/edit.js +7 -3
- package/build/file/edit.js.map +1 -1
- package/build/freeform/modal.js +1 -1
- package/build/freeform/modal.js.map +1 -1
- package/build/heading/index.js +1 -7
- package/build/heading/index.js.map +1 -1
- package/build/home-link/edit.js +20 -36
- package/build/home-link/edit.js.map +1 -1
- package/build/navigation/use-template-part-area-label.js +6 -8
- package/build/navigation/use-template-part-area-label.js.map +1 -1
- package/build/page-list/index.js +14 -0
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.js +26 -25
- package/build/paragraph/edit.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +1 -3
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +1 -11
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/utils.js +6 -8
- package/build/query/utils.js.map +1 -1
- package/build/social-link/edit.js +22 -9
- package/build/social-link/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +2 -7
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/utils/get-template-part-icon.js +23 -0
- package/build/template-part/edit/utils/get-template-part-icon.js.map +1 -0
- package/build/template-part/edit/utils/hooks.js +1 -6
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build/template-part/variations.js +6 -12
- package/build/template-part/variations.js.map +1 -1
- package/build/video/tracks-editor.js +135 -121
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/block-keyboard-shortcuts/index.js +7 -7
- package/build-module/block-keyboard-shortcuts/index.js.map +1 -1
- package/build-module/cover/edit/index.js +1 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/index.js +10 -10
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/shared.js +6 -7
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/details/index.js +20 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/file/edit.js +7 -3
- package/build-module/file/edit.js.map +1 -1
- package/build-module/freeform/modal.js +1 -1
- package/build-module/freeform/modal.js.map +1 -1
- package/build-module/heading/index.js +1 -7
- package/build-module/heading/index.js.map +1 -1
- package/build-module/home-link/edit.js +23 -39
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/navigation/use-template-part-area-label.js +6 -8
- package/build-module/navigation/use-template-part-area-label.js.map +1 -1
- package/build-module/page-list/index.js +14 -0
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.js +26 -25
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -3
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +1 -11
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/utils.js +6 -8
- package/build-module/query/utils.js.map +1 -1
- package/build-module/social-link/edit.js +24 -11
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +3 -8
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/utils/get-template-part-icon.js +15 -0
- package/build-module/template-part/edit/utils/get-template-part-icon.js.map +1 -0
- package/build-module/template-part/edit/utils/hooks.js +1 -6
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/template-part/variations.js +5 -11
- package/build-module/template-part/variations.js.map +1 -1
- package/build-module/video/tracks-editor.js +136 -122
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/editor-rtl.css +12 -8
- package/build-style/editor.css +12 -8
- package/build-style/navigation/style-rtl.css +1 -1
- package/build-style/navigation/style.css +1 -1
- package/build-style/page-list/style-rtl.css +4 -0
- package/build-style/page-list/style.css +4 -0
- package/build-style/query/editor-rtl.css +0 -4
- package/build-style/query/editor.css +0 -4
- package/build-style/search/style-rtl.css +3 -3
- package/build-style/search/style.css +3 -3
- package/build-style/social-link/editor-rtl.css +4 -4
- package/build-style/social-link/editor.css +4 -4
- package/build-style/style-rtl.css +8 -4
- package/build-style/style.css +8 -4
- package/build-style/video/editor-rtl.css +8 -0
- package/build-style/video/editor.css +8 -0
- package/package.json +33 -33
- package/src/block-keyboard-shortcuts/index.js +25 -11
- package/src/cover/edit/index.js +1 -1
- package/src/cover/index.js +8 -8
- package/src/cover/shared.js +10 -10
- package/src/cover/test/edit.js +2 -2
- package/src/details/index.js +23 -1
- package/src/file/edit.js +8 -2
- package/src/freeform/modal.js +1 -1
- package/src/heading/block.json +1 -7
- package/src/home-link/edit.js +27 -45
- package/src/home-link/index.php +0 -3
- package/src/navigation/index.php +4 -150
- package/src/navigation/style.scss +1 -1
- package/src/navigation/use-template-part-area-label.js +10 -10
- package/src/page-list/block.json +14 -0
- package/src/page-list/style.scss +4 -0
- package/src/paragraph/edit.js +20 -17
- package/src/pattern/index.php +0 -7
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -5
- package/src/query/edit/inspector-controls/index.js +0 -10
- package/src/query/editor.scss +0 -4
- package/src/query/index.php +1 -1
- package/src/query/utils.js +14 -15
- package/src/rss/index.php +11 -8
- package/src/search/style.scss +3 -5
- package/src/social-link/edit.js +47 -19
- package/src/social-link/editor.scss +6 -7
- package/src/template-part/edit/advanced-controls.js +13 -13
- package/src/template-part/edit/utils/get-template-part-icon.js +20 -0
- package/src/template-part/edit/utils/hooks.js +2 -7
- package/src/template-part/variations.js +4 -16
- package/src/video/editor.scss +9 -0
- package/src/video/tracks-editor.js +157 -139
- package/build/query/edit/inspector-controls/create-new-post-link.js +0 -40
- package/build/query/edit/inspector-controls/create-new-post-link.js.map +0 -1
- package/build-module/query/edit/inspector-controls/create-new-post-link.js +0 -33
- package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +0 -1
- package/src/query/edit/inspector-controls/create-new-post-link.js +0 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["heading","icon","__","sprintf","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","textAlign","type","content","source","selector","role","level","levelOptions","placeholder","supports","align","anchor","className","splitting","__experimentalBorder","color","radius","style","width","
|
|
1
|
+
{"version":3,"names":["heading","icon","__","sprintf","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","textAlign","type","content","source","selector","role","level","levelOptions","placeholder","supports","align","anchor","className","splitting","__experimentalBorder","color","radius","style","width","gradients","link","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontStyle","__experimentalFontWeight","__experimentalLetterSpacing","__experimentalTextTransform","__experimentalTextDecoration","__experimentalWritingMode","__unstablePasteTextInline","__experimentalSlashInserter","interactivity","clientNavigation","editorStyle","save","transforms","settings","example","__experimentalLabel","context","customName","hasContent","trim","length","merge","attributesToMerge","init"],"sources":["@wordpress/block-library/src/heading/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { heading as icon } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcontent: __( 'Code is Poetry' ),\n\t\t\tlevel: 2,\n\t\t\ttextAlign: 'center',\n\t\t},\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tconst { content, level } = attributes;\n\n\t\tconst customName = attributes?.metadata?.name;\n\t\tconst hasContent = content?.trim().length > 0;\n\n\t\t// In the list view, use the block's content as the label.\n\t\t// If the content is empty, fall back to the default label.\n\t\tif ( context === 'list-view' && ( customName || hasContent ) ) {\n\t\t\treturn customName || content;\n\t\t}\n\n\t\tif ( context === 'accessibility' ) {\n\t\t\treturn ! hasContent\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. %s: heading level. */\n\t\t\t\t\t\t__( 'Level %s. Empty.' ),\n\t\t\t\t\t\tlevel\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. 1: heading level. 2: heading content. */\n\t\t\t\t\t\t__( 'Level %1$s. %2$s' ),\n\t\t\t\t\t\tlevel,\n\t\t\t\t\t\tcontent\n\t\t\t\t );\n\t\t}\n\t},\n\ttransforms,\n\tdeprecated,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent:\n\t\t\t\t( attributes.content || '' ) +\n\t\t\t\t( attributesToMerge.content || '' ),\n\t\t};\n\t},\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,IAAI,QAAQ,kBAAkB;AAClD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,SAAA;MAAAC,IAAA;IAAA;IAAAC,OAAA;MAAAD,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,UAAU;IAErC,MAAMiD,UAAU,GAAGjD,UAAU,EAAET,QAAQ,EAAEG,IAAI;IAC7C,MAAMwD,UAAU,GAAG/C,OAAO,EAAEgD,IAAI,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC;;IAE7C;IACA;IACA,IAAKJ,OAAO,KAAK,WAAW,KAAMC,UAAU,IAAIC,UAAU,CAAE,EAAG;MAC9D,OAAOD,UAAU,IAAI9C,OAAO;IAC7B;IAEA,IAAK6C,OAAO,KAAK,eAAe,EAAG;MAClC,OAAO,CAAEE,UAAU,GAChB/D,OAAO,CACP;MACAD,EAAE,CAAE,kBAAmB,CAAC,EACxBqB,KACA,CAAC,GACDpB,OAAO,CACP;MACAD,EAAE,CAAE,kBAAmB,CAAC,EACxBqB,KAAK,EACLJ,OACA,CAAC;IACL;EACD,CAAC;EACDyC,UAAU;EACVvD,UAAU;EACVgE,KAAKA,CAAErD,UAAU,EAAEsD,iBAAiB,EAAG;IACtC,OAAO;MACNnD,OAAO,EACN,CAAEH,UAAU,CAACG,OAAO,IAAI,EAAE,KACxBmD,iBAAiB,CAACnD,OAAO,IAAI,EAAE;IACnC,CAAC;EACF,CAAC;EACDb,IAAI;EACJqD;AACD,CAAC;AAED,OAAO,MAAMY,IAAI,GAAGA,CAAA,KAAMnE,SAAS,CAAE;EAAEM,IAAI;EAAEH,QAAQ;EAAEsD;AAAS,CAAE,CAAC","ignoreList":[]}
|
|
@@ -6,25 +6,22 @@ import clsx from 'clsx';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { RichText, useBlockProps
|
|
9
|
+
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
10
10
|
import { __ } from '@wordpress/i18n';
|
|
11
|
-
import { useSelect
|
|
11
|
+
import { useSelect } from '@wordpress/data';
|
|
12
12
|
import { store as coreStore } from '@wordpress/core-data';
|
|
13
|
-
import {
|
|
14
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
14
|
const preventDefault = event => event.preventDefault();
|
|
16
15
|
export default function HomeEdit({
|
|
17
16
|
attributes,
|
|
18
17
|
setAttributes,
|
|
19
18
|
context
|
|
20
19
|
}) {
|
|
20
|
+
var _attributes$label;
|
|
21
21
|
const homeUrl = useSelect(select => {
|
|
22
22
|
// Site index.
|
|
23
23
|
return select(coreStore).getEntityRecord('root', '__unstableBase')?.home;
|
|
24
24
|
}, []);
|
|
25
|
-
const {
|
|
26
|
-
__unstableMarkNextChangeAsNotPersistent
|
|
27
|
-
} = useDispatch(blockEditorStore);
|
|
28
25
|
const {
|
|
29
26
|
textColor,
|
|
30
27
|
backgroundColor,
|
|
@@ -42,38 +39,25 @@ export default function HomeEdit({
|
|
|
42
39
|
backgroundColor: style?.color?.background
|
|
43
40
|
}
|
|
44
41
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
identifier: "label",
|
|
65
|
-
className: "wp-block-home-link__label",
|
|
66
|
-
value: label,
|
|
67
|
-
onChange: labelValue => {
|
|
68
|
-
setAttributes({
|
|
69
|
-
label: labelValue
|
|
70
|
-
});
|
|
71
|
-
},
|
|
72
|
-
"aria-label": __('Home link text'),
|
|
73
|
-
placeholder: __('Add home link'),
|
|
74
|
-
withoutInteractiveFormatting: true,
|
|
75
|
-
allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough']
|
|
76
|
-
})
|
|
42
|
+
return /*#__PURE__*/_jsx("div", {
|
|
43
|
+
...blockProps,
|
|
44
|
+
children: /*#__PURE__*/_jsx("a", {
|
|
45
|
+
className: "wp-block-home-link__content wp-block-navigation-item__content",
|
|
46
|
+
href: homeUrl,
|
|
47
|
+
onClick: preventDefault,
|
|
48
|
+
children: /*#__PURE__*/_jsx(RichText, {
|
|
49
|
+
identifier: "label",
|
|
50
|
+
className: "wp-block-home-link__label",
|
|
51
|
+
value: (_attributes$label = attributes.label) !== null && _attributes$label !== void 0 ? _attributes$label : __('Home'),
|
|
52
|
+
onChange: labelValue => {
|
|
53
|
+
setAttributes({
|
|
54
|
+
label: labelValue
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
"aria-label": __('Home link text'),
|
|
58
|
+
placeholder: __('Add home link'),
|
|
59
|
+
withoutInteractiveFormatting: true,
|
|
60
|
+
allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough']
|
|
77
61
|
})
|
|
78
62
|
})
|
|
79
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","RichText","useBlockProps","
|
|
1
|
+
{"version":3,"names":["clsx","RichText","useBlockProps","__","useSelect","store","coreStore","jsx","_jsx","preventDefault","event","HomeEdit","attributes","setAttributes","context","_attributes$label","homeUrl","select","getEntityRecord","home","textColor","backgroundColor","style","blockProps","className","color","text","background","children","href","onClick","identifier","value","label","onChange","labelValue","placeholder","withoutInteractiveFormatting","allowedFormats"],"sources":["@wordpress/block-library/src/home-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\nconst preventDefault = ( event ) => event.preventDefault();\n\nexport default function HomeEdit( { attributes, setAttributes, context } ) {\n\tconst homeUrl = useSelect( ( select ) => {\n\t\t// Site index.\n\t\treturn select( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t?.home;\n\t}, [] );\n\n\tconst { textColor, backgroundColor, style } = context;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( 'wp-block-navigation-item', {\n\t\t\t'has-text-color': !! textColor || !! style?.color?.text,\n\t\t\t[ `has-${ textColor }-color` ]: !! textColor,\n\t\t\t'has-background': !! backgroundColor || !! style?.color?.background,\n\t\t\t[ `has-${ backgroundColor }-background-color` ]: !! backgroundColor,\n\t\t} ),\n\t\tstyle: {\n\t\t\tcolor: style?.color?.text,\n\t\t\tbackgroundColor: style?.color?.background,\n\t\t},\n\t} );\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<a\n\t\t\t\tclassName=\"wp-block-home-link__content wp-block-navigation-item__content\"\n\t\t\t\thref={ homeUrl }\n\t\t\t\tonClick={ preventDefault }\n\t\t\t>\n\t\t\t\t<RichText\n\t\t\t\t\tidentifier=\"label\"\n\t\t\t\t\tclassName=\"wp-block-home-link__label\"\n\t\t\t\t\tvalue={ attributes.label ?? __( 'Home' ) }\n\t\t\t\t\tonChange={ ( labelValue ) => {\n\t\t\t\t\t\tsetAttributes( { label: labelValue } );\n\t\t\t\t\t} }\n\t\t\t\t\taria-label={ __( 'Home link text' ) }\n\t\t\t\t\tplaceholder={ __( 'Add home link' ) }\n\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\tallowedFormats={ [\n\t\t\t\t\t\t'core/bold',\n\t\t\t\t\t\t'core/italic',\n\t\t\t\t\t\t'core/image',\n\t\t\t\t\t\t'core/strikethrough',\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t</a>\n\t\t</div>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,aAAa,QAAQ,yBAAyB;AACjE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1D,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jB,iBAAA,GAAGH,UAAU,CAACqB,KAAK,cAAAlB,iBAAA,cAAAA,iBAAA,GAAIZ,EAAE,CAAE,MAAO,CAAG;QAC1C+B,QAAQ,EAAKC,UAAU,IAAM;UAC5BtB,aAAa,CAAE;YAAEoB,KAAK,EAAEE;UAAW,CAAE,CAAC;QACvC,CAAG;QACH,cAAahC,EAAE,CAAE,gBAAiB,CAAG;QACrCiC,WAAW,EAAGjC,EAAE,CAAE,eAAgB,CAAG;QACrCkC,4BAA4B;QAC5BC,cAAc,EAAG,CAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,oBAAoB;MAClB,CACH;IAAC,CACA;EAAC,CACA,CAAC;AAER","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ import { useSelect } from '@wordpress/data';
|
|
|
11
11
|
|
|
12
12
|
// TODO: this util should perhaps be refactored somewhere like core-data.
|
|
13
13
|
import { createTemplatePartId } from '../template-part/edit/utils/create-template-part-id';
|
|
14
|
+
import { getTemplatePartIcon } from '../template-part/edit/utils/get-template-part-icon';
|
|
14
15
|
export default function useTemplatePartAreaLabel(clientId) {
|
|
15
16
|
return useSelect(select => {
|
|
16
17
|
// Use the lack of a clientId as an opportunity to bypass the rest
|
|
@@ -27,14 +28,11 @@ export default function useTemplatePartAreaLabel(clientId) {
|
|
|
27
28
|
if (!parentTemplatePartClientIds?.length) {
|
|
28
29
|
return;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/* eslint-disable @wordpress/data-no-store-string-literals */
|
|
36
|
-
const definedAreas = select('core/editor').__experimentalGetDefaultTemplatePartAreas();
|
|
37
|
-
/* eslint-enable @wordpress/data-no-store-string-literals */
|
|
31
|
+
const defaultTemplatePartAreas = select(coreStore).getEntityRecord('root', '__unstableBase')?.default_template_part_areas || [];
|
|
32
|
+
const definedAreas = defaultTemplatePartAreas.map(item => ({
|
|
33
|
+
...item,
|
|
34
|
+
icon: getTemplatePartIcon(item.icon)
|
|
35
|
+
}));
|
|
38
36
|
const {
|
|
39
37
|
getCurrentTheme,
|
|
40
38
|
getEditedEntityRecord
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","blockEditorStore","coreStore","useSelect","createTemplatePartId","useTemplatePartAreaLabel","clientId","select","getBlock","getBlockParentsByBlockName","withAscendingResults","parentTemplatePartClientIds","length","definedAreas","
|
|
1
|
+
{"version":3,"names":["store","blockEditorStore","coreStore","useSelect","createTemplatePartId","getTemplatePartIcon","useTemplatePartAreaLabel","clientId","select","getBlock","getBlockParentsByBlockName","withAscendingResults","parentTemplatePartClientIds","length","defaultTemplatePartAreas","getEntityRecord","default_template_part_areas","definedAreas","map","item","icon","getCurrentTheme","getEditedEntityRecord","templatePartClientId","templatePartBlock","theme","stylesheet","slug","attributes","templatePartEntityId","templatePartEntity","area","find","definedArea","label"],"sources":["@wordpress/block-library/src/navigation/use-template-part-area-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\n\n// TODO: this util should perhaps be refactored somewhere like core-data.\nimport { createTemplatePartId } from '../template-part/edit/utils/create-template-part-id';\nimport { getTemplatePartIcon } from '../template-part/edit/utils/get-template-part-icon';\n\nexport default function useTemplatePartAreaLabel( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\t// Use the lack of a clientId as an opportunity to bypass the rest\n\t\t\t// of this hook.\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { getBlock, getBlockParentsByBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst withAscendingResults = true;\n\t\t\tconst parentTemplatePartClientIds = getBlockParentsByBlockName(\n\t\t\t\tclientId,\n\t\t\t\t'core/template-part',\n\t\t\t\twithAscendingResults\n\t\t\t);\n\n\t\t\tif ( ! parentTemplatePartClientIds?.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst defaultTemplatePartAreas =\n\t\t\t\tselect( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t\t\t?.default_template_part_areas || [];\n\n\t\t\tconst definedAreas = defaultTemplatePartAreas.map( ( item ) => ( {\n\t\t\t\t...item,\n\t\t\t\ticon: getTemplatePartIcon( item.icon ),\n\t\t\t} ) );\n\n\t\t\tconst { getCurrentTheme, getEditedEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\tfor ( const templatePartClientId of parentTemplatePartClientIds ) {\n\t\t\t\tconst templatePartBlock = getBlock( templatePartClientId );\n\n\t\t\t\t// The 'area' usually isn't stored on the block, but instead\n\t\t\t\t// on the entity.\n\t\t\t\tconst { theme = getCurrentTheme()?.stylesheet, slug } =\n\t\t\t\t\ttemplatePartBlock.attributes;\n\t\t\t\tconst templatePartEntityId = createTemplatePartId(\n\t\t\t\t\ttheme,\n\t\t\t\t\tslug\n\t\t\t\t);\n\t\t\t\tconst templatePartEntity = getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\ttemplatePartEntityId\n\t\t\t\t);\n\n\t\t\t\t// Look up the `label` for the area in the defined areas so\n\t\t\t\t// that an internationalized label can be used.\n\t\t\t\tif ( templatePartEntity?.area ) {\n\t\t\t\t\treturn definedAreas.find(\n\t\t\t\t\t\t( definedArea ) =>\n\t\t\t\t\t\t\tdefinedArea.area !== 'uncategorized' &&\n\t\t\t\t\t\t\tdefinedArea.area === templatePartEntity.area\n\t\t\t\t\t)?.label;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASD,KAAK,IAAIE,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,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EACV,kBAAkB,EAClBO,oBACD,CAAC;;MAED;MACA;MACA,IAAKC,kBAAkB,EAAEC,IAAI,EAAG;QAC/B,OAAOd,YAAY,CAACe,IAAI,CACrBC,WAAW,IACZA,WAAW,CAACF,IAAI,KAAK,eAAe,IACpCE,WAAW,CAACF,IAAI,KAAKD,kBAAkB,CAACC,IAC1C,CAAC,EAAEG,KAAK;MACT;IACD;EACD,CAAC,EACD,CAAE3B,QAAQ,CACX,CAAC;AACF","ignoreList":[]}
|
|
@@ -46,6 +46,20 @@ const metadata = {
|
|
|
46
46
|
},
|
|
47
47
|
interactivity: {
|
|
48
48
|
clientNavigation: true
|
|
49
|
+
},
|
|
50
|
+
__experimentalBorder: {
|
|
51
|
+
radius: true,
|
|
52
|
+
color: true,
|
|
53
|
+
width: true,
|
|
54
|
+
style: true
|
|
55
|
+
},
|
|
56
|
+
spacing: {
|
|
57
|
+
padding: true,
|
|
58
|
+
margin: true,
|
|
59
|
+
__experimentalDefaultControls: {
|
|
60
|
+
padding: false,
|
|
61
|
+
margin: false
|
|
62
|
+
}
|
|
49
63
|
}
|
|
50
64
|
},
|
|
51
65
|
editorStyle: "wp-block-page-list-editor",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pages","initBlock","metadata","$schema","apiVersion","name","title","category","allowedBlocks","description","keywords","textdomain","attributes","parentPageID","type","isNested","usesContext","supports","reusable","html","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","interactivity","clientNavigation","
|
|
1
|
+
{"version":3,"names":["pages","initBlock","metadata","$schema","apiVersion","name","title","category","allowedBlocks","description","keywords","textdomain","attributes","parentPageID","type","isNested","usesContext","supports","reusable","html","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","interactivity","clientNavigation","__experimentalBorder","radius","color","width","style","spacing","padding","margin","editorStyle","edit","settings","icon","example","init"],"sources":["@wordpress/block-library/src/page-list/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { pages } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit.js';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon: pages,\n\texample: {},\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,kBAAkB;;AAExC;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,aAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,YAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,QAAA;MAAAD,IAAA;MAAA;IAAA;EAAA;EAAAE,WAAA;EAAAC,QAAA;IAAAC,QAAA;IAAAC,IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAC,6BAAA;QAAAR,QAAA;MAAA;IAAA;IAAAS,aAAA;MAAAC,gBAAA;IAAA;IAAAC,oBAAA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAC,KAAA;IAAA;IAAAC,OAAA;MAAAC,OAAA;MAAAC,MAAA;MAAAV,6BAAA;QAAAS,OAAA;QAAAC,MAAA;MAAA;IAAA;EAAA;EAAAC,WAAA;EAAAJ,KAAA;AAAA;AAE5C,OAAOK,IAAI,MAAM,WAAW;AAE5B,MAAM;EAAEpC;AAAK,CAAC,GAAGH,QAAQ;AAEzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMqC,QAAQ,GAAG;EACvBC,IAAI,EAAE3C,KAAK;EACX4C,OAAO,EAAE,CAAC,CAAC;EACXH;AACD,CAAC;AAED,OAAO,MAAMI,IAAI,GAAGA,CAAA,KAAM5C,SAAS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAEwC;AAAS,CAAE,CAAC","ignoreList":[]}
|
|
@@ -57,25 +57,28 @@ function DropCapControl({
|
|
|
57
57
|
} else {
|
|
58
58
|
helpText = __('Show a large initial letter.');
|
|
59
59
|
}
|
|
60
|
-
return /*#__PURE__*/_jsx(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
dropCap: undefined
|
|
65
|
-
}),
|
|
66
|
-
resetAllFilter: () => ({
|
|
67
|
-
dropCap: undefined
|
|
68
|
-
}),
|
|
69
|
-
panelId: clientId,
|
|
70
|
-
children: /*#__PURE__*/_jsx(ToggleControl, {
|
|
71
|
-
__nextHasNoMarginBottom: true,
|
|
60
|
+
return /*#__PURE__*/_jsx(InspectorControls, {
|
|
61
|
+
group: "typography",
|
|
62
|
+
children: /*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
63
|
+
hasValue: () => !!dropCap,
|
|
72
64
|
label: __('Drop cap'),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
onDeselect: () => setAttributes({
|
|
66
|
+
dropCap: undefined
|
|
67
|
+
}),
|
|
68
|
+
resetAllFilter: () => ({
|
|
69
|
+
dropCap: undefined
|
|
76
70
|
}),
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
panelId: clientId,
|
|
72
|
+
children: /*#__PURE__*/_jsx(ToggleControl, {
|
|
73
|
+
__nextHasNoMarginBottom: true,
|
|
74
|
+
label: __('Drop cap'),
|
|
75
|
+
checked: !!dropCap,
|
|
76
|
+
onChange: () => setAttributes({
|
|
77
|
+
dropCap: !dropCap
|
|
78
|
+
}),
|
|
79
|
+
help: helpText,
|
|
80
|
+
disabled: hasDropCapDisabled(align)
|
|
81
|
+
})
|
|
79
82
|
})
|
|
80
83
|
});
|
|
81
84
|
}
|
|
@@ -85,7 +88,8 @@ function ParagraphBlock({
|
|
|
85
88
|
onReplace,
|
|
86
89
|
onRemove,
|
|
87
90
|
setAttributes,
|
|
88
|
-
clientId
|
|
91
|
+
clientId,
|
|
92
|
+
isSelected: isSingleSelected
|
|
89
93
|
}) {
|
|
90
94
|
const {
|
|
91
95
|
align,
|
|
@@ -123,13 +127,10 @@ function ParagraphBlock({
|
|
|
123
127
|
direction: newDirection
|
|
124
128
|
})
|
|
125
129
|
})]
|
|
126
|
-
}), /*#__PURE__*/_jsx(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
attributes: attributes,
|
|
131
|
-
setAttributes: setAttributes
|
|
132
|
-
})
|
|
130
|
+
}), isSingleSelected && /*#__PURE__*/_jsx(DropCapControl, {
|
|
131
|
+
clientId: clientId,
|
|
132
|
+
attributes: attributes,
|
|
133
|
+
setAttributes: setAttributes
|
|
133
134
|
}), /*#__PURE__*/_jsx(RichText, {
|
|
134
135
|
identifier: "content",
|
|
135
136
|
tagName: "p",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","__","_x","isRTL","ToolbarButton","ToggleControl","__experimentalToolsPanelItem","ToolsPanelItem","AlignmentControl","BlockControls","InspectorControls","RichText","useBlockProps","useSettings","useBlockEditingMode","formatLtr","useOnEnter","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ParagraphRTLControl","direction","setDirection","icon","title","isActive","onClick","undefined","hasDropCapDisabled","align","DropCapControl","clientId","attributes","setAttributes","isDropCapFeatureEnabled","dropCap","helpText","hasValue","label","onDeselect","resetAllFilter","panelId","
|
|
1
|
+
{"version":3,"names":["clsx","__","_x","isRTL","ToolbarButton","ToggleControl","__experimentalToolsPanelItem","ToolsPanelItem","AlignmentControl","BlockControls","InspectorControls","RichText","useBlockProps","useSettings","useBlockEditingMode","formatLtr","useOnEnter","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ParagraphRTLControl","direction","setDirection","icon","title","isActive","onClick","undefined","hasDropCapDisabled","align","DropCapControl","clientId","attributes","setAttributes","isDropCapFeatureEnabled","dropCap","helpText","group","children","hasValue","label","onDeselect","resetAllFilter","panelId","__nextHasNoMarginBottom","checked","onChange","help","disabled","ParagraphBlock","mergeBlocks","onReplace","onRemove","isSelected","isSingleSelected","content","placeholder","blockProps","ref","className","style","blockEditingMode","value","newAlign","newDirection","identifier","tagName","newContent","onMerge","isEmpty","__unstableEmbedURLOnPaste","__unstableAllowPrefixTransformations"],"sources":["@wordpress/block-library/src/paragraph/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, isRTL } from '@wordpress/i18n';\nimport {\n\tToolbarButton,\n\tToggleControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\tuseSettings,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { formatLtr } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useOnEnter } from './use-enter';\n\nfunction ParagraphRTLControl( { direction, setDirection } ) {\n\treturn (\n\t\tisRTL() && (\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ formatLtr }\n\t\t\t\ttitle={ _x( 'Left to right', 'editor button' ) }\n\t\t\t\tisActive={ direction === 'ltr' }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetDirection( direction === 'ltr' ? undefined : 'ltr' );\n\t\t\t\t} }\n\t\t\t/>\n\t\t)\n\t);\n}\n\nfunction hasDropCapDisabled( align ) {\n\treturn align === ( isRTL() ? 'left' : 'right' ) || align === 'center';\n}\n\nfunction DropCapControl( { clientId, attributes, setAttributes } ) {\n\t// Please do not add a useSelect call to the paragraph block unconditionally.\n\t// Every useSelect added to a (frequently used) block will degrade load\n\t// and type performance. By moving it within InspectorControls, the subscription is\n\t// now only added for the selected block(s).\n\tconst [ isDropCapFeatureEnabled ] = useSettings( 'typography.dropCap' );\n\n\tif ( ! isDropCapFeatureEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst { align, dropCap } = attributes;\n\n\tlet helpText;\n\tif ( hasDropCapDisabled( align ) ) {\n\t\thelpText = __( 'Not available for aligned text.' );\n\t} else if ( dropCap ) {\n\t\thelpText = __( 'Showing large initial letter.' );\n\t} else {\n\t\thelpText = __( 'Show a large initial letter.' );\n\t}\n\n\treturn (\n\t\t<InspectorControls group=\"typography\">\n\t\t\t<ToolsPanelItem\n\t\t\t\thasValue={ () => !! dropCap }\n\t\t\t\tlabel={ __( 'Drop cap' ) }\n\t\t\t\tonDeselect={ () => setAttributes( { dropCap: undefined } ) }\n\t\t\t\tresetAllFilter={ () => ( { dropCap: undefined } ) }\n\t\t\t\tpanelId={ clientId }\n\t\t\t>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Drop cap' ) }\n\t\t\t\t\tchecked={ !! dropCap }\n\t\t\t\t\tonChange={ () => setAttributes( { dropCap: ! dropCap } ) }\n\t\t\t\t\thelp={ helpText }\n\t\t\t\t\tdisabled={ hasDropCapDisabled( align ) }\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t</InspectorControls>\n\t);\n}\n\nfunction ParagraphBlock( {\n\tattributes,\n\tmergeBlocks,\n\tonReplace,\n\tonRemove,\n\tsetAttributes,\n\tclientId,\n\tisSelected: isSingleSelected,\n} ) {\n\tconst { align, content, direction, dropCap, placeholder } = attributes;\n\tconst blockProps = useBlockProps( {\n\t\tref: useOnEnter( { clientId, content } ),\n\t\tclassName: clsx( {\n\t\t\t'has-drop-cap': hasDropCapDisabled( align ) ? false : dropCap,\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} ),\n\t\tstyle: { direction },\n\t} );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\treturn (\n\t\t<>\n\t\t\t{ blockEditingMode === 'default' && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t<AlignmentControl\n\t\t\t\t\t\tvalue={ align }\n\t\t\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\talign: newAlign,\n\t\t\t\t\t\t\t\tdropCap: hasDropCapDisabled( newAlign )\n\t\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t\t: dropCap,\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<ParagraphRTLControl\n\t\t\t\t\t\tdirection={ direction }\n\t\t\t\t\t\tsetDirection={ ( newDirection ) =>\n\t\t\t\t\t\t\tsetAttributes( { direction: newDirection } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isSingleSelected && (\n\t\t\t\t<DropCapControl\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<RichText\n\t\t\t\tidentifier=\"content\"\n\t\t\t\ttagName=\"p\"\n\t\t\t\t{ ...blockProps }\n\t\t\t\tvalue={ content }\n\t\t\t\tonChange={ ( newContent ) =>\n\t\t\t\t\tsetAttributes( { content: newContent } )\n\t\t\t\t}\n\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\tonReplace={ onReplace }\n\t\t\t\tonRemove={ onRemove }\n\t\t\t\taria-label={\n\t\t\t\t\tRichText.isEmpty( content )\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t'Empty block; start writing or type forward slash to choose a block'\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Block: Paragraph' )\n\t\t\t\t}\n\t\t\t\tdata-empty={ RichText.isEmpty( content ) }\n\t\t\t\tplaceholder={ placeholder || __( 'Type / to choose a block' ) }\n\t\t\t\tdata-custom-placeholder={ placeholder ? true : undefined }\n\t\t\t\t__unstableEmbedURLOnPaste\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ParagraphBlock;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC/C,SACCC,aAAa,EACbC,aAAa,EACbC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SACCC,gBAAgB,EAChBC,aAAa,EACbC,iBAAiB,EACjBC,QAAQ,EACRC,aAAa,EACbC,WAAW,EACXC,mBAAmB,QACb,yBAAyB;AAChC,SAASC,SAAS,QAAQ,kBAAkB;;AAE5C;AACA;AACA;AACA,SAASC,UAAU,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEzC,SAASC,mBAAmBA,CAAE;EAAEC,SAAS;EAAEC;AAAa,CAAC,EAAG;EAC3D,OACCtB,KAAK,CAAC,CAAC,iBACNe,IAAA,CAACd,aAAa;IACbsB,IAAI,EAAGX,SAAW;IAClBY,KAAK,EAAGzB,EAAE,CAAE,eAAe,EAAE,eAAgB,CAAG;IAChD0B,QAAQ,EAAGJ,SAAS,KAAK,KAAO;IAChCK,OAAO,EAAGA,CAAA,KAAM;MACfJ,YAAY,CAAED,SAAS,KAAK,KAAK,GAAGM,SAAS,GAAG,KAAM,CAAC;IACxD;EAAG,CACH,CACD;AAEH;AAEA,SAASC,kBAAkBA,CAAEC,KAAK,EAAG;EACpC,OAAOA,KAAK,MAAO7B,KAAK,CAAC,CAAC,GAAG,MAAM,GAAG,OAAO,CAAE,IAAI6B,KAAK,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AAa,CAAE;MAC3C,CACD,CAAC;IAAA,CACY,CACf,EACCV,gBAAgB,iBACjBvC,IAAA,CAACe,cAAc;MACdC,QAAQ,EAAGA,QAAU;MACrBC,UAAU,EAAGA,UAAY;MACzBC,aAAa,EAAGA;IAAe,CAC/B,CACD,eACDlB,IAAA,CAACP,QAAQ;MACRyD,UAAU,EAAC,SAAS;MACpBC,OAAO,EAAC,GAAG;MAAA,GACNT,UAAU;MACfK,KAAK,EAAGP,OAAS;MACjBT,QAAQ,EAAKqB,UAAU,IACtBlC,aAAa,CAAE;QAAEsB,OAAO,EAAEY;MAAW,CAAE,CACvC;MACDC,OAAO,EAAGlB,WAAa;MACvBC,SAAS,EAAGA,SAAW;MACvBC,QAAQ,EAAGA,QAAU;MACrB,cACC5C,QAAQ,CAAC6D,OAAO,CAAEd,OAAQ,CAAC,GACxBzD,EAAE,CACF,oEACA,CAAC,GACDA,EAAE,CAAE,kBAAmB,CAC1B;MACD,cAAaU,QAAQ,CAAC6D,OAAO,CAAEd,OAAQ,CAAG;MAC1CC,WAAW,EAAGA,WAAW,IAAI1D,EAAE,CAAE,0BAA2B,CAAG;MAC/D,2BAA0B0D,WAAW,GAAG,IAAI,GAAG7B,SAAW;MAC1D2C,yBAAyB;MACzBC,oCAAoC;IAAA,CACpC,CAAC;EAAA,CACD,CAAC;AAEL;AAEA,eAAetB,cAAc","ignoreList":[]}
|
|
@@ -18,11 +18,9 @@ export default function EnhancedPaginationControl({
|
|
|
18
18
|
hasUnsupportedBlocks
|
|
19
19
|
} = useUnsupportedBlocks(clientId);
|
|
20
20
|
const fullPageClientSideNavigation = window.__experimentalFullPageClientSideNavigation;
|
|
21
|
-
let help = __('
|
|
21
|
+
let help = __('Reload the full page—instead of just the posts list—when visitors navigate between pages.');
|
|
22
22
|
if (fullPageClientSideNavigation) {
|
|
23
23
|
help = __('Experimental full-page client-side navigation setting enabled.');
|
|
24
|
-
} else if (enhancedPagination) {
|
|
25
|
-
help = __('Reload the full page—instead of just the posts list—when visitors navigate between pages.');
|
|
26
24
|
} else if (hasUnsupportedBlocks) {
|
|
27
25
|
help = __('Enhancement disabled because there are non-compatible blocks inside the Query block.');
|
|
28
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ToggleControl","__","useUnsupportedBlocks","jsx","_jsx","Fragment","_Fragment","EnhancedPaginationControl","enhancedPagination","setAttributes","clientId","hasUnsupportedBlocks","fullPageClientSideNavigation","window","__experimentalFullPageClientSideNavigation","help","children","__nextHasNoMarginBottom","label","checked","disabled","onChange","value"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useUnsupportedBlocks } from '../../utils';\n\nexport default function EnhancedPaginationControl( {\n\tenhancedPagination,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst { hasUnsupportedBlocks } = useUnsupportedBlocks( clientId );\n\tconst fullPageClientSideNavigation =\n\t\twindow.__experimentalFullPageClientSideNavigation;\n\n\tlet help = __(
|
|
1
|
+
{"version":3,"names":["ToggleControl","__","useUnsupportedBlocks","jsx","_jsx","Fragment","_Fragment","EnhancedPaginationControl","enhancedPagination","setAttributes","clientId","hasUnsupportedBlocks","fullPageClientSideNavigation","window","__experimentalFullPageClientSideNavigation","help","children","__nextHasNoMarginBottom","label","checked","disabled","onChange","value"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useUnsupportedBlocks } from '../../utils';\n\nexport default function EnhancedPaginationControl( {\n\tenhancedPagination,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst { hasUnsupportedBlocks } = useUnsupportedBlocks( clientId );\n\tconst fullPageClientSideNavigation =\n\t\twindow.__experimentalFullPageClientSideNavigation;\n\n\tlet help = __(\n\t\t'Reload the full page—instead of just the posts list—when visitors navigate between pages.'\n\t);\n\tif ( fullPageClientSideNavigation ) {\n\t\thelp = __(\n\t\t\t'Experimental full-page client-side navigation setting enabled.'\n\t\t);\n\t} else if ( hasUnsupportedBlocks ) {\n\t\thelp = __(\n\t\t\t'Enhancement disabled because there are non-compatible blocks inside the Query block.'\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Reload full page' ) }\n\t\t\t\thelp={ help }\n\t\t\t\tchecked={\n\t\t\t\t\t! enhancedPagination && ! fullPageClientSideNavigation\n\t\t\t\t}\n\t\t\t\tdisabled={\n\t\t\t\t\thasUnsupportedBlocks || fullPageClientSideNavigation\n\t\t\t\t}\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tenhancedPagination: ! value,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,oBAAoB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA;AAEnD,eAAe,SAASC,yBAAyBA,CAAE;EAClDC,kBAAkB;EAClBC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAqB,CAAC,GAAGT,oBAAoB,CAAEQ,QAAS,CAAC;EACjE,MAAME,4BAA4B,GACjCC,MAAM,CAACC,0CAA0C;EAElD,IAAIC,IAAI,GAAGd,EAAE,CACZ,2FACD,CAAC;EACD,IAAKW,4BAA4B,EAAG;IACnCG,IAAI,GAAGd,EAAE,CACR,gEACD,CAAC;EACF,CAAC,MAAM,IAAKU,oBAAoB,EAAG;IAClCI,IAAI,GAAGd,EAAE,CACR,sFACD,CAAC;EACF;EAEA,oBACCG,IAAA,CAAAE,SAAA;IAAAU,QAAA,eACCZ,IAAA,CAACJ,aAAa;MACbiB,uBAAuB;MACvBC,KAAK,EAAGjB,EAAE,CAAE,kBAAmB,CAAG;MAClCc,IAAI,EAAGA,IAAM;MACbI,OAAO,EACN,CAAEX,kBAAkB,IAAI,CAAEI,4BAC1B;MACDQ,QAAQ,EACPT,oBAAoB,IAAIC,4BACxB;MACDS,QAAQ,EAAKC,KAAK,IAAM;QACvBb,aAAa,CAAE;UACdD,kBAAkB,EAAE,CAAEc;QACvB,CAAE,CAAC;MACJ;IAAG,CACH;EAAC,CACD,CAAC;AAEL","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ import { PanelBody, TextControl, SelectControl, RangeControl, __experimentalTogg
|
|
|
5
5
|
import { useSelect } from '@wordpress/data';
|
|
6
6
|
import { store as coreStore } from '@wordpress/core-data';
|
|
7
7
|
import { __ } from '@wordpress/i18n';
|
|
8
|
-
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
9
8
|
import { debounce } from '@wordpress/compose';
|
|
10
9
|
import { useEffect, useState, useCallback } from '@wordpress/element';
|
|
11
10
|
|
|
@@ -18,17 +17,12 @@ import ParentControl from './parent-control';
|
|
|
18
17
|
import { TaxonomyControls } from './taxonomy-controls';
|
|
19
18
|
import FormatControls from './format-controls';
|
|
20
19
|
import StickyControl from './sticky-control';
|
|
21
|
-
import CreateNewPostLink from './create-new-post-link';
|
|
22
20
|
import PerPageControl from './per-page-control';
|
|
23
21
|
import OffsetControl from './offset-controls';
|
|
24
22
|
import PagesControl from './pages-control';
|
|
25
|
-
import { unlock } from '../../../lock-unlock';
|
|
26
23
|
import { usePostTypes, useIsPostTypeHierarchical, useAllowedControls, isControlAllowed, useTaxonomies } from '../../utils';
|
|
27
24
|
import { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';
|
|
28
25
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
|
-
const {
|
|
30
|
-
BlockInfo
|
|
31
|
-
} = unlock(blockEditorPrivateApis);
|
|
32
26
|
export default function QueryInspectorControls(props) {
|
|
33
27
|
const {
|
|
34
28
|
attributes,
|
|
@@ -134,11 +128,7 @@ export default function QueryInspectorControls(props) {
|
|
|
134
128
|
const showPagesControl = isControlAllowed(allowedControls, 'pages');
|
|
135
129
|
const showDisplayPanel = showPostCountControl || showOffSetControl || showPagesControl;
|
|
136
130
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
137
|
-
children: [
|
|
138
|
-
children: /*#__PURE__*/_jsx(CreateNewPostLink, {
|
|
139
|
-
postType: postType
|
|
140
|
-
})
|
|
141
|
-
}), showSettingsPanel && /*#__PURE__*/_jsxs(PanelBody, {
|
|
131
|
+
children: [showSettingsPanel && /*#__PURE__*/_jsxs(PanelBody, {
|
|
142
132
|
title: __('Settings'),
|
|
143
133
|
children: [showInheritControl && /*#__PURE__*/_jsxs(ToggleGroupControl, {
|
|
144
134
|
__next40pxDefaultSize: true,
|
|
@@ -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","isSingular","query","displayLayout","order","orderBy","author","authorIds","pages","postType","perPage","offset","sticky","inherit","taxQuery","parents","format","allowedControls","showSticky","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, isSingular } = 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 = 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\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\t! isSingular && 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 === 'default' } );\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 ? 'default' : 'custom' }\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=\"default\"\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=\"custom\"\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 per page' ) }\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;AAC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eControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","Notice","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","useSelect","store","coreStore","__","debounce","useEffect","useState","useCallback","OrderControl","AuthorControl","ParentControl","TaxonomyControls","FormatControls","StickyControl","PerPageControl","OffsetControl","PagesControl","usePostTypes","useIsPostTypeHierarchical","useAllowedControls","isControlAllowed","useTaxonomies","useToolsPanelDropdownMenuProps","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","QueryInspectorControls","props","attributes","setQuery","setDisplayLayout","isSingular","query","displayLayout","order","orderBy","author","authorIds","pages","postType","perPage","offset","sticky","inherit","taxQuery","parents","format","allowedControls","showSticky","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 { 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 PerPageControl from './per-page-control';\nimport OffsetControl from './offset-controls';\nimport PagesControl from './pages-control';\nimport {\n\tusePostTypes,\n\tuseIsPostTypeHierarchical,\n\tuseAllowedControls,\n\tisControlAllowed,\n\tuseTaxonomies,\n} from '../../utils';\nimport { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';\n\nexport default function QueryInspectorControls( props ) {\n\tconst { attributes, setQuery, setDisplayLayout, isSingular } = 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 = 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\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\t! isSingular && 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{ 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 === 'default' } );\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 ? 'default' : 'custom' }\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=\"default\"\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=\"custom\"\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 per page' ) }\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,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,SAAS,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,oBAAoB;;AAErE;AACA;AAC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