@wordpress/edit-site 6.42.0 → 6.43.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/CHANGELOG.md +2 -0
- package/build/components/page-patterns/index.cjs +7 -27
- package/build/components/page-patterns/index.cjs.map +2 -2
- package/build/components/page-templates/index-legacy.cjs +13 -6
- package/build/components/page-templates/index-legacy.cjs.map +2 -2
- package/build/components/post-list/index.cjs +15 -6
- package/build/components/post-list/index.cjs.map +2 -2
- package/build/components/post-list/quick-edit-modal.cjs +16 -48
- package/build/components/post-list/quick-edit-modal.cjs.map +2 -2
- package/build/components/sidebar-dataviews/index.cjs +37 -25
- package/build/components/sidebar-dataviews/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen-patterns/index.cjs +55 -47
- package/build/components/sidebar-navigation-screen-patterns/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.cjs +33 -56
- package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.cjs.map +3 -3
- package/build/components/site-editor-routes/home.cjs +8 -4
- package/build/components/site-editor-routes/home.cjs.map +2 -2
- package/build/components/site-editor-routes/navigation-item.cjs +13 -6
- package/build/components/site-editor-routes/navigation-item.cjs.map +2 -2
- package/build/components/site-editor-routes/navigation.cjs +9 -4
- package/build/components/site-editor-routes/navigation.cjs.map +2 -2
- package/build/components/site-editor-routes/page-item.cjs +13 -6
- package/build/components/site-editor-routes/page-item.cjs.map +2 -2
- package/build/components/site-editor-routes/pages.cjs +21 -7
- package/build/components/site-editor-routes/pages.cjs.map +3 -3
- package/build/components/site-editor-routes/stylebook.cjs +17 -2
- package/build/components/site-editor-routes/stylebook.cjs.map +2 -2
- package/build/components/site-editor-routes/template-item.cjs +13 -6
- package/build/components/site-editor-routes/template-item.cjs.map +2 -2
- package/build/components/site-editor-routes/templates.cjs +20 -7
- package/build/components/site-editor-routes/templates.cjs.map +3 -3
- package/build/components/site-editor-routes/utils.cjs +7 -2
- package/build/components/site-editor-routes/utils.cjs.map +2 -2
- package/build-module/components/page-patterns/index.mjs +8 -30
- package/build-module/components/page-patterns/index.mjs.map +2 -2
- package/build-module/components/page-templates/index-legacy.mjs +14 -11
- package/build-module/components/page-templates/index-legacy.mjs.map +2 -2
- package/build-module/components/post-list/index.mjs +16 -11
- package/build-module/components/post-list/index.mjs.map +2 -2
- package/build-module/components/post-list/quick-edit-modal.mjs +16 -48
- package/build-module/components/post-list/quick-edit-modal.mjs.map +2 -2
- package/build-module/components/sidebar-dataviews/index.mjs +45 -25
- package/build-module/components/sidebar-dataviews/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs +55 -47
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs +41 -59
- package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs.map +2 -2
- package/build-module/components/site-editor-routes/home.mjs +10 -6
- package/build-module/components/site-editor-routes/home.mjs.map +2 -2
- package/build-module/components/site-editor-routes/navigation-item.mjs +14 -7
- package/build-module/components/site-editor-routes/navigation-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/navigation.mjs +10 -5
- package/build-module/components/site-editor-routes/navigation.mjs.map +2 -2
- package/build-module/components/site-editor-routes/page-item.mjs +14 -7
- package/build-module/components/site-editor-routes/page-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/pages.mjs +22 -11
- package/build-module/components/site-editor-routes/pages.mjs.map +2 -2
- package/build-module/components/site-editor-routes/stylebook.mjs +18 -3
- package/build-module/components/site-editor-routes/stylebook.mjs.map +2 -2
- package/build-module/components/site-editor-routes/template-item.mjs +14 -7
- package/build-module/components/site-editor-routes/template-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/templates.mjs +21 -11
- package/build-module/components/site-editor-routes/templates.mjs.map +2 -2
- package/build-module/components/site-editor-routes/utils.mjs +5 -1
- package/build-module/components/site-editor-routes/utils.mjs.map +2 -2
- package/build-style/style-rtl.css +60 -49
- package/build-style/style.css +60 -49
- package/package.json +46 -46
- package/src/components/page-patterns/index.js +9 -30
- package/src/components/page-templates/index-legacy.js +14 -11
- package/src/components/post-list/index.js +16 -10
- package/src/components/post-list/quick-edit-modal.js +19 -54
- package/src/components/post-list/style.scss +2 -0
- package/src/components/sidebar-dataviews/index.js +48 -26
- package/src/components/sidebar-dataviews/style.scss +0 -16
- package/src/components/sidebar-navigation-screen-patterns/index.js +62 -55
- package/src/components/sidebar-navigation-screen-templates-browse/content-legacy.js +44 -64
- package/src/components/site-editor-routes/home.js +9 -5
- package/src/components/site-editor-routes/navigation-item.js +13 -6
- package/src/components/site-editor-routes/navigation.js +9 -4
- package/src/components/site-editor-routes/page-item.js +13 -6
- package/src/components/site-editor-routes/pages.js +21 -10
- package/src/components/site-editor-routes/stylebook.js +12 -3
- package/src/components/site-editor-routes/template-item.js +13 -6
- package/src/components/site-editor-routes/templates.js +21 -10
- package/src/components/site-editor-routes/utils.js +12 -0
- package/build/components/post-list/view-utils.cjs +0 -202
- package/build/components/post-list/view-utils.cjs.map +0 -7
- package/build/components/sidebar-dataviews/dataview-item.cjs +0 -82
- package/build/components/sidebar-dataviews/dataview-item.cjs.map +0 -7
- package/build-module/components/post-list/view-utils.mjs +0 -182
- package/build-module/components/post-list/view-utils.mjs.map +0 -7
- package/build-module/components/sidebar-dataviews/dataview-item.mjs +0 -51
- package/build-module/components/sidebar-dataviews/dataview-item.mjs.map +0 -7
- package/src/components/post-list/view-utils.js +0 -187
- package/src/components/sidebar-dataviews/dataview-item.js +0 -56
package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs
CHANGED
|
@@ -1,69 +1,51 @@
|
|
|
1
1
|
// packages/edit-site/src/components/sidebar-navigation-screen-templates-browse/content-legacy.js
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { layout } from "@wordpress/icons";
|
|
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";
|
|
11
10
|
import { TEMPLATE_POST_TYPE } from "../../utils/constants.mjs";
|
|
12
|
-
import
|
|
13
|
-
import { jsx
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
+
};
|
|
18
41
|
return /* @__PURE__ */ jsx(
|
|
19
|
-
|
|
42
|
+
DataViewsSidebarContent,
|
|
20
43
|
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"aria-current": isActive,
|
|
24
|
-
children: text
|
|
44
|
+
postType: TEMPLATE_POST_TYPE,
|
|
45
|
+
resolveIcon
|
|
25
46
|
}
|
|
26
47
|
);
|
|
27
48
|
}
|
|
28
|
-
function DataviewsTemplatesSidebarContent() {
|
|
29
|
-
const {
|
|
30
|
-
query: { activeView = "all" }
|
|
31
|
-
} = useLocation();
|
|
32
|
-
const { records } = useEntityRecords("postType", TEMPLATE_POST_TYPE, {
|
|
33
|
-
per_page: -1
|
|
34
|
-
});
|
|
35
|
-
const firstItemPerAuthorText = useMemo(() => {
|
|
36
|
-
const firstItemPerAuthor = records?.reduce((acc, template) => {
|
|
37
|
-
const author = template.author_text;
|
|
38
|
-
if (author && !acc[author]) {
|
|
39
|
-
acc[author] = template;
|
|
40
|
-
}
|
|
41
|
-
return acc;
|
|
42
|
-
}, {});
|
|
43
|
-
return (firstItemPerAuthor && Object.values(firstItemPerAuthor)) ?? EMPTY_ARRAY;
|
|
44
|
-
}, [records]);
|
|
45
|
-
return /* @__PURE__ */ jsxs(ItemGroup, { className: "edit-site-sidebar-navigation-screen-templates-browse", children: [
|
|
46
|
-
/* @__PURE__ */ jsx(
|
|
47
|
-
SidebarNavigationItem,
|
|
48
|
-
{
|
|
49
|
-
to: "/template",
|
|
50
|
-
icon: layout,
|
|
51
|
-
"aria-current": activeView === "all",
|
|
52
|
-
children: __("All templates")
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
firstItemPerAuthorText.map((template) => {
|
|
56
|
-
return /* @__PURE__ */ jsx(
|
|
57
|
-
TemplateDataviewItem,
|
|
58
|
-
{
|
|
59
|
-
template,
|
|
60
|
-
isActive: activeView === template.author_text
|
|
61
|
-
},
|
|
62
|
-
template.author_text
|
|
63
|
-
);
|
|
64
|
-
})
|
|
65
|
-
] });
|
|
66
|
-
}
|
|
67
49
|
export {
|
|
68
50
|
DataviewsTemplatesSidebarContent as default
|
|
69
51
|
};
|
package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/sidebar-navigation-screen-templates-browse/content-legacy.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {
|
|
5
|
-
"mappings": ";AAGA,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { 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';\n\n/**\n * Internal dependencies\n */\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": ";AAGA,SAAS,SAAS,iBAAiB;AACnC,SAAS,iBAAiB;AAC1B;AAAA,EACC;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,OACM;AAKP,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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,23 +2,27 @@
|
|
|
2
2
|
import SidebarNavigationScreenMain from "../sidebar-navigation-screen-main/index.mjs";
|
|
3
3
|
import SidebarNavigationScreenUnsupported from "../sidebar-navigation-screen-unsupported/index.mjs";
|
|
4
4
|
import Editor from "../editor/index.mjs";
|
|
5
|
-
import { isClassicThemeWithStyleBookSupport } from "./utils.mjs";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { isClassicThemeWithStyleBookSupport, isThemeDataLoaded } from "./utils.mjs";
|
|
6
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
7
7
|
var homeRoute = {
|
|
8
8
|
name: "home",
|
|
9
9
|
path: "/",
|
|
10
10
|
areas: {
|
|
11
11
|
sidebar({ siteData }) {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return siteData.currentTheme.is_block_theme || isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ jsx(SidebarNavigationScreenMain, {}) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
14
16
|
},
|
|
15
17
|
preview({ siteData }) {
|
|
16
18
|
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
17
19
|
return isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ jsx(Editor, { isHomeRoute: true }) : void 0;
|
|
18
20
|
},
|
|
19
21
|
mobile({ siteData }) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
23
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
24
|
+
}
|
|
25
|
+
return siteData.currentTheme.is_block_theme || isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ jsx(SidebarNavigationScreenMain, {}) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/home.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport Editor from '../editor';\nimport { isClassicThemeWithStyleBookSupport } from './utils';\n\nexport const homeRoute = {\n\tname: 'home',\n\tpath: '/',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\
|
|
5
|
-
"mappings": ";AAGA,OAAO,iCAAiC;AACxC,OAAO,wCAAwC;AAC/C,OAAO,YAAY;AACnB,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport Editor from '../editor';\nimport { isClassicThemeWithStyleBookSupport, isThemeDataLoaded } from './utils';\n\nexport const homeRoute = {\n\tname: 'home',\n\tpath: '/',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ||\n\t\t\t\tisClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<SidebarNavigationScreenMain />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tpreview( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ||\n\t\t\t\tisClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<Editor isHomeRoute />\n\t\t\t) : undefined;\n\t\t},\n\t\tmobile( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn <></>;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ||\n\t\t\t\tisClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<SidebarNavigationScreenMain />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,iCAAiC;AACxC,OAAO,wCAAwC;AAC/C,OAAO,YAAY;AACnB,SAAS,oCAAoC,yBAAyB;AAYlE,SAcO,UAdP;AAVG,IAAM,YAAY;AAAA,EACxB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,kBAC5B,mCAAoC,QAAS,IAC7C,oBAAC,+BAA4B,IAE7B,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,aAAO,gBACN,mCAAoC,QAAS,IAC7C,oBAAC,UAAO,aAAW,MAAC,IACjB;AAAA,IACL;AAAA,IACA,OAAQ,EAAE,SAAS,GAAI;AACtB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO,gCAAE;AAAA,MACV;AACA,aAAO,SAAS,aAAa,kBAC5B,mCAAoC,QAAS,IAC7C,oBAAC,+BAA4B,IAE7B,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,7 +4,8 @@ import Editor from "../editor/index.mjs";
|
|
|
4
4
|
import SidebarNavigationScreenNavigationMenu from "../sidebar-navigation-screen-navigation-menu/index.mjs";
|
|
5
5
|
import SidebarNavigationScreenUnsupported from "../sidebar-navigation-screen-unsupported/index.mjs";
|
|
6
6
|
import { unlock } from "../../lock-unlock.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { isThemeDataLoaded } from "./utils.mjs";
|
|
8
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
8
9
|
var { useLocation } = unlock(routerPrivateApis);
|
|
9
10
|
function MobileNavigationItemView() {
|
|
10
11
|
const { query = {} } = useLocation();
|
|
@@ -16,16 +17,22 @@ var navigationItemRoute = {
|
|
|
16
17
|
path: "/wp_navigation/:postId",
|
|
17
18
|
areas: {
|
|
18
19
|
sidebar({ siteData }) {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(SidebarNavigationScreenNavigationMenu, { backPath: "/navigation" }) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
21
24
|
},
|
|
22
25
|
preview({ siteData }) {
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(Editor, {}) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
25
30
|
},
|
|
26
31
|
mobile({ siteData }) {
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
33
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
34
|
+
}
|
|
35
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(MobileNavigationItemView, {}) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
29
36
|
}
|
|
30
37
|
}
|
|
31
38
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/navigation-item.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction MobileNavigationItemView() {\n\tconst { query = {} } = useLocation();\n\tconst { canvas = 'view' } = query;\n\n\treturn canvas === 'edit' ? (\n\t\t<Editor />\n\t) : (\n\t\t<SidebarNavigationScreenNavigationMenu backPath=\"/navigation\" />\n\t);\n}\n\nexport const navigationItemRoute = {\n\tname: 'navigation-item',\n\tpath: '/wp_navigation/:postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\
|
|
5
|
-
"mappings": ";AAGA,SAAS,eAAe,yBAAyB;AAKjD,OAAO,YAAY;AACnB,OAAO,2CAA2C;AAClD,OAAO,wCAAwC;AAC/C,SAAS,cAAc;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { unlock } from '../../lock-unlock';\nimport { isThemeDataLoaded } from './utils';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction MobileNavigationItemView() {\n\tconst { query = {} } = useLocation();\n\tconst { canvas = 'view' } = query;\n\n\treturn canvas === 'edit' ? (\n\t\t<Editor />\n\t) : (\n\t\t<SidebarNavigationScreenNavigationMenu backPath=\"/navigation\" />\n\t);\n}\n\nexport const navigationItemRoute = {\n\tname: 'navigation-item',\n\tpath: '/wp_navigation/:postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreenNavigationMenu backPath=\"/navigation\" />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tpreview( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<Editor />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tmobile( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn <></>;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<MobileNavigationItemView />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,eAAe,yBAAyB;AAKjD,OAAO,YAAY;AACnB,OAAO,2CAA2C;AAClD,OAAO,wCAAwC;AAC/C,SAAS,cAAc;AACvB,SAAS,yBAAyB;AAShC,SAgCS,UAhCT;AAPF,IAAM,EAAE,YAAY,IAAI,OAAQ,iBAAkB;AAElD,SAAS,2BAA2B;AACnC,QAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,YAAY;AACnC,QAAM,EAAE,SAAS,OAAO,IAAI;AAE5B,SAAO,WAAW,SACjB,oBAAC,UAAO,IAER,oBAAC,yCAAsC,UAAS,eAAc;AAEhE;AAEO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B,oBAAC,yCAAsC,UAAS,eAAc,IAE9D,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B,oBAAC,UAAO,IAER,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,IACA,OAAQ,EAAE,SAAS,GAAI;AACtB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO,gCAAE;AAAA,MACV;AACA,aAAO,SAAS,aAAa,iBAC5B,oBAAC,4BAAyB,IAE1B,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,7 +4,8 @@ import Editor from "../editor/index.mjs";
|
|
|
4
4
|
import SidebarNavigationScreenNavigationMenus from "../sidebar-navigation-screen-navigation-menus/index.mjs";
|
|
5
5
|
import SidebarNavigationScreenUnsupported from "../sidebar-navigation-screen-unsupported/index.mjs";
|
|
6
6
|
import { unlock } from "../../lock-unlock.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { isThemeDataLoaded } from "./utils.mjs";
|
|
8
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
8
9
|
var { useLocation } = unlock(routerPrivateApis);
|
|
9
10
|
function MobileNavigationView() {
|
|
10
11
|
const { query = {} } = useLocation();
|
|
@@ -16,16 +17,20 @@ var navigationRoute = {
|
|
|
16
17
|
path: "/navigation",
|
|
17
18
|
areas: {
|
|
18
19
|
sidebar({ siteData }) {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(SidebarNavigationScreenNavigationMenus, { backPath: "/" }) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
21
24
|
},
|
|
22
25
|
preview({ siteData }) {
|
|
23
26
|
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
24
27
|
return isBlockTheme ? /* @__PURE__ */ jsx(Editor, {}) : void 0;
|
|
25
28
|
},
|
|
26
29
|
mobile({ siteData }) {
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
31
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
32
|
+
}
|
|
33
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(MobileNavigationView, {}) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
29
34
|
}
|
|
30
35
|
}
|
|
31
36
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/navigation.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction MobileNavigationView() {\n\tconst { query = {} } = useLocation();\n\tconst { canvas = 'view' } = query;\n\n\treturn canvas === 'edit' ? (\n\t\t<Editor />\n\t) : (\n\t\t<SidebarNavigationScreenNavigationMenus backPath=\"/\" />\n\t);\n}\n\nexport const navigationRoute = {\n\tname: 'navigation',\n\tpath: '/navigation',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\
|
|
5
|
-
"mappings": ";AAGA,SAAS,eAAe,yBAAyB;AAKjD,OAAO,YAAY;AACnB,OAAO,4CAA4C;AACnD,OAAO,wCAAwC;AAC/C,SAAS,cAAc;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { unlock } from '../../lock-unlock';\nimport { isThemeDataLoaded } from './utils';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction MobileNavigationView() {\n\tconst { query = {} } = useLocation();\n\tconst { canvas = 'view' } = query;\n\n\treturn canvas === 'edit' ? (\n\t\t<Editor />\n\t) : (\n\t\t<SidebarNavigationScreenNavigationMenus backPath=\"/\" />\n\t);\n}\n\nexport const navigationRoute = {\n\tname: 'navigation',\n\tpath: '/navigation',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreenNavigationMenus backPath=\"/\" />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tpreview( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? <Editor /> : undefined;\n\t\t},\n\t\tmobile( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn <></>;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<MobileNavigationView />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,eAAe,yBAAyB;AAKjD,OAAO,YAAY;AACnB,OAAO,4CAA4C;AACnD,OAAO,wCAAwC;AAC/C,SAAS,cAAc;AACvB,SAAS,yBAAyB;AAShC,SA0BS,UA1BT;AAPF,IAAM,EAAE,YAAY,IAAI,OAAQ,iBAAkB;AAElD,SAAS,uBAAuB;AAC/B,QAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,YAAY;AACnC,QAAM,EAAE,SAAS,OAAO,IAAI;AAE5B,SAAO,WAAW,SACjB,oBAAC,UAAO,IAER,oBAAC,0CAAuC,UAAS,KAAI;AAEvD;AAEO,IAAM,kBAAkB;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B,oBAAC,0CAAuC,UAAS,KAAI,IAErD,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,aAAO,eAAe,oBAAC,UAAO,IAAK;AAAA,IACpC;AAAA,IACA,OAAQ,EAAE,SAAS,GAAI;AACtB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO,gCAAE;AAAA,MACV;AACA,aAAO,SAAS,aAAa,iBAC5B,oBAAC,wBAAqB,IAEtB,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,14 +4,17 @@ import Editor from "../editor/index.mjs";
|
|
|
4
4
|
import DataViewsSidebarContent from "../sidebar-dataviews/index.mjs";
|
|
5
5
|
import SidebarNavigationScreen from "../sidebar-navigation-screen/index.mjs";
|
|
6
6
|
import SidebarNavigationScreenUnsupported from "../sidebar-navigation-screen-unsupported/index.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { isThemeDataLoaded } from "./utils.mjs";
|
|
8
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
8
9
|
var pageItemRoute = {
|
|
9
10
|
name: "page-item",
|
|
10
11
|
path: "/page/:postId",
|
|
11
12
|
areas: {
|
|
12
13
|
sidebar({ siteData }) {
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(
|
|
15
18
|
SidebarNavigationScreen,
|
|
16
19
|
{
|
|
17
20
|
title: __("Pages"),
|
|
@@ -21,12 +24,16 @@ var pageItemRoute = {
|
|
|
21
24
|
) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
22
25
|
},
|
|
23
26
|
mobile({ siteData }) {
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
28
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
29
|
+
}
|
|
30
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(Editor, {}) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
26
31
|
},
|
|
27
32
|
preview({ siteData }) {
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(Editor, {}) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
30
37
|
}
|
|
31
38
|
}
|
|
32
39
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/page-item.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\n\nexport const pageItemRoute = {\n\tname: 'page-item',\n\tpath: '/page/:postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\
|
|
5
|
-
"mappings": ";AAGA,SAAS,UAAU;AAKnB,OAAO,YAAY;AACnB,OAAO,6BAA6B;AACpC,OAAO,6BAA6B;AACpC,OAAO,wCAAwC;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { isThemeDataLoaded } from './utils';\n\nexport const pageItemRoute = {\n\tname: 'page-item',\n\tpath: '/page/:postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\ttitle={ __( 'Pages' ) }\n\t\t\t\t\tbackPath=\"/\"\n\t\t\t\t\tcontent={ <DataViewsSidebarContent postType=\"page\" /> }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tmobile( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn <></>;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<Editor />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tpreview( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<Editor />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,UAAU;AAKnB,OAAO,YAAY;AACnB,OAAO,6BAA6B;AACpC,OAAO,6BAA6B;AACpC,OAAO,wCAAwC;AAC/C,SAAS,yBAAyB;AAcnB,SAQJ,UARI;AAZR,IAAM,gBAAgB;AAAA,EAC5B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B;AAAA,QAAC;AAAA;AAAA,UACA,OAAQ,GAAI,OAAQ;AAAA,UACpB,UAAS;AAAA,UACT,SAAU,oBAAC,2BAAwB,UAAS,QAAO;AAAA;AAAA,MACpD,IAEA,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,IACA,OAAQ,EAAE,SAAS,GAAI;AACtB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO,gCAAE;AAAA,MACV;AACA,aAAO,SAAS,aAAa,iBAC5B,oBAAC,UAAO,IAER,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B,oBAAC,UAAO,IAER,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// packages/edit-site/src/components/site-editor-routes/pages.js
|
|
2
2
|
import { privateApis as routerPrivateApis } from "@wordpress/router";
|
|
3
3
|
import { __ } from "@wordpress/i18n";
|
|
4
|
+
import { resolveSelect } from "@wordpress/data";
|
|
5
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
4
6
|
import { loadView } from "@wordpress/views";
|
|
5
7
|
import Editor from "../editor/index.mjs";
|
|
6
8
|
import SidebarNavigationScreen from "../sidebar-navigation-screen/index.mjs";
|
|
@@ -8,20 +10,25 @@ import SidebarNavigationScreenUnsupported from "../sidebar-navigation-screen-uns
|
|
|
8
10
|
import DataViewsSidebarContent from "../sidebar-dataviews/index.mjs";
|
|
9
11
|
import PostList from "../post-list/index.mjs";
|
|
10
12
|
import { unlock } from "../../lock-unlock.mjs";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
getActiveViewOverridesForTab
|
|
14
|
-
} from "../post-list/view-utils.mjs";
|
|
15
|
-
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
import { isThemeDataLoaded } from "./utils.mjs";
|
|
14
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
16
15
|
var { useLocation } = unlock(routerPrivateApis);
|
|
17
16
|
async function isListView(query) {
|
|
18
17
|
const { activeView = "all" } = query;
|
|
18
|
+
const config = await unlock(resolveSelect(coreStore)).getViewConfig(
|
|
19
|
+
"postType",
|
|
20
|
+
"page"
|
|
21
|
+
);
|
|
22
|
+
const defaultView = config?.default_view;
|
|
23
|
+
const defaultLayouts = config?.default_layouts;
|
|
24
|
+
const viewEntry = config?.view_list?.find((v) => v.slug === activeView);
|
|
19
25
|
const view = await loadView({
|
|
20
26
|
kind: "postType",
|
|
21
27
|
name: "page",
|
|
22
28
|
slug: "default",
|
|
23
|
-
defaultView
|
|
24
|
-
|
|
29
|
+
defaultView,
|
|
30
|
+
defaultLayouts,
|
|
31
|
+
activeViewOverrides: viewEntry?.view ?? {}
|
|
25
32
|
});
|
|
26
33
|
return view.type === "list";
|
|
27
34
|
}
|
|
@@ -35,8 +42,10 @@ var pagesRoute = {
|
|
|
35
42
|
path: "/page",
|
|
36
43
|
areas: {
|
|
37
44
|
sidebar({ siteData }) {
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(
|
|
40
49
|
SidebarNavigationScreen,
|
|
41
50
|
{
|
|
42
51
|
title: __("Pages"),
|
|
@@ -58,8 +67,10 @@ var pagesRoute = {
|
|
|
58
67
|
return isList ? /* @__PURE__ */ jsx(Editor, {}) : void 0;
|
|
59
68
|
},
|
|
60
69
|
mobile({ siteData }) {
|
|
61
|
-
|
|
62
|
-
|
|
70
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
71
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
72
|
+
}
|
|
73
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(MobilePagesView, {}) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
63
74
|
}
|
|
64
75
|
},
|
|
65
76
|
widths: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/pages.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { __ } from '@wordpress/i18n';\nimport { loadView } from '@wordpress/views';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport PostList from '../post-list';\nimport { unlock } from '../../lock-unlock';\nimport {
|
|
5
|
-
"mappings": ";AAGA,SAAS,eAAe,yBAAyB;AACjD,SAAS,UAAU;AACnB,SAAS,gBAAgB;AAKzB,OAAO,YAAY;AACnB,OAAO,6BAA6B;AACpC,OAAO,wCAAwC;AAC/C,OAAO,6BAA6B;AACpC,OAAO,cAAc;AACrB,SAAS,cAAc;AACvB
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { __ } from '@wordpress/i18n';\nimport { resolveSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { loadView } from '@wordpress/views';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport PostList from '../post-list';\nimport { unlock } from '../../lock-unlock';\nimport { isThemeDataLoaded } from './utils';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nasync function isListView( query ) {\n\tconst { activeView = 'all' } = query;\n\tconst config = await unlock( resolveSelect( coreStore ) ).getViewConfig(\n\t\t'postType',\n\t\t'page'\n\t);\n\tconst defaultView = config?.default_view;\n\tconst defaultLayouts = config?.default_layouts;\n\tconst viewEntry = config?.view_list?.find( ( v ) => v.slug === activeView );\n\tconst view = await loadView( {\n\t\tkind: 'postType',\n\t\tname: 'page',\n\t\tslug: 'default',\n\t\tdefaultView,\n\t\tdefaultLayouts,\n\t\tactiveViewOverrides: viewEntry?.view ?? {},\n\t} );\n\treturn view.type === 'list';\n}\n\nfunction MobilePagesView() {\n\tconst { query = {} } = useLocation();\n\tconst { canvas = 'view' } = query;\n\n\treturn canvas === 'edit' ? <Editor /> : <PostList postType=\"page\" />;\n}\n\nexport const pagesRoute = {\n\tname: 'pages',\n\tpath: '/page',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\ttitle={ __( 'Pages' ) }\n\t\t\t\t\tbackPath=\"/\"\n\t\t\t\t\tcontent={ <DataViewsSidebarContent postType=\"page\" /> }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tcontent( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? <PostList postType=\"page\" /> : undefined;\n\t\t},\n\t\tasync preview( { query, siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tif ( ! isBlockTheme ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst isList = await isListView( query );\n\t\t\treturn isList ? <Editor /> : undefined;\n\t\t},\n\t\tmobile( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn <></>;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<MobilePagesView />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t},\n\twidths: {\n\t\tasync content( { query } ) {\n\t\t\tconst isList = await isListView( query );\n\t\t\treturn isList ? 380 : undefined;\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,eAAe,yBAAyB;AACjD,SAAS,UAAU;AACnB,SAAS,qBAAqB;AAC9B,SAAS,SAAS,iBAAiB;AACnC,SAAS,gBAAgB;AAKzB,OAAO,YAAY;AACnB,OAAO,6BAA6B;AACpC,OAAO,wCAAwC;AAC/C,OAAO,6BAA6B;AACpC,OAAO,cAAc;AACrB,SAAS,cAAc;AACvB,SAAS,yBAAyB;AA4BN,SAmCjB,UAnCiB;AA1B5B,IAAM,EAAE,YAAY,IAAI,OAAQ,iBAAkB;AAElD,eAAe,WAAY,OAAQ;AAClC,QAAM,EAAE,aAAa,MAAM,IAAI;AAC/B,QAAM,SAAS,MAAM,OAAQ,cAAe,SAAU,CAAE,EAAE;AAAA,IACzD;AAAA,IACA;AAAA,EACD;AACA,QAAM,cAAc,QAAQ;AAC5B,QAAM,iBAAiB,QAAQ;AAC/B,QAAM,YAAY,QAAQ,WAAW,KAAM,CAAE,MAAO,EAAE,SAAS,UAAW;AAC1E,QAAM,OAAO,MAAM,SAAU;AAAA,IAC5B,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,qBAAqB,WAAW,QAAQ,CAAC;AAAA,EAC1C,CAAE;AACF,SAAO,KAAK,SAAS;AACtB;AAEA,SAAS,kBAAkB;AAC1B,QAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,YAAY;AACnC,QAAM,EAAE,SAAS,OAAO,IAAI;AAE5B,SAAO,WAAW,SAAS,oBAAC,UAAO,IAAK,oBAAC,YAAS,UAAS,QAAO;AACnE;AAEO,IAAM,aAAa;AAAA,EACzB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B;AAAA,QAAC;AAAA;AAAA,UACA,OAAQ,GAAI,OAAQ;AAAA,UACpB,UAAS;AAAA,UACT,SAAU,oBAAC,2BAAwB,UAAS,QAAO;AAAA;AAAA,MACpD,IAEA,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,aAAO,eAAe,oBAAC,YAAS,UAAS,QAAO,IAAK;AAAA,IACtD;AAAA,IACA,MAAM,QAAS,EAAE,OAAO,SAAS,GAAI;AACpC,YAAM,eAAe,SAAS,cAAc;AAC5C,UAAK,CAAE,cAAe;AACrB,eAAO;AAAA,MACR;AACA,YAAM,SAAS,MAAM,WAAY,KAAM;AACvC,aAAO,SAAS,oBAAC,UAAO,IAAK;AAAA,IAC9B;AAAA,IACA,OAAQ,EAAE,SAAS,GAAI;AACtB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO,gCAAE;AAAA,MACV;AACA,aAAO,SAAS,aAAa,iBAC5B,oBAAC,mBAAgB,IAEjB,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,EACD;AAAA,EACA,QAAQ;AAAA,IACP,MAAM,QAAS,EAAE,MAAM,GAAI;AAC1B,YAAM,SAAS,MAAM,WAAY,KAAM;AACvC,aAAO,SAAS,MAAM;AAAA,IACvB;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,7 +4,7 @@ import { privateApis as editorPrivateApis } from "@wordpress/editor";
|
|
|
4
4
|
import SidebarNavigationScreen from "../sidebar-navigation-screen/index.mjs";
|
|
5
5
|
import SidebarNavigationScreenUnsupported from "../sidebar-navigation-screen-unsupported/index.mjs";
|
|
6
6
|
import { unlock } from "../../lock-unlock.mjs";
|
|
7
|
-
import { isClassicThemeWithStyleBookSupport } from "./utils.mjs";
|
|
7
|
+
import { isClassicThemeWithStyleBookSupport, isThemeDataLoaded } from "./utils.mjs";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
var { StyleBookPreview } = unlock(editorPrivateApis);
|
|
10
10
|
var stylebookRoute = {
|
|
@@ -12,6 +12,9 @@ var stylebookRoute = {
|
|
|
12
12
|
path: "/stylebook",
|
|
13
13
|
areas: {
|
|
14
14
|
sidebar({ siteData }) {
|
|
15
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
15
18
|
return isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ jsx(
|
|
16
19
|
SidebarNavigationScreen,
|
|
17
20
|
{
|
|
@@ -24,10 +27,22 @@ var stylebookRoute = {
|
|
|
24
27
|
) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
25
28
|
},
|
|
26
29
|
preview({ siteData }) {
|
|
27
|
-
return isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ jsx(
|
|
30
|
+
return isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ jsx(
|
|
31
|
+
StyleBookPreview,
|
|
32
|
+
{
|
|
33
|
+
isStatic: true,
|
|
34
|
+
settings: siteData.editorSettings
|
|
35
|
+
}
|
|
36
|
+
) : void 0;
|
|
28
37
|
},
|
|
29
38
|
mobile({ siteData }) {
|
|
30
|
-
return isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ jsx(
|
|
39
|
+
return isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ jsx(
|
|
40
|
+
StyleBookPreview,
|
|
41
|
+
{
|
|
42
|
+
isStatic: true,
|
|
43
|
+
settings: siteData.editorSettings
|
|
44
|
+
}
|
|
45
|
+
) : void 0;
|
|
31
46
|
}
|
|
32
47
|
}
|
|
33
48
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/stylebook.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { unlock } from '../../lock-unlock';\nimport { isClassicThemeWithStyleBookSupport } from './utils';\n\nconst { StyleBookPreview } = unlock( editorPrivateApis );\n\nexport const stylebookRoute = {\n\tname: 'stylebook',\n\tpath: '/stylebook',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\t\tbackPath=\"/\"\n\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t`Preview your website's visual identity: colors, typography, and blocks.`\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tpreview( { siteData } ) {\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<StyleBookPreview
|
|
5
|
-
"mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,eAAe,yBAAyB;AAKjD,OAAO,6BAA6B;AACpC,OAAO,wCAAwC;AAC/C,SAAS,cAAc;AACvB,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { unlock } from '../../lock-unlock';\nimport { isClassicThemeWithStyleBookSupport, isThemeDataLoaded } from './utils';\n\nconst { StyleBookPreview } = unlock( editorPrivateApis );\n\nexport const stylebookRoute = {\n\tname: 'stylebook',\n\tpath: '/stylebook',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\t\tbackPath=\"/\"\n\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t`Preview your website's visual identity: colors, typography, and blocks.`\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tpreview( { siteData } ) {\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<StyleBookPreview\n\t\t\t\t\tisStatic\n\t\t\t\t\tsettings={ siteData.editorSettings }\n\t\t\t\t/>\n\t\t\t) : undefined;\n\t\t},\n\t\tmobile( { siteData } ) {\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<StyleBookPreview\n\t\t\t\t\tisStatic\n\t\t\t\t\tsettings={ siteData.editorSettings }\n\t\t\t\t/>\n\t\t\t) : undefined;\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,eAAe,yBAAyB;AAKjD,OAAO,6BAA6B;AACpC,OAAO,wCAAwC;AAC/C,SAAS,cAAc;AACvB,SAAS,oCAAoC,yBAAyB;AAalE;AAXJ,IAAM,EAAE,iBAAiB,IAAI,OAAQ,iBAAkB;AAEhD,IAAM,iBAAiB;AAAA,EAC7B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,mCAAoC,QAAS,IACnD;AAAA,QAAC;AAAA;AAAA,UACA,OAAQ,GAAI,QAAS;AAAA,UACrB,UAAS;AAAA,UACT,aAAc;AAAA,YACb;AAAA,UACD;AAAA;AAAA,MACD,IAEA,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,aAAO,mCAAoC,QAAS,IACnD;AAAA,QAAC;AAAA;AAAA,UACA,UAAQ;AAAA,UACR,UAAW,SAAS;AAAA;AAAA,MACrB,IACG;AAAA,IACL;AAAA,IACA,OAAQ,EAAE,SAAS,GAAI;AACtB,aAAO,mCAAoC,QAAS,IACnD;AAAA,QAAC;AAAA;AAAA,UACA,UAAQ;AAAA,UACR,UAAW,SAAS;AAAA;AAAA,MACrB,IACG;AAAA,IACL;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,19 +2,26 @@
|
|
|
2
2
|
import Editor from "../editor/index.mjs";
|
|
3
3
|
import SidebarNavigationScreenTemplatesBrowse from "../sidebar-navigation-screen-templates-browse/index.mjs";
|
|
4
4
|
import SidebarNavigationScreenUnsupported from "../sidebar-navigation-screen-unsupported/index.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { isThemeDataLoaded } from "./utils.mjs";
|
|
6
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
7
|
var areas = {
|
|
7
8
|
sidebar({ siteData }) {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(SidebarNavigationScreenTemplatesBrowse, { backPath: "/" }) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
10
13
|
},
|
|
11
14
|
mobile({ siteData }) {
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
16
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
17
|
+
}
|
|
18
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(Editor, {}) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
14
19
|
},
|
|
15
20
|
preview({ siteData }) {
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
if (!isThemeDataLoaded(siteData)) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ jsx(Editor, {}) : /* @__PURE__ */ jsx(SidebarNavigationScreenUnsupported, {});
|
|
18
25
|
}
|
|
19
26
|
};
|
|
20
27
|
var templateItemRoute = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/template-item.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\n\nconst areas = {\n\tsidebar( { siteData } ) {\n\t\
|
|
5
|
-
"mappings": ";AAGA,OAAO,YAAY;AACnB,OAAO,4CAA4C;AACnD,OAAO,wCAAwC;
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { isThemeDataLoaded } from './utils';\n\nconst areas = {\n\tsidebar( { siteData } ) {\n\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t<SidebarNavigationScreenTemplatesBrowse backPath=\"/\" />\n\t\t) : (\n\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t);\n\t},\n\tmobile( { siteData } ) {\n\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\treturn <></>;\n\t\t}\n\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t<Editor />\n\t\t) : (\n\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t);\n\t},\n\tpreview( { siteData } ) {\n\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t<Editor />\n\t\t) : (\n\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t);\n\t},\n};\n\nexport const templateItemRoute = {\n\tname: 'template-item',\n\tpath: '/wp_template/*postId',\n\tareas,\n};\n"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,YAAY;AACnB,OAAO,4CAA4C;AACnD,OAAO,wCAAwC;AAC/C,SAAS,yBAAyB;AAQ/B,SAOO,UAPP;AANH,IAAM,QAAQ;AAAA,EACb,QAAS,EAAE,SAAS,GAAI;AACvB,QAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,aAAO;AAAA,IACR;AACA,WAAO,SAAS,aAAa,iBAC5B,oBAAC,0CAAuC,UAAS,KAAI,IAErD,oBAAC,sCAAmC;AAAA,EAEtC;AAAA,EACA,OAAQ,EAAE,SAAS,GAAI;AACtB,QAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,aAAO,gCAAE;AAAA,IACV;AACA,WAAO,SAAS,aAAa,iBAC5B,oBAAC,UAAO,IAER,oBAAC,sCAAmC;AAAA,EAEtC;AAAA,EACA,QAAS,EAAE,SAAS,GAAI;AACvB,QAAK,CAAE,kBAAmB,QAAS,GAAI;AACtC,aAAO;AAAA,IACR;AACA,WAAO,SAAS,aAAa,iBAC5B,oBAAC,UAAO,IAER,oBAAC,sCAAmC;AAAA,EAEtC;AACD;AAEO,IAAM,oBAAoB;AAAA,EAChC,MAAM;AAAA,EACN,MAAM;AAAA,EACN;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|