@wordpress/edit-site 6.35.2-next.dc3f6d3c1.0 → 6.36.1-next.8b30e05b0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.js +109 -0
  3. package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.js.map +7 -0
  4. package/build/components/add-new-template-legacy/add-custom-template-modal-content.js +328 -0
  5. package/build/components/add-new-template-legacy/add-custom-template-modal-content.js.map +7 -0
  6. package/build/components/add-new-template-legacy/index.js +389 -0
  7. package/build/components/add-new-template-legacy/index.js.map +7 -0
  8. package/build/components/add-new-template-legacy/utils.js +620 -0
  9. package/build/components/add-new-template-legacy/utils.js.map +7 -0
  10. package/build/components/page-templates/fields.js +3 -1
  11. package/build/components/page-templates/fields.js.map +2 -2
  12. package/build/components/page-templates/index-legacy.js +185 -0
  13. package/build/components/page-templates/index-legacy.js.map +7 -0
  14. package/build/components/post-list/index.js +10 -0
  15. package/build/components/post-list/index.js.map +2 -2
  16. package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.js +101 -0
  17. package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.js.map +7 -0
  18. package/build/components/sidebar-navigation-screen-templates-browse/index.js +2 -1
  19. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +3 -3
  20. package/build/components/site-editor-routes/templates.js +10 -2
  21. package/build/components/site-editor-routes/templates.js.map +3 -3
  22. package/build/components/site-hub/index.js +1 -1
  23. package/build/components/site-hub/index.js.map +2 -2
  24. package/build/utils/constants.js +6 -0
  25. package/build/utils/constants.js.map +2 -2
  26. package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.js +93 -0
  27. package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.js.map +7 -0
  28. package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.js +316 -0
  29. package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.js.map +7 -0
  30. package/build-module/components/add-new-template-legacy/index.js +390 -0
  31. package/build-module/components/add-new-template-legacy/index.js.map +7 -0
  32. package/build-module/components/add-new-template-legacy/utils.js +589 -0
  33. package/build-module/components/add-new-template-legacy/utils.js.map +7 -0
  34. package/build-module/components/page-templates/fields.js +3 -1
  35. package/build-module/components/page-templates/fields.js.map +2 -2
  36. package/build-module/components/page-templates/index-legacy.js +154 -0
  37. package/build-module/components/page-templates/index-legacy.js.map +7 -0
  38. package/build-module/components/post-list/index.js +12 -0
  39. package/build-module/components/post-list/index.js.map +2 -2
  40. package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.js +70 -0
  41. package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.js.map +7 -0
  42. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +2 -1
  43. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +2 -2
  44. package/build-module/components/site-editor-routes/templates.js +10 -2
  45. package/build-module/components/site-editor-routes/templates.js.map +2 -2
  46. package/build-module/components/site-hub/index.js +1 -1
  47. package/build-module/components/site-hub/index.js.map +2 -2
  48. package/build-module/utils/constants.js +4 -0
  49. package/build-module/utils/constants.js.map +2 -2
  50. package/build-style/style-rtl.css +263 -27
  51. package/build-style/style.css +263 -27
  52. package/package.json +46 -46
  53. package/src/components/add-new-template-legacy/add-custom-generic-template-modal-content.js +94 -0
  54. package/src/components/add-new-template-legacy/add-custom-template-modal-content.js +314 -0
  55. package/src/components/add-new-template-legacy/index.js +454 -0
  56. package/src/components/add-new-template-legacy/utils.js +760 -0
  57. package/src/components/page-templates/fields.js +13 -9
  58. package/src/components/page-templates/index-legacy.js +166 -0
  59. package/src/components/post-list/index.js +13 -0
  60. package/src/components/sidebar-navigation-screen-templates-browse/content-legacy.js +79 -0
  61. package/src/components/sidebar-navigation-screen-templates-browse/index.js +8 -1
  62. package/src/components/site-editor-routes/templates.js +22 -3
  63. package/src/components/site-hub/index.js +1 -1
  64. package/src/utils/constants.js +2 -0
package/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 6.35.1-next.0 (2025-11-18)
5
+ ## 6.36.0 (2025-11-26)
6
6
 
7
7
  ### Internal
