@wordpress/edit-post 7.23.0 → 7.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/device-preview/index.js +6 -3
- package/build/components/device-preview/index.js.map +1 -1
- package/build/components/header/writing-menu/index.js +1 -1
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -1
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/sidebar/post-pending-status/index.js +9 -2
- package/build/components/sidebar/post-pending-status/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +1 -3
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/post-sticky/index.js +9 -2
- package/build/components/sidebar/post-sticky/index.js.map +1 -1
- package/build/components/sidebar/post-template/index.js +7 -4
- package/build/components/sidebar/post-template/index.js.map +1 -1
- package/build/components/sidebar/post-visibility/index.js +12 -4
- package/build/components/sidebar/post-visibility/index.js.map +1 -1
- package/build/components/text-editor/index.js +21 -1
- package/build/components/text-editor/index.js.map +1 -1
- package/build/components/view-link/index.js +11 -3
- package/build/components/view-link/index.js.map +1 -1
- package/build/components/visual-editor/index.js +5 -1
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/store/actions.js +1 -1
- package/build/store/actions.js.map +1 -1
- package/build-module/components/device-preview/index.js +6 -3
- package/build-module/components/device-preview/index.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js +1 -1
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +1 -1
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/sidebar/post-pending-status/index.js +10 -3
- package/build-module/components/sidebar/post-pending-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +2 -4
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-sticky/index.js +10 -3
- package/build-module/components/sidebar/post-sticky/index.js.map +1 -1
- package/build-module/components/sidebar/post-template/index.js +9 -6
- package/build-module/components/sidebar/post-template/index.js.map +1 -1
- package/build-module/components/sidebar/post-visibility/index.js +14 -6
- package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
- package/build-module/components/text-editor/index.js +22 -2
- package/build-module/components/text-editor/index.js.map +1 -1
- package/build-module/components/view-link/index.js +11 -3
- package/build-module/components/view-link/index.js.map +1 -1
- package/build-module/components/visual-editor/index.js +5 -1
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/store/actions.js +1 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-style/style-rtl.css +7 -62
- package/build-style/style.css +7 -62
- package/package.json +32 -32
- package/src/components/device-preview/index.js +21 -15
- package/src/components/header/writing-menu/index.js +1 -1
- package/src/components/preferences-modal/index.js +1 -1
- package/src/components/sidebar/post-pending-status/index.js +10 -3
- package/src/components/sidebar/post-status/index.js +5 -5
- package/src/components/sidebar/post-sticky/index.js +10 -3
- package/src/components/sidebar/post-template/index.js +10 -6
- package/src/components/sidebar/post-template/style.scss +0 -15
- package/src/components/sidebar/post-visibility/index.js +12 -5
- package/src/components/sidebar/post-visibility/style.scss +0 -11
- package/src/components/text-editor/index.js +20 -2
- package/src/components/text-editor/style.scss +3 -1
- package/src/components/view-link/index.js +21 -10
- package/src/components/visual-editor/index.js +7 -0
- package/src/store/actions.js +1 -1
- package/src/store/test/actions.js +1 -1
- package/src/style.scss +0 -2
- package/build/components/sidebar/post-author/index.js +0 -22
- package/build/components/sidebar/post-author/index.js.map +0 -1
- package/build/components/sidebar/post-schedule/index.js +0 -67
- package/build/components/sidebar/post-schedule/index.js.map +0 -1
- package/build-module/components/sidebar/post-author/index.js +0 -13
- package/build-module/components/sidebar/post-author/index.js.map +0 -1
- package/build-module/components/sidebar/post-schedule/index.js +0 -60
- package/build-module/components/sidebar/post-schedule/index.js.map +0 -1
- package/src/components/sidebar/post-author/index.js +0 -20
- package/src/components/sidebar/post-author/style.scss +0 -5
- package/src/components/sidebar/post-schedule/index.js +0 -67
- package/src/components/sidebar/post-schedule/style.scss +0 -36
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","apiFetch","store","interfaceStore","preferencesStore","speak","noticesStore","coreStore","blockEditorStore","editorStore","deprecated","addFilter","getMetaBoxContainer","editPostStore","openGeneralSidebar","name","dispatch","registry","isDistractionFree","select","get","toggleDistractionFree","enableComplementaryArea","closeGeneralSidebar","disableComplementaryArea","openModal","since","alternative","closeModal","openPublishSidebar","type","closePublishSidebar","togglePublishSidebar","toggleEditorPanelEnabled","panelName","_registry$select$get","inactivePanels","isPanelInactive","includes","updatedInactivePanels","filter","invactivePanelName","set","toggleEditorPanelOpened","_registry$select$get2","openPanels","isPanelOpen","updatedOpenPanels","openPanelName","removeEditorPanel","toggleFeature","feature","toggle","switchEditorMode","mode","clearSelectedBlock","message","togglePinnedPluginItem","pluginName","isPinned","isItemPinned","updatePreferredStyleVariations","blockName","blockStyle","_registry$select$get3","existingVariations","updatedVariations","showBlockTypes","blockNames","_registry$select$get4","existingBlockNames","newBlockNames","Array","isArray","hideBlockTypes","_registry$select$get5","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","previous","options","then","isAutosave","hasMetaBoxes","batch","createInfoNotice"],"sources":["@wordpress/edit-post/src/store/actions.js"],"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';\nimport deprecated from '@wordpress/deprecated';\nimport { addFilter } from '@wordpress/hooks';\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( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-post', 'distractionFree' );\n\t\tif ( isDistractionFree ) {\n\t\t\tdispatch.toggleDistractionFree();\n\t\t}\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( editPostStore.name, name );\n\t};\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 * @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.\n *\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport const openModal =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"select( 'core/edit-post' ).openModal( name )\", {\n\t\t\tsince: '6.3',\n\t\t\talternative: \"select( 'core/interface').openModal( name )\",\n\t\t} );\n\t\treturn registry.dispatch( interfaceStore ).openModal( name );\n\t};\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.\n *\n * @return {Object} Action object.\n */\nexport const closeModal =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"select( 'core/edit-post' ).closeModal()\", {\n\t\t\tsince: '6.3',\n\t\t\talternative: \"select( 'core/interface').closeModal()\",\n\t\t} );\n\t\treturn registry.dispatch( interfaceStore ).closeModal();\n\t};\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( { dispatch, 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\tif (\n\t\t\tmode === 'text' &&\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'distractionFree' )\n\t\t) {\n\t\t\tdispatch.toggleDistractionFree();\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 const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-post', 'distractionFree' );\n\t\tif ( isDistractionFree && isOpen ) {\n\t\t\tdispatch.toggleDistractionFree();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\t\tisOpen,\n\t\t} );\n\t};\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\t// Save metaboxes on save completion, except for autosaves.\n\t\taddFilter(\n\t\t\t'editor.__unstableSavePost',\n\t\t\t'core/edit-post/save-metaboxes',\n\t\t\t( previous, options ) =>\n\t\t\t\tprevious.then( () => {\n\t\t\t\t\tif ( options.isAutosave ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! select.hasMetaBoxes() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn dispatch.requestMetaBoxUpdates();\n\t\t\t\t} )\n\t\t);\n\n\t\tdispatch( {\n\t\t\ttype: 'META_BOXES_INITIALIZED',\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-post', 'distractionFree' );\n\t\tif ( ! isDistractionFree ) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t.set( 'core/edit-post', 'fixedToolbar', false );\n\t\t\t\tdispatch.setIsInserterOpened( false );\n\t\t\t\tdispatch.setIsListViewOpened( false );\n\t\t\t\tdispatch.closeGeneralSidebar();\n\t\t\t} );\n\t\t}\n\t\tregistry.batch( () => {\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'distractionFree',\n\t\t\t\t\t! isDistractionFree\n\t\t\t\t);\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createInfoNotice(\n\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t? __( 'Distraction free off.' )\n\t\t\t\t\t\t: __( 'Distraction free on.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/edit-post/distraction-free-mode/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t} );\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,KAAK,IAAIC,cAAc,QAAQ,sBAAsB;AAC9D,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASH,KAAK,IAAII,YAAY,QAAQ,oBAAoB;AAC1D,SAASJ,KAAK,IAAIK,SAAS,QAAQ,sBAAsB;AACzD,SAASL,KAAK,IAAIM,gBAAgB,QAAQ,yBAAyB;AACnE,SAASN,KAAK,IAAIO,WAAW,QAAQ,mBAAmB;AACxD,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,SAAS,QAAQ,kBAAkB;;AAE5C;AACA;AACA;AACA,SAASC,mBAAmB,QAAQ,qBAAqB;AACzD,SAASV,KAAK,IAAIW,aAAa,QAAQ,GAAG;;AAE1C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAC5BC,IAAI,IACN,CAAE;EAAEC,QAAQ;EAAEC;AAAS,CAAC,KAAM;EAC7B,MAAMC,iBAAiB,GAAGD,QAAQ,CAChCE,MAAM,CAAEf,gBAAiB,CAAC,CAC1BgB,GAAG,CAA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,QAAQ,CAAEV,YAAa,CAAC,CACxB+I,gBAAgB,CAChBnI,iBAAiB,GACdlB,EAAE,CAAE,uBAAwB,CAAC,GAC7BA,EAAE,CAAE,sBAAuB,CAAC,EAC/B;MACCoI,EAAE,EAAE,6CAA6C;MACjDtG,IAAI,EAAE;IACP,CACD,CAAC;EACH,CAAE,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"names":["__","apiFetch","store","interfaceStore","preferencesStore","speak","noticesStore","coreStore","blockEditorStore","editorStore","deprecated","addFilter","getMetaBoxContainer","editPostStore","openGeneralSidebar","name","dispatch","registry","isDistractionFree","select","get","toggleDistractionFree","enableComplementaryArea","closeGeneralSidebar","disableComplementaryArea","openModal","since","alternative","closeModal","openPublishSidebar","type","closePublishSidebar","togglePublishSidebar","toggleEditorPanelEnabled","panelName","_registry$select$get","inactivePanels","isPanelInactive","includes","updatedInactivePanels","filter","invactivePanelName","set","toggleEditorPanelOpened","_registry$select$get2","openPanels","isPanelOpen","updatedOpenPanels","openPanelName","removeEditorPanel","toggleFeature","feature","toggle","switchEditorMode","mode","clearSelectedBlock","message","togglePinnedPluginItem","pluginName","isPinned","isItemPinned","updatePreferredStyleVariations","blockName","blockStyle","_registry$select$get3","existingVariations","updatedVariations","showBlockTypes","blockNames","_registry$select$get4","existingBlockNames","newBlockNames","Array","isArray","hideBlockTypes","_registry$select$get5","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","previous","options","then","isAutosave","hasMetaBoxes","batch","createInfoNotice"],"sources":["@wordpress/edit-post/src/store/actions.js"],"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';\nimport deprecated from '@wordpress/deprecated';\nimport { addFilter } from '@wordpress/hooks';\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( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-post', 'distractionFree' );\n\t\tif ( isDistractionFree ) {\n\t\t\tdispatch.toggleDistractionFree();\n\t\t}\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( editPostStore.name, name );\n\t};\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 * @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.\n *\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport const openModal =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"select( 'core/edit-post' ).openModal( name )\", {\n\t\t\tsince: '6.3',\n\t\t\talternative: \"select( 'core/interface').openModal( name )\",\n\t\t} );\n\t\treturn registry.dispatch( interfaceStore ).openModal( name );\n\t};\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.\n *\n * @return {Object} Action object.\n */\nexport const closeModal =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"select( 'core/edit-post' ).closeModal()\", {\n\t\t\tsince: '6.3',\n\t\t\talternative: \"select( 'core/interface').closeModal()\",\n\t\t} );\n\t\treturn registry.dispatch( interfaceStore ).closeModal();\n\t};\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( { dispatch, 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\tif (\n\t\t\tmode === 'text' &&\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-post', 'distractionFree' )\n\t\t) {\n\t\t\tdispatch.toggleDistractionFree();\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 const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-post', 'distractionFree' );\n\t\tif ( isDistractionFree && isOpen ) {\n\t\t\tdispatch.toggleDistractionFree();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\t\tisOpen,\n\t\t} );\n\t};\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\t// Save metaboxes on save completion, except for autosaves.\n\t\taddFilter(\n\t\t\t'editor.__unstableSavePost',\n\t\t\t'core/edit-post/save-metaboxes',\n\t\t\t( previous, options ) =>\n\t\t\t\tprevious.then( () => {\n\t\t\t\t\tif ( options.isAutosave ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! select.hasMetaBoxes() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn dispatch.requestMetaBoxUpdates();\n\t\t\t\t} )\n\t\t);\n\n\t\tdispatch( {\n\t\t\ttype: 'META_BOXES_INITIALIZED',\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-post', 'distractionFree' );\n\t\tif ( ! isDistractionFree ) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t.set( 'core/edit-post', 'fixedToolbar', true );\n\t\t\t\tdispatch.setIsInserterOpened( false );\n\t\t\t\tdispatch.setIsListViewOpened( false );\n\t\t\t\tdispatch.closeGeneralSidebar();\n\t\t\t} );\n\t\t}\n\t\tregistry.batch( () => {\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'distractionFree',\n\t\t\t\t\t! isDistractionFree\n\t\t\t\t);\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createInfoNotice(\n\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t? __( 'Distraction free off.' )\n\t\t\t\t\t\t: __( 'Distraction free on.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/edit-post/distraction-free-mode/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t} );\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,KAAK,IAAIC,cAAc,QAAQ,sBAAsB;AAC9D,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASH,KAAK,IAAII,YAAY,QAAQ,oBAAoB;AAC1D,SAASJ,KAAK,IAAIK,SAAS,QAAQ,sBAAsB;AACzD,SAASL,KAAK,IAAIM,gBAAgB,QAAQ,yBAAyB;AACnE,SAASN,KAAK,IAAIO,WAAW,QAAQ,mBAAmB;AACxD,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,SAAS,QAAQ,kBAAkB;;AAE5C;AACA;AACA;AACA,SAASC,mBAAmB,QAAQ,qBAAqB;AACzD,SAASV,KAAK,IAAIW,aAAa,QAAQ,GAAG;;AAE1C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,G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I,KAAK,CAAE,MAAM;IACrBnI,QAAQ,CACND,QAAQ,CAAEZ,gBAAiB,CAAC,CAC5BsC,GAAG,CACH,gBAAgB,EAChB,iBAAiB,EACjB,CAAExB,iBACH,CAAC;IACFD,QAAQ,CACND,QAAQ,CAAEV,YAAa,CAAC,CACxB+I,gBAAgB,CAChBnI,iBAAiB,GACdlB,EAAE,CAAE,uBAAwB,CAAC,GAC7BA,EAAE,CAAE,sBAAuB,CAAC,EAC/B;MACCoI,EAAE,EAAE,6CAA6C;MACjDtG,IAAI,EAAE;IACP,CACD,CAAC;EACH,CAAE,CAAC;AACJ,CAAC"}
|
|
@@ -1592,67 +1592,18 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1592
1592
|
padding: 16px;
|
|
1593
1593
|
}
|
|
1594
1594
|
|
|
1595
|
-
.edit-post-post-author {
|
|
1596
|
-
display: flex;
|
|
1597
|
-
flex-direction: column;
|
|
1598
|
-
align-items: stretch;
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
1595
|
.edit-post-post-format {
|
|
1602
1596
|
display: flex;
|
|
1603
1597
|
flex-direction: column;
|
|
1604
1598
|
align-items: stretch;
|
|
1605
1599
|
}
|
|
1606
1600
|
|
|
1607
|
-
.edit-post-post-schedule {
|
|
1608
|
-
width: 100%;
|
|
1609
|
-
position: relative;
|
|
1610
|
-
justify-content: flex-start;
|
|
1611
|
-
align-items: flex-start;
|
|
1612
|
-
}
|
|
1613
|
-
.edit-post-post-schedule span {
|
|
1614
|
-
display: block;
|
|
1615
|
-
width: 30%;
|
|
1616
|
-
margin-left: 8px;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
.edit-post-post-schedule__dropdown {
|
|
1620
|
-
width: 70%;
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
.components-button.edit-post-post-schedule__toggle {
|
|
1624
|
-
text-align: right;
|
|
1625
|
-
white-space: normal;
|
|
1626
|
-
height: auto;
|
|
1627
|
-
}
|
|
1628
|
-
.components-button.edit-post-post-schedule__toggle span {
|
|
1629
|
-
width: 0;
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
.edit-post-post-schedule__dialog .block-editor-publish-date-time-picker {
|
|
1633
|
-
margin: 8px;
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
1601
|
.edit-post-post-slug {
|
|
1637
1602
|
display: flex;
|
|
1638
1603
|
flex-direction: column;
|
|
1639
1604
|
align-items: stretch;
|
|
1640
1605
|
}
|
|
1641
1606
|
|
|
1642
|
-
.edit-post-post-template {
|
|
1643
|
-
width: 100%;
|
|
1644
|
-
justify-content: flex-start;
|
|
1645
|
-
}
|
|
1646
|
-
.edit-post-post-template span {
|
|
1647
|
-
display: block;
|
|
1648
|
-
width: 30%;
|
|
1649
|
-
margin-left: 8px;
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
.edit-post-post-template__dropdown {
|
|
1653
|
-
max-width: 55%;
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
1607
|
.components-button.edit-post-post-template__toggle {
|
|
1657
1608
|
display: inline-block;
|
|
1658
1609
|
width: 100%;
|
|
@@ -1675,16 +1626,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1675
1626
|
}
|
|
1676
1627
|
}
|
|
1677
1628
|
|
|
1678
|
-
.edit-post-post-visibility {
|
|
1679
|
-
width: 100%;
|
|
1680
|
-
justify-content: flex-start;
|
|
1681
|
-
}
|
|
1682
|
-
.edit-post-post-visibility span {
|
|
1683
|
-
display: block;
|
|
1684
|
-
width: 30%;
|
|
1685
|
-
margin-left: 8px;
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
1629
|
.edit-post-post-visibility__dialog .editor-post-visibility {
|
|
1689
1630
|
min-width: 248px;
|
|
1690
1631
|
margin: 8px;
|
|
@@ -1765,21 +1706,25 @@ h2.edit-post-template-summary__title {
|
|
|
1765
1706
|
background-color: #fff;
|
|
1766
1707
|
flex-grow: 1;
|
|
1767
1708
|
}
|
|
1768
|
-
.edit-post-text-editor .editor-post-title
|
|
1709
|
+
.edit-post-text-editor .editor-post-title:not(.is-raw-text),
|
|
1710
|
+
.edit-post-text-editor .editor-post-title.is-raw-text textarea {
|
|
1769
1711
|
max-width: none;
|
|
1770
1712
|
line-height: 1.4;
|
|
1771
1713
|
font-family: Menlo, Consolas, monaco, monospace;
|
|
1772
1714
|
font-size: 2.5em;
|
|
1773
1715
|
font-weight: normal;
|
|
1774
1716
|
border: 1px solid #949494;
|
|
1717
|
+
border-radius: 0;
|
|
1775
1718
|
padding: 16px;
|
|
1776
1719
|
}
|
|
1777
1720
|
@media (min-width: 600px) {
|
|
1778
|
-
.edit-post-text-editor .editor-post-title
|
|
1721
|
+
.edit-post-text-editor .editor-post-title:not(.is-raw-text),
|
|
1722
|
+
.edit-post-text-editor .editor-post-title.is-raw-text textarea {
|
|
1779
1723
|
padding: 24px;
|
|
1780
1724
|
}
|
|
1781
1725
|
}
|
|
1782
|
-
.edit-post-text-editor .editor-post-title:focus
|
|
1726
|
+
.edit-post-text-editor .editor-post-title:not(.is-raw-text):focus,
|
|
1727
|
+
.edit-post-text-editor .editor-post-title.is-raw-text textarea:focus {
|
|
1783
1728
|
border-color: var(--wp-admin-theme-color);
|
|
1784
1729
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1785
1730
|
}
|
package/build-style/style.css
CHANGED
|
@@ -1592,67 +1592,18 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1592
1592
|
padding: 16px;
|
|
1593
1593
|
}
|
|
1594
1594
|
|
|
1595
|
-
.edit-post-post-author {
|
|
1596
|
-
display: flex;
|
|
1597
|
-
flex-direction: column;
|
|
1598
|
-
align-items: stretch;
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
1595
|
.edit-post-post-format {
|
|
1602
1596
|
display: flex;
|
|
1603
1597
|
flex-direction: column;
|
|
1604
1598
|
align-items: stretch;
|
|
1605
1599
|
}
|
|
1606
1600
|
|
|
1607
|
-
.edit-post-post-schedule {
|
|
1608
|
-
width: 100%;
|
|
1609
|
-
position: relative;
|
|
1610
|
-
justify-content: flex-start;
|
|
1611
|
-
align-items: flex-start;
|
|
1612
|
-
}
|
|
1613
|
-
.edit-post-post-schedule span {
|
|
1614
|
-
display: block;
|
|
1615
|
-
width: 30%;
|
|
1616
|
-
margin-right: 8px;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
.edit-post-post-schedule__dropdown {
|
|
1620
|
-
width: 70%;
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
.components-button.edit-post-post-schedule__toggle {
|
|
1624
|
-
text-align: left;
|
|
1625
|
-
white-space: normal;
|
|
1626
|
-
height: auto;
|
|
1627
|
-
}
|
|
1628
|
-
.components-button.edit-post-post-schedule__toggle span {
|
|
1629
|
-
width: 0;
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
.edit-post-post-schedule__dialog .block-editor-publish-date-time-picker {
|
|
1633
|
-
margin: 8px;
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
1601
|
.edit-post-post-slug {
|
|
1637
1602
|
display: flex;
|
|
1638
1603
|
flex-direction: column;
|
|
1639
1604
|
align-items: stretch;
|
|
1640
1605
|
}
|
|
1641
1606
|
|
|
1642
|
-
.edit-post-post-template {
|
|
1643
|
-
width: 100%;
|
|
1644
|
-
justify-content: flex-start;
|
|
1645
|
-
}
|
|
1646
|
-
.edit-post-post-template span {
|
|
1647
|
-
display: block;
|
|
1648
|
-
width: 30%;
|
|
1649
|
-
margin-right: 8px;
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
.edit-post-post-template__dropdown {
|
|
1653
|
-
max-width: 55%;
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
1607
|
.components-button.edit-post-post-template__toggle {
|
|
1657
1608
|
display: inline-block;
|
|
1658
1609
|
width: 100%;
|
|
@@ -1675,16 +1626,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1675
1626
|
}
|
|
1676
1627
|
}
|
|
1677
1628
|
|
|
1678
|
-
.edit-post-post-visibility {
|
|
1679
|
-
width: 100%;
|
|
1680
|
-
justify-content: flex-start;
|
|
1681
|
-
}
|
|
1682
|
-
.edit-post-post-visibility span {
|
|
1683
|
-
display: block;
|
|
1684
|
-
width: 30%;
|
|
1685
|
-
margin-right: 8px;
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
1629
|
.edit-post-post-visibility__dialog .editor-post-visibility {
|
|
1689
1630
|
min-width: 248px;
|
|
1690
1631
|
margin: 8px;
|
|
@@ -1765,21 +1706,25 @@ h2.edit-post-template-summary__title {
|
|
|
1765
1706
|
background-color: #fff;
|
|
1766
1707
|
flex-grow: 1;
|
|
1767
1708
|
}
|
|
1768
|
-
.edit-post-text-editor .editor-post-title
|
|
1709
|
+
.edit-post-text-editor .editor-post-title:not(.is-raw-text),
|
|
1710
|
+
.edit-post-text-editor .editor-post-title.is-raw-text textarea {
|
|
1769
1711
|
max-width: none;
|
|
1770
1712
|
line-height: 1.4;
|
|
1771
1713
|
font-family: Menlo, Consolas, monaco, monospace;
|
|
1772
1714
|
font-size: 2.5em;
|
|
1773
1715
|
font-weight: normal;
|
|
1774
1716
|
border: 1px solid #949494;
|
|
1717
|
+
border-radius: 0;
|
|
1775
1718
|
padding: 16px;
|
|
1776
1719
|
}
|
|
1777
1720
|
@media (min-width: 600px) {
|
|
1778
|
-
.edit-post-text-editor .editor-post-title
|
|
1721
|
+
.edit-post-text-editor .editor-post-title:not(.is-raw-text),
|
|
1722
|
+
.edit-post-text-editor .editor-post-title.is-raw-text textarea {
|
|
1779
1723
|
padding: 24px;
|
|
1780
1724
|
}
|
|
1781
1725
|
}
|
|
1782
|
-
.edit-post-text-editor .editor-post-title:focus
|
|
1726
|
+
.edit-post-text-editor .editor-post-title:not(.is-raw-text):focus,
|
|
1727
|
+
.edit-post-text-editor .editor-post-title.is-raw-text textarea:focus {
|
|
1783
1728
|
border-color: var(--wp-admin-theme-color);
|
|
1784
1729
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1785
1730
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.24.1",
|
|
4
4
|
"description": "Edit Post module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,36 +27,36 @@
|
|
|
27
27
|
"react-native": "src/index",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
|
-
"@wordpress/a11y": "^3.
|
|
31
|
-
"@wordpress/api-fetch": "^6.
|
|
32
|
-
"@wordpress/block-editor": "^12.
|
|
33
|
-
"@wordpress/block-library": "^8.
|
|
34
|
-
"@wordpress/blocks": "^12.
|
|
35
|
-
"@wordpress/commands": "^0.
|
|
36
|
-
"@wordpress/components": "^25.
|
|
37
|
-
"@wordpress/compose": "^6.
|
|
38
|
-
"@wordpress/core-commands": "^0.
|
|
39
|
-
"@wordpress/core-data": "^6.
|
|
40
|
-
"@wordpress/data": "^9.
|
|
41
|
-
"@wordpress/deprecated": "^3.
|
|
42
|
-
"@wordpress/dom": "^3.
|
|
43
|
-
"@wordpress/editor": "^13.
|
|
44
|
-
"@wordpress/element": "^5.
|
|
45
|
-
"@wordpress/hooks": "^3.
|
|
46
|
-
"@wordpress/i18n": "^4.
|
|
47
|
-
"@wordpress/icons": "^9.
|
|
48
|
-
"@wordpress/interface": "^5.
|
|
49
|
-
"@wordpress/keyboard-shortcuts": "^4.
|
|
50
|
-
"@wordpress/keycodes": "^3.
|
|
51
|
-
"@wordpress/media-utils": "^4.
|
|
52
|
-
"@wordpress/notices": "^4.
|
|
53
|
-
"@wordpress/plugins": "^6.
|
|
54
|
-
"@wordpress/preferences": "^3.
|
|
55
|
-
"@wordpress/private-apis": "^0.
|
|
56
|
-
"@wordpress/url": "^3.
|
|
57
|
-
"@wordpress/viewport": "^5.
|
|
58
|
-
"@wordpress/warning": "^2.
|
|
59
|
-
"@wordpress/widgets": "^3.
|
|
30
|
+
"@wordpress/a11y": "^3.47.0",
|
|
31
|
+
"@wordpress/api-fetch": "^6.44.0",
|
|
32
|
+
"@wordpress/block-editor": "^12.15.0",
|
|
33
|
+
"@wordpress/block-library": "^8.24.1",
|
|
34
|
+
"@wordpress/blocks": "^12.24.0",
|
|
35
|
+
"@wordpress/commands": "^0.18.0",
|
|
36
|
+
"@wordpress/components": "^25.13.0",
|
|
37
|
+
"@wordpress/compose": "^6.24.0",
|
|
38
|
+
"@wordpress/core-commands": "^0.16.0",
|
|
39
|
+
"@wordpress/core-data": "^6.24.0",
|
|
40
|
+
"@wordpress/data": "^9.17.0",
|
|
41
|
+
"@wordpress/deprecated": "^3.47.0",
|
|
42
|
+
"@wordpress/dom": "^3.47.0",
|
|
43
|
+
"@wordpress/editor": "^13.24.1",
|
|
44
|
+
"@wordpress/element": "^5.24.0",
|
|
45
|
+
"@wordpress/hooks": "^3.47.0",
|
|
46
|
+
"@wordpress/i18n": "^4.47.0",
|
|
47
|
+
"@wordpress/icons": "^9.38.0",
|
|
48
|
+
"@wordpress/interface": "^5.24.0",
|
|
49
|
+
"@wordpress/keyboard-shortcuts": "^4.24.0",
|
|
50
|
+
"@wordpress/keycodes": "^3.47.0",
|
|
51
|
+
"@wordpress/media-utils": "^4.38.0",
|
|
52
|
+
"@wordpress/notices": "^4.15.0",
|
|
53
|
+
"@wordpress/plugins": "^6.15.0",
|
|
54
|
+
"@wordpress/preferences": "^3.24.0",
|
|
55
|
+
"@wordpress/private-apis": "^0.29.0",
|
|
56
|
+
"@wordpress/url": "^3.48.0",
|
|
57
|
+
"@wordpress/viewport": "^5.24.0",
|
|
58
|
+
"@wordpress/warning": "^2.47.0",
|
|
59
|
+
"@wordpress/widgets": "^3.24.0",
|
|
60
60
|
"classnames": "^2.3.1",
|
|
61
61
|
"memize": "^2.1.0",
|
|
62
62
|
"rememo": "^4.0.2"
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "12b897d7feff1cb00ddbf9016b62c1177d9c0081"
|
|
72
72
|
}
|
|
@@ -15,22 +15,27 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
15
15
|
import { store as editPostStore } from '../../store';
|
|
16
16
|
|
|
17
17
|
export default function DevicePreview() {
|
|
18
|
-
const {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
const {
|
|
19
|
+
hasActiveMetaboxes,
|
|
20
|
+
isPostSaveable,
|
|
21
|
+
isViewable,
|
|
22
|
+
deviceType,
|
|
23
|
+
showIconLabels,
|
|
24
|
+
} = useSelect( ( select ) => {
|
|
25
|
+
const { getEditedPostAttribute } = select( editorStore );
|
|
26
|
+
const { getPostType } = select( coreStore );
|
|
27
|
+
const postType = getPostType( getEditedPostAttribute( 'type' ) );
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
return {
|
|
30
|
+
hasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),
|
|
31
|
+
isPostSaveable: select( editorStore ).isEditedPostSaveable(),
|
|
32
|
+
isViewable: postType?.viewable ?? false,
|
|
33
|
+
deviceType:
|
|
34
|
+
select( editPostStore ).__experimentalGetPreviewDeviceType(),
|
|
35
|
+
showIconLabels:
|
|
36
|
+
select( editPostStore ).isFeatureActive( 'showIconLabels' ),
|
|
37
|
+
};
|
|
38
|
+
}, [] );
|
|
34
39
|
const { __experimentalSetPreviewDeviceType: setPreviewDeviceType } =
|
|
35
40
|
useDispatch( editPostStore );
|
|
36
41
|
|
|
@@ -41,6 +46,7 @@ export default function DevicePreview() {
|
|
|
41
46
|
deviceType={ deviceType }
|
|
42
47
|
setDeviceType={ setPreviewDeviceType }
|
|
43
48
|
label={ __( 'Preview' ) }
|
|
49
|
+
showIconLabels={ showIconLabels }
|
|
44
50
|
>
|
|
45
51
|
{ ( { onClose } ) =>
|
|
46
52
|
isViewable && (
|
|
@@ -31,7 +31,7 @@ function WritingMenu() {
|
|
|
31
31
|
|
|
32
32
|
const toggleDistractionFree = () => {
|
|
33
33
|
registry.batch( () => {
|
|
34
|
-
setPreference( 'core/edit-post', 'fixedToolbar',
|
|
34
|
+
setPreference( 'core/edit-post', 'fixedToolbar', true );
|
|
35
35
|
setIsInserterOpened( false );
|
|
36
36
|
setIsListViewOpened( false );
|
|
37
37
|
closeGeneralSidebar();
|
|
@@ -70,7 +70,7 @@ export default function EditPostPreferencesModal() {
|
|
|
70
70
|
const { set: setPreference } = useDispatch( preferencesStore );
|
|
71
71
|
|
|
72
72
|
const toggleDistractionFree = () => {
|
|
73
|
-
setPreference( 'core/edit-post', 'fixedToolbar',
|
|
73
|
+
setPreference( 'core/edit-post', 'fixedToolbar', true );
|
|
74
74
|
setIsInserterOpened( false );
|
|
75
75
|
setIsListViewOpened( false );
|
|
76
76
|
closeGeneralSidebar();
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { PanelRow } from '@wordpress/components';
|
|
5
4
|
import {
|
|
6
5
|
PostPendingStatus as PostPendingStatusForm,
|
|
7
6
|
PostPendingStatusCheck,
|
|
7
|
+
privateApis as editorPrivateApis,
|
|
8
8
|
} from '@wordpress/editor';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Internal dependencies
|
|
12
|
+
*/
|
|
13
|
+
import { unlock } from '../../../lock-unlock';
|
|
14
|
+
|
|
15
|
+
const { PostPanelRow } = unlock( editorPrivateApis );
|
|
16
|
+
|
|
10
17
|
export function PostPendingStatus() {
|
|
11
18
|
return (
|
|
12
19
|
<PostPendingStatusCheck>
|
|
13
|
-
<
|
|
20
|
+
<PostPanelRow>
|
|
14
21
|
<PostPendingStatusForm />
|
|
15
|
-
</
|
|
22
|
+
</PostPanelRow>
|
|
16
23
|
</PostPendingStatusCheck>
|
|
17
24
|
);
|
|
18
25
|
}
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
} from '@wordpress/components';
|
|
9
9
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
10
10
|
import {
|
|
11
|
+
PostAuthorPanel,
|
|
12
|
+
PostSchedulePanel,
|
|
11
13
|
PostSwitchToDraftButton,
|
|
12
14
|
PostSyncStatus,
|
|
13
15
|
PostURLPanel,
|
|
@@ -18,9 +20,7 @@ import {
|
|
|
18
20
|
*/
|
|
19
21
|
import PostVisibility from '../post-visibility';
|
|
20
22
|
import PostTrash from '../post-trash';
|
|
21
|
-
import PostSchedule from '../post-schedule';
|
|
22
23
|
import PostSticky from '../post-sticky';
|
|
23
|
-
import PostAuthor from '../post-author';
|
|
24
24
|
import PostSlug from '../post-slug';
|
|
25
25
|
import PostFormat from '../post-format';
|
|
26
26
|
import PostPendingStatus from '../post-pending-status';
|
|
@@ -61,15 +61,15 @@ export default function PostStatus() {
|
|
|
61
61
|
{ ( fills ) => (
|
|
62
62
|
<>
|
|
63
63
|
<PostVisibility />
|
|
64
|
-
<
|
|
64
|
+
<PostSchedulePanel />
|
|
65
65
|
<PostTemplate />
|
|
66
66
|
<PostURLPanel />
|
|
67
|
+
<PostSyncStatus />
|
|
67
68
|
<PostSticky />
|
|
68
69
|
<PostPendingStatus />
|
|
69
70
|
<PostFormat />
|
|
70
71
|
<PostSlug />
|
|
71
|
-
<
|
|
72
|
-
<PostSyncStatus />
|
|
72
|
+
<PostAuthorPanel />
|
|
73
73
|
{ fills }
|
|
74
74
|
<HStack
|
|
75
75
|
style={ {
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { PanelRow } from '@wordpress/components';
|
|
5
4
|
import {
|
|
6
5
|
PostSticky as PostStickyForm,
|
|
7
6
|
PostStickyCheck,
|
|
7
|
+
privateApis as editorPrivateApis,
|
|
8
8
|
} from '@wordpress/editor';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Internal dependencies
|
|
12
|
+
*/
|
|
13
|
+
import { unlock } from '../../../lock-unlock';
|
|
14
|
+
|
|
15
|
+
const { PostPanelRow } = unlock( editorPrivateApis );
|
|
16
|
+
|
|
10
17
|
export function PostSticky() {
|
|
11
18
|
return (
|
|
12
19
|
<PostStickyCheck>
|
|
13
|
-
<
|
|
20
|
+
<PostPanelRow>
|
|
14
21
|
<PostStickyForm />
|
|
15
|
-
</
|
|
22
|
+
</PostPanelRow>
|
|
16
23
|
</PostStickyCheck>
|
|
17
24
|
);
|
|
18
25
|
}
|