@wordpress/edit-post 8.0.0 → 8.0.2

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/back-button/index.js +3 -1
  3. package/build/components/back-button/index.js.map +1 -1
  4. package/build/components/init-pattern-modal/index.js +1 -1
  5. package/build/components/init-pattern-modal/index.js.map +1 -1
  6. package/build/components/layout/index.js +7 -14
  7. package/build/components/layout/index.js.map +1 -1
  8. package/build/components/preferences-modal/enable-custom-fields.js +1 -0
  9. package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
  10. package/build/deprecated.js +29 -0
  11. package/build/deprecated.js.map +1 -1
  12. package/build/lock-unlock.js +1 -1
  13. package/build/lock-unlock.js.map +1 -1
  14. package/build-module/components/back-button/index.js +3 -1
  15. package/build-module/components/back-button/index.js.map +1 -1
  16. package/build-module/components/init-pattern-modal/index.js +1 -1
  17. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  18. package/build-module/components/layout/index.js +7 -14
  19. package/build-module/components/layout/index.js.map +1 -1
  20. package/build-module/components/preferences-modal/enable-custom-fields.js +1 -0
  21. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  22. package/build-module/deprecated.js +29 -0
  23. package/build-module/deprecated.js.map +1 -1
  24. package/build-module/lock-unlock.js +1 -1
  25. package/build-module/lock-unlock.js.map +1 -1
  26. package/package.json +31 -30
  27. package/src/components/back-button/index.js +13 -6
  28. package/src/components/init-pattern-modal/index.js +1 -4
  29. package/src/components/layout/index.js +10 -14
  30. package/src/components/preferences-modal/enable-custom-fields.js +1 -0
  31. package/src/deprecated.js +32 -0
  32. package/src/lock-unlock.js +1 -1
@@ -9,7 +9,6 @@ import clsx from 'clsx';
9
9
  import { AutosaveMonitor, LocalAutosaveMonitor, UnsavedChangesWarning, EditorKeyboardShortcutsRegister, EditorSnackbars, store as editorStore, privateApis as editorPrivateApis } from '@wordpress/editor';
10
10
  import { useSelect, useDispatch } from '@wordpress/data';
11
11
  import { privateApis as blockEditorPrivateApis, store as blockEditorStore } from '@wordpress/block-editor';
12
- import { useViewportMatch } from '@wordpress/compose';
13
12
  import { PluginArea } from '@wordpress/plugins';
14
13
  import { __, sprintf } from '@wordpress/i18n';
15
14
  import { useCallback, useMemo } from '@wordpress/element';
