@wordpress/edit-site 7.3.2-next.v.202608281122.0 → 7.4.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 (131) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/build/components/add-new-template/add-custom-template-modal-content.cjs +3 -1
  3. package/build/components/add-new-template/add-custom-template-modal-content.cjs.map +2 -2
  4. package/build/components/add-new-template/index.cjs +6 -4
  5. package/build/components/add-new-template/index.cjs.map +2 -2
  6. package/build/components/add-new-template/utils.cjs +84 -9
  7. package/build/components/add-new-template/utils.cjs.map +2 -2
  8. package/build/components/dataviews-actions/index.cjs +2 -55
  9. package/build/components/dataviews-actions/index.cjs.map +3 -3
  10. package/build/components/layout/index.cjs +2 -2
  11. package/build/components/layout/index.cjs.map +2 -2
  12. package/build/components/more-menu/welcome-guide-menu-item.cjs +10 -2
  13. package/build/components/more-menu/welcome-guide-menu-item.cjs.map +3 -3
  14. package/build/components/page-templates/fields.cjs +2 -126
  15. package/build/components/page-templates/fields.cjs.map +3 -3
  16. package/build/components/page-templates/index.cjs +46 -230
  17. package/build/components/page-templates/index.cjs.map +3 -3
  18. package/build/components/post-list/index.cjs +7 -17
  19. package/build/components/post-list/index.cjs.map +2 -2
  20. package/build/components/sidebar-global-styles/index.cjs +2 -2
  21. package/build/components/sidebar-global-styles/index.cjs.map +2 -2
  22. package/build/components/sidebar-identity/index.cjs +17 -22
  23. package/build/components/sidebar-identity/index.cjs.map +2 -2
  24. package/build/components/sidebar-navigation-item/index.cjs +1 -8
  25. package/build/components/sidebar-navigation-item/index.cjs.map +2 -2
  26. package/build/components/sidebar-navigation-screen-templates-browse/content.cjs +34 -72
  27. package/build/components/sidebar-navigation-screen-templates-browse/content.cjs.map +3 -3
  28. package/build/components/sidebar-navigation-screen-templates-browse/index.cjs +1 -2
  29. package/build/components/sidebar-navigation-screen-templates-browse/index.cjs.map +3 -3
  30. package/build/components/site-editor-routes/templates.cjs +2 -4
  31. package/build/components/site-editor-routes/templates.cjs.map +3 -3
  32. package/build/index.cjs +0 -1
  33. package/build/index.cjs.map +2 -2
  34. package/build-module/components/add-new-template/add-custom-template-modal-content.mjs +3 -1
  35. package/build-module/components/add-new-template/add-custom-template-modal-content.mjs.map +2 -2
  36. package/build-module/components/add-new-template/index.mjs +7 -4
  37. package/build-module/components/add-new-template/index.mjs.map +2 -2
  38. package/build-module/components/add-new-template/utils.mjs +84 -9
  39. package/build-module/components/add-new-template/utils.mjs.map +2 -2
  40. package/build-module/components/dataviews-actions/index.mjs +1 -53
  41. package/build-module/components/dataviews-actions/index.mjs.map +2 -2
  42. package/build-module/components/layout/index.mjs +2 -2
  43. package/build-module/components/layout/index.mjs.map +2 -2
  44. package/build-module/components/more-menu/welcome-guide-menu-item.mjs +10 -2
  45. package/build-module/components/more-menu/welcome-guide-menu-item.mjs.map +2 -2
  46. package/build-module/components/page-templates/fields.mjs +3 -129
  47. package/build-module/components/page-templates/fields.mjs.map +3 -3
  48. package/build-module/components/page-templates/index.mjs +52 -253
  49. package/build-module/components/page-templates/index.mjs.map +2 -2
  50. package/build-module/components/post-list/index.mjs +8 -18
  51. package/build-module/components/post-list/index.mjs.map +2 -2
  52. package/build-module/components/sidebar-global-styles/index.mjs +2 -2
  53. package/build-module/components/sidebar-global-styles/index.mjs.map +2 -2
  54. package/build-module/components/sidebar-identity/index.mjs +17 -22
  55. package/build-module/components/sidebar-identity/index.mjs.map +2 -2
  56. package/build-module/components/sidebar-navigation-item/index.mjs +1 -8
  57. package/build-module/components/sidebar-navigation-item/index.mjs.map +2 -2
  58. package/build-module/components/sidebar-navigation-screen-templates-browse/content.mjs +42 -75
  59. package/build-module/components/sidebar-navigation-screen-templates-browse/content.mjs.map +2 -2
  60. package/build-module/components/sidebar-navigation-screen-templates-browse/index.mjs +1 -2
  61. package/build-module/components/sidebar-navigation-screen-templates-browse/index.mjs.map +2 -2
  62. package/build-module/components/site-editor-routes/templates.mjs +2 -4
  63. package/build-module/components/site-editor-routes/templates.mjs.map +2 -2
  64. package/build-module/index.mjs +0 -1
  65. package/build-module/index.mjs.map +2 -2
  66. package/build-style/style-rtl.css +38 -81
  67. package/build-style/style.css +38 -81
  68. package/package.json +41 -38
  69. package/src/components/add-new-template/add-custom-template-modal-content.jsx +3 -1
  70. package/src/components/add-new-template/index.jsx +9 -4
  71. package/src/components/add-new-template/style.scss +8 -21
  72. package/src/components/add-new-template/utils.js +118 -9
  73. package/src/components/dataviews-actions/index.js +0 -61
  74. package/src/components/layout/index.jsx +5 -2
  75. package/src/components/more-menu/welcome-guide-menu-item.jsx +8 -3
  76. package/src/components/page-templates/fields.jsx +2 -146
  77. package/src/components/page-templates/index.jsx +30 -256
  78. package/src/components/post-list/index.jsx +7 -20
  79. package/src/components/sidebar-global-styles/index.jsx +7 -5
  80. package/src/components/sidebar-global-styles/style.scss +6 -0
  81. package/src/components/sidebar-identity/index.jsx +23 -19
  82. package/src/components/sidebar-identity/style.scss +7 -0
  83. package/src/components/sidebar-navigation-item/index.jsx +1 -7
  84. package/src/components/sidebar-navigation-screen-templates-browse/content.jsx +45 -80
  85. package/src/components/sidebar-navigation-screen-templates-browse/index.jsx +1 -8
  86. package/src/components/site-editor-routes/templates.jsx +2 -19
  87. package/src/components/welcome-guide/style.scss +1 -1
  88. package/src/index.jsx +0 -1
  89. package/src/style.scss +1 -1
  90. package/src/utils/test/get-filtered-template-parts.js +1 -0
  91. package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.cjs +0 -107
  92. package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.cjs.map +0 -7
  93. package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs +0 -327
  94. package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs.map +0 -7
  95. package/build/components/add-new-template-legacy/index.cjs +0 -390
  96. package/build/components/add-new-template-legacy/index.cjs.map +0 -7
  97. package/build/components/add-new-template-legacy/utils.cjs +0 -623
  98. package/build/components/add-new-template-legacy/utils.cjs.map +0 -7
  99. package/build/components/page-templates/hooks.cjs +0 -94
  100. package/build/components/page-templates/hooks.cjs.map +0 -7
  101. package/build/components/page-templates/index-legacy.cjs +0 -167
  102. package/build/components/page-templates/index-legacy.cjs.map +0 -7
  103. package/build/components/page-templates/view-utils.cjs +0 -79
  104. package/build/components/page-templates/view-utils.cjs.map +0 -7
  105. package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.cjs +0 -78
  106. package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.cjs.map +0 -7
  107. package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.mjs +0 -91
  108. package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.mjs.map +0 -7
  109. package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs +0 -315
  110. package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs.map +0 -7
  111. package/build-module/components/add-new-template-legacy/index.mjs +0 -391
  112. package/build-module/components/add-new-template-legacy/index.mjs.map +0 -7
  113. package/build-module/components/add-new-template-legacy/utils.mjs +0 -592
  114. package/build-module/components/add-new-template-legacy/utils.mjs.map +0 -7
  115. package/build-module/components/page-templates/hooks.mjs +0 -74
  116. package/build-module/components/page-templates/hooks.mjs.map +0 -7
  117. package/build-module/components/page-templates/index-legacy.mjs +0 -136
  118. package/build-module/components/page-templates/index-legacy.mjs.map +0 -7
  119. package/build-module/components/page-templates/view-utils.mjs +0 -52
  120. package/build-module/components/page-templates/view-utils.mjs.map +0 -7
  121. package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs +0 -52
  122. package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs.map +0 -7
  123. package/src/components/add-new-template-legacy/add-custom-generic-template-modal-content.jsx +0 -85
  124. package/src/components/add-new-template-legacy/add-custom-template-modal-content.jsx +0 -306
  125. package/src/components/add-new-template-legacy/index.jsx +0 -440
  126. package/src/components/add-new-template-legacy/utils.js +0 -757
  127. package/src/components/page-templates/hooks.js +0 -93
  128. package/src/components/page-templates/index-legacy.jsx +0 -143
  129. package/src/components/page-templates/view-utils.js +0 -50
  130. package/src/components/sidebar-navigation-screen-templates-browse/content-legacy.jsx +0 -52
  131. package/src/components/sidebar-navigation-screen-templates-browse/style.scss +0 -6
