@wordpress/edit-post 7.31.0 → 7.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +9 -323
- package/build/components/browser-url/index.js.map +1 -1
- package/build/components/editor-initialization/index.js +0 -1
- package/build/components/editor-initialization/index.js.map +1 -1
- package/build/components/editor-initialization/listener-hooks.js +1 -38
- package/build/components/editor-initialization/listener-hooks.js.map +1 -1
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/index.js +5 -5
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/index.native.js +1 -1
- package/build/components/header/index.native.js.map +1 -1
- package/build/components/header/main-dashboard-button/index.js.map +1 -1
- package/build/components/header/more-menu/index.js +7 -6
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/post-publish-button-or-toggle.js +11 -13
- package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
- package/build/components/header/preferences-menu-item/index.js +12 -4
- package/build/components/header/preferences-menu-item/index.js.map +1 -1
- package/build/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/init-pattern-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +1 -36
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/actions-panel.js +4 -7
- package/build/components/layout/actions-panel.js.map +1 -1
- package/build/components/layout/index.js +16 -21
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/meta-boxes/index.js.map +1 -1
- package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build/components/preferences-modal/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -21
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/components/sidebar/plugin-post-publish-panel/index.js +16 -64
- package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-pre-publish-panel/index.js +16 -63
- package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/sidebar/post-format/index.js.map +1 -1
- package/build/components/sidebar/post-pending-status/index.js.map +1 -1
- package/build/components/sidebar/post-slug/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +9 -9
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/post-sticky/index.js.map +1 -1
- package/build/components/sidebar/post-trash/index.js.map +1 -1
- package/build/components/sidebar/post-visibility/index.js.map +1 -1
- package/build/components/sidebar/settings-header/index.js.map +1 -1
- package/build/components/sidebar/settings-sidebar/index.js +42 -40
- package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build/components/text-editor/index.js.map +1 -1
- package/build/components/visual-editor/block-inspector-button.js +1 -1
- package/build/components/visual-editor/block-inspector-button.js.map +1 -1
- package/build/components/visual-editor/header.native.js.map +1 -1
- package/build/components/visual-editor/index.js +4 -1
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/components/visual-editor/index.native.js.map +1 -1
- package/build/components/visual-editor/use-padding-appender.js +62 -0
- package/build/components/visual-editor/use-padding-appender.js.map +1 -0
- package/build/components/welcome-guide/default.js.map +1 -1
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/editor.js +9 -4
- package/build/editor.js.map +1 -1
- package/build/editor.native.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +7 -24
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/components/index.js.map +1 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/use-navigate-to-entity-record.js +36 -19
- package/build/hooks/use-navigate-to-entity-record.js.map +1 -1
- package/build/hooks/validate-multiple-use/index.js.map +1 -1
- package/build/index.js +7 -12
- package/build/index.js.map +1 -1
- package/build/index.native.js +2 -4
- package/build/index.native.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/plugins/copy-content-menu-item/index.js.map +1 -1
- package/build/plugins/index.js.map +1 -1
- package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +7 -4
- package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
- package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build/store/actions.js +46 -31
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +1 -1
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +1 -15
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +44 -24
- package/build/store/selectors.js.map +1 -1
- package/build/utils/meta-boxes.js.map +1 -1
- package/build-module/components/browser-url/index.js.map +1 -1
- package/build-module/components/editor-initialization/index.js +1 -2
- package/build-module/components/editor-initialization/index.js.map +1 -1
- package/build-module/components/editor-initialization/listener-hooks.js +2 -38
- package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/index.js +4 -4
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/index.native.js +1 -1
- package/build-module/components/header/index.native.js.map +1 -1
- package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +5 -4
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/post-publish-button-or-toggle.js +11 -13
- package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
- package/build-module/components/header/preferences-menu-item/index.js +11 -3
- package/build-module/components/header/preferences-menu-item/index.js.map +1 -1
- package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/init-pattern-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -36
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/actions-panel.js +4 -5
- package/build-module/components/layout/actions-panel.js.map +1 -1
- package/build-module/components/layout/index.js +15 -20
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +1 -20
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/sidebar/plugin-post-publish-panel/index.js +14 -62
- package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +14 -61
- package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/sidebar/post-format/index.js.map +1 -1
- package/build-module/components/sidebar/post-pending-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-slug/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +9 -10
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-sticky/index.js.map +1 -1
- package/build-module/components/sidebar/post-trash/index.js.map +1 -1
- package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
- package/build-module/components/sidebar/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +43 -41
- package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build-module/components/text-editor/index.js.map +1 -1
- package/build-module/components/visual-editor/block-inspector-button.js +1 -1
- package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/visual-editor/header.native.js.map +1 -1
- package/build-module/components/visual-editor/index.js +4 -1
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/components/visual-editor/index.native.js.map +1 -1
- package/build-module/components/visual-editor/use-padding-appender.js +55 -0
- package/build-module/components/visual-editor/use-padding-appender.js.map +1 -0
- package/build-module/components/welcome-guide/default.js.map +1 -1
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/editor.js +9 -4
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +9 -26
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/components/index.js.map +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/use-navigate-to-entity-record.js +37 -20
- package/build-module/hooks/use-navigate-to-entity-record.js.map +1 -1
- package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
- package/build-module/index.js +8 -8
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +2 -4
- package/build-module/index.native.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/plugins/copy-content-menu-item/index.js.map +1 -1
- package/build-module/plugins/index.js.map +1 -1
- package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +6 -3
- package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
- package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js +38 -22
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/reducer.js +1 -13
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +42 -21
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/meta-boxes.js.map +1 -1
- package/build-style/classic-rtl.css +2 -2
- package/build-style/classic.css +2 -2
- package/build-style/style-rtl.css +12 -454
- package/build-style/style.css +12 -454
- package/package.json +32 -34
- package/src/classic.scss +2 -1
- package/src/components/editor-initialization/index.js +1 -5
- package/src/components/editor-initialization/listener-hooks.js +1 -40
- package/src/components/editor-initialization/test/listener-hooks.js +1 -96
- package/src/components/header/index.js +3 -4
- package/src/components/header/index.native.js +1 -1
- package/src/components/header/more-menu/index.js +3 -4
- package/src/components/header/post-publish-button-or-toggle.js +10 -11
- package/src/components/header/preferences-menu-item/index.js +9 -3
- package/src/components/header/style.scss +5 -3
- package/src/components/header/test/index.js +13 -1
- package/src/components/keyboard-shortcuts/index.js +3 -44
- package/src/components/layout/actions-panel.js +5 -4
- package/src/components/layout/index.js +20 -42
- package/src/components/meta-boxes/meta-boxes-area/style.scss +1 -1
- package/src/components/preferences-modal/index.js +1 -24
- package/src/components/sidebar/plugin-post-publish-panel/index.js +12 -67
- package/src/components/sidebar/plugin-pre-publish-panel/index.js +12 -66
- package/src/components/sidebar/post-status/index.js +6 -9
- package/src/components/sidebar/settings-sidebar/index.js +64 -56
- package/src/components/visual-editor/block-inspector-button.js +1 -1
- package/src/components/visual-editor/index.js +4 -0
- package/src/components/visual-editor/use-padding-appender.js +66 -0
- package/src/editor.js +14 -4
- package/src/hooks/commands/use-common-commands.js +13 -28
- package/src/hooks/use-navigate-to-entity-record.js +37 -24
- package/src/index.js +11 -6
- package/src/index.native.js +1 -4
- package/src/plugins/keyboard-shortcuts-help-menu-item/index.js +5 -3
- package/src/store/actions.js +37 -24
- package/src/store/reducer.js +0 -13
- package/src/store/selectors.js +52 -36
- package/src/store/test/actions.js +11 -10
- package/src/style.scss +1 -20
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -107
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +0 -1
- package/build/components/header/plugin-more-menu-item/index.js +0 -78
- package/build/components/header/plugin-more-menu-item/index.js.map +0 -1
- package/build/components/header/plugin-sidebar-more-menu-item/index.js +0 -71
- package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
- package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -49
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +0 -129
- package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -55
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
- package/build/components/sidebar/plugin-post-status-info/index.js +0 -73
- package/build/components/sidebar/plugin-post-status-info/index.js.map +0 -1
- package/build/components/sidebar/plugin-sidebar/index.js +0 -104
- package/build/components/sidebar/plugin-sidebar/index.js.map +0 -1
- package/build/components/sidebar/template-summary/index.js +0 -36
- package/build/components/sidebar/template-summary/index.js.map +0 -1
- package/build/components/start-page-options/index.js +0 -107
- package/build/components/start-page-options/index.js.map +0 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -100
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +0 -1
- package/build-module/components/header/plugin-more-menu-item/index.js +0 -73
- package/build-module/components/header/plugin-more-menu-item/index.js.map +0 -1
- package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +0 -65
- package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -119
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -48
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
- package/build-module/components/sidebar/plugin-post-status-info/index.js +0 -66
- package/build-module/components/sidebar/plugin-post-status-info/index.js.map +0 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js +0 -98
- package/build-module/components/sidebar/plugin-sidebar/index.js.map +0 -1
- package/build-module/components/sidebar/template-summary/index.js +0 -29
- package/build-module/components/sidebar/template-summary/index.js.map +0 -1
- package/build-module/components/start-page-options/index.js +0 -100
- package/build-module/components/start-page-options/index.js.map +0 -1
- package/src/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -108
- package/src/components/header/plugin-more-menu-item/index.js +0 -73
- package/src/components/header/plugin-sidebar-more-menu-item/index.js +0 -64
- package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
- package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -43
- package/src/components/keyboard-shortcut-help-modal/index.js +0 -159
- package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -67
- package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
- package/src/components/keyboard-shortcut-help-modal/test/index.js +0 -36
- package/src/components/sidebar/plugin-post-publish-panel/test/__snapshots__/index.js.snap +0 -39
- package/src/components/sidebar/plugin-post-publish-panel/test/index.js +0 -33
- package/src/components/sidebar/plugin-post-status-info/index.js +0 -63
- package/src/components/sidebar/plugin-post-status-info/test/__snapshots__/index.js.snap +0 -11
- package/src/components/sidebar/plugin-post-status-info/test/index.js +0 -29
- package/src/components/sidebar/plugin-pre-publish-panel/test/index.js +0 -33
- package/src/components/sidebar/plugin-sidebar/index.js +0 -94
- package/src/components/sidebar/template-summary/index.js +0 -37
- package/src/components/sidebar/template-summary/style.scss +0 -5
- package/src/components/start-page-options/index.js +0 -108
- package/src/components/start-page-options/style.scss +0 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_data","_editor","_preferences","_enableCustomFields","_interopRequireDefault","_enablePanel","_store","_lockUnlock","PreferencesModalSection","unlock","preferencesPrivateApis","MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","_react","createElement","default","label","__","map","title","key","panelName","_default","exports","withSelect","select","getEditorSettings","editorStore","getAllMetaBoxes","editPostStore","enableCustomFields","undefined"],"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport EnableCustomFieldsOption from './enable-custom-fields';\nimport EnablePanelOption from './enable-panel';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferencesModalSection } = unlock( preferencesPrivateApis );\n\nexport function MetaBoxesSection( {\n\tareCustomFieldsRegistered,\n\tmetaBoxes,\n\t...sectionProps\n} ) {\n\t// The 'Custom Fields' meta box is a special case that we handle separately.\n\tconst thirdPartyMetaBoxes = metaBoxes.filter(\n\t\t( { id } ) => id !== 'postcustom'\n\t);\n\n\tif ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferencesModalSection { ...sectionProps }>\n\t\t\t{ areCustomFieldsRegistered && (\n\t\t\t\t<EnableCustomFieldsOption label={ __( 'Custom fields' ) } />\n\t\t\t) }\n\t\t\t{ thirdPartyMetaBoxes.map( ( { id, title } ) => (\n\t\t\t\t<EnablePanelOption\n\t\t\t\t\tkey={ id }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tpanelName={ `meta-box-${ id }` }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</PreferencesModalSection>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditorSettings } = select( editorStore );\n\tconst { getAllMetaBoxes } = select( editPostStore );\n\n\treturn {\n\t\t// This setting should not live in the block editor's store.\n\t\tareCustomFieldsRegistered:\n\t\t\tgetEditorSettings().enableCustomFields !== undefined,\n\t\tmetaBoxes: getAllMetaBoxes(),\n\t};\n} )( MetaBoxesSection );\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,YAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAdA;AACA;AACA;;AAMA;AACA;AACA;;AAMA,MAAM;EAAES;AAAwB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE7D,SAASC,gBAAgBA,CAAE;EACjCC,yBAAyB;EACzBC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH;EACA,MAAMC,mBAAmB,GAAGF,SAAS,CAACG,MAAM,CAC3C,CAAE;IAAEC;EAAG,CAAC,KAAMA,EAAE,KAAK,YACtB,CAAC;EAED,IAAK,CAAEL,yBAAyB,IAAIG,mBAAmB,CAACG,MAAM,KAAK,CAAC,EAAG;IACtE,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,uBAAuB;IAAA,GAAMM;EAAY,GACvCF,yBAAyB,IAC1B,IAAAO,MAAA,CAAAC,aAAA,EAACjB,mBAAA,CAAAkB,OAAwB;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,eAAgB;EAAG,CAAE,CAC3D,EACCR,mBAAmB,CAACS,GAAG,CAAE,CAAE;IAAEP,EAAE;IAAEQ;EAAM,CAAC,KACzC,IAAAN,MAAA,CAAAC,aAAA,EAACf,YAAA,CAAAgB,OAAiB;IACjBK,GAAG,EAAGT,EAAI;IACVK,KAAK,EAAGG,KAAO;IACfE,SAAS,EAAI,YAAYV,EAAI;EAAG,CAChC,CACA,CACsB,CAAC;AAE5B;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAEc,IAAAS,gBAAU,EAAIC,MAAM,IAAM;EACxC,MAAM;IAAEC;EAAkB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;EACnD,MAAM;IAAEC;EAAgB,CAAC,GAAGH,MAAM,CAAEI,YAAc,CAAC;EAEnD,OAAO;IACN;IACAvB,yBAAyB,EACxBoB,iBAAiB,CAAC,CAAC,CAACI,kBAAkB,KAAKC,SAAS;IACrDxB,SAAS,EAAEqB,eAAe,CAAC;EAC5B,CAAC;AACF,CAAE,CAAC,CAAEvB,gBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"names":["_i18n","require","_data","_editor","_preferences","_enableCustomFields","_interopRequireDefault","_enablePanel","_store","_lockUnlock","PreferencesModalSection","unlock","preferencesPrivateApis","MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","_react","createElement","default","label","__","map","title","key","panelName","_default","exports","withSelect","select","getEditorSettings","editorStore","getAllMetaBoxes","editPostStore","enableCustomFields","undefined"],"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport EnableCustomFieldsOption from './enable-custom-fields';\nimport EnablePanelOption from './enable-panel';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferencesModalSection } = unlock( preferencesPrivateApis );\n\nexport function MetaBoxesSection( {\n\tareCustomFieldsRegistered,\n\tmetaBoxes,\n\t...sectionProps\n} ) {\n\t// The 'Custom Fields' meta box is a special case that we handle separately.\n\tconst thirdPartyMetaBoxes = metaBoxes.filter(\n\t\t( { id } ) => id !== 'postcustom'\n\t);\n\n\tif ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferencesModalSection { ...sectionProps }>\n\t\t\t{ areCustomFieldsRegistered && (\n\t\t\t\t<EnableCustomFieldsOption label={ __( 'Custom fields' ) } />\n\t\t\t) }\n\t\t\t{ thirdPartyMetaBoxes.map( ( { id, title } ) => (\n\t\t\t\t<EnablePanelOption\n\t\t\t\t\tkey={ id }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tpanelName={ `meta-box-${ id }` }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</PreferencesModalSection>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditorSettings } = select( editorStore );\n\tconst { getAllMetaBoxes } = select( editPostStore );\n\n\treturn {\n\t\t// This setting should not live in the block editor's store.\n\t\tareCustomFieldsRegistered:\n\t\t\tgetEditorSettings().enableCustomFields !== undefined,\n\t\tmetaBoxes: getAllMetaBoxes(),\n\t};\n} )( MetaBoxesSection );\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,YAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAdA;AACA;AACA;;AAMA;AACA;AACA;;AAMA,MAAM;EAAES;AAAwB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE7D,SAASC,gBAAgBA,CAAE;EACjCC,yBAAyB;EACzBC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH;EACA,MAAMC,mBAAmB,GAAGF,SAAS,CAACG,MAAM,CAC3C,CAAE;IAAEC;EAAG,CAAC,KAAMA,EAAE,KAAK,YACtB,CAAC;EAED,IAAK,CAAEL,yBAAyB,IAAIG,mBAAmB,CAACG,MAAM,KAAK,CAAC,EAAG;IACtE,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,uBAAuB;IAAA,GAAMM;EAAY,GACvCF,yBAAyB,IAC1B,IAAAO,MAAA,CAAAC,aAAA,EAACjB,mBAAA,CAAAkB,OAAwB;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,eAAgB;EAAG,CAAE,CAC3D,EACCR,mBAAmB,CAACS,GAAG,CAAE,CAAE;IAAEP,EAAE;IAAEQ;EAAM,CAAC,KACzC,IAAAN,MAAA,CAAAC,aAAA,EAACf,YAAA,CAAAgB,OAAiB;IACjBK,GAAG,EAAGT,EAAI;IACVK,KAAK,EAAGG,KAAO;IACfE,SAAS,EAAI,YAAYV,EAAI;EAAG,CAChC,CACA,CACsB,CAAC;AAE5B;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAEc,IAAAS,gBAAU,EAAIC,MAAM,IAAM;EACxC,MAAM;IAAEC;EAAkB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;EACnD,MAAM;IAAEC;EAAgB,CAAC,GAAGH,MAAM,CAAEI,YAAc,CAAC;EAEnD,OAAO;IACN;IACAvB,yBAAyB,EACxBoB,iBAAiB,CAAC,CAAC,CAACI,kBAAkB,KAAKC,SAAS;IACrDxB,SAAS,EAAEqB,eAAe,CAAC;EAC5B,CAAC;AACF,CAAE,CAAC,CAAEvB,gBAAiB,CAAC","ignoreList":[]}
|
|
@@ -1,87 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.default =
|
|
7
|
+
exports.default = EditPostPluginPostPublishPanel;
|
|
7
8
|
var _react = require("react");
|
|
8
|
-
var
|
|
9
|
-
var
|
|
9
|
+
var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
|
|
10
|
+
var _editor = require("@wordpress/editor");
|
|
10
11
|
/**
|
|
11
12
|
* WordPress dependencies
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
|
-
const {
|
|
15
|
-
Fill,
|
|
16
|
-
Slot
|
|
17
|
-
} = (0, _components.createSlotFill)('PluginPostPublishPanel');
|
|
18
|
-
|
|
19
15
|
/**
|
|
20
16
|
* Renders provided content to the post-publish panel in the publish flow
|
|
21
17
|
* (side panel that opens after a user publishes the post).
|
|
22
18
|
*
|
|
19
|
+
* @deprecated since 6.6, use `wp.editor.PluginPostPublishPanel` instead.
|
|
20
|
+
*
|
|
23
21
|
* @param {Object} props Component properties.
|
|
24
22
|
* @param {string} [props.className] An optional class name added to the panel.
|
|
25
23
|
* @param {string} [props.title] Title displayed at the top of the panel.
|
|
26
24
|
* @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.
|
|
27
25
|
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
|
|
28
26
|
* @param {Element} props.children Children to be rendered
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```js
|
|
32
|
-
* // Using ES5 syntax
|
|
33
|
-
* var __ = wp.i18n.__;
|
|
34
|
-
* var PluginPostPublishPanel = wp.editPost.PluginPostPublishPanel;
|
|
35
|
-
*
|
|
36
|
-
* function MyPluginPostPublishPanel() {
|
|
37
|
-
* return React.createElement(
|
|
38
|
-
* PluginPostPublishPanel,
|
|
39
|
-
* {
|
|
40
|
-
* className: 'my-plugin-post-publish-panel',
|
|
41
|
-
* title: __( 'My panel title' ),
|
|
42
|
-
* initialOpen: true,
|
|
43
|
-
* },
|
|
44
|
-
* __( 'My panel content' )
|
|
45
|
-
* );
|
|
46
|
-
* }
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```jsx
|
|
51
|
-
* // Using ESNext syntax
|
|
52
|
-
* import { __ } from '@wordpress/i18n';
|
|
53
|
-
* import { PluginPostPublishPanel } from '@wordpress/edit-post';
|
|
54
|
-
*
|
|
55
|
-
* const MyPluginPostPublishPanel = () => (
|
|
56
|
-
* <PluginPostPublishPanel
|
|
57
|
-
* className="my-plugin-post-publish-panel"
|
|
58
|
-
* title={ __( 'My panel title' ) }
|
|
59
|
-
* initialOpen={ true }
|
|
60
|
-
* >
|
|
61
|
-
* { __( 'My panel content' ) }
|
|
62
|
-
* </PluginPostPublishPanel>
|
|
63
|
-
* );
|
|
64
|
-
* ```
|
|
65
|
-
*
|
|
66
27
|
* @return {Component} The component to be rendered.
|
|
67
28
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return (0, _react.createElement)(Fill, null, (0, _react.createElement)(_components.PanelBody, {
|
|
79
|
-
className: className,
|
|
80
|
-
initialOpen: initialOpen || !title,
|
|
81
|
-
title: title,
|
|
82
|
-
icon: icon !== null && icon !== void 0 ? icon : pluginIcon
|
|
83
|
-
}, children));
|
|
84
|
-
};
|
|
85
|
-
PluginPostPublishPanel.Slot = Slot;
|
|
86
|
-
var _default = exports.default = PluginPostPublishPanel;
|
|
29
|
+
function EditPostPluginPostPublishPanel(props) {
|
|
30
|
+
(0, _deprecated.default)('wp.editPost.PluginPostPublishPanel', {
|
|
31
|
+
since: '6.6',
|
|
32
|
+
version: '6.8',
|
|
33
|
+
alternative: 'wp.editor.PluginPostPublishPanel'
|
|
34
|
+
});
|
|
35
|
+
return (0, _react.createElement)(_editor.PluginPostPublishPanel, {
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
87
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_deprecated","_interopRequireDefault","require","_editor","EditPostPluginPostPublishPanel","props","deprecated","since","version","alternative","_react","createElement","PluginPostPublishPanel"],"sources":["@wordpress/edit-post/src/components/sidebar/plugin-post-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { PluginPostPublishPanel } from '@wordpress/editor';\n\n/**\n * Renders provided content to the post-publish panel in the publish flow\n * (side panel that opens after a user publishes the post).\n *\n * @deprecated since 6.6, use `wp.editor.PluginPostPublishPanel` instead.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n * @return {Component} The component to be rendered.\n */\nexport default function EditPostPluginPostPublishPanel( props ) {\n\tdeprecated( 'wp.editPost.PluginPostPublishPanel', {\n\t\tsince: '6.6',\n\t\tversion: '6.8',\n\t\talternative: 'wp.editor.PluginPostPublishPanel',\n\t} );\n\treturn <PluginPostPublishPanel { ...props } />;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASE,8BAA8BA,CAAEC,KAAK,EAAG;EAC/D,IAAAC,mBAAU,EAAE,oCAAoC,EAAE;IACjDC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE,KAAK;IACdC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,OAAO,IAAAC,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,sBAAsB;IAAA,GAAMP;EAAK,CAAI,CAAC;AAC/C","ignoreList":[]}
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.default =
|
|
7
|
+
exports.default = EditPostPluginPrePublishPanel;
|
|
7
8
|
var _react = require("react");
|
|
8
|
-
var
|
|
9
|
-
var
|
|
9
|
+
var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
|
|
10
|
+
var _editor = require("@wordpress/editor");
|
|
10
11
|
/**
|
|
11
12
|
* WordPress dependencies
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
|
-
const {
|
|
15
|
-
Fill,
|
|
16
|
-
Slot
|
|
17
|
-
} = (0, _components.createSlotFill)('PluginPrePublishPanel');
|
|
18
|
-
|
|
19
15
|
/**
|
|
20
16
|
* Renders provided content to the pre-publish side panel in the publish flow
|
|
21
17
|
* (side panel that opens when a user first pushes "Publish" from the main editor).
|
|
22
18
|
*
|
|
19
|
+
* @deprecated since 6.6, use `wp.editor.PluginPrePublishPanel` instead.
|
|
20
|
+
*
|
|
23
21
|
* @param {Object} props Component props.
|
|
24
22
|
* @param {string} [props.className] An optional class name added to the panel.
|
|
25
23
|
* @param {string} [props.title] Title displayed at the top of the panel.
|
|
@@ -30,61 +28,16 @@ const {
|
|
|
30
28
|
* the sidebar is pinned to toolbar.
|
|
31
29
|
* @param {Element} props.children Children to be rendered
|
|
32
30
|
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```js
|
|
35
|
-
* // Using ES5 syntax
|
|
36
|
-
* var __ = wp.i18n.__;
|
|
37
|
-
* var PluginPrePublishPanel = wp.editPost.PluginPrePublishPanel;
|
|
38
|
-
*
|
|
39
|
-
* function MyPluginPrePublishPanel() {
|
|
40
|
-
* return React.createElement(
|
|
41
|
-
* PluginPrePublishPanel,
|
|
42
|
-
* {
|
|
43
|
-
* className: 'my-plugin-pre-publish-panel',
|
|
44
|
-
* title: __( 'My panel title' ),
|
|
45
|
-
* initialOpen: true,
|
|
46
|
-
* },
|
|
47
|
-
* __( 'My panel content' )
|
|
48
|
-
* );
|
|
49
|
-
* }
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```jsx
|
|
54
|
-
* // Using ESNext syntax
|
|
55
|
-
* import { __ } from '@wordpress/i18n';
|
|
56
|
-
* import { PluginPrePublishPanel } from '@wordpress/edit-post';
|
|
57
|
-
*
|
|
58
|
-
* const MyPluginPrePublishPanel = () => (
|
|
59
|
-
* <PluginPrePublishPanel
|
|
60
|
-
* className="my-plugin-pre-publish-panel"
|
|
61
|
-
* title={ __( 'My panel title' ) }
|
|
62
|
-
* initialOpen={ true }
|
|
63
|
-
* >
|
|
64
|
-
* { __( 'My panel content' ) }
|
|
65
|
-
* </PluginPrePublishPanel>
|
|
66
|
-
* );
|
|
67
|
-
* ```
|
|
68
|
-
*
|
|
69
31
|
* @return {Component} The component to be rendered.
|
|
70
32
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return (0, _react.createElement)(Fill, null, (0, _react.createElement)(_components.PanelBody, {
|
|
82
|
-
className: className,
|
|
83
|
-
initialOpen: initialOpen || !title,
|
|
84
|
-
title: title,
|
|
85
|
-
icon: icon !== null && icon !== void 0 ? icon : pluginIcon
|
|
86
|
-
}, children));
|
|
87
|
-
};
|
|
88
|
-
PluginPrePublishPanel.Slot = Slot;
|
|
89
|
-
var _default = exports.default = PluginPrePublishPanel;
|
|
33
|
+
function EditPostPluginPrePublishPanel(props) {
|
|
34
|
+
(0, _deprecated.default)('wp.editPost.PluginPrePublishPanel', {
|
|
35
|
+
since: '6.6',
|
|
36
|
+
version: '6.8',
|
|
37
|
+
alternative: 'wp.editor.PluginPrePublishPanel'
|
|
38
|
+
});
|
|
39
|
+
return (0, _react.createElement)(_editor.PluginPrePublishPanel, {
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
}
|
|
90
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_deprecated","_interopRequireDefault","require","_editor","EditPostPluginPrePublishPanel","props","deprecated","since","version","alternative","_react","createElement","PluginPrePublishPanel"],"sources":["@wordpress/edit-post/src/components/sidebar/plugin-pre-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { PluginPrePublishPanel } from '@wordpress/editor';\n\n/**\n * Renders provided content to the pre-publish side panel in the publish flow\n * (side panel that opens when a user first pushes \"Publish\" from the main editor).\n *\n * @deprecated since 6.6, use `wp.editor.PluginPrePublishPanel` instead.\n *\n * @param {Object} props Component props.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened.\n * When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/)\n * icon slug string, or an SVG WP element, to be rendered when\n * the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n *\n * @return {Component} The component to be rendered.\n */\nexport default function EditPostPluginPrePublishPanel( props ) {\n\tdeprecated( 'wp.editPost.PluginPrePublishPanel', {\n\t\tsince: '6.6',\n\t\tversion: '6.8',\n\t\talternative: 'wp.editor.PluginPrePublishPanel',\n\t} );\n\treturn <PluginPrePublishPanel { ...props } />;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASE,6BAA6BA,CAAEC,KAAK,EAAG;EAC9D,IAAAC,mBAAU,EAAE,mCAAmC,EAAE;IAChDC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE,KAAK;IACdC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,OAAO,IAAAC,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,qBAAqB;IAAA,GAAMP;EAAK,CAAI,CAAC;AAC9C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_editor","PostFormat","_react","createElement","PostFormatCheck","PanelRow","className","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-format/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport {\n\tPostFormat as PostFormatForm,\n\tPostFormatCheck,\n} from '@wordpress/editor';\n\nexport function PostFormat() {\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<PanelRow className=\"edit-post-post-format\">\n\t\t\t\t<PostFormatForm />\n\t\t\t</PanelRow>\n\t\t</PostFormatCheck>\n\t);\n}\n\nexport default PostFormat;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAOO,SAASE,UAAUA,CAAA,EAAG;EAC5B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAI,eAAe,QACf,IAAAF,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAO,QAAQ;IAACC,SAAS,EAAC;EAAuB,GAC1C,IAAAJ,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAC,UAAc,MAAE,CACR,CACM,CAAC;AAEpB;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcR,UAAU"}
|
|
1
|
+
{"version":3,"names":["_components","require","_editor","PostFormat","_react","createElement","PostFormatCheck","PanelRow","className","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-format/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport {\n\tPostFormat as PostFormatForm,\n\tPostFormatCheck,\n} from '@wordpress/editor';\n\nexport function PostFormat() {\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<PanelRow className=\"edit-post-post-format\">\n\t\t\t\t<PostFormatForm />\n\t\t\t</PanelRow>\n\t\t</PostFormatCheck>\n\t);\n}\n\nexport default PostFormat;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAOO,SAASE,UAAUA,CAAA,EAAG;EAC5B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAI,eAAe,QACf,IAAAF,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAO,QAAQ;IAACC,SAAS,EAAC;EAAuB,GAC1C,IAAAJ,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAC,UAAc,MAAE,CACR,CACM,CAAC;AAEpB;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcR,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_editor","require","_lockUnlock","PostPanelRow","unlock","editorPrivateApis","PostPendingStatus","_react","createElement","PostPendingStatusCheck","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-pending-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostPendingStatus as PostPendingStatusForm,\n\tPostPendingStatusCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostPendingStatus() {\n\treturn (\n\t\t<PostPendingStatusCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostPendingStatusForm />\n\t\t\t</PostPanelRow>\n\t\t</PostPendingStatusCheck>\n\t);\n}\n\nexport default PostPendingStatus;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AASA,IAAAC,WAAA,GAAAD,OAAA;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AAGA,MAAM;EAAEE;AAAa,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE7C,SAASC,iBAAiBA,CAAA,EAAG;EACnC,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,sBAAsB,QACtB,IAAAF,MAAA,CAAAC,aAAA,EAACL,YAAY,QACZ,IAAAI,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAM,iBAAqB,MAAE,CACX,CACS,CAAC;AAE3B;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcN,iBAAiB"}
|
|
1
|
+
{"version":3,"names":["_editor","require","_lockUnlock","PostPanelRow","unlock","editorPrivateApis","PostPendingStatus","_react","createElement","PostPendingStatusCheck","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-pending-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostPendingStatus as PostPendingStatusForm,\n\tPostPendingStatusCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostPendingStatus() {\n\treturn (\n\t\t<PostPendingStatusCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostPendingStatusForm />\n\t\t\t</PostPanelRow>\n\t\t</PostPendingStatusCheck>\n\t);\n}\n\nexport default PostPendingStatus;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AASA,IAAAC,WAAA,GAAAD,OAAA;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AAGA,MAAM;EAAEE;AAAa,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE7C,SAASC,iBAAiBA,CAAA,EAAG;EACnC,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,sBAAsB,QACtB,IAAAF,MAAA,CAAAC,aAAA,EAACL,YAAY,QACZ,IAAAI,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAM,iBAAqB,MAAE,CACX,CACS,CAAC;AAE3B;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcN,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_editor","PostSlug","_react","createElement","PostSlugCheck","PanelRow","className","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-slug/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport { PostSlug as PostSlugForm, PostSlugCheck } from '@wordpress/editor';\n\nexport function PostSlug() {\n\treturn (\n\t\t<PostSlugCheck>\n\t\t\t<PanelRow className=\"edit-post-post-slug\">\n\t\t\t\t<PostSlugForm />\n\t\t\t</PanelRow>\n\t\t</PostSlugCheck>\n\t);\n}\n\nexport default PostSlug;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIO,SAASE,QAAQA,CAAA,EAAG;EAC1B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAI,aAAa,QACb,IAAAF,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAO,QAAQ;IAACC,SAAS,EAAC;EAAqB,GACxC,IAAAJ,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAC,QAAY,MAAE,CACN,CACI,CAAC;AAElB;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcR,QAAQ"}
|
|
1
|
+
{"version":3,"names":["_components","require","_editor","PostSlug","_react","createElement","PostSlugCheck","PanelRow","className","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-slug/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport { PostSlug as PostSlugForm, PostSlugCheck } from '@wordpress/editor';\n\nexport function PostSlug() {\n\treturn (\n\t\t<PostSlugCheck>\n\t\t\t<PanelRow className=\"edit-post-post-slug\">\n\t\t\t\t<PostSlugForm />\n\t\t\t</PanelRow>\n\t\t</PostSlugCheck>\n\t);\n}\n\nexport default PostSlug;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIO,SAASE,QAAQA,CAAA,EAAG;EAC1B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAI,aAAa,QACb,IAAAF,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAO,QAAQ;IAACC,SAAS,EAAC;EAAqB,GACxC,IAAAJ,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAC,QAAY,MAAE,CACN,CACI,CAAC;AAElB;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcR,QAAQ","ignoreList":[]}
|
|
@@ -10,13 +10,11 @@ var _i18n = require("@wordpress/i18n");
|
|
|
10
10
|
var _components = require("@wordpress/components");
|
|
11
11
|
var _data = require("@wordpress/data");
|
|
12
12
|
var _editor = require("@wordpress/editor");
|
|
13
|
-
var _postVisibility = _interopRequireDefault(require("../post-visibility"));
|
|
14
13
|
var _postTrash = _interopRequireDefault(require("../post-trash"));
|
|
15
14
|
var _postSticky = _interopRequireDefault(require("../post-sticky"));
|
|
16
15
|
var _postSlug = _interopRequireDefault(require("../post-slug"));
|
|
17
16
|
var _postFormat = _interopRequireDefault(require("../post-format"));
|
|
18
|
-
var
|
|
19
|
-
var _pluginPostStatusInfo = _interopRequireDefault(require("../plugin-post-status-info"));
|
|
17
|
+
var _lockUnlock = require("../../../lock-unlock");
|
|
20
18
|
/**
|
|
21
19
|
* WordPress dependencies
|
|
22
20
|
*/
|
|
@@ -25,6 +23,10 @@ var _pluginPostStatusInfo = _interopRequireDefault(require("../plugin-post-statu
|
|
|
25
23
|
* Internal dependencies
|
|
26
24
|
*/
|
|
27
25
|
|
|
26
|
+
const {
|
|
27
|
+
PostStatus: PostStatusPanel
|
|
28
|
+
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
29
|
+
|
|
28
30
|
/**
|
|
29
31
|
* Module Constants
|
|
30
32
|
*/
|
|
@@ -56,14 +58,12 @@ function PostStatus() {
|
|
|
56
58
|
title: (0, _i18n.__)('Summary'),
|
|
57
59
|
opened: isOpened,
|
|
58
60
|
onToggle: () => toggleEditorPanelOpened(PANEL_NAME)
|
|
59
|
-
}, (0, _react.createElement)(
|
|
61
|
+
}, (0, _react.createElement)(_editor.PluginPostStatusInfo.Slot, null, fills => (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(PostStatusPanel, null), (0, _react.createElement)(_editor.PostFeaturedImagePanel, {
|
|
60
62
|
withPanelBody: false
|
|
61
|
-
}), (0, _react.createElement)(
|
|
63
|
+
}), (0, _react.createElement)(_editor.PostSchedulePanel, null), (0, _react.createElement)(_editor.PostTemplatePanel, null), (0, _react.createElement)(_editor.PostURLPanel, null), (0, _react.createElement)(_editor.PostSyncStatus, null), (0, _react.createElement)(_postSticky.default, null), (0, _react.createElement)(_postFormat.default, null), (0, _react.createElement)(_postSlug.default, null), (0, _react.createElement)(_editor.PostAuthorPanel, null), fills, (0, _react.createElement)(_components.__experimentalHStack, {
|
|
62
64
|
style: {
|
|
63
65
|
marginTop: '16px'
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
wrap: true
|
|
67
|
-
}, (0, _react.createElement)(_editor.PostSwitchToDraftButton, null), (0, _react.createElement)(_postTrash.default, null)))));
|
|
66
|
+
}
|
|
67
|
+
}, (0, _react.createElement)(_postTrash.default, null)))));
|
|
68
68
|
}
|
|
69
69
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_data","_editor","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_data","_editor","_postTrash","_interopRequireDefault","_postSticky","_postSlug","_postFormat","_lockUnlock","PostStatus","PostStatusPanel","unlock","editorPrivateApis","PANEL_NAME","isOpened","isRemoved","useSelect","select","isEditorPanelRemoved","isEditorPanelOpened","editorStore","toggleEditorPanelOpened","useDispatch","_react","createElement","PanelBody","className","title","__","opened","onToggle","PluginPostStatusInfo","Slot","fills","Fragment","PostFeaturedImagePanel","withPanelBody","PostSchedulePanel","PostTemplatePanel","PostURLPanel","PostSyncStatus","default","PostAuthorPanel","__experimentalHStack","style","marginTop"],"sources":["@wordpress/edit-post/src/components/sidebar/post-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\tPanelBody,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tPluginPostStatusInfo,\n\tPostAuthorPanel,\n\tPostSchedulePanel,\n\tPostSyncStatus,\n\tPostURLPanel,\n\tPostTemplatePanel,\n\tPostFeaturedImagePanel,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport PostTrash from '../post-trash';\nimport PostSticky from '../post-sticky';\nimport PostSlug from '../post-slug';\nimport PostFormat from '../post-format';\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostStatus: PostStatusPanel } = unlock( editorPrivateApis );\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nexport default function PostStatus() {\n\tconst { isOpened, isRemoved } = useSelect( ( select ) => {\n\t\t// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do\n\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\tconst { isEditorPanelRemoved, isEditorPanelOpened } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tisRemoved: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( isRemoved ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\tclassName=\"edit-post-post-status\"\n\t\t\ttitle={ __( 'Summary' ) }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t>\n\t\t\t<PluginPostStatusInfo.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PostStatusPanel />\n\t\t\t\t\t\t<PostFeaturedImagePanel withPanelBody={ false } />\n\t\t\t\t\t\t<PostSchedulePanel />\n\t\t\t\t\t\t<PostTemplatePanel />\n\t\t\t\t\t\t<PostURLPanel />\n\t\t\t\t\t\t<PostSyncStatus />\n\t\t\t\t\t\t<PostSticky />\n\t\t\t\t\t\t<PostFormat />\n\t\t\t\t\t\t<PostSlug />\n\t\t\t\t\t\t<PostAuthorPanel />\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tmarginTop: '16px',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostTrash />\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostStatusInfo.Slot>\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAIA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAeA,IAAAI,UAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,WAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,SAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,WAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AA5BA;AACA;AACA;;AAmBA;AACA;AACA;;AAOA,MAAM;EAAEU,UAAU,EAAEC;AAAgB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;;AAEnE;AACA;AACA;AACA,MAAMC,UAAU,GAAG,aAAa;AAEjB,SAASJ,UAAUA,CAAA,EAAG;EACpC,MAAM;IAAEK,QAAQ;IAAEC;EAAU,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACxD;IACA;IACA,MAAM;MAAEC,oBAAoB;MAAEC;IAAoB,CAAC,GAClDF,MAAM,CAAEG,aAAY,CAAC;IACtB,OAAO;MACNL,SAAS,EAAEG,oBAAoB,CAAEL,UAAW,CAAC;MAC7CC,QAAQ,EAAEK,mBAAmB,CAAEN,UAAW;IAC3C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEQ;EAAwB,CAAC,GAAG,IAAAC,iBAAW,EAAEF,aAAY,CAAC;EAE9D,IAAKL,SAAS,EAAG;IAChB,OAAO,IAAI;EACZ;EAEA,OACC,IAAAQ,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAAyB,SAAS;IACTC,SAAS,EAAC,uBAAuB;IACjCC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU,CAAG;IACzBC,MAAM,EAAGf,QAAU;IACnBgB,QAAQ,EAAGA,CAAA,KAAMT,uBAAuB,CAAER,UAAW;EAAG,GAExD,IAAAU,MAAA,CAAAC,aAAA,EAACtB,OAAA,CAAA6B,oBAAoB,CAACC,IAAI,QACrBC,KAAK,IACR,IAAAV,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAW,QAAA,QACC,IAAAX,MAAA,CAAAC,aAAA,EAACd,eAAe,MAAE,CAAC,EACnB,IAAAa,MAAA,CAAAC,aAAA,EAACtB,OAAA,CAAAiC,sBAAsB;IAACC,aAAa,EAAG;EAAO,CAAE,CAAC,EAClD,IAAAb,MAAA,CAAAC,aAAA,EAACtB,OAAA,CAAAmC,iBAAiB,MAAE,CAAC,EACrB,IAAAd,MAAA,CAAAC,aAAA,EAACtB,OAAA,CAAAoC,iBAAiB,MAAE,CAAC,EACrB,IAAAf,MAAA,CAAAC,aAAA,EAACtB,OAAA,CAAAqC,YAAY,MAAE,CAAC,EAChB,IAAAhB,MAAA,CAAAC,aAAA,EAACtB,OAAA,CAAAsC,cAAc,MAAE,CAAC,EAClB,IAAAjB,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAoC,OAAU,MAAE,CAAC,EACd,IAAAlB,MAAA,CAAAC,aAAA,EAACjB,WAAA,CAAAkC,OAAU,MAAE,CAAC,EACd,IAAAlB,MAAA,CAAAC,aAAA,EAAClB,SAAA,CAAAmC,OAAQ,MAAE,CAAC,EACZ,IAAAlB,MAAA,CAAAC,aAAA,EAACtB,OAAA,CAAAwC,eAAe,MAAE,CAAC,EACjBT,KAAK,EACP,IAAAV,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAA2C,oBAAM;IACNC,KAAK,EAAG;MACPC,SAAS,EAAE;IACZ;EAAG,GAEH,IAAAtB,MAAA,CAAAC,aAAA,EAACrB,UAAA,CAAAsC,OAAS,MAAE,CACL,CACP,CAEuB,CACjB,CAAC;AAEd","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_editor","require","_lockUnlock","PostPanelRow","unlock","editorPrivateApis","PostSticky","_react","createElement","PostStickyCheck","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-sticky/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostSticky as PostStickyForm,\n\tPostStickyCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostSticky() {\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostStickyForm />\n\t\t\t</PostPanelRow>\n\t\t</PostStickyCheck>\n\t);\n}\n\nexport default PostSticky;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AASA,IAAAC,WAAA,GAAAD,OAAA;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AAGA,MAAM;EAAEE;AAAa,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE7C,SAASC,UAAUA,CAAA,EAAG;EAC5B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,eAAe,QACf,IAAAF,MAAA,CAAAC,aAAA,EAACL,YAAY,QACZ,IAAAI,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAM,UAAc,MAAE,CACJ,CACE,CAAC;AAEpB;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcN,UAAU"}
|
|
1
|
+
{"version":3,"names":["_editor","require","_lockUnlock","PostPanelRow","unlock","editorPrivateApis","PostSticky","_react","createElement","PostStickyCheck","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-sticky/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostSticky as PostStickyForm,\n\tPostStickyCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostSticky() {\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostStickyForm />\n\t\t\t</PostPanelRow>\n\t\t</PostStickyCheck>\n\t);\n}\n\nexport default PostSticky;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AASA,IAAAC,WAAA,GAAAD,OAAA;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AAGA,MAAM;EAAEE;AAAa,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE7C,SAASC,UAAUA,CAAA,EAAG;EAC5B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,eAAe,QACf,IAAAF,MAAA,CAAAC,aAAA,EAACL,YAAY,QACZ,IAAAI,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAM,UAAc,MAAE,CACJ,CACE,CAAC;AAEpB;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcN,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_editor","require","PostTrash","_react","createElement","PostTrashCheck"],"sources":["@wordpress/edit-post/src/components/sidebar/post-trash/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PostTrash as PostTrashLink, PostTrashCheck } from '@wordpress/editor';\n\nexport default function PostTrash() {\n\treturn (\n\t\t<PostTrashCheck>\n\t\t\t<PostTrashLink />\n\t\t</PostTrashCheck>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGe,SAASC,SAASA,CAAA,EAAG;EACnC,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACJ,OAAA,CAAAK,cAAc,QACd,IAAAF,MAAA,CAAAC,aAAA,EAACJ,OAAA,CAAAE,SAAa,MAAE,CACD,CAAC;AAEnB"}
|
|
1
|
+
{"version":3,"names":["_editor","require","PostTrash","_react","createElement","PostTrashCheck"],"sources":["@wordpress/edit-post/src/components/sidebar/post-trash/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PostTrash as PostTrashLink, PostTrashCheck } from '@wordpress/editor';\n\nexport default function PostTrash() {\n\treturn (\n\t\t<PostTrashCheck>\n\t\t\t<PostTrashLink />\n\t\t</PostTrashCheck>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGe,SAASC,SAASA,CAAA,EAAG;EACnC,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACJ,OAAA,CAAAK,cAAc,QACd,IAAAF,MAAA,CAAAC,aAAA,EAACJ,OAAA,CAAAE,SAAa,MAAE,CACD,CAAC;AAEnB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_editor","_element","_lockUnlock","PostPanelRow","unlock","editorPrivateApis","PostVisibility","popoverAnchor","setPopoverAnchor","useState","popoverProps","useMemo","anchor","placement","_react","createElement","PostVisibilityCheck","render","canEdit","label","__","ref","PostVisibilityLabel","Dropdown","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostVisibilityToggle","onClick","renderContent","onClose","usePostVisibilityLabel","Button","__next40pxDefaultSize","className","variant","sprintf","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-visibility/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport {\n\tPostVisibility as PostVisibilityForm,\n\tPostVisibilityLabel,\n\tPostVisibilityCheck,\n\tusePostVisibilityLabel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostVisibility() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostVisibilityCheck\n\t\t\trender={ ( { canEdit } ) => (\n\t\t\t\t<PostPanelRow\n\t\t\t\t\tlabel={ __( 'Visibility' ) }\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t>\n\t\t\t\t\t{ ! canEdit && (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canEdit && (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tcontentClassName=\"edit-post-post-visibility__dialog\"\n\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t\tfocusOnMount\n\t\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityToggle\n\t\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityForm onClose={ onClose } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PostPanelRow>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nfunction PostVisibilityToggle( { isOpen, onClick } ) {\n\tconst label = usePostVisibilityLabel();\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"edit-post-post-visibility__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post visibility.\n\t\t\taria-label={ sprintf( __( 'Select visibility: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n\nexport default PostVisibility;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAOA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAjBA;AACA;AACA;;AAYA;AACA;AACA;;AAGA,MAAM;EAAEK;AAAa,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE7C,SAASC,cAAcA,CAAA,EAAG;EAChC;EACA;EACA,MAAM,CAAEC,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,IAAK,CAAC;EAC5D;EACA,MAAMC,YAAY,GAAG,IAAAC,gBAAO,EAC3B,OAAQ;IACP;IACA;IACAC,MAAM,EAAEL,aAAa;IACrBM,SAAS,EAAE;EACZ,CAAC,CAAE,EACH,CAAEN,aAAa,CAChB,CAAC;EAED,OACC,IAAAO,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAgB,mBAAmB;IACnBC,MAAM,EAAGA,CAAE;MAAEC;IAAQ,CAAC,KACrB,IAAAJ,MAAA,CAAAC,aAAA,EAACZ,YAAY;MACZgB,KAAK,EAAG,IAAAC,QAAE,EAAE,YAAa,CAAG;MAC5BC,GAAG,EAAGb;IAAkB,GAEtB,CAAEU,OAAO,IACV,IAAAJ,MAAA,CAAAC,aAAA,gBACC,IAAAD,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAsB,mBAAmB,MAAE,CACjB,CACN,EACCJ,OAAO,IACR,IAAAJ,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAwB,QAAQ;MACRC,gBAAgB,EAAC,mCAAmC;MACpDd,YAAY,EAAGA,YAAc;MAC7Be,YAAY;MACZC,YAAY,EAAGA,CAAE;QAAEC,MAAM;QAAEC;MAAS,CAAC,KACpC,IAAAd,MAAA,CAAAC,aAAA,EAACc,oBAAoB;QACpBF,MAAM,EAAGA,MAAQ;QACjBG,OAAO,EAAGF;MAAU,CACpB,CACC;MACHG,aAAa,EAAGA,CAAE;QAAEC;MAAQ,CAAC,KAC5B,IAAAlB,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAM,cAAkB;QAAC0B,OAAO,EAAGA;MAAS,CAAE;IACvC,CACH,CAEW;EACZ,CACH,CAAC;AAEJ;AAEA,SAASH,oBAAoBA,CAAE;EAAEF,MAAM;EAAEG;AAAQ,CAAC,EAAG;EACpD,MAAMX,KAAK,GAAG,IAAAc,8BAAsB,EAAC,CAAC;EACtC,OACC,IAAAnB,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAmC,MAAM;IACNC,qBAAqB;IACrBC,SAAS,EAAC,mCAAmC;IAC7CC,OAAO,EAAC,UAAU;IAClB,iBAAgBV;IAChB;IAAA;IACA,cAAa,IAAAW,aAAO,EAAE,IAAAlB,QAAE,EAAE,uBAAwB,CAAC,EAAED,KAAM,CAAG;IAC9DW,OAAO,EAAGA;EAAS,GAEjBX,KACK,CAAC;AAEX;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcnC,cAAc"}
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_editor","_element","_lockUnlock","PostPanelRow","unlock","editorPrivateApis","PostVisibility","popoverAnchor","setPopoverAnchor","useState","popoverProps","useMemo","anchor","placement","_react","createElement","PostVisibilityCheck","render","canEdit","label","__","ref","PostVisibilityLabel","Dropdown","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostVisibilityToggle","onClick","renderContent","onClose","usePostVisibilityLabel","Button","__next40pxDefaultSize","className","variant","sprintf","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-visibility/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport {\n\tPostVisibility as PostVisibilityForm,\n\tPostVisibilityLabel,\n\tPostVisibilityCheck,\n\tusePostVisibilityLabel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostVisibility() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostVisibilityCheck\n\t\t\trender={ ( { canEdit } ) => (\n\t\t\t\t<PostPanelRow\n\t\t\t\t\tlabel={ __( 'Visibility' ) }\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t>\n\t\t\t\t\t{ ! canEdit && (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canEdit && (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tcontentClassName=\"edit-post-post-visibility__dialog\"\n\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t\tfocusOnMount\n\t\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityToggle\n\t\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityForm onClose={ onClose } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PostPanelRow>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nfunction PostVisibilityToggle( { isOpen, onClick } ) {\n\tconst label = usePostVisibilityLabel();\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"edit-post-post-visibility__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post visibility.\n\t\t\taria-label={ sprintf( __( 'Select visibility: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n\nexport default PostVisibility;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAOA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAjBA;AACA;AACA;;AAYA;AACA;AACA;;AAGA,MAAM;EAAEK;AAAa,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE7C,SAASC,cAAcA,CAAA,EAAG;EAChC;EACA;EACA,MAAM,CAAEC,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,IAAK,CAAC;EAC5D;EACA,MAAMC,YAAY,GAAG,IAAAC,gBAAO,EAC3B,OAAQ;IACP;IACA;IACAC,MAAM,EAAEL,aAAa;IACrBM,SAAS,EAAE;EACZ,CAAC,CAAE,EACH,CAAEN,aAAa,CAChB,CAAC;EAED,OACC,IAAAO,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAgB,mBAAmB;IACnBC,MAAM,EAAGA,CAAE;MAAEC;IAAQ,CAAC,KACrB,IAAAJ,MAAA,CAAAC,aAAA,EAACZ,YAAY;MACZgB,KAAK,EAAG,IAAAC,QAAE,EAAE,YAAa,CAAG;MAC5BC,GAAG,EAAGb;IAAkB,GAEtB,CAAEU,OAAO,IACV,IAAAJ,MAAA,CAAAC,aAAA,gBACC,IAAAD,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAsB,mBAAmB,MAAE,CACjB,CACN,EACCJ,OAAO,IACR,IAAAJ,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAwB,QAAQ;MACRC,gBAAgB,EAAC,mCAAmC;MACpDd,YAAY,EAAGA,YAAc;MAC7Be,YAAY;MACZC,YAAY,EAAGA,CAAE;QAAEC,MAAM;QAAEC;MAAS,CAAC,KACpC,IAAAd,MAAA,CAAAC,aAAA,EAACc,oBAAoB;QACpBF,MAAM,EAAGA,MAAQ;QACjBG,OAAO,EAAGF;MAAU,CACpB,CACC;MACHG,aAAa,EAAGA,CAAE;QAAEC;MAAQ,CAAC,KAC5B,IAAAlB,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAM,cAAkB;QAAC0B,OAAO,EAAGA;MAAS,CAAE;IACvC,CACH,CAEW;EACZ,CACH,CAAC;AAEJ;AAEA,SAASH,oBAAoBA,CAAE;EAAEF,MAAM;EAAEG;AAAQ,CAAC,EAAG;EACpD,MAAMX,KAAK,GAAG,IAAAc,8BAAsB,EAAC,CAAC;EACtC,OACC,IAAAnB,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAmC,MAAM;IACNC,qBAAqB;IACrBC,SAAS,EAAC,mCAAmC;IAC7CC,OAAO,EAAC,UAAU;IAClB,iBAAgBV;IAChB;IAAA;IACA,cAAa,IAAAW,aAAO,EAAE,IAAAlB,QAAE,EAAE,uBAAwB,CAAC,EAAED,KAAM,CAAG;IAC9DW,OAAO,EAAGA;EAAS,GAEjBX,KACK,CAAC;AAEX;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcnC,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_data","_element","_editor","_lockUnlock","_settingsSidebar","Tabs","unlock","componentsPrivateApis","SettingsHeader","_","ref","documentLabel","useSelect","select","getPostTypeLabel","editorStore","_x","_react","createElement","TabList","Tab","tabId","sidebars","document","block","__","_default","exports","default","forwardRef"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nimport { sidebars } from '../settings-sidebar';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SettingsHeader = ( _, ref ) => {\n\tconst { documentLabel } = useSelect( ( select ) => {\n\t\tconst { getPostTypeLabel } = select( editorStore );\n\n\t\treturn {\n\t\t\t// translators: Default label for the Document sidebar tab, not selected.\n\t\t\tdocumentLabel: getPostTypeLabel() || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Tabs.TabList ref={ ref }>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.document }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.document }\n\t\t\t>\n\t\t\t\t{ documentLabel }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.block }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.block }\n\t\t\t>\n\t\t\t\t{ /* translators: Text label for the Block Settings Sidebar tab. */ }\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n};\n\nexport default forwardRef( SettingsHeader );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA,MAAM;EAAEO;AAAK,CAAC,GAAG,IAAAC,kBAAM,EAAEC,uBAAsB,CAAC;AAEhD,MAAMC,cAAc,GAAGA,CAAEC,CAAC,EAAEC,GAAG,KAAM;EACpC,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAClD,MAAM;MAAEC;IAAiB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAElD,OAAO;MACN;MACAJ,aAAa,EAAEG,gBAAgB,CAAC,CAAC,IAAI,IAAAE,QAAE,EAAE,UAAU,EAAE,MAAO;IAC7D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACb,IAAI,CAACc,OAAO;IAACT,GAAG,EAAGA;EAAK,GACxB,IAAAO,MAAA,CAAAC,aAAA,EAACb,IAAI,CAACe,GAAG;IACRC,KAAK,EAAGC,yBAAQ,CAACC;IACjB;IAAA;IACA,eAAcD,yBAAQ,CAACC;EAAU,GAE/BZ,aACO,CAAC,EACX,IAAAM,MAAA,CAAAC,aAAA,EAACb,IAAI,CAACe,GAAG;IACRC,KAAK,EAAGC,yBAAQ,CAACE;IACjB;IAAA;IACA,eAAcF,yBAAQ,CAACE;EAAO,GAG5B,IAAAC,QAAE,EAAE,OAAQ,CACL,CACG,CAAC;AAEjB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa,IAAAC,mBAAU,EAAErB,cAAe,CAAC"}
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_data","_element","_editor","_lockUnlock","_settingsSidebar","Tabs","unlock","componentsPrivateApis","SettingsHeader","_","ref","documentLabel","useSelect","select","getPostTypeLabel","editorStore","_x","_react","createElement","TabList","Tab","tabId","sidebars","document","block","__","_default","exports","default","forwardRef"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nimport { sidebars } from '../settings-sidebar';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SettingsHeader = ( _, ref ) => {\n\tconst { documentLabel } = useSelect( ( select ) => {\n\t\tconst { getPostTypeLabel } = select( editorStore );\n\n\t\treturn {\n\t\t\t// translators: Default label for the Document sidebar tab, not selected.\n\t\t\tdocumentLabel: getPostTypeLabel() || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Tabs.TabList ref={ ref }>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.document }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.document }\n\t\t\t>\n\t\t\t\t{ documentLabel }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.block }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.block }\n\t\t\t>\n\t\t\t\t{ /* translators: Text label for the Block Settings Sidebar tab. */ }\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n};\n\nexport default forwardRef( SettingsHeader );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA,MAAM;EAAEO;AAAK,CAAC,GAAG,IAAAC,kBAAM,EAAEC,uBAAsB,CAAC;AAEhD,MAAMC,cAAc,GAAGA,CAAEC,CAAC,EAAEC,GAAG,KAAM;EACpC,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAClD,MAAM;MAAEC;IAAiB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAElD,OAAO;MACN;MACAJ,aAAa,EAAEG,gBAAgB,CAAC,CAAC,IAAI,IAAAE,QAAE,EAAE,UAAU,EAAE,MAAO;IAC7D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACb,IAAI,CAACc,OAAO;IAACT,GAAG,EAAGA;EAAK,GACxB,IAAAO,MAAA,CAAAC,aAAA,EAACb,IAAI,CAACe,GAAG;IACRC,KAAK,EAAGC,yBAAQ,CAACC;IACjB;IAAA;IACA,eAAcD,yBAAQ,CAACC;EAAU,GAE/BZ,aACO,CAAC,EACX,IAAAM,MAAA,CAAAC,aAAA,EAACb,IAAI,CAACe,GAAG;IACRC,KAAK,EAAGC,yBAAQ,CAACE;IACjB;IAAA;IACA,eAAcF,yBAAQ,CAACE;EAAO,GAG5B,IAAAC,QAAE,EAAE,OAAQ,CACL,CACG,CAAC;AAEjB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa,IAAAC,mBAAU,EAAErB,cAAe,CAAC","ignoreList":[]}
|
|
@@ -11,14 +11,12 @@ var _data = require("@wordpress/data");
|
|
|
11
11
|
var _element = require("@wordpress/element");
|
|
12
12
|
var _i18n = require("@wordpress/i18n");
|
|
13
13
|
var _icons = require("@wordpress/icons");
|
|
14
|
-
var _interface = require("@wordpress/interface");
|
|
15
14
|
var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
|
|
16
15
|
var _editor = require("@wordpress/editor");
|
|
16
|
+
var _url = require("@wordpress/url");
|
|
17
17
|
var _settingsHeader = _interopRequireDefault(require("../settings-header"));
|
|
18
18
|
var _postStatus = _interopRequireDefault(require("../post-status"));
|
|
19
19
|
var _metaBoxes = _interopRequireDefault(require("../../meta-boxes"));
|
|
20
|
-
var _pluginSidebar = _interopRequireDefault(require("../plugin-sidebar"));
|
|
21
|
-
var _templateSummary = _interopRequireDefault(require("../template-summary"));
|
|
22
20
|
var _store = require("../../../store");
|
|
23
21
|
var _components = require("@wordpress/components");
|
|
24
22
|
var _lockUnlock = require("../../../lock-unlock");
|
|
@@ -30,9 +28,18 @@ var _lockUnlock = require("../../../lock-unlock");
|
|
|
30
28
|
* Internal dependencies
|
|
31
29
|
*/
|
|
32
30
|
|
|
31
|
+
const {
|
|
32
|
+
PostCardPanel,
|
|
33
|
+
PostActions,
|
|
34
|
+
interfaceStore
|
|
35
|
+
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
33
36
|
const {
|
|
34
37
|
Tabs
|
|
35
38
|
} = (0, _lockUnlock.unlock)(_components.privateApis);
|
|
39
|
+
const {
|
|
40
|
+
PatternOverridesPanel,
|
|
41
|
+
useAutoSwitchEditorSidebars
|
|
42
|
+
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
36
43
|
const SIDEBAR_ACTIVE_BY_DEFAULT = _element.Platform.select({
|
|
37
44
|
web: true,
|
|
38
45
|
native: false
|
|
@@ -41,13 +48,21 @@ const sidebars = exports.sidebars = {
|
|
|
41
48
|
document: 'edit-post/document',
|
|
42
49
|
block: 'edit-post/block'
|
|
43
50
|
};
|
|
51
|
+
function onActionPerformed(actionId, items) {
|
|
52
|
+
if (actionId === 'move-to-trash') {
|
|
53
|
+
const postType = items[0].type;
|
|
54
|
+
document.location.href = (0, _url.addQueryArgs)('edit.php', {
|
|
55
|
+
post_type: postType
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
44
59
|
const SidebarContent = ({
|
|
45
|
-
|
|
60
|
+
tabName,
|
|
46
61
|
keyboardShortcut,
|
|
47
62
|
isEditingTemplate
|
|
48
63
|
}) => {
|
|
49
64
|
const tabListRef = (0, _element.useRef)(null);
|
|
50
|
-
// Because `
|
|
65
|
+
// Because `PluginSidebar` renders a `ComplementaryArea`, we
|
|
51
66
|
// need to forward the `Tabs` context so it can be passed through the
|
|
52
67
|
// underlying slot/fill.
|
|
53
68
|
const tabsContextValue = (0, _element.useContext)(Tabs.Context);
|
|
@@ -62,7 +77,7 @@ const SidebarContent = ({
|
|
|
62
77
|
// We are purposefully using a custom `data-tab-id` attribute here
|
|
63
78
|
// because we don't want rely on any assumptions about `Tabs`
|
|
64
79
|
// component internals.
|
|
65
|
-
element => element.getAttribute('data-tab-id') ===
|
|
80
|
+
element => element.getAttribute('data-tab-id') === tabName);
|
|
66
81
|
const activeElement = selectedTabElement?.ownerDocument.activeElement;
|
|
67
82
|
const tabsHasFocus = tabsElements.some(element => {
|
|
68
83
|
return activeElement && activeElement.id === element.id;
|
|
@@ -70,9 +85,9 @@ const SidebarContent = ({
|
|
|
70
85
|
if (tabsHasFocus && selectedTabElement && selectedTabElement.id !== activeElement?.id) {
|
|
71
86
|
selectedTabElement?.focus();
|
|
72
87
|
}
|
|
73
|
-
}, [
|
|
74
|
-
return (0, _react.createElement)(
|
|
75
|
-
identifier:
|
|
88
|
+
}, [tabName]);
|
|
89
|
+
return (0, _react.createElement)(_editor.PluginSidebar, {
|
|
90
|
+
identifier: tabName,
|
|
76
91
|
header: (0, _react.createElement)(Tabs.Context.Provider, {
|
|
77
92
|
value: tabsContextValue
|
|
78
93
|
}, (0, _react.createElement)(_settingsHeader.default, {
|
|
@@ -95,40 +110,33 @@ const SidebarContent = ({
|
|
|
95
110
|
}, (0, _react.createElement)(Tabs.TabPanel, {
|
|
96
111
|
tabId: sidebars.document,
|
|
97
112
|
focusable: false
|
|
98
|
-
},
|
|
113
|
+
}, (0, _react.createElement)(PostCardPanel, {
|
|
114
|
+
actions: (0, _react.createElement)(PostActions, {
|
|
115
|
+
onActionPerformed: onActionPerformed
|
|
116
|
+
})
|
|
117
|
+
}), !isEditingTemplate && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_postStatus.default, null), (0, _react.createElement)(_editor.PluginDocumentSettingPanel.Slot, null), (0, _react.createElement)(_editor.PostLastRevisionPanel, null), (0, _react.createElement)(_editor.PostTaxonomiesPanel, null), (0, _react.createElement)(_editor.PostExcerptPanel, null), (0, _react.createElement)(_editor.PostDiscussionPanel, null), (0, _react.createElement)(_editor.PageAttributesPanel, null), (0, _react.createElement)(PatternOverridesPanel, null), (0, _react.createElement)(_metaBoxes.default, {
|
|
99
118
|
location: "side"
|
|
100
|
-
}))
|
|
119
|
+
}))), (0, _react.createElement)(Tabs.TabPanel, {
|
|
101
120
|
tabId: sidebars.block,
|
|
102
121
|
focusable: false
|
|
103
122
|
}, (0, _react.createElement)(_blockEditor.BlockInspector, null))));
|
|
104
123
|
};
|
|
105
124
|
const SettingsSidebar = () => {
|
|
125
|
+
useAutoSwitchEditorSidebars();
|
|
106
126
|
const {
|
|
107
|
-
|
|
108
|
-
isSettingsSidebarActive,
|
|
127
|
+
tabName,
|
|
109
128
|
keyboardShortcut,
|
|
110
129
|
isEditingTemplate
|
|
111
130
|
} = (0, _data.useSelect)(select => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
// is selected, that should be edit-post/block otherwise it's edit-post/document.
|
|
119
|
-
let sidebar = select(_interface.store).getActiveComplementaryArea(_store.store.name);
|
|
120
|
-
let isSettingsSidebar = true;
|
|
121
|
-
if (![sidebars.document, sidebars.block].includes(sidebar)) {
|
|
122
|
-
isSettingsSidebar = false;
|
|
123
|
-
if (select(_blockEditor.store).getBlockSelectionStart()) {
|
|
124
|
-
sidebar = sidebars.block;
|
|
125
|
-
}
|
|
126
|
-
sidebar = sidebars.document;
|
|
131
|
+
const shortcut = select(_keyboardShortcuts.store).getShortcutRepresentation('core/editor/toggle-sidebar');
|
|
132
|
+
const sidebar = select(interfaceStore).getActiveComplementaryArea('core');
|
|
133
|
+
const _isEditorSidebarOpened = [sidebars.block, sidebars.document].includes(sidebar);
|
|
134
|
+
let _tabName = sidebar;
|
|
135
|
+
if (!_isEditorSidebarOpened) {
|
|
136
|
+
_tabName = !!select(_blockEditor.store).getBlockSelectionStart() ? sidebars.block : sidebars.document;
|
|
127
137
|
}
|
|
128
|
-
const shortcut = select(_keyboardShortcuts.store).getShortcutRepresentation('core/edit-post/toggle-sidebar');
|
|
129
138
|
return {
|
|
130
|
-
|
|
131
|
-
isSettingsSidebarActive: isSettingsSidebar,
|
|
139
|
+
tabName: _tabName,
|
|
132
140
|
keyboardShortcut: shortcut,
|
|
133
141
|
isEditingTemplate: select(_editor.store).getCurrentPostType() === 'wp_template'
|
|
134
142
|
};
|
|
@@ -141,18 +149,12 @@ const SettingsSidebar = () => {
|
|
|
141
149
|
openGeneralSidebar(newSelectedTabId);
|
|
142
150
|
}
|
|
143
151
|
}, [openGeneralSidebar]);
|
|
144
|
-
return (0, _react.createElement)(Tabs
|
|
145
|
-
|
|
146
|
-
// `interfaceStore`), when the sidebar closes the currently selected
|
|
147
|
-
// tab can't be found. This causes the component to continuously reset
|
|
148
|
-
// the selection to `null` in an infinite loop.Proactively setting
|
|
149
|
-
// the selected tab to `null` avoids that.
|
|
150
|
-
, {
|
|
151
|
-
selectedTabId: isSettingsSidebarActive ? sidebarName : null,
|
|
152
|
+
return (0, _react.createElement)(Tabs, {
|
|
153
|
+
selectedTabId: tabName,
|
|
152
154
|
onSelect: onTabSelect,
|
|
153
155
|
selectOnMove: false
|
|
154
156
|
}, (0, _react.createElement)(SidebarContent, {
|
|
155
|
-
|
|
157
|
+
tabName: tabName,
|
|
156
158
|
keyboardShortcut: keyboardShortcut,
|
|
157
159
|
isEditingTemplate: isEditingTemplate
|
|
158
160
|
}));
|