@@ -19,6 +18,7 @@ import { privateApis as commandsPrivateApis } from '@wordpress/commands';
19
18
  import { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';
20
19
  import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
21
20
  import { addQueryArgs } from '@wordpress/url';
21
+ import { decodeEntities } from '@wordpress/html-entities';
22
22
 
23
23
  /**
24
24
  * Internal dependencies
@@ -107,22 +107,21 @@ function useEditorStyles() {
107
107
  }
108
108
  const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles;
109
109
 
110
- // Add a constant padding for the typewritter effect. When typing at the
110
+ // Add a constant padding for the typewriter effect. When typing at the
111
111
  // bottom, there needs to be room to scroll up.
112
112
  if (!isZoomedOutView && !hasMetaBoxes && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) {
113
- baseStyles.push({
113
+ return [...baseStyles, {
114
114
  css: 'body{padding-bottom: 40vh}'
115
- });
115
+ }];
116
116
  }
117
117
  return baseStyles;
118
- }, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport]);
118
+ }, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport, postType]);
119
119
  }
120
120
  function Layout({
121
121
  initialPost
122
122
  }) {
123
123
  useCommands();
124
124
  useEditPostCommands();
125
- const isWideViewport = useViewportMatch('large');
126
125
  const paddingAppenderRef = usePaddingAppender();
127
126
  const shouldIframe = useShouldIframe();
128
127
  const {
@@ -131,12 +130,10 @@ function Layout({
131
130
  const {
132
131
  mode,
133
132
  isFullscreenActive,
134
- sidebarIsOpened,
135
133
  hasActiveMetaboxes,
136
134
  hasBlockSelected,
137
135
  showIconLabels,
138
136
  isDistractionFree,
139
- showBlockBreadcrumbs,
140
137
  showMetaBoxes,
141
138
  hasHistory,
142
139
  isEditingTemplate,
@@ -158,7 +155,6 @@ function Layout({
158
155
  hasBlockSelected: !!select(blockEditorStore).getBlockSelectionStart(),
159
156
  showIconLabels: get('core', 'showIconLabels'),
160
157
  isDistractionFree: get('core', 'distractionFree'),
161
- showBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
162
158
  showMetaBoxes: select(editorStore).getRenderingMode() === 'post-only',
163
159
  hasHistory: !!getEditorSettings().onNavigateToPreviousEntityRecord,
164
160
  isEditingTemplate: select(editorStore).getCurrentPostType() === 'wp_template',
@@ -178,10 +174,7 @@ function Layout({
178
174
  document.body.classList.remove('show-icon-labels');
179
175
  }
180
176
  const className = clsx('edit-post-layout', 'is-mode-' + mode, {
181
- 'is-sidebar-opened': sidebarIsOpened,
182
- 'has-metaboxes': hasActiveMetaboxes,
183
- 'is-distraction-free': isDistractionFree && isWideViewport,
184
- 'has-block-breadcrumbs': showBlockBreadcrumbs && !isDistractionFree && isWideViewport
177
+ 'has-metaboxes': hasActiveMetaboxes
185
178
  });
186
179
  function onPluginAreaError(name) {
187
180
  createErrorNotice(sprintf( /* translators: %s: plugin name */
@@ -207,7 +200,7 @@ function Layout({
207
200
  const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
208
201
  createSuccessNotice(sprintf(
209
202
  // translators: %s: Title of the created post e.g: "Post 1".
210
- __('"%s" successfully created.'), title), {
203
+ __('"%s" successfully created.'), decodeEntities(title)), {
211
204
  type: 'snackbar',
212
205
  id: 'duplicate-post-action',
213
206
  actions: [{
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorKeyboardShortcutsRegister","EditorSnackbars","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","blockEditorPrivateApis","blockEditorStore","useViewportMatch","PluginArea","__","sprintf","useCallback","useMemo","noticesStore","preferencesStore","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","BackButton","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","MetaBoxes","PostEditorMoreMenu","WelcomeGuide","editPostStore","unlock","useEditPostCommands","usePaddingAppender","useShouldIframe","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","getLayoutStyles","useCommands","useCommandContext","EditorInterface","FullscreenMode","Sidebar","BlockKeyboardShortcuts","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","hasMetaBoxes","renderingMode","postType","select","__unstableGetEditorMode","getCurrentPostType","getRenderingMode","_postType","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","Layout","initialPost","isWideViewport","paddingAppenderRef","shouldIframe","createErrorNotice","mode","isFullscreenActive","sidebarIsOpened","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","hasHistory","isEditingTemplate","isWelcomeGuideVisible","get","getEditorMode","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","document","body","classList","add","remove","className","onPluginAreaError","name","createSuccessNotice","onActionPerformed","actionId","items","location","href","trashed","post_type","type","ids","id","newItem","title","rendered","actions","label","onClick","postId","post","action","children","isActive","onError","extraPanels","forceIsDirty","contentRef","disableIframe","autoFocus"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport MetaBoxes from '../meta-boxes';\nimport PostEditorMoreMenu from '../more-menu';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useEditPostCommands from '../../commands/use-commands';\nimport { usePaddingAppender } from './use-padding-appender';\nimport { useShouldIframe } from './use-should-iframe';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { EditorInterface, FullscreenMode, Sidebar } =\n\tunlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\nconst DESIGN_POST_TYPES = [\n\t'wp_template',\n\t'wp_template_part',\n\t'wp_block',\n\t'wp_navigation',\n];\n\nfunction useEditorStyles() {\n\tconst {\n\t\thasThemeStyleSupport,\n\t\teditorSettings,\n\t\tisZoomedOutView,\n\t\thasMetaBoxes,\n\t\trenderingMode,\n\t\tpostType,\n\t} = useSelect( ( select ) => {\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getCurrentPostType, getRenderingMode } = select( editorStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t\thasMetaBoxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\trenderingMode: getRenderingMode(),\n\t\t\tpostType: _postType,\n\t\t};\n\t}, [] );\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...editorSettings.defaultEditorStyles,\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\tconst baseStyles = hasThemeStyles\n\t\t\t? editorSettings.styles ?? []\n\t\t\t: defaultEditorStyles;\n\n\t\t// Add a constant padding for the typewritter effect. When typing at the\n\t\t// bottom, there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\t! hasMetaBoxes &&\n\t\t\trenderingMode === 'post-only' &&\n\t\t\t! DESIGN_POST_TYPES.includes( postType )\n\t\t) {\n\t\t\tbaseStyles.push( {\n\t\t\t\tcss: 'body{padding-bottom: 40vh}',\n\t\t\t} );\n\t\t}\n\n\t\treturn baseStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t] );\n}\n\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\thasBlockSelected,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tshowMetaBoxes,\n\t\thasHistory,\n\t\tisEditingTemplate,\n\t\tisWelcomeGuideVisible,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'entity-edit';\n\tuseCommandContext( commandContext );\n\n\tconst styles = useEditorStyles();\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst className = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isWideViewport,\n\t\t'has-block-breadcrumbs':\n\t\t\tshowBlockBreadcrumbs && ! isDistractionFree && isWideViewport,\n\t} );\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\ttrashed: 1,\n\t\t\t\t\t\t\tpost_type: items[ 0 ].type,\n\t\t\t\t\t\t\tids: items[ 0 ].id,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<BlockKeyboardShortcuts />\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<PostEditorMoreMenu />\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t\t<EditorSnackbars />\n\t\t\t<EditorInterface\n\t\t\t\tclassName={ className }\n\t\t\t\tstyles={ styles }\n\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t>\n\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</EditorInterface>\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,eAAe,EACfC,oBAAoB,EACpBC,qBAAqB,EACrBC,+BAA+B,EAC/BC,eAAe,EACfC,KAAK,IAAIC,WAAW,EACpBC,WA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AAQ,EAAC;QAAU,CAAE,CAAC;MAAA,CAC7B;IACL,CACe,CAAC;EAAA,CACjB,CAAC;AAEL;AAEA,eAAenC,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorKeyboardShortcutsRegister","EditorSnackbars","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","blockEditorPrivateApis","blockEditorStore","PluginArea","__","sprintf","useCallback","useMemo","noticesStore","preferencesStore","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","decodeEntities","BackButton","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","MetaBoxes","PostEditorMoreMenu","WelcomeGuide","editPostStore","unlock","useEditPostCommands","usePaddingAppender","useShouldIframe","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","getLayoutStyles","useCommands","useCommandContext","EditorInterface","FullscreenMode","Sidebar","BlockKeyboardShortcuts","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","hasMetaBoxes","renderingMode","postType","select","__unstableGetEditorMode","getCurrentPostType","getRenderingMode","_postType","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","Layout","initialPost","paddingAppenderRef","shouldIframe","createErrorNotice","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isEditingTemplate","isWelcomeGuideVisible","get","getEditorMode","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","document","body","classList","add","remove","className","onPluginAreaError","name","createSuccessNotice","onActionPerformed","actionId","items","location","href","trashed","post_type","type","ids","id","newItem","title","rendered","actions","label","onClick","postId","post","action","children","isActive","onError","extraPanels","forceIsDirty","contentRef","disableIframe","autoFocus"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport MetaBoxes from '../meta-boxes';\nimport PostEditorMoreMenu from '../more-menu';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useEditPostCommands from '../../commands/use-commands';\nimport { usePaddingAppender } from './use-padding-appender';\nimport { useShouldIframe } from './use-should-iframe';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { EditorInterface, FullscreenMode, Sidebar } =\n\tunlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\nconst DESIGN_POST_TYPES = [\n\t'wp_template',\n\t'wp_template_part',\n\t'wp_block',\n\t'wp_navigation',\n];\n\nfunction useEditorStyles() {\n\tconst {\n\t\thasThemeStyleSupport,\n\t\teditorSettings,\n\t\tisZoomedOutView,\n\t\thasMetaBoxes,\n\t\trenderingMode,\n\t\tpostType,\n\t} = useSelect( ( select ) => {\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getCurrentPostType, getRenderingMode } = select( editorStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t\thasMetaBoxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\trenderingMode: getRenderingMode(),\n\t\t\tpostType: _postType,\n\t\t};\n\t}, [] );\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...editorSettings.defaultEditorStyles,\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\tconst baseStyles = hasThemeStyles\n\t\t\t? editorSettings.styles ?? []\n\t\t\t: defaultEditorStyles;\n\n\t\t// Add a constant padding for the typewriter effect. When typing at the\n\t\t// bottom, there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\t! hasMetaBoxes &&\n\t\t\trenderingMode === 'post-only' &&\n\t\t\t! DESIGN_POST_TYPES.includes( postType )\n\t\t) {\n\t\t\treturn [\n\t\t\t\t...baseStyles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'body{padding-bottom: 40vh}',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn baseStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t\tpostType,\n\t] );\n}\n\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\thasActiveMetaboxes,\n\t\thasBlockSelected,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowMetaBoxes,\n\t\thasHistory,\n\t\tisEditingTemplate,\n\t\tisWelcomeGuideVisible,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'entity-edit';\n\tuseCommandContext( commandContext );\n\n\tconst styles = useEditorStyles();\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst className = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t} );\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\ttrashed: 1,\n\t\t\t\t\t\t\tpost_type: items[ 0 ].type,\n\t\t\t\t\t\t\tids: items[ 0 ].id,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<BlockKeyboardShortcuts />\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<PostEditorMoreMenu />\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t\t<EditorSnackbars />\n\t\t\t<EditorInterface\n\t\t\t\tclassName={ className }\n\t\t\t\tstyles={ styles }\n\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t>\n\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</EditorInterface>\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,eAAe,EACfC,oBAAoB,EACpBC,qBAAqB,EACrBC,+BAA+B,EAC/BC,eAAe,EACfC,KAAK,IAAIC,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAAS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C,eAC1BX,IAAA,CAACP,YAAY,IAAE,CAAC,eAChBO,IAAA,CAACX,gBAAgB,IAAE,CAAC,eACpBW,IAAA,CAACzB,UAAU;MAAC0H,OAAO,EAAGxB;IAAmB,CAAE,CAAC,EAC1C,CAAEhB,iBAAiB,iBACpBzD,IAAA,CAACU,OAAO;MACPkE,iBAAiB,EAAGA,iBAAmB;MACvCsB,WAAW,EACV,CAAEtC,iBAAiB,iBAAI5D,IAAA,CAACT,SAAS;QAACwF,QAAQ,EAAC;MAAM,CAAE;IACnD,CACD,CACD,eACD/E,IAAA,CAACR,kBAAkB,IAAE,CAAC,eACtBQ,IAAA,CAACb,UAAU;MAAC6D,WAAW,EAAGA;IAAa,CAAE,CAAC,eAC1ChD,IAAA,CAAClC,eAAe,IAAE,CAAC,eACnBkC,IAAA,CAACQ,eAAe;MACfgE,SAAS,EAAGA,SAAW;MACvBzC,MAAM,EAAGA,MAAQ;MACjBoE,YAAY,EAAG7C,kBAAoB;MACnC8C,UAAU,EAAGnD,kBAAoB;MACjCoD,aAAa,EAAG,CAAEnD;MAClB;MACA;MAAA;MACAoD,SAAS,EAAG,CAAEzC,qBAAuB;MAAAkC,QAAA,EAEnC,CAAEtC,iBAAiB,IAAIC,aAAa,iBACrCxD,KAAA;QAAKsE,SAAS,EAAC,6BAA6B;QAAAuB,QAAA,gBAC3C/F,IAAA,CAACT,SAAS;UAACwF,QAAQ,EAAC;QAAQ,CAAE,CAAC,eAC/B/E,IAAA,CAACT,SAAS;UAACwF,QAAQ,EAAC;QAAU,CAAE,CAAC;MAAA,CAC7B;IACL,CACe,CAAC;EAAA,CACjB,CAAC;AAEL;AAEA,eAAehC,MAAM","ignoreList":[]}
@@ -38,6 +38,7 @@ export function CustomFieldsConfirmation({
38
38
  className: "edit-post-preferences-modal__custom-fields-confirmation-button",
39
39
  variant: "secondary",
40
40
  isBusy: isReloading,
41
+ __experimentalIsFocusable: true,
41
42
  disabled: isReloading,
42
43
  onClick: () => {
43
44
  setIsReloading(true);
@@ -1 +1 @@
1
- {"version":3,"names":["useState","__","Button","withSelect","store","editorStore","privateApis","preferencesPrivateApis","getPathAndQueryString","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PreferenceBaseOption","submitCustomFieldsForm","customFieldsForm","document","getElementById","querySelector","setAttribute","window","location","href","submit","CustomFieldsConfirmation","willEnable","isReloading","setIsReloading","children","className","variant","isBusy","disabled","onClick","EnableCustomFieldsOption","label","areCustomFieldsEnabled","isChecked","setIsChecked","onChange","select","getEditorSettings","enableCustomFields"],"sources":["@wordpress/edit-post/src/components/preferences-modal/enable-custom-fields.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\nimport { getPathAndQueryString } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferenceBaseOption } = unlock( preferencesPrivateApis );\n\nfunction submitCustomFieldsForm() {\n\tconst customFieldsForm = document.getElementById(\n\t\t'toggle-custom-fields-form'\n\t);\n\n\t// Ensure the referrer values is up to update with any\n\tcustomFieldsForm\n\t\t.querySelector( '[name=\"_wp_http_referer\"]' )\n\t\t.setAttribute( 'value', getPathAndQueryString( window.location.href ) );\n\n\tcustomFieldsForm.submit();\n}\n\nexport function CustomFieldsConfirmation( { willEnable } ) {\n\tconst [ isReloading, setIsReloading ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<p className=\"edit-post-preferences-modal__custom-fields-confirmation-message\">\n\t\t\t\t{ __(\n\t\t\t\t\t'A page reload is required for this change. Make sure your content is saved before reloading.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<Button\n\t\t\t\tclassName=\"edit-post-preferences-modal__custom-fields-confirmation-button\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isReloading }\n\t\t\t\tdisabled={ isReloading }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsReloading( true );\n\t\t\t\t\tsubmitCustomFieldsForm();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ willEnable\n\t\t\t\t\t? __( 'Show & Reload Page' )\n\t\t\t\t\t: __( 'Hide & Reload Page' ) }\n\t\t\t</Button>\n\t\t</>\n\t);\n}\n\nexport function EnableCustomFieldsOption( { label, areCustomFieldsEnabled } ) {\n\tconst [ isChecked, setIsChecked ] = useState( areCustomFieldsEnabled );\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tlabel={ label }\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ setIsChecked }\n\t\t>\n\t\t\t{ isChecked !== areCustomFieldsEnabled && (\n\t\t\t\t<CustomFieldsConfirmation willEnable={ isChecked } />\n\t\t\t) }\n\t\t</PreferenceBaseOption>\n\t);\n}\n\nexport default withSelect( ( select ) => ( {\n\tareCustomFieldsEnabled:\n\t\t!! select( editorStore ).getEditorSettings().enableCustomFields,\n} ) )( EnableCustomFieldsOption );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,wBAAwB;AAC9E,SAASC,qBAAqB,QAAQ,gBAAgB;;AAEtD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC;AAAqB,CAAC,GAAGP,MAAM,CAAEF,sBAAuB,CAAC;AAEjE,SAASU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AAS,KAAKD,sBAAsB,iBACrC5B,IAAA,CAACgB,wBAAwB;MAACC,UAAU,EAAGY;IAAW,CAAE;EACpD,CACoB,CAAC;AAEzB;AAEA,eAAerC,UAAU,CAAIwC,MAAM,KAAQ;EAC1CJ,sBAAsB,EACrB,CAAC,CAAEI,MAAM,CAAEtC,WAAY,CAAC,CAACuC,iBAAiB,CAAC,CAAC,CAACC;AAC/C,CAAC,CAAG,CAAC,CAAER,wBAAyB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useState","__","Button","withSelect","store","editorStore","privateApis","preferencesPrivateApis","getPathAndQueryString","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PreferenceBaseOption","submitCustomFieldsForm","customFieldsForm","document","getElementById","querySelector","setAttribute","window","location","href","submit","CustomFieldsConfirmation","willEnable","isReloading","setIsReloading","children","className","variant","isBusy","__experimentalIsFocusable","disabled","onClick","EnableCustomFieldsOption","label","areCustomFieldsEnabled","isChecked","setIsChecked","onChange","select","getEditorSettings","enableCustomFields"],"sources":["@wordpress/edit-post/src/components/preferences-modal/enable-custom-fields.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\nimport { getPathAndQueryString } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferenceBaseOption } = unlock( preferencesPrivateApis );\n\nfunction submitCustomFieldsForm() {\n\tconst customFieldsForm = document.getElementById(\n\t\t'toggle-custom-fields-form'\n\t);\n\n\t// Ensure the referrer values is up to update with any\n\tcustomFieldsForm\n\t\t.querySelector( '[name=\"_wp_http_referer\"]' )\n\t\t.setAttribute( 'value', getPathAndQueryString( window.location.href ) );\n\n\tcustomFieldsForm.submit();\n}\n\nexport function CustomFieldsConfirmation( { willEnable } ) {\n\tconst [ isReloading, setIsReloading ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<p className=\"edit-post-preferences-modal__custom-fields-confirmation-message\">\n\t\t\t\t{ __(\n\t\t\t\t\t'A page reload is required for this change. Make sure your content is saved before reloading.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<Button\n\t\t\t\tclassName=\"edit-post-preferences-modal__custom-fields-confirmation-button\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isReloading }\n\t\t\t\t__experimentalIsFocusable\n\t\t\t\tdisabled={ isReloading }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsReloading( true );\n\t\t\t\t\tsubmitCustomFieldsForm();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ willEnable\n\t\t\t\t\t? __( 'Show & Reload Page' )\n\t\t\t\t\t: __( 'Hide & Reload Page' ) }\n\t\t\t</Button>\n\t\t</>\n\t);\n}\n\nexport function EnableCustomFieldsOption( { label, areCustomFieldsEnabled } ) {\n\tconst [ isChecked, setIsChecked ] = useState( areCustomFieldsEnabled );\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tlabel={ label }\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ setIsChecked }\n\t\t>\n\t\t\t{ isChecked !== areCustomFieldsEnabled && (\n\t\t\t\t<CustomFieldsConfirmation willEnable={ isChecked } />\n\t\t\t) }\n\t\t</PreferenceBaseOption>\n\t);\n}\n\nexport default withSelect( ( select ) => ( {\n\tareCustomFieldsEnabled:\n\t\t!! select( editorStore ).getEditorSettings().enableCustomFields,\n} ) )( EnableCustomFieldsOption );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,IAAIC,WAAW,QAAQ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B;IAAC,CACtB,CAAC;EAAA,CACR,CAAC;AAEL;AAEA,OAAO,SAASqC,wBAAwBA,CAAE;EAAEC,KAAK;EAAEC;AAAuB,CAAC,EAAG;EAC7E,MAAM,CAAEC,SAAS,EAAEC,YAAY,CAAE,GAAG1C,QAAQ,CAAEwC,sBAAuB,CAAC;EAEtE,oBACC7B,IAAA,CAACK,oBAAoB;IACpBuB,KAAK,EAAGA,KAAO;IACfE,SAAS,EAAGA,SAAW;IACvBE,QAAQ,EAAGD,YAAc;IAAAX,QAAA,EAEvBU,SAAS,KAAKD,sBAAsB,iBACrC7B,IAAA,CAACgB,wBAAwB;MAACC,UAAU,EAAGa;IAAW,CAAE;EACpD,CACoB,CAAC;AAEzB;AAEA,eAAetC,UAAU,CAAIyC,MAAM,KAAQ;EAC1CJ,sBAAsB,EACrB,CAAC,CAAEI,MAAM,CAAEvC,WAAY,CAAC,CAACwC,iBAAiB,CAAC,CAAC,CAACC;AAC/C,CAAC,CAAG,CAAC,CAAER,wBAAyB,CAAC","ignoreList":[]}
@@ -2,6 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { privateApis as editorPrivateApis, PluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem, PluginDocumentSettingPanel as EditorPluginDocumentSettingPanel, PluginMoreMenuItem as EditorPluginMoreMenuItem, PluginPrePublishPanel as EditorPluginPrePublishPanel, PluginPostPublishPanel as EditorPluginPostPublishPanel, PluginPostStatusInfo as EditorPluginPostStatusInfo, PluginSidebar as EditorPluginSidebar, PluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem } from '@wordpress/editor';
5
+ import { getPath } from '@wordpress/url';
5
6
  import deprecated from '@wordpress/deprecated';
6
7
 
7
8
  /**
@@ -12,6 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
12
13
  const {
13
14
  PluginPostExcerpt
14
15
  } = unlock(editorPrivateApis);
16
+ const isSiteEditor = getPath(window.location.href)?.includes('site-editor.php');
15
17
  const deprecateSlot = name => {
16
18
  deprecated(`wp.editPost.${name}`, {
17
19
  since: '6.6',
@@ -24,6 +26,9 @@ const deprecateSlot = name => {
24
26
  * @see PluginBlockSettingsMenuItem in @wordpress/editor package.
25
27
  */
26
28
  export function PluginBlockSettingsMenuItem(props) {
29
+ if (isSiteEditor) {
30
+ return null;
31
+ }
27
32
  deprecateSlot('PluginBlockSettingsMenuItem');
28
33
  return /*#__PURE__*/_jsx(EditorPluginBlockSettingsMenuItem, {
29
34
  ...props
@@ -34,6 +39,9 @@ export function PluginBlockSettingsMenuItem(props) {
34
39
  * @see PluginDocumentSettingPanel in @wordpress/editor package.
35
40
  */
36
41
  export function PluginDocumentSettingPanel(props) {
42
+ if (isSiteEditor) {
43
+ return null;
44
+ }
37
45
  deprecateSlot('PluginDocumentSettingPanel');
38
46
  return /*#__PURE__*/_jsx(EditorPluginDocumentSettingPanel, {
39
47
  ...props
@@ -44,6 +52,9 @@ export function PluginDocumentSettingPanel(props) {
44
52
  * @see PluginMoreMenuItem in @wordpress/editor package.
45
53
  */
46
54
  export function PluginMoreMenuItem(props) {
55
+ if (isSiteEditor) {
56
+ return null;
57
+ }
47
58
  deprecateSlot('PluginMoreMenuItem');
48
59
  return /*#__PURE__*/_jsx(EditorPluginMoreMenuItem, {
49
60
  ...props
@@ -54,6 +65,9 @@ export function PluginMoreMenuItem(props) {
54
65
  * @see PluginPrePublishPanel in @wordpress/editor package.
55
66
  */
56
67
  export function PluginPrePublishPanel(props) {
68
+ if (isSiteEditor) {
69
+ return null;
70
+ }
57
71
  deprecateSlot('PluginPrePublishPanel');
58
72
  return /*#__PURE__*/_jsx(EditorPluginPrePublishPanel, {
59
73
  ...props
@@ -64,6 +78,9 @@ export function PluginPrePublishPanel(props) {
64
78
  * @see PluginPostPublishPanel in @wordpress/editor package.
65
79
  */
66
80
  export function PluginPostPublishPanel(props) {
81
+ if (isSiteEditor) {
82
+ return null;
83
+ }
67
84
  deprecateSlot('PluginPostPublishPanel');
68
85
  return /*#__PURE__*/_jsx(EditorPluginPostPublishPanel, {
69
86
  ...props
@@ -74,6 +91,9 @@ export function PluginPostPublishPanel(props) {
74
91
  * @see PluginPostStatusInfo in @wordpress/editor package.
75
92
  */
76
93
  export function PluginPostStatusInfo(props) {
94
+ if (isSiteEditor) {
95
+ return null;
96
+ }
77
97
  deprecateSlot('PluginPostStatusInfo');
78
98
  return /*#__PURE__*/_jsx(EditorPluginPostStatusInfo, {
79
99
  ...props
@@ -84,6 +104,9 @@ export function PluginPostStatusInfo(props) {
84
104
  * @see PluginSidebar in @wordpress/editor package.
85
105
  */
86
106
  export function PluginSidebar(props) {
107
+ if (isSiteEditor) {
108
+ return null;
109
+ }
87
110
  deprecateSlot('PluginSidebar');
88
111
  return /*#__PURE__*/_jsx(EditorPluginSidebar, {
89
112
  ...props
@@ -94,6 +117,9 @@ export function PluginSidebar(props) {
94
117
  * @see PluginSidebarMoreMenuItem in @wordpress/editor package.
95
118
  */
96
119
  export function PluginSidebarMoreMenuItem(props) {
120
+ if (isSiteEditor) {
121
+ return null;
122
+ }
97
123
  deprecateSlot('PluginSidebarMoreMenuItem');
98
124
  return /*#__PURE__*/_jsx(EditorPluginSidebarMoreMenuItem, {
99
125
  ...props
@@ -104,6 +130,9 @@ export function PluginSidebarMoreMenuItem(props) {
104
130
  * @see PluginPostExcerpt in @wordpress/editor package.
105
131
  */
106
132
  export function __experimentalPluginPostExcerpt() {
133
+ if (isSiteEditor) {
134
+ return null;
135
+ }
107
136
  deprecated('wp.editPost.__experimentalPluginPostExcerpt', {
108
137
  since: '6.6',
109
138
  hint: 'Core and custom panels can be access programmatically using their panel name.',
@@ -1 +1 @@
1
- {"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","deprecated","unlock","jsx","_jsx","PluginPostExcerpt","deprecateSlot","name","since","alternative","props","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginBlockSettingsMenuItem in @wordpress/editor package.\n */\nexport function PluginBlockSettingsMenuItem( props ) {\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tdeprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {\n\t\tsince: '6.6',\n\t\thint: 'Core and custom panels can be access programmatically using their panel name.',\n\t\tlink: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',\n\t} );\n\treturn PluginPostExcerpt;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,iBAAiB,EAChCC,2BAA2B,IAAIC,iCAAiC,EAChEC,0BAA0B,IAAIC,gCAAgC,EAC9DC,kBAAkB,IAAIC,wBAAwB,EAC9CC,qBAAqB,IA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,OAAO,SAASjB,sBAAsBA,CAAEiB,KAAK,EAAG;EAC/CJ,aAAa,CAAE,wBAAyB,CAAC;EACzC,oBAAOF,IAAA,CAACV,4BAA4B;IAAA,GAAMgB;EAAK,CAAI,CAAC;AACrD;;AAEA;AACA;AACA;AACA,OAAO,SAASf,oBAAoBA,CAAEe,KAAK,EAAG;EAC7CJ,aAAa,CAAE,sBAAuB,CAAC;EACvC,oBAAOF,IAAA,CAACR,0BAA0B;IAAA,GAAMc;EAAK,CAAI,CAAC;AACnD;;AAEA;AACA;AACA;AACA,OAAO,SAASb,aAAaA,CAAEa,KAAK,EAAG;EACtCJ,aAAa,CAAE,eAAgB,CAAC;EAChC,oBAAOF,IAAA,CAACN,mBAAmB;IAAA,GAAMY;EAAK,CAAI,CAAC;AAC5C;;AAEA;AACA;AACA;AACA,OAAO,SAASX,yBAAyBA,CAAEW,KAAK,EAAG;EAClDJ,aAAa,CAAE,2BAA4B,CAAC;EAC5C,oBAAOF,IAAA,CAACJ,+BAA+B;IAAA,GAAMU;EAAK,CAAI,CAAC;AACxD;;AAEA;AACA;AACA;AACA,OAAO,SAASC,+BAA+BA,CAAA,EAAG;EACjDV,UAAU,CAAE,6CAA6C,EAAE;IAC1DO,KAAK,EAAE,KAAK;IACZI,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOR,iBAAiB;AACzB;;AAEA","ignoreList":[]}
1
+ {"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","getPath","deprecated","unlock","jsx","_jsx","PluginPostExcerpt","isSiteEditor","window","location","href","includes","deprecateSlot","name","since","alternative","props","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport { getPath } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst isSiteEditor = getPath( window.location.href )?.includes(\n\t'site-editor.php'\n);\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginBlockSettingsMenuItem in @wordpress/editor package.\n */\nexport function PluginBlockSettingsMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {\n\t\tsince: '6.6',\n\t\thint: 'Core and custom panels can be access programmatically using their panel name.',\n\t\tlink: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',\n\t} );\n\treturn PluginPostExcerpt;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,iBAAiB,EAChCC,2BAA2B,IAAIC,iCAAiC,EAChEC,0BAA0B,IAAIC,gCAAgC,EAC9DC,kBAAkB,IAAIC,wBAAwB,EAC9CC,qBAAqB,IAAIC,2BAA2B,EACpDC,sBAAsB,IAAIC,4BAA4B,EACtDC,oBAAoB,IAAIC,0BAA0B,EAClDC,aAAa,IAAIC,mBAAmB,EACpCC,yBAAyB,IAAIC,+BAA+B,QACtD,mBAAmB;AAC1B,SAASC,OAAO,QAAQ,gBAAgB;AACxC,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AACvC,MAAM;EAAEC;AAAkB,CAAC,GAAGH,MAAM,CAAEnB,iBAAkB,CAAC;AAEzD,MAAMuB,YAAY,GAAGN,OAAO,CAAEO,MAAM,CAACC,QAAQ,CAACC,IAAK,CAAC,EAAEC,QAAQ,CAC7D,iBACD,CAAC;AAED,MAAMC,aAAa,GAAKC,IAAI,IAAM;EACjCX,UAAU,CAAG,eAAeW,IAAM,EAAC,EAAE;IACpCC,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG,aAAaF,IAAM;EAClC,CAAE,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAAS5B,2BAA2BA,CAAE+B,KAAK,EAAG;EACpD,IAAKT,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAK,aAAa,CAAE,6BAA8B,CAAC;EAC9C,oBAAOP,IAAA,CAACnB,iCAAiC;IAAA,GAAM8B;EAAK,CAAI,CAAC;AAC1D;;AAEA;AACA;AACA;AACA,OAAO,SAAS7B,0BAA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,CAACP,mBAAmB;IAAA,GAAMkB;EAAK,CAAI,CAAC;AAC5C;;AAEA;AACA;AACA;AACA,OAAO,SAASjB,yBAAyBA,CAAEiB,KAAK,EAAG;EAClD,IAAKT,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAK,aAAa,CAAE,2BAA4B,CAAC;EAC5C,oBAAOP,IAAA,CAACL,+BAA+B;IAAA,GAAMgB;EAAK,CAAI,CAAC;AACxD;;AAEA;AACA;AACA;AACA,OAAO,SAASC,+BAA+BA,CAAA,EAAG;EACjD,IAAKV,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAL,UAAU,CAAE,6CAA6C,EAAE;IAC1DY,KAAK,EAAE,KAAK;IACZI,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOb,iBAAiB;AACzB;;AAEA","ignoreList":[]}
@@ -5,5 +5,5 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri
5
5
  export const {
6
6
  lock,
7
7
  unlock
8
- } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', '@wordpress/edit-post');
8
+ } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/edit-post');
9
9
  //# sourceMappingURL=lock-unlock.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"sources":["@wordpress/edit-post/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/edit-post'\n\t);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAgD,QAAQ,yBAAyB;AAE1F,OAAO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5BF,gDAAgD,CAC/C,iHAAiH,EACjH,sBACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"sources":["@wordpress/edit-post/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/edit-post'\n\t);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAgD,QAAQ,yBAAyB;AAE1F,OAAO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5BF,gDAAgD,CAC/C,+HAA+H,EAC/H,sBACD,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "8.0.0",
3
+ "version": "8.0.2",
4
4
  "description": "Edit Post module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -28,34 +28,35 @@
28
28
  "react-native": "src/index",
29
29
  "dependencies": {
30
30
  "@babel/runtime": "^7.16.0",
31
- "@wordpress/a11y": "^4.0.0",
32
- "@wordpress/api-fetch": "^7.0.0",
33
- "@wordpress/block-editor": "^13.0.0",
34
- "@wordpress/block-library": "^9.0.0",
35
- "@wordpress/blocks": "^13.0.0",
36
- "@wordpress/commands": "^1.0.0",
37
- "@wordpress/components": "^28.0.0",
38
- "@wordpress/compose": "^7.0.0",
39
- "@wordpress/core-commands": "^1.0.0",
40
- "@wordpress/core-data": "^7.0.0",
41
- "@wordpress/data": "^10.0.0",
42
- "@wordpress/deprecated": "^4.0.0",
43
- "@wordpress/dom": "^4.0.0",
44
- "@wordpress/editor": "^14.0.0",
45
- "@wordpress/element": "^6.0.0",
46
- "@wordpress/hooks": "^4.0.0",
47
- "@wordpress/i18n": "^5.0.0",
48
- "@wordpress/icons": "^10.0.0",
49
- "@wordpress/keyboard-shortcuts": "^5.0.0",
50
- "@wordpress/keycodes": "^4.0.0",
51
- "@wordpress/notices": "^5.0.0",
52
- "@wordpress/plugins": "^7.0.0",
53
- "@wordpress/preferences": "^4.0.0",
54
- "@wordpress/private-apis": "^1.0.0",
55
- "@wordpress/url": "^4.0.0",
56
- "@wordpress/viewport": "^6.0.0",
57
- "@wordpress/warning": "^3.0.0",
58
- "@wordpress/widgets": "^4.0.0",
31
+ "@wordpress/a11y": "^4.0.1",
32
+ "@wordpress/api-fetch": "^7.0.1",
33
+ "@wordpress/block-editor": "^13.0.2",
34
+ "@wordpress/block-library": "^9.0.2",
35
+ "@wordpress/blocks": "^13.0.2",
36
+ "@wordpress/commands": "^1.0.2",
37
+ "@wordpress/components": "^28.0.2",
38
+ "@wordpress/compose": "^7.0.1",
39
+ "@wordpress/core-commands": "^1.0.2",
40
+ "@wordpress/core-data": "^7.0.2",
41
+ "@wordpress/data": "^10.0.2",
42
+ "@wordpress/deprecated": "^4.0.1",
43
+ "@wordpress/dom": "^4.0.1",
44
+ "@wordpress/editor": "^14.0.2",
45
+ "@wordpress/element": "^6.0.1",
46
+ "@wordpress/hooks": "^4.0.1",
47
+ "@wordpress/html-entities": "^4.0.1",
48
+ "@wordpress/i18n": "^5.0.1",
49
+ "@wordpress/icons": "^10.0.1",
50
+ "@wordpress/keyboard-shortcuts": "^5.0.2",
51
+ "@wordpress/keycodes": "^4.0.1",
52
+ "@wordpress/notices": "^5.0.2",
53
+ "@wordpress/plugins": "^7.0.2",
54
+ "@wordpress/preferences": "^4.0.2",
55
+ "@wordpress/private-apis": "^1.0.2",
56
+ "@wordpress/url": "^4.0.1",
57
+ "@wordpress/viewport": "^6.0.2",
58
+ "@wordpress/warning": "^3.0.1",
59
+ "@wordpress/widgets": "^4.0.2",
59
60
  "clsx": "^2.1.1",
60
61
  "memize": "^2.1.0"
61
62
  },
@@ -66,5 +67,5 @@
66
67
  "publishConfig": {
67
68
  "access": "public"
68
69
  },
69
- "gitHead": "2f30cddff15723ac7017fd009fc5913b7b419400"
70
+ "gitHead": "a68c6b5ef53956cccf4961d53d79b6af7e00ae60"
70
71
  }
@@ -21,12 +21,19 @@ const slideX = {
21
21
  function BackButton( { initialPost } ) {
22
22
  return (
23
23
  <BackButtonFill>
24
- <motion.div
25
- variants={ slideX }
26
- transition={ { type: 'tween', delay: 0.8 } }
27
- >
28
- <FullscreenModeClose showTooltip initialPost={ initialPost } />
29
- </motion.div>
24
+ { ( { length } ) =>
25
+ length <= 1 && (
26
+ <motion.div
27
+ variants={ slideX }
28
+ transition={ { type: 'tween', delay: 0.8 } }
29
+ >
30
+ <FullscreenModeClose
31
+ showTooltip
32
+ initialPost={ initialPost }
33
+ />
34
+ </motion.div>
35
+ )
36
+ }
30
37
  </BackButtonFill>
31
38
  );
32
39
  }
@@ -84,10 +84,7 @@ export default function InitPatternModal() {
84
84
  />
85
85
  <ReusableBlocksRenameHint />
86
86
  <ToggleControl
87
- label={ _x(
88
- 'Synced',
89
- 'Option that makes an individual pattern synchronized'
90
- ) }
87
+ label={ _x( 'Synced', 'pattern (singular)' ) }
91
88
  help={ __(
92
89
  'Sync this pattern across multiple locations.'
93
90
  ) }
@@ -20,7 +20,6 @@ import {
20
20
  privateApis as blockEditorPrivateApis,
21
21
  store as blockEditorStore,
22
22
  } from '@wordpress/block-editor';
23
- import { useViewportMatch } from '@wordpress/compose';
24
23
  import { PluginArea } from '@wordpress/plugins';
25
24
  import { __, sprintf } from '@wordpress/i18n';
26
25
  import { useCallback, useMemo } from '@wordpress/element';
@@ -30,6 +29,7 @@ import { privateApis as commandsPrivateApis } from '@wordpress/commands';
30
29
  import { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';
31
30
  import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
32
31
  import { addQueryArgs } from '@wordpress/url';
32
+ import { decodeEntities } from '@wordpress/html-entities';
33
33
 
34
34
  /**
35
35
  * Internal dependencies
@@ -119,7 +119,7 @@ function useEditorStyles() {
119
119
  ? editorSettings.styles ?? []
120
120
  : defaultEditorStyles;
121
121
 
122
- // Add a constant padding for the typewritter effect. When typing at the
122
+ // Add a constant padding for the typewriter effect. When typing at the
123
123
  // bottom, there needs to be room to scroll up.
124
124
  if (
125
125
  ! isZoomedOutView &&
@@ -127,9 +127,12 @@ function useEditorStyles() {
127
127
  renderingMode === 'post-only' &&
128
128
  ! DESIGN_POST_TYPES.includes( postType )
129
129
  ) {
130
- baseStyles.push( {
131
- css: 'body{padding-bottom: 40vh}',
132
- } );
130
+ return [
131
+ ...baseStyles,
132
+ {
133
+ css: 'body{padding-bottom: 40vh}',
134
+ },
135
+ ];
133
136
  }
134
137
 
135
138
  return baseStyles;
@@ -138,25 +141,23 @@ function useEditorStyles() {
138
141
  editorSettings.disableLayoutStyles,
139
142
  editorSettings.styles,
140
143
  hasThemeStyleSupport,
144
+ postType,
141
145
  ] );
142
146
  }
143
147
 
144
148
  function Layout( { initialPost } ) {
145
149
  useCommands();
146
150
  useEditPostCommands();
147
- const isWideViewport = useViewportMatch( 'large' );
148
151
  const paddingAppenderRef = usePaddingAppender();
149
152
  const shouldIframe = useShouldIframe();
150
153
  const { createErrorNotice } = useDispatch( noticesStore );
151
154
  const {
152
155
  mode,
153
156
  isFullscreenActive,
154
- sidebarIsOpened,
155
157
  hasActiveMetaboxes,
156
158
  hasBlockSelected,
157
159
  showIconLabels,
158
160
  isDistractionFree,
159
- showBlockBreadcrumbs,
160
161
  showMetaBoxes,
161
162
  hasHistory,
162
163
  isEditingTemplate,
@@ -175,7 +176,6 @@ function Layout( { initialPost } ) {
175
176
  !! select( blockEditorStore ).getBlockSelectionStart(),
176
177
  showIconLabels: get( 'core', 'showIconLabels' ),
177
178
  isDistractionFree: get( 'core', 'distractionFree' ),
178
- showBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),
179
179
  showMetaBoxes:
180
180
  select( editorStore ).getRenderingMode() === 'post-only',
181
181
  hasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,
@@ -201,11 +201,7 @@ function Layout( { initialPost } ) {
201
201
  }
202
202
 
203
203
  const className = clsx( 'edit-post-layout', 'is-mode-' + mode, {
204
- 'is-sidebar-opened': sidebarIsOpened,
205
204
  'has-metaboxes': hasActiveMetaboxes,
206
- 'is-distraction-free': isDistractionFree && isWideViewport,
207
- 'has-block-breadcrumbs':
208
- showBlockBreadcrumbs && ! isDistractionFree && isWideViewport,
209
205
  } );
210
206
 
211
207
  function onPluginAreaError( name ) {
@@ -245,7 +241,7 @@ function Layout( { initialPost } ) {
245
241
  sprintf(
246
242
  // translators: %s: Title of the created post e.g: "Post 1".
247
243
  __( '"%s" successfully created.' ),
248
- title
244
+ decodeEntities( title )
249
245
  ),
250
246
  {
251
247
  type: 'snackbar',
@@ -42,6 +42,7 @@ export function CustomFieldsConfirmation( { willEnable } ) {
42
42
  className="edit-post-preferences-modal__custom-fields-confirmation-button"
43
43
  variant="secondary"
44
44
  isBusy={ isReloading }
45
+ __experimentalIsFocusable
45
46
  disabled={ isReloading }
46
47
  onClick={ () => {
47
48
  setIsReloading( true );