@wordpress/edit-post 7.34.0 → 7.35.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 +8 -2
- package/build/components/header/fullscreen-mode-close/index.js +2 -2
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/header/index.js +7 -96
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/more-menu/manage-patterns-menu-item.js +1 -1
- package/build/components/header/more-menu/manage-patterns-menu-item.js.map +1 -1
- package/build/components/layout/index.js +56 -24
- package/build/components/layout/index.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js +2 -2
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/visual-editor/index.js +11 -5
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/components/visual-editor/use-padding-appender.js +6 -1
- package/build/components/visual-editor/use-padding-appender.js.map +1 -1
- package/build-module/components/header/fullscreen-mode-close/index.js +2 -2
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/header/index.js +8 -97
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/more-menu/manage-patterns-menu-item.js +1 -1
- package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +1 -1
- package/build-module/components/layout/index.js +57 -25
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js +2 -2
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/visual-editor/index.js +11 -5
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/components/visual-editor/use-padding-appender.js +6 -1
- package/build-module/components/visual-editor/use-padding-appender.js.map +1 -1
- package/build-style/style-rtl.css +8 -268
- package/build-style/style.css +8 -268
- package/package.json +32 -32
- package/src/components/header/fullscreen-mode-close/index.js +2 -2
- package/src/components/header/index.js +9 -112
- package/src/components/header/more-menu/manage-patterns-menu-item.js +1 -1
- package/src/components/header/style.scss +4 -241
- package/src/components/layout/index.js +72 -19
- package/src/components/meta-boxes/meta-boxes-area/index.js +4 -8
- package/src/components/visual-editor/index.js +11 -4
- package/src/components/visual-editor/use-padding-appender.js +7 -1
- package/src/style.scss +1 -5
- package/build/components/sidebar/post-format/index.js +0 -21
- package/build/components/sidebar/post-format/index.js.map +0 -1
- package/build/components/sidebar/post-pending-status/index.js +0 -26
- package/build/components/sidebar/post-pending-status/index.js.map +0 -1
- package/build/components/sidebar/post-slug/index.js +0 -21
- package/build/components/sidebar/post-slug/index.js.map +0 -1
- package/build/components/sidebar/post-status/index.js +0 -92
- package/build/components/sidebar/post-status/index.js.map +0 -1
- package/build/components/sidebar/post-sticky/index.js +0 -26
- package/build/components/sidebar/post-sticky/index.js.map +0 -1
- package/build/components/sidebar/post-trash/index.js +0 -16
- package/build/components/sidebar/post-trash/index.js.map +0 -1
- package/build/components/sidebar/post-visibility/index.js +0 -78
- package/build/components/sidebar/post-visibility/index.js.map +0 -1
- package/build/components/sidebar/settings-header/index.js +0 -53
- package/build/components/sidebar/settings-header/index.js.map +0 -1
- package/build/components/sidebar/settings-sidebar/index.js +0 -193
- package/build/components/sidebar/settings-sidebar/index.js.map +0 -1
- package/build-module/components/sidebar/post-format/index.js +0 -13
- package/build-module/components/sidebar/post-format/index.js.map +0 -1
- package/build-module/components/sidebar/post-pending-status/index.js +0 -18
- package/build-module/components/sidebar/post-pending-status/index.js.map +0 -1
- package/build-module/components/sidebar/post-slug/index.js +0 -13
- package/build-module/components/sidebar/post-slug/index.js.map +0 -1
- package/build-module/components/sidebar/post-status/index.js +0 -84
- package/build-module/components/sidebar/post-status/index.js.map +0 -1
- package/build-module/components/sidebar/post-sticky/index.js +0 -18
- package/build-module/components/sidebar/post-sticky/index.js.map +0 -1
- package/build-module/components/sidebar/post-trash/index.js +0 -9
- package/build-module/components/sidebar/post-trash/index.js.map +0 -1
- package/build-module/components/sidebar/post-visibility/index.js +0 -70
- package/build-module/components/sidebar/post-visibility/index.js.map +0 -1
- package/build-module/components/sidebar/settings-header/index.js +0 -46
- package/build-module/components/sidebar/settings-header/index.js.map +0 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +0 -185
- package/build-module/components/sidebar/settings-sidebar/index.js.map +0 -1
- package/src/components/sidebar/post-format/index.js +0 -20
- package/src/components/sidebar/post-format/style.scss +0 -5
- package/src/components/sidebar/post-pending-status/index.js +0 -27
- package/src/components/sidebar/post-slug/index.js +0 -17
- package/src/components/sidebar/post-slug/style.scss +0 -5
- package/src/components/sidebar/post-status/index.js +0 -128
- package/src/components/sidebar/post-sticky/index.js +0 -27
- package/src/components/sidebar/post-trash/index.js +0 -12
- package/src/components/sidebar/post-visibility/index.js +0 -88
- package/src/components/sidebar/post-visibility/style.scss +0 -5
- package/src/components/sidebar/settings-header/index.js +0 -49
- package/src/components/sidebar/settings-sidebar/index.js +0 -247
- package/src/components/sidebar/style.scss +0 -18
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { createElement, Fragment } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { __ } from '@wordpress/i18n';
|
|
6
|
-
import { __experimentalHStack as HStack, __experimentalVStack as VStack, PanelBody } from '@wordpress/components';
|
|
7
|
-
import { useDispatch, useSelect } from '@wordpress/data';
|
|
8
|
-
import { PluginPostStatusInfo, PostAuthorPanel, PostSchedulePanel, PostSyncStatus, PostURLPanel, PostTemplatePanel, PostFeaturedImagePanel, store as editorStore, privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
|
-
import PostTrash from '../post-trash';
|
|
14
|
-
import PostSticky from '../post-sticky';
|
|
15
|
-
import PostSlug from '../post-slug';
|
|
16
|
-
import PostFormat from '../post-format';
|
|
17
|
-
import { unlock } from '../../../lock-unlock';
|
|
18
|
-
const {
|
|
19
|
-
PostStatus: PostStatusPanel,
|
|
20
|
-
PrivatePostExcerptPanel,
|
|
21
|
-
PostContentInformation,
|
|
22
|
-
PostLastEditedPanel
|
|
23
|
-
} = unlock(editorPrivateApis);
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Module Constants
|
|
27
|
-
*/
|
|
28
|
-
const PANEL_NAME = 'post-status';
|
|
29
|
-
export default function PostStatus() {
|
|
30
|
-
const {
|
|
31
|
-
isOpened,
|
|
32
|
-
isRemoved,
|
|
33
|
-
showPostContentPanels
|
|
34
|
-
} = useSelect(select => {
|
|
35
|
-
// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do
|
|
36
|
-
// not use isEditorPanelEnabled since this panel should not be disabled through the UI.
|
|
37
|
-
const {
|
|
38
|
-
isEditorPanelRemoved,
|
|
39
|
-
isEditorPanelOpened,
|
|
40
|
-
getCurrentPostType
|
|
41
|
-
} = select(editorStore);
|
|
42
|
-
const postType = getCurrentPostType();
|
|
43
|
-
return {
|
|
44
|
-
isRemoved: isEditorPanelRemoved(PANEL_NAME),
|
|
45
|
-
isOpened: isEditorPanelOpened(PANEL_NAME),
|
|
46
|
-
// Post excerpt panel is rendered in different place depending on the post type.
|
|
47
|
-
// So we cannot make this check inside the PostExcerpt component based on the current edited entity.
|
|
48
|
-
showPostContentPanels: !['wp_template', 'wp_template_part', 'wp_block'].includes(postType)
|
|
49
|
-
};
|
|
50
|
-
}, []);
|
|
51
|
-
const {
|
|
52
|
-
toggleEditorPanelOpened
|
|
53
|
-
} = useDispatch(editorStore);
|
|
54
|
-
if (isRemoved) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
return createElement(PanelBody, {
|
|
58
|
-
className: "edit-post-post-status",
|
|
59
|
-
title: __('Summary'),
|
|
60
|
-
opened: isOpened,
|
|
61
|
-
onToggle: () => toggleEditorPanelOpened(PANEL_NAME)
|
|
62
|
-
}, createElement(PluginPostStatusInfo.Slot, null, fills => createElement(Fragment, null, showPostContentPanels && createElement(VStack, {
|
|
63
|
-
spacing: 3
|
|
64
|
-
// TODO: this needs to be consolidated with the panel in site editor, when we unify them.
|
|
65
|
-
,
|
|
66
|
-
style: {
|
|
67
|
-
marginBlockEnd: '24px'
|
|
68
|
-
}
|
|
69
|
-
}, createElement(PostFeaturedImagePanel, {
|
|
70
|
-
withPanelBody: false
|
|
71
|
-
}), createElement(PrivatePostExcerptPanel, null), createElement(VStack, {
|
|
72
|
-
spacing: 1
|
|
73
|
-
}, createElement(PostContentInformation, null), createElement(PostLastEditedPanel, null))), createElement(VStack, {
|
|
74
|
-
spacing: 1,
|
|
75
|
-
style: {
|
|
76
|
-
marginBlockEnd: '12px'
|
|
77
|
-
}
|
|
78
|
-
}, createElement(PostStatusPanel, null), createElement(PostSchedulePanel, null), createElement(PostTemplatePanel, null), createElement(PostURLPanel, null), createElement(PostSyncStatus, null)), createElement(PostSticky, null), createElement(PostFormat, null), createElement(PostSlug, null), createElement(PostAuthorPanel, null), fills, createElement(HStack, {
|
|
79
|
-
style: {
|
|
80
|
-
marginTop: '16px'
|
|
81
|
-
}
|
|
82
|
-
}, createElement(PostTrash, null)))));
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__","__experimentalHStack","HStack","__experimentalVStack","VStack","PanelBody","useDispatch","useSelect","PluginPostStatusInfo","PostAuthorPanel","PostSchedulePanel","PostSyncStatus","PostURLPanel","PostTemplatePanel","PostFeaturedImagePanel","store","editorStore","privateApis","editorPrivateApis","PostTrash","PostSticky","PostSlug","PostFormat","unlock","PostStatus","PostStatusPanel","PrivatePostExcerptPanel","PostContentInformation","PostLastEditedPanel","PANEL_NAME","isOpened","isRemoved","showPostContentPanels","select","isEditorPanelRemoved","isEditorPanelOpened","getCurrentPostType","postType","includes","toggleEditorPanelOpened","createElement","className","title","opened","onToggle","Slot","fills","Fragment","spacing","style","marginBlockEnd","withPanelBody","marginTop"],"sources":["@wordpress/edit-post/src/components/sidebar/post-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tPanelBody,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tPluginPostStatusInfo,\n\tPostAuthorPanel,\n\tPostSchedulePanel,\n\tPostSyncStatus,\n\tPostURLPanel,\n\tPostTemplatePanel,\n\tPostFeaturedImagePanel,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport PostTrash from '../post-trash';\nimport PostSticky from '../post-sticky';\nimport PostSlug from '../post-slug';\nimport PostFormat from '../post-format';\nimport { unlock } from '../../../lock-unlock';\n\nconst {\n\tPostStatus: PostStatusPanel,\n\tPrivatePostExcerptPanel,\n\tPostContentInformation,\n\tPostLastEditedPanel,\n} = unlock( editorPrivateApis );\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nexport default function PostStatus() {\n\tconst { isOpened, isRemoved, showPostContentPanels } = useSelect(\n\t\t( select ) => {\n\t\t\t// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do\n\t\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\t\tconst {\n\t\t\t\tisEditorPanelRemoved,\n\t\t\t\tisEditorPanelOpened,\n\t\t\t\tgetCurrentPostType,\n\t\t\t} = select( editorStore );\n\t\t\tconst postType = getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisRemoved: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t\t\t// Post excerpt panel is rendered in different place depending on the post type.\n\t\t\t\t// So we cannot make this check inside the PostExcerpt component based on the current edited entity.\n\t\t\t\tshowPostContentPanels: ! [\n\t\t\t\t\t'wp_template',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\t'wp_block',\n\t\t\t\t].includes( postType ),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( isRemoved ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\tclassName=\"edit-post-post-status\"\n\t\t\ttitle={ __( 'Summary' ) }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t>\n\t\t\t<PluginPostStatusInfo.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ showPostContentPanels && (\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\t\t\t\t// TODO: this needs to be consolidated with the panel in site editor, when we unify them.\n\t\t\t\t\t\t\t\tstyle={ { marginBlockEnd: '24px' } }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostFeaturedImagePanel\n\t\t\t\t\t\t\t\t\twithPanelBody={ false }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<PrivatePostExcerptPanel />\n\t\t\t\t\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t\t<PostContentInformation />\n\t\t\t\t\t\t\t\t\t<PostLastEditedPanel />\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\t\tstyle={ { marginBlockEnd: '12px' } }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostStatusPanel />\n\t\t\t\t\t\t\t<PostSchedulePanel />\n\t\t\t\t\t\t\t<PostTemplatePanel />\n\t\t\t\t\t\t\t<PostURLPanel />\n\t\t\t\t\t\t\t<PostSyncStatus />\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t<PostSticky />\n\t\t\t\t\t\t<PostFormat />\n\t\t\t\t\t\t<PostSlug />\n\t\t\t\t\t\t<PostAuthorPanel />\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tmarginTop: '16px',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostTrash />\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostStatusInfo.Slot>\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,SAAS,QACH,uBAAuB;AAC9B,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,oBAAoB,EACpBC,eAAe,EACfC,iBAAiB,EACjBC,cAAc,EACdC,YAAY,EACZC,iBAAiB,EACjBC,sBAAsB,EACtBC,KAAK,IAAIC,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,QAAQ,MAAM,cAAc;AACnC,OAAOC,UAAU,MAAM,gBAAgB;AACvC,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EACLC,UAAU,EAAEC,eAAe;EAC3BC,uBAAuB;EACvBC,sBAAsB;EACtBC;AACD,CAAC,GAAGL,MAAM,CAAEL,iBAAkB,CAAC;;AAE/B;AACA;AACA;AACA,MAAMW,UAAU,GAAG,aAAa;AAEhC,eAAe,SAASL,UAAUA,CAAA,EAAG;EACpC,MAAM;IAAEM,QAAQ;IAAEC,SAAS;IAAEC;EAAsB,CAAC,GAAGzB,SAAS,CAC7D0B,MAAM,IAAM;IACb;IACA;IACA,MAAM;MACLC,oBAAoB;M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G,GAEpCV,aAAA,CAACf,eAAe,MAAE,CAAC,EACnBe,aAAA,CAAC9B,iBAAiB,MAAE,CAAC,EACrB8B,aAAA,CAAC3B,iBAAiB,MAAE,CAAC,EACrB2B,aAAA,CAAC5B,YAAY,MAAE,CAAC,EAChB4B,aAAA,CAAC7B,cAAc,MAAE,CACV,CAAC,EACT6B,aAAA,CAACpB,UAAU,MAAE,CAAC,EACdoB,aAAA,CAAClB,UAAU,MAAE,CAAC,EACdkB,aAAA,CAACnB,QAAQ,MAAE,CAAC,EACZmB,aAAA,CAAC/B,eAAe,MAAE,CAAC,EACjBqC,KAAK,EACPN,aAAA,CAACtC,MAAM;IACN+C,KAAK,EAAG;MACPG,SAAS,EAAE;IACZ;EAAG,GAEHZ,aAAA,CAACrB,SAAS,MAAE,CACL,CACP,CAEuB,CACjB,CAAC;AAEd","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { PostSticky as PostStickyForm, PostStickyCheck, privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
|
-
import { unlock } from '../../../lock-unlock';
|
|
11
|
-
const {
|
|
12
|
-
PostPanelRow
|
|
13
|
-
} = unlock(editorPrivateApis);
|
|
14
|
-
export function PostSticky() {
|
|
15
|
-
return createElement(PostStickyCheck, null, createElement(PostPanelRow, null, createElement(PostStickyForm, null)));
|
|
16
|
-
}
|
|
17
|
-
export default PostSticky;
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["PostSticky","PostStickyForm","PostStickyCheck","privateApis","editorPrivateApis","unlock","PostPanelRow","createElement"],"sources":["@wordpress/edit-post/src/components/sidebar/post-sticky/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostSticky as PostStickyForm,\n\tPostStickyCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostSticky() {\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostStickyForm />\n\t\t\t</PostPanelRow>\n\t\t</PostStickyCheck>\n\t);\n}\n\nexport default PostSticky;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,IAAIC,cAAc,EAC5BC,eAAe,EACfC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAED,iBAAkB,CAAC;AAEpD,OAAO,SAASJ,UAAUA,CAAA,EAAG;EAC5B,OACCO,aAAA,CAACL,eAAe,QACfK,aAAA,CAACD,YAAY,QACZC,aAAA,CAACN,cAAc,MAAE,CACJ,CACE,CAAC;AAEpB;AAEA,eAAeD,UAAU","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { PostTrash as PostTrashLink, PostTrashCheck } from '@wordpress/editor';
|
|
6
|
-
export default function PostTrash() {
|
|
7
|
-
return createElement(PostTrashCheck, null, createElement(PostTrashLink, null));
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["PostTrash","PostTrashLink","PostTrashCheck","createElement"],"sources":["@wordpress/edit-post/src/components/sidebar/post-trash/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PostTrash as PostTrashLink, PostTrashCheck } from '@wordpress/editor';\n\nexport default function PostTrash() {\n\treturn (\n\t\t<PostTrashCheck>\n\t\t\t<PostTrashLink />\n\t\t</PostTrashCheck>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,aAAa,EAAEC,cAAc,QAAQ,mBAAmB;AAE9E,eAAe,SAASF,SAASA,CAAA,EAAG;EACnC,OACCG,aAAA,CAACD,cAAc,QACdC,aAAA,CAACF,aAAa,MAAE,CACD,CAAC;AAEnB","ignoreList":[]}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
6
|
-
import { Dropdown, Button } from '@wordpress/components';
|
|
7
|
-
import { PostVisibility as PostVisibilityForm, PostVisibilityLabel, PostVisibilityCheck, usePostVisibilityLabel, privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
8
|
-
import { useMemo, useState } from '@wordpress/element';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
|
-
import { unlock } from '../../../lock-unlock';
|
|
14
|
-
const {
|
|
15
|
-
PostPanelRow
|
|
16
|
-
} = unlock(editorPrivateApis);
|
|
17
|
-
export function PostVisibility() {
|
|
18
|
-
// Use internal state instead of a ref to make sure that the component
|
|
19
|
-
// re-renders when the popover's anchor updates.
|
|
20
|
-
const [popoverAnchor, setPopoverAnchor] = useState(null);
|
|
21
|
-
// Memoize popoverProps to avoid returning a new object every time.
|
|
22
|
-
const popoverProps = useMemo(() => ({
|
|
23
|
-
// Anchor the popover to the middle of the entire row so that it doesn't
|
|
24
|
-
// move around when the label changes.
|
|
25
|
-
anchor: popoverAnchor,
|
|
26
|
-
placement: 'bottom-end'
|
|
27
|
-
}), [popoverAnchor]);
|
|
28
|
-
return createElement(PostVisibilityCheck, {
|
|
29
|
-
render: ({
|
|
30
|
-
canEdit
|
|
31
|
-
}) => createElement(PostPanelRow, {
|
|
32
|
-
label: __('Visibility'),
|
|
33
|
-
ref: setPopoverAnchor
|
|
34
|
-
}, !canEdit && createElement("span", null, createElement(PostVisibilityLabel, null)), canEdit && createElement(Dropdown, {
|
|
35
|
-
contentClassName: "edit-post-post-visibility__dialog",
|
|
36
|
-
popoverProps: popoverProps,
|
|
37
|
-
focusOnMount: true,
|
|
38
|
-
renderToggle: ({
|
|
39
|
-
isOpen,
|
|
40
|
-
onToggle
|
|
41
|
-
}) => createElement(PostVisibilityToggle, {
|
|
42
|
-
isOpen: isOpen,
|
|
43
|
-
onClick: onToggle
|
|
44
|
-
}),
|
|
45
|
-
renderContent: ({
|
|
46
|
-
onClose
|
|
47
|
-
}) => createElement(PostVisibilityForm, {
|
|
48
|
-
onClose: onClose
|
|
49
|
-
})
|
|
50
|
-
}))
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
function PostVisibilityToggle({
|
|
54
|
-
isOpen,
|
|
55
|
-
onClick
|
|
56
|
-
}) {
|
|
57
|
-
const label = usePostVisibilityLabel();
|
|
58
|
-
return createElement(Button, {
|
|
59
|
-
__next40pxDefaultSize: true,
|
|
60
|
-
className: "edit-post-post-visibility__toggle",
|
|
61
|
-
variant: "tertiary",
|
|
62
|
-
"aria-expanded": isOpen
|
|
63
|
-
// translators: %s: Current post visibility.
|
|
64
|
-
,
|
|
65
|
-
"aria-label": sprintf(__('Select visibility: %s'), label),
|
|
66
|
-
onClick: onClick
|
|
67
|
-
}, label);
|
|
68
|
-
}
|
|
69
|
-
export default PostVisibility;
|
|
70
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__","sprintf","Dropdown","Button","PostVisibility","PostVisibilityForm","PostVisibilityLabel","PostVisibilityCheck","usePostVisibilityLabel","privateApis","editorPrivateApis","useMemo","useState","unlock","PostPanelRow","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","createElement","render","canEdit","label","ref","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostVisibilityToggle","onClick","renderContent","onClose","__next40pxDefaultSize","className","variant"],"sources":["@wordpress/edit-post/src/components/sidebar/post-visibility/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport {\n\tPostVisibility as PostVisibilityForm,\n\tPostVisibilityLabel,\n\tPostVisibilityCheck,\n\tusePostVisibilityLabel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostVisibility() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostVisibilityCheck\n\t\t\trender={ ( { canEdit } ) => (\n\t\t\t\t<PostPanelRow\n\t\t\t\t\tlabel={ __( 'Visibility' ) }\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t>\n\t\t\t\t\t{ ! canEdit && (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canEdit && (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tcontentClassName=\"edit-post-post-visibility__dialog\"\n\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t\tfocusOnMount\n\t\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityToggle\n\t\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityForm onClose={ onClose } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PostPanelRow>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nfunction PostVisibilityToggle( { isOpen, onClick } ) {\n\tconst label = usePostVisibilityLabel();\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"edit-post-post-visibility__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post visibility.\n\t\t\taria-label={ sprintf( __( 'Select visibility: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n\nexport default PostVisibility;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,uBAAuB;AACxD,SACCC,cAAc,IAAIC,kBAAkB,EACpCC,mBAAmB,EACnBC,mBAAmB,EACnBC,sBAAsB,EACtBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAEH,iBAAkB,CAAC;AAEpD,OAAO,SAASN,cAAcA,CAAA,EAAG;EAChC;EACA;EACA,MAAM,CAAEW,aAAa,EAAEC,gBAAgB,CAAE,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AAenB,cAAc","ignoreList":[]}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
|
6
|
-
import { __, _x } from '@wordpress/i18n';
|
|
7
|
-
import { useSelect } from '@wordpress/data';
|
|
8
|
-
import { forwardRef } from '@wordpress/element';
|
|
9
|
-
import { store as editorStore } from '@wordpress/editor';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Internal dependencies
|
|
13
|
-
*/
|
|
14
|
-
import { unlock } from '../../../lock-unlock';
|
|
15
|
-
import { sidebars } from '../settings-sidebar';
|
|
16
|
-
const {
|
|
17
|
-
Tabs
|
|
18
|
-
} = unlock(componentsPrivateApis);
|
|
19
|
-
const SettingsHeader = (_, ref) => {
|
|
20
|
-
const {
|
|
21
|
-
documentLabel
|
|
22
|
-
} = useSelect(select => {
|
|
23
|
-
const {
|
|
24
|
-
getPostTypeLabel
|
|
25
|
-
} = select(editorStore);
|
|
26
|
-
return {
|
|
27
|
-
// translators: Default label for the Document sidebar tab, not selected.
|
|
28
|
-
documentLabel: getPostTypeLabel() || _x('Document', 'noun')
|
|
29
|
-
};
|
|
30
|
-
}, []);
|
|
31
|
-
return createElement(Tabs.TabList, {
|
|
32
|
-
ref: ref
|
|
33
|
-
}, createElement(Tabs.Tab, {
|
|
34
|
-
tabId: sidebars.document
|
|
35
|
-
// Used for focus management in the SettingsSidebar component.
|
|
36
|
-
,
|
|
37
|
-
"data-tab-id": sidebars.document
|
|
38
|
-
}, documentLabel), createElement(Tabs.Tab, {
|
|
39
|
-
tabId: sidebars.block
|
|
40
|
-
// Used for focus management in the SettingsSidebar component.
|
|
41
|
-
,
|
|
42
|
-
"data-tab-id": sidebars.block
|
|
43
|
-
}, __('Block')));
|
|
44
|
-
};
|
|
45
|
-
export default forwardRef(SettingsHeader);
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["privateApis","componentsPrivateApis","__","_x","useSelect","forwardRef","store","editorStore","unlock","sidebars","Tabs","SettingsHeader","_","ref","documentLabel","select","getPostTypeLabel","createElement","TabList","Tab","tabId","document","block"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nimport { sidebars } from '../settings-sidebar';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SettingsHeader = ( _, ref ) => {\n\tconst { documentLabel } = useSelect( ( select ) => {\n\t\tconst { getPostTypeLabel } = select( editorStore );\n\n\t\treturn {\n\t\t\t// translators: Default label for the Document sidebar tab, not selected.\n\t\t\tdocumentLabel: getPostTypeLabel() || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Tabs.TabList ref={ ref }>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.document }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.document }\n\t\t\t>\n\t\t\t\t{ documentLabel }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.block }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.block }\n\t\t\t>\n\t\t\t\t{ /* translators: Text label for the Block Settings Sidebar tab. */ }\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n};\n\nexport default forwardRef( SettingsHeader );\n"],"mappings":";AAAA;AACA;AACA;AACA,S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ector, store as blockEditorStore } from '@wordpress/block-editor';
|
|
6
|
-
import { useSelect, useDispatch } from '@wordpress/data';
|
|
7
|
-
import { Platform, useCallback, useContext, useEffect, useRef } from '@wordpress/element';
|
|
8
|
-
import { isRTL, __, sprintf } from '@wordpress/i18n';
|
|
9
|
-
import { drawerLeft, drawerRight } from '@wordpress/icons';
|
|
10
|
-
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
11
|
-
import { store as editorStore, PageAttributesPanel, PluginDocumentSettingPanel, PluginSidebar, PostDiscussionPanel, PostLastRevisionPanel, PostTaxonomiesPanel, privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
12
|
-
import { addQueryArgs } from '@wordpress/url';
|
|
13
|
-
import { store as noticesStore } from '@wordpress/notices';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Internal dependencies
|
|
17
|
-
*/
|
|
18
|
-
import SettingsHeader from '../settings-header';
|
|
19
|
-
import PostStatus from '../post-status';
|
|
20
|
-
import MetaBoxes from '../../meta-boxes';
|
|
21
|
-
import { store as editPostStore } from '../../../store';
|
|
22
|
-
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
|
23
|
-
import { unlock } from '../../../lock-unlock';
|
|
24
|
-
const {
|
|
25
|
-
PostCardPanel,
|
|
26
|
-
PostActions,
|
|
27
|
-
interfaceStore
|
|
28
|
-
} = unlock(editorPrivateApis);
|
|
29
|
-
const {
|
|
30
|
-
Tabs
|
|
31
|
-
} = unlock(componentsPrivateApis);
|
|
32
|
-
const {
|
|
33
|
-
PatternOverridesPanel,
|
|
34
|
-
useAutoSwitchEditorSidebars
|
|
35
|
-
} = unlock(editorPrivateApis);
|
|
36
|
-
const SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select({
|
|
37
|
-
web: true,
|
|
38
|
-
native: false
|
|
39
|
-
});
|
|
40
|
-
export const sidebars = {
|
|
41
|
-
document: 'edit-post/document',
|
|
42
|
-
block: 'edit-post/block'
|
|
43
|
-
};
|
|
44
|
-
const SidebarContent = ({
|
|
45
|
-
tabName,
|
|
46
|
-
keyboardShortcut,
|
|
47
|
-
isEditingTemplate
|
|
48
|
-
}) => {
|
|
49
|
-
const tabListRef = useRef(null);
|
|
50
|
-
// Because `PluginSidebar` renders a `ComplementaryArea`, we
|
|
51
|
-
// need to forward the `Tabs` context so it can be passed through the
|
|
52
|
-
// underlying slot/fill.
|
|
53
|
-
const tabsContextValue = useContext(Tabs.Context);
|
|
54
|
-
|
|
55
|
-
// This effect addresses a race condition caused by tabbing from the last
|
|
56
|
-
// block in the editor into the settings sidebar. Without this effect, the
|
|
57
|
-
// selected tab and browser focus can become separated in an unexpected way
|
|
58
|
-
// (e.g the "block" tab is focused, but the "post" tab is selected).
|
|
59
|
-
useEffect(() => {
|
|
60
|
-
const tabsElements = Array.from(tabListRef.current?.querySelectorAll('[role="tab"]') || []);
|
|
61
|
-
const selectedTabElement = tabsElements.find(
|
|
62
|
-
// We are purposefully using a custom `data-tab-id` attribute here
|
|
63
|
-
// because we don't want rely on any assumptions about `Tabs`
|
|
64
|
-
// component internals.
|
|
65
|
-
element => element.getAttribute('data-tab-id') === tabName);
|
|
66
|
-
const activeElement = selectedTabElement?.ownerDocument.activeElement;
|
|
67
|
-
const tabsHasFocus = tabsElements.some(element => {
|
|
68
|
-
return activeElement && activeElement.id === element.id;
|
|
69
|
-
});
|
|
70
|
-
if (tabsHasFocus && selectedTabElement && selectedTabElement.id !== activeElement?.id) {
|
|
71
|
-
selectedTabElement?.focus();
|
|
72
|
-
}
|
|
73
|
-
}, [tabName]);
|
|
74
|
-
const {
|
|
75
|
-
createSuccessNotice
|
|
76
|
-
} = useDispatch(noticesStore);
|
|
77
|
-
const onActionPerformed = useCallback((actionId, items) => {
|
|
78
|
-
switch (actionId) {
|
|
79
|
-
case 'move-to-trash':
|
|
80
|
-
{
|
|
81
|
-
const postType = items[0].type;
|
|
82
|
-
document.location.href = addQueryArgs('edit.php', {
|
|
83
|
-
post_type: postType
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
break;
|
|
87
|
-
case 'duplicate-post':
|
|
88
|
-
{
|
|
89
|
-
const newItem = items[0];
|
|
90
|
-
const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
|
|
91
|
-
createSuccessNotice(sprintf(
|
|
92
|
-
// translators: %s: Title of the created post e.g: "Post 1".
|
|
93
|
-
__('"%s" successfully created.'), title), {
|
|
94
|
-
type: 'snackbar',
|
|
95
|
-
id: 'duplicate-post-action',
|
|
96
|
-
actions: [{
|
|
97
|
-
label: __('Edit'),
|
|
98
|
-
onClick: () => {
|
|
99
|
-
const postId = newItem.id;
|
|
100
|
-
document.location.href = addQueryArgs('post.php', {
|
|
101
|
-
post: postId,
|
|
102
|
-
action: 'edit'
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}]
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
}, [createSuccessNotice]);
|
|
111
|
-
return createElement(PluginSidebar, {
|
|
112
|
-
identifier: tabName,
|
|
113
|
-
header: createElement(Tabs.Context.Provider, {
|
|
114
|
-
value: tabsContextValue
|
|
115
|
-
}, createElement(SettingsHeader, {
|
|
116
|
-
ref: tabListRef
|
|
117
|
-
})),
|
|
118
|
-
closeLabel: __('Close Settings')
|
|
119
|
-
// This classname is added so we can apply a corrective negative
|
|
120
|
-
// margin to the panel.
|
|
121
|
-
// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049
|
|
122
|
-
,
|
|
123
|
-
className: "edit-post-sidebar__panel",
|
|
124
|
-
headerClassName: "edit-post-sidebar__panel-tabs"
|
|
125
|
-
/* translators: button label text should, if possible, be under 16 characters. */,
|
|
126
|
-
title: __('Settings'),
|
|
127
|
-
toggleShortcut: keyboardShortcut,
|
|
128
|
-
icon: isRTL() ? drawerLeft : drawerRight,
|
|
129
|
-
isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT
|
|
130
|
-
}, createElement(Tabs.Context.Provider, {
|
|
131
|
-
value: tabsContextValue
|
|
132
|
-
}, createElement(Tabs.TabPanel, {
|
|
133
|
-
tabId: sidebars.document,
|
|
134
|
-
focusable: false
|
|
135
|
-
}, createElement(PostCardPanel, {
|
|
136
|
-
actions: createElement(PostActions, {
|
|
137
|
-
onActionPerformed: onActionPerformed
|
|
138
|
-
})
|
|
139
|
-
}), !isEditingTemplate && createElement(PostStatus, null), createElement(PluginDocumentSettingPanel.Slot, null), createElement(PostLastRevisionPanel, null), createElement(PostTaxonomiesPanel, null), createElement(PostDiscussionPanel, null), createElement(PageAttributesPanel, null), createElement(PatternOverridesPanel, null), !isEditingTemplate && createElement(MetaBoxes, {
|
|
140
|
-
location: "side"
|
|
141
|
-
})), createElement(Tabs.TabPanel, {
|
|
142
|
-
tabId: sidebars.block,
|
|
143
|
-
focusable: false
|
|
144
|
-
}, createElement(BlockInspector, null))));
|
|
145
|
-
};
|
|
146
|
-
const SettingsSidebar = () => {
|
|
147
|
-
useAutoSwitchEditorSidebars();
|
|
148
|
-
const {
|
|
149
|
-
tabName,
|
|
150
|
-
keyboardShortcut,
|
|
151
|
-
isEditingTemplate
|
|
152
|
-
} = useSelect(select => {
|
|
153
|
-
const shortcut = select(keyboardShortcutsStore).getShortcutRepresentation('core/editor/toggle-sidebar');
|
|
154
|
-
const sidebar = select(interfaceStore).getActiveComplementaryArea('core');
|
|
155
|
-
const _isEditorSidebarOpened = [sidebars.block, sidebars.document].includes(sidebar);
|
|
156
|
-
let _tabName = sidebar;
|
|
157
|
-
if (!_isEditorSidebarOpened) {
|
|
158
|
-
_tabName = !!select(blockEditorStore).getBlockSelectionStart() ? sidebars.block : sidebars.document;
|
|
159
|
-
}
|
|
160
|
-
return {
|
|
161
|
-
tabName: _tabName,
|
|
162
|
-
keyboardShortcut: shortcut,
|
|
163
|
-
isEditingTemplate: select(editorStore).getCurrentPostType() === 'wp_template'
|
|
164
|
-
};
|
|
165
|
-
}, []);
|
|
166
|
-
const {
|
|
167
|
-
openGeneralSidebar
|
|
168
|
-
} = useDispatch(editPostStore);
|
|
169
|
-
const onTabSelect = useCallback(newSelectedTabId => {
|
|
170
|
-
if (!!newSelectedTabId) {
|
|
171
|
-
openGeneralSidebar(newSelectedTabId);
|
|
172
|
-
}
|
|
173
|
-
}, [openGeneralSidebar]);
|
|
174
|
-
return createElement(Tabs, {
|
|
175
|
-
selectedTabId: tabName,
|
|
176
|
-
onSelect: onTabSelect,
|
|
177
|
-
selectOnMove: false
|
|
178
|
-
}, createElement(SidebarContent, {
|
|
179
|
-
tabName: tabName,
|
|
180
|
-
keyboardShortcut: keyboardShortcut,
|
|
181
|
-
isEditingTemplate: isEditingTemplate
|
|
182
|
-
}));
|
|
183
|
-
};
|
|
184
|
-
export default SettingsSidebar;
|
|
185
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BlockInspector","store","blockEditorStore","useSelect","useDispatch","Platform","useCallback","useContext","useEffect","useRef","isRTL","__","sprintf","drawerLeft","drawerRight","keyboardShortcutsStore","editorStore","PageAttributesPanel","PluginDocumentSettingPanel","PluginSidebar","PostDiscussionPanel","PostLastRevisionPanel","PostTaxonomiesPanel","privateApis","editorPrivateApis","addQueryArgs","noticesStore","SettingsHeader","PostStatus","MetaBoxes","editPostStore","componentsPrivateApis","unlock","PostCardPanel","PostActions","interfaceStore","Tabs","PatternOverridesPanel","useAutoSwitchEditorSidebars","SIDEBAR_ACTIVE_BY_DEFAULT","select","web","native","sidebars","document","block","SidebarContent","tabName","keyboardShortcut","isEditingTemplate","tabListRef","tabsContextValue","Context","tabsElements","Array","from","current","querySelectorAll","selectedTabElement","find","element","getAttribute","activeElement","ownerDocument","tabsHasFocus","some","id","focus","createSuccessNotice","onActionPerformed","actionId","items","postType","type","location","href","post_type","newItem","title","rendered","actions","label","onClick","postId","post","action","createElement","identifier","header","Provider","value","ref","closeLabel","className","headerClassName","toggleShortcut","icon","isActiveByDefault","TabPanel","tabId","focusable","Slot","SettingsSidebar","shortcut","getShortcutRepresentation","sidebar","getActiveComplementaryArea","_isEditorSidebarOpened","includes","_tabName","getBlockSelectionStart","getCurrentPostType","openGeneralSidebar","onTabSelect","newSelectedTabId","selectedTabId","onSelect","selectOnMove"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPlatform,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n} from '@wordpress/element';\nimport { isRTL, __, sprintf } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport {\n\tstore as editorStore,\n\tPageAttributesPanel,\n\tPluginDocumentSettingPanel,\n\tPluginSidebar,\n\tPostDiscussionPanel,\n\tPostLastRevisionPanel,\n\tPostTaxonomiesPanel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport SettingsHeader from '../settings-header';\nimport PostStatus from '../post-status';\nimport MetaBoxes from '../../meta-boxes';\nimport { store as editPostStore } from '../../../store';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostCardPanel, PostActions, interfaceStore } =\n\tunlock( editorPrivateApis );\nconst { Tabs } = unlock( componentsPrivateApis );\nconst { PatternOverridesPanel, useAutoSwitchEditorSidebars } =\n\tunlock( editorPrivateApis );\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\nexport const sidebars = {\n\tdocument: 'edit-post/document',\n\tblock: 'edit-post/block',\n};\n\nconst SidebarContent = ( { tabName, keyboardShortcut, isEditingTemplate } ) => {\n\tconst tabListRef = useRef( null );\n\t// Because `PluginSidebar` renders a `ComplementaryArea`, we\n\t// need to forward the `Tabs` context so it can be passed through the\n\t// underlying slot/fill.\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\t// This effect addresses a race condition caused by tabbing from the last\n\t// block in the editor into the settings sidebar. Without this effect, the\n\t// selected tab and browser focus can become separated in an unexpected way\n\t// (e.g the \"block\" tab is focused, but the \"post\" tab is selected).\n\tuseEffect( () => {\n\t\tconst tabsElements = Array.from(\n\t\t\ttabListRef.current?.querySelectorAll( '[role=\"tab\"]' ) || []\n\t\t);\n\t\tconst selectedTabElement = tabsElements.find(\n\t\t\t// We are purposefully using a custom `data-tab-id` attribute here\n\t\t\t// because we don't want rely on any assumptions about `Tabs`\n\t\t\t// component internals.\n\t\t\t( element ) => element.getAttribute( 'data-tab-id' ) === tabName\n\t\t);\n\t\tconst activeElement = selectedTabElement?.ownerDocument.activeElement;\n\t\tconst tabsHasFocus = tabsElements.some( ( element ) => {\n\t\t\treturn activeElement && activeElement.id === element.id;\n\t\t} );\n\t\tif (\n\t\t\ttabsHasFocus &&\n\t\t\tselectedTabElement &&\n\t\t\tselectedTabElement.id !== activeElement?.id\n\t\t) {\n\t\t\tselectedTabElement?.focus();\n\t\t}\n\t}, [ tabName ] );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst postType = items[ 0 ].type;\n\t\t\t\t\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\tpost_type: postType,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\treturn (\n\t\t<PluginSidebar\n\t\t\tidentifier={ tabName }\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SettingsHeader ref={ tabListRef } />\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t// This classname is added so we can apply a corrective negative\n\t\t\t// margin to the panel.\n\t\t\t// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049\n\t\t\tclassName=\"edit-post-sidebar__panel\"\n\t\t\theaderClassName=\"edit-post-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\ttoggleShortcut={ keyboardShortcut }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.document } focusable={ false }>\n\t\t\t\t\t<PostCardPanel\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\t<PostActions\n\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isEditingTemplate && <PostStatus /> }\n\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t<PostLastRevisionPanel />\n\t\t\t\t\t<PostTaxonomiesPanel />\n\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t<PatternOverridesPanel />\n\t\t\t\t\t{ ! isEditingTemplate && <MetaBoxes location=\"side\" /> }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.block } focusable={ false }>\n\t\t\t\t\t<BlockInspector />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</PluginSidebar>\n\t);\n};\n\nconst SettingsSidebar = () => {\n\tuseAutoSwitchEditorSidebars();\n\tconst { tabName, keyboardShortcut, isEditingTemplate } = useSelect(\n\t\t( select ) => {\n\t\t\tconst shortcut = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/editor/toggle-sidebar' );\n\n\t\t\tconst sidebar =\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\t\tconst _isEditorSidebarOpened = [\n\t\t\t\tsidebars.block,\n\t\t\t\tsidebars.document,\n\t\t\t].includes( sidebar );\n\t\t\tlet _tabName = sidebar;\n\t\t\tif ( ! _isEditorSidebarOpened ) {\n\t\t\t\t_tabName = !! select(\n\t\t\t\t\tblockEditorStore\n\t\t\t\t).getBlockSelectionStart()\n\t\t\t\t\t? sidebars.block\n\t\t\t\t\t: sidebars.document;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttabName: _tabName,\n\t\t\t\tkeyboardShortcut: shortcut,\n\t\t\t\tisEditingTemplate:\n\t\t\t\t\tselect( editorStore ).getCurrentPostType() ===\n\t\t\t\t\t'wp_template',\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { openGeneralSidebar } = useDispatch( editPostStore );\n\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\topenGeneralSidebar( newSelectedTabId );\n\t\t\t}\n\t\t},\n\t\t[ openGeneralSidebar ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\tselectedTabId={ tabName }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\ttabName={ tabName }\n\t\t\t\tkeyboardShortcut={ keyboardShortcut }\n\t\t\t\tisEditingTemplate={ isEditingTemplate }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n};\n\nexport default SettingsSidebar;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,MAAM,QACA,oBAAoB;AAC3B,SAASC,KAAK,EA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,sBAAsB,GAAG,CAC9BhE,QAAQ,CAACE,KAAK,EACdF,QAAQ,CAACC,QAAQ,CACjB,CAACgE,QAAQ,CAAEH,OAAQ,CAAC;IACrB,IAAII,QAAQ,GAAGJ,OAAO;IACtB,IAAK,CAAEE,sBAAsB,EAAG;MAC/BE,QAAQ,GAAG,CAAC,CAAErE,MAAM,CACnBtC,gBACD,CAAC,CAAC4G,sBAAsB,CAAC,CAAC,GACvBnE,QAAQ,CAACE,KAAK,GACdF,QAAQ,CAACC,QAAQ;IACrB;IAEA,OAAO;MACNG,OAAO,EAAE8D,QAAQ;MACjB7D,gBAAgB,EAAEuD,QAAQ;MAC1BtD,iBAAiB,EAChBT,MAAM,CAAExB,WAAY,CAAC,CAAC+F,kBAAkB,CAAC,CAAC,KAC1C;IACF,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAED,MAAM;IAAEC;EAAmB,CAAC,GAAG5G,WAAW,CAAE0B,aAAc,CAAC;EAE3D,MAAMmF,WAAW,GAAG3G,WAAW,CAC5B4G,gBAAgB,IAAM;IACvB,IAAK,CAAC,CAAEA,gBAAgB,EAAG;MAC1BF,kBAAkB,CAAEE,gBAAiB,CAAC;IACvC;EACD,CAAC,EACD,CAAEF,kBAAkB,CACrB,CAAC;EAED,OACC1B,aAAA,CAAClD,IAAI;IACJ+E,aAAa,EAAGpE,OAAS;IACzBqE,QAAQ,EAAGH,WAAa;IACxBI,YAAY,EAAG;EAAO,GAEtB/B,aAAA,CAACxC,cAAc;IACdC,OAAO,EAAGA,OAAS;IACnBC,gBAAgB,EAAGA,gBAAkB;IACrCC,iBAAiB,EAAGA;EAAmB,CACvC,CACI,CAAC;AAET,CAAC;AAED,eAAeqD,eAAe","ignoreList":[]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { PanelRow } from '@wordpress/components';
|
|
5
|
-
import {
|
|
6
|
-
PostFormat as PostFormatForm,
|
|
7
|
-
PostFormatCheck,
|
|
8
|
-
} from '@wordpress/editor';
|
|
9
|
-
|
|
10
|
-
export function PostFormat() {
|
|
11
|
-
return (
|
|
12
|
-
<PostFormatCheck>
|
|
13
|
-
<PanelRow className="edit-post-post-format">
|
|
14
|
-
<PostFormatForm />
|
|
15
|
-
</PanelRow>
|
|
16
|
-
</PostFormatCheck>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default PostFormat;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import {
|
|
5
|
-
PostPendingStatus as PostPendingStatusForm,
|
|
6
|
-
PostPendingStatusCheck,
|
|
7
|
-
privateApis as editorPrivateApis,
|
|
8
|
-
} from '@wordpress/editor';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
|
-
import { unlock } from '../../../lock-unlock';
|
|
14
|
-
|
|
15
|
-
const { PostPanelRow } = unlock( editorPrivateApis );
|
|
16
|
-
|
|
17
|
-
export function PostPendingStatus() {
|
|
18
|
-
return (
|
|
19
|
-
<PostPendingStatusCheck>
|
|
20
|
-
<PostPanelRow>
|
|
21
|
-
<PostPendingStatusForm />
|
|
22
|
-
</PostPanelRow>
|
|
23
|
-
</PostPendingStatusCheck>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default PostPendingStatus;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { PanelRow } from '@wordpress/components';
|
|
5
|
-
import { PostSlug as PostSlugForm, PostSlugCheck } from '@wordpress/editor';
|
|
6
|
-
|
|
7
|
-
export function PostSlug() {
|
|
8
|
-
return (
|
|
9
|
-
<PostSlugCheck>
|
|
10
|
-
<PanelRow className="edit-post-post-slug">
|
|
11
|
-
<PostSlugForm />
|
|
12
|
-
</PanelRow>
|
|
13
|
-
</PostSlugCheck>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default PostSlug;
|