@wordpress/edit-post 7.33.0 → 7.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +22 -36
- package/build/components/header/index.js +17 -48
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/more-menu/index.js +17 -43
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/more-menu/manage-patterns-menu-item.js +40 -0
- package/build/components/header/more-menu/manage-patterns-menu-item.js.map +1 -0
- package/build/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +1 -1
- package/build/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
- package/build/components/keyboard-shortcuts/index.js +0 -88
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/index.js +18 -11
- package/build/components/layout/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +2 -11
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +29 -6
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/settings-sidebar/index.js +40 -10
- package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build/deprecated.js +132 -0
- package/build/deprecated.js.map +1 -0
- package/build/index.js +19 -58
- package/build/index.js.map +1 -1
- package/build-module/components/header/index.js +20 -51
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +17 -43
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/more-menu/manage-patterns-menu-item.js +33 -0
- package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +1 -0
- package/build-module/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +1 -1
- package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
- package/build-module/components/keyboard-shortcuts/index.js +1 -89
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/index.js +18 -11
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +3 -12
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +30 -7
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +43 -13
- package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build-module/deprecated.js +116 -0
- package/build-module/deprecated.js.map +1 -0
- package/build-module/index.js +2 -15
- package/build-module/index.js.map +1 -1
- package/build-style/style-rtl.css +6 -141
- package/build-style/style.css +6 -141
- package/package.json +31 -31
- package/src/components/header/index.js +24 -69
- package/src/components/header/more-menu/index.js +27 -42
- package/src/components/header/more-menu/manage-patterns-menu-item.js +33 -0
- package/src/components/header/style.scss +0 -79
- package/src/components/keyboard-shortcuts/index.js +1 -106
- package/src/components/layout/index.js +12 -6
- package/src/components/layout/style.scss +7 -80
- package/src/components/preferences-modal/index.js +2 -22
- package/src/components/sidebar/post-status/index.js +57 -17
- package/src/components/sidebar/settings-sidebar/index.js +60 -24
- package/src/deprecated.js +107 -0
- package/src/index.js +3 -24
- package/build/components/header/post-publish-button-or-toggle.js +0 -94
- package/build/components/header/post-publish-button-or-toggle.js.map +0 -1
- package/build/components/header/preferences-menu-item/index.js +0 -39
- package/build/components/header/preferences-menu-item/index.js.map +0 -1
- package/build/components/header/tools-more-menu-group/index.js +0 -26
- package/build/components/header/tools-more-menu-group/index.js.map +0 -1
- package/build/components/header/writing-menu/index.js +0 -71
- package/build/components/header/writing-menu/index.js.map +0 -1
- package/build/components/layout/actions-panel.js +0 -86
- package/build/components/layout/actions-panel.js.map +0 -1
- package/build/components/preferences-modal/enable-publish-sidebar.js +0 -38
- package/build/components/preferences-modal/enable-publish-sidebar.js.map +0 -1
- package/build/components/sidebar/plugin-post-publish-panel/index.js +0 -39
- package/build/components/sidebar/plugin-post-publish-panel/index.js.map +0 -1
- package/build/components/sidebar/plugin-pre-publish-panel/index.js +0 -43
- package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +0 -1
- package/build/plugins/copy-content-menu-item/index.js +0 -39
- package/build/plugins/copy-content-menu-item/index.js.map +0 -1
- package/build/plugins/index.js +0 -69
- package/build/plugins/index.js.map +0 -1
- package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -44
- package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +0 -1
- package/build/plugins/welcome-guide-menu-item/index.js.map +0 -1
- package/build-module/components/header/post-publish-button-or-toggle.js +0 -86
- package/build-module/components/header/post-publish-button-or-toggle.js.map +0 -1
- package/build-module/components/header/preferences-menu-item/index.js +0 -32
- package/build-module/components/header/preferences-menu-item/index.js.map +0 -1
- package/build-module/components/header/tools-more-menu-group/index.js +0 -19
- package/build-module/components/header/tools-more-menu-group/index.js.map +0 -1
- package/build-module/components/header/writing-menu/index.js +0 -64
- package/build-module/components/header/writing-menu/index.js.map +0 -1
- package/build-module/components/layout/actions-panel.js +0 -78
- package/build-module/components/layout/actions-panel.js.map +0 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js +0 -31
- package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +0 -1
- package/build-module/components/sidebar/plugin-post-publish-panel/index.js +0 -32
- package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +0 -1
- package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +0 -36
- package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +0 -1
- package/build-module/plugins/copy-content-menu-item/index.js +0 -32
- package/build-module/plugins/copy-content-menu-item/index.js.map +0 -1
- package/build-module/plugins/index.js +0 -65
- package/build-module/plugins/index.js.map +0 -1
- package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -36
- package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +0 -1
- package/build-module/plugins/welcome-guide-menu-item/index.js.map +0 -1
- package/src/components/header/post-publish-button-or-toggle.js +0 -97
- package/src/components/header/preferences-menu-item/index.js +0 -31
- package/src/components/header/test/index.js +0 -63
- package/src/components/header/tools-more-menu-group/index.js +0 -20
- package/src/components/header/writing-menu/index.js +0 -73
- package/src/components/layout/actions-panel.js +0 -103
- package/src/components/preferences-modal/enable-publish-sidebar.js +0 -32
- package/src/components/preferences-modal/test/index.js +0 -28
- package/src/components/sidebar/plugin-post-publish-panel/index.js +0 -28
- package/src/components/sidebar/plugin-pre-publish-panel/index.js +0 -32
- package/src/plugins/copy-content-menu-item/index.js +0 -29
- package/src/plugins/index.js +0 -85
- package/src/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -36
- /package/src/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +0 -0
|
@@ -20,17 +20,16 @@ var _notices = require("@wordpress/notices");
|
|
|
20
20
|
var _preferences = require("@wordpress/preferences");
|
|
21
21
|
var _commands = require("@wordpress/commands");
|
|
22
22
|
var _coreCommands = require("@wordpress/core-commands");
|
|
23
|
+
var _blockLibrary = require("@wordpress/block-library");
|
|
23
24
|
var _textEditor = _interopRequireDefault(require("../text-editor"));
|
|
24
25
|
var _visualEditor = _interopRequireDefault(require("../visual-editor"));
|
|
25
26
|
var _keyboardShortcuts2 = _interopRequireDefault(require("../keyboard-shortcuts"));
|
|
26
|
-
var _preferencesModal = _interopRequireDefault(require("../preferences-modal"));
|
|
27
27
|
var _initPatternModal = _interopRequireDefault(require("../init-pattern-modal"));
|
|
28
28
|
var _browserUrl = _interopRequireDefault(require("../browser-url"));
|
|
29
29
|
var _header = _interopRequireDefault(require("../header"));
|
|
30
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
|
-
var _actionsPanel = _interopRequireDefault(require("./actions-panel"));
|
|
34
33
|
var _store = require("../../store");
|
|
35
34
|
var _lockUnlock = require("../../lock-unlock");
|
|
36
35
|
var _useCommonCommands = _interopRequireDefault(require("../../hooks/commands/use-common-commands"));
|
|
@@ -60,9 +59,13 @@ const {
|
|
|
60
59
|
ListViewSidebar,
|
|
61
60
|
ComplementaryArea,
|
|
62
61
|
FullscreenMode,
|
|
62
|
+
SavePublishPanels,
|
|
63
63
|
InterfaceSkeleton,
|
|
64
64
|
interfaceStore
|
|
65
65
|
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
66
|
+
const {
|
|
67
|
+
BlockKeyboardShortcuts
|
|
68
|
+
} = (0, _lockUnlock.unlock)(_blockLibrary.privateApis);
|
|
66
69
|
const interfaceLabels = {
|
|
67
70
|
/* translators: accessibility text for the editor top bar landmark region. */
|
|
68
71
|
header: (0, _i18n.__)('Editor top bar'),
|
|
@@ -143,7 +146,8 @@ function Layout({
|
|
|
143
146
|
showBlockBreadcrumbs,
|
|
144
147
|
showMetaBoxes,
|
|
145
148
|
documentLabel,
|
|
146
|
-
hasHistory
|
|
149
|
+
hasHistory,
|
|
150
|
+
hasBlockBreadcrumbs
|
|
147
151
|
} = (0, _data.useSelect)(select => {
|
|
148
152
|
const {
|
|
149
153
|
get
|
|
@@ -163,15 +167,16 @@ function Layout({
|
|
|
163
167
|
mode: select(_editor.store).getEditorMode(),
|
|
164
168
|
isRichEditingEnabled: editorSettings.richEditingEnabled,
|
|
165
169
|
hasActiveMetaboxes: select(_store.store).hasMetaBoxes(),
|
|
166
|
-
previousShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/
|
|
167
|
-
nextShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/
|
|
170
|
+
previousShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/editor/previous-region'),
|
|
171
|
+
nextShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/editor/next-region'),
|
|
168
172
|
showIconLabels: get('core', 'showIconLabels'),
|
|
169
173
|
isDistractionFree: get('core', 'distractionFree'),
|
|
170
174
|
showBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
|
|
171
175
|
// translators: Default label for the Document in the Block Breadcrumb.
|
|
172
176
|
documentLabel: postTypeLabel || (0, _i18n._x)('Document', 'noun'),
|
|
173
177
|
hasBlockSelected: !!select(_blockEditor.store).getBlockSelectionStart(),
|
|
174
|
-
hasHistory: !!getEditorSettings().onNavigateToPreviousEntityRecord
|
|
178
|
+
hasHistory: !!getEditorSettings().onNavigateToPreviousEntityRecord,
|
|
179
|
+
hasBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs')
|
|
175
180
|
};
|
|
176
181
|
}, []);
|
|
177
182
|
|
|
@@ -212,7 +217,8 @@ function Layout({
|
|
|
212
217
|
'is-sidebar-opened': sidebarIsOpened,
|
|
213
218
|
'has-metaboxes': hasActiveMetaboxes,
|
|
214
219
|
'is-distraction-free': isDistractionFree && isWideViewport,
|
|
215
|
-
'is-entity-save-view-open': !!entitiesSavedStatesCallback
|
|
220
|
+
'is-entity-save-view-open': !!entitiesSavedStatesCallback,
|
|
221
|
+
'has-block-breadcrumbs': hasBlockBreadcrumbs && !isDistractionFree && isWideViewport
|
|
216
222
|
});
|
|
217
223
|
const secondarySidebarLabel = isListViewOpened ? (0, _i18n.__)('Document Overview') : (0, _i18n.__)('Block Library');
|
|
218
224
|
const secondarySidebar = () => {
|
|
@@ -235,7 +241,7 @@ function Layout({
|
|
|
235
241
|
isActive: isFullscreenActive
|
|
236
242
|
}), (0, _react.createElement)(_browserUrl.default, {
|
|
237
243
|
hasHistory: hasHistory
|
|
238
|
-
}), (0, _react.createElement)(_editor.UnsavedChangesWarning, null), (0, _react.createElement)(_editor.AutosaveMonitor, null), (0, _react.createElement)(_editor.LocalAutosaveMonitor, null), (0, _react.createElement)(_keyboardShortcuts2.default, null), (0, _react.createElement)(_editor.EditorKeyboardShortcutsRegister, null), (0, _react.createElement)(_editor.EditorKeyboardShortcuts, null), (0, _react.createElement)(InterfaceSkeleton, {
|
|
244
|
+
}), (0, _react.createElement)(_editor.UnsavedChangesWarning, null), (0, _react.createElement)(_editor.AutosaveMonitor, null), (0, _react.createElement)(_editor.LocalAutosaveMonitor, null), (0, _react.createElement)(_keyboardShortcuts2.default, null), (0, _react.createElement)(_editor.EditorKeyboardShortcutsRegister, null), (0, _react.createElement)(_editor.EditorKeyboardShortcuts, null), (0, _react.createElement)(BlockKeyboardShortcuts, null), (0, _react.createElement)(InterfaceSkeleton, {
|
|
239
245
|
isDistractionFree: isDistractionFree && isWideViewport,
|
|
240
246
|
className: className,
|
|
241
247
|
labels: {
|
|
@@ -268,16 +274,17 @@ function Layout({
|
|
|
268
274
|
}, (0, _react.createElement)(_blockEditor.BlockBreadcrumb, {
|
|
269
275
|
rootLabelText: documentLabel
|
|
270
276
|
})),
|
|
271
|
-
actions: (0, _react.createElement)(
|
|
277
|
+
actions: (0, _react.createElement)(SavePublishPanels, {
|
|
272
278
|
closeEntitiesSavedStates: closeEntitiesSavedStates,
|
|
273
279
|
isEntitiesSavedStatesOpen: entitiesSavedStatesCallback,
|
|
274
|
-
setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback
|
|
280
|
+
setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback,
|
|
281
|
+
forceIsDirtyPublishPanel: hasActiveMetaboxes
|
|
275
282
|
}),
|
|
276
283
|
shortcuts: {
|
|
277
284
|
previous: previousShortcut,
|
|
278
285
|
next: nextShortcut
|
|
279
286
|
}
|
|
280
|
-
}), (0, _react.createElement)(
|
|
287
|
+
}), (0, _react.createElement)(_welcomeGuide.default, null), (0, _react.createElement)(_initPatternModal.default, null), (0, _react.createElement)(_plugins.PluginArea, {
|
|
281
288
|
onError: onPluginAreaError
|
|
282
289
|
}), !isDistractionFree && (0, _react.createElement)(_settingsSidebar.default, null));
|
|
283
290
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_editor","_data","_blockEditor","_components","_compose","_plugins","_i18n","_element","_keyboardShortcuts","_notices","_preferences","_commands","_coreCommands","_textEditor","_visualEditor","_keyboardShortcuts2","_preferencesModal","_initPatternModal","_browserUrl","_header","_settingsSidebar","_metaBoxes","_welcomeGuide","_actionsPanel","_store","_lockUnlock","_useCommonCommands","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","InserterSidebar","ListViewSidebar","ComplementaryArea","FullscreenMode","InterfaceSkeleton","interfaceStore","editorPrivateApis","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","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","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';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport EditPostPreferencesModal from '../preferences-modal';\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 ActionsPanel from './actions-panel';\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\tInterfaceSkeleton,\n\tinterfaceStore,\n} = unlock( editorPrivateApis );\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} = 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/edit-post/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/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};\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} );\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\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<ActionsPanel\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/>\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<EditPostPreferencesModal />\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && <SettingsSid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AEcrE,MAAM","ignoreList":[]}
|
|
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,CAAA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AACvG,iBAAiB;MACjB2F,wBAAwB,EAAGA,wBAA0B;MACrDuC,yBAAyB,EACxB1C,2BACA;MACDC,8BAA8B,EAC7BA,8BACA;MACD0C,wBAAwB,EAAG1E;IAAoB,CAC/C,CACD;IACD2E,SAAS,EAAG;MACXC,QAAQ,EAAE3E,gBAAgB;MAC1B4E,IAAI,EAAE3E;IACP;EAAG,CACH,CAAC,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":[]}
|
|
@@ -7,12 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = EditPostPreferencesModal;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _i18n = require("@wordpress/i18n");
|
|
10
|
-
var _compose = require("@wordpress/compose");
|
|
11
10
|
var _preferences = require("@wordpress/preferences");
|
|
12
11
|
var _editor = require("@wordpress/editor");
|
|
13
12
|
var _lockUnlock = require("../../lock-unlock");
|
|
14
13
|
var _metaBoxesSection = _interopRequireDefault(require("./meta-boxes-section"));
|
|
15
|
-
var _enablePublishSidebar = _interopRequireDefault(require("./enable-publish-sidebar"));
|
|
16
14
|
/**
|
|
17
15
|
* WordPress dependencies
|
|
18
16
|
*/
|
|
@@ -22,23 +20,16 @@ var _enablePublishSidebar = _interopRequireDefault(require("./enable-publish-sid
|
|
|
22
20
|
*/
|
|
23
21
|
|
|
24
22
|
const {
|
|
25
|
-
PreferencesModalSection,
|
|
26
23
|
PreferenceToggleControl
|
|
27
24
|
} = (0, _lockUnlock.unlock)(_preferences.privateApis);
|
|
28
25
|
const {
|
|
29
26
|
PreferencesModal
|
|
30
27
|
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
31
28
|
function EditPostPreferencesModal() {
|
|
32
|
-
const isLargeViewport = (0, _compose.useViewportMatch)('medium');
|
|
33
29
|
const extraSections = {
|
|
34
|
-
general: (0, _react.createElement)(
|
|
35
|
-
title: (0, _i18n.__)('Publishing')
|
|
36
|
-
}, (0, _react.createElement)(_enablePublishSidebar.default, {
|
|
37
|
-
help: (0, _i18n.__)('Review settings, such as visibility and tags.'),
|
|
38
|
-
label: (0, _i18n.__)('Enable pre-publish checks')
|
|
39
|
-
})), (0, _react.createElement)(_metaBoxesSection.default, {
|
|
30
|
+
general: (0, _react.createElement)(_metaBoxesSection.default, {
|
|
40
31
|
title: (0, _i18n.__)('Advanced')
|
|
41
|
-
})
|
|
32
|
+
}),
|
|
42
33
|
appearance: (0, _react.createElement)(PreferenceToggleControl, {
|
|
43
34
|
scope: "core/edit-post",
|
|
44
35
|
featureName: "themeStyles",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_preferences","_editor","_lockUnlock","_metaBoxesSection","_interopRequireDefault","PreferenceToggleControl","unlock","preferencesPrivateApis","PreferencesModal","editorPrivateApis","EditPostPreferencesModal","extraSections","general","_react","createElement","default","title","__","appearance","scope","featureName","help","label"],"sources":["@wordpress/edit-post/src/components/preferences-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport MetaBoxesSection from './meta-boxes-section';\n\nconst { PreferenceToggleControl } = unlock( preferencesPrivateApis );\nconst { PreferencesModal } = unlock( editorPrivateApis );\n\nexport default function EditPostPreferencesModal() {\n\tconst extraSections = {\n\t\tgeneral: <MetaBoxesSection title={ __( 'Advanced' ) } />,\n\t\tappearance: (\n\t\t\t<PreferenceToggleControl\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tfeatureName=\"themeStyles\"\n\t\t\t\thelp={ __( 'Make the editor look like your theme.' ) }\n\t\t\t\tlabel={ __( 'Use theme styles' ) }\n\t\t\t/>\n\t\t),\n\t};\n\n\treturn <PreferencesModal extraSections={ extraSections } />;\n}\n"],"mappings":";;;;;;;;AAIA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAC,sBAAA,CAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EAAEM;AAAwB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AACpE,MAAM;EAAEC;AAAiB,CAAC,GAAG,IAAAF,kBAAM,EAAEG,mBAAkB,CAAC;AAEzC,SAASC,wBAAwBA,CAAA,EAAG;EAClD,MAAMC,aAAa,GAAG;IACrBC,OAAO,EAAE,IAAAC,MAAA,CAAAC,aAAA,EAACX,iBAAA,CAAAY,OAAgB;MAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,UAAW;IAAG,CAAE,CAAC;IACxDC,UAAU,EACT,IAAAL,MAAA,CAAAC,aAAA,EAACT,uBAAuB;MACvBc,KAAK,EAAC,gBAAgB;MACtBC,WAAW,EAAC,aAAa;MACzBC,IAAI,EAAG,IAAAJ,QAAE,EAAE,uCAAwC,CAAG;MACtDK,KAAK,EAAG,IAAAL,QAAE,EAAE,kBAAmB;IAAG,CAClC;EAEH,CAAC;EAED,OAAO,IAAAJ,MAAA,CAAAC,aAAA,EAACN,gBAAgB;IAACG,aAAa,EAAGA;EAAe,CAAE,CAAC;AAC5D","ignoreList":[]}
|
|
@@ -24,7 +24,10 @@ var _lockUnlock = require("../../../lock-unlock");
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
const {
|
|
27
|
-
PostStatus: PostStatusPanel
|
|
27
|
+
PostStatus: PostStatusPanel,
|
|
28
|
+
PrivatePostExcerptPanel,
|
|
29
|
+
PostContentInformation,
|
|
30
|
+
PostLastEditedPanel
|
|
28
31
|
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
29
32
|
|
|
30
33
|
/**
|
|
@@ -34,17 +37,23 @@ const PANEL_NAME = 'post-status';
|
|
|
34
37
|
function PostStatus() {
|
|
35
38
|
const {
|
|
36
39
|
isOpened,
|
|
37
|
-
isRemoved
|
|
40
|
+
isRemoved,
|
|
41
|
+
showPostContentPanels
|
|
38
42
|
} = (0, _data.useSelect)(select => {
|
|
39
43
|
// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do
|
|
40
44
|
// not use isEditorPanelEnabled since this panel should not be disabled through the UI.
|
|
41
45
|
const {
|
|
42
46
|
isEditorPanelRemoved,
|
|
43
|
-
isEditorPanelOpened
|
|
47
|
+
isEditorPanelOpened,
|
|
48
|
+
getCurrentPostType
|
|
44
49
|
} = select(_editor.store);
|
|
50
|
+
const postType = getCurrentPostType();
|
|
45
51
|
return {
|
|
46
52
|
isRemoved: isEditorPanelRemoved(PANEL_NAME),
|
|
47
|
-
isOpened: isEditorPanelOpened(PANEL_NAME)
|
|
53
|
+
isOpened: isEditorPanelOpened(PANEL_NAME),
|
|
54
|
+
// Post excerpt panel is rendered in different place depending on the post type.
|
|
55
|
+
// So we cannot make this check inside the PostExcerpt component based on the current edited entity.
|
|
56
|
+
showPostContentPanels: !['wp_template', 'wp_template_part', 'wp_block'].includes(postType)
|
|
48
57
|
};
|
|
49
58
|
}, []);
|
|
50
59
|
const {
|
|
@@ -58,9 +67,23 @@ function PostStatus() {
|
|
|
58
67
|
title: (0, _i18n.__)('Summary'),
|
|
59
68
|
opened: isOpened,
|
|
60
69
|
onToggle: () => toggleEditorPanelOpened(PANEL_NAME)
|
|
61
|
-
}, (0, _react.createElement)(_editor.PluginPostStatusInfo.Slot, null, fills => (0, _react.createElement)(_react.Fragment, null,
|
|
70
|
+
}, (0, _react.createElement)(_editor.PluginPostStatusInfo.Slot, null, fills => (0, _react.createElement)(_react.Fragment, null, showPostContentPanels && (0, _react.createElement)(_components.__experimentalVStack, {
|
|
71
|
+
spacing: 3
|
|
72
|
+
// TODO: this needs to be consolidated with the panel in site editor, when we unify them.
|
|
73
|
+
,
|
|
74
|
+
style: {
|
|
75
|
+
marginBlockEnd: '24px'
|
|
76
|
+
}
|
|
77
|
+
}, (0, _react.createElement)(_editor.PostFeaturedImagePanel, {
|
|
62
78
|
withPanelBody: false
|
|
63
|
-
}), (0, _react.createElement)(
|
|
79
|
+
}), (0, _react.createElement)(PrivatePostExcerptPanel, null), (0, _react.createElement)(_components.__experimentalVStack, {
|
|
80
|
+
spacing: 1
|
|
81
|
+
}, (0, _react.createElement)(PostContentInformation, null), (0, _react.createElement)(PostLastEditedPanel, null))), (0, _react.createElement)(_components.__experimentalVStack, {
|
|
82
|
+
spacing: 1,
|
|
83
|
+
style: {
|
|
84
|
+
marginBlockEnd: '12px'
|
|
85
|
+
}
|
|
86
|
+
}, (0, _react.createElement)(PostStatusPanel, null), (0, _react.createElement)(_editor.PostSchedulePanel, null), (0, _react.createElement)(_editor.PostTemplatePanel, null), (0, _react.createElement)(_editor.PostURLPanel, null), (0, _react.createElement)(_editor.PostSyncStatus, null)), (0, _react.createElement)(_postSticky.default, null), (0, _react.createElement)(_postFormat.default, null), (0, _react.createElement)(_postSlug.default, null), (0, _react.createElement)(_editor.PostAuthorPanel, null), fills, (0, _react.createElement)(_components.__experimentalHStack, {
|
|
64
87
|
style: {
|
|
65
88
|
marginTop: '16px'
|
|
66
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_data","_editor","_postTrash","_interopRequireDefault","_postSticky","_postSlug","_postFormat","_lockUnlock","PostStatus","PostStatusPanel","unlock","editorPrivateApis","PANEL_NAME","isOpened","isRemoved","useSelect","select","isEditorPanelRemoved","isEditorPanelOpened","editorStore","toggleEditorPanelOpened","useDispatch","_react","createElement","PanelBody","className","title","__","opened","onToggle","PluginPostStatusInfo","Slot","fills","Fragment","PostFeaturedImagePanel","withPanelBody","PostSchedulePanel","PostTemplatePanel","PostURLPanel","PostSyncStatus","default","PostAuthorPanel","__experimentalHStack","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_data","_editor","_postTrash","_interopRequireDefault","_postSticky","_postSlug","_postFormat","_lockUnlock","PostStatus","PostStatusPanel","PrivatePostExcerptPanel","PostContentInformation","PostLastEditedPanel","unlock","editorPrivateApis","PANEL_NAME","isOpened","isRemoved","showPostContentPanels","useSelect","select","isEditorPanelRemoved","isEditorPanelOpened","getCurrentPostType","editorStore","postType","includes","toggleEditorPanelOpened","useDispatch","_react","createElement","PanelBody","className","title","__","opened","onToggle","PluginPostStatusInfo","Slot","fills","Fragment","__experimentalVStack","spacing","style","marginBlockEnd","PostFeaturedImagePanel","withPanelBody","PostSchedulePanel","PostTemplatePanel","PostURLPanel","PostSyncStatus","default","PostAuthorPanel","__experimentalHStack","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":";;;;;;;;AAGA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iBAAiB,MAAE,CAAC,EACrB,IAAAnB,MAAA,CAAAC,aAAA,EAAC7B,OAAA,CAAAgD,YAAY,MAAE,CAAC,EAChB,IAAApB,MAAA,CAAAC,aAAA,EAAC7B,OAAA,CAAAiD,cAAc,MAAE,CACV,CAAC,EACT,IAAArB,MAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAA+C,OAAU,MAAE,CAAC,EACd,IAAAtB,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAA6C,OAAU,MAAE,CAAC,EACd,IAAAtB,MAAA,CAAAC,aAAA,EAACzB,SAAA,CAAA8C,OAAQ,MAAE,CAAC,EACZ,IAAAtB,MAAA,CAAAC,aAAA,EAAC7B,OAAA,CAAAmD,eAAe,MAAE,CAAC,EACjBb,KAAK,EACP,IAAAV,MAAA,CAAAC,aAAA,EAAC/B,WAAA,CAAAsD,oBAAM;IACNV,KAAK,EAAG;MACPW,SAAS,EAAE;IACZ;EAAG,GAEH,IAAAzB,MAAA,CAAAC,aAAA,EAAC5B,UAAA,CAAAiD,OAAS,MAAE,CACL,CACP,CAEuB,CACjB,CAAC;AAEd","ignoreList":[]}
|
|
@@ -14,6 +14,7 @@ var _icons = require("@wordpress/icons");
|
|
|
14
14
|
var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
|
|
15
15
|
var _editor = require("@wordpress/editor");
|
|
16
16
|
var _url = require("@wordpress/url");
|
|
17
|
+
var _notices = require("@wordpress/notices");
|
|
17
18
|
var _settingsHeader = _interopRequireDefault(require("../settings-header"));
|
|
18
19
|
var _postStatus = _interopRequireDefault(require("../post-status"));
|
|
19
20
|
var _metaBoxes = _interopRequireDefault(require("../../meta-boxes"));
|
|
@@ -48,14 +49,6 @@ const sidebars = exports.sidebars = {
|
|
|
48
49
|
document: 'edit-post/document',
|
|
49
50
|
block: 'edit-post/block'
|
|
50
51
|
};
|
|
51
|
-
function onActionPerformed(actionId, items) {
|
|
52
|
-
if (actionId === 'move-to-trash') {
|
|
53
|
-
const postType = items[0].type;
|
|
54
|
-
document.location.href = (0, _url.addQueryArgs)('edit.php', {
|
|
55
|
-
post_type: postType
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
52
|
const SidebarContent = ({
|
|
60
53
|
tabName,
|
|
61
54
|
keyboardShortcut,
|
|
@@ -86,6 +79,43 @@ const SidebarContent = ({
|
|
|
86
79
|
selectedTabElement?.focus();
|
|
87
80
|
}
|
|
88
81
|
}, [tabName]);
|
|
82
|
+
const {
|
|
83
|
+
createSuccessNotice
|
|
84
|
+
} = (0, _data.useDispatch)(_notices.store);
|
|
85
|
+
const onActionPerformed = (0, _element.useCallback)((actionId, items) => {
|
|
86
|
+
switch (actionId) {
|
|
87
|
+
case 'move-to-trash':
|
|
88
|
+
{
|
|
89
|
+
const postType = items[0].type;
|
|
90
|
+
document.location.href = (0, _url.addQueryArgs)('edit.php', {
|
|
91
|
+
post_type: postType
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
case 'duplicate-post':
|
|
96
|
+
{
|
|
97
|
+
const newItem = items[0];
|
|
98
|
+
const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
|
|
99
|
+
createSuccessNotice((0, _i18n.sprintf)(
|
|
100
|
+
// translators: %s: Title of the created post e.g: "Post 1".
|
|
101
|
+
(0, _i18n.__)('"%s" successfully created.'), title), {
|
|
102
|
+
type: 'snackbar',
|
|
103
|
+
id: 'duplicate-post-action',
|
|
104
|
+
actions: [{
|
|
105
|
+
label: (0, _i18n.__)('Edit'),
|
|
106
|
+
onClick: () => {
|
|
107
|
+
const postId = newItem.id;
|
|
108
|
+
document.location.href = (0, _url.addQueryArgs)('post.php', {
|
|
109
|
+
post: postId,
|
|
110
|
+
action: 'edit'
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}]
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
}, [createSuccessNotice]);
|
|
89
119
|
return (0, _react.createElement)(_editor.PluginSidebar, {
|
|
90
120
|
identifier: tabName,
|
|
91
121
|
header: (0, _react.createElement)(Tabs.Context.Provider, {
|
|
@@ -114,9 +144,9 @@ const SidebarContent = ({
|
|
|
114
144
|
actions: (0, _react.createElement)(PostActions, {
|
|
115
145
|
onActionPerformed: onActionPerformed
|
|
116
146
|
})
|
|
117
|
-
}), !isEditingTemplate && (0, _react.createElement)(
|
|
147
|
+
}), !isEditingTemplate && (0, _react.createElement)(_postStatus.default, null), (0, _react.createElement)(_editor.PluginDocumentSettingPanel.Slot, null), (0, _react.createElement)(_editor.PostLastRevisionPanel, null), (0, _react.createElement)(_editor.PostTaxonomiesPanel, null), (0, _react.createElement)(_editor.PostDiscussionPanel, null), (0, _react.createElement)(_editor.PageAttributesPanel, null), (0, _react.createElement)(PatternOverridesPanel, null), !isEditingTemplate && (0, _react.createElement)(_metaBoxes.default, {
|
|
118
148
|
location: "side"
|
|
119
|
-
}))
|
|
149
|
+
})), (0, _react.createElement)(Tabs.TabPanel, {
|
|
120
150
|
tabId: sidebars.block,
|
|
121
151
|
focusable: false
|
|
122
152
|
}, (0, _react.createElement)(_blockEditor.BlockInspector, null))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blockEditor","require","_data","_element","_i18n","_icons","_keyboardShortcuts","_editor","_url","_settingsHeader","_interopRequireDefault","_postStatus","_metaBoxes","_store","_components","_lockUnlock","PostCardPanel","PostActions","interfaceStore","unlock","editorPrivateApis","Tabs","componentsPrivateApis","PatternOverridesPanel","useAutoSwitchEditorSidebars","SIDEBAR_ACTIVE_BY_DEFAULT","Platform","select","web","native","sidebars","exports","document","block","onActionPerformed","actionId","items","postType","type","location","href","addQueryArgs","post_type","SidebarContent","tabName","keyboardShortcut","isEditingTemplate","tabListRef","useRef","tabsContextValue","useContext","Context","useEffect","tabsElements","Array","from","current","querySelectorAll","selectedTabElement","find","element","getAttribute","activeElement","ownerDocument","tabsHasFocus","some","id","focus","_react","createElement","PluginSidebar","identifier","header","Provider","value","default","ref","closeLabel","__","className","headerClassName","title","toggleShortcut","icon","isRTL","drawerLeft","drawerRight","isActiveByDefault","TabPanel","tabId","focusable","actions","Fragment","PluginDocumentSettingPanel","Slot","PostLastRevisionPanel","PostTaxonomiesPanel","PostExcerptPanel","PostDiscussionPanel","PageAttributesPanel","BlockInspector","SettingsSidebar","useSelect","shortcut","keyboardShortcutsStore","getShortcutRepresentation","sidebar","getActiveComplementaryArea","_isEditorSidebarOpened","includes","_tabName","blockEditorStore","getBlockSelectionStart","editorStore","getCurrentPostType","openGeneralSidebar","useDispatch","editPostStore","onTabSelect","useCallback","newSelectedTabId","selectedTabId","onSelect","selectOnMove","_default"],"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, __ } 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\tPostExcerptPanel,\n\tPostLastRevisionPanel,\n\tPostTaxonomiesPanel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\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\nfunction onActionPerformed( actionId, items ) {\n\tif ( actionId === 'move-to-trash' ) {\n\t\tconst postType = items[ 0 ].type;\n\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType,\n\t\t} );\n\t}\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\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 && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PostStatus />\n\t\t\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t\t\t<PostLastRevisionPanel />\n\t\t\t\t\t\t\t<PostTaxonomiesPanel />\n\t\t\t\t\t\t\t<PostExcerptPanel />\n\t\t\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t\t\t<PatternOverridesPanel />\n\t\t\t\t\t\t\t<MetaBoxes location=\"side\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\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":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAWA,IAAAO,IAAA,GAAAP,OAAA;AAKA,IAAAQ,eAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,WAAA,GAAAD,sBAAA,CAAAT,OAAA;AACA,IAAAW,UAAA,GAAAF,sBAAA,CAAAT,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AAvCA;AACA;AACA;;AA6BA;AACA;AACA;;AAQA,MAAM;EAAEe,aAAa;EAAEC,WAAW;EAAEC;AAAe,CAAC,GACnD,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAC5B,MAAM;EAAEC;AAAK,CAAC,GAAG,IAAAF,kBAAM,EAAEG,uBAAsB,CAAC;AAChD,MAAM;EAAEC,qBAAqB;EAAEC;AAA4B,CAAC,GAC3D,IAAAL,kBAAM,EAAEC,mBAAkB,CAAC;AAE5B,MAAMK,yBAAyB,GAAGC,iBAAQ,CAACC,MAAM,CAAE;EAClDC,GAAG,EAAE,IAAI;EACTC,MAAM,EAAE;AACT,CAAE,CAAC;AACI,MAAMC,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG;EACvBE,QAAQ,EAAE,oBAAoB;EAC9BC,KAAK,EAAE;AACR,CAAC;AAED,SAASC,iBAAiBA,CAAEC,QA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C6E,QAAQ,CAAEH,OAAQ,CAAC;IACrB,IAAII,QAAQ,GAAGJ,OAAO;IACtB,IAAK,CAAEE,sBAAsB,EAAG;MAC/BE,QAAQ,GAAG,CAAC,CAAEnF,MAAM,CACnBoF,kBACD,CAAC,CAACC,sBAAsB,CAAC,CAAC,GACvBlF,QAAQ,CAACG,KAAK,GACdH,QAAQ,CAACE,QAAQ;IACrB;IAEA,OAAO;MACNY,OAAO,EAAEkE,QAAQ;MACjBjE,gBAAgB,EAAE0D,QAAQ;MAC1BzD,iBAAiB,EAChBnB,MAAM,CAAEsF,aAAY,CAAC,CAACC,kBAAkB,CAAC,CAAC,KAC1C;IACF,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAED,MAAM;IAAEC;EAAmB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAc,CAAC;EAE3D,MAAMC,WAAW,GAAG,IAAAC,oBAAW,EAC5BC,gBAAgB,IAAM;IACvB,IAAK,CAAC,CAAEA,gBAAgB,EAAG;MAC1BL,kBAAkB,CAAEK,gBAAiB,CAAC;IACvC;EACD,CAAC,EACD,CAAEL,kBAAkB,CACrB,CAAC;EAED,OACC,IAAA/C,MAAA,CAAAC,aAAA,EAAChD,IAAI;IACJoG,aAAa,EAAG7E,OAAS;IACzB8E,QAAQ,EAAGJ,WAAa;IACxBK,YAAY,EAAG;EAAO,GAEtB,IAAAvD,MAAA,CAAAC,aAAA,EAAC1B,cAAc;IACdC,OAAO,EAAGA,OAAS;IACnBC,gBAAgB,EAAGA,gBAAkB;IACrCC,iBAAiB,EAAGA;EAAmB,CACvC,CACI,CAAC;AAET,CAAC;AAAC,IAAA8E,QAAA,GAAA7F,OAAA,CAAA4C,OAAA,GAEa0B,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_blockEditor","require","_data","_element","_i18n","_icons","_keyboardShortcuts","_editor","_url","_notices","_settingsHeader","_interopRequireDefault","_postStatus","_metaBoxes","_store","_components","_lockUnlock","PostCardPanel","PostActions","interfaceStore","unlock","editorPrivateApis","Tabs","componentsPrivateApis","PatternOverridesPanel","useAutoSwitchEditorSidebars","SIDEBAR_ACTIVE_BY_DEFAULT","Platform","select","web","native","sidebars","exports","document","block","SidebarContent","tabName","keyboardShortcut","isEditingTemplate","tabListRef","useRef","tabsContextValue","useContext","Context","useEffect","tabsElements","Array","from","current","querySelectorAll","selectedTabElement","find","element","getAttribute","activeElement","ownerDocument","tabsHasFocus","some","id","focus","createSuccessNotice","useDispatch","noticesStore","onActionPerformed","useCallback","actionId","items","postType","type","location","href","addQueryArgs","post_type","newItem","title","rendered","sprintf","__","actions","label","onClick","postId","post","action","_react","createElement","PluginSidebar","identifier","header","Provider","value","default","ref","closeLabel","className","headerClassName","toggleShortcut","icon","isRTL","drawerLeft","drawerRight","isActiveByDefault","TabPanel","tabId","focusable","PluginDocumentSettingPanel","Slot","PostLastRevisionPanel","PostTaxonomiesPanel","PostDiscussionPanel","PageAttributesPanel","BlockInspector","SettingsSidebar","useSelect","shortcut","keyboardShortcutsStore","getShortcutRepresentation","sidebar","getActiveComplementaryArea","_isEditorSidebarOpened","includes","_tabName","blockEditorStore","getBlockSelectionStart","editorStore","getCurrentPostType","openGeneralSidebar","editPostStore","onTabSelect","newSelectedTabId","selectedTabId","onSelect","selectOnMove","_default"],"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":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAUA,IAAAO,IAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAKA,IAAAS,eAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,WAAA,GAAAD,sBAAA,CAAAV,OAAA;AACA,IAAAY,UAAA,GAAAF,sBAAA,CAAAV,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AACA,IAAAe,WAAA,GAAAf,OAAA;AAvCA;AACA;AACA;;AA6BA;AACA;AACA;;AAQA,MAAM;EAAEgB,aAAa;EAAEC,WAAW;EAAEC;AAAe,CAAC,GACnD,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAC5B,MAAM;EAAEC;AAAK,CAAC,GAAG,IAAAF,kBAAM,EAAEG,uBAAsB,CAAC;AAChD,MAAM;EAAEC,qBAAqB;EAAEC;AAA4B,CAAC,GAC3D,IAAAL,kBAAM,EAAEC,mBAAkB,CAAC;AAE5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