8
8
 
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/edit-site/src/components/add-new-template-legacy/add-custom-generic-template-modal-content.js
21
+ var add_custom_generic_template_modal_content_exports = {};
22
+ __export(add_custom_generic_template_modal_content_exports, {
23
+ default: () => add_custom_generic_template_modal_content_default
24
+ });
25
+ module.exports = __toCommonJS(add_custom_generic_template_modal_content_exports);
26
+ var import_change_case = require("change-case");
27
+ var import_element = require("@wordpress/element");
28
+ var import_i18n = require("@wordpress/i18n");
29
+ var import_components = require("@wordpress/components");
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ function AddCustomGenericTemplateModalContent({ createTemplate, onBack }) {
32
+ const [title, setTitle] = (0, import_element.useState)("");
33
+ const defaultTitle = (0, import_i18n.__)("Custom Template");
34
+ const [isBusy, setIsBusy] = (0, import_element.useState)(false);
35
+ const inputRef = (0, import_element.useRef)();
36
+ (0, import_element.useEffect)(() => {
37
+ if (inputRef.current) {
38
+ inputRef.current.focus();
39
+ }
40
+ }, []);
41
+ async function onCreateTemplate(event) {
42
+ event.preventDefault();
43
+ if (isBusy) {
44
+ return;
45
+ }
46
+ setIsBusy(true);
47
+ try {
48
+ await createTemplate(
49
+ {
50
+ slug: (0, import_change_case.paramCase)(title || defaultTitle) || "wp-custom-template",
51
+ title: title || defaultTitle
52
+ },
53
+ false
54
+ );
55
+ } finally {
56
+ setIsBusy(false);
57
+ }
58
+ }
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("form", { onSubmit: onCreateTemplate, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { spacing: 6, children: [
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
+ import_components.TextControl,
62
+ {
63
+ __next40pxDefaultSize: true,
64
+ __nextHasNoMarginBottom: true,
65
+ label: (0, import_i18n.__)("Name"),
66
+ value: title,
67
+ onChange: setTitle,
68
+ placeholder: defaultTitle,
69
+ disabled: isBusy,
70
+ ref: inputRef,
71
+ help: (0, import_i18n.__)(
72
+ // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
73
+ 'Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.'
74
+ )
75
+ }
76
+ ),
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
78
+ import_components.__experimentalHStack,
79
+ {
80
+ className: "edit-site-custom-generic-template__modal-actions",
81
+ justify: "right",
82
+ children: [
83
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
84
+ import_components.Button,
85
+ {
86
+ __next40pxDefaultSize: true,
87
+ variant: "tertiary",
88
+ onClick: onBack,
89
+ children: (0, import_i18n.__)("Back")
90
+ }
91
+ ),
92
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
+ import_components.Button,
94
+ {
95
+ __next40pxDefaultSize: true,
96
+ variant: "primary",
97
+ type: "submit",
98
+ isBusy,
99
+ "aria-disabled": isBusy,
100
+ children: (0, import_i18n.__)("Create")
101
+ }
102
+ )
103
+ ]
104
+ }
105
+ )
106
+ ] }) });
107
+ }
108
+ var add_custom_generic_template_modal_content_default = AddCustomGenericTemplateModalContent;
109
+ //# sourceMappingURL=add-custom-generic-template-modal-content.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/add-new-template-legacy/add-custom-generic-template-modal-content.js"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\tTextControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\nfunction AddCustomGenericTemplateModalContent( { createTemplate, onBack } ) {\n\tconst [ title, setTitle ] = useState( '' );\n\tconst defaultTitle = __( 'Custom Template' );\n\tconst [ isBusy, setIsBusy ] = useState( false );\n\tconst inputRef = useRef();\n\n\t// Set focus to the name input when the component mounts\n\tuseEffect( () => {\n\t\tif ( inputRef.current ) {\n\t\t\tinputRef.current.focus();\n\t\t}\n\t}, [] );\n\n\tasync function onCreateTemplate( event ) {\n\t\tevent.preventDefault();\n\t\tif ( isBusy ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsBusy( true );\n\t\ttry {\n\t\t\tawait createTemplate(\n\t\t\t\t{\n\t\t\t\t\tslug:\n\t\t\t\t\t\tkebabCase( title || defaultTitle ) ||\n\t\t\t\t\t\t'wp-custom-template',\n\t\t\t\t\ttitle: title || defaultTitle,\n\t\t\t\t},\n\t\t\t\tfalse\n\t\t\t);\n\t\t} finally {\n\t\t\tsetIsBusy( false );\n\t\t}\n\t}\n\treturn (\n\t\t<form onSubmit={ onCreateTemplate }>\n\t\t\t<VStack spacing={ 6 }>\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\tplaceholder={ defaultTitle }\n\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\tref={ inputRef }\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t\t\t\t'Describe the template, e.g. \"Post with sidebar\". A custom template can be manually applied to any post or page.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"edit-site-custom-generic-template__modal-actions\"\n\t\t\t\t\tjustify=\"right\"\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ onBack }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\taria-disabled={ isBusy }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Create' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n\nexport default AddCustomGenericTemplateModalContent;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,yBAAuC;AAKvC,qBAA4C;AAC5C,kBAAmB;AACnB,wBAKO;AAsCH;AApCJ,SAAS,qCAAsC,EAAE,gBAAgB,OAAO,GAAI;AAC3E,QAAM,CAAE,OAAO,QAAS,QAAI,yBAAU,EAAG;AACzC,QAAM,mBAAe,gBAAI,iBAAkB;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AQ;",
6
+ "names": ["kebabCase", "VStack", "HStack"]
7
+ }
@@ -0,0 +1,328 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/edit-site/src/components/add-new-template-legacy/add-custom-template-modal-content.js
21
+ var add_custom_template_modal_content_exports = {};
22
+ __export(add_custom_template_modal_content_exports, {
23
+ default: () => add_custom_template_modal_content_default
24
+ });
25
+ module.exports = __toCommonJS(add_custom_template_modal_content_exports);
26
+ var import_element = require("@wordpress/element");
27
+ var import_i18n = require("@wordpress/i18n");
28
+ var import_components = require("@wordpress/components");
29
+ var import_core_data = require("@wordpress/core-data");
30
+ var import_html_entities = require("@wordpress/html-entities");
31
+ var import_compose = require("@wordpress/compose");
32
+ var import_dom = require("@wordpress/dom");
33
+ var import_url = require("@wordpress/url");
34
+ var import_utils = require("./utils");
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var EMPTY_ARRAY = [];
37
+ function SuggestionListItem({
38
+ suggestion,
39
+ search,
40
+ onSelect,
41
+ entityForSuggestions
42
+ }) {
43
+ const baseCssClass = "edit-site-custom-template-modal__suggestions_list__list-item";
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
45
+ import_components.Composite.Item,
46
+ {
47
+ render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
+ import_components.Button,
49
+ {
50
+ __next40pxDefaultSize: true,
51
+ role: "option",
52
+ className: baseCssClass,
53
+ onClick: () => onSelect(
54
+ entityForSuggestions.config.getSpecificTemplate(
55
+ suggestion
56
+ )
57
+ )
58
+ }
59
+ ),
60
+ children: [
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
+ import_components.__experimentalText,
63
+ {
64
+ size: "body",
65
+ lineHeight: 1.53846153846,
66
+ weight: 500,
67
+ className: `${baseCssClass}__title`,
68
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
+ import_components.TextHighlight,
70
+ {
71
+ text: (0, import_html_entities.decodeEntities)(suggestion.name),
72
+ highlight: search
73
+ }
74
+ )
75
+ }
76
+ ),
77
+ suggestion.link && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
+ import_components.__experimentalText,
79
+ {
80
+ size: "body",
81
+ lineHeight: 1.53846153846,
82
+ className: `${baseCssClass}__info`,
83
+ children: (0, import_url.safeDecodeURI)(suggestion.link)
84
+ }
85
+ )
86
+ ]
87
+ }
88
+ );
89
+ }
90
+ function useSearchSuggestions(entityForSuggestions, search) {
91
+ const { config } = entityForSuggestions;
92
+ const query = (0, import_element.useMemo)(
93
+ () => ({
94
+ order: "asc",
95
+ context: "view",
96
+ search,
97
+ per_page: search ? 20 : 10,
98
+ ...config.queryArgs(search)
99
+ }),
100
+ [search, config]
101
+ );
102
+ const { records: searchResults, hasResolved: searchHasResolved } = (0, import_core_data.useEntityRecords)(
103
+ entityForSuggestions.type,
104
+ entityForSuggestions.slug,
105
+ query
106
+ );
107
+ const [suggestions, setSuggestions] = (0, import_element.useState)(EMPTY_ARRAY);
108
+ (0, import_element.useEffect)(() => {
109
+ if (!searchHasResolved) {
110
+ return;
111
+ }
112
+ let newSuggestions = EMPTY_ARRAY;
113
+ if (searchResults?.length) {
114
+ newSuggestions = searchResults;
115
+ if (config.recordNamePath) {
116
+ newSuggestions = (0, import_utils.mapToIHasNameAndId)(
117
+ newSuggestions,
118
+ config.recordNamePath
119
+ );
120
+ }
121
+ }
122
+ setSuggestions(newSuggestions);
123
+ }, [searchResults, searchHasResolved]);
124
+ return suggestions;
125
+ }
126
+ function SuggestionList({ entityForSuggestions, onSelect }) {
127
+ const [search, setSearch, debouncedSearch] = (0, import_compose.useDebouncedInput)();
128
+ const suggestions = useSearchSuggestions(
129
+ entityForSuggestions,
130
+ debouncedSearch
131
+ );
132
+ const { labels } = entityForSuggestions;
133
+ const [showSearchControl, setShowSearchControl] = (0, import_element.useState)(false);
134
+ if (!showSearchControl && suggestions?.length > 9) {
135
+ setShowSearchControl(true);
136
+ }
137
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
138
+ showSearchControl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
+ import_components.SearchControl,
140
+ {
141
+ __nextHasNoMarginBottom: true,
142
+ onChange: setSearch,
143
+ value: search,
144
+ label: labels.search_items,
145
+ placeholder: labels.search_items
146
+ }
147
+ ),
148
+ !!suggestions?.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
149
+ import_components.Composite,
150
+ {
151
+ orientation: "vertical",
152
+ role: "listbox",
153
+ className: "edit-site-custom-template-modal__suggestions_list",
154
+ "aria-label": (0, import_i18n.__)("Suggestions list"),
155
+ children: suggestions.map((suggestion) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
156
+ SuggestionListItem,
157
+ {
158
+ suggestion,
159
+ search: debouncedSearch,
160
+ onSelect,
161
+ entityForSuggestions
162
+ },
163
+ suggestion.slug
164
+ ))
165
+ }
166
+ ),
167
+ debouncedSearch && !suggestions?.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
168
+ import_components.__experimentalText,
169
+ {
170
+ as: "p",
171
+ className: "edit-site-custom-template-modal__no-results",
172
+ children: labels.not_found
173
+ }
174
+ )
175
+ ] });
176
+ }
177
+ function AddCustomTemplateModalContent({
178
+ onSelect,
179
+ entityForSuggestions,
180
+ onBack,
181
+ containerRef
182
+ }) {
183
+ const [showSearchEntities, setShowSearchEntities] = (0, import_element.useState)(
184
+ entityForSuggestions.hasGeneralTemplate
185
+ );
186
+ (0, import_element.useEffect)(() => {
187
+ if (containerRef.current) {
188
+ const [firstFocusable] = import_dom.focus.focusable.find(
189
+ containerRef.current
190
+ );
191
+ firstFocusable?.focus();
192
+ }
193
+ }, [showSearchEntities]);
194
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
195
+ import_components.__experimentalVStack,
196
+ {
197
+ spacing: 4,
198
+ className: "edit-site-custom-template-modal__contents-wrapper",
199
+ alignment: "left",
200
+ children: [
201
+ !showSearchEntities && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
202
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalText, { as: "p", children: (0, import_i18n.__)(
203
+ "Select whether to create a single template for all items or a specific one."
204
+ ) }),
205
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
206
+ import_components.Flex,
207
+ {
208
+ className: "edit-site-custom-template-modal__contents",
209
+ gap: "4",
210
+ align: "initial",
211
+ children: [
212
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
213
+ import_components.FlexItem,
214
+ {
215
+ isBlock: true,
216
+ as: import_components.Button,
217
+ onClick: () => {
218
+ const {
219
+ slug,
220
+ title,
221
+ description,
222
+ templatePrefix
223
+ } = entityForSuggestions.template;
224
+ onSelect({
225
+ slug,
226
+ title,
227
+ description,
228
+ templatePrefix
229
+ });
230
+ },
231
+ children: [
232
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
233
+ import_components.__experimentalText,
234
+ {
235
+ as: "span",
236
+ weight: 500,
237
+ lineHeight: 1.53846153846,
238
+ children: entityForSuggestions.labels.all_items
239
+ }
240
+ ),
241
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
242
+ import_components.__experimentalText,
243
+ {
244
+ as: "span",
245
+ lineHeight: 1.53846153846,
246
+ // translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.
247
+ children: (0, import_i18n.__)("For all items")
248
+ }
249
+ )
250
+ ]
251
+ }
252
+ ),
253
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
254
+ import_components.FlexItem,
255
+ {
256
+ isBlock: true,
257
+ as: import_components.Button,
258
+ onClick: () => {
259
+ setShowSearchEntities(true);
260
+ },
261
+ children: [
262
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
263
+ import_components.__experimentalText,
264
+ {
265
+ as: "span",
266
+ weight: 500,
267
+ lineHeight: 1.53846153846,
268
+ children: entityForSuggestions.labels.singular_name
269
+ }
270
+ ),
271
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
272
+ import_components.__experimentalText,
273
+ {
274
+ as: "span",
275
+ lineHeight: 1.53846153846,
276
+ // translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.
277
+ children: (0, import_i18n.__)("For a specific item")
278
+ }
279
+ )
280
+ ]
281
+ }
282
+ )
283
+ ]
284
+ }
285
+ ),
286
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Flex, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
287
+ import_components.Button,
288
+ {
289
+ __next40pxDefaultSize: true,
290
+ variant: "tertiary",
291
+ onClick: onBack,
292
+ children: (0, import_i18n.__)("Back")
293
+ }
294
+ ) })
295
+ ] }),
296
+ showSearchEntities && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
297
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalText, { as: "p", children: (0, import_i18n.__)(
298
+ "This template will be used only for the specific item chosen."
299
+ ) }),
300
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
301
+ SuggestionList,
302
+ {
303
+ entityForSuggestions,
304
+ onSelect
305
+ }
306
+ ),
307
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Flex, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
308
+ import_components.Button,
309
+ {
310
+ __next40pxDefaultSize: true,
311
+ variant: "tertiary",
312
+ onClick: () => {
313
+ if (entityForSuggestions.hasGeneralTemplate) {
314
+ onBack();
315
+ } else {
316
+ setShowSearchEntities(false);
317
+ }
318
+ },
319
+ children: (0, import_i18n.__)("Back")
320
+ }
321
+ ) })
322
+ ] })
323
+ ]
324
+ }
325
+ );
326
+ }
327
+ var add_custom_template_modal_content_default = AddCustomTemplateModalContent;
328
+ //# sourceMappingURL=add-custom-template-modal-content.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/add-new-template-legacy/add-custom-template-modal-content.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\tFlex,\n\tFlexItem,\n\tSearchControl,\n\tTextHighlight,\n\tComposite,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useDebouncedInput } from '@wordpress/compose';\nimport { focus } from '@wordpress/dom';\nimport { safeDecodeURI } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { mapToIHasNameAndId } from './utils';\n\nconst EMPTY_ARRAY = [];\n\nfunction SuggestionListItem( {\n\tsuggestion,\n\tsearch,\n\tonSelect,\n\tentityForSuggestions,\n} ) {\n\tconst baseCssClass =\n\t\t'edit-site-custom-template-modal__suggestions_list__list-item';\n\treturn (\n\t\t<Composite.Item\n\t\t\trender={\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\tclassName={ baseCssClass }\n\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\tonSelect(\n\t\t\t\t\t\t\tentityForSuggestions.config.getSpecificTemplate(\n\t\t\t\t\t\t\t\tsuggestion\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/>\n\t\t\t}\n\t\t>\n\t\t\t<Text\n\t\t\t\tsize=\"body\"\n\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\tweight={ 500 }\n\t\t\t\tclassName={ `${ baseCssClass }__title` }\n\t\t\t>\n\t\t\t\t<TextHighlight\n\t\t\t\t\ttext={ decodeEntities( suggestion.name ) }\n\t\t\t\t\thighlight={ search }\n\t\t\t\t/>\n\t\t\t</Text>\n\t\t\t{ suggestion.link && (\n\t\t\t\t<Text\n\t\t\t\t\tsize=\"body\"\n\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\tclassName={ `${ baseCssClass }__info` }\n\t\t\t\t>\n\t\t\t\t\t{ safeDecodeURI( suggestion.link ) }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</Composite.Item>\n\t);\n}\n\nfunction useSearchSuggestions( entityForSuggestions, search ) {\n\tconst { config } = entityForSuggestions;\n\tconst query = useMemo(\n\t\t() => ( {\n\t\t\torder: 'asc',\n\t\t\tcontext: 'view',\n\t\t\tsearch,\n\t\t\tper_page: search ? 20 : 10,\n\t\t\t...config.queryArgs( search ),\n\t\t} ),\n\t\t[ search, config ]\n\t);\n\tconst { records: searchResults, hasResolved: searchHasResolved } =\n\t\tuseEntityRecords(\n\t\t\tentityForSuggestions.type,\n\t\t\tentityForSuggestions.slug,\n\t\t\tquery\n\t\t);\n\tconst [ suggestions, setSuggestions ] = useState( EMPTY_ARRAY );\n\tuseEffect( () => {\n\t\tif ( ! searchHasResolved ) {\n\t\t\treturn;\n\t\t}\n\t\tlet newSuggestions = EMPTY_ARRAY;\n\t\tif ( searchResults?.length ) {\n\t\t\tnewSuggestions = searchResults;\n\t\t\tif ( config.recordNamePath ) {\n\t\t\t\tnewSuggestions = mapToIHasNameAndId(\n\t\t\t\t\tnewSuggestions,\n\t\t\t\t\tconfig.recordNamePath\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t// Update suggestions only when the query has resolved, so as to keep\n\t\t// the previous results in the UI.\n\t\tsetSuggestions( newSuggestions );\n\t}, [ searchResults, searchHasResolved ] );\n\treturn suggestions;\n}\n\nfunction SuggestionList( { entityForSuggestions, onSelect } ) {\n\tconst [ search, setSearch, debouncedSearch ] = useDebouncedInput();\n\tconst suggestions = useSearchSuggestions(\n\t\tentityForSuggestions,\n\t\tdebouncedSearch\n\t);\n\tconst { labels } = entityForSuggestions;\n\tconst [ showSearchControl, setShowSearchControl ] = useState( false );\n\tif ( ! showSearchControl && suggestions?.length > 9 ) {\n\t\tsetShowSearchControl( true );\n\t}\n\treturn (\n\t\t<>\n\t\t\t{ showSearchControl && (\n\t\t\t\t<SearchControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tonChange={ setSearch }\n\t\t\t\t\tvalue={ search }\n\t\t\t\t\tlabel={ labels.search_items }\n\t\t\t\t\tplaceholder={ labels.search_items }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! suggestions?.length && (\n\t\t\t\t<Composite\n\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\tclassName=\"edit-site-custom-template-modal__suggestions_list\"\n\t\t\t\t\taria-label={ __( 'Suggestions list' ) }\n\t\t\t\t>\n\t\t\t\t\t{ suggestions.map( ( suggestion ) => (\n\t\t\t\t\t\t<SuggestionListItem\n\t\t\t\t\t\t\tkey={ suggestion.slug }\n\t\t\t\t\t\t\tsuggestion={ suggestion }\n\t\t\t\t\t\t\tsearch={ debouncedSearch }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tentityForSuggestions={ entityForSuggestions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</Composite>\n\t\t\t) }\n\t\t\t{ debouncedSearch && ! suggestions?.length && (\n\t\t\t\t<Text\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tclassName=\"edit-site-custom-template-modal__no-results\"\n\t\t\t\t>\n\t\t\t\t\t{ labels.not_found }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction AddCustomTemplateModalContent( {\n\tonSelect,\n\tentityForSuggestions,\n\tonBack,\n\tcontainerRef,\n} ) {\n\tconst [ showSearchEntities, setShowSearchEntities ] = useState(\n\t\tentityForSuggestions.hasGeneralTemplate\n\t);\n\n\t// Focus on the first focusable element when the modal opens.\n\t// We handle focus management in the parent modal, just need to focus on the first focusable element.\n\tuseEffect( () => {\n\t\tif ( containerRef.current ) {\n\t\t\tconst [ firstFocusable ] = focus.focusable.find(\n\t\t\t\tcontainerRef.current\n\t\t\t);\n\t\t\tfirstFocusable?.focus();\n\t\t}\n\t}, [ showSearchEntities ] );\n\n\treturn (\n\t\t<VStack\n\t\t\tspacing={ 4 }\n\t\t\tclassName=\"edit-site-custom-template-modal__contents-wrapper\"\n\t\t\talignment=\"left\"\n\t\t>\n\t\t\t{ ! showSearchEntities && (\n\t\t\t\t<>\n\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Select whether to create a single template for all items or a specific one.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Flex\n\t\t\t\t\t\tclassName=\"edit-site-custom-template-modal__contents\"\n\t\t\t\t\t\tgap=\"4\"\n\t\t\t\t\t\talign=\"initial\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexItem\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t\ttemplatePrefix,\n\t\t\t\t\t\t\t\t} = entityForSuggestions.template;\n\t\t\t\t\t\t\t\tonSelect( {\n\t\t\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t\ttemplatePrefix,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tweight={ 500 }\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ entityForSuggestions.labels.all_items }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.\n\t\t\t\t\t\t\t\t\t__( 'For all items' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t<FlexItem\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetShowSearchEntities( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tweight={ 500 }\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ entityForSuggestions.labels.singular_name }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.\n\t\t\t\t\t\t\t\t\t__( 'For a specific item' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t</Flex>\n\t\t\t\t\t<Flex justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onBack }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</Flex>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ showSearchEntities && (\n\t\t\t\t<>\n\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'This template will be used only for the specific item chosen.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<SuggestionList\n\t\t\t\t\t\tentityForSuggestions={ entityForSuggestions }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t/>\n\t\t\t\t\t<Flex justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t// If general template exists, go directly back to main screen\n\t\t\t\t\t\t\t\t// instead of showing the choice screen\n\t\t\t\t\t\t\t\tif ( entityForSuggestions.hasGeneralTemplate ) {\n\t\t\t\t\t\t\t\t\tonBack();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsetShowSearchEntities( false );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</Flex>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default AddCustomTemplateModalContent;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA6C;AAC7C,kBAAmB;AACnB,wBASO;AACP,uBAAiC;AACjC,2BAA+B;AAC/B,qBAAkC;AAClC,iBAAsB;AACtB,iBAA8B;AAK9B,mBAAmC;AAajC;AAXF,IAAM,cAAc,CAAC;AAErB,SAAS,mBAAoB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,eACL;AACD,SACC;AAAA,IAAC,4BAAU;AAAA,IAAV;AAAA,MACA,QACC;AAAA,QAAC;AAAA;AAAA,UACA,uBAAqB;AAAA,UACrB,MAAK;AAAA,UACL,WAAY;AAAA,UACZ,SAAU,MACT;AAAA,YACC,qBAAqB,OAAO;AAAA,cAC3B;AAAA,YACD;AAAA,UACD;AAAA;AAAA,MAEF;AAAA,MAGD;AAAA;AAAA,UAAC,kBAAAA;AAAA,UAAA;AAAA,YACA,MAAK;AAAA,YACL,YAAa;AAAA,YACb,QAAS;AAAA,YACT,WAAY,GAAI,YAAa;AAAA,YAE7B;AAAA,cAAC;AAAA;AAAA,gBACA,UAAO,qCAAgB,WAAW,IAAK;AAAA,gBACvC,WAAY;AAAA;AAAA,YACb;AAAA;AAAA,QACD;AAAA,QACE,WAAW,QACZ;AAAA,UAAC,kBAAAA;AAAA,UAAA;AAAA,YACA,MAAK;AAAA,YACL,YAAa;AAAA,YACb,WAAY,GAAI,YAAa;AAAA,YAE3B,wCAAe,WAAW,IAAK;AAAA;AAAA,QAClC;AAAA;AAAA;AAAA,EAEF;AAEF;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