@wordpress/editor 13.31.0 → 13.32.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 +857 -0
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +107 -0
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -0
- package/build/components/commands/index.js +1 -1
- package/build/components/commands/index.js.map +1 -1
- package/build/components/deprecated.js +158 -0
- package/build/components/deprecated.js.map +1 -1
- package/build/components/document-bar/index.js +5 -8
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/editor-canvas/edit-template-blocks-notification.js +2 -39
- package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
- package/build/components/editor-canvas/index.js +3 -0
- package/build/components/editor-canvas/index.js.map +1 -1
- package/build/components/entities-saved-states/index.js +11 -85
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/index.js +24 -0
- package/build/components/index.js.map +1 -1
- package/build/components/inserter-sidebar/index.js +5 -1
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/list-view-sidebar/index.js +2 -1
- package/build/components/list-view-sidebar/index.js.map +1 -1
- package/build/components/pattern-overrides-panel/index.js +30 -0
- package/build/components/pattern-overrides-panel/index.js.map +1 -0
- package/build/components/plugin-post-publish-panel/index.js +68 -0
- package/build/components/plugin-post-publish-panel/index.js.map +1 -0
- package/build/components/plugin-pre-publish-panel/index.js +71 -0
- package/build/components/plugin-pre-publish-panel/index.js.map +1 -0
- package/build/components/post-actions/actions.js +455 -0
- package/build/components/post-actions/actions.js.map +1 -0
- package/build/components/post-card-panel/index.js +93 -0
- package/build/components/post-card-panel/index.js.map +1 -0
- package/build/components/post-title/index.native.js +1 -1
- package/build/components/post-title/index.native.js.map +1 -1
- package/build/components/provider/disable-non-page-content-blocks.js +36 -20
- package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +8 -9
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/template-areas/index.js +70 -0
- package/build/components/template-areas/index.js.map +1 -0
- package/build/hooks/use-select-nearest-editable-block.js +87 -0
- package/build/hooks/use-select-nearest-editable-block.js.map +1 -0
- package/build/private-apis.js +6 -0
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +46 -6
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +3 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/private-actions.js +80 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +56 -3
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +14 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +21 -11
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils/get-filtered-template-parts.js +71 -0
- package/build/store/utils/get-filtered-template-parts.js.map +1 -0
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +100 -0
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -0
- package/build-module/components/commands/index.js +1 -1
- package/build-module/components/commands/index.js.map +1 -1
- package/build-module/components/deprecated.js +159 -0
- package/build-module/components/deprecated.js.map +1 -1
- package/build-module/components/document-bar/index.js +6 -9
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js +4 -41
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/editor-canvas/index.js +3 -0
- package/build-module/components/editor-canvas/index.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +11 -85
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/index.js +3 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inserter-sidebar/index.js +5 -1
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/list-view-sidebar/index.js +2 -1
- package/build-module/components/list-view-sidebar/index.js.map +1 -1
- package/build-module/components/pattern-overrides-panel/index.js +23 -0
- package/build-module/components/pattern-overrides-panel/index.js.map +1 -0
- package/build-module/components/plugin-post-publish-panel/index.js +61 -0
- package/build-module/components/plugin-post-publish-panel/index.js.map +1 -0
- package/build-module/components/plugin-pre-publish-panel/index.js +64 -0
- package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -0
- package/build-module/components/post-actions/actions.js +444 -0
- package/build-module/components/post-actions/actions.js.map +1 -0
- package/build-module/components/post-card-panel/index.js +85 -0
- package/build-module/components/post-card-panel/index.js.map +1 -0
- package/build-module/components/post-title/index.native.js +1 -1
- package/build-module/components/post-title/index.native.js.map +1 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js +36 -20
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +9 -10
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/template-areas/index.js +63 -0
- package/build-module/components/template-areas/index.js.map +1 -0
- package/build-module/hooks/use-select-nearest-editable-block.js +80 -0
- package/build-module/hooks/use-select-nearest-editable-block.js.map +1 -0
- package/build-module/private-apis.js +6 -0
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +37 -3
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js +2 -0
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/private-actions.js +78 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +54 -3
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +13 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +19 -10
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils/get-filtered-template-parts.js +64 -0
- package/build-module/store/utils/get-filtered-template-parts.js.map +1 -0
- package/build-style/style-rtl.css +70 -27
- package/build-style/style.css +70 -27
- package/package.json +35 -35
- package/src/components/block-settings-menu/plugin-block-settings-menu-item.js +108 -0
- package/src/components/commands/index.js +1 -1
- package/src/components/deprecated.js +157 -0
- package/src/components/document-bar/index.js +9 -15
- package/src/components/document-bar/style.scss +9 -12
- package/src/components/document-tools/style.scss +4 -11
- package/src/components/editor-canvas/edit-template-blocks-notification.js +6 -56
- package/src/components/editor-canvas/index.js +4 -0
- package/src/components/entities-saved-states/index.js +12 -113
- package/src/components/index.js +3 -0
- package/src/components/inserter-sidebar/index.js +7 -1
- package/src/components/list-view-sidebar/index.js +1 -0
- package/src/components/list-view-sidebar/style.scss +1 -1
- package/src/components/pattern-overrides-panel/index.js +26 -0
- package/src/components/plugin-post-publish-panel/index.js +64 -0
- package/src/components/plugin-post-publish-panel/test/__snapshots__/index.js.snap +39 -0
- package/src/components/plugin-post-publish-panel/test/index.js +33 -0
- package/src/components/plugin-pre-publish-panel/index.js +67 -0
- package/src/components/plugin-pre-publish-panel/test/index.js +33 -0
- package/src/components/post-actions/actions.js +582 -0
- package/src/components/post-card-panel/index.js +108 -0
- package/src/components/post-card-panel/style.scss +32 -0
- package/src/components/post-featured-image/style.scss +3 -2
- package/src/components/post-title/index.native.js +1 -1
- package/src/components/provider/disable-non-page-content-blocks.js +40 -20
- package/src/components/provider/test/disable-non-page-content-blocks.js +35 -14
- package/src/components/provider/use-block-editor-settings.js +11 -11
- package/src/components/template-areas/index.js +85 -0
- package/src/components/template-areas/style.scss +23 -0
- package/src/hooks/use-select-nearest-editable-block.js +95 -0
- package/src/private-apis.js +6 -0
- package/src/store/actions.js +37 -3
- package/src/store/constants.js +2 -0
- package/src/store/private-actions.js +111 -0
- package/src/store/private-selectors.js +105 -17
- package/src/store/reducer.js +13 -0
- package/src/store/selectors.js +50 -40
- package/src/store/utils/get-filtered-template-parts.js +69 -0
- package/src/store/utils/test/get-filtered-template-parts.js +189 -0
- package/src/style.scss +2 -0
|
@@ -7,7 +7,6 @@ exports.default = EditTemplateBlocksNotification;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _data = require("@wordpress/data");
|
|
9
9
|
var _element = require("@wordpress/element");
|
|
10
|
-
var _notices = require("@wordpress/notices");
|
|
11
10
|
var _i18n = require("@wordpress/i18n");
|
|
12
11
|
var _components = require("@wordpress/components");
|
|
13
12
|
var _store = require("../../store");
|
|
@@ -49,56 +48,20 @@ function EditTemplateBlocksNotification({
|
|
|
49
48
|
templateId: getCurrentTemplateId()
|
|
50
49
|
};
|
|
51
50
|
}, []);
|
|
52
|
-
const {
|
|
53
|
-
getNotices
|
|
54
|
-
} = (0, _data.useSelect)(_notices.store);
|
|
55
|
-
const {
|
|
56
|
-
createInfoNotice,
|
|
57
|
-
removeNotice
|
|
58
|
-
} = (0, _data.useDispatch)(_notices.store);
|
|
59
51
|
const [isDialogOpen, setIsDialogOpen] = (0, _element.useState)(false);
|
|
60
|
-
const lastNoticeId = (0, _element.useRef)(0);
|
|
61
52
|
(0, _element.useEffect)(() => {
|
|
62
|
-
const handleClick = async event => {
|
|
63
|
-
if (!event.target.classList.contains('is-root-container')) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const isNoticeAlreadyShowing = getNotices().some(notice => notice.id === lastNoticeId.current);
|
|
67
|
-
if (isNoticeAlreadyShowing) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const {
|
|
71
|
-
notice
|
|
72
|
-
} = await createInfoNotice((0, _i18n.__)('Edit your template to edit this block.'), {
|
|
73
|
-
isDismissible: true,
|
|
74
|
-
type: 'snackbar',
|
|
75
|
-
actions: [{
|
|
76
|
-
label: (0, _i18n.__)('Edit template'),
|
|
77
|
-
onClick: () => onNavigateToEntityRecord({
|
|
78
|
-
postId: templateId,
|
|
79
|
-
postType: 'wp_template'
|
|
80
|
-
})
|
|
81
|
-
}]
|
|
82
|
-
});
|
|
83
|
-
lastNoticeId.current = notice.id;
|
|
84
|
-
};
|
|
85
53
|
const handleDblClick = event => {
|
|
86
54
|
if (!event.target.classList.contains('is-root-container')) {
|
|
87
55
|
return;
|
|
88
56
|
}
|
|
89
|
-
if (lastNoticeId.current) {
|
|
90
|
-
removeNotice(lastNoticeId.current);
|
|
91
|
-
}
|
|
92
57
|
setIsDialogOpen(true);
|
|
93
58
|
};
|
|
94
59
|
const canvas = contentRef.current;
|
|
95
|
-
canvas?.addEventListener('click', handleClick);
|
|
96
60
|
canvas?.addEventListener('dblclick', handleDblClick);
|
|
97
61
|
return () => {
|
|
98
|
-
canvas?.removeEventListener('click', handleClick);
|
|
99
62
|
canvas?.removeEventListener('dblclick', handleDblClick);
|
|
100
63
|
};
|
|
101
|
-
}, [
|
|
64
|
+
}, [contentRef]);
|
|
102
65
|
return (0, _react.createElement)(_components.__experimentalConfirmDialog, {
|
|
103
66
|
isOpen: isDialogOpen,
|
|
104
67
|
confirmButtonText: (0, _i18n.__)('Edit template'),
|
|
@@ -110,6 +73,6 @@ function EditTemplateBlocksNotification({
|
|
|
110
73
|
});
|
|
111
74
|
},
|
|
112
75
|
onCancel: () => setIsDialogOpen(false)
|
|
113
|
-
}, (0, _i18n.__)('
|
|
76
|
+
}, (0, _i18n.__)('You’ve tried to select a block that is part of a template, which may be used on other posts and pages.'));
|
|
114
77
|
}
|
|
115
78
|
//# sourceMappingURL=edit-template-blocks-notification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_element","
|
|
1
|
+
{"version":3,"names":["_data","require","_element","_i18n","_components","_store","EditTemplateBlocksNotification","contentRef","onNavigateToEntityRecord","templateId","useSelect","select","getEditorSettings","getCurrentTemplateId","editorStore","isDialogOpen","setIsDialogOpen","useState","useEffect","handleDblClick","event","target","classList","contains","canvas","current","addEventListener","removeEventListener","_react","createElement","__experimentalConfirmDialog","isOpen","confirmButtonText","__","onConfirm","postId","postType","onCancel"],"sources":["@wordpress/editor/src/components/editor-canvas/edit-template-blocks-notification.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Component that:\n *\n * - Displays a 'Edit your template to edit this block' notification when the\n * user is focusing on editing page content and clicks on a disabled template\n * block.\n * - Displays a 'Edit your template to edit this block' dialog when the user\n * is focusing on editing page conetnt and double clicks on a disabled\n * template block.\n *\n * @param {Object} props\n * @param {import('react').RefObject<HTMLElement>} props.contentRef Ref to the block\n * editor iframe canvas.\n */\nexport default function EditTemplateBlocksNotification( { contentRef } ) {\n\tconst { onNavigateToEntityRecord, templateId } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getCurrentTemplateId } =\n\t\t\tselect( editorStore );\n\n\t\treturn {\n\t\t\tonNavigateToEntityRecord:\n\t\t\t\tgetEditorSettings().onNavigateToEntityRecord,\n\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t};\n\t}, [] );\n\n\tconst [ isDialogOpen, setIsDialogOpen ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst handleDblClick = ( event ) => {\n\t\t\tif ( ! event.target.classList.contains( 'is-root-container' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetIsDialogOpen( true );\n\t\t};\n\n\t\tconst canvas = contentRef.current;\n\t\tcanvas?.addEventListener( 'dblclick', handleDblClick );\n\t\treturn () => {\n\t\t\tcanvas?.removeEventListener( 'dblclick', handleDblClick );\n\t\t};\n\t}, [ contentRef ] );\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isDialogOpen }\n\t\t\tconfirmButtonText={ __( 'Edit template' ) }\n\t\t\tonConfirm={ () => {\n\t\t\t\tsetIsDialogOpen( false );\n\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\tpostId: templateId,\n\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tonCancel={ () => setIsDialogOpen( false ) }\n\t\t>\n\t\t\t{ __(\n\t\t\t\t'You’ve tried to select a block that is part of a template, which may be used on other posts and pages.'\n\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ACC,IAAAqB,MAAA,CAAAC,aAAA,EAACzB,WAAA,CAAA0B,2BAAa;IACbC,MAAM,EAAGhB,YAAc;IACvBiB,iBAAiB,EAAG,IAAAC,QAAE,EAAE,eAAgB,CAAG;IAC3CC,SAAS,EAAGA,CAAA,KAAM;MACjBlB,eAAe,CAAE,KAAM,CAAC;MACxBR,wBAAwB,CAAE;QACzB2B,MAAM,EAAE1B,UAAU;QAClB2B,QAAQ,EAAE;MACX,CAAE,CAAC;IACJ,CAAG;IACHC,QAAQ,EAAGA,CAAA,KAAMrB,eAAe,CAAE,KAAM;EAAG,GAEzC,IAAAiB,QAAE,EACH,wGACD,CACc,CAAC;AAElB"}
|
|
@@ -17,6 +17,7 @@ var _postTitle = _interopRequireDefault(require("../post-title"));
|
|
|
17
17
|
var _store = require("../../store");
|
|
18
18
|
var _lockUnlock = require("../../lock-unlock");
|
|
19
19
|
var _editTemplateBlocksNotification = _interopRequireDefault(require("./edit-template-blocks-notification"));
|
|
20
|
+
var _useSelectNearestEditableBlock = _interopRequireDefault(require("../../hooks/use-select-nearest-editable-block"));
|
|
20
21
|
/**
|
|
21
22
|
* External dependencies
|
|
22
23
|
*/
|
|
@@ -244,6 +245,8 @@ function EditorCanvas({
|
|
|
244
245
|
const typewriterRef = (0, _blockEditor.__unstableUseTypewriter)();
|
|
245
246
|
const contentRef = (0, _compose.useMergeRefs)([localRef, renderingMode === 'post-only' ? typewriterRef : noop, useFlashEditableBlocks({
|
|
246
247
|
isEnabled: renderingMode === 'template-locked'
|
|
248
|
+
}), (0, _useSelectNearestEditableBlock.default)({
|
|
249
|
+
isEnabled: renderingMode === 'template-locked'
|
|
247
250
|
})]);
|
|
248
251
|
return (0, _react.createElement)(BlockCanvas, {
|
|
249
252
|
shouldIframe: !disableIframe || ['Tablet', 'Mobile'].includes(deviceType),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_blockEditor","_element","_data","_blocks","_coreData","_compose","_postTitle","_store","_lockUnlock","_editTemplateBlocksNotification","LayoutStyle","useLayoutClasses","useLayoutStyles","ExperimentalBlockCanvas","BlockCanvas","useFlashEditableBlocks","unlock","blockEditorPrivateApis","noop","DESIGN_POST_TYPES","getPostContentAttributes","blocks","i","length","name","attributes","innerBlocks","nestedPostContent","checkForPostContentAtRootLevel","EditorCanvas","autoFocus","className","renderAppender","styles","disableIframe","iframeProps","children","renderingMode","postContentAttributes","editedPostTemplate","wrapperBlockName","wrapperUniqueId","deviceType","showEditorPadding","isDesignPostType","useSelect","select","getCurrentPostId","getCurrentPostType","getCurrentTemplateId","getEditorSettings","getRenderingMode","getDeviceType","editorStore","getPostType","canUser","getEditedEntityRecord","coreStore","postTypeSlug","_renderingMode","_wrapperBlockName","editorSettings","supportsTemplateMode","postType","canEditTemplate","currentTemplateId","template","undefined","includes","viewable","onNavigateToPreviousEntityRecord","isCleanNewPost","hasRootPaddingAwareAlignments","themeHasDisabledLayoutStyles","themeSupportsLayout","_settings","blockEditorStore","getSettings","disableLayoutStyles","supportsLayout","__experimentalFeatures","useRootPaddingAwareAlignments","deviceStyles","useResizeCanvas","globalLayoutSettings","useSettings","fallbackLayout","useMemo","type","newestPostContentAttributes","content","parseableContent","parse","hasPostContentAtRootLevel","layout","align","postContentLayoutClasses","blockListLayoutClass","classnames","postContentLayoutStyles","postContentLayout","inherit","contentSize","wideSize","blockListLayout","postEditorLayout","observeTypingRef","useTypingObserver","titleRef","useRef","useEffect","current","focus","alignCSS","localRef","typewriterRef","useTypewriter","contentRef","useMergeRefs","isEnabled","_react","createElement","shouldIframe","height","style","Fragment","selector","css","contentEditable","ref","marginTop","default","RecursionProvider","blockName","uniqueId","BlockList","toLowerCase","dropZoneElement","parentNode","__unstableDisableDropZone","_default","exports"],"sources":["@wordpress/editor/src/components/editor-canvas/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockList,\n\tstore as blockEditorStore,\n\t__unstableUseTypewriter as useTypewriter,\n\t__unstableUseTypingObserver as useTypingObserver,\n\tuseSettings,\n\tRecursionProvider,\n\tprivateApis as blockEditorPrivateApis,\n\t__experimentalUseResizeCanvas as useResizeCanvas,\n} from '@wordpress/block-editor';\nimport { useEffect, useRef, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { parse } from '@wordpress/blocks';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PostTitle from '../post-title';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport EditTemplateBlocksNotification from './edit-template-blocks-notification';\n\nconst {\n\tLayoutStyle,\n\tuseLayoutClasses,\n\tuseLayoutStyles,\n\tExperimentalBlockCanvas: BlockCanvas,\n\tuseFlashEditableBlocks,\n} = unlock( blockEditorPrivateApis );\n\nconst noop = () => {};\n\n/**\n * These post types have a special editor where they don't allow you to fill the title\n * and they don't apply the layout styles.\n */\nconst DESIGN_POST_TYPES = [\n\t'wp_block',\n\t'wp_template',\n\t'wp_navigation',\n\t'wp_template_part',\n];\n\n/**\n * Given an array of nested blocks, find the first Post Content\n * block inside it, recursing through any nesting levels,\n * and return its attributes.\n *\n * @param {Array} blocks A list of blocks.\n *\n * @return {Object | undefined} The Post Content block.\n */\nfunction getPostContentAttributes( blocks ) {\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( blocks[ i ].name === 'core/post-content' ) {\n\t\t\treturn blocks[ i ].attributes;\n\t\t}\n\t\tif ( blocks[ i ].innerBlocks.length ) {\n\t\t\tconst nestedPostContent = getPostContentAttributes(\n\t\t\t\tblocks[ i ].innerBlocks\n\t\t\t);\n\n\t\t\tif ( nestedPostContent ) {\n\t\t\t\treturn nestedPostContent;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction checkForPostContentAtRootLevel( blocks ) {\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( blocks[ i ].name === 'core/post-content' ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction EditorCanvas( {\n\t// Ideally as we unify post and site editors, we won't need these props.\n\tautoFocus,\n\tclassName,\n\trenderAppender,\n\tstyles,\n\tdisableIframe = false,\n\tiframeProps,\n\tchildren,\n} ) {\n\tconst {\n\t\trenderingMode,\n\t\tpostContentAttributes,\n\t\teditedPostTemplate = {},\n\t\twrapperBlockName,\n\t\twrapperUniqueId,\n\t\tdeviceType,\n\t\tshowEditorPadding,\n\t\tisDesignPostType,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostId,\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentTemplateId,\n\t\t\tgetEditorSettings,\n\t\t\tgetRenderingMode,\n\t\t\tgetDeviceType,\n\t\t} = select( editorStore );\n\t\tconst { getPostType, canUser, getEditedEntityRecord } =\n\t\t\tselect( coreStore );\n\t\tconst postTypeSlug = getCurrentPostType();\n\t\tconst _renderingMode = getRenderingMode();\n\t\tlet _wrapperBlockName;\n\n\t\tif ( postTypeSlug === 'wp_block' ) {\n\t\t\t_wrapperBlockName = 'core/block';\n\t\t} else if ( _renderingMode === 'post-only' ) {\n\t\t\t_wrapperBlockName = 'core/post-content';\n\t\t}\n\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst supportsTemplateMode = editorSettings.supportsTemplateMode;\n\t\tconst postType = getPostType( postTypeSlug );\n\t\tconst canEditTemplate = canUser( 'create', 'templates' );\n\t\tconst currentTemplateId = getCurrentTemplateId();\n\t\tconst template = currentTemplateId\n\t\t\t? getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\tcurrentTemplateId\n\t\t\t )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\trenderingMode: _renderingMode,\n\t\t\tpostContentAttributes: editorSettings.postContentAttributes,\n\t\t\tisDesignPostType: DESIGN_POST_TYPES.includes( postTypeSlug ),\n\t\t\t// Post template fetch returns a 404 on classic themes, which\n\t\t\t// messes with e2e tests, so check it's a block theme first.\n\t\t\teditedPostTemplate:\n\t\t\t\tpostType?.viewable && supportsTemplateMode && canEditTemplate\n\t\t\t\t\t? template\n\t\t\t\t\t: undefined,\n\t\t\twrapperBlockName: _wrapperBlockName,\n\t\t\twrapperUniqueId: getCurrentPostId(),\n\t\t\tdeviceType: getDeviceType(),\n\t\t\tshowEditorPadding:\n\t\t\t\t!! editorSettings.onNavigateToPreviousEntityRecord,\n\t\t};\n\t}, [] );\n\tconst { isCleanNewPost } = useSelect( editorStore );\n\tconst {\n\t\thasRootPaddingAwareAlignments,\n\t\tthemeHasDisabledLayoutStyles,\n\t\tthemeSupportsLayout,\n\t} = useSelect( ( select ) => {\n\t\tconst _settings = select( blockEditorStore ).getSettings();\n\t\treturn {\n\t\t\tthemeHasDisabledLayoutStyles: _settings.disableLayoutStyles,\n\t\t\tthemeSupportsLayout: _settings.supportsLayout,\n\t\t\thasRootPaddingAwareAlignments:\n\t\t\t\t_settings.__experimentalFeatures?.useRootPaddingAwareAlignments,\n\t\t};\n\t}, [] );\n\n\tconst deviceStyles = useResizeCanvas( deviceType );\n\tconst [ globalLayoutSettings ] = useSettings( 'layout' );\n\n\t// fallbackLayout is used if there is no Post Content,\n\t// and for Post Title.\n\tconst fallbackLayout = useMemo( () => {\n\t\tif ( renderingMode !== 'post-only' || isDesignPostType ) {\n\t\t\treturn { type: 'default' };\n\t\t}\n\n\t\tif ( themeSupportsLayout ) {\n\t\t\t// We need to ensure support for wide and full alignments,\n\t\t\t// so we add the constrained type.\n\t\t\treturn { ...globalLayoutSettings, type: 'constrained' };\n\t\t}\n\t\t// Set default layout for classic themes so all alignments are supported.\n\t\treturn { type: 'default' };\n\t}, [\n\t\trenderingMode,\n\t\tthemeSupportsLayout,\n\t\tglobalLayoutSettings,\n\t\tisDesignPostType,\n\t] );\n\n\tconst newestPostContentAttributes = useMemo( () => {\n\t\tif (\n\t\t\t! editedPostTemplate?.content &&\n\t\t\t! editedPostTemplate?.blocks &&\n\t\t\tpostContentAttributes\n\t\t) {\n\t\t\treturn postContentAttributes;\n\t\t}\n\t\t// When in template editing mode, we can access the blocks directly.\n\t\tif ( editedPostTemplate?.blocks ) {\n\t\t\treturn getPostContentAttributes( editedPostTemplate?.blocks );\n\t\t}\n\t\t// If there are no blocks, we have to parse the content string.\n\t\t// Best double-check it's a string otherwise the parse function gets unhappy.\n\t\tconst parseableContent =\n\t\t\ttypeof editedPostTemplate?.content === 'string'\n\t\t\t\t? editedPostTemplate?.content\n\t\t\t\t: '';\n\n\t\treturn getPostContentAttributes( parse( parseableContent ) ) || {};\n\t}, [\n\t\teditedPostTemplate?.content,\n\t\teditedPostTemplate?.blocks,\n\t\tpostContentAttributes,\n\t] );\n\n\tconst hasPostContentAtRootLevel = useMemo( () => {\n\t\tif ( ! editedPostTemplate?.content && ! editedPostTemplate?.blocks ) {\n\t\t\treturn false;\n\t\t}\n\t\t// When in template editing mode, we can access the blocks directly.\n\t\tif ( editedPostTemplate?.blocks ) {\n\t\t\treturn checkForPostContentAtRootLevel( editedPostTemplate?.blocks );\n\t\t}\n\t\t// If there are no blocks, we have to parse the content string.\n\t\t// Best double-check it's a string otherwise the parse function gets unhappy.\n\t\tconst parseableContent =\n\t\t\ttypeof editedPostTemplate?.content === 'string'\n\t\t\t\t? editedPostTemplate?.content\n\t\t\t\t: '';\n\n\t\treturn (\n\t\t\tcheckForPostContentAtRootLevel( parse( parseableContent ) ) || false\n\t\t);\n\t}, [ editedPostTemplate?.content, editedPostTemplate?.blocks ] );\n\n\tconst { layout = {}, align = '' } = newestPostContentAttributes || {};\n\n\tconst postContentLayoutClasses = useLayoutClasses(\n\t\tnewestPostContentAttributes,\n\t\t'core/post-content'\n\t);\n\n\tconst blockListLayoutClass = classnames(\n\t\t{\n\t\t\t'is-layout-flow': ! themeSupportsLayout,\n\t\t},\n\t\tthemeSupportsLayout && postContentLayoutClasses,\n\t\talign && `align${ align }`\n\t);\n\n\tconst postContentLayoutStyles = useLayoutStyles(\n\t\tnewestPostContentAttributes,\n\t\t'core/post-content',\n\t\t'.block-editor-block-list__layout.is-root-container'\n\t);\n\n\t// Update type for blocks using legacy layouts.\n\tconst postContentLayout = useMemo( () => {\n\t\treturn layout &&\n\t\t\t( layout?.type === 'constrained' ||\n\t\t\t\tlayout?.inherit ||\n\t\t\t\tlayout?.contentSize ||\n\t\t\t\tlayout?.wideSize )\n\t\t\t? { ...globalLayoutSettings, ...layout, type: 'constrained' }\n\t\t\t: { ...globalLayoutSettings, ...layout, type: 'default' };\n\t}, [\n\t\tlayout?.type,\n\t\tlayout?.inherit,\n\t\tlayout?.contentSize,\n\t\tlayout?.wideSize,\n\t\tglobalLayoutSettings,\n\t] );\n\n\t// If there is a Post Content block we use its layout for the block list;\n\t// if not, this must be a classic theme, in which case we use the fallback layout.\n\tconst blockListLayout = postContentAttributes\n\t\t? postContentLayout\n\t\t: fallbackLayout;\n\n\tconst postEditorLayout =\n\t\tblockListLayout?.type === 'default' && ! hasPostContentAtRootLevel\n\t\t\t? fallbackLayout\n\t\t\t: blockListLayout;\n\n\tconst observeTypingRef = useTypingObserver();\n\tconst titleRef = useRef();\n\tuseEffect( () => {\n\t\tif ( ! autoFocus || ! isCleanNewPost() ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ autoFocus, isCleanNewPost ] );\n\n\t// Add some styles for alignwide/alignfull Post Content and its children.\n\tconst alignCSS = `.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}\n\t\t.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`;\n\n\tconst localRef = useRef();\n\tconst typewriterRef = useTypewriter();\n\tconst contentRef = useMergeRefs( [\n\t\tlocalRef,\n\t\trenderingMode === 'post-only' ? typewriterRef : noop,\n\t\tuseFlashEditableBlocks( {\n\t\t\tisEnabled: renderingMode === 'template-locked',\n\t\t} ),\n\t] );\n\n\treturn (\n\t\t<BlockCanvas\n\t\t\tshouldIframe={\n\t\t\t\t! disableIframe || [ 'Tablet', 'Mobile' ].includes( deviceType )\n\t\t\t}\n\t\t\tcontentRef={ contentRef }\n\t\t\tstyles={ styles }\n\t\t\theight=\"100%\"\n\t\t\tiframeProps={ {\n\t\t\t\tclassName: classnames( 'editor-canvas__iframe', {\n\t\t\t\t\t'has-editor-padding': showEditorPadding,\n\t\t\t\t} ),\n\t\t\t\t...iframeProps,\n\t\t\t\tstyle: {\n\t\t\t\t\t...iframeProps?.style,\n\t\t\t\t\t...deviceStyles,\n\t\t\t\t},\n\t\t\t} }\n\t\t>\n\t\t\t{ themeSupportsLayout &&\n\t\t\t\t! themeHasDisabledLayoutStyles &&\n\t\t\t\trenderingMode === 'post-only' &&\n\t\t\t\t! isDesignPostType && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\tselector=\".editor-editor-canvas__post-title-wrapper\"\n\t\t\t\t\t\t\tlayout={ fallbackLayout }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\tselector=\".block-editor-block-list__layout.is-root-container\"\n\t\t\t\t\t\t\tlayout={ postEditorLayout }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ align && <LayoutStyle css={ alignCSS } /> }\n\t\t\t\t\t\t{ postContentLayoutStyles && (\n\t\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\t\tlayout={ postContentLayout }\n\t\t\t\t\t\t\t\tcss={ postContentLayoutStyles }\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) }\n\t\t\t{ renderingMode === 'post-only' && ! isDesignPostType && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'editor-editor-canvas__post-title-wrapper',\n\t\t\t\t\t\t// The following class is only here for backward comapatibility\n\t\t\t\t\t\t// some themes might be using it to style the post title.\n\t\t\t\t\t\t'edit-post-visual-editor__post-title-wrapper',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'has-global-padding': hasRootPaddingAwareAlignments,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tcontentEditable={ false }\n\t\t\t\t\tref={ observeTypingRef }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t// This is using inline styles\n\t\t\t\t\t\t// so it's applied for both iframed and non iframed editors.\n\t\t\t\t\t\tmarginTop: '4rem',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<PostTitle ref={ titleRef } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<RecursionProvider\n\t\t\t\tblockName={ wrapperBlockName }\n\t\t\t\tuniqueId={ wrapperUniqueId }\n\t\t\t>\n\t\t\t\t<BlockList\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t'is-' + deviceType.toLowerCase() + '-preview',\n\t\t\t\t\t\trenderingMode !== 'post-only' || isDesignPostType\n\t\t\t\t\t\t\t? 'wp-site-blocks'\n\t\t\t\t\t\t\t: `${ blockListLayoutClass } wp-block-post-content` // Ensure root level blocks receive default/flow blockGap styling rules.\n\t\t\t\t\t) }\n\t\t\t\t\tlayout={ blockListLayout }\n\t\t\t\t\tdropZoneElement={\n\t\t\t\t\t\t// When iframed, pass in the html element of the iframe to\n\t\t\t\t\t\t// ensure the drop zone extends to the edges of the iframe.\n\t\t\t\t\t\tdisableIframe\n\t\t\t\t\t\t\t? localRef.current\n\t\t\t\t\t\t\t: localRef.current?.parentNode\n\t\t\t\t\t}\n\t\t\t\t\trenderAppender={ renderAppender }\n\t\t\t\t\t__unstableDisableDropZone={\n\t\t\t\t\t\t// In template preview mode, disable drop zones at the root of the template.\n\t\t\t\t\t\trenderingMode === 'template-locked' ? true : false\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ renderingMode === 'template-locked' && (\n\t\t\t\t\t<EditTemplateBlocksNotification contentRef={ localRef } />\n\t\t\t\t) }\n\t\t\t</RecursionProvider>\n\t\t\t{ children }\n\t\t</BlockCanvas>\n\t);\n}\n\nexport default EditorCanvas;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAKA,IAAAO,UAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,+BAAA,GAAAX,sBAAA,CAAAC,OAAA;AA9BA;AACA;AACA;;AAGA;AACA;AACA;;AAiBA;AACA;AACA;;AAMA,MAAM;EACLW,WAAW;EACXC,gBAAgB;EAChBC,eAAe;EACfC,uBAAuB,EAAEC,WAAW;EACpCC;AACD,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEpC,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;;AAErB;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAG,CACzB,UAAU,EACV,aAAa,EACb,eAAe,EACf,kBAAkB,CAClB;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,wBAAwBA,CAAEC,MAAM,EAAG;EAC3C,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,MAAM,CAACE,MAAM,EAAED,CAAC,EAAE,EAAG;IACzC,IAAKD,MAAM,CA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A,GAAAC,OAAA,CAAAV,OAAA,GAEctG,YAAY"}
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_blockEditor","_element","_data","_blocks","_coreData","_compose","_postTitle","_store","_lockUnlock","_editTemplateBlocksNotification","_useSelectNearestEditableBlock","LayoutStyle","useLayoutClasses","useLayoutStyles","ExperimentalBlockCanvas","BlockCanvas","useFlashEditableBlocks","unlock","blockEditorPrivateApis","noop","DESIGN_POST_TYPES","getPostContentAttributes","blocks","i","length","name","attributes","innerBlocks","nestedPostContent","checkForPostContentAtRootLevel","EditorCanvas","autoFocus","className","renderAppender","styles","disableIframe","iframeProps","children","renderingMode","postContentAttributes","editedPostTemplate","wrapperBlockName","wrapperUniqueId","deviceType","showEditorPadding","isDesignPostType","useSelect","select","getCurrentPostId","getCurrentPostType","getCurrentTemplateId","getEditorSettings","getRenderingMode","getDeviceType","editorStore","getPostType","canUser","getEditedEntityRecord","coreStore","postTypeSlug","_renderingMode","_wrapperBlockName","editorSettings","supportsTemplateMode","postType","canEditTemplate","currentTemplateId","template","undefined","includes","viewable","onNavigateToPreviousEntityRecord","isCleanNewPost","hasRootPaddingAwareAlignments","themeHasDisabledLayoutStyles","themeSupportsLayout","_settings","blockEditorStore","getSettings","disableLayoutStyles","supportsLayout","__experimentalFeatures","useRootPaddingAwareAlignments","deviceStyles","useResizeCanvas","globalLayoutSettings","useSettings","fallbackLayout","useMemo","type","newestPostContentAttributes","content","parseableContent","parse","hasPostContentAtRootLevel","layout","align","postContentLayoutClasses","blockListLayoutClass","classnames","postContentLayoutStyles","postContentLayout","inherit","contentSize","wideSize","blockListLayout","postEditorLayout","observeTypingRef","useTypingObserver","titleRef","useRef","useEffect","current","focus","alignCSS","localRef","typewriterRef","useTypewriter","contentRef","useMergeRefs","isEnabled","useSelectNearestEditableBlock","_react","createElement","shouldIframe","height","style","Fragment","selector","css","contentEditable","ref","marginTop","default","RecursionProvider","blockName","uniqueId","BlockList","toLowerCase","dropZoneElement","parentNode","__unstableDisableDropZone","_default","exports"],"sources":["@wordpress/editor/src/components/editor-canvas/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockList,\n\tstore as blockEditorStore,\n\t__unstableUseTypewriter as useTypewriter,\n\t__unstableUseTypingObserver as useTypingObserver,\n\tuseSettings,\n\tRecursionProvider,\n\tprivateApis as blockEditorPrivateApis,\n\t__experimentalUseResizeCanvas as useResizeCanvas,\n} from '@wordpress/block-editor';\nimport { useEffect, useRef, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { parse } from '@wordpress/blocks';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PostTitle from '../post-title';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport EditTemplateBlocksNotification from './edit-template-blocks-notification';\nimport useSelectNearestEditableBlock from '../../hooks/use-select-nearest-editable-block';\n\nconst {\n\tLayoutStyle,\n\tuseLayoutClasses,\n\tuseLayoutStyles,\n\tExperimentalBlockCanvas: BlockCanvas,\n\tuseFlashEditableBlocks,\n} = unlock( blockEditorPrivateApis );\n\nconst noop = () => {};\n\n/**\n * These post types have a special editor where they don't allow you to fill the title\n * and they don't apply the layout styles.\n */\nconst DESIGN_POST_TYPES = [\n\t'wp_block',\n\t'wp_template',\n\t'wp_navigation',\n\t'wp_template_part',\n];\n\n/**\n * Given an array of nested blocks, find the first Post Content\n * block inside it, recursing through any nesting levels,\n * and return its attributes.\n *\n * @param {Array} blocks A list of blocks.\n *\n * @return {Object | undefined} The Post Content block.\n */\nfunction getPostContentAttributes( blocks ) {\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( blocks[ i ].name === 'core/post-content' ) {\n\t\t\treturn blocks[ i ].attributes;\n\t\t}\n\t\tif ( blocks[ i ].innerBlocks.length ) {\n\t\t\tconst nestedPostContent = getPostContentAttributes(\n\t\t\t\tblocks[ i ].innerBlocks\n\t\t\t);\n\n\t\t\tif ( nestedPostContent ) {\n\t\t\t\treturn nestedPostContent;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction checkForPostContentAtRootLevel( blocks ) {\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( blocks[ i ].name === 'core/post-content' ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction EditorCanvas( {\n\t// Ideally as we unify post and site editors, we won't need these props.\n\tautoFocus,\n\tclassName,\n\trenderAppender,\n\tstyles,\n\tdisableIframe = false,\n\tiframeProps,\n\tchildren,\n} ) {\n\tconst {\n\t\trenderingMode,\n\t\tpostContentAttributes,\n\t\teditedPostTemplate = {},\n\t\twrapperBlockName,\n\t\twrapperUniqueId,\n\t\tdeviceType,\n\t\tshowEditorPadding,\n\t\tisDesignPostType,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostId,\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentTemplateId,\n\t\t\tgetEditorSettings,\n\t\t\tgetRenderingMode,\n\t\t\tgetDeviceType,\n\t\t} = select( editorStore );\n\t\tconst { getPostType, canUser, getEditedEntityRecord } =\n\t\t\tselect( coreStore );\n\t\tconst postTypeSlug = getCurrentPostType();\n\t\tconst _renderingMode = getRenderingMode();\n\t\tlet _wrapperBlockName;\n\n\t\tif ( postTypeSlug === 'wp_block' ) {\n\t\t\t_wrapperBlockName = 'core/block';\n\t\t} else if ( _renderingMode === 'post-only' ) {\n\t\t\t_wrapperBlockName = 'core/post-content';\n\t\t}\n\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst supportsTemplateMode = editorSettings.supportsTemplateMode;\n\t\tconst postType = getPostType( postTypeSlug );\n\t\tconst canEditTemplate = canUser( 'create', 'templates' );\n\t\tconst currentTemplateId = getCurrentTemplateId();\n\t\tconst template = currentTemplateId\n\t\t\t? getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\tcurrentTemplateId\n\t\t\t )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\trenderingMode: _renderingMode,\n\t\t\tpostContentAttributes: editorSettings.postContentAttributes,\n\t\t\tisDesignPostType: DESIGN_POST_TYPES.includes( postTypeSlug ),\n\t\t\t// Post template fetch returns a 404 on classic themes, which\n\t\t\t// messes with e2e tests, so check it's a block theme first.\n\t\t\teditedPostTemplate:\n\t\t\t\tpostType?.viewable && supportsTemplateMode && canEditTemplate\n\t\t\t\t\t? template\n\t\t\t\t\t: undefined,\n\t\t\twrapperBlockName: _wrapperBlockName,\n\t\t\twrapperUniqueId: getCurrentPostId(),\n\t\t\tdeviceType: getDeviceType(),\n\t\t\tshowEditorPadding:\n\t\t\t\t!! editorSettings.onNavigateToPreviousEntityRecord,\n\t\t};\n\t}, [] );\n\tconst { isCleanNewPost } = useSelect( editorStore );\n\tconst {\n\t\thasRootPaddingAwareAlignments,\n\t\tthemeHasDisabledLayoutStyles,\n\t\tthemeSupportsLayout,\n\t} = useSelect( ( select ) => {\n\t\tconst _settings = select( blockEditorStore ).getSettings();\n\t\treturn {\n\t\t\tthemeHasDisabledLayoutStyles: _settings.disableLayoutStyles,\n\t\t\tthemeSupportsLayout: _settings.supportsLayout,\n\t\t\thasRootPaddingAwareAlignments:\n\t\t\t\t_settings.__experimentalFeatures?.useRootPaddingAwareAlignments,\n\t\t};\n\t}, [] );\n\n\tconst deviceStyles = useResizeCanvas( deviceType );\n\tconst [ globalLayoutSettings ] = useSettings( 'layout' );\n\n\t// fallbackLayout is used if there is no Post Content,\n\t// and for Post Title.\n\tconst fallbackLayout = useMemo( () => {\n\t\tif ( renderingMode !== 'post-only' || isDesignPostType ) {\n\t\t\treturn { type: 'default' };\n\t\t}\n\n\t\tif ( themeSupportsLayout ) {\n\t\t\t// We need to ensure support for wide and full alignments,\n\t\t\t// so we add the constrained type.\n\t\t\treturn { ...globalLayoutSettings, type: 'constrained' };\n\t\t}\n\t\t// Set default layout for classic themes so all alignments are supported.\n\t\treturn { type: 'default' };\n\t}, [\n\t\trenderingMode,\n\t\tthemeSupportsLayout,\n\t\tglobalLayoutSettings,\n\t\tisDesignPostType,\n\t] );\n\n\tconst newestPostContentAttributes = useMemo( () => {\n\t\tif (\n\t\t\t! editedPostTemplate?.content &&\n\t\t\t! editedPostTemplate?.blocks &&\n\t\t\tpostContentAttributes\n\t\t) {\n\t\t\treturn postContentAttributes;\n\t\t}\n\t\t// When in template editing mode, we can access the blocks directly.\n\t\tif ( editedPostTemplate?.blocks ) {\n\t\t\treturn getPostContentAttributes( editedPostTemplate?.blocks );\n\t\t}\n\t\t// If there are no blocks, we have to parse the content string.\n\t\t// Best double-check it's a string otherwise the parse function gets unhappy.\n\t\tconst parseableContent =\n\t\t\ttypeof editedPostTemplate?.content === 'string'\n\t\t\t\t? editedPostTemplate?.content\n\t\t\t\t: '';\n\n\t\treturn getPostContentAttributes( parse( parseableContent ) ) || {};\n\t}, [\n\t\teditedPostTemplate?.content,\n\t\teditedPostTemplate?.blocks,\n\t\tpostContentAttributes,\n\t] );\n\n\tconst hasPostContentAtRootLevel = useMemo( () => {\n\t\tif ( ! editedPostTemplate?.content && ! editedPostTemplate?.blocks ) {\n\t\t\treturn false;\n\t\t}\n\t\t// When in template editing mode, we can access the blocks directly.\n\t\tif ( editedPostTemplate?.blocks ) {\n\t\t\treturn checkForPostContentAtRootLevel( editedPostTemplate?.blocks );\n\t\t}\n\t\t// If there are no blocks, we have to parse the content string.\n\t\t// Best double-check it's a string otherwise the parse function gets unhappy.\n\t\tconst parseableContent =\n\t\t\ttypeof editedPostTemplate?.content === 'string'\n\t\t\t\t? editedPostTemplate?.content\n\t\t\t\t: '';\n\n\t\treturn (\n\t\t\tcheckForPostContentAtRootLevel( parse( parseableContent ) ) || false\n\t\t);\n\t}, [ editedPostTemplate?.content, editedPostTemplate?.blocks ] );\n\n\tconst { layout = {}, align = '' } = newestPostContentAttributes || {};\n\n\tconst postContentLayoutClasses = useLayoutClasses(\n\t\tnewestPostContentAttributes,\n\t\t'core/post-content'\n\t);\n\n\tconst blockListLayoutClass = classnames(\n\t\t{\n\t\t\t'is-layout-flow': ! themeSupportsLayout,\n\t\t},\n\t\tthemeSupportsLayout && postContentLayoutClasses,\n\t\talign && `align${ align }`\n\t);\n\n\tconst postContentLayoutStyles = useLayoutStyles(\n\t\tnewestPostContentAttributes,\n\t\t'core/post-content',\n\t\t'.block-editor-block-list__layout.is-root-container'\n\t);\n\n\t// Update type for blocks using legacy layouts.\n\tconst postContentLayout = useMemo( () => {\n\t\treturn layout &&\n\t\t\t( layout?.type === 'constrained' ||\n\t\t\t\tlayout?.inherit ||\n\t\t\t\tlayout?.contentSize ||\n\t\t\t\tlayout?.wideSize )\n\t\t\t? { ...globalLayoutSettings, ...layout, type: 'constrained' }\n\t\t\t: { ...globalLayoutSettings, ...layout, type: 'default' };\n\t}, [\n\t\tlayout?.type,\n\t\tlayout?.inherit,\n\t\tlayout?.contentSize,\n\t\tlayout?.wideSize,\n\t\tglobalLayoutSettings,\n\t] );\n\n\t// If there is a Post Content block we use its layout for the block list;\n\t// if not, this must be a classic theme, in which case we use the fallback layout.\n\tconst blockListLayout = postContentAttributes\n\t\t? postContentLayout\n\t\t: fallbackLayout;\n\n\tconst postEditorLayout =\n\t\tblockListLayout?.type === 'default' && ! hasPostContentAtRootLevel\n\t\t\t? fallbackLayout\n\t\t\t: blockListLayout;\n\n\tconst observeTypingRef = useTypingObserver();\n\tconst titleRef = useRef();\n\tuseEffect( () => {\n\t\tif ( ! autoFocus || ! isCleanNewPost() ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ autoFocus, isCleanNewPost ] );\n\n\t// Add some styles for alignwide/alignfull Post Content and its children.\n\tconst alignCSS = `.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}\n\t\t.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`;\n\n\tconst localRef = useRef();\n\tconst typewriterRef = useTypewriter();\n\tconst contentRef = useMergeRefs( [\n\t\tlocalRef,\n\t\trenderingMode === 'post-only' ? typewriterRef : noop,\n\t\tuseFlashEditableBlocks( {\n\t\t\tisEnabled: renderingMode === 'template-locked',\n\t\t} ),\n\t\tuseSelectNearestEditableBlock( {\n\t\t\tisEnabled: renderingMode === 'template-locked',\n\t\t} ),\n\t] );\n\n\treturn (\n\t\t<BlockCanvas\n\t\t\tshouldIframe={\n\t\t\t\t! disableIframe || [ 'Tablet', 'Mobile' ].includes( deviceType )\n\t\t\t}\n\t\t\tcontentRef={ contentRef }\n\t\t\tstyles={ styles }\n\t\t\theight=\"100%\"\n\t\t\tiframeProps={ {\n\t\t\t\tclassName: classnames( 'editor-canvas__iframe', {\n\t\t\t\t\t'has-editor-padding': showEditorPadding,\n\t\t\t\t} ),\n\t\t\t\t...iframeProps,\n\t\t\t\tstyle: {\n\t\t\t\t\t...iframeProps?.style,\n\t\t\t\t\t...deviceStyles,\n\t\t\t\t},\n\t\t\t} }\n\t\t>\n\t\t\t{ themeSupportsLayout &&\n\t\t\t\t! themeHasDisabledLayoutStyles &&\n\t\t\t\trenderingMode === 'post-only' &&\n\t\t\t\t! isDesignPostType && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\tselector=\".editor-editor-canvas__post-title-wrapper\"\n\t\t\t\t\t\t\tlayout={ fallbackLayout }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\tselector=\".block-editor-block-list__layout.is-root-container\"\n\t\t\t\t\t\t\tlayout={ postEditorLayout }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ align && <LayoutStyle css={ alignCSS } /> }\n\t\t\t\t\t\t{ postContentLayoutStyles && (\n\t\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\t\tlayout={ postContentLayout }\n\t\t\t\t\t\t\t\tcss={ postContentLayoutStyles }\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) }\n\t\t\t{ renderingMode === 'post-only' && ! isDesignPostType && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'editor-editor-canvas__post-title-wrapper',\n\t\t\t\t\t\t// The following class is only here for backward comapatibility\n\t\t\t\t\t\t// some themes might be using it to style the post title.\n\t\t\t\t\t\t'edit-post-visual-editor__post-title-wrapper',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'has-global-padding': hasRootPaddingAwareAlignments,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tcontentEditable={ false }\n\t\t\t\t\tref={ observeTypingRef }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t// This is using inline styles\n\t\t\t\t\t\t// so it's applied for both iframed and non iframed editors.\n\t\t\t\t\t\tmarginTop: '4rem',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<PostTitle ref={ titleRef } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<RecursionProvider\n\t\t\t\tblockName={ wrapperBlockName }\n\t\t\t\tuniqueId={ wrapperUniqueId }\n\t\t\t>\n\t\t\t\t<BlockList\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t'is-' + deviceType.toLowerCase() + '-preview',\n\t\t\t\t\t\trenderingMode !== 'post-only' || isDesignPostType\n\t\t\t\t\t\t\t? 'wp-site-blocks'\n\t\t\t\t\t\t\t: `${ blockListLayoutClass } wp-block-post-content` // Ensure root level blocks receive default/flow blockGap styling rules.\n\t\t\t\t\t) }\n\t\t\t\t\tlayout={ blockListLayout }\n\t\t\t\t\tdropZoneElement={\n\t\t\t\t\t\t// When iframed, pass in the html element of the iframe to\n\t\t\t\t\t\t// ensure the drop zone extends to the edges of the iframe.\n\t\t\t\t\t\tdisableIframe\n\t\t\t\t\t\t\t? localRef.current\n\t\t\t\t\t\t\t: localRef.current?.parentNode\n\t\t\t\t\t}\n\t\t\t\t\trenderAppender={ renderAppender }\n\t\t\t\t\t__unstableDisableDropZone={\n\t\t\t\t\t\t// In template preview mode, disable drop zones at the root of the template.\n\t\t\t\t\t\trenderingMode === 'template-locked' ? true : false\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ renderingMode === 'template-locked' && (\n\t\t\t\t\t<EditTemplateBlocksNotification contentRef={ localRef } />\n\t\t\t\t) }\n\t\t\t</RecursionProvider>\n\t\t\t{ children }\n\t\t</BlockCanvas>\n\t);\n}\n\nexport default EditorCanvas;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAKA,IAAAO,UAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,+BAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,8BAAA,GAAAZ,sBAAA,CAAAC,OAAA;AA/BA;AACA;AACA;;AAGA;AACA;AACA;;AAiBA;AACA;AACA;;AAOA,MAAM;EACLY,WAAW;EACXC,gBAAgB;EAChBC,eAAe;EACfC,uBAAuB,EAAEC,WAAW;EACpCC;AACD,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEpC,MAAMC,IAAI,GAAGA,CAAA,K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AAiB;IAC1BkC,eAAe;IACd;IACA;IACAxG,aAAa,GACVgF,QAAQ,CAACH,OAAO,GAChBG,QAAQ,CAACH,OAAO,EAAE4B,UACrB;IACD3G,cAAc,EAAGA,cAAgB;IACjC4G,yBAAyB;IACxB;IACAvG,aAAa,KAAK,iBAAiB,GAAG,IAAI,GAAG;EAC7C,CACD,CAAC,EACAA,aAAa,KAAK,iBAAiB,IACpC,IAAAoF,MAAA,CAAAC,aAAA,EAAClH,+BAAA,CAAA4H,OAA8B;IAACf,UAAU,EAAGH;EAAU,CAAE,CAExC,CAAC,EAClB9E,QACU,CAAC;AAEhB;AAAC,IAAAyG,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAEcvG,YAAY"}
|
|
@@ -9,14 +9,13 @@ exports.default = EntitiesSavedStates;
|
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _components = require("@wordpress/components");
|
|
11
11
|
var _i18n = require("@wordpress/i18n");
|
|
12
|
-
var _data = require("@wordpress/data");
|
|
13
12
|
var _element = require("@wordpress/element");
|
|
14
|
-
var _coreData = require("@wordpress/core-data");
|
|
15
|
-
var _blockEditor = require("@wordpress/block-editor");
|
|
16
13
|
var _compose = require("@wordpress/compose");
|
|
17
|
-
var
|
|
14
|
+
var _data = require("@wordpress/data");
|
|
18
15
|
var _entityTypeList = _interopRequireDefault(require("./entity-type-list"));
|
|
19
16
|
var _useIsDirty = require("./hooks/use-is-dirty");
|
|
17
|
+
var _store = require("../../store");
|
|
18
|
+
var _lockUnlock = require("../../lock-unlock");
|
|
20
19
|
/**
|
|
21
20
|
* WordPress dependencies
|
|
22
21
|
*/
|
|
@@ -25,10 +24,6 @@ var _useIsDirty = require("./hooks/use-is-dirty");
|
|
|
25
24
|
* Internal dependencies
|
|
26
25
|
*/
|
|
27
26
|
|
|
28
|
-
const PUBLISH_ON_SAVE_ENTITIES = [{
|
|
29
|
-
kind: 'postType',
|
|
30
|
-
name: 'wp_navigation'
|
|
31
|
-
}];
|
|
32
27
|
function identity(values) {
|
|
33
28
|
return values;
|
|
34
29
|
}
|
|
@@ -57,19 +52,8 @@ function EntitiesSavedStatesExtensible({
|
|
|
57
52
|
}) {
|
|
58
53
|
const saveButtonRef = (0, _element.useRef)();
|
|
59
54
|
const {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits
|
|
63
|
-
} = (0, _data.useDispatch)(_coreData.store);
|
|
64
|
-
const {
|
|
65
|
-
__unstableMarkLastChangeAsPersistent
|
|
66
|
-
} = (0, _data.useDispatch)(_blockEditor.store);
|
|
67
|
-
const {
|
|
68
|
-
createSuccessNotice,
|
|
69
|
-
createErrorNotice,
|
|
70
|
-
removeNotice
|
|
71
|
-
} = (0, _data.useDispatch)(_notices.store);
|
|
72
|
-
|
|
55
|
+
saveDirtyEntities
|
|
56
|
+
} = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
|
|
73
57
|
// To group entities by type.
|
|
74
58
|
const partitionedSavables = dirtyEntityRecords.reduce((acc, record) => {
|
|
75
59
|
const {
|
|
@@ -91,69 +75,6 @@ function EntitiesSavedStatesExtensible({
|
|
|
91
75
|
} = partitionedSavables;
|
|
92
76
|
const sortedPartitionedSavables = [siteSavables, templateSavables, templatePartSavables, ...Object.values(contentSavables)].filter(Array.isArray);
|
|
93
77
|
const saveEnabled = saveEnabledProp !== null && saveEnabledProp !== void 0 ? saveEnabledProp : isDirty;
|
|
94
|
-
const {
|
|
95
|
-
homeUrl
|
|
96
|
-
} = (0, _data.useSelect)(select => {
|
|
97
|
-
const {
|
|
98
|
-
getUnstableBase // Site index.
|
|
99
|
-
} = select(_coreData.store);
|
|
100
|
-
return {
|
|
101
|
-
homeUrl: getUnstableBase()?.home
|
|
102
|
-
};
|
|
103
|
-
}, []);
|
|
104
|
-
const saveCheckedEntities = () => {
|
|
105
|
-
const saveNoticeId = 'site-editor-save-success';
|
|
106
|
-
removeNotice(saveNoticeId);
|
|
107
|
-
const entitiesToSave = dirtyEntityRecords.filter(({
|
|
108
|
-
kind,
|
|
109
|
-
name,
|
|
110
|
-
key,
|
|
111
|
-
property
|
|
112
|
-
}) => {
|
|
113
|
-
return !unselectedEntities.some(elt => elt.kind === kind && elt.name === name && elt.key === key && elt.property === property);
|
|
114
|
-
});
|
|
115
|
-
close(entitiesToSave);
|
|
116
|
-
const siteItemsToSave = [];
|
|
117
|
-
const pendingSavedRecords = [];
|
|
118
|
-
entitiesToSave.forEach(({
|
|
119
|
-
kind,
|
|
120
|
-
name,
|
|
121
|
-
key,
|
|
122
|
-
property
|
|
123
|
-
}) => {
|
|
124
|
-
if ('root' === kind && 'site' === name) {
|
|
125
|
-
siteItemsToSave.push(property);
|
|
126
|
-
} else {
|
|
127
|
-
if (PUBLISH_ON_SAVE_ENTITIES.some(typeToPublish => typeToPublish.kind === kind && typeToPublish.name === name)) {
|
|
128
|
-
editEntityRecord(kind, name, key, {
|
|
129
|
-
status: 'publish'
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
pendingSavedRecords.push(saveEditedEntityRecord(kind, name, key));
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
if (siteItemsToSave.length) {
|
|
136
|
-
pendingSavedRecords.push(saveSpecifiedEntityEdits('root', 'site', undefined, siteItemsToSave));
|
|
137
|
-
}
|
|
138
|
-
__unstableMarkLastChangeAsPersistent();
|
|
139
|
-
Promise.all(pendingSavedRecords).then(values => {
|
|
140
|
-
return onSave(values);
|
|
141
|
-
}).then(values => {
|
|
142
|
-
if (values.some(value => typeof value === 'undefined')) {
|
|
143
|
-
createErrorNotice((0, _i18n.__)('Saving failed.'));
|
|
144
|
-
} else {
|
|
145
|
-
createSuccessNotice((0, _i18n.__)('Site updated.'), {
|
|
146
|
-
type: 'snackbar',
|
|
147
|
-
id: saveNoticeId,
|
|
148
|
-
actions: [{
|
|
149
|
-
label: (0, _i18n.__)('View site'),
|
|
150
|
-
url: homeUrl
|
|
151
|
-
}]
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
}).catch(error => createErrorNotice(`${(0, _i18n.__)('Saving failed.')} ${error}`));
|
|
155
|
-
};
|
|
156
|
-
|
|
157
78
|
// Explicitly define this with no argument passed. Using `close` on
|
|
158
79
|
// its own will use the event object in place of the expected saved entities.
|
|
159
80
|
const dismissPanel = (0, _element.useCallback)(() => close(), [close]);
|
|
@@ -179,7 +100,12 @@ function EntitiesSavedStatesExtensible({
|
|
|
179
100
|
variant: "primary",
|
|
180
101
|
disabled: !saveEnabled,
|
|
181
102
|
__experimentalIsFocusable: true,
|
|
182
|
-
onClick:
|
|
103
|
+
onClick: () => saveDirtyEntities({
|
|
104
|
+
onSave,
|
|
105
|
+
dirtyEntityRecords,
|
|
106
|
+
entitiesToSkip: unselectedEntities,
|
|
107
|
+
close
|
|
108
|
+
}),
|
|
183
109
|
className: "editor-entities-saved-states__save-button"
|
|
184
110
|
}, saveLabel), (0, _react.createElement)(_components.FlexItem, {
|
|
185
111
|
isBlock: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_data","_element","_coreData","_blockEditor","_compose","_notices","_entityTypeList","_interopRequireDefault","_useIsDirty","PUBLISH_ON_SAVE_ENTITIES","kind","name","identity","values","EntitiesSavedStates","close","renderDialog","undefined","isDirtyProps","useIsDirty","_react","createElement","EntitiesSavedStatesExtensible","additionalPrompt","onSave","saveEnabled","saveEnabledProp","saveLabel","__","dirtyEntityRecords","isDirty","setUnselectedEntities","unselectedEntities","saveButtonRef","useRef","editEntityRecord","saveEditedEntityRecord","__experimentalSaveSpecifiedEntityEdits","saveSpecifiedEntityEdits","useDispatch","coreStore","__unstableMarkLastChangeAsPersistent","blockEditorStore","createSuccessNotice","createErrorNotice","removeNotice","noticesStore","partitionedSavables","reduce","acc","record","push","site","siteSavables","wp_template","templateSavables","wp_template_part","templatePartSavables","contentSavables","sortedPartitionedSavables","Object","filter","Array","isArray","homeUrl","useSelect","select","getUnstableBase","home","saveCheckedEntities","saveNoticeId","entitiesToSave","key","property","some","elt","siteItemsToSave","pendingSavedRecords","forEach","typeToPublish","status","length","Promise","all","then","value","type","id","actions","label","url","catch","error","dismissPanel","useCallback","saveDialogRef","saveDialogProps","useDialog","onClose","dialogLabel","useInstanceId","dialogDescription","ref","className","role","Flex","gap","FlexItem","isBlock","as","Button","variant","disabled","__experimentalIsFocusable","onClick","createInterpolateElement","sprintf","_n","strong","map","list","default"],"sources":["@wordpress/editor/src/components/entities-saved-states/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseCallback,\n\tuseRef,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\t__experimentalUseDialog as useDialog,\n\tuseInstanceId,\n} from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\n\nconst PUBLISH_ON_SAVE_ENTITIES = [\n\t{\n\t\tkind: 'postType',\n\t\tname: 'wp_navigation',\n\t},\n];\n\nfunction identity( values ) {\n\treturn values;\n}\n\nexport default function EntitiesSavedStates( {\n\tclose,\n\trenderDialog = undefined,\n} ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\tclose={ close }\n\t\t\trenderDialog={ renderDialog }\n\t\t\t{ ...isDirtyProps }\n\t\t/>\n\t);\n}\n\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\trenderDialog = undefined,\n\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst {\n\t\teditEntityRecord,\n\t\tsaveEditedEntityRecord,\n\t\t__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,\n\t} = useDispatch( coreStore );\n\n\tconst { __unstableMarkLastChangeAsPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst { createSuccessNotice, createErrorNotice, removeNotice } =\n\t\tuseDispatch( noticesStore );\n\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\n\tconst { homeUrl } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetUnstableBase, // Site index.\n\t\t} = select( coreStore );\n\t\treturn {\n\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t};\n\t}, [] );\n\n\tconst saveCheckedEntities = () => {\n\t\tconst saveNoticeId = 'site-editor-save-success';\n\t\tremoveNotice( saveNoticeId );\n\t\tconst entitiesToSave = dirtyEntityRecords.filter(\n\t\t\t( { kind, name, key, property } ) => {\n\t\t\t\treturn ! unselectedEntities.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === kind &&\n\t\t\t\t\t\telt.name === name &&\n\t\t\t\t\t\telt.key === key &&\n\t\t\t\t\t\telt.property === property\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\n\t\tclose( entitiesToSave );\n\n\t\tconst siteItemsToSave = [];\n\t\tconst pendingSavedRecords = [];\n\t\tentitiesToSave.forEach( ( { kind, name, key, property } ) => {\n\t\t\tif ( 'root' === kind && 'site' === name ) {\n\t\t\t\tsiteItemsToSave.push( property );\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tPUBLISH_ON_SAVE_ENTITIES.some(\n\t\t\t\t\t\t( typeToPublish ) =>\n\t\t\t\t\t\t\ttypeToPublish.kind === kind &&\n\t\t\t\t\t\t\ttypeToPublish.name === name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\teditEntityRecord( kind, name, key, { status: 'publish' } );\n\t\t\t\t}\n\n\t\t\t\tpendingSavedRecords.push(\n\t\t\t\t\tsaveEditedEntityRecord( kind, name, key )\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t\tif ( siteItemsToSave.length ) {\n\t\t\tpendingSavedRecords.push(\n\t\t\t\tsaveSpecifiedEntityEdits(\n\t\t\t\t\t'root',\n\t\t\t\t\t'site',\n\t\t\t\t\tundefined,\n\t\t\t\t\tsiteItemsToSave\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t__unstableMarkLastChangeAsPersistent();\n\n\t\tPromise.all( pendingSavedRecords )\n\t\t\t.then( ( values ) => {\n\t\t\t\treturn onSave( values );\n\t\t\t} )\n\t\t\t.then( ( values ) => {\n\t\t\t\tif (\n\t\t\t\t\tvalues.some( ( value ) => typeof value === 'undefined' )\n\t\t\t\t) {\n\t\t\t\t\tcreateErrorNotice( __( 'Saving failed.' ) );\n\t\t\t\t} else {\n\t\t\t\t\tcreateSuccessNotice( __( 'Site updated.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: saveNoticeId,\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'View site' ),\n\t\t\t\t\t\t\t\turl: homeUrl,\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}\n\t\t\t} )\n\t\t\t.catch( ( error ) =>\n\t\t\t\tcreateErrorNotice( `${ __( 'Saving failed.' ) } ${ error }` )\n\t\t\t);\n\t};\n\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\tconst dialogLabel = useInstanceId( EntitiesSavedStatesExtensible, 'label' );\n\tconst dialogDescription = useInstanceId(\n\t\tEntitiesSavedStatesExtensible,\n\t\t'description'\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={ saveDialogRef }\n\t\t\t{ ...saveDialogProps }\n\t\t\tclassName=\"entities-saved-states__panel\"\n\t\t\trole={ renderDialog ? 'dialog' : undefined }\n\t\t\taria-labelledby={ renderDialog ? dialogLabel : undefined }\n\t\t\taria-describedby={ renderDialog ? dialogDescription : undefined }\n\t\t>\n\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tref={ saveButtonRef }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\tonClick={ saveCheckedEntities }\n\t\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t\t>\n\t\t\t\t\t{ saveLabel }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ dismissPanel }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"entities-saved-states__text-prompt--header-wrapper\"\n\t\t\t\t\tid={ renderDialog ? dialogLabel : undefined }\n\t\t\t\t>\n\t\t\t\t\t<strong className=\"entities-saved-states__text-prompt--header\">\n\t\t\t\t\t\t{ __( 'Are you ready to save?' ) }\n\t\t\t\t\t</strong>\n\t\t\t\t\t{ additionalPrompt }\n\t\t\t\t</div>\n\t\t\t\t<p id={ renderDialog ? dialogDescription : undefined }>\n\t\t\t\t\t{ isDirty\n\t\t\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %d: number of site changes waiting to be saved. */\n\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t'There is <strong>%d site change</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\t'There are <strong>%d site changes</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\tsortedPartitionedSavables.length\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tsortedPartitionedSavables.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t{ strong: <strong /> }\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Select the items you want to save.' ) }\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF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AAqF,iCAAwB,EACxB,IAAAC,aAAO,GACN;EACA,IAAAC,QAAE,EACD,+DAA+D,EAC/D,iEAAiE,EACjE1D,yBAAyB,CAACsB,MAC3B,CAAC,EACDtB,yBAAyB,CAACsB,MAC3B,CAAC,EACD;IAAEqC,MAAM,EAAE,IAAAlG,MAAA,CAAAC,aAAA,gBAAS;EAAE,CACrB,CAAC,GACD,IAAAO,QAAE,EAAE,oCAAqC,CAC1C,CACC,CAAC,EAEJ+B,yBAAyB,CAAC4D,GAAG,CAAIC,IAAI,IAAM;IAC5C,OACC,IAAApG,MAAA,CAAAC,aAAA,EAACf,eAAA,CAAAmH,OAAc;MACdjD,GAAG,EAAGgD,IAAI,CAAE,CAAC,CAAE,CAAC7G,IAAM;MACtB6G,IAAI,EAAGA,IAAM;MACbxF,kBAAkB,EAAGA,kBAAoB;MACzCD,qBAAqB,EAAGA;IAAuB,CAC/C,CAAC;EAEJ,CAAE,CACE,CAAC;AAER"}
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_element","_compose","_data","_entityTypeList","_interopRequireDefault","_useIsDirty","_store","_lockUnlock","identity","values","EntitiesSavedStates","close","renderDialog","undefined","isDirtyProps","useIsDirty","_react","createElement","EntitiesSavedStatesExtensible","additionalPrompt","onSave","saveEnabled","saveEnabledProp","saveLabel","__","dirtyEntityRecords","isDirty","setUnselectedEntities","unselectedEntities","saveButtonRef","useRef","saveDirtyEntities","unlock","useDispatch","editorStore","partitionedSavables","reduce","acc","record","name","push","site","siteSavables","wp_template","templateSavables","wp_template_part","templatePartSavables","contentSavables","sortedPartitionedSavables","Object","filter","Array","isArray","dismissPanel","useCallback","saveDialogRef","saveDialogProps","useDialog","onClose","dialogLabel","useInstanceId","dialogDescription","ref","className","role","Flex","gap","FlexItem","isBlock","as","Button","variant","disabled","__experimentalIsFocusable","onClick","entitiesToSkip","id","createInterpolateElement","sprintf","_n","length","strong","map","list","default","key"],"sources":["@wordpress/editor/src/components/entities-saved-states/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseRef,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport {\n\t__experimentalUseDialog as useDialog,\n\tuseInstanceId,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction identity( values ) {\n\treturn values;\n}\n\nexport default function EntitiesSavedStates( {\n\tclose,\n\trenderDialog = undefined,\n} ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\tclose={ close }\n\t\t\trenderDialog={ renderDialog }\n\t\t\t{ ...isDirtyProps }\n\t\t/>\n\t);\n}\n\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\trenderDialog = undefined,\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst { saveDirtyEntities } = unlock( useDispatch( editorStore ) );\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\tconst dialogLabel = useInstanceId( EntitiesSavedStatesExtensible, 'label' );\n\tconst dialogDescription = useInstanceId(\n\t\tEntitiesSavedStatesExtensible,\n\t\t'description'\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={ saveDialogRef }\n\t\t\t{ ...saveDialogProps }\n\t\t\tclassName=\"entities-saved-states__panel\"\n\t\t\trole={ renderDialog ? 'dialog' : undefined }\n\t\t\taria-labelledby={ renderDialog ? dialogLabel : undefined }\n\t\t\taria-describedby={ renderDialog ? dialogDescription : undefined }\n\t\t>\n\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tref={ saveButtonRef }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\tsaveDirtyEntities( {\n\t\t\t\t\t\t\tonSave,\n\t\t\t\t\t\t\tdirtyEntityRecords,\n\t\t\t\t\t\t\tentitiesToSkip: unselectedEntities,\n\t\t\t\t\t\t\tclose,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t\t>\n\t\t\t\t\t{ saveLabel }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ dismissPanel }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"entities-saved-states__text-prompt--header-wrapper\"\n\t\t\t\t\tid={ renderDialog ? dialogLabel : undefined }\n\t\t\t\t>\n\t\t\t\t\t<strong className=\"entities-saved-states__text-prompt--header\">\n\t\t\t\t\t\t{ __( 'Are you ready to save?' ) }\n\t\t\t\t\t</strong>\n\t\t\t\t\t{ additionalPrompt }\n\t\t\t\t</div>\n\t\t\t\t<p id={ renderDialog ? dialogDescription : undefined }>\n\t\t\t\t\t{ isDirty\n\t\t\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %d: number of site changes waiting to be saved. */\n\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t'There is <strong>%d site change</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\t'There are <strong>%d site changes</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\tsortedPartitionedSavables.length\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tsortedPartitionedSavables.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t{ strong: <strong /> }\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Select the items you want to save.' ) }\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n"],"mappings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aAAO,GACN;EACA,IAAAC,QAAE,EACD,+DAA+D,EAC/D,iEAAiE,EACjE/B,yBAAyB,CAACgC,MAC3B,CAAC,EACDhC,yBAAyB,CAACgC,MAC3B,CAAC,EACD;IAAEC,MAAM,EAAE,IAAAjE,MAAA,CAAAC,aAAA,gBAAS;EAAE,CACrB,CAAC,GACD,IAAAO,QAAE,EAAE,oCAAqC,CAC1C,CACC,CAAC,EAEJwB,yBAAyB,CAACkC,GAAG,CAAIC,IAAI,IAAM;IAC5C,OACC,IAAAnE,MAAA,CAAAC,aAAA,EAACd,eAAA,CAAAiF,OAAc;MACdC,GAAG,EAAGF,IAAI,CAAE,CAAC,CAAE,CAAC5C,IAAM;MACtB4C,IAAI,EAAGA,IAAM;MACbvD,kBAAkB,EAAGA,kBAAoB;MACzCD,qBAAqB,EAAGA;IAAuB,CAC/C,CAAC;EAEJ,CAAE,CACE,CAAC;AAER"}
|
|
@@ -27,6 +27,9 @@ var _exportNames = {
|
|
|
27
27
|
PageAttributesParent: true,
|
|
28
28
|
PageTemplate: true,
|
|
29
29
|
PluginDocumentSettingPanel: true,
|
|
30
|
+
PluginBlockSettingsMenuItem: true,
|
|
31
|
+
PluginPostPublishPanel: true,
|
|
32
|
+
PluginPrePublishPanel: true,
|
|
30
33
|
PostTemplatePanel: true,
|
|
31
34
|
PostAuthor: true,
|
|
32
35
|
PostAuthorCheck: true,
|
|
@@ -212,12 +215,30 @@ Object.defineProperty(exports, "PageTemplate", {
|
|
|
212
215
|
return _classicTheme.default;
|
|
213
216
|
}
|
|
214
217
|
});
|
|
218
|
+
Object.defineProperty(exports, "PluginBlockSettingsMenuItem", {
|
|
219
|
+
enumerable: true,
|
|
220
|
+
get: function () {
|
|
221
|
+
return _pluginBlockSettingsMenuItem.default;
|
|
222
|
+
}
|
|
223
|
+
});
|
|
215
224
|
Object.defineProperty(exports, "PluginDocumentSettingPanel", {
|
|
216
225
|
enumerable: true,
|
|
217
226
|
get: function () {
|
|
218
227
|
return _pluginDocumentSettingPanel.default;
|
|
219
228
|
}
|
|
220
229
|
});
|
|
230
|
+
Object.defineProperty(exports, "PluginPostPublishPanel", {
|
|
231
|
+
enumerable: true,
|
|
232
|
+
get: function () {
|
|
233
|
+
return _pluginPostPublishPanel.default;
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
Object.defineProperty(exports, "PluginPrePublishPanel", {
|
|
237
|
+
enumerable: true,
|
|
238
|
+
get: function () {
|
|
239
|
+
return _pluginPrePublishPanel.default;
|
|
240
|
+
}
|
|
241
|
+
});
|
|
221
242
|
Object.defineProperty(exports, "PostAuthor", {
|
|
222
243
|
enumerable: true,
|
|
223
244
|
get: function () {
|
|
@@ -630,6 +651,9 @@ var _panel = _interopRequireDefault(require("./page-attributes/panel"));
|
|
|
630
651
|
var _parent = _interopRequireDefault(require("./page-attributes/parent"));
|
|
631
652
|
var _classicTheme = _interopRequireDefault(require("./post-template/classic-theme"));
|
|
632
653
|
var _pluginDocumentSettingPanel = _interopRequireDefault(require("./plugin-document-setting-panel"));
|
|
654
|
+
var _pluginBlockSettingsMenuItem = _interopRequireDefault(require("./block-settings-menu/plugin-block-settings-menu-item"));
|
|
655
|
+
var _pluginPostPublishPanel = _interopRequireDefault(require("./plugin-post-publish-panel"));
|
|
656
|
+
var _pluginPrePublishPanel = _interopRequireDefault(require("./plugin-pre-publish-panel"));
|
|
633
657
|
var _panel2 = _interopRequireDefault(require("./post-template/panel"));
|
|
634
658
|
var _postAuthor = _interopRequireDefault(require("./post-author"));
|
|
635
659
|
var _check3 = _interopRequireDefault(require("./post-author/check"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_globalKeyboardShortcuts","_interopRequireDefault","require","_autocompleters","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_autosaveMonitor","_documentBar","_documentOutline","_check","_registerShortcuts","_redo","_undo","_editorNotices","_editorSnackbars","_entitiesSavedStates","_useIsDirty","_errorBoundary","_localAutosaveMonitor","_check2","_order","_panel","_parent","_classicTheme","_pluginDocumentSettingPanel","_panel2","_postAuthor","_check3","_panel3","_postComments","_panel4","_postExcerpt","_check4","_panel5","_postFeaturedImage","_check5","_panel6","_postFormat","_check6","_postLastRevision","_check7","_panel7","_postLockedModal","_postPendingStatus","_check8","_postPingbacks","_postPreviewButton","_postPublishButton","_label","_postPublishPanel","_postSavedState","_postSchedule","_check9","_label2","_interopRequireWildcard","_panel8","_postSlug","_check10","_postSticky","_check11","_postSwitchToDraftButton","_postSyncStatus","_postTaxonomies","_flatTermSelector","_hierarchicalTermSelector","_check12","_panel9","_postTextEditor","_postTitle","_postTitleRaw","_postTrash","_check13","_postTypeSupportCheck","_postUrl","_check14","_label3","_panel10","_postVisibility","_label4","_check15","_tableOfContents","_themeSupportCheck","_unsavedChangesWarning","_wordCount","_timeToRead","_characterCount","_provider","_deprecated","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set","VisualEditorGlobalKeyboardShortcuts","EditorKeyboardShortcuts","TextEditorGlobalKeyboardShortcuts"],"sources":["@wordpress/editor/src/components/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport EditorKeyboardShortcuts from './global-keyboard-shortcuts';\n\n// Block Creation Components.\nexport * from './autocompleters';\n\n// Post Related Components.\nexport { default as AutosaveMonitor } from './autosave-monitor';\nexport { default as DocumentBar } from './document-bar';\nexport { default as DocumentOutline } from './document-outline';\nexport { default as DocumentOutlineCheck } from './document-outline/check';\nexport { EditorKeyboardShortcuts };\nexport { default as EditorKeyboardShortcutsRegister } from './global-keyboard-shortcuts/register-shortcuts';\nexport { default as EditorHistoryRedo } from './editor-history/redo';\nexport { default as EditorHistoryUndo } from './editor-history/undo';\nexport { default as EditorNotices } from './editor-notices';\nexport { default as EditorSnackbars } from './editor-snackbars';\nexport { default as EntitiesSavedStates } from './entities-saved-states';\nexport { useIsDirty as useEntitiesSavedStatesIsDirty } from './entities-saved-states/hooks/use-is-dirty';\nexport { default as ErrorBoundary } from './error-boundary';\nexport { default as LocalAutosaveMonitor } from './local-autosave-monitor';\nexport { default as PageAttributesCheck } from './page-attributes/check';\nexport { default as PageAttributesOrder } from './page-attributes/order';\nexport { default as PageAttributesPanel } from './page-attributes/panel';\nexport { default as PageAttributesParent } from './page-attributes/parent';\nexport { default as PageTemplate } from './post-template/classic-theme';\nexport { default as PluginDocumentSettingPanel } from './plugin-document-setting-panel';\nexport { default as PostTemplatePanel } from './post-template/panel';\nexport { default as PostAuthor } from './post-author';\nexport { default as PostAuthorCheck } from './post-author/check';\nexport { default as PostAuthorPanel } from './post-author/panel';\nexport { default as PostComments } from './post-comments';\nexport { default as PostDiscussionPanel } from './post-discussion/panel';\nexport { default as PostExcerpt } from './post-excerpt';\nexport { default as PostExcerptCheck } from './post-excerpt/check';\nexport { default as PostExcerptPanel } from './post-excerpt/panel';\nexport { default as PostFeaturedImage } from './post-featured-image';\nexport { default as PostFeaturedImageCheck } from './post-featured-image/check';\nexport { default as PostFeaturedImagePanel } from './post-featured-image/panel';\nexport { default as PostFormat } from './post-format';\nexport { default as PostFormatCheck } from './post-format/check';\nexport { default as PostLastRevision } from './post-last-revision';\nexport { default as PostLastRevisionCheck } from './post-last-revision/check';\nexport { default as PostLastRevisionPanel } from './post-last-revision/panel';\nexport { default as PostLockedModal } from './post-locked-modal';\nexport { default as PostPendingStatus } from './post-pending-status';\nexport { default as PostPendingStatusCheck } from './post-pending-status/check';\nexport { default as PostPingbacks } from './post-pingbacks';\nexport { default as PostPreviewButton } from './post-preview-button';\nexport { default as PostPublishButton } from './post-publish-button';\nexport { default as PostPublishButtonLabel } from './post-publish-button/label';\nexport { default as PostPublishPanel } from './post-publish-panel';\nexport { default as PostSavedState } from './post-saved-state';\nexport { default as PostSchedule } from './post-schedule';\nexport { default as PostScheduleCheck } from './post-schedule/check';\nexport {\n\tdefault as PostScheduleLabel,\n\tusePostScheduleLabel,\n} from './post-schedule/label';\nexport { default as PostSchedulePanel } from './post-schedule/panel';\nexport { default as PostSlug } from './post-slug';\nexport { default as PostSlugCheck } from './post-slug/check';\nexport { default as PostSticky } from './post-sticky';\nexport { default as PostStickyCheck } from './post-sticky/check';\nexport { default as PostSwitchToDraftButton } from './post-switch-to-draft-button';\nexport { default as PostSyncStatus } from './post-sync-status';\nexport { default as PostTaxonomies } from './post-taxonomies';\nexport { FlatTermSelector as PostTaxonomiesFlatTermSelector } from './post-taxonomies/flat-term-selector';\nexport { HierarchicalTermSelector as PostTaxonomiesHierarchicalTermSelector } from './post-taxonomies/hierarchical-term-selector';\nexport { default as PostTaxonomiesCheck } from './post-taxonomies/check';\nexport { default as PostTaxonomiesPanel } from './post-taxonomies/panel';\nexport { default as PostTextEditor } from './post-text-editor';\nexport { default as PostTitle } from './post-title';\nexport { default as PostTitleRaw } from './post-title/post-title-raw';\nexport { default as PostTrash } from './post-trash';\nexport { default as PostTrashCheck } from './post-trash/check';\nexport { default as PostTypeSupportCheck } from './post-type-support-check';\nexport { default as PostURL } from './post-url';\nexport { default as PostURLCheck } from './post-url/check';\nexport { default as PostURLLabel, usePostURLLabel } from './post-url/label';\nexport { default as PostURLPanel } from './post-url/panel';\nexport { default as PostVisibility } from './post-visibility';\nexport {\n\tdefault as PostVisibilityLabel,\n\tusePostVisibilityLabel,\n} from './post-visibility/label';\nexport { default as PostVisibilityCheck } from './post-visibility/check';\nexport { default as TableOfContents } from './table-of-contents';\nexport { default as ThemeSupportCheck } from './theme-support-check';\nexport { default as UnsavedChangesWarning } from './unsaved-changes-warning';\nexport { default as WordCount } from './word-count';\nexport { default as TimeToRead } from './time-to-read';\nexport { default as CharacterCount } from './character-count';\n\n// State Related Components.\nexport { default as EditorProvider } from './provider';\n\nexport * from './deprecated';\nexport const VisualEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\nexport const TextEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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yF,CAAA,EAAAW,CAAA,SAAAC,CAAA,GAAAH,CAAA,GAAAxG,MAAA,CAAAyG,wBAAA,CAAAV,CAAA,EAAAW,CAAA,UAAAC,CAAA,KAAAA,CAAA,CAAAhG,GAAA,IAAAgG,CAAA,CAAAC,GAAA,IAAA5G,MAAA,CAAAS,cAAA,CAAA6F,CAAA,EAAAI,CAAA,EAAAC,CAAA,IAAAL,CAAA,CAAAI,CAAA,IAAAX,CAAA,CAAAW,CAAA,YAAAJ,CAAA,CAAAF,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAU,GAAA,CAAAb,CAAA,EAAAO,CAAA,GAAAA,CAAA;AAnG7B;AACA;AACA;;AAGA;;AAGA;;AAwFA;;AAIO,MAAMO,mCAAmC,GAAArG,OAAA,CAAAqG,mCAAA,GAAGC,gCAAuB;AACnE,MAAMC,iCAAiC,GAAAvG,OAAA,CAAAuG,iCAAA,GAAGD,gCAAuB"}
|
|
1
|
+
{"version":3,"names":["_globalKeyboardShortcuts","_interopRequireDefault","require","_autocompleters","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_autosaveMonitor","_documentBar","_documentOutline","_check","_registerShortcuts","_redo","_undo","_editorNotices","_editorSnackbars","_entitiesSavedStates","_useIsDirty","_errorBoundary","_localAutosaveMonitor","_check2","_order","_panel","_parent","_classicTheme","_pluginDocumentSettingPanel","_pluginBlockSettingsMenuItem","_pluginPostPublishPanel","_pluginPrePublishPanel","_panel2","_postAuthor","_check3","_panel3","_postComments","_panel4","_postExcerpt","_check4","_panel5","_postFeaturedImage","_check5","_panel6","_postFormat","_check6","_postLastRevision","_check7","_panel7","_postLockedModal","_postPendingStatus","_check8","_postPingbacks","_postPreviewButton","_postPublishButton","_label","_postPublishPanel","_postSavedState","_postSchedule","_check9","_label2","_interopRequireWildcard","_panel8","_postSlug","_check10","_postSticky","_check11","_postSwitchToDraftButton","_postSyncStatus","_postTaxonomies","_flatTermSelector","_hierarchicalTermSelector","_check12","_panel9","_postTextEditor","_postTitle","_postTitleRaw","_postTrash","_check13","_postTypeSupportCheck","_postUrl","_check14","_label3","_panel10","_postVisibility","_label4","_check15","_tableOfContents","_themeSupportCheck","_unsavedChangesWarning","_wordCount","_timeToRead","_characterCount","_provider","_deprecated","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set","VisualEditorGlobalKeyboardShortcuts","EditorKeyboardShortcuts","TextEditorGlobalKeyboardShortcuts"],"sources":["@wordpress/editor/src/components/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport EditorKeyboardShortcuts from './global-keyboard-shortcuts';\n\n// Block Creation Components.\nexport * from './autocompleters';\n\n// Post Related Components.\nexport { default as AutosaveMonitor } from './autosave-monitor';\nexport { default as DocumentBar } from './document-bar';\nexport { default as DocumentOutline } from './document-outline';\nexport { default as DocumentOutlineCheck } from './document-outline/check';\nexport { EditorKeyboardShortcuts };\nexport { default as EditorKeyboardShortcutsRegister } from './global-keyboard-shortcuts/register-shortcuts';\nexport { default as EditorHistoryRedo } from './editor-history/redo';\nexport { default as EditorHistoryUndo } from './editor-history/undo';\nexport { default as EditorNotices } from './editor-notices';\nexport { default as EditorSnackbars } from './editor-snackbars';\nexport { default as EntitiesSavedStates } from './entities-saved-states';\nexport { useIsDirty as useEntitiesSavedStatesIsDirty } from './entities-saved-states/hooks/use-is-dirty';\nexport { default as ErrorBoundary } from './error-boundary';\nexport { default as LocalAutosaveMonitor } from './local-autosave-monitor';\nexport { default as PageAttributesCheck } from './page-attributes/check';\nexport { default as PageAttributesOrder } from './page-attributes/order';\nexport { default as PageAttributesPanel } from './page-attributes/panel';\nexport { default as PageAttributesParent } from './page-attributes/parent';\nexport { default as PageTemplate } from './post-template/classic-theme';\nexport { default as PluginDocumentSettingPanel } from './plugin-document-setting-panel';\nexport { default as PluginBlockSettingsMenuItem } from './block-settings-menu/plugin-block-settings-menu-item';\nexport { default as PluginPostPublishPanel } from './plugin-post-publish-panel';\nexport { default as PluginPrePublishPanel } from './plugin-pre-publish-panel';\nexport { default as PostTemplatePanel } from './post-template/panel';\nexport { default as PostAuthor } from './post-author';\nexport { default as PostAuthorCheck } from './post-author/check';\nexport { default as PostAuthorPanel } from './post-author/panel';\nexport { default as PostComments } from './post-comments';\nexport { default as PostDiscussionPanel } from './post-discussion/panel';\nexport { default as PostExcerpt } from './post-excerpt';\nexport { default as PostExcerptCheck } from './post-excerpt/check';\nexport { default as PostExcerptPanel } from './post-excerpt/panel';\nexport { default as PostFeaturedImage } from './post-featured-image';\nexport { default as PostFeaturedImageCheck } from './post-featured-image/check';\nexport { default as PostFeaturedImagePanel } from './post-featured-image/panel';\nexport { default as PostFormat } from './post-format';\nexport { default as PostFormatCheck } from './post-format/check';\nexport { default as PostLastRevision } from './post-last-revision';\nexport { default as PostLastRevisionCheck } from './post-last-revision/check';\nexport { default as PostLastRevisionPanel } from './post-last-revision/panel';\nexport { default as PostLockedModal } from './post-locked-modal';\nexport { default as PostPendingStatus } from './post-pending-status';\nexport { default as PostPendingStatusCheck } from './post-pending-status/check';\nexport { default as PostPingbacks } from './post-pingbacks';\nexport { default as PostPreviewButton } from './post-preview-button';\nexport { default as PostPublishButton } from './post-publish-button';\nexport { default as PostPublishButtonLabel } from './post-publish-button/label';\nexport { default as PostPublishPanel } from './post-publish-panel';\nexport { default as PostSavedState } from './post-saved-state';\nexport { default as PostSchedule } from './post-schedule';\nexport { default as PostScheduleCheck } from './post-schedule/check';\nexport {\n\tdefault as PostScheduleLabel,\n\tusePostScheduleLabel,\n} from './post-schedule/label';\nexport { default as PostSchedulePanel } from './post-schedule/panel';\nexport { default as PostSlug } from './post-slug';\nexport { default as PostSlugCheck } from './post-slug/check';\nexport { default as PostSticky } from './post-sticky';\nexport { default as PostStickyCheck } from './post-sticky/check';\nexport { default as PostSwitchToDraftButton } from './post-switch-to-draft-button';\nexport { default as PostSyncStatus } from './post-sync-status';\nexport { default as PostTaxonomies } from './post-taxonomies';\nexport { FlatTermSelector as PostTaxonomiesFlatTermSelector } from './post-taxonomies/flat-term-selector';\nexport { HierarchicalTermSelector as PostTaxonomiesHierarchicalTermSelector } from './post-taxonomies/hierarchical-term-selector';\nexport { default as PostTaxonomiesCheck } from './post-taxonomies/check';\nexport { default as PostTaxonomiesPanel } from './post-taxonomies/panel';\nexport { default as PostTextEditor } from './post-text-editor';\nexport { default as PostTitle } from './post-title';\nexport { default as PostTitleRaw } from './post-title/post-title-raw';\nexport { default as PostTrash } from './post-trash';\nexport { default as PostTrashCheck } from './post-trash/check';\nexport { default as PostTypeSupportCheck } from './post-type-support-check';\nexport { default as PostURL } from './post-url';\nexport { default as PostURLCheck } from './post-url/check';\nexport { default as PostURLLabel, usePostURLLabel } from './post-url/label';\nexport { default as PostURLPanel } from './post-url/panel';\nexport { default as PostVisibility } from './post-visibility';\nexport {\n\tdefault as PostVisibilityLabel,\n\tusePostVisibilityLabel,\n} from './post-visibility/label';\nexport { default as PostVisibilityCheck } from './post-visibility/check';\nexport { default as TableOfContents } from './table-of-contents';\nexport { default as ThemeSupportCheck } from './theme-support-check';\nexport { default as UnsavedChangesWarning } from './unsaved-changes-warning';\nexport { default as WordCount } from './word-count';\nexport { default as TimeToRead } from './time-to-read';\nexport { default as CharacterCount } from './character-count';\n\n// State Related Components.\nexport { default as EditorProvider } from './provider';\n\nexport * from './deprecated';\nexport const VisualEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\nexport const TextEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,GAAA3G,MAAA,CAAA4G,wBAAA,CAAAV,CAAA,EAAAW,CAAA,UAAAC,CAAA,KAAAA,CAAA,CAAAnG,GAAA,IAAAmG,CAAA,CAAAC,GAAA,IAAA/G,MAAA,CAAAS,cAAA,CAAAgG,CAAA,EAAAI,CAAA,EAAAC,CAAA,IAAAL,CAAA,CAAAI,CAAA,IAAAX,CAAA,CAAAW,CAAA,YAAAJ,CAAA,CAAAF,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAU,GAAA,CAAAb,CAAA,EAAAO,CAAA,GAAAA,CAAA;AAtG7B;AACA;AACA;;AAGA;;AAGA;;AA2FA;;AAIO,MAAMO,mCAAmC,GAAAxG,OAAA,CAAAwG,mCAAA,GAAGC,gCAAuB;AACnE,MAAMC,iCAAiC,GAAA1G,OAAA,CAAA0G,iCAAA,GAAGD,gCAAuB"}
|
|
@@ -23,7 +23,10 @@ var _store = require("../../store");
|
|
|
23
23
|
* Internal dependencies
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
function InserterSidebar(
|
|
26
|
+
function InserterSidebar({
|
|
27
|
+
closeGeneralSidebar,
|
|
28
|
+
isRightSidebarOpen
|
|
29
|
+
}) {
|
|
27
30
|
const {
|
|
28
31
|
insertionPoint,
|
|
29
32
|
showMostUsedBlocks
|
|
@@ -71,6 +74,7 @@ function InserterSidebar() {
|
|
|
71
74
|
rootClientId: insertionPoint.rootClientId,
|
|
72
75
|
__experimentalInsertionIndex: insertionPoint.insertionIndex,
|
|
73
76
|
__experimentalFilterValue: insertionPoint.filterValue,
|
|
77
|
+
__experimentalOnPatternCategorySelection: isRightSidebarOpen ? closeGeneralSidebar : undefined,
|
|
74
78
|
ref: libraryRef
|
|
75
79
|
})));
|
|
76
80
|
}
|