@@ -1,74 +0,0 @@
1
- // packages/edit-site/src/components/page-templates/hooks.js
2
- import { store as coreStore } from "@wordpress/core-data";
3
- import { useSelect } from "@wordpress/data";
4
- import {
5
- commentAuthorAvatar as authorIcon,
6
- layout as themeIcon,
7
- plugins as pluginIcon,
8
- globe as globeIcon
9
- } from "@wordpress/icons";
10
- import { TEMPLATE_ORIGINS } from "../../utils/constants.mjs";
11
- function useAddedBy(postType, postId) {
12
- return useSelect(
13
- (select) => {
14
- const { getEntityRecord, getUser, getEditedEntityRecord } = select(coreStore);
15
- const template = getEditedEntityRecord(
16
- "postType",
17
- postType,
18
- postId
19
- );
20
- const originalSource = template?.original_source;
21
- const authorText = template?.author_text;
22
- switch (originalSource) {
23
- case "theme": {
24
- return {
25
- type: originalSource,
26
- icon: themeIcon,
27
- text: authorText,
28
- isCustomized: template.source === TEMPLATE_ORIGINS.custom
29
- };
30
- }
31
- case "plugin": {
32
- return {
33
- type: originalSource,
34
- icon: pluginIcon,
35
- text: authorText,
36
- isCustomized: template.source === TEMPLATE_ORIGINS.custom
37
- };
38
- }
39
- case "site": {
40
- const siteData = getEntityRecord(
41
- "root",
42
- "__unstableBase"
43
- );
44
- return {
45
- type: originalSource,
46
- icon: globeIcon,
47
- imageUrl: siteData?.site_logo ? getEntityRecord(
48
- "postType",
49
- "attachment",
50
- siteData.site_logo
51
- )?.source_url : void 0,
52
- text: authorText,
53
- isCustomized: false
54
- };
55
- }
56
- default: {
57
- const user = getUser(template.author);
58
- return {
59
- type: "user",
60
- icon: authorIcon,
61
- imageUrl: user?.avatar_urls?.[48],
62
- text: authorText ?? user?.name,
63
- isCustomized: false
64
- };
65
- }
66
- }
67
- },
68
- [postType, postId]
69
- );
70
- }
71
- export {
72
- useAddedBy
73
- };
74
- //# sourceMappingURL=hooks.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/page-templates/hooks.js"],
4
- "sourcesContent": ["import { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tcommentAuthorAvatar as authorIcon,\n\tlayout as themeIcon,\n\tplugins as pluginIcon,\n\tglobe as globeIcon,\n} from '@wordpress/icons';\nimport { TEMPLATE_ORIGINS } from '../../utils/constants';\n\n/** @typedef {'wp_template'|'wp_template_part'} TemplateType */\n\n/**\n * @typedef {'theme'|'plugin'|'site'|'user'} AddedByType\n *\n * @typedef AddedByData\n * @type {Object}\n * @property {AddedByType} type The type of the data.\n * @property {React.JSX.Element} icon The icon to display.\n * @property {string} [imageUrl] The optional image URL to display.\n * @property {string} [text] The text to display.\n * @property {boolean} isCustomized Whether the template has been customized.\n *\n * @param {TemplateType} postType The template post type.\n * @param {number} postId The template post id.\n * @return {AddedByData} The added by object or null.\n */\nexport function useAddedBy( postType, postId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getUser, getEditedEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst template = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tconst originalSource = template?.original_source;\n\t\t\tconst authorText = template?.author_text;\n\n\t\t\tswitch ( originalSource ) {\n\t\t\t\tcase 'theme': {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: themeIcon,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized:\n\t\t\t\t\t\t\ttemplate.source === TEMPLATE_ORIGINS.custom,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tcase 'plugin': {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: pluginIcon,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized:\n\t\t\t\t\t\t\ttemplate.source === TEMPLATE_ORIGINS.custom,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tcase 'site': {\n\t\t\t\t\tconst siteData = getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'__unstableBase'\n\t\t\t\t\t);\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: globeIcon,\n\t\t\t\t\t\timageUrl: siteData?.site_logo\n\t\t\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\t\t\t'attachment',\n\t\t\t\t\t\t\t\t\tsiteData.site_logo\n\t\t\t\t\t\t\t )?.source_url\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tconst user = getUser( template.author );\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'user',\n\t\t\t\t\t\ticon: authorIcon,\n\t\t\t\t\t\timageUrl: user?.avatar_urls?.[ 48 ],\n\t\t\t\t\t\ttext: authorText ?? user?.name,\n\t\t\t\t\t\tisCustomized: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[ postType, postId ]\n\t);\n}\n"],
5
- "mappings": ";AAAA,SAAS,SAAS,iBAAiB;AACnC,SAAS,iBAAiB;AAC1B;AAAA,EACC,uBAAuB;AAAA,EACvB,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,OACH;AACP,SAAS,wBAAwB;AAmB1B,SAAS,WAAY,UAAU,QAAS;AAC9C,SAAO;AAAA,IACN,CAAE,WAAY;AACb,YAAM,EAAE,iBAAiB,SAAS,sBAAsB,IACvD,OAAQ,SAAU;AACnB,YAAM,WAAW;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,MACD;AACA,YAAM,iBAAiB,UAAU;AACjC,YAAM,aAAa,UAAU;AAE7B,cAAS,gBAAiB;AAAA,QACzB,KAAK,SAAS;AACb,iBAAO;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cACC,SAAS,WAAW,iBAAiB;AAAA,UACvC;AAAA,QACD;AAAA,QACA,KAAK,UAAU;AACd,iBAAO;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cACC,SAAS,WAAW,iBAAiB;AAAA,UACvC;AAAA,QACD;AAAA,QACA,KAAK,QAAQ;AACZ,gBAAM,WAAW;AAAA,YAChB;AAAA,YACA;AAAA,UACD;AACA,iBAAO;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,YACN,UAAU,UAAU,YACjB;AAAA,cACA;AAAA,cACA;AAAA,cACA,SAAS;AAAA,YACT,GAAG,aACH;AAAA,YACH,MAAM;AAAA,YACN,cAAc;AAAA,UACf;AAAA,QACD;AAAA,QACA,SAAS;AACR,gBAAM,OAAO,QAAS,SAAS,MAAO;AACtC,iBAAO;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,YACN,UAAU,MAAM,cAAe,EAAG;AAAA,YAClC,MAAM,cAAc,MAAM;AAAA,YAC1B,cAAc;AAAA,UACf;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,UAAU,MAAO;AAAA,EACpB;AACD;",
6
- "names": []
7
- }
@@ -1,136 +0,0 @@
1
- // packages/edit-site/src/components/page-templates/index-legacy.jsx
2
- import { Page } from "@wordpress/admin-ui";
3
- import { __ } from "@wordpress/i18n";
4
- import { useState, useMemo, useCallback } from "@wordpress/element";
5
- import { privateApis as corePrivateApis } from "@wordpress/core-data";
6
- import { DataViews, filterSortAndPaginate } from "@wordpress/dataviews";
7
- import { privateApis as routerPrivateApis } from "@wordpress/router";
8
- import { privateApis as editorPrivateApis } from "@wordpress/editor";
9
- import { addQueryArgs } from "@wordpress/url";
10
- import { useEvent } from "@wordpress/compose";
11
- import { useView, useViewConfig } from "@wordpress/views";
12
- import AddNewTemplate from "../add-new-template-legacy/index.mjs";
13
- import { TEMPLATE_POST_TYPE } from "../../utils/constants.mjs";
14
- import { unlock } from "../../lock-unlock.mjs";
15
- import { useEditPostAction } from "../dataviews-actions/index.mjs";
16
- import { previewField } from "./fields.mjs";
17
- import { jsx } from "react/jsx-runtime";
18
- var { usePostActions, usePostFields } = unlock(editorPrivateApis);
19
- var { useHistory, useLocation } = unlock(routerPrivateApis);
20
- var { useEntityRecordsWithPermissions } = unlock(corePrivateApis);
21
- var VIEW_CONFIG_FIELDS = ["default_view", "default_layouts", "view_list"];
22
- function PageTemplates() {
23
- const { path, query } = useLocation();
24
- const { activeView = "all", postId } = query;
25
- const [selection, setSelection] = useState([postId]);
26
- const {
27
- default_view: defaultView,
28
- default_layouts: defaultLayouts,
29
- view_list: viewList
30
- } = useViewConfig({
31
- kind: "postType",
32
- name: TEMPLATE_POST_TYPE,
33
- fields: VIEW_CONFIG_FIELDS
34
- });
35
- const activeViewOverrides = useMemo(
36
- () => viewList?.find((v) => v.slug === activeView)?.view ?? {},
37
- [viewList, activeView]
38
- );
39
- const { view, updateView, isModified, resetToDefault } = useView({
40
- kind: "postType",
41
- name: TEMPLATE_POST_TYPE,
42
- slug: "default",
43
- defaultView,
44
- activeViewOverrides,
45
- defaultLayouts,
46
- queryParams: {
47
- page: query.pageNumber,
48
- search: query.search
49
- },
50
- onChangeQueryParams: (newQueryParams) => {
51
- history.navigate(
52
- addQueryArgs(path, {
53
- ...query,
54
- pageNumber: newQueryParams.page,
55
- search: newQueryParams.search || void 0
56
- })
57
- );
58
- }
59
- });
60
- const { records, isResolving: isLoadingData } = useEntityRecordsWithPermissions("postType", TEMPLATE_POST_TYPE, {
61
- per_page: -1
62
- });
63
- const history = useHistory();
64
- const onChangeSelection = useCallback(
65
- (items) => {
66
- setSelection(items);
67
- if (view?.type === "list") {
68
- history.navigate(
69
- addQueryArgs(path, {
70
- postId: items.length === 1 ? items[0] : void 0
71
- })
72
- );
73
- }
74
- },
75
- [history, path, view?.type]
76
- );
77
- const postFields = usePostFields({ postType: TEMPLATE_POST_TYPE });
78
- const fields = useMemo(() => {
79
- return [previewField, ...postFields || []];
80
- }, [postFields]);
81
- const { data, paginationInfo } = useMemo(() => {
82
- return filterSortAndPaginate(records, view, fields);
83
- }, [records, view, fields]);
84
- const postTypeActions = usePostActions({
85
- postType: TEMPLATE_POST_TYPE,
86
- context: "list"
87
- });
88
- const editAction = useEditPostAction();
89
- const actions = useMemo(
90
- () => [editAction, ...postTypeActions],
91
- [postTypeActions, editAction]
92
- );
93
- const onChangeView = useEvent((newView) => {
94
- updateView(newView);
95
- if (newView.type !== view.type) {
96
- history.invalidate();
97
- }
98
- });
99
- return /* @__PURE__ */ jsx(
100
- Page,
101
- {
102
- className: "edit-site-page-templates",
103
- title: __("Templates"),
104
- headingLevel: 2,
105
- actions: /* @__PURE__ */ jsx(AddNewTemplate, {}),
106
- children: /* @__PURE__ */ jsx(
107
- DataViews,
108
- {
109
- paginationInfo,
110
- fields,
111
- actions,
112
- data,
113
- isLoading: isLoadingData,
114
- view,
115
- onChangeView,
116
- onChangeSelection,
117
- isItemClickable: () => true,
118
- onClickItem: ({ id }) => {
119
- history.navigate(`/wp_template/${id}?canvas=edit`);
120
- },
121
- selection,
122
- defaultLayouts,
123
- onReset: isModified ? () => {
124
- resetToDefault();
125
- history.invalidate();
126
- } : false
127
- },
128
- activeView
129
- )
130
- }
131
- );
132
- }
133
- export {
134
- PageTemplates as default
135
- };
136
- //# sourceMappingURL=index-legacy.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/page-templates/index-legacy.jsx"],
4
- "sourcesContent": ["import { Page } from '@wordpress/admin-ui';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo, useCallback } from '@wordpress/element';\nimport { privateApis as corePrivateApis } from '@wordpress/core-data';\nimport { DataViews, filterSortAndPaginate } from '@wordpress/dataviews';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\nimport { useEvent } from '@wordpress/compose';\nimport { useView, useViewConfig } from '@wordpress/views';\nimport AddNewTemplate from '../add-new-template-legacy';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\nimport { useEditPostAction } from '../dataviews-actions';\nimport { previewField } from './fields';\n\nconst { usePostActions, usePostFields } = unlock( editorPrivateApis );\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\nconst { useEntityRecordsWithPermissions } = unlock( corePrivateApis );\n\nconst VIEW_CONFIG_FIELDS = [ 'default_view', 'default_layouts', 'view_list' ];\n\nexport default function PageTemplates() {\n\tconst { path, query } = useLocation();\n\tconst { activeView = 'all', postId } = query;\n\tconst [ selection, setSelection ] = useState( [ postId ] );\n\n\tconst {\n\t\tdefault_view: defaultView,\n\t\tdefault_layouts: defaultLayouts,\n\t\tview_list: viewList,\n\t} = useViewConfig( {\n\t\tkind: 'postType',\n\t\tname: TEMPLATE_POST_TYPE,\n\t\tfields: VIEW_CONFIG_FIELDS,\n\t} );\n\tconst activeViewOverrides = useMemo(\n\t\t() => viewList?.find( ( v ) => v.slug === activeView )?.view ?? {},\n\t\t[ viewList, activeView ]\n\t);\n\tconst { view, updateView, isModified, resetToDefault } = useView( {\n\t\tkind: 'postType',\n\t\tname: TEMPLATE_POST_TYPE,\n\t\tslug: 'default',\n\t\tdefaultView,\n\t\tactiveViewOverrides,\n\t\tdefaultLayouts,\n\t\tqueryParams: {\n\t\t\tpage: query.pageNumber,\n\t\t\tsearch: query.search,\n\t\t},\n\t\tonChangeQueryParams: ( newQueryParams ) => {\n\t\t\thistory.navigate(\n\t\t\t\taddQueryArgs( path, {\n\t\t\t\t\t...query,\n\t\t\t\t\tpageNumber: newQueryParams.page,\n\t\t\t\t\tsearch: newQueryParams.search || undefined,\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t} );\n\n\tconst { records, isResolving: isLoadingData } =\n\t\tuseEntityRecordsWithPermissions( 'postType', TEMPLATE_POST_TYPE, {\n\t\t\tper_page: -1,\n\t\t} );\n\tconst history = useHistory();\n\tconst onChangeSelection = useCallback(\n\t\t( items ) => {\n\t\t\tsetSelection( items );\n\t\t\tif ( view?.type === 'list' ) {\n\t\t\t\thistory.navigate(\n\t\t\t\t\taddQueryArgs( path, {\n\t\t\t\t\t\tpostId: items.length === 1 ? items[ 0 ] : undefined,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ history, path, view?.type ]\n\t);\n\n\tconst postFields = usePostFields( { postType: TEMPLATE_POST_TYPE } );\n\tconst fields = useMemo( () => {\n\t\treturn [ previewField, ...( postFields || [] ) ];\n\t}, [ postFields ] );\n\n\tconst { data, paginationInfo } = useMemo( () => {\n\t\treturn filterSortAndPaginate( records, view, fields );\n\t}, [ records, view, fields ] );\n\n\tconst postTypeActions = usePostActions( {\n\t\tpostType: TEMPLATE_POST_TYPE,\n\t\tcontext: 'list',\n\t} );\n\tconst editAction = useEditPostAction();\n\tconst actions = useMemo(\n\t\t() => [ editAction, ...postTypeActions ],\n\t\t[ postTypeActions, editAction ]\n\t);\n\n\tconst onChangeView = useEvent( ( newView ) => {\n\t\tupdateView( newView );\n\t\tif ( newView.type !== view.type ) {\n\t\t\t// Retrigger the routing areas resolution.\n\t\t\thistory.invalidate();\n\t\t}\n\t} );\n\n\treturn (\n\t\t<Page\n\t\t\tclassName=\"edit-site-page-templates\"\n\t\t\ttitle={ __( 'Templates' ) }\n\t\t\theadingLevel={ 2 }\n\t\t\tactions={ <AddNewTemplate /> }\n\t\t>\n\t\t\t<DataViews\n\t\t\t\tkey={ activeView }\n\t\t\t\tpaginationInfo={ paginationInfo }\n\t\t\t\tfields={ fields }\n\t\t\t\tactions={ actions }\n\t\t\t\tdata={ data }\n\t\t\t\tisLoading={ isLoadingData }\n\t\t\t\tview={ view }\n\t\t\t\tonChangeView={ onChangeView }\n\t\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\t\tisItemClickable={ () => true }\n\t\t\t\tonClickItem={ ( { id } ) => {\n\t\t\t\t\thistory.navigate( `/wp_template/${ id }?canvas=edit` );\n\t\t\t\t} }\n\t\t\t\tselection={ selection }\n\t\t\t\tdefaultLayouts={ defaultLayouts }\n\t\t\t\tonReset={\n\t\t\t\t\tisModified\n\t\t\t\t\t\t? () => {\n\t\t\t\t\t\t\t\tresetToDefault();\n\t\t\t\t\t\t\t\thistory.invalidate();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: false\n\t\t\t\t}\n\t\t\t/>\n\t\t</Page>\n\t);\n}\n"],
5
- "mappings": "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",
6
- "names": []
7
- }
@@ -1,52 +0,0 @@
1
- // packages/edit-site/src/components/page-templates/view-utils.js
2
- var defaultLayouts = {
3
- table: {
4
- showMedia: false
5
- },
6
- grid: {
7
- showMedia: true
8
- },
9
- list: {
10
- showMedia: false
11
- }
12
- };
13
- var DEFAULT_VIEW = {
14
- type: "grid",
15
- perPage: 20,
16
- sort: {
17
- field: "title",
18
- direction: "asc"
19
- },
20
- titleField: "title",
21
- descriptionField: "description",
22
- mediaField: "preview",
23
- fields: ["author", "active", "slug", "theme"],
24
- filters: [],
25
- ...defaultLayouts.grid
26
- };
27
- function getActiveViewOverridesForTab(activeView) {
28
- if (activeView === "user") {
29
- return {
30
- sort: { field: "date", direction: "desc" }
31
- };
32
- }
33
- if (activeView === "active") {
34
- return {};
35
- }
36
- return {
37
- filters: [
38
- {
39
- field: "author",
40
- operator: "is",
41
- value: activeView,
42
- isLocked: true
43
- }
44
- ]
45
- };
46
- }
47
- export {
48
- DEFAULT_VIEW,
49
- defaultLayouts,
50
- getActiveViewOverridesForTab
51
- };
52
- //# sourceMappingURL=view-utils.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/page-templates/view-utils.js"],
4
- "sourcesContent": ["export const defaultLayouts = {\n\ttable: {\n\t\tshowMedia: false,\n\t},\n\tgrid: {\n\t\tshowMedia: true,\n\t},\n\tlist: {\n\t\tshowMedia: false,\n\t},\n};\n\nexport const DEFAULT_VIEW = {\n\ttype: 'grid',\n\tperPage: 20,\n\tsort: {\n\t\tfield: 'title',\n\t\tdirection: 'asc',\n\t},\n\ttitleField: 'title',\n\tdescriptionField: 'description',\n\tmediaField: 'preview',\n\tfields: [ 'author', 'active', 'slug', 'theme' ],\n\tfilters: [],\n\t...defaultLayouts.grid,\n};\n\nexport function getActiveViewOverridesForTab( activeView ) {\n\t// User view: sort by date, newest first\n\tif ( activeView === 'user' ) {\n\t\treturn {\n\t\t\tsort: { field: 'date', direction: 'desc' },\n\t\t};\n\t}\n\t// Active view: no overrides\n\tif ( activeView === 'active' ) {\n\t\treturn {};\n\t}\n\t// Author-based view: filter by author\n\treturn {\n\t\tfilters: [\n\t\t\t{\n\t\t\t\tfield: 'author',\n\t\t\t\toperator: 'is',\n\t\t\t\tvalue: activeView,\n\t\t\t\tisLocked: true,\n\t\t\t},\n\t\t],\n\t};\n}\n"],
5
- "mappings": ";AAAO,IAAM,iBAAiB;AAAA,EAC7B,OAAO;AAAA,IACN,WAAW;AAAA,EACZ;AAAA,EACA,MAAM;AAAA,IACL,WAAW;AAAA,EACZ;AAAA,EACA,MAAM;AAAA,IACL,WAAW;AAAA,EACZ;AACD;AAEO,IAAM,eAAe;AAAA,EAC3B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,EACZ;AAAA,EACA,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,YAAY;AAAA,EACZ,QAAQ,CAAE,UAAU,UAAU,QAAQ,OAAQ;AAAA,EAC9C,SAAS,CAAC;AAAA,EACV,GAAG,eAAe;AACnB;AAEO,SAAS,6BAA8B,YAAa;AAE1D,MAAK,eAAe,QAAS;AAC5B,WAAO;AAAA,MACN,MAAM,EAAE,OAAO,QAAQ,WAAW,OAAO;AAAA,IAC1C;AAAA,EACD;AAEA,MAAK,eAAe,UAAW;AAC9B,WAAO,CAAC;AAAA,EACT;AAEA,SAAO;AAAA,IACN,SAAS;AAAA,MACR;AAAA,QACC,OAAO;AAAA,QACP,UAAU;AAAA,QACV,OAAO;AAAA,QACP,UAAU;AAAA,MACX;AAAA,IACD;AAAA,EACD;AACD;",
6
- "names": []
7
- }
@@ -1,52 +0,0 @@
1
- // packages/edit-site/src/components/sidebar-navigation-screen-templates-browse/content-legacy.jsx
2
- import { store as coreStore } from "@wordpress/core-data";
3
- import { useSelect } from "@wordpress/data";
4
- import {
5
- commentAuthorAvatar,
6
- layout,
7
- plugins as pluginIcon,
8
- globe
9
- } from "@wordpress/icons";
10
- import { TEMPLATE_POST_TYPE } from "../../utils/constants.mjs";
11
- import DataViewsSidebarContent from "../sidebar-dataviews/index.mjs";
12
- import { jsx } from "react/jsx-runtime";
13
- var SOURCE_TO_ICON = {
14
- user: commentAuthorAvatar,
15
- theme: layout,
16
- plugin: pluginIcon,
17
- site: globe
18
- };
19
- function DataviewsTemplatesSidebarContent() {
20
- const authorSourceMap = useSelect((select) => {
21
- const templates = select(coreStore).getEntityRecords(
22
- "postType",
23
- TEMPLATE_POST_TYPE,
24
- { per_page: -1 }
25
- );
26
- if (!templates) {
27
- return {};
28
- }
29
- const map = {};
30
- for (const template of templates) {
31
- if (template.author_text && template.original_source && !map[template.author_text]) {
32
- map[template.author_text] = template.original_source;
33
- }
34
- }
35
- return map;
36
- }, []);
37
- const resolveIcon = (view) => {
38
- const source = authorSourceMap[view.slug];
39
- return SOURCE_TO_ICON[source] ?? layout;
40
- };
41
- return /* @__PURE__ */ jsx(
42
- DataViewsSidebarContent,
43
- {
44
- postType: TEMPLATE_POST_TYPE,
45
- resolveIcon
46
- }
47
- );
48
- }
49
- export {
50
- DataviewsTemplatesSidebarContent as default
51
- };
52
- //# sourceMappingURL=content-legacy.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/sidebar-navigation-screen-templates-browse/content-legacy.jsx"],
4
- "sourcesContent": ["import { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tcommentAuthorAvatar,\n\tlayout,\n\tplugins as pluginIcon,\n\tglobe,\n} from '@wordpress/icons';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\n\nconst SOURCE_TO_ICON = {\n\tuser: commentAuthorAvatar,\n\ttheme: layout,\n\tplugin: pluginIcon,\n\tsite: globe,\n};\nexport default function DataviewsTemplatesSidebarContent() {\n\tconst authorSourceMap = useSelect( ( select ) => {\n\t\tconst templates = select( coreStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t{ per_page: -1 }\n\t\t);\n\t\tif ( ! templates ) {\n\t\t\treturn {};\n\t\t}\n\t\tconst map = {};\n\t\tfor ( const template of templates ) {\n\t\t\tif (\n\t\t\t\ttemplate.author_text &&\n\t\t\t\ttemplate.original_source &&\n\t\t\t\t! map[ template.author_text ]\n\t\t\t) {\n\t\t\t\tmap[ template.author_text ] = template.original_source;\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}, [] );\n\n\tconst resolveIcon = ( view ) => {\n\t\tconst source = authorSourceMap[ view.slug ];\n\t\treturn SOURCE_TO_ICON[ source ] ?? layout;\n\t};\n\n\treturn (\n\t\t<DataViewsSidebarContent\n\t\t\tpostType={ TEMPLATE_POST_TYPE }\n\t\t\tresolveIcon={ resolveIcon }\n\t\t/>\n\t);\n}\n"],
5
- "mappings": ";AAAA,SAAS,SAAS,iBAAiB;AACnC,SAAS,iBAAiB;AAC1B;AAAA,EACC;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,OACM;AACP,SAAS,0BAA0B;AACnC,OAAO,6BAA6B;AAqClC;AAnCF,IAAM,iBAAiB;AAAA,EACtB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AACP;AACe,SAAR,mCAAoD;AAC1D,QAAM,kBAAkB,UAAW,CAAE,WAAY;AAChD,UAAM,YAAY,OAAQ,SAAU,EAAE;AAAA,MACrC;AAAA,MACA;AAAA,MACA,EAAE,UAAU,GAAG;AAAA,IAChB;AACA,QAAK,CAAE,WAAY;AAClB,aAAO,CAAC;AAAA,IACT;AACA,UAAM,MAAM,CAAC;AACb,eAAY,YAAY,WAAY;AACnC,UACC,SAAS,eACT,SAAS,mBACT,CAAE,IAAK,SAAS,WAAY,GAC3B;AACD,YAAK,SAAS,WAAY,IAAI,SAAS;AAAA,MACxC;AAAA,IACD;AACA,WAAO;AAAA,EACR,GAAG,CAAC,CAAE;AAEN,QAAM,cAAc,CAAE,SAAU;AAC/B,UAAM,SAAS,gBAAiB,KAAK,IAAK;AAC1C,WAAO,eAAgB,MAAO,KAAK;AAAA,EACpC;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,UAAW;AAAA,MACX;AAAA;AAAA,EACD;AAEF;",
6
- "names": []
7
- }
@@ -1,85 +0,0 @@
1
- import { paramCase as kebabCase } from 'change-case';
2
- import { useState, useEffect, useRef } from '@wordpress/element';
3
- import { __ } from '@wordpress/i18n';
4
- import {
5
- Button,
6
- TextControl,
7
- __experimentalHStack as HStack,
8
- __experimentalVStack as VStack,
9
- } from '@wordpress/components';
10
-
11
- function AddCustomGenericTemplateModalContent( { createTemplate, onBack } ) {
12
- const [ title, setTitle ] = useState( '' );
13
- const defaultTitle = __( 'Custom Template' );
14
- const [ isBusy, setIsBusy ] = useState( false );
15
- const inputRef = useRef();
16
-
17
- // Set focus to the name input when the component mounts
18
- useEffect( () => {
19
- if ( inputRef.current ) {
20
- inputRef.current.focus();
21
- }
22
- }, [] );
23
-
24
- async function onCreateTemplate( event ) {
25
- event.preventDefault();
26
- if ( isBusy ) {
27
- return;
28
- }
29
- setIsBusy( true );
30
- try {
31
- await createTemplate(
32
- {
33
- slug:
34
- kebabCase( title || defaultTitle ) ||
35
- 'wp-custom-template',
36
- title: title || defaultTitle,
37
- },
38
- false
39
- );
40
- } finally {
41
- setIsBusy( false );
42
- }
43
- }
44
- return (
45
- <form onSubmit={ onCreateTemplate }>
46
- <VStack spacing={ 6 }>
47
- <TextControl
48
- label={ __( 'Name' ) }
49
- value={ title }
50
- onChange={ setTitle }
51
- placeholder={ defaultTitle }
52
- disabled={ isBusy }
53
- ref={ inputRef }
54
- help={ __(
55
- // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
56
- 'Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.'
57
- ) }
58
- />
59
- <HStack
60
- className="edit-site-custom-generic-template__modal-actions"
61
- justify="right"
62
- >
63
- <Button
64
- __next40pxDefaultSize
65
- variant="tertiary"
66
- onClick={ onBack }
67
- >
68
- { __( 'Back' ) }
69
- </Button>
70
- <Button
71
- __next40pxDefaultSize
72
- variant="primary"
73
- type="submit"
74
- isBusy={ isBusy }
75
- aria-disabled={ isBusy }
76
- >
77
- { __( 'Create' ) }
78
- </Button>
79
- </HStack>
80
- </VStack>
81
- </form>
82
- );
83
- }
84
-
85
- export default AddCustomGenericTemplateModalContent;