@wordpress/edit-post 7.6.0 → 7.8.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +6 -15
  3. package/build/components/header/post-publish-button-or-toggle.js +1 -1
  4. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  5. package/build/components/secondary-sidebar/list-view-sidebar.js +1 -2
  6. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  7. package/build/components/visual-editor/index.js +26 -12
  8. package/build/components/visual-editor/index.js.map +1 -1
  9. package/build/components/visual-editor/index.native.js +1 -38
  10. package/build/components/visual-editor/index.native.js.map +1 -1
  11. package/build/plugins/index.js +1 -1
  12. package/build/plugins/index.js.map +1 -1
  13. package/build/store/actions.js.map +1 -1
  14. package/build-module/components/header/post-publish-button-or-toggle.js +1 -1
  15. package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
  16. package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -2
  17. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  18. package/build-module/components/visual-editor/index.js +26 -12
  19. package/build-module/components/visual-editor/index.js.map +1 -1
  20. package/build-module/components/visual-editor/index.native.js +1 -37
  21. package/build-module/components/visual-editor/index.native.js.map +1 -1
  22. package/build-module/plugins/index.js +1 -1
  23. package/build-module/plugins/index.js.map +1 -1
  24. package/build-module/store/actions.js.map +1 -1
  25. package/build-style/style-rtl.css +12 -2
  26. package/build-style/style.css +12 -2
  27. package/package.json +30 -30
  28. package/src/components/header/post-publish-button-or-toggle.js +1 -1
  29. package/src/components/secondary-sidebar/list-view-sidebar.js +1 -2
  30. package/src/components/secondary-sidebar/style.scss +7 -2
  31. package/src/components/visual-editor/index.js +31 -14
  32. package/src/components/visual-editor/index.native.js +1 -36
  33. package/src/plugins/index.js +1 -1
  34. package/src/store/actions.js +1 -1
  35. package/src/style.scss +10 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/store/actions.js"],"names":["__","apiFetch","store","interfaceStore","preferencesStore","speak","noticesStore","coreStore","blockEditorStore","editorStore","getMetaBoxContainer","editPostStore","openGeneralSidebar","name","registry","dispatch","enableComplementaryArea","closeGeneralSidebar","disableComplementaryArea","openModal","type","closeModal","openPublishSidebar","closePublishSidebar","togglePublishSidebar","toggleEditorPanelEnabled","panelName","inactivePanels","select","get","isPanelInactive","includes","updatedInactivePanels","filter","invactivePanelName","set","toggleEditorPanelOpened","openPanels","isPanelOpen","updatedOpenPanels","openPanelName","removeEditorPanel","toggleFeature","feature","toggle","switchEditorMode","mode","clearSelectedBlock","message","togglePinnedPluginItem","pluginName","isPinned","isItemPinned","updatePreferredStyleVariations","blockName","blockStyle","existingVariations","updatedVariations","showBlockTypes","blockNames","existingBlockNames","newBlockNames","Array","isArray","hideBlockTypes","mergedBlockNames","Set","setAvailableMetaBoxesPerLocation","metaBoxesPerLocation","requestMetaBoxUpdates","window","tinyMCE","triggerSave","post","getCurrentPost","additionalData","comment_status","ping_status","sticky","author","Boolean","baseFormData","FormData","document","querySelector","activeMetaBoxLocations","getActiveMetaBoxLocations","formDataToMerge","map","location","formData","reduce","memo","currentFormData","key","value","append","forEach","url","_wpMetaBoxUrl","method","body","parse","metaBoxUpdatesSuccess","metaBoxUpdatesFailure","__experimentalSetPreviewDeviceType","deviceType","setIsInserterOpened","setIsListViewOpened","isOpen","setIsEditingTemplate","__unstableSwitchToTemplateMode","newTemplate","isWelcomeGuideActive","isFeatureActive","createSuccessNotice","__unstableCreateTemplate","template","savedTemplate","saveEntityRecord","editEntityRecord","id","slug","metaBoxesInitialized","initializeMetaBoxes","isEditorReady","__unstableIsEditorReady","postType","getCurrentPostType","postboxes","page","add_postbox_toggles","wasSavingPost","isSavingPost","wasAutosavingPost","isAutosavingPost","subscribe","shouldTriggerMetaboxesSave","hasMetaBoxes"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAm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AAiBnB,WAAjB,EAA+B4H,YAA/B,EAApB;AACA,MAAIC,iBAAiB,GAAGxH,QAAQ,CAC9Bc,MADsB,CACdnB,WADc,EAEtB8H,gBAFsB,EAAxB,CApBqC,CAwBrC;;AACAzH,EAAAA,QAAQ,CAAC0H,SAAT,CAAoB,YAAY;AAC/B,UAAMH,YAAY,GAAGvH,QAAQ,CAACc,MAAT,CAAiBnB,WAAjB,EAA+B4H,YAA/B,EAArB;AACA,UAAME,gBAAgB,GAAGzH,QAAQ,CAC/Bc,MADuB,CACfnB,WADe,EAEvB8H,gBAFuB,EAAzB,CAF+B,CAM/B;;AACA,UAAME,0BAA0B,GAC/BL,aAAa,IACb,CAAEE,iBADF,IAEA,CAAED,YAFF,IAGAzG,MAAM,CAAC8G,YAAP,EAJD,CAP+B,CAa/B;;AACAN,IAAAA,aAAa,GAAGC,YAAhB;AACAC,IAAAA,iBAAiB,GAAGC,gBAApB;;AAEA,QAAKE,0BAAL,EAAkC;AACjC,YAAM1H,QAAQ,CAACsD,qBAAT,EAAN;AACA;AACD,GApBD;AAsBAtD,EAAAA,QAAQ,CAAE;AACTK,IAAAA,IAAI,EAAE;AADG,GAAF,CAAR;AAGA,CApDK","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport apiFetch from '@wordpress/api-fetch';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { speak } from '@wordpress/a11y';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { getMetaBoxContainer } from '../utils/meta-boxes';\nimport { store as editPostStore } from '.';\n\n/**\n * Returns an action object used in signalling that the user opened an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { registry } ) =>\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( editPostStore.name, name );\n\n/**\n * Returns an action object signalling that the user closed the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) =>\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.disableComplementaryArea( editPostStore.name );\n\n/**\n * Returns an action object used in signalling that the user opened a modal.\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport function openModal( name ) {\n\treturn {\n\t\ttype: 'OPEN_MODAL',\n\t\tname,\n\t};\n}\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @return {Object} Action object.\n */\nexport function closeModal() {\n\treturn {\n\t\ttype: 'CLOSE_MODAL',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n *\n * @return {Object} Action object\n */\nexport function openPublishSidebar() {\n\treturn {\n\t\ttype: 'OPEN_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n *\n * @return {Object} Action object.\n */\nexport function closePublishSidebar() {\n\treturn {\n\t\ttype: 'CLOSE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n *\n * @return {Object} Action object\n */\nexport function togglePublishSidebar() {\n\treturn {\n\t\ttype: 'TOGGLE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst inactivePanels =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'inactivePanels' ) ?? [];\n\n\t\tconst isPanelInactive = !! inactivePanels?.includes( panelName );\n\n\t\t// If the panel is inactive, remove it to enable it, else add it to\n\t\t// make it inactive.\n\t\tlet updatedInactivePanels;\n\t\tif ( isPanelInactive ) {\n\t\t\tupdatedInactivePanels = inactivePanels.filter(\n\t\t\t\t( invactivePanelName ) => invactivePanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedInactivePanels = [ ...inactivePanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core/edit-post', 'inactivePanels', updatedInactivePanels );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst openPanels =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'openPanels' ) ?? [];\n\n\t\tconst isPanelOpen = !! openPanels?.includes( panelName );\n\n\t\t// If the panel is open, remove it to close it, else add it to\n\t\t// make it open.\n\t\tlet updatedOpenPanels;\n\t\tif ( isPanelOpen ) {\n\t\t\tupdatedOpenPanels = openPanels.filter(\n\t\t\t\t( openPanelName ) => openPanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedOpenPanels = [ ...openPanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core/edit-post', 'openPanels', updatedOpenPanels );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport function removeEditorPanel( panelName ) {\n\treturn {\n\t\ttype: 'REMOVE_PANEL',\n\t\tpanelName,\n\t};\n}\n\n/**\n * Triggers an action used to toggle a feature flag.\n *\n * @param {string} feature Feature name.\n */\nexport const toggleFeature =\n\t( feature ) =>\n\t( { registry } ) =>\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-post', feature );\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core/edit-post', 'editorMode', mode );\n\n\t\t// Unselect blocks when we switch to the code editor.\n\t\tif ( mode !== 'visual' ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\n\t\tconst message =\n\t\t\tmode === 'visual'\n\t\t\t\t? __( 'Visual editor selected' )\n\t\t\t\t: __( 'Code editor selected' );\n\t\tspeak( message, 'assertive' );\n\t};\n\n/**\n * Triggers an action object used to toggle a plugin name flag.\n *\n * @param {string} pluginName Plugin name.\n */\nexport const togglePinnedPluginItem =\n\t( pluginName ) =>\n\t( { registry } ) => {\n\t\tconst isPinned = registry\n\t\t\t.select( interfaceStore )\n\t\t\t.isItemPinned( 'core/edit-post', pluginName );\n\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t[ isPinned ? 'unpinItem' : 'pinItem' ](\n\t\t\t\t'core/edit-post',\n\t\t\t\tpluginName\n\t\t\t);\n\t};\n\n/**\n * Returns an action object used in signaling that a style should be auto-applied when a block is created.\n *\n * @param {string} blockName Name of the block.\n * @param {?string} blockStyle Name of the style that should be auto applied. If undefined, the \"auto apply\" setting of the block is removed.\n */\nexport const updatePreferredStyleVariations =\n\t( blockName, blockStyle ) =>\n\t( { registry } ) => {\n\t\tif ( ! blockName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst existingVariations =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'preferredStyleVariations' ) ?? {};\n\n\t\t// When the blockStyle is omitted, remove the block's preferred variation.\n\t\tif ( ! blockStyle ) {\n\t\t\tconst updatedVariations = {\n\t\t\t\t...existingVariations,\n\t\t\t};\n\n\t\t\tdelete updatedVariations[ blockName ];\n\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set(\n\t\t\t\t\t'core/edit-post',\n\t\t\t\t\t'preferredStyleVariations',\n\t\t\t\t\tupdatedVariations\n\t\t\t\t);\n\t\t} else {\n\t\t\t// Else add the variation.\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core/edit-post', 'preferredStyleVariations', {\n\t\t\t\t\t...existingVariations,\n\t\t\t\t\t[ blockName ]: blockStyle,\n\t\t\t\t} );\n\t\t}\n\t};\n\n/**\n * Update the provided block types to be visible.\n *\n * @param {string[]} blockNames Names of block types to show.\n */\nexport const showBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst newBlockNames = existingBlockNames.filter(\n\t\t\t( type ) =>\n\t\t\t\t! (\n\t\t\t\t\tArray.isArray( blockNames ) ? blockNames : [ blockNames ]\n\t\t\t\t ).includes( type )\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core/edit-post', 'hiddenBlockTypes', newBlockNames );\n\t};\n\n/**\n * Update the provided block types to be hidden.\n *\n * @param {string[]} blockNames Names of block types to hide.\n */\nexport const hideBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst mergedBlockNames = new Set( [\n\t\t\t...existingBlockNames,\n\t\t\t...( Array.isArray( blockNames ) ? blockNames : [ blockNames ] ),\n\t\t] );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core/edit-post', 'hiddenBlockTypes', [\n\t\t\t\t...mergedBlockNames,\n\t\t\t] );\n\t};\n\n/**\n * Stores info about which Meta boxes are available in which location.\n *\n * @param {Object} metaBoxesPerLocation Meta boxes per location.\n */\nexport function setAvailableMetaBoxesPerLocation( metaBoxesPerLocation ) {\n\treturn {\n\t\ttype: 'SET_META_BOXES_PER_LOCATIONS',\n\t\tmetaBoxesPerLocation,\n\t};\n}\n\n/**\n * Update a metabox.\n */\nexport const requestMetaBoxUpdates =\n\t() =>\n\tasync ( { registry, select, dispatch } ) => {\n\t\tdispatch( {\n\t\t\ttype: 'REQUEST_META_BOX_UPDATES',\n\t\t} );\n\n\t\t// Saves the wp_editor fields.\n\t\tif ( window.tinyMCE ) {\n\t\t\twindow.tinyMCE.triggerSave();\n\t\t}\n\n\t\t// Additional data needed for backward compatibility.\n\t\t// If we do not provide this data, the post will be overridden with the default values.\n\t\tconst post = registry.select( editorStore ).getCurrentPost();\n\t\tconst additionalData = [\n\t\t\tpost.comment_status\n\t\t\t\t? [ 'comment_status', post.comment_status ]\n\t\t\t\t: false,\n\t\t\tpost.ping_status ? [ 'ping_status', post.ping_status ] : false,\n\t\t\tpost.sticky ? [ 'sticky', post.sticky ] : false,\n\t\t\tpost.author ? [ 'post_author', post.author ] : false,\n\t\t].filter( Boolean );\n\n\t\t// We gather all the metaboxes locations data and the base form data.\n\t\tconst baseFormData = new window.FormData(\n\t\t\tdocument.querySelector( '.metabox-base-form' )\n\t\t);\n\t\tconst activeMetaBoxLocations = select.getActiveMetaBoxLocations();\n\t\tconst formDataToMerge = [\n\t\t\tbaseFormData,\n\t\t\t...activeMetaBoxLocations.map(\n\t\t\t\t( location ) =>\n\t\t\t\t\tnew window.FormData( getMetaBoxContainer( location ) )\n\t\t\t),\n\t\t];\n\n\t\t// Merge all form data objects into a single one.\n\t\tconst formData = formDataToMerge.reduce( ( memo, currentFormData ) => {\n\t\t\tfor ( const [ key, value ] of currentFormData ) {\n\t\t\t\tmemo.append( key, value );\n\t\t\t}\n\t\t\treturn memo;\n\t\t}, new window.FormData() );\n\t\tadditionalData.forEach( ( [ key, value ] ) =>\n\t\t\tformData.append( key, value )\n\t\t);\n\n\t\ttry {\n\t\t\t// Save the metaboxes.\n\t\t\tawait apiFetch( {\n\t\t\t\turl: window._wpMetaBoxUrl,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tbody: formData,\n\t\t\t\tparse: false,\n\t\t\t} );\n\t\t\tdispatch.metaBoxUpdatesSuccess();\n\t\t} catch {\n\t\t\tdispatch.metaBoxUpdatesFailure();\n\t\t}\n\t};\n\n/**\n * Returns an action object used to signal a successful meta box update.\n *\n * @return {Object} Action object.\n */\nexport function metaBoxUpdatesSuccess() {\n\treturn {\n\t\ttype: 'META_BOX_UPDATES_SUCCESS',\n\t};\n}\n\n/**\n * Returns an action object used to signal a failed meta box update.\n *\n * @return {Object} Action object.\n */\nexport function metaBoxUpdatesFailure() {\n\treturn {\n\t\ttype: 'META_BOX_UPDATES_FAILURE',\n\t};\n}\n\n/**\n * Returns an action object used to toggle the width of the editing canvas.\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport function __experimentalSetPreviewDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_PREVIEW_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @param {boolean|Object} value Whether the inserter should be\n * opened (true) or closed (false).\n * To specify an insertion point,\n * use an object.\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.insertionIndex The index to insert at.\n *\n * @return {Object} Action object.\n */\nexport function setIsInserterOpened( value ) {\n\treturn {\n\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\tvalue,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n * @return {Object} Action object.\n */\nexport function setIsListViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Returns an action object used to switch to template editing.\n *\n * @param {boolean} value Is editing template.\n * @return {Object} Action object.\n */\nexport function setIsEditingTemplate( value ) {\n\treturn {\n\t\ttype: 'SET_IS_EDITING_TEMPLATE',\n\t\tvalue,\n\t};\n}\n\n/**\n * Switches to the template mode.\n *\n * @param {boolean} newTemplate Is new template.\n */\nexport const __unstableSwitchToTemplateMode =\n\t( newTemplate = false ) =>\n\t( { registry, select, dispatch } ) => {\n\t\tdispatch( setIsEditingTemplate( true ) );\n\t\tconst isWelcomeGuideActive = select.isFeatureActive(\n\t\t\t'welcomeGuideTemplate'\n\t\t);\n\t\tif ( ! isWelcomeGuideActive ) {\n\t\t\tconst message = newTemplate\n\t\t\t\t? __( \"Custom template created. You're in template mode now.\" )\n\t\t\t\t: __(\n\t\t\t\t\t\t'Editing template. Changes made here affect all posts and pages that use the template.'\n\t\t\t\t );\n\t\t\tregistry.dispatch( noticesStore ).createSuccessNotice( message, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t}\n\t};\n\n/**\n * Create a block based template.\n *\n * @param {Object?} template Template to create and assign.\n */\nexport const __unstableCreateTemplate =\n\t( template ) =>\n\tasync ( { registry } ) => {\n\t\tconst savedTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', 'wp_template', template );\n\t\tconst post = registry.select( editorStore ).getCurrentPost();\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord( 'postType', post.type, post.id, {\n\t\t\t\ttemplate: savedTemplate.slug,\n\t\t\t} );\n\t};\n\nlet metaBoxesInitialized = false;\n\n/**\n * Initializes WordPress `postboxes` script and the logic for saving meta boxes.\n */\nexport const initializeMetaBoxes =\n\t() =>\n\t( { registry, select, dispatch } ) => {\n\t\tconst isEditorReady = registry\n\t\t\t.select( editorStore )\n\t\t\t.__unstableIsEditorReady();\n\n\t\tif ( ! isEditorReady ) {\n\t\t\treturn;\n\t\t}\n\t\t// Only initialize once.\n\t\tif ( metaBoxesInitialized ) {\n\t\t\treturn;\n\t\t}\n\t\tconst postType = registry.select( editorStore ).getCurrentPostType();\n\t\tif ( window.postboxes.page !== postType ) {\n\t\t\twindow.postboxes.add_postbox_toggles( postType );\n\t\t}\n\n\t\tmetaBoxesInitialized = true;\n\n\t\tlet wasSavingPost = registry.select( editorStore ).isSavingPost();\n\t\tlet wasAutosavingPost = registry\n\t\t\t.select( editorStore )\n\t\t\t.isAutosavingPost();\n\n\t\t// Save metaboxes when performing a full save on the post.\n\t\tregistry.subscribe( async () => {\n\t\t\tconst isSavingPost = registry.select( editorStore ).isSavingPost();\n\t\t\tconst isAutosavingPost = registry\n\t\t\t\t.select( editorStore )\n\t\t\t\t.isAutosavingPost();\n\n\t\t\t// Save metaboxes on save completion, except for autosaves.\n\t\t\tconst shouldTriggerMetaboxesSave =\n\t\t\t\twasSavingPost &&\n\t\t\t\t! wasAutosavingPost &&\n\t\t\t\t! isSavingPost &&\n\t\t\t\tselect.hasMetaBoxes();\n\n\t\t\t// Save current state for next inspection.\n\t\t\twasSavingPost = isSavingPost;\n\t\t\twasAutosavingPost = isAutosavingPost;\n\n\t\t\tif ( shouldTriggerMetaboxesSave ) {\n\t\t\t\tawait dispatch.requestMetaBoxUpdates();\n\t\t\t}\n\t\t} );\n\n\t\tdispatch( {\n\t\t\ttype: 'META_BOXES_INITIALIZED',\n\t\t} );\n\t};\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/store/actions.js"],"names":["__","apiFetch","store","interfaceStore","preferencesStore","speak","noticesStore","coreStore","blockEditorStore","editorStore","getMetaBoxContainer","editPostStore","openGeneralSidebar","name","registry","dispatch","enableComplementaryArea","closeGeneralSidebar","disableComplementaryArea","openModal","type","closeModal","openPublishSidebar","closePublishSidebar","togglePublishSidebar","toggleEditorPanelEnabled","panelName","inactivePanels","select","get","isPanelInactive","includes","updatedInactivePanels","filter","invactivePanelName","set","toggleEditorPanelOpened","openPanels","isPanelOpen","updatedOpenPanels","openPanelName","removeEditorPanel","toggleFeature","feature","toggle","switchEditorMode","mode","clearSelectedBlock","message","togglePinnedPluginItem","pluginName","isPinned","isItemPinned","updatePreferredStyleVariations","blockName","blockStyle","existingVariations","updatedVariations","showBlockTypes","blockNames","existingBlockNames","newBlockNames","Array","isArray","hideBlockTypes","mergedBlockNames","Set","setAvailableMetaBoxesPerLocation","metaBoxesPerLocation","requestMetaBoxUpdates","window","tinyMCE","triggerSave","post","getCurrentPost","additionalData","comment_status","ping_status","sticky","author","Boolean","baseFormData","FormData","document","querySelector","activeMetaBoxLocations","getActiveMetaBoxLocations","formDataToMerge","map","location","formData","reduce","memo","currentFormData","key","value","append","forEach","url","_wpMetaBoxUrl","method","body","parse","metaBoxUpdatesSuccess","metaBoxUpdatesFailure","__experimentalSetPreviewDeviceType","deviceType","setIsInserterOpened","setIsListViewOpened","isOpen","setIsEditingTemplate","__unstableSwitchToTemplateMode","newTemplate","isWelcomeGuideActive","isFeatureActive","createSuccessNotice","__unstableCreateTemplate","template","savedTemplate","saveEntityRecord","editEntityRecord","id","slug","metaBoxesInitialized","initializeMetaBoxes","isEditorReady","__unstableIsEditorReady","postType","getCurrentPostType","postboxes","page","add_postbox_toggles","wasSavingPost","isSavingPost","wasAutosavingPost","isAutosavingPost","subscribe","shouldTriggerMetaboxesSave","hasMetaBoxes"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,OAAOC,QAAP,MAAqB,sBAArB;AACA,SAASC,KAAK,IAAIC,cAAlB,QAAwC,sBAAxC;AACA,SAASD,KAAK,IAAIE,gBAAlB,QAA0C,wBAA1C;AACA,SAASC,KAAT,QAAsB,iBAAtB;AACA,SAASH,KAAK,IAAII,YAAlB,QAAsC,oBAAtC;AACA,SAASJ,KAAK,IAAIK,SAAlB,QAAmC,sBAAnC;AACA,SAASL,KAAK,IAAIM,gBAAlB,QAA0C,yBAA1C;AACA,SAASN,KAAK,IAAIO,WAAlB,QAAqC,mBAArC;AAEA;AACA;AACA;;AACA,SAASC,mBAAT,QAAoC,qBAApC;AACA,SAASR,KAAK,IAAIS,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BADF,IAEA,CAAED,YAFF,IAGAzG,MAAM,CAAC8G,YAAP,EAJD,CAP+B,CAa/B;;AACAN,IAAAA,aAAa,GAAGC,YAAhB;AACAC,IAAAA,iBAAiB,GAAGC,gBAApB;;AAEA,QAAKE,0BAAL,EAAkC;AACjC,YAAM1H,QAAQ,CAACsD,qBAAT,EAAN;AACA;AACD,GApBD;AAsBAtD,EAAAA,QAAQ,CAAE;AACTK,IAAAA,IAAI,EAAE;AADG,GAAF,CAAR;AAGA,CApDK","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport apiFetch from '@wordpress/api-fetch';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { speak } from '@wordpress/a11y';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { getMetaBoxContainer } from '../utils/meta-boxes';\nimport { store as editPostStore } from '.';\n\n/**\n * Returns an action object used in signalling that the user opened an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { registry } ) =>\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( editPostStore.name, name );\n\n/**\n * Returns an action object signalling that the user closed the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) =>\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.disableComplementaryArea( editPostStore.name );\n\n/**\n * Returns an action object used in signalling that the user opened a modal.\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport function openModal( name ) {\n\treturn {\n\t\ttype: 'OPEN_MODAL',\n\t\tname,\n\t};\n}\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @return {Object} Action object.\n */\nexport function closeModal() {\n\treturn {\n\t\ttype: 'CLOSE_MODAL',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n *\n * @return {Object} Action object\n */\nexport function openPublishSidebar() {\n\treturn {\n\t\ttype: 'OPEN_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n *\n * @return {Object} Action object.\n */\nexport function closePublishSidebar() {\n\treturn {\n\t\ttype: 'CLOSE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n *\n * @return {Object} Action object\n */\nexport function togglePublishSidebar() {\n\treturn {\n\t\ttype: 'TOGGLE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst inactivePanels =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'inactivePanels' ) ?? [];\n\n\t\tconst isPanelInactive = !! inactivePanels?.includes( panelName );\n\n\t\t// If the panel is inactive, remove it to enable it, else add it to\n\t\t// make it inactive.\n\t\tlet updatedInactivePanels;\n\t\tif ( isPanelInactive ) {\n\t\t\tupdatedInactivePanels = inactivePanels.filter(\n\t\t\t\t( invactivePanelName ) => invactivePanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedInactivePanels = [ ...inactivePanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core/edit-post', 'inactivePanels', updatedInactivePanels );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst openPanels =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'openPanels' ) ?? [];\n\n\t\tconst isPanelOpen = !! openPanels?.includes( panelName );\n\n\t\t// If the panel is open, remove it to close it, else add it to\n\t\t// make it open.\n\t\tlet updatedOpenPanels;\n\t\tif ( isPanelOpen ) {\n\t\t\tupdatedOpenPanels = openPanels.filter(\n\t\t\t\t( openPanelName ) => openPanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedOpenPanels = [ ...openPanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core/edit-post', 'openPanels', updatedOpenPanels );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport function removeEditorPanel( panelName ) {\n\treturn {\n\t\ttype: 'REMOVE_PANEL',\n\t\tpanelName,\n\t};\n}\n\n/**\n * Triggers an action used to toggle a feature flag.\n *\n * @param {string} feature Feature name.\n */\nexport const toggleFeature =\n\t( feature ) =>\n\t( { registry } ) =>\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-post', feature );\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core/edit-post', 'editorMode', mode );\n\n\t\t// Unselect blocks when we switch to the code editor.\n\t\tif ( mode !== 'visual' ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\n\t\tconst message =\n\t\t\tmode === 'visual'\n\t\t\t\t? __( 'Visual editor selected' )\n\t\t\t\t: __( 'Code editor selected' );\n\t\tspeak( message, 'assertive' );\n\t};\n\n/**\n * Triggers an action object used to toggle a plugin name flag.\n *\n * @param {string} pluginName Plugin name.\n */\nexport const togglePinnedPluginItem =\n\t( pluginName ) =>\n\t( { registry } ) => {\n\t\tconst isPinned = registry\n\t\t\t.select( interfaceStore )\n\t\t\t.isItemPinned( 'core/edit-post', pluginName );\n\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t[ isPinned ? 'unpinItem' : 'pinItem' ](\n\t\t\t\t'core/edit-post',\n\t\t\t\tpluginName\n\t\t\t);\n\t};\n\n/**\n * Returns an action object used in signaling that a style should be auto-applied when a block is created.\n *\n * @param {string} blockName Name of the block.\n * @param {?string} blockStyle Name of the style that should be auto applied. If undefined, the \"auto apply\" setting of the block is removed.\n */\nexport const updatePreferredStyleVariations =\n\t( blockName, blockStyle ) =>\n\t( { registry } ) => {\n\t\tif ( ! blockName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst existingVariations =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'preferredStyleVariations' ) ?? {};\n\n\t\t// When the blockStyle is omitted, remove the block's preferred variation.\n\t\tif ( ! blockStyle ) {\n\t\t\tconst updatedVariations = {\n\t\t\t\t...existingVariations,\n\t\t\t};\n\n\t\t\tdelete updatedVariations[ blockName ];\n\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set(\n\t\t\t\t\t'core/edit-post',\n\t\t\t\t\t'preferredStyleVariations',\n\t\t\t\t\tupdatedVariations\n\t\t\t\t);\n\t\t} else {\n\t\t\t// Else add the variation.\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core/edit-post', 'preferredStyleVariations', {\n\t\t\t\t\t...existingVariations,\n\t\t\t\t\t[ blockName ]: blockStyle,\n\t\t\t\t} );\n\t\t}\n\t};\n\n/**\n * Update the provided block types to be visible.\n *\n * @param {string[]} blockNames Names of block types to show.\n */\nexport const showBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst newBlockNames = existingBlockNames.filter(\n\t\t\t( type ) =>\n\t\t\t\t! (\n\t\t\t\t\tArray.isArray( blockNames ) ? blockNames : [ blockNames ]\n\t\t\t\t).includes( type )\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core/edit-post', 'hiddenBlockTypes', newBlockNames );\n\t};\n\n/**\n * Update the provided block types to be hidden.\n *\n * @param {string[]} blockNames Names of block types to hide.\n */\nexport const hideBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst mergedBlockNames = new Set( [\n\t\t\t...existingBlockNames,\n\t\t\t...( Array.isArray( blockNames ) ? blockNames : [ blockNames ] ),\n\t\t] );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core/edit-post', 'hiddenBlockTypes', [\n\t\t\t\t...mergedBlockNames,\n\t\t\t] );\n\t};\n\n/**\n * Stores info about which Meta boxes are available in which location.\n *\n * @param {Object} metaBoxesPerLocation Meta boxes per location.\n */\nexport function setAvailableMetaBoxesPerLocation( metaBoxesPerLocation ) {\n\treturn {\n\t\ttype: 'SET_META_BOXES_PER_LOCATIONS',\n\t\tmetaBoxesPerLocation,\n\t};\n}\n\n/**\n * Update a metabox.\n */\nexport const requestMetaBoxUpdates =\n\t() =>\n\tasync ( { registry, select, dispatch } ) => {\n\t\tdispatch( {\n\t\t\ttype: 'REQUEST_META_BOX_UPDATES',\n\t\t} );\n\n\t\t// Saves the wp_editor fields.\n\t\tif ( window.tinyMCE ) {\n\t\t\twindow.tinyMCE.triggerSave();\n\t\t}\n\n\t\t// Additional data needed for backward compatibility.\n\t\t// If we do not provide this data, the post will be overridden with the default values.\n\t\tconst post = registry.select( editorStore ).getCurrentPost();\n\t\tconst additionalData = [\n\t\t\tpost.comment_status\n\t\t\t\t? [ 'comment_status', post.comment_status ]\n\t\t\t\t: false,\n\t\t\tpost.ping_status ? [ 'ping_status', post.ping_status ] : false,\n\t\t\tpost.sticky ? [ 'sticky', post.sticky ] : false,\n\t\t\tpost.author ? [ 'post_author', post.author ] : false,\n\t\t].filter( Boolean );\n\n\t\t// We gather all the metaboxes locations data and the base form data.\n\t\tconst baseFormData = new window.FormData(\n\t\t\tdocument.querySelector( '.metabox-base-form' )\n\t\t);\n\t\tconst activeMetaBoxLocations = select.getActiveMetaBoxLocations();\n\t\tconst formDataToMerge = [\n\t\t\tbaseFormData,\n\t\t\t...activeMetaBoxLocations.map(\n\t\t\t\t( location ) =>\n\t\t\t\t\tnew window.FormData( getMetaBoxContainer( location ) )\n\t\t\t),\n\t\t];\n\n\t\t// Merge all form data objects into a single one.\n\t\tconst formData = formDataToMerge.reduce( ( memo, currentFormData ) => {\n\t\t\tfor ( const [ key, value ] of currentFormData ) {\n\t\t\t\tmemo.append( key, value );\n\t\t\t}\n\t\t\treturn memo;\n\t\t}, new window.FormData() );\n\t\tadditionalData.forEach( ( [ key, value ] ) =>\n\t\t\tformData.append( key, value )\n\t\t);\n\n\t\ttry {\n\t\t\t// Save the metaboxes.\n\t\t\tawait apiFetch( {\n\t\t\t\turl: window._wpMetaBoxUrl,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tbody: formData,\n\t\t\t\tparse: false,\n\t\t\t} );\n\t\t\tdispatch.metaBoxUpdatesSuccess();\n\t\t} catch {\n\t\t\tdispatch.metaBoxUpdatesFailure();\n\t\t}\n\t};\n\n/**\n * Returns an action object used to signal a successful meta box update.\n *\n * @return {Object} Action object.\n */\nexport function metaBoxUpdatesSuccess() {\n\treturn {\n\t\ttype: 'META_BOX_UPDATES_SUCCESS',\n\t};\n}\n\n/**\n * Returns an action object used to signal a failed meta box update.\n *\n * @return {Object} Action object.\n */\nexport function metaBoxUpdatesFailure() {\n\treturn {\n\t\ttype: 'META_BOX_UPDATES_FAILURE',\n\t};\n}\n\n/**\n * Returns an action object used to toggle the width of the editing canvas.\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport function __experimentalSetPreviewDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_PREVIEW_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @param {boolean|Object} value Whether the inserter should be\n * opened (true) or closed (false).\n * To specify an insertion point,\n * use an object.\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.insertionIndex The index to insert at.\n *\n * @return {Object} Action object.\n */\nexport function setIsInserterOpened( value ) {\n\treturn {\n\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\tvalue,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n * @return {Object} Action object.\n */\nexport function setIsListViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Returns an action object used to switch to template editing.\n *\n * @param {boolean} value Is editing template.\n * @return {Object} Action object.\n */\nexport function setIsEditingTemplate( value ) {\n\treturn {\n\t\ttype: 'SET_IS_EDITING_TEMPLATE',\n\t\tvalue,\n\t};\n}\n\n/**\n * Switches to the template mode.\n *\n * @param {boolean} newTemplate Is new template.\n */\nexport const __unstableSwitchToTemplateMode =\n\t( newTemplate = false ) =>\n\t( { registry, select, dispatch } ) => {\n\t\tdispatch( setIsEditingTemplate( true ) );\n\t\tconst isWelcomeGuideActive = select.isFeatureActive(\n\t\t\t'welcomeGuideTemplate'\n\t\t);\n\t\tif ( ! isWelcomeGuideActive ) {\n\t\t\tconst message = newTemplate\n\t\t\t\t? __( \"Custom template created. You're in template mode now.\" )\n\t\t\t\t: __(\n\t\t\t\t\t\t'Editing template. Changes made here affect all posts and pages that use the template.'\n\t\t\t\t );\n\t\t\tregistry.dispatch( noticesStore ).createSuccessNotice( message, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t}\n\t};\n\n/**\n * Create a block based template.\n *\n * @param {Object?} template Template to create and assign.\n */\nexport const __unstableCreateTemplate =\n\t( template ) =>\n\tasync ( { registry } ) => {\n\t\tconst savedTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', 'wp_template', template );\n\t\tconst post = registry.select( editorStore ).getCurrentPost();\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord( 'postType', post.type, post.id, {\n\t\t\t\ttemplate: savedTemplate.slug,\n\t\t\t} );\n\t};\n\nlet metaBoxesInitialized = false;\n\n/**\n * Initializes WordPress `postboxes` script and the logic for saving meta boxes.\n */\nexport const initializeMetaBoxes =\n\t() =>\n\t( { registry, select, dispatch } ) => {\n\t\tconst isEditorReady = registry\n\t\t\t.select( editorStore )\n\t\t\t.__unstableIsEditorReady();\n\n\t\tif ( ! isEditorReady ) {\n\t\t\treturn;\n\t\t}\n\t\t// Only initialize once.\n\t\tif ( metaBoxesInitialized ) {\n\t\t\treturn;\n\t\t}\n\t\tconst postType = registry.select( editorStore ).getCurrentPostType();\n\t\tif ( window.postboxes.page !== postType ) {\n\t\t\twindow.postboxes.add_postbox_toggles( postType );\n\t\t}\n\n\t\tmetaBoxesInitialized = true;\n\n\t\tlet wasSavingPost = registry.select( editorStore ).isSavingPost();\n\t\tlet wasAutosavingPost = registry\n\t\t\t.select( editorStore )\n\t\t\t.isAutosavingPost();\n\n\t\t// Save metaboxes when performing a full save on the post.\n\t\tregistry.subscribe( async () => {\n\t\t\tconst isSavingPost = registry.select( editorStore ).isSavingPost();\n\t\t\tconst isAutosavingPost = registry\n\t\t\t\t.select( editorStore )\n\t\t\t\t.isAutosavingPost();\n\n\t\t\t// Save metaboxes on save completion, except for autosaves.\n\t\t\tconst shouldTriggerMetaboxesSave =\n\t\t\t\twasSavingPost &&\n\t\t\t\t! wasAutosavingPost &&\n\t\t\t\t! isSavingPost &&\n\t\t\t\tselect.hasMetaBoxes();\n\n\t\t\t// Save current state for next inspection.\n\t\t\twasSavingPost = isSavingPost;\n\t\t\twasAutosavingPost = isAutosavingPost;\n\n\t\t\tif ( shouldTriggerMetaboxesSave ) {\n\t\t\t\tawait dispatch.requestMetaBoxUpdates();\n\t\t\t}\n\t\t} );\n\n\t\tdispatch( {\n\t\t\ttype: 'META_BOXES_INITIALIZED',\n\t\t} );\n\t};\n"]}
@@ -1451,12 +1451,14 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1451
1451
  .edit-post-editor__document-overview-panel-header li:only-child {
1452
1452
  width: 100%;
1453
1453
  }
1454
+ .edit-post-editor__document-overview-panel-header.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon {
1455
+ display: flex;
1456
+ }
1454
1457
 
1455
1458
  .edit-post-editor__list-view-panel-content,
1456
1459
  .edit-post-editor__list-view-container > .document-outline,
1457
1460
  .edit-post-editor__list-view-empty-headings {
1458
- overflow-x: hidden;
1459
- overflow-y: auto;
1461
+ overflow: auto;
1460
1462
  height: 100%;
1461
1463
  padding: 8px 6px;
1462
1464
  }
@@ -2139,11 +2141,19 @@ body.admin-color-sunrise {
2139
2141
  }
2140
2142
  }
2141
2143
 
2144
+ @supports (scrollbar-gutter: stable) {
2145
+ .interface-interface-skeleton__header .edit-post-header {
2146
+ scrollbar-gutter: stable;
2147
+ overflow: hidden;
2148
+ }
2149
+ }
2150
+
2142
2151
  .interface-interface-skeleton__sidebar {
2143
2152
  border-right: none;
2144
2153
  }
2145
2154
  @media (min-width: 782px) {
2146
2155
  .is-sidebar-opened .interface-interface-skeleton__sidebar {
2147
2156
  border-right: 1px solid #e0e0e0;
2157
+ overflow: hidden scroll;
2148
2158
  }
2149
2159
  }
@@ -1451,12 +1451,14 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1451
1451
  .edit-post-editor__document-overview-panel-header li:only-child {
1452
1452
  width: 100%;
1453
1453
  }
1454
+ .edit-post-editor__document-overview-panel-header.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon {
1455
+ display: flex;
1456
+ }
1454
1457
 
1455
1458
  .edit-post-editor__list-view-panel-content,
1456
1459
  .edit-post-editor__list-view-container > .document-outline,
1457
1460
  .edit-post-editor__list-view-empty-headings {
1458
- overflow-x: hidden;
1459
- overflow-y: auto;
1461
+ overflow: auto;
1460
1462
  height: 100%;
1461
1463
  padding: 8px 6px;
1462
1464
  }
@@ -2139,11 +2141,19 @@ body.admin-color-sunrise {
2139
2141
  }
2140
2142
  }
2141
2143
 
2144
+ @supports (scrollbar-gutter: stable) {
2145
+ .interface-interface-skeleton__header .edit-post-header {
2146
+ scrollbar-gutter: stable;
2147
+ overflow: hidden;
2148
+ }
2149
+ }
2150
+
2142
2151
  .interface-interface-skeleton__sidebar {
2143
2152
  border-left: none;
2144
2153
  }
2145
2154
  @media (min-width: 782px) {
2146
2155
  .is-sidebar-opened .interface-interface-skeleton__sidebar {
2147
2156
  border-left: 1px solid #e0e0e0;
2157
+ overflow: hidden scroll;
2148
2158
  }
2149
2159
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "7.6.0",
3
+ "version": "7.8.0",
4
4
  "description": "Edit Post module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,34 +27,34 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/a11y": "^3.29.0",
31
- "@wordpress/api-fetch": "^6.26.0",
32
- "@wordpress/block-editor": "^11.6.0",
33
- "@wordpress/block-library": "^8.6.0",
34
- "@wordpress/blocks": "^12.6.0",
35
- "@wordpress/components": "^23.6.0",
36
- "@wordpress/compose": "^6.6.0",
37
- "@wordpress/core-data": "^6.6.0",
38
- "@wordpress/data": "^8.6.0",
39
- "@wordpress/deprecated": "^3.29.0",
40
- "@wordpress/dom": "^3.29.0",
41
- "@wordpress/editor": "^13.6.0",
42
- "@wordpress/element": "^5.6.0",
43
- "@wordpress/hooks": "^3.29.0",
44
- "@wordpress/i18n": "^4.29.0",
45
- "@wordpress/icons": "^9.20.0",
46
- "@wordpress/interface": "^5.6.0",
47
- "@wordpress/keyboard-shortcuts": "^4.6.0",
48
- "@wordpress/keycodes": "^3.29.0",
49
- "@wordpress/media-utils": "^4.20.0",
50
- "@wordpress/notices": "^3.29.0",
51
- "@wordpress/plugins": "^5.6.0",
52
- "@wordpress/preferences": "^3.6.0",
53
- "@wordpress/private-apis": "^0.11.0",
54
- "@wordpress/url": "^3.30.0",
55
- "@wordpress/viewport": "^5.6.0",
56
- "@wordpress/warning": "^2.29.0",
57
- "@wordpress/widgets": "^3.6.0",
30
+ "@wordpress/a11y": "^3.31.0",
31
+ "@wordpress/api-fetch": "^6.28.0",
32
+ "@wordpress/block-editor": "^11.8.0",
33
+ "@wordpress/block-library": "^8.8.0",
34
+ "@wordpress/blocks": "^12.8.0",
35
+ "@wordpress/components": "^23.8.0",
36
+ "@wordpress/compose": "^6.8.0",
37
+ "@wordpress/core-data": "^6.8.0",
38
+ "@wordpress/data": "^9.1.0",
39
+ "@wordpress/deprecated": "^3.31.0",
40
+ "@wordpress/dom": "^3.31.0",
41
+ "@wordpress/editor": "^13.8.0",
42
+ "@wordpress/element": "^5.8.0",
43
+ "@wordpress/hooks": "^3.31.0",
44
+ "@wordpress/i18n": "^4.31.0",
45
+ "@wordpress/icons": "^9.22.0",
46
+ "@wordpress/interface": "^5.8.0",
47
+ "@wordpress/keyboard-shortcuts": "^4.8.0",
48
+ "@wordpress/keycodes": "^3.31.0",
49
+ "@wordpress/media-utils": "^4.22.0",
50
+ "@wordpress/notices": "^3.31.0",
51
+ "@wordpress/plugins": "^5.8.0",
52
+ "@wordpress/preferences": "^3.8.0",
53
+ "@wordpress/private-apis": "^0.13.0",
54
+ "@wordpress/url": "^3.32.0",
55
+ "@wordpress/viewport": "^5.8.0",
56
+ "@wordpress/warning": "^2.31.0",
57
+ "@wordpress/widgets": "^3.8.0",
58
58
  "classnames": "^2.3.1",
59
59
  "memize": "^1.1.0",
60
60
  "rememo": "^4.0.0"
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "9534a7b3bbf07c1d40b94fdb7a3d091f297bfb06"
69
+ "gitHead": "d61700b9f1c72ba0b030fc815ef1685b4f4031ec"
70
70
  }
@@ -32,7 +32,7 @@ export function PostPublishButtonOrToggle( {
32
32
  * Conditions to show a BUTTON (publish directly) or a TOGGLE (open publish sidebar):
33
33
  *
34
34
  * 1) We want to show a BUTTON when the post status is at the _final stage_
35
- * for a particular role (see https://wordpress.org/support/article/post-status/):
35
+ * for a particular role (see https://wordpress.org/documentation/article/post-status/):
36
36
  *
37
37
  * - is published
38
38
  * - is scheduled to be published
@@ -96,7 +96,6 @@ export default function ListViewSidebar() {
96
96
  return (
97
97
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
98
98
  <div
99
- aria-label={ __( 'Document Overview' ) }
100
99
  className="edit-post-editor__document-overview-panel"
101
100
  onKeyDown={ closeOnEscape }
102
101
  ref={ sidebarRef }
@@ -107,7 +106,7 @@ export default function ListViewSidebar() {
107
106
  >
108
107
  <Button
109
108
  icon={ closeSmall }
110
- label={ __( 'Close Document Overview Sidebar' ) }
109
+ label={ __( 'Close' ) }
111
110
  onClick={ () => setIsListViewOpened( false ) }
112
111
  />
113
112
  <ul>
@@ -51,13 +51,18 @@
51
51
  li:only-child {
52
52
  width: 100%;
53
53
  }
54
+
55
+ &.components-panel__header.edit-post-sidebar__panel-tabs {
56
+ .components-button.has-icon {
57
+ display: flex;
58
+ }
59
+ }
54
60
  }
55
61
 
56
62
  .edit-post-editor__list-view-panel-content,
57
63
  .edit-post-editor__list-view-container > .document-outline,
58
64
  .edit-post-editor__list-view-empty-headings {
59
- overflow-x: hidden;
60
- overflow-y: auto;
65
+ overflow: auto;
61
66
  height: 100%;
62
67
  // The table cells use an extra pixels of space left and right. We compensate for that here.
63
68
  padding: $grid-unit-10 ($grid-unit-10 - $border-width - $border-width);
@@ -67,12 +67,12 @@ function MaybeIframe( { children, contentRef, shouldIframe, styles, style } ) {
67
67
 
68
68
  return (
69
69
  <Iframe
70
- head={ <EditorStyles styles={ styles } /> }
71
70
  ref={ ref }
72
71
  contentRef={ contentRef }
73
72
  style={ { width: '100%', height: '100%', display: 'block' } }
74
73
  name="editor-canvas"
75
74
  >
75
+ <EditorStyles styles={ styles } />
76
76
  { children }
77
77
  </Iframe>
78
78
  );
@@ -160,15 +160,21 @@ export default function VisualEditor( { styles } ) {
160
160
  ( select ) => select( editPostStore ).hasMetaBoxes(),
161
161
  []
162
162
  );
163
- const { themeHasDisabledLayoutStyles, themeSupportsLayout, isFocusMode } =
164
- useSelect( ( select ) => {
165
- const _settings = select( blockEditorStore ).getSettings();
166
- return {
167
- themeHasDisabledLayoutStyles: _settings.disableLayoutStyles,
168
- themeSupportsLayout: _settings.supportsLayout,
169
- isFocusMode: _settings.focusMode,
170
- };
171
- }, [] );
163
+ const {
164
+ hasRootPaddingAwareAlignments,
165
+ isFocusMode,
166
+ themeHasDisabledLayoutStyles,
167
+ themeSupportsLayout,
168
+ } = useSelect( ( select ) => {
169
+ const _settings = select( blockEditorStore ).getSettings();
170
+ return {
171
+ themeHasDisabledLayoutStyles: _settings.disableLayoutStyles,
172
+ themeSupportsLayout: _settings.supportsLayout,
173
+ isFocusMode: _settings.focusMode,
174
+ hasRootPaddingAwareAlignments:
175
+ _settings.__experimentalFeatures?.useRootPaddingAwareAlignments,
176
+ };
177
+ }, [] );
172
178
  const { clearSelectedBlock } = useDispatch( blockEditorStore );
173
179
  const { setIsEditingTemplate } = useDispatch( editPostStore );
174
180
  const desktopCanvasStyles = {
@@ -255,7 +261,7 @@ export default function VisualEditor( { styles } ) {
255
261
  postContentAttributes,
256
262
  ] );
257
263
 
258
- const layout = newestPostContentAttributes?.layout || {};
264
+ const { layout = {}, align = '' } = newestPostContentAttributes || {};
259
265
 
260
266
  const postContentLayoutClasses = useLayoutClasses(
261
267
  newestPostContentAttributes,
@@ -266,7 +272,8 @@ export default function VisualEditor( { styles } ) {
266
272
  {
267
273
  'is-layout-flow': ! themeSupportsLayout,
268
274
  },
269
- themeSupportsLayout && postContentLayoutClasses
275
+ themeSupportsLayout && postContentLayoutClasses,
276
+ align && `align${ align }`
270
277
  );
271
278
 
272
279
  const postContentLayoutStyles = useLayoutStyles(
@@ -321,6 +328,12 @@ export default function VisualEditor( { styles } ) {
321
328
  [ styles ]
322
329
  );
323
330
 
331
+ // Add some styles for alignwide/alignfull Post Content and its children.
332
+ const alignCSS = `.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}
333
+ .is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
334
+ .is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
335
+ .is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`;
336
+
324
337
  return (
325
338
  <BlockTools
326
339
  __unstableContentRef={ ref }
@@ -376,6 +389,9 @@ export default function VisualEditor( { styles } ) {
376
389
  globalLayoutSettings?.definitions
377
390
  }
378
391
  />
392
+ { align && (
393
+ <LayoutStyle css={ alignCSS } />
394
+ ) }
379
395
  { postContentLayoutStyles && (
380
396
  <LayoutStyle
381
397
  layout={ postContentLayout }
@@ -393,8 +409,9 @@ export default function VisualEditor( { styles } ) {
393
409
  'edit-post-visual-editor__post-title-wrapper',
394
410
  {
395
411
  'is-focus-mode': isFocusMode,
396
- },
397
- 'is-layout-flow'
412
+ 'has-global-padding':
413
+ hasRootPaddingAwareAlignments,
414
+ }
398
415
  ) }
399
416
  contentEditable={ false }
400
417
  >
@@ -3,10 +3,7 @@
3
3
  */
4
4
  import { Component } from '@wordpress/element';
5
5
  import { BlockList } from '@wordpress/block-editor';
6
- /**
7
- * External dependencies
8
- */
9
- import { Keyboard } from 'react-native';
6
+
10
7
  /**
11
8
  * Internal dependencies
12
9
  */
@@ -16,36 +13,6 @@ export default class VisualEditor extends Component {
16
13
  constructor( props ) {
17
14
  super( props );
18
15
  this.renderHeader = this.renderHeader.bind( this );
19
- this.keyboardDidShow = this.keyboardDidShow.bind( this );
20
- this.keyboardDidHide = this.keyboardDidHide.bind( this );
21
-
22
- this.state = {
23
- isAutoScrollEnabled: true,
24
- };
25
- }
26
-
27
- componentDidMount() {
28
- this.keyboardDidShow = Keyboard.addListener(
29
- 'keyboardDidShow',
30
- this.keyboardDidShow
31
- );
32
- this.keyboardDidHideListener = Keyboard.addListener(
33
- 'keyboardDidHide',
34
- this.keyboardDidHide
35
- );
36
- }
37
-
38
- componentWillUnmount() {
39
- this.keyboardDidShow.remove();
40
- this.keyboardDidHideListener.remove();
41
- }
42
-
43
- keyboardDidShow() {
44
- this.setState( { isAutoScrollEnabled: false } );
45
- }
46
-
47
- keyboardDidHide() {
48
- this.setState( { isAutoScrollEnabled: true } );
49
16
  }
50
17
 
51
18
  renderHeader() {
@@ -55,13 +22,11 @@ export default class VisualEditor extends Component {
55
22
 
56
23
  render() {
57
24
  const { safeAreaBottomInset } = this.props;
58
- const { isAutoScrollEnabled } = this.state;
59
25
 
60
26
  return (
61
27
  <BlockList
62
28
  header={ this.renderHeader }
63
29
  safeAreaBottomInset={ safeAreaBottomInset }
64
- autoScroll={ isAutoScrollEnabled }
65
30
  />
66
31
  );
67
32
  }
@@ -39,7 +39,7 @@ registerPlugin( 'edit-post', {
39
39
  role="menuitem"
40
40
  icon={ external }
41
41
  href={ __(
42
- 'https://wordpress.org/support/article/wordpress-editor/'
42
+ 'https://wordpress.org/documentation/article/wordpress-block-editor/'
43
43
  ) }
44
44
  target="_blank"
45
45
  rel="noopener noreferrer"
@@ -294,7 +294,7 @@ export const showBlockTypes =
294
294
  ( type ) =>
295
295
  ! (
296
296
  Array.isArray( blockNames ) ? blockNames : [ blockNames ]
297
- ).includes( type )
297
+ ).includes( type )
298
298
  );
299
299
 
300
300
  registry
package/src/style.scss CHANGED
@@ -99,6 +99,15 @@ body.block-editor-page {
99
99
 
100
100
  @include wordpress-admin-schemes();
101
101
 
102
+ .interface-interface-skeleton__header .edit-post-header {
103
+ @supports (scrollbar-gutter: stable) {
104
+ // The scrollbar-gutter property ensures space is reserved for the scrollbar to appear,
105
+ // when scrollbars are set to be always visible. This ensure icons stay visually aligned.
106
+ scrollbar-gutter: stable;
107
+ overflow: hidden;
108
+ }
109
+ }
110
+
102
111
  // The edit-site package adds or removes the sidebar when it's opened or closed.
103
112
  // The edit-post package, however, always has the sidebar in the canvas.
104
113
  // These edit-post specific rules ensures there isn't a border on the right of
@@ -109,6 +118,7 @@ body.block-editor-page {
109
118
  .is-sidebar-opened & {
110
119
  @include break-medium() {
111
120
  border-left: $border-width solid $gray-200;
121
+ overflow: hidden scroll;
112
122
  }
113
123
  }
114
124
  }