@wordpress/edit-site 6.19.0 → 6.20.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/add-new-template/utils.js +1 -1
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +19 -2
- package/build/components/app/index.js.map +1 -1
- package/build/components/editor/site-preview.js +9 -10
- package/build/components/editor/site-preview.js.map +1 -1
- package/build/components/editor/use-editor-title.js +3 -2
- package/build/components/editor/use-editor-title.js.map +1 -1
- package/build/components/global-styles/shadows-panel.js +19 -23
- package/build/components/global-styles/shadows-panel.js.map +1 -1
- package/build/components/layout/index.js +23 -15
- package/build/components/layout/index.js.map +1 -1
- package/build/components/page-patterns/header.js +1 -1
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +3 -2
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/sidebar/index.js +17 -11
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +28 -30
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +1 -0
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build/components/sidebar-navigation-screen-unsupported/index.js +24 -0
- package/build/components/sidebar-navigation-screen-unsupported/index.js.map +1 -0
- package/build/components/site-editor-routes/home.js +22 -5
- package/build/components/site-editor-routes/home.js.map +1 -1
- package/build/components/site-editor-routes/navigation-item.js +21 -5
- package/build/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build/components/site-editor-routes/navigation.js +21 -5
- package/build/components/site-editor-routes/navigation.js.map +1 -1
- package/build/components/site-editor-routes/page-item.js +25 -9
- package/build/components/site-editor-routes/page-item.js.map +1 -1
- package/build/components/site-editor-routes/pages.js +32 -11
- package/build/components/site-editor-routes/pages.js.map +1 -1
- package/build/components/site-editor-routes/pattern-item.js +10 -3
- package/build/components/site-editor-routes/pattern-item.js.map +1 -1
- package/build/components/site-editor-routes/patterns.js +23 -24
- package/build/components/site-editor-routes/patterns.js.map +1 -1
- package/build/components/site-editor-routes/stylebook.js +25 -11
- package/build/components/site-editor-routes/stylebook.js.map +1 -1
- package/build/components/site-editor-routes/template-item.js +21 -5
- package/build/components/site-editor-routes/template-item.js.map +1 -1
- package/build/components/site-editor-routes/templates.js +27 -6
- package/build/components/site-editor-routes/templates.js.map +1 -1
- package/build/components/site-editor-routes/utils.js +20 -0
- package/build/components/site-editor-routes/utils.js.map +1 -0
- package/build/components/site-hub/index.js +37 -15
- package/build/components/site-hub/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +1 -1
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +20 -3
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/editor/site-preview.js +9 -10
- package/build-module/components/editor/site-preview.js.map +1 -1
- package/build-module/components/editor/use-editor-title.js +3 -2
- package/build-module/components/editor/use-editor-title.js.map +1 -1
- package/build-module/components/global-styles/shadows-panel.js +20 -24
- package/build-module/components/global-styles/shadows-panel.js.map +1 -1
- package/build-module/components/layout/index.js +22 -14
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/page-patterns/header.js +1 -1
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +3 -2
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/sidebar/index.js +15 -10
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +28 -30
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js +17 -0
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js.map +1 -0
- package/build-module/components/site-editor-routes/home.js +22 -5
- package/build-module/components/site-editor-routes/home.js.map +1 -1
- package/build-module/components/site-editor-routes/navigation-item.js +21 -5
- package/build-module/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build-module/components/site-editor-routes/navigation.js +21 -5
- package/build-module/components/site-editor-routes/navigation.js.map +1 -1
- package/build-module/components/site-editor-routes/page-item.js +25 -9
- package/build-module/components/site-editor-routes/page-item.js.map +1 -1
- package/build-module/components/site-editor-routes/pages.js +32 -11
- package/build-module/components/site-editor-routes/pages.js.map +1 -1
- package/build-module/components/site-editor-routes/pattern-item.js +10 -3
- package/build-module/components/site-editor-routes/pattern-item.js.map +1 -1
- package/build-module/components/site-editor-routes/patterns.js +23 -24
- package/build-module/components/site-editor-routes/patterns.js.map +1 -1
- package/build-module/components/site-editor-routes/stylebook.js +25 -11
- package/build-module/components/site-editor-routes/stylebook.js.map +1 -1
- package/build-module/components/site-editor-routes/template-item.js +21 -5
- package/build-module/components/site-editor-routes/template-item.js.map +1 -1
- package/build-module/components/site-editor-routes/templates.js +27 -6
- package/build-module/components/site-editor-routes/templates.js.map +1 -1
- package/build-module/components/site-editor-routes/utils.js +14 -0
- package/build-module/components/site-editor-routes/utils.js.map +1 -0
- package/build-module/components/site-hub/index.js +37 -15
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-style/posts-rtl.css +7 -10
- package/build-style/posts.css +7 -10
- package/build-style/style-rtl.css +7 -11
- package/build-style/style.css +7 -11
- package/package.json +42 -42
- package/src/components/add-new-template/utils.js +1 -2
- package/src/components/app/index.js +18 -3
- package/src/components/editor/site-preview.js +9 -15
- package/src/components/editor/use-editor-title.js +6 -6
- package/src/components/global-styles/shadows-panel.js +25 -31
- package/src/components/global-styles/style.scss +0 -1
- package/src/components/layout/index.js +36 -22
- package/src/components/layout/style.scss +2 -0
- package/src/components/page/style.scss +1 -5
- package/src/components/page-patterns/header.js +1 -1
- package/src/components/page-patterns/use-patterns.js +7 -7
- package/src/components/sidebar/index.js +15 -13
- package/src/components/sidebar-navigation-screen-main/index.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +38 -40
- package/src/components/sidebar-navigation-screen-patterns/index.js +1 -0
- package/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -1
- package/src/components/sidebar-navigation-screen-unsupported/index.js +17 -0
- package/src/components/site-editor-routes/home.js +27 -3
- package/src/components/site-editor-routes/navigation-item.js +25 -5
- package/src/components/site-editor-routes/navigation.js +21 -3
- package/src/components/site-editor-routes/page-item.js +29 -9
- package/src/components/site-editor-routes/pages.js +30 -10
- package/src/components/site-editor-routes/pattern-item.js +9 -1
- package/src/components/site-editor-routes/patterns.js +22 -21
- package/src/components/site-editor-routes/stylebook.js +25 -11
- package/src/components/site-editor-routes/template-item.js +25 -3
- package/src/components/site-editor-routes/templates.js +26 -4
- package/src/components/site-editor-routes/utils.js +14 -0
- package/src/components/site-hub/index.js +49 -16
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import { Notice, __experimentalSpacer as Spacer } from '@wordpress/components';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export default function SidebarNavigationScreenUnsupported() {
|
|
8
|
+
return /*#__PURE__*/_jsx(Spacer, {
|
|
9
|
+
padding: 3,
|
|
10
|
+
children: /*#__PURE__*/_jsx(Notice, {
|
|
11
|
+
status: "warning",
|
|
12
|
+
isDismissible: false,
|
|
13
|
+
children: __('The theme you are currently using does not support this screen.')
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__","Notice","__experimentalSpacer","Spacer","jsx","_jsx","SidebarNavigationScreenUnsupported","padding","children","status","isDismissible"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-unsupported/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Notice, __experimentalSpacer as Spacer } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenUnsupported() {\n\treturn (\n\t\t<Spacer padding={ 3 }>\n\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t{ __(\n\t\t\t\t\t'The theme you are currently using does not support this screen.'\n\t\t\t\t) }\n\t\t\t</Notice>\n\t\t</Spacer>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,EAAEC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE/E,eAAe,SAASC,kCAAkCA,CAAA,EAAG;EAC5D,oBACCD,IAAA,CAACF,MAAM;IAACI,OAAO,EAAG,CAAG;IAAAC,QAAA,eACpBH,IAAA,CAACJ,MAAM;MAACQ,MAAM,EAAC,SAAS;MAACC,aAAa,EAAG,KAAO;MAAAF,QAAA,EAC7CR,EAAE,CACH,iEACD;IAAC,CACM;EAAC,CACF,CAAC;AAEX","ignoreList":[]}
|
|
@@ -2,17 +2,34 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';
|
|
5
|
+
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
5
6
|
import Editor from '../editor';
|
|
7
|
+
import { isClassicThemeWithStyleBookSupport } from './utils';
|
|
6
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
export const homeRoute = {
|
|
8
10
|
name: 'home',
|
|
9
11
|
path: '/',
|
|
10
12
|
areas: {
|
|
11
|
-
sidebar
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
sidebar({
|
|
14
|
+
siteData
|
|
15
|
+
}) {
|
|
16
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
17
|
+
return isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? /*#__PURE__*/_jsx(SidebarNavigationScreenMain, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
18
|
+
},
|
|
19
|
+
preview({
|
|
20
|
+
siteData
|
|
21
|
+
}) {
|
|
22
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
23
|
+
return isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? /*#__PURE__*/_jsx(Editor, {
|
|
24
|
+
isHomeRoute: true
|
|
25
|
+
}) : undefined;
|
|
26
|
+
},
|
|
27
|
+
mobile({
|
|
28
|
+
siteData
|
|
29
|
+
}) {
|
|
30
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
31
|
+
return isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? /*#__PURE__*/_jsx(SidebarNavigationScreenMain, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
32
|
+
}
|
|
16
33
|
}
|
|
17
34
|
};
|
|
18
35
|
//# sourceMappingURL=home.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SidebarNavigationScreenMain","Editor","jsx","_jsx","homeRoute","name","path","areas","sidebar","preview","isHomeRoute","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/home.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport Editor from '../editor';\n\nexport const homeRoute = {\n\tname: 'home',\n\tpath: '/',\n\tareas: {\n\t\tsidebar
|
|
1
|
+
{"version":3,"names":["SidebarNavigationScreenMain","SidebarNavigationScreenUnsupported","Editor","isClassicThemeWithStyleBookSupport","jsx","_jsx","homeRoute","name","path","areas","sidebar","siteData","isBlockTheme","currentTheme","is_block_theme","preview","isHomeRoute","undefined","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/home.js"],"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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ||\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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ||\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"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,kCAAkC,MAAM,0CAA0C;AACzF,OAAOC,MAAM,MAAM,WAAW;AAC9B,SAASC,kCAAkC,QAAQ,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7D,OAAO,MAAMC,SAAS,GAAG;EACxBC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,GAAG;EACTC,KAAK,EAAE;IACNC,OAAOA,CAAE;MAAEC;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,IAClBT,kCAAkC,CAAEQ,QAAS,CAAC,gBAC9CN,IAAA,CAACL,2BAA2B,IAAE,CAAC,gBAE/BK,IAAA,CAACJ,kCAAkC,IAAE,CACrC;IACF,CAAC;IACDc,OAAOA,CAAE;MAAEJ;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,IAClBT,kCAAkC,CAAEQ,QAAS,CAAC,gBAC9CN,IAAA,CAACH,MAAM;QAACc,WAAW;MAAA,CAAE,CAAC,GACnBC,SAAS;IACd,CAAC;IACDC,MAAMA,CAAE;MAAEP;IAAS,CAAC,EAAG;MACtB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,IAClBT,kCAAkC,CAAEQ,QAAS,CAAC,gBAC9CN,IAAA,CAACL,2BAA2B,IAAE,CAAC,gBAE/BK,IAAA,CAACJ,kCAAkC,IAAE,CACrC;IACF;EACD;AACD,CAAC","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
|
8
8
|
*/
|
|
9
9
|
import Editor from '../editor';
|
|
10
10
|
import SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';
|
|
11
|
+
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
11
12
|
import { unlock } from '../../lock-unlock';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
const {
|
|
@@ -28,11 +29,26 @@ export const navigationItemRoute = {
|
|
|
28
29
|
name: 'navigation-item',
|
|
29
30
|
path: '/wp_navigation/:postId',
|
|
30
31
|
areas: {
|
|
31
|
-
sidebar
|
|
32
|
-
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
sidebar({
|
|
33
|
+
siteData
|
|
34
|
+
}) {
|
|
35
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
36
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(SidebarNavigationScreenNavigationMenu, {
|
|
37
|
+
backPath: "/navigation"
|
|
38
|
+
}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
39
|
+
},
|
|
40
|
+
preview({
|
|
41
|
+
siteData
|
|
42
|
+
}) {
|
|
43
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
44
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(Editor, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
45
|
+
},
|
|
46
|
+
mobile({
|
|
47
|
+
siteData
|
|
48
|
+
}) {
|
|
49
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
50
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(MobileNavigationItemView, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
51
|
+
}
|
|
36
52
|
}
|
|
37
53
|
};
|
|
38
54
|
//# sourceMappingURL=navigation-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["privateApis","routerPrivateApis","Editor","SidebarNavigationScreenNavigationMenu","unlock","jsx","_jsx","useLocation","MobileNavigationItemView","query","canvas","backPath","navigationItemRoute","name","path","areas","sidebar","preview","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/navigation-item.js"],"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 { 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
|
|
1
|
+
{"version":3,"names":["privateApis","routerPrivateApis","Editor","SidebarNavigationScreenNavigationMenu","SidebarNavigationScreenUnsupported","unlock","jsx","_jsx","useLocation","MobileNavigationItemView","query","canvas","backPath","navigationItemRoute","name","path","areas","sidebar","siteData","isBlockTheme","currentTheme","is_block_theme","preview","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/navigation-item.js"],"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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,qCAAqC,MAAM,8CAA8C;AAChG,OAAOC,kCAAkC,MAAM,0CAA0C;AACzF,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3C,MAAM;EAAEC;AAAY,CAAC,GAAGH,MAAM,CAAEJ,iBAAkB,CAAC;AAEnD,SAASQ,wBAAwBA,CAAA,EAAG;EACnC,MAAM;IAAEC,KAAK,GAAG,CAAC;EAAE,CAAC,GAAGF,WAAW,CAAC,CAAC;EACpC,MAAM;IAAEG,MAAM,GAAG;EAAO,CAAC,GAAGD,KAAK;EAEjC,OAAOC,MAAM,KAAK,MAAM,gBACvBJ,IAAA,CAACL,MAAM,IAAE,CAAC,gBAEVK,IAAA,CAACJ,qCAAqC;IAACS,QAAQ,EAAC;EAAa,CAAE,CAC/D;AACF;AAEA,OAAO,MAAMC,mBAAmB,GAAG;EAClCC,IAAI,EAAE,iBAAiB;EACvBC,IAAI,EAAE,wBAAwB;EAC9BC,KAAK,EAAE;IACNC,OAAOA,CAAE;MAAEC;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBZ,IAAA,CAACJ,qCAAqC;QAACS,QAAQ,EAAC;MAAa,CAAE,CAAC,gBAEhEL,IAAA,CAACH,kCAAkC,IAAE,CACrC;IACF,CAAC;IACDkB,OAAOA,CAAE;MAAEJ;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBZ,IAAA,CAACL,MAAM,IAAE,CAAC,gBAEVK,IAAA,CAACH,kCAAkC,IAAE,CACrC;IACF,CAAC;IACDmB,MAAMA,CAAE;MAAEL;IAAS,CAAC,EAAG;MACtB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBZ,IAAA,CAACE,wBAAwB,IAAE,CAAC,gBAE5BF,IAAA,CAACH,kCAAkC,IAAE,CACrC;IACF;EACD;AACD,CAAC","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
|
8
8
|
*/
|
|
9
9
|
import Editor from '../editor';
|
|
10
10
|
import SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';
|
|
11
|
+
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
11
12
|
import { unlock } from '../../lock-unlock';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
const {
|
|
@@ -28,11 +29,26 @@ export const navigationRoute = {
|
|
|
28
29
|
name: 'navigation',
|
|
29
30
|
path: '/navigation',
|
|
30
31
|
areas: {
|
|
31
|
-
sidebar
|
|
32
|
-
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
sidebar({
|
|
33
|
+
siteData
|
|
34
|
+
}) {
|
|
35
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
36
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(SidebarNavigationScreenNavigationMenus, {
|
|
37
|
+
backPath: "/"
|
|
38
|
+
}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
39
|
+
},
|
|
40
|
+
preview({
|
|
41
|
+
siteData
|
|
42
|
+
}) {
|
|
43
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
44
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(Editor, {}) : undefined;
|
|
45
|
+
},
|
|
46
|
+
mobile({
|
|
47
|
+
siteData
|
|
48
|
+
}) {
|
|
49
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
50
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(MobileNavigationView, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
51
|
+
}
|
|
36
52
|
}
|
|
37
53
|
};
|
|
38
54
|
//# sourceMappingURL=navigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["privateApis","routerPrivateApis","Editor","SidebarNavigationScreenNavigationMenus","unlock","jsx","_jsx","useLocation","MobileNavigationView","query","canvas","backPath","navigationRoute","name","path","areas","sidebar","preview","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/navigation.js"],"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 { 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
|
|
1
|
+
{"version":3,"names":["privateApis","routerPrivateApis","Editor","SidebarNavigationScreenNavigationMenus","SidebarNavigationScreenUnsupported","unlock","jsx","_jsx","useLocation","MobileNavigationView","query","canvas","backPath","navigationRoute","name","path","areas","sidebar","siteData","isBlockTheme","currentTheme","is_block_theme","preview","undefined","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/navigation.js"],"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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,sCAAsC,MAAM,+CAA+C;AAClG,OAAOC,kCAAkC,MAAM,0CAA0C;AACzF,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3C,MAAM;EAAEC;AAAY,CAAC,GAAGH,MAAM,CAAEJ,iBAAkB,CAAC;AAEnD,SAASQ,oBAAoBA,CAAA,EAAG;EAC/B,MAAM;IAAEC,KAAK,GAAG,CAAC;EAAE,CAAC,GAAGF,WAAW,CAAC,CAAC;EACpC,MAAM;IAAEG,MAAM,GAAG;EAAO,CAAC,GAAGD,KAAK;EAEjC,OAAOC,MAAM,KAAK,MAAM,gBACvBJ,IAAA,CAACL,MAAM,IAAE,CAAC,gBAEVK,IAAA,CAACJ,sCAAsC;IAACS,QAAQ,EAAC;EAAG,CAAE,CACtD;AACF;AAEA,OAAO,MAAMC,eAAe,GAAG;EAC9BC,IAAI,EAAE,YAAY;EAClBC,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAE;IACNC,OAAOA,CAAE;MAAEC;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBZ,IAAA,CAACJ,sCAAsC;QAACS,QAAQ,EAAC;MAAG,CAAE,CAAC,gBAEvDL,IAAA,CAACH,kCAAkC,IAAE,CACrC;IACF,CAAC;IACDkB,OAAOA,CAAE;MAAEJ;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAAGZ,IAAA,CAACL,MAAM,IAAE,CAAC,GAAGqB,SAAS;IAC7C,CAAC;IACDC,MAAMA,CAAE;MAAEN;IAAS,CAAC,EAAG;MACtB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBZ,IAAA,CAACE,oBAAoB,IAAE,CAAC,gBAExBF,IAAA,CAACH,kCAAkC,IAAE,CACrC;IACF;EACD;AACD,CAAC","ignoreList":[]}
|
|
@@ -9,20 +9,36 @@ import { __ } from '@wordpress/i18n';
|
|
|
9
9
|
import Editor from '../editor';
|
|
10
10
|
import DataViewsSidebarContent from '../sidebar-dataviews';
|
|
11
11
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
12
|
+
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
export const pageItemRoute = {
|
|
14
15
|
name: 'page-item',
|
|
15
16
|
path: '/page/:postId',
|
|
16
17
|
areas: {
|
|
17
|
-
sidebar
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
sidebar({
|
|
19
|
+
siteData
|
|
20
|
+
}) {
|
|
21
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
22
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(SidebarNavigationScreen, {
|
|
23
|
+
title: __('Pages'),
|
|
24
|
+
backPath: "/",
|
|
25
|
+
content: /*#__PURE__*/_jsx(DataViewsSidebarContent, {
|
|
26
|
+
postType: "page"
|
|
27
|
+
})
|
|
28
|
+
}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
29
|
+
},
|
|
30
|
+
mobile({
|
|
31
|
+
siteData
|
|
32
|
+
}) {
|
|
33
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
34
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(Editor, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
35
|
+
},
|
|
36
|
+
preview({
|
|
37
|
+
siteData
|
|
38
|
+
}) {
|
|
39
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
40
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(Editor, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
41
|
+
}
|
|
26
42
|
}
|
|
27
43
|
};
|
|
28
44
|
//# sourceMappingURL=page-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","Editor","DataViewsSidebarContent","SidebarNavigationScreen","jsx","_jsx","pageItemRoute","name","path","areas","sidebar","title","backPath","content","postType","mobile","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/page-item.js"],"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';\n\nexport const pageItemRoute = {\n\tname: 'page-item',\n\tpath: '/page/:postId',\n\tareas: {\n\t\tsidebar
|
|
1
|
+
{"version":3,"names":["__","Editor","DataViewsSidebarContent","SidebarNavigationScreen","SidebarNavigationScreenUnsupported","jsx","_jsx","pageItemRoute","name","path","areas","sidebar","siteData","isBlockTheme","currentTheme","is_block_theme","title","backPath","content","postType","mobile","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/page-item.js"],"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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,uBAAuB,MAAM,sBAAsB;AAC1D,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,kCAAkC,MAAM,0CAA0C;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1F,OAAO,MAAMC,aAAa,GAAG;EAC5BC,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAE,eAAe;EACrBC,KAAK,EAAE;IACNC,OAAOA,CAAE;MAAEC;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBP,IAAA,CAACH,uBAAuB;QACvBa,KAAK,EAAGhB,EAAE,CAAE,OAAQ,CAAG;QACvBiB,QAAQ,EAAC,GAAG;QACZC,OAAO,eAAGZ,IAAA,CAACJ,uBAAuB;UAACiB,QAAQ,EAAC;QAAM,CAAE;MAAG,CACvD,CAAC,gBAEFb,IAAA,CAACF,kCAAkC,IAAE,CACrC;IACF,CAAC;IACDgB,MAAMA,CAAE;MAAER;IAAS,CAAC,EAAG;MACtB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBP,IAAA,CAACL,MAAM,IAAE,CAAC,gBAEVK,IAAA,CAACF,kCAAkC,IAAE,CACrC;IACF,CAAC;IACDiB,OAAOA,CAAE;MAAET;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBP,IAAA,CAACL,MAAM,IAAE,CAAC,gBAEVK,IAAA,CAACF,kCAAkC,IAAE,CACrC;IACF;EACD;AACD,CAAC","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
9
9
|
*/
|
|
10
10
|
import Editor from '../editor';
|
|
11
11
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
12
|
+
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
12
13
|
import DataViewsSidebarContent from '../sidebar-dataviews';
|
|
13
14
|
import PostList from '../post-list';
|
|
14
15
|
import { unlock } from '../../lock-unlock';
|
|
@@ -32,23 +33,43 @@ export const pagesRoute = {
|
|
|
32
33
|
name: 'pages',
|
|
33
34
|
path: '/page',
|
|
34
35
|
areas: {
|
|
35
|
-
sidebar
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
sidebar({
|
|
37
|
+
siteData
|
|
38
|
+
}) {
|
|
39
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
40
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(SidebarNavigationScreen, {
|
|
41
|
+
title: __('Pages'),
|
|
42
|
+
backPath: "/",
|
|
43
|
+
content: /*#__PURE__*/_jsx(DataViewsSidebarContent, {
|
|
44
|
+
postType: "page"
|
|
45
|
+
})
|
|
46
|
+
}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
47
|
+
},
|
|
48
|
+
content({
|
|
49
|
+
siteData
|
|
50
|
+
}) {
|
|
51
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
52
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(PostList, {
|
|
39
53
|
postType: "page"
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
content: /*#__PURE__*/_jsx(PostList, {
|
|
43
|
-
postType: "page"
|
|
44
|
-
}),
|
|
54
|
+
}) : undefined;
|
|
55
|
+
},
|
|
45
56
|
preview({
|
|
46
|
-
query
|
|
57
|
+
query,
|
|
58
|
+
siteData
|
|
47
59
|
}) {
|
|
60
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
61
|
+
if (!isBlockTheme) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
48
64
|
const isListView = (query.layout === 'list' || !query.layout) && query.isCustom !== 'true';
|
|
49
65
|
return isListView ? /*#__PURE__*/_jsx(Editor, {}) : undefined;
|
|
50
66
|
},
|
|
51
|
-
mobile
|
|
67
|
+
mobile({
|
|
68
|
+
siteData
|
|
69
|
+
}) {
|
|
70
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
71
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(MobilePagesView, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
72
|
+
},
|
|
52
73
|
edit({
|
|
53
74
|
query
|
|
54
75
|
}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["privateApis","routerPrivateApis","__","Editor","SidebarNavigationScreen","DataViewsSidebarContent","PostList","unlock","PostEdit","jsx","_jsx","useLocation","MobilePagesView","query","canvas","postType","pagesRoute","name","path","areas","sidebar","title","backPath","content","preview","isListView","layout","isCustom","
|
|
1
|
+
{"version":3,"names":["privateApis","routerPrivateApis","__","Editor","SidebarNavigationScreen","SidebarNavigationScreenUnsupported","DataViewsSidebarContent","PostList","unlock","PostEdit","jsx","_jsx","useLocation","MobilePagesView","query","canvas","postType","pagesRoute","name","path","areas","sidebar","siteData","isBlockTheme","currentTheme","is_block_theme","title","backPath","content","undefined","preview","isListView","layout","isCustom","mobile","edit","_query$layout","hasQuickEdit","quickEdit","postId","widths","_query$layout2"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/pages.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { __ } from '@wordpress/i18n';\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 { PostEdit } from '../post-edit';\n\nconst { useLocation } = unlock( routerPrivateApis );\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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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\tpreview( { 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 isListView =\n\t\t\t\t( query.layout === 'list' || ! query.layout ) &&\n\t\t\t\tquery.isCustom !== 'true';\n\t\t\treturn isListView ? <Editor /> : undefined;\n\t\t},\n\t\tmobile( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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\tedit( { query } ) {\n\t\t\tconst hasQuickEdit =\n\t\t\t\t( query.layout ?? 'list' ) !== 'list' && !! query.quickEdit;\n\t\t\treturn hasQuickEdit ? (\n\t\t\t\t<PostEdit postType=\"page\" postId={ query.postId } />\n\t\t\t) : undefined;\n\t\t},\n\t},\n\twidths: {\n\t\tcontent( { query } ) {\n\t\t\tconst isListView =\n\t\t\t\t( query.layout === 'list' || ! query.layout ) &&\n\t\t\t\tquery.isCustom !== 'true';\n\t\t\treturn isListView ? 380 : undefined;\n\t\t},\n\t\tedit( { query } ) {\n\t\t\tconst hasQuickEdit =\n\t\t\t\t( query.layout ?? 'list' ) !== 'list' && !! query.quickEdit;\n\t\t\treturn hasQuickEdit ? 380 : undefined;\n\t\t},\n\t},\n};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -3,14 +3,21 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import Editor from '../editor';
|
|
5
5
|
import SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';
|
|
6
|
+
import { isClassicThemeWithStyleBookSupport } from './utils';
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
export const patternItemRoute = {
|
|
8
9
|
name: 'pattern-item',
|
|
9
10
|
path: '/wp_block/:postId',
|
|
10
11
|
areas: {
|
|
11
|
-
sidebar
|
|
12
|
-
|
|
13
|
-
})
|
|
12
|
+
sidebar({
|
|
13
|
+
siteData
|
|
14
|
+
}) {
|
|
15
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
16
|
+
const backPath = isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? '/' : undefined;
|
|
17
|
+
return /*#__PURE__*/_jsx(SidebarNavigationScreenPatterns, {
|
|
18
|
+
backPath: backPath
|
|
19
|
+
});
|
|
20
|
+
},
|
|
14
21
|
mobile: /*#__PURE__*/_jsx(Editor, {}),
|
|
15
22
|
preview: /*#__PURE__*/_jsx(Editor, {})
|
|
16
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Editor","SidebarNavigationScreenPatterns","jsx","_jsx","patternItemRoute","name","path","areas","sidebar","backPath","mobile","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/pattern-item.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\n\nexport const patternItemRoute = {\n\tname: 'pattern-item',\n\tpath: '/wp_block/:postId',\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenPatterns backPath
|
|
1
|
+
{"version":3,"names":["Editor","SidebarNavigationScreenPatterns","isClassicThemeWithStyleBookSupport","jsx","_jsx","patternItemRoute","name","path","areas","sidebar","siteData","isBlockTheme","currentTheme","is_block_theme","backPath","undefined","mobile","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/pattern-item.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\nimport { isClassicThemeWithStyleBookSupport } from './utils';\n\nexport const patternItemRoute = {\n\tname: 'pattern-item',\n\tpath: '/wp_block/:postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tconst backPath =\n\t\t\t\tisBlockTheme || isClassicThemeWithStyleBookSupport( siteData )\n\t\t\t\t\t? '/'\n\t\t\t\t\t: undefined;\n\t\t\treturn <SidebarNavigationScreenPatterns backPath={ backPath } />;\n\t\t},\n\t\tmobile: <Editor />,\n\t\tpreview: <Editor />,\n\t},\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,WAAW;AAC9B,OAAOC,+BAA+B,MAAM,uCAAuC;AACnF,SAASC,kCAAkC,QAAQ,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7D,OAAO,MAAMC,gBAAgB,GAAG;EAC/BC,IAAI,EAAE,cAAc;EACpBC,IAAI,EAAE,mBAAmB;EACzBC,KAAK,EAAE;IACNC,OAAOA,CAAE;MAAEC;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,MAAMC,QAAQ,GACbH,YAAY,IAAIT,kCAAkC,CAAEQ,QAAS,CAAC,GAC3D,GAAG,GACHK,SAAS;MACb,oBAAOX,IAAA,CAACH,+BAA+B;QAACa,QAAQ,EAAGA;MAAU,CAAE,CAAC;IACjE,CAAC;IACDE,MAAM,eAAEZ,IAAA,CAACJ,MAAM,IAAE,CAAC;IAClBiB,OAAO,eAAEb,IAAA,CAACJ,MAAM,IAAE;EACnB;AACD,CAAC","ignoreList":[]}
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* Internal dependencies
|
|
8
3
|
*/
|
|
9
4
|
import SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';
|
|
10
5
|
import PagePatterns from '../page-patterns';
|
|
11
|
-
import {
|
|
6
|
+
import { isClassicThemeWithStyleBookSupport } from './utils';
|
|
12
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
const {
|
|
14
|
-
useLocation
|
|
15
|
-
} = unlock(routerPrivateApis);
|
|
16
|
-
function MobilePatternsView() {
|
|
17
|
-
const {
|
|
18
|
-
query = {}
|
|
19
|
-
} = useLocation();
|
|
20
|
-
const {
|
|
21
|
-
categoryId
|
|
22
|
-
} = query;
|
|
23
|
-
return !!categoryId ? /*#__PURE__*/_jsx(PagePatterns, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenPatterns, {
|
|
24
|
-
backPath: "/"
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
8
|
export const patternsRoute = {
|
|
28
9
|
name: 'patterns',
|
|
29
10
|
path: '/pattern',
|
|
30
11
|
areas: {
|
|
31
|
-
sidebar
|
|
32
|
-
|
|
33
|
-
})
|
|
12
|
+
sidebar({
|
|
13
|
+
siteData
|
|
14
|
+
}) {
|
|
15
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
16
|
+
const backPath = isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? '/' : undefined;
|
|
17
|
+
return /*#__PURE__*/_jsx(SidebarNavigationScreenPatterns, {
|
|
18
|
+
backPath: backPath
|
|
19
|
+
});
|
|
20
|
+
},
|
|
34
21
|
content: /*#__PURE__*/_jsx(PagePatterns, {}),
|
|
35
|
-
mobile
|
|
22
|
+
mobile({
|
|
23
|
+
siteData,
|
|
24
|
+
query
|
|
25
|
+
}) {
|
|
26
|
+
const {
|
|
27
|
+
categoryId
|
|
28
|
+
} = query;
|
|
29
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
30
|
+
const backPath = isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? '/' : undefined;
|
|
31
|
+
return !!categoryId ? /*#__PURE__*/_jsx(PagePatterns, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenPatterns, {
|
|
32
|
+
backPath: backPath
|
|
33
|
+
});
|
|
34
|
+
}
|
|
36
35
|
}
|
|
37
36
|
};
|
|
38
37
|
//# sourceMappingURL=patterns.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["SidebarNavigationScreenPatterns","PagePatterns","isClassicThemeWithStyleBookSupport","jsx","_jsx","patternsRoute","name","path","areas","sidebar","siteData","isBlockTheme","currentTheme","is_block_theme","backPath","undefined","content","mobile","query","categoryId"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/patterns.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\nimport PagePatterns from '../page-patterns';\nimport { isClassicThemeWithStyleBookSupport } from './utils';\n\nexport const patternsRoute = {\n\tname: 'patterns',\n\tpath: '/pattern',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tconst backPath =\n\t\t\t\tisBlockTheme || isClassicThemeWithStyleBookSupport( siteData )\n\t\t\t\t\t? '/'\n\t\t\t\t\t: undefined;\n\t\t\treturn <SidebarNavigationScreenPatterns backPath={ backPath } />;\n\t\t},\n\t\tcontent: <PagePatterns />,\n\t\tmobile( { siteData, query } ) {\n\t\t\tconst { categoryId } = query;\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tconst backPath =\n\t\t\t\tisBlockTheme || isClassicThemeWithStyleBookSupport( siteData )\n\t\t\t\t\t? '/'\n\t\t\t\t\t: undefined;\n\t\t\treturn !! categoryId ? (\n\t\t\t\t<PagePatterns />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenPatterns backPath={ backPath } />\n\t\t\t);\n\t\t},\n\t},\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,+BAA+B,MAAM,uCAAuC;AACnF,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,SAASC,kCAAkC,QAAQ,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7D,OAAO,MAAMC,aAAa,GAAG;EAC5BC,IAAI,EAAE,UAAU;EAChBC,IAAI,EAAE,UAAU;EAChBC,KAAK,EAAE;IACNC,OAAOA,CAAE;MAAEC;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,MAAMC,QAAQ,GACbH,YAAY,IAAIT,kCAAkC,CAAEQ,QAAS,CAAC,GAC3D,GAAG,GACHK,SAAS;MACb,oBAAOX,IAAA,CAACJ,+BAA+B;QAACc,QAAQ,EAAGA;MAAU,CAAE,CAAC;IACjE,CAAC;IACDE,OAAO,eAAEZ,IAAA,CAACH,YAAY,IAAE,CAAC;IACzBgB,MAAMA,CAAE;MAAEP,QAAQ;MAAEQ;IAAM,CAAC,EAAG;MAC7B,MAAM;QAAEC;MAAW,CAAC,GAAGD,KAAK;MAC5B,MAAMP,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,MAAMC,QAAQ,GACbH,YAAY,IAAIT,kCAAkC,CAAEQ,QAAS,CAAC,GAC3D,GAAG,GACHK,SAAS;MACb,OAAO,CAAC,CAAEI,UAAU,gBACnBf,IAAA,CAACH,YAAY,IAAE,CAAC,gBAEhBG,IAAA,CAACJ,+BAA+B;QAACc,QAAQ,EAAGA;MAAU,CAAE,CACxD;IACF;EACD;AACD,CAAC","ignoreList":[]}
|
|
@@ -7,23 +7,37 @@ import { __ } from '@wordpress/i18n';
|
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
10
|
+
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
10
11
|
import { StyleBookPreview } from '../style-book';
|
|
12
|
+
import { isClassicThemeWithStyleBookSupport } from './utils';
|
|
11
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
export const stylebookRoute = {
|
|
13
15
|
name: 'stylebook',
|
|
14
16
|
path: '/stylebook',
|
|
15
17
|
areas: {
|
|
16
|
-
sidebar
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
sidebar({
|
|
19
|
+
siteData
|
|
20
|
+
}) {
|
|
21
|
+
return isClassicThemeWithStyleBookSupport(siteData) ? /*#__PURE__*/_jsx(SidebarNavigationScreen, {
|
|
22
|
+
title: __('Styles'),
|
|
23
|
+
backPath: "/",
|
|
24
|
+
description: __(`Preview your website's visual identity: colors, typography, and blocks.`)
|
|
25
|
+
}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
26
|
+
},
|
|
27
|
+
preview({
|
|
28
|
+
siteData
|
|
29
|
+
}) {
|
|
30
|
+
return isClassicThemeWithStyleBookSupport(siteData) ? /*#__PURE__*/_jsx(StyleBookPreview, {
|
|
31
|
+
isStatic: true
|
|
32
|
+
}) : undefined;
|
|
33
|
+
},
|
|
34
|
+
mobile({
|
|
35
|
+
siteData
|
|
36
|
+
}) {
|
|
37
|
+
return isClassicThemeWithStyleBookSupport(siteData) ? /*#__PURE__*/_jsx(StyleBookPreview, {
|
|
38
|
+
isStatic: true
|
|
39
|
+
}) : undefined;
|
|
40
|
+
}
|
|
27
41
|
}
|
|
28
42
|
};
|
|
29
43
|
//# sourceMappingURL=stylebook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","SidebarNavigationScreen","StyleBookPreview","jsx","_jsx","stylebookRoute","name","path","areas","sidebar","title","backPath","description","preview","isStatic","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/stylebook.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { StyleBookPreview } from '../style-book';\n\nexport const stylebookRoute = {\n\tname: 'stylebook',\n\tpath: '/stylebook',\n\tareas: {\n\t\tsidebar
|
|
1
|
+
{"version":3,"names":["__","SidebarNavigationScreen","SidebarNavigationScreenUnsupported","StyleBookPreview","isClassicThemeWithStyleBookSupport","jsx","_jsx","stylebookRoute","name","path","areas","sidebar","siteData","title","backPath","description","preview","isStatic","undefined","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/stylebook.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { StyleBookPreview } from '../style-book';\nimport { isClassicThemeWithStyleBookSupport } from './utils';\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 isStatic />\n\t\t\t) : undefined;\n\t\t},\n\t\tmobile( { siteData } ) {\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<StyleBookPreview isStatic />\n\t\t\t) : undefined;\n\t\t},\n\t},\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,kCAAkC,MAAM,0CAA0C;AACzF,SAASC,gBAAgB,QAAQ,eAAe;AAChD,SAASC,kCAAkC,QAAQ,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7D,OAAO,MAAMC,cAAc,GAAG;EAC7BC,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAE,YAAY;EAClBC,KAAK,EAAE;IACNC,OAAOA,CAAE;MAAEC;IAAS,CAAC,EAAG;MACvB,OAAOR,kCAAkC,CAAEQ,QAAS,CAAC,gBACpDN,IAAA,CAACL,uBAAuB;QACvBY,KAAK,EAAGb,EAAE,CAAE,QAAS,CAAG;QACxBc,QAAQ,EAAC,GAAG;QACZC,WAAW,EAAGf,EAAE,CACf,yEACD;MAAG,CACH,CAAC,gBAEFM,IAAA,CAACJ,kCAAkC,IAAE,CACrC;IACF,CAAC;IACDc,OAAOA,CAAE;MAAEJ;IAAS,CAAC,EAAG;MACvB,OAAOR,kCAAkC,CAAEQ,QAAS,CAAC,gBACpDN,IAAA,CAACH,gBAAgB;QAACc,QAAQ;MAAA,CAAE,CAAC,GAC1BC,SAAS;IACd,CAAC;IACDC,MAAMA,CAAE;MAAEP;IAAS,CAAC,EAAG;MACtB,OAAOR,kCAAkC,CAAEQ,QAAS,CAAC,gBACpDN,IAAA,CAACH,gBAAgB;QAACc,QAAQ;MAAA,CAAE,CAAC,GAC1BC,SAAS;IACd;EACD;AACD,CAAC","ignoreList":[]}
|
|
@@ -3,16 +3,32 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import Editor from '../editor';
|
|
5
5
|
import SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';
|
|
6
|
+
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
export const templateItemRoute = {
|
|
8
9
|
name: 'template-item',
|
|
9
10
|
path: '/wp_template/*postId',
|
|
10
11
|
areas: {
|
|
11
|
-
sidebar
|
|
12
|
-
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
sidebar({
|
|
13
|
+
siteData
|
|
14
|
+
}) {
|
|
15
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
16
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(SidebarNavigationScreenTemplatesBrowse, {
|
|
17
|
+
backPath: "/"
|
|
18
|
+
}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
19
|
+
},
|
|
20
|
+
mobile({
|
|
21
|
+
siteData
|
|
22
|
+
}) {
|
|
23
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
24
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(Editor, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
25
|
+
},
|
|
26
|
+
preview({
|
|
27
|
+
siteData
|
|
28
|
+
}) {
|
|
29
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
30
|
+
return isBlockTheme ? /*#__PURE__*/_jsx(Editor, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
|
|
31
|
+
}
|
|
16
32
|
}
|
|
17
33
|
};
|
|
18
34
|
//# sourceMappingURL=template-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Editor","SidebarNavigationScreenTemplatesBrowse","jsx","_jsx","templateItemRoute","name","path","areas","sidebar","backPath","mobile","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/template-item.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\n\nexport const templateItemRoute = {\n\tname: 'template-item',\n\tpath: '/wp_template/*postId',\n\tareas: {\n\t\tsidebar
|
|
1
|
+
{"version":3,"names":["Editor","SidebarNavigationScreenTemplatesBrowse","SidebarNavigationScreenUnsupported","jsx","_jsx","templateItemRoute","name","path","areas","sidebar","siteData","isBlockTheme","currentTheme","is_block_theme","backPath","mobile","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/template-item.js"],"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\nexport const templateItemRoute = {\n\tname: 'template-item',\n\tpath: '/wp_template/*postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\n\t\t\t\t<SidebarNavigationScreenTemplatesBrowse backPath=\"/\" />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tmobile( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\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"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,WAAW;AAC9B,OAAOC,sCAAsC,MAAM,+CAA+C;AAClG,OAAOC,kCAAkC,MAAM,0CAA0C;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1F,OAAO,MAAMC,iBAAiB,GAAG;EAChCC,IAAI,EAAE,eAAe;EACrBC,IAAI,EAAE,sBAAsB;EAC5BC,KAAK,EAAE;IACNC,OAAOA,CAAE;MAAEC;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBP,IAAA,CAACH,sCAAsC;QAACa,QAAQ,EAAC;MAAG,CAAE,CAAC,gBAEvDV,IAAA,CAACF,kCAAkC,IAAE,CACrC;IACF,CAAC;IACDa,MAAMA,CAAE;MAAEL;IAAS,CAAC,EAAG;MACtB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBP,IAAA,CAACJ,MAAM,IAAE,CAAC,gBAEVI,IAAA,CAACF,kCAAkC,IAAE,CACrC;IACF,CAAC;IACDc,OAAOA,CAAE;MAAEN;IAAS,CAAC,EAAG;MACvB,MAAMC,YAAY,GAAGD,QAAQ,CAACE,YAAY,EAAEC,cAAc;MAC1D,OAAOF,YAAY,gBAClBP,IAAA,CAACJ,MAAM,IAAE,CAAC,gBAEVI,IAAA,CAACF,kCAAkC,IAAE,CACrC;IACF;EACD;AACD,CAAC","ignoreList":[]}
|