@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
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 7.35.0 (2024-05-16)
|
|
6
|
+
|
|
7
|
+
### Internal
|
|
8
|
+
|
|
9
|
+
- Replaced `classnames` package with the faster and smaller `clsx` package ([#61138](https://github.com/WordPress/gutenberg/pull/61138)).
|
|
10
|
+
|
|
5
11
|
## 7.34.0 (2024-05-02)
|
|
6
12
|
|
|
7
13
|
## 7.33.0 (2024-04-19)
|
|
@@ -148,8 +154,8 @@
|
|
|
148
154
|
|
|
149
155
|
### Breaking Changes
|
|
150
156
|
|
|
151
|
-
- Drop support for Internet Explorer 11 ([#31110](https://github.com/WordPress/gutenberg/pull/31110)). Learn more at https://make.wordpress.org/core/2021/04/22/ie-11-support-phase-out-plan
|
|
152
|
-
- Increase the minimum Node.js version to v12 matching Long Term Support releases ([#31270](https://github.com/WordPress/gutenberg/pull/31270)). Learn more at https://nodejs.org/en/about/releases
|
|
157
|
+
- Drop support for Internet Explorer 11 ([#31110](https://github.com/WordPress/gutenberg/pull/31110)). Learn more at <https://make.wordpress.org/core/2021/04/22/ie-11-support-phase-out-plan/>.
|
|
158
|
+
- Increase the minimum Node.js version to v12 matching Long Term Support releases ([#31270](https://github.com/WordPress/gutenberg/pull/31270)). Learn more at <https://nodejs.org/en/about/releases/>.
|
|
153
159
|
|
|
154
160
|
## 3.27.0 (2021-03-17)
|
|
155
161
|
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
9
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
10
|
var _data = require("@wordpress/data");
|
|
11
11
|
var _components = require("@wordpress/components");
|
|
12
12
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -97,7 +97,7 @@ function FullscreenModeClose({
|
|
|
97
97
|
icon: icon
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
const classes = (0,
|
|
100
|
+
const classes = (0, _clsx.default)({
|
|
101
101
|
'edit-post-fullscreen-mode-close': true,
|
|
102
102
|
'has-icon': siteIconUrl
|
|
103
103
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_data","_components","_i18n","_url","_icons","_editor","_coreData","_compose","_store","FullscreenModeClose","showTooltip","icon","href","initialPost","_postType$labels$view","isActive","isRequestingSiteIcon","postType","siteIconUrl","useSelect","select","getCurrentPostType","editorStore","isFeatureActive","editPostStore","getEntityRecord","getPostType","isResolving","coreStore","siteData","undefined","_postType","type","site_icon_url","disableMotion","useReducedMotion","buttonIcon","_react","createElement","Icon","size","wordpress","effect","expand","scale","transition","duration","__unstableMotion","img","variants","alt","__","className","src","classes","clsx","buttonHref","addQueryArgs","post_type","slug","buttonLabel","labels","view_items","div","whileHover","Button","label","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/header/fullscreen-mode-close/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tIcon,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { wordpress } from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useReducedMotion } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst { isActive, isRequestingSiteIcon, postType, siteIconUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { isFeatureActive } = select( editPostStore );\n\t\t\tconst { getEntityRecord, getPostType, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteData =\n\t\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\t\t\tconst _postType = initialPost?.type || getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisActive: isFeatureActive( 'fullscreenMode' ),\n\t\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t\t'root',\n\t\t\t\t\t'__unstableBase',\n\t\t\t\t\tundefined,\n\t\t\t\t] ),\n\t\t\t\tpostType: getPostType( _postType ),\n\t\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst disableMotion = useReducedMotion();\n\n\tif ( ! isActive || ! postType ) {\n\t\treturn null;\n\t}\n\n\tlet buttonIcon = <Icon size=\"36px\" icon={ wordpress } />;\n\n\tconst effect = {\n\t\texpand: {\n\t\t\tscale: 1.25,\n\t\t\ttransition: { type: 'tween', duration: '0.3' },\n\t\t},\n\t};\n\n\tif ( siteIconUrl ) {\n\t\tbuttonIcon = (\n\t\t\t<motion.img\n\t\t\t\tvariants={ ! disableMotion && effect }\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close_site-icon\"\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isRequestingSiteIcon ) {\n\t\tbuttonIcon = null;\n\t}\n\n\t// Override default icon if custom icon is provided via props.\n\tif ( icon ) {\n\t\tbuttonIcon = <Icon size=\"36px\" icon={ icon } />;\n\t}\n\n\tconst classes = clsx( {\n\t\t'edit-post-fullscreen-mode-close': true,\n\t\t'has-icon': siteIconUrl,\n\t} );\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\treturn (\n\t\t<motion.div whileHover=\"expand\">\n\t\t\t<Button\n\t\t\t\tclassName={ classes }\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t>\n\t\t\t\t{ buttonIcon }\n\t\t\t</Button>\n\t\t</motion.div>\n\t);\n}\n\nexport default FullscreenModeClose;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAKA,IAAAS,MAAA,GAAAT,OAAA;AAxBA;AACA;AACA;;AAGA;AACA;AACA;;AAcA;AACA;AACA;;AAGA,SAASU,mBAAmBA,CAAE;EAAEC,W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GN,WAAa;IACrBlD,WAAW,EAAGA;EAAa,GAEzB0B,UACK,CACG,CAAC;AAEf;AAAC,IAAA+B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc5D,mBAAmB","ignoreList":[]}
|
|
@@ -6,22 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
9
|
var _editor = require("@wordpress/editor");
|
|
11
10
|
var _data = require("@wordpress/data");
|
|
12
|
-
var _compose = require("@wordpress/compose");
|
|
13
11
|
var _components = require("@wordpress/components");
|
|
14
|
-
var _preferences = require("@wordpress/preferences");
|
|
15
|
-
var _element = require("@wordpress/element");
|
|
16
12
|
var _fullscreenModeClose = _interopRequireDefault(require("./fullscreen-mode-close"));
|
|
17
13
|
var _moreMenu = _interopRequireDefault(require("./more-menu"));
|
|
18
14
|
var _mainDashboardButton = _interopRequireDefault(require("./main-dashboard-button"));
|
|
19
15
|
var _store = require("../../store");
|
|
20
16
|
var _lockUnlock = require("../../lock-unlock");
|
|
21
|
-
/**
|
|
22
|
-
* External dependencies
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
17
|
/**
|
|
26
18
|
* WordPress dependencies
|
|
27
19
|
*/
|
|
@@ -31,29 +23,8 @@ var _lockUnlock = require("../../lock-unlock");
|
|
|
31
23
|
*/
|
|
32
24
|
|
|
33
25
|
const {
|
|
34
|
-
|
|
35
|
-
DocumentTools,
|
|
36
|
-
PostViewLink,
|
|
37
|
-
PreviewDropdown,
|
|
38
|
-
PinnedItems,
|
|
39
|
-
MoreMenu,
|
|
40
|
-
PostPublishButtonOrToggle
|
|
26
|
+
Header: EditorHeader
|
|
41
27
|
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
42
|
-
const slideY = {
|
|
43
|
-
hidden: {
|
|
44
|
-
y: '-50px'
|
|
45
|
-
},
|
|
46
|
-
distractionFreeInactive: {
|
|
47
|
-
y: 0
|
|
48
|
-
},
|
|
49
|
-
hover: {
|
|
50
|
-
y: 0,
|
|
51
|
-
transition: {
|
|
52
|
-
type: 'tween',
|
|
53
|
-
delay: 0.2
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
28
|
const slideX = {
|
|
58
29
|
hidden: {
|
|
59
30
|
x: '-100%'
|
|
@@ -73,35 +44,16 @@ function Header({
|
|
|
73
44
|
setEntitiesSavedStatesCallback,
|
|
74
45
|
initialPost
|
|
75
46
|
}) {
|
|
76
|
-
const isWideViewport = (0, _compose.useViewportMatch)('large');
|
|
77
|
-
const isLargeViewport = (0, _compose.useViewportMatch)('medium');
|
|
78
47
|
const {
|
|
79
|
-
|
|
80
|
-
hasActiveMetaboxes,
|
|
81
|
-
isPublishSidebarOpened,
|
|
82
|
-
showIconLabels,
|
|
83
|
-
hasHistory,
|
|
84
|
-
hasFixedToolbar
|
|
48
|
+
hasActiveMetaboxes
|
|
85
49
|
} = (0, _data.useSelect)(select => {
|
|
86
|
-
const {
|
|
87
|
-
get: getPreference
|
|
88
|
-
} = select(_preferences.store);
|
|
89
|
-
const {
|
|
90
|
-
getEditorMode
|
|
91
|
-
} = select(_editor.store);
|
|
92
50
|
return {
|
|
93
|
-
|
|
94
|
-
hasActiveMetaboxes: select(_store.store).hasMetaBoxes(),
|
|
95
|
-
hasHistory: !!select(_editor.store).getEditorSettings().onNavigateToPreviousEntityRecord,
|
|
96
|
-
isPublishSidebarOpened: select(_editor.store).isPublishSidebarOpened(),
|
|
97
|
-
showIconLabels: getPreference('core', 'showIconLabels'),
|
|
98
|
-
hasFixedToolbar: getPreference('core', 'fixedToolbar')
|
|
51
|
+
hasActiveMetaboxes: select(_store.store).hasMetaBoxes()
|
|
99
52
|
};
|
|
100
53
|
}, []);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
className: "edit-post-header"
|
|
54
|
+
return (0, _react.createElement)(EditorHeader, {
|
|
55
|
+
forceIsDirty: hasActiveMetaboxes,
|
|
56
|
+
setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback
|
|
105
57
|
}, (0, _react.createElement)(_mainDashboardButton.default.Slot, null, (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
106
58
|
variants: slideX,
|
|
107
59
|
transition: {
|
|
@@ -111,48 +63,7 @@ function Header({
|
|
|
111
63
|
}, (0, _react.createElement)(_fullscreenModeClose.default, {
|
|
112
64
|
showTooltip: true,
|
|
113
65
|
initialPost: initialPost
|
|
114
|
-
}))), (0, _react.createElement)(
|
|
115
|
-
variants: slideY,
|
|
116
|
-
transition: {
|
|
117
|
-
type: 'tween',
|
|
118
|
-
delay: 0.8
|
|
119
|
-
},
|
|
120
|
-
className: "edit-post-header__toolbar"
|
|
121
|
-
}, (0, _react.createElement)(DocumentTools, {
|
|
122
|
-
disableBlockTools: isTextEditor
|
|
123
|
-
}), hasTopToolbar && (0, _react.createElement)(CollapsableBlockToolbar, {
|
|
124
|
-
isCollapsed: isBlockToolsCollapsed,
|
|
125
|
-
onToggle: setIsBlockToolsCollapsed
|
|
126
|
-
}), (0, _react.createElement)("div", {
|
|
127
|
-
className: (0, _classnames.default)('edit-post-header__center', {
|
|
128
|
-
'is-collapsed': hasHistory && !isBlockToolsCollapsed && hasTopToolbar
|
|
129
|
-
})
|
|
130
|
-
}, hasHistory && (0, _react.createElement)(_editor.DocumentBar, null))), (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
131
|
-
variants: slideY,
|
|
132
|
-
transition: {
|
|
133
|
-
type: 'tween',
|
|
134
|
-
delay: 0.8
|
|
135
|
-
},
|
|
136
|
-
className: "edit-post-header__settings"
|
|
137
|
-
}, !isPublishSidebarOpened &&
|
|
138
|
-
// This button isn't completely hidden by the publish sidebar.
|
|
139
|
-
// We can't hide the whole toolbar when the publish sidebar is open because
|
|
140
|
-
// we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.
|
|
141
|
-
// We track that DOM node to return focus to the PostPublishButtonOrToggle
|
|
142
|
-
// when the publish sidebar has been closed.
|
|
143
|
-
(0, _react.createElement)(_editor.PostSavedState, {
|
|
144
|
-
forceIsDirty: hasActiveMetaboxes
|
|
145
|
-
}), (0, _react.createElement)(PreviewDropdown, {
|
|
146
|
-
forceIsAutosaveable: hasActiveMetaboxes
|
|
147
|
-
}), (0, _react.createElement)(_editor.PostPreviewButton, {
|
|
148
|
-
className: "edit-post-header__post-preview-button",
|
|
149
|
-
forceIsAutosaveable: hasActiveMetaboxes
|
|
150
|
-
}), (0, _react.createElement)(PostViewLink, null), (0, _react.createElement)(PostPublishButtonOrToggle, {
|
|
151
|
-
forceIsDirty: hasActiveMetaboxes,
|
|
152
|
-
setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback
|
|
153
|
-
}), (isWideViewport || !showIconLabels) && (0, _react.createElement)(PinnedItems.Slot, {
|
|
154
|
-
scope: "core"
|
|
155
|
-
}), (0, _react.createElement)(MoreMenu, null), (0, _react.createElement)(_moreMenu.default, null)));
|
|
66
|
+
}))), (0, _react.createElement)(_moreMenu.default, null));
|
|
156
67
|
}
|
|
157
68
|
var _default = exports.default = Header;
|
|
158
69
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_editor","_data","_compose","_components","_preferences","_element","_fullscreenModeClose","_moreMenu","_mainDashboardButton","_store","_lockUnlock","CollapsableBlockToolbar","DocumentTools","PostViewLink","PreviewDropdown","PinnedItems","MoreMenu","PostPublishButtonOrToggle","unlock","editorPrivateApis","slideY","hidden","y","distractionFreeInactive","hover","transition","type","delay","slideX","x","Header","setEntitiesSavedStatesCallback","initialPost","isWideViewport","useViewportMatch","isLargeViewport","isTextEditor","hasActiveMetaboxes","isPublishSidebarOpened","showIconLabels","hasHistory","hasFixedToolbar","useSelect","select","get","getPreference","preferencesStore","getEditorMode","editorStore","editPostStore","hasMetaBoxes","getEditorSettings","onNavigateToPreviousEntityRecord","hasTopToolbar","isBlockToolsCollapsed","setIsBlockToolsCollapsed","useState","_react","createElement","className","default","Slot","__unstableMotion","div","variants","showTooltip","disableBlockTools","isCollapsed","onToggle","classnames","DocumentBar","PostSavedState","forceIsDirty","forceIsAutosaveable","PostPreviewButton","scope","_default","exports"],"sources":["@wordpress/edit-post/src/components/header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDocumentBar,\n\tPostSavedState,\n\tPostPreviewButton,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport PostEditorMoreMenu from './more-menu';\nimport MainDashboardButton from './main-dashboard-button';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tCollapsableBlockToolbar,\n\tDocumentTools,\n\tPostViewLink,\n\tPreviewDropdown,\n\tPinnedItems,\n\tMoreMenu,\n\tPostPublishButtonOrToggle,\n} = unlock( editorPrivateApis );\n\nconst slideY = {\n\thidden: { y: '-50px' },\n\tdistractionFreeInactive: { y: 0 },\n\thover: { y: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nconst slideX = {\n\thidden: { x: '-100%' },\n\tdistractionFreeInactive: { x: 0 },\n\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nfunction Header( { setEntitiesSavedStatesCallback, initialPost } ) {\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst {\n\t\tisTextEditor,\n\t\thasActiveMetaboxes,\n\t\tisPublishSidebarOpened,\n\t\tshowIconLabels,\n\t\thasHistory,\n\t\thasFixedToolbar,\n\t} = useSelect( ( select ) => {\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tisTextEditor: getEditorMode() === 'text',\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasHistory:\n\t\t\t\t!! select( editorStore ).getEditorSettings()\n\t\t\t\t\t.onNavigateToPreviousEntityRecord,\n\t\t\tisPublishSidebarOpened:\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t\thasFixedToolbar: getPreference( 'core', 'fixedToolbar' ),\n\t\t};\n\t}, [] );\n\n\tconst hasTopToolbar = isLargeViewport && hasFixedToolbar;\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\treturn (\n\t\t<div className=\"edit-post-header\">\n\t\t\t<MainDashboardButton.Slot>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ slideX }\n\t\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\t>\n\t\t\t\t\t<FullscreenModeClose\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\tinitialPost={ initialPost }\n\t\t\t\t\t/>\n\t\t\t\t</motion.div>\n\t\t\t</MainDashboardButton.Slot>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__toolbar\"\n\t\t\t>\n\t\t\t\t<DocumentTools disableBlockTools={ isTextEditor } />\n\t\t\t\t{ hasTopToolbar && (\n\t\t\t\t\t<CollapsableBlockToolbar\n\t\t\t\t\t\tisCollapsed={ isBlockToolsCollapsed }\n\t\t\t\t\t\tonToggle={ setIsBlockToolsCollapsed }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames( 'edit-post-header__center', {\n\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\thasHistory &&\n\t\t\t\t\t\t\t! isBlockToolsCollapsed &&\n\t\t\t\t\t\t\thasTopToolbar,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ hasHistory && <DocumentBar /> }\n\t\t\t\t</div>\n\t\t\t</motion.div>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__settings\"\n\t\t\t>\n\t\t\t\t{ ! isPublishSidebarOpened && (\n\t\t\t\t\t// This button isn't completely hidden by the publish sidebar.\n\t\t\t\t\t// We can't hide the whole toolbar when the publish sidebar is open because\n\t\t\t\t\t// we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.\n\t\t\t\t\t// We track that DOM node to return focus to the PostPublishButtonOrToggle\n\t\t\t\t\t// when the publish sidebar has been closed.\n\t\t\t\t\t<PostSavedState forceIsDirty={ hasActiveMetaboxes } />\n\t\t\t\t) }\n\t\t\t\t<PreviewDropdown forceIsAutosaveable={ hasActiveMetaboxes } />\n\t\t\t\t<PostPreviewButton\n\t\t\t\t\tclassName=\"edit-post-header__post-preview-button\"\n\t\t\t\t\tforceIsAutosaveable={ hasActiveMetaboxes }\n\t\t\t\t/>\n\t\t\t\t<PostViewLink />\n\t\t\t\t<PostPublishButtonOrToggle\n\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<PinnedItems.Slot scope=\"core\" />\n\t\t\t\t) }\n\t\t\t\t<MoreMenu />\n\t\t\t\t<PostEditorMoreMenu />\n\t\t\t</motion.div>\n\t\t</div>\n\t);\n}\n\nexport default Header;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AAc;IAACC,YAAY,EAAGnC;EAAoB,CAAE,CACrD,EACD,IAAAoB,MAAA,CAAAC,aAAA,EAAC5C,eAAe;IAAC2D,mBAAmB,EAAGpC;EAAoB,CAAE,CAAC,EAC9D,IAAAoB,MAAA,CAAAC,aAAA,EAAC1D,OAAA,CAAA0E,iBAAiB;IACjBf,SAAS,EAAC,uCAAuC;IACjDc,mBAAmB,EAAGpC;EAAoB,CAC1C,CAAC,EACF,IAAAoB,MAAA,CAAAC,aAAA,EAAC7C,YAAY,MAAE,CAAC,EAChB,IAAA4C,MAAA,CAAAC,aAAA,EAACzC,yBAAyB;IACzBuD,YAAY,EAAGnC,kBAAoB;IACnCN,8BAA8B,EAC7BA;EACA,CACD,CAAC,EACA,CAAEE,cAAc,IAAI,CAAEM,cAAc,KACrC,IAAAkB,MAAA,CAAAC,aAAA,EAAC3C,WAAW,CAAC8C,IAAI;IAACc,KAAK,EAAC;EAAM,CAAE,CAChC,EACD,IAAAlB,MAAA,CAAAC,aAAA,EAAC1C,QAAQ,MAAE,CAAC,EACZ,IAAAyC,MAAA,CAAAC,aAAA,EAACnD,SAAA,CAAAqD,OAAkB,MAAE,CACV,CACR,CAAC;AAER;AAAC,IAAAgB,QAAA,GAAAC,OAAA,CAAAjB,OAAA,GAEc9B,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_editor","require","_data","_components","_fullscreenModeClose","_interopRequireDefault","_moreMenu","_mainDashboardButton","_store","_lockUnlock","Header","EditorHeader","unlock","editorPrivateApis","slideX","hidden","x","distractionFreeInactive","hover","transition","type","delay","setEntitiesSavedStatesCallback","initialPost","hasActiveMetaboxes","useSelect","select","editPostStore","hasMetaBoxes","_react","createElement","forceIsDirty","default","Slot","__unstableMotion","div","variants","showTooltip","_default","exports"],"sources":["@wordpress/edit-post/src/components/header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport PostEditorMoreMenu from './more-menu';\nimport MainDashboardButton from './main-dashboard-button';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { Header: EditorHeader } = unlock( editorPrivateApis );\n\nconst slideX = {\n\thidden: { x: '-100%' },\n\tdistractionFreeInactive: { x: 0 },\n\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nfunction Header( { setEntitiesSavedStatesCallback, initialPost } ) {\n\tconst { hasActiveMetaboxes } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<EditorHeader\n\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\tsetEntitiesSavedStatesCallback={ setEntitiesSavedStatesCallback }\n\t\t>\n\t\t\t<MainDashboardButton.Slot>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ slideX }\n\t\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\t>\n\t\t\t\t\t<FullscreenModeClose\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\tinitialPost={ initialPost }\n\t\t\t\t\t/>\n\t\t\t\t</motion.div>\n\t\t\t</MainDashboardButton.Slot>\n\t\t\t<PostEditorMoreMenu />\n\t\t</EditorHeader>\n\t);\n}\n\nexport default Header;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,oBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,oBAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,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jB;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAP,OAAA,GAEctB,MAAM","ignoreList":[]}
|
|
@@ -29,7 +29,7 @@ function ManagePatternsMenuItem() {
|
|
|
29
29
|
// The site editor and templates both check whether the user has
|
|
30
30
|
// edit_theme_options capabilities. We can leverage that here and not
|
|
31
31
|
// display the manage patterns link if the user can't access it.
|
|
32
|
-
return canUser('
|
|
32
|
+
return canUser('create', 'templates') ? patternsUrl : defaultUrl;
|
|
33
33
|
}, []);
|
|
34
34
|
return (0, _react.createElement)(_components.MenuItem, {
|
|
35
35
|
role: "menuitem",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_coreData","_data","_i18n","_url","ManagePatternsMenuItem","url","useSelect","select","canUser","coreStore","defaultUrl","addQueryArgs","post_type","patternsUrl","path","_react","createElement","MenuItem","role","href","__","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/header/more-menu/manage-patterns-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\n\nfunction ManagePatternsMenuItem() {\n\tconst url = useSelect( ( select ) => {\n\t\tconst { canUser } = select( coreStore );\n\t\tconst defaultUrl = addQueryArgs( 'edit.php', {\n\t\t\tpost_type: 'wp_block',\n\t\t} );\n\t\tconst patternsUrl = addQueryArgs( 'site-editor.php', {\n\t\t\tpath: '/patterns',\n\t\t} );\n\n\t\t// The site editor and templates both check whether the user has\n\t\t// edit_theme_options capabilities. We can leverage that here and not\n\t\t// display the manage patterns link if the user can't access it.\n\t\treturn canUser( '
|
|
1
|
+
{"version":3,"names":["_components","require","_coreData","_data","_i18n","_url","ManagePatternsMenuItem","url","useSelect","select","canUser","coreStore","defaultUrl","addQueryArgs","post_type","patternsUrl","path","_react","createElement","MenuItem","role","href","__","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/header/more-menu/manage-patterns-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\n\nfunction ManagePatternsMenuItem() {\n\tconst url = useSelect( ( select ) => {\n\t\tconst { canUser } = select( coreStore );\n\t\tconst defaultUrl = addQueryArgs( 'edit.php', {\n\t\t\tpost_type: 'wp_block',\n\t\t} );\n\t\tconst patternsUrl = addQueryArgs( 'site-editor.php', {\n\t\t\tpath: '/patterns',\n\t\t} );\n\n\t\t// The site editor and templates both check whether the user has\n\t\t// edit_theme_options capabilities. We can leverage that here and not\n\t\t// display the manage patterns link if the user can't access it.\n\t\treturn canUser( 'create', 'templates' ) ? patternsUrl : defaultUrl;\n\t}, [] );\n\n\treturn (\n\t\t<MenuItem role=\"menuitem\" href={ url }>\n\t\t\t{ __( 'Manage patterns' ) }\n\t\t</MenuItem>\n\t);\n}\n\nexport default ManagePatternsMenuItem;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AAPA;AACA;AACA;;AAOA,SAASK,sBAAsBA,CAAA,EAAG;EACjC,MAAMC,GAAG,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACpC,MAAM;MAAEC;IAAQ,CAAC,GAAGD,MAAM,CAAEE,eAAU,CAAC;IACvC,MAAMC,UAAU,GAAG,IAAAC,iBAAY,EAAE,UAAU,EAAE;MAC5CC,SAAS,EAAE;IACZ,CAAE,CAAC;IACH,MAAMC,WAAW,GAAG,IAAAF,iBAAY,EAAE,iBAAiB,EAAE;MACpDG,IAAI,EAAE;IACP,CAAE,CAAC;;IAEH;IACA;IACA;IACA,OAAON,OAAO,CAAE,QAAQ,EAAE,WAAY,CAAC,GAAGK,WAAW,GAAGH,UAAU;EACnE,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAK,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAAmB,QAAQ;IAACC,IAAI,EAAC,UAAU;IAACC,IAAI,EAAGd;EAAK,GACnC,IAAAe,QAAE,EAAE,iBAAkB,CACf,CAAC;AAEb;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcnB,sBAAsB","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
9
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
10
|
var _editor = require("@wordpress/editor");
|
|
11
11
|
var _data = require("@wordpress/data");
|
|
12
12
|
var _blockEditor = require("@wordpress/block-editor");
|
|
@@ -21,13 +21,13 @@ var _preferences = require("@wordpress/preferences");
|
|
|
21
21
|
var _commands = require("@wordpress/commands");
|
|
22
22
|
var _coreCommands = require("@wordpress/core-commands");
|
|
23
23
|
var _blockLibrary = require("@wordpress/block-library");
|
|
24
|
+
var _url = require("@wordpress/url");
|
|
24
25
|
var _textEditor = _interopRequireDefault(require("../text-editor"));
|
|
25
26
|
var _visualEditor = _interopRequireDefault(require("../visual-editor"));
|
|
26
27
|
var _keyboardShortcuts2 = _interopRequireDefault(require("../keyboard-shortcuts"));
|
|
27
28
|
var _initPatternModal = _interopRequireDefault(require("../init-pattern-modal"));
|
|
28
29
|
var _browserUrl = _interopRequireDefault(require("../browser-url"));
|
|
29
30
|
var _header = _interopRequireDefault(require("../header"));
|
|
30
|
-
var _settingsSidebar = _interopRequireDefault(require("../sidebar/settings-sidebar"));
|
|
31
31
|
var _metaBoxes = _interopRequireDefault(require("../meta-boxes"));
|
|
32
32
|
var _welcomeGuide = _interopRequireDefault(require("../welcome-guide"));
|
|
33
33
|
var _store = require("../../store");
|
|
@@ -61,7 +61,8 @@ const {
|
|
|
61
61
|
FullscreenMode,
|
|
62
62
|
SavePublishPanels,
|
|
63
63
|
InterfaceSkeleton,
|
|
64
|
-
interfaceStore
|
|
64
|
+
interfaceStore,
|
|
65
|
+
Sidebar
|
|
65
66
|
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
66
67
|
const {
|
|
67
68
|
BlockKeyboardShortcuts
|
|
@@ -118,7 +119,6 @@ function Layout({
|
|
|
118
119
|
useCommands();
|
|
119
120
|
(0, _useCommonCommands.default)();
|
|
120
121
|
const isMobileViewport = (0, _compose.useViewportMatch)('medium', '<');
|
|
121
|
-
const isHugeViewport = (0, _compose.useViewportMatch)('huge', '>=');
|
|
122
122
|
const isWideViewport = (0, _compose.useViewportMatch)('large');
|
|
123
123
|
const isLargeViewport = (0, _compose.useViewportMatch)('medium');
|
|
124
124
|
const {
|
|
@@ -127,9 +127,6 @@ function Layout({
|
|
|
127
127
|
const {
|
|
128
128
|
createErrorNotice
|
|
129
129
|
} = (0, _data.useDispatch)(_notices.store);
|
|
130
|
-
const {
|
|
131
|
-
setIsInserterOpened
|
|
132
|
-
} = (0, _data.useDispatch)(_editor.store);
|
|
133
130
|
const {
|
|
134
131
|
mode,
|
|
135
132
|
isFullscreenActive,
|
|
@@ -147,7 +144,9 @@ function Layout({
|
|
|
147
144
|
showMetaBoxes,
|
|
148
145
|
documentLabel,
|
|
149
146
|
hasHistory,
|
|
150
|
-
hasBlockBreadcrumbs
|
|
147
|
+
hasBlockBreadcrumbs,
|
|
148
|
+
blockEditorMode,
|
|
149
|
+
isEditingTemplate
|
|
151
150
|
} = (0, _data.useSelect)(select => {
|
|
152
151
|
const {
|
|
153
152
|
get
|
|
@@ -176,7 +175,9 @@ function Layout({
|
|
|
176
175
|
documentLabel: postTypeLabel || (0, _i18n._x)('Document', 'noun'),
|
|
177
176
|
hasBlockSelected: !!select(_blockEditor.store).getBlockSelectionStart(),
|
|
178
177
|
hasHistory: !!getEditorSettings().onNavigateToPreviousEntityRecord,
|
|
179
|
-
hasBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs')
|
|
178
|
+
hasBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
|
|
179
|
+
blockEditorMode: select(_blockEditor.store).__unstableGetEditorMode(),
|
|
180
|
+
isEditingTemplate: select(_editor.store).getCurrentPostType() === 'wp_template'
|
|
180
181
|
};
|
|
181
182
|
}, []);
|
|
182
183
|
|
|
@@ -185,18 +186,6 @@ function Layout({
|
|
|
185
186
|
useCommandContext(commandContext);
|
|
186
187
|
const styles = useEditorStyles();
|
|
187
188
|
|
|
188
|
-
// Inserter and Sidebars are mutually exclusive
|
|
189
|
-
(0, _element.useEffect)(() => {
|
|
190
|
-
if (sidebarIsOpened && !isHugeViewport) {
|
|
191
|
-
setIsInserterOpened(false);
|
|
192
|
-
}
|
|
193
|
-
}, [isHugeViewport, setIsInserterOpened, sidebarIsOpened]);
|
|
194
|
-
(0, _element.useEffect)(() => {
|
|
195
|
-
if (isInserterOpened && !isHugeViewport) {
|
|
196
|
-
closeGeneralSidebar();
|
|
197
|
-
}
|
|
198
|
-
}, [closeGeneralSidebar, isInserterOpened, isHugeViewport]);
|
|
199
|
-
|
|
200
189
|
// Local state for save panel.
|
|
201
190
|
// Note 'truthy' callback implies an open panel.
|
|
202
191
|
const [entitiesSavedStatesCallback, setEntitiesSavedStatesCallback] = (0, _element.useState)(false);
|
|
@@ -213,7 +202,7 @@ function Layout({
|
|
|
213
202
|
} else {
|
|
214
203
|
document.body.classList.remove('show-icon-labels');
|
|
215
204
|
}
|
|
216
|
-
const className = (0,
|
|
205
|
+
const className = (0, _clsx.default)('edit-post-layout', 'is-mode-' + mode, {
|
|
217
206
|
'is-sidebar-opened': sidebarIsOpened,
|
|
218
207
|
'has-metaboxes': hasActiveMetaboxes,
|
|
219
208
|
'is-distraction-free': isDistractionFree && isWideViewport,
|
|
@@ -237,6 +226,44 @@ function Layout({
|
|
|
237
226
|
createErrorNotice((0, _i18n.sprintf)( /* translators: %s: plugin name */
|
|
238
227
|
(0, _i18n.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
|
|
239
228
|
}
|
|
229
|
+
const {
|
|
230
|
+
createSuccessNotice
|
|
231
|
+
} = (0, _data.useDispatch)(_notices.store);
|
|
232
|
+
const onActionPerformed = (0, _element.useCallback)((actionId, items) => {
|
|
233
|
+
switch (actionId) {
|
|
234
|
+
case 'move-to-trash':
|
|
235
|
+
{
|
|
236
|
+
document.location.href = (0, _url.addQueryArgs)('edit.php', {
|
|
237
|
+
trashed: 1,
|
|
238
|
+
post_type: items[0].type,
|
|
239
|
+
ids: items[0].id
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
break;
|
|
243
|
+
case 'duplicate-post':
|
|
244
|
+
{
|
|
245
|
+
const newItem = items[0];
|
|
246
|
+
const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
|
|
247
|
+
createSuccessNotice((0, _i18n.sprintf)(
|
|
248
|
+
// translators: %s: Title of the created post e.g: "Post 1".
|
|
249
|
+
(0, _i18n.__)('"%s" successfully created.'), title), {
|
|
250
|
+
type: 'snackbar',
|
|
251
|
+
id: 'duplicate-post-action',
|
|
252
|
+
actions: [{
|
|
253
|
+
label: (0, _i18n.__)('Edit'),
|
|
254
|
+
onClick: () => {
|
|
255
|
+
const postId = newItem.id;
|
|
256
|
+
document.location.href = (0, _url.addQueryArgs)('post.php', {
|
|
257
|
+
post: postId,
|
|
258
|
+
action: 'edit'
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}]
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
}, [createSuccessNotice]);
|
|
240
267
|
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(FullscreenMode, {
|
|
241
268
|
isActive: isFullscreenActive
|
|
242
269
|
}), (0, _react.createElement)(_browserUrl.default, {
|
|
@@ -269,7 +296,7 @@ function Layout({
|
|
|
269
296
|
}), (0, _react.createElement)(_metaBoxes.default, {
|
|
270
297
|
location: "advanced"
|
|
271
298
|
})), isMobileViewport && sidebarIsOpened && (0, _react.createElement)(_components.ScrollLock, null)),
|
|
272
|
-
footer: !isDistractionFree && !isMobileViewport && showBlockBreadcrumbs && isRichEditingEnabled && mode === 'visual' && (0, _react.createElement)("div", {
|
|
299
|
+
footer: !isDistractionFree && !isMobileViewport && showBlockBreadcrumbs && isRichEditingEnabled && blockEditorMode !== 'zoom-out' && mode === 'visual' && (0, _react.createElement)("div", {
|
|
273
300
|
className: "edit-post-layout__footer"
|
|
274
301
|
}, (0, _react.createElement)(_blockEditor.BlockBreadcrumb, {
|
|
275
302
|
rootLabelText: documentLabel
|
|
@@ -286,7 +313,12 @@ function Layout({
|
|
|
286
313
|
}
|
|
287
314
|
}), (0, _react.createElement)(_welcomeGuide.default, null), (0, _react.createElement)(_initPatternModal.default, null), (0, _react.createElement)(_plugins.PluginArea, {
|
|
288
315
|
onError: onPluginAreaError
|
|
289
|
-
}), !isDistractionFree && (0, _react.createElement)(
|
|
316
|
+
}), !isDistractionFree && (0, _react.createElement)(Sidebar, {
|
|
317
|
+
onActionPerformed: onActionPerformed,
|
|
318
|
+
extraPanels: !isEditingTemplate && (0, _react.createElement)(_metaBoxes.default, {
|
|
319
|
+
location: "side"
|
|
320
|
+
})
|
|
321
|
+
}));
|
|
290
322
|
}
|
|
291
323
|
var _default = exports.default = Layout;
|
|
292
324
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_editor","_data","_blockEditor","_components","_compose","_plugins","_i18n","_element","_keyboardShortcuts","_notices","_preferences","_commands","_coreCommands","_blockLibrary","_textEditor","_visualEditor","_keyboardShortcuts2","_initPatternModal","_browserUrl","_header","_settingsSidebar","_metaBoxes","_welcomeGuide","_store","_lockUnlock","_useCommonCommands","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","InserterSidebar","ListViewSidebar","ComplementaryArea","FullscreenMode","SavePublishPanels","InterfaceSkeleton","interfaceStore","editorPrivateApis","BlockKeyboardShortcuts","blockLibraryPrivateApis","interfaceLabels","header","__","body","sidebar","actions","footer","useEditorStyles","hasThemeStyleSupport","editorSettings","useSelect","select","editPostStore","isFeatureActive","editorStore","getEditorSettings","useMemo","_editorSettings$style","_editorSettings$style2","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","Layout","initialPost","useCommonCommands","isMobileViewport","useViewportMatch","isHugeViewport","isWideViewport","isLargeViewport","closeGeneralSidebar","useDispatch","createErrorNotice","noticesStore","setIsInserterOpened","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","documentLabel","hasHistory","hasBlockBreadcrumbs","get","preferencesStore","getPostTypeLabel","postTypeLabel","getRenderingMode","getActiveComplementaryArea","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","keyboardShortcutsStore","getAllShortcutKeyCombinations","_x","blockEditorStore","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","useEffect","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","useState","closeEntitiesSavedStates","useCallback","arg","document","classList","add","remove","className","classnames","secondarySidebarLabel","secondarySidebar","_react","createElement","isRightSidebarOpen","onPluginAreaError","name","sprintf","Fragment","isActive","default","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","labels","editorNotices","EditorNotices","Slot","scope","notices","EditorSnackbars","content","BlockToolbar","hideDragHandle","location","ScrollLock","BlockBreadcrumb","rootLabelText","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","shortcuts","previous","next","PluginArea","onError","_default","exports"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorSnackbars,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport SettingsSidebar from '../sidebar/settings-sidebar';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useCommonCommands from '../../hooks/commands/use-common-commands';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst {\n\tInserterSidebar,\n\tListViewSidebar,\n\tComplementaryArea,\n\tFullscreenMode,\n\tSavePublishPanels,\n\tInterfaceSkeleton,\n\tinterfaceStore,\n} = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nfunction useEditorStyles() {\n\tconst { hasThemeStyleSupport, editorSettings } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...editorSettings.defaultEditorStyles,\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\treturn hasThemeStyles ? editorSettings.styles : defaultEditorStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t] );\n}\n\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseCommonCommands();\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst { closeGeneralSidebar } = useDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tisRichEditingEnabled,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tshowMetaBoxes,\n\t\tdocumentLabel,\n\t\thasHistory,\n\t\thasBlockBreadcrumbs,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' ) ||\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editorStore ).isListViewOpened(),\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/editor/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/editor/next-region' ),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\tdocumentLabel: postTypeLabel || _x( 'Document', 'noun' ),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\thasBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'post-editor-edit';\n\tuseCommandContext( commandContext );\n\n\tconst styles = useEditorStyles();\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( sidebarIsOpened && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t}\n\t}, [ isHugeViewport, setIsInserterOpened, sidebarIsOpened ] );\n\tuseEffect( () => {\n\t\tif ( isInserterOpened && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ closeGeneralSidebar, isInserterOpened, isHugeViewport ] );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst className = classnames( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isWideViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t\t'has-block-breadcrumbs':\n\t\t\thasBlockBreadcrumbs && ! isDistractionFree && isWideViewport,\n\t} );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\tconst secondarySidebar = () => {\n\t\tif ( mode === 'visual' && isInserterOpened ) {\n\t\t\treturn (\n\t\t\t\t<InserterSidebar\n\t\t\t\t\tcloseGeneralSidebar={ closeGeneralSidebar }\n\t\t\t\t\tisRightSidebarOpen={ sidebarIsOpened }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn <ListViewSidebar />;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<EditorKeyboardShortcuts />\n\t\t\t<BlockKeyboardShortcuts />\n\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isWideViewport }\n\t\t\t\tclassName={ className }\n\t\t\t\tlabels={ {\n\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t} }\n\t\t\t\theader={\n\t\t\t\t\t<Header\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinitialPost={ initialPost }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\t\tsecondarySidebar={ secondarySidebar() }\n\t\t\t\tsidebar={\n\t\t\t\t\t! isDistractionFree && (\n\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core\" />\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isDistractionFree && <EditorNotices /> }\n\t\t\t\t\t\t{ ( mode === 'text' || ! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t<TextEditor />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isLargeViewport && <BlockToolbar hideDragHandle /> }\n\t\t\t\t\t\t{ isRichEditingEnabled && mode === 'visual' && (\n\t\t\t\t\t\t\t<VisualEditor styles={ styles } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isMobileViewport && sidebarIsOpened && (\n\t\t\t\t\t\t\t<ScrollLock />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t! isMobileViewport &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\tisRichEditingEnabled &&\n\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t<div className=\"edit-post-layout__footer\">\n\t\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<SavePublishPanels\n\t\t\t\t\t\tcloseEntitiesSavedStates={ closeEntitiesSavedStates }\n\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforceIsDirtyPublishPanel={ hasActiveMetaboxes }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tshortcuts={ {\n\t\t\t\t\tprevious: previousShortcut,\n\t\t\t\t\tnext: nextShortcut,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && <SettingsSidebar /> }\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAWA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAMA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,aAAA,GAAAb,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AAKA,IAAAe,WAAA,GAAAhB,sBAAA,CAAAC,OAAA;AACA,IAAAgB,aAAA,GAAAjB,sBAAA,CAAAC,OAAA;AACA,IAAAiB,mBAAA,GAAAlB,sBAAA,CAAAC,OAAA;AACA,IAAAkB,iBAAA,GAAAnB,sBAAA,CAAAC,OAAA;AACA,IAAAmB,WAAA,GAAApB,sBAAA,CAAAC,OAAA;AACA,IAAAoB,OAAA,GAAArB,sBAAA,CAAAC,OAAA;AACA,IAAAqB,gBAAA,GAAAtB,sBAAA,CAAAC,OAAA;AACA,IAAAsB,UAAA,GAAAvB,sBAAA,CAAAC,OAAA;AACA,IAAAuB,aAAA,GAAAxB,sBAAA,CAAAC,OAAA;AACA,IAAAwB,MAAA,GAAAxB,OAAA;AACA,I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AAC,EACF,IAAA2C,MAAA,CAAAC,aAAA,EAACtH,aAAA,CAAA6H,OAAY,MAAE,CAAC,EAChB,IAAAR,MAAA,CAAAC,aAAA,EAAC3H,iBAAA,CAAAkI,OAAgB,MAAE,CAAC,EACpB,IAAAR,MAAA,CAAAC,aAAA,EAACvI,QAAA,CAAAuK,UAAU;IAACC,OAAO,EAAG/B;EAAmB,CAAE,CAAC,EAC1C,CAAEzC,iBAAiB,IAAI,IAAAsC,MAAA,CAAAC,aAAA,EAACxH,gBAAA,CAAA+H,OAAe,MAAE,CAC1C,CAAC;AAEL;AAAC,IAAA2B,QAAA,GAAAC,OAAA,CAAA5B,OAAA,GAEctE,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_editor","_data","_blockEditor","_components","_compose","_plugins","_i18n","_element","_keyboardShortcuts","_notices","_preferences","_commands","_coreCommands","_blockLibrary","_url","_textEditor","_visualEditor","_keyboardShortcuts2","_initPatternModal","_browserUrl","_header","_metaBoxes","_welcomeGuide","_store","_lockUnlock","_useCommonCommands","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","InserterSidebar","ListViewSidebar","ComplementaryArea","FullscreenMode","SavePublishPanels","InterfaceSkeleton","interfaceStore","Sidebar","editorPrivateApis","BlockKeyboardShortcuts","blockLibraryPrivateApis","interfaceLabels","header","__","body","sidebar","actions","footer","useEditorStyles","hasThemeStyleSupport","editorSettings","useSelect","select","editPostStore","isFeatureActive","editorStore","getEditorSettings","useMemo","_editorSettings$style","_editorSettings$style2","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","Layout","initialPost","useCommonCommands","isMobileViewport","useViewportMatch","isWideViewport","isLargeViewport","closeGeneralSidebar","useDispatch","createErrorNotice","noticesStore","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","documentLabel","hasHistory","hasBlockBreadcrumbs","blockEditorMode","isEditingTemplate","get","preferencesStore","getPostTypeLabel","postTypeLabel","getRenderingMode","getActiveComplementaryArea","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","keyboardShortcutsStore","getAllShortcutKeyCombinations","_x","blockEditorStore","getBlockSelectionStart","onNavigateToPreviousEntityRecord","__unstableGetEditorMode","getCurrentPostType","commandContext","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","useState","closeEntitiesSavedStates","useCallback","arg","document","classList","add","remove","className","clsx","secondarySidebarLabel","secondarySidebar","_react","createElement","isRightSidebarOpen","onPluginAreaError","name","sprintf","createSuccessNotice","onActionPerformed","actionId","items","location","href","addQueryArgs","trashed","post_type","type","ids","id","newItem","title","rendered","label","onClick","postId","post","action","Fragment","isActive","default","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","labels","editorNotices","EditorNotices","Slot","scope","notices","EditorSnackbars","content","BlockToolbar","hideDragHandle","ScrollLock","BlockBreadcrumb","rootLabelText","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","shortcuts","previous","next","PluginArea","onError","extraPanels","_default","exports"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorSnackbars,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useCommonCommands from '../../hooks/commands/use-common-commands';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst {\n\tInserterSidebar,\n\tListViewSidebar,\n\tComplementaryArea,\n\tFullscreenMode,\n\tSavePublishPanels,\n\tInterfaceSkeleton,\n\tinterfaceStore,\n\tSidebar,\n} = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nfunction useEditorStyles() {\n\tconst { hasThemeStyleSupport, editorSettings } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...editorSettings.defaultEditorStyles,\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\treturn hasThemeStyles ? editorSettings.styles : defaultEditorStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t] );\n}\n\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseCommonCommands();\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst { closeGeneralSidebar } = useDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tisRichEditingEnabled,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tshowMetaBoxes,\n\t\tdocumentLabel,\n\t\thasHistory,\n\t\thasBlockBreadcrumbs,\n\t\tblockEditorMode,\n\t\tisEditingTemplate,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' ) ||\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editorStore ).isListViewOpened(),\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/editor/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/editor/next-region' ),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\tdocumentLabel: postTypeLabel || _x( 'Document', 'noun' ),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\thasBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tblockEditorMode:\n\t\t\t\tselect( blockEditorStore ).__unstableGetEditorMode(),\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'post-editor-edit';\n\tuseCommandContext( commandContext );\n\n\tconst styles = useEditorStyles();\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst className = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isWideViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t\t'has-block-breadcrumbs':\n\t\t\thasBlockBreadcrumbs && ! isDistractionFree && isWideViewport,\n\t} );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\tconst secondarySidebar = () => {\n\t\tif ( mode === 'visual' && isInserterOpened ) {\n\t\t\treturn (\n\t\t\t\t<InserterSidebar\n\t\t\t\t\tcloseGeneralSidebar={ closeGeneralSidebar }\n\t\t\t\t\tisRightSidebarOpen={ sidebarIsOpened }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn <ListViewSidebar />;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\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\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\ttrashed: 1,\n\t\t\t\t\t\t\tpost_type: items[ 0 ].type,\n\t\t\t\t\t\t\tids: items[ 0 ].id,\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<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<EditorKeyboardShortcuts />\n\t\t\t<BlockKeyboardShortcuts />\n\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isWideViewport }\n\t\t\t\tclassName={ className }\n\t\t\t\tlabels={ {\n\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t} }\n\t\t\t\theader={\n\t\t\t\t\t<Header\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinitialPost={ initialPost }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\t\tsecondarySidebar={ secondarySidebar() }\n\t\t\t\tsidebar={\n\t\t\t\t\t! isDistractionFree && (\n\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core\" />\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isDistractionFree && <EditorNotices /> }\n\t\t\t\t\t\t{ ( mode === 'text' || ! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t<TextEditor />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isLargeViewport && <BlockToolbar hideDragHandle /> }\n\t\t\t\t\t\t{ isRichEditingEnabled && mode === 'visual' && (\n\t\t\t\t\t\t\t<VisualEditor styles={ styles } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isMobileViewport && sidebarIsOpened && (\n\t\t\t\t\t\t\t<ScrollLock />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t! isMobileViewport &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\tisRichEditingEnabled &&\n\t\t\t\t\tblockEditorMode !== 'zoom-out' &&\n\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t<div className=\"edit-post-layout__footer\">\n\t\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<SavePublishPanels\n\t\t\t\t\t\tcloseEntitiesSavedStates={ closeEntitiesSavedStates }\n\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforceIsDirtyPublishPanel={ hasActiveMetaboxes }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tshortcuts={ {\n\t\t\t\t\tprevious: previousShortcut,\n\t\t\t\t\tnext: nextShortcut,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AA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7
|
exports.default = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
9
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
var _components = require("@wordpress/components");
|
|
12
12
|
var _data = require("@wordpress/data");
|
|
@@ -49,7 +49,7 @@ function MetaBoxesArea({
|
|
|
49
49
|
const isSaving = (0, _data.useSelect)(select => {
|
|
50
50
|
return select(_store.store).isSavingMetaBoxes();
|
|
51
51
|
}, []);
|
|
52
|
-
const classes = (0,
|
|
52
|
+
const classes = (0, _clsx.default)('edit-post-meta-boxes-area', `is-${location}`, {
|
|
53
53
|
'is-loading': isSaving
|
|
54
54
|
});
|
|
55
55
|
return (0, _react.createElement)("div", {
|