@wordpress/edit-post 7.11.0 → 7.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/block-manager/category.js +14 -22
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/checklist.js +6 -13
- package/build/components/block-manager/checklist.js.map +1 -1
- package/build/components/block-manager/index.js +10 -14
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +21 -26
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build/components/device-preview/index.js +1 -1
- package/build/components/device-preview/index.js.map +1 -1
- package/build/components/editor-initialization/index.js +3 -4
- package/build/components/editor-initialization/index.js.map +1 -1
- package/build/components/header/document-title/index.js +103 -0
- package/build/components/header/document-title/index.js.map +1 -0
- package/build/components/header/fullscreen-mode-close/index.js +8 -9
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.native.js +12 -13
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/index.js +7 -6
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/main-dashboard-button/index.js +3 -4
- package/build/components/header/main-dashboard-button/index.js.map +1 -1
- package/build/components/header/more-menu/index.js +19 -23
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/post-publish-button-or-toggle.js +15 -16
- package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
- package/build/components/header/tools-more-menu-group/index.js +7 -10
- package/build/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +44 -54
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/layout/actions-panel.js +5 -6
- package/build/components/layout/actions-panel.js.map +1 -1
- package/build/components/layout/index.js +3 -4
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js +3 -7
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/meta-boxes/index.js +9 -13
- package/build/components/meta-boxes/index.js.map +1 -1
- package/build/components/meta-boxes/meta-box-visibility.js +5 -8
- package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js +3 -4
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js +16 -23
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/components/preferences-modal/options/enable-custom-fields.js +7 -9
- package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
- package/build/components/preferences-modal/options/enable-feature.js +12 -16
- package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/options/enable-panel.js +10 -17
- package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js +7 -10
- package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +58 -44
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/discussion-panel/index.js +5 -7
- package/build/components/sidebar/discussion-panel/index.js.map +1 -1
- package/build/components/sidebar/featured-image/index.js +9 -17
- package/build/components/sidebar/featured-image/index.js.map +1 -1
- package/build/components/sidebar/page-attributes/index.js +3 -9
- package/build/components/sidebar/page-attributes/index.js.map +1 -1
- package/build/components/sidebar/plugin-document-setting-panel/index.js +20 -25
- package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-post-publish-panel/index.js +12 -15
- package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-post-status-info/index.js +6 -9
- package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
- package/build/components/sidebar/plugin-pre-publish-panel/index.js +12 -15
- package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js +4 -5
- package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar/post-excerpt/index.js +5 -7
- package/build/components/sidebar/post-excerpt/index.js.map +1 -1
- package/build/components/sidebar/post-schedule/index.js +16 -23
- package/build/components/sidebar/post-schedule/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +7 -11
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/post-taxonomies/taxonomy-panel.js +9 -15
- package/build/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
- package/build/components/sidebar/post-template/create-modal.js +3 -4
- package/build/components/sidebar/post-template/create-modal.js.map +1 -1
- package/build/components/sidebar/post-template/form.js +13 -20
- package/build/components/sidebar/post-template/form.js.map +1 -1
- package/build/components/sidebar/post-template/index.js +18 -25
- package/build/components/sidebar/post-template/index.js.map +1 -1
- package/build/components/sidebar/post-url/index.js +16 -23
- package/build/components/sidebar/post-url/index.js.map +1 -1
- package/build/components/sidebar/post-visibility/index.js +26 -36
- package/build/components/sidebar/post-visibility/index.js.map +1 -1
- package/build/components/sidebar/settings-header/index.js +3 -4
- package/build/components/sidebar/settings-header/index.js.map +1 -1
- package/build/components/sidebar/template-summary/index.js +1 -1
- package/build/components/sidebar/template-summary/index.js.map +1 -1
- package/build/components/start-page-options/index.js +3 -4
- package/build/components/start-page-options/index.js.map +1 -1
- package/build/components/view-link/index.js +1 -1
- package/build/components/view-link/index.js.map +1 -1
- package/build/components/visual-editor/block-inspector-button.js +4 -5
- package/build/components/visual-editor/block-inspector-button.js.map +1 -1
- package/build/components/visual-editor/header.native.js +6 -7
- package/build/components/visual-editor/header.native.js.map +1 -1
- package/build/components/visual-editor/index.js +32 -48
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/components/welcome-guide/image.js +4 -5
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/editor.js +14 -20
- package/build/editor.js.map +1 -1
- package/build/editor.native.js +3 -6
- package/build/editor.native.js.map +1 -1
- package/build/hooks/validate-multiple-use/index.js +18 -29
- package/build/hooks/validate-multiple-use/index.js.map +1 -1
- package/build/plugins/index.js +20 -23
- package/build/plugins/index.js.map +1 -1
- package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +3 -4
- package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
- package/build/store/actions.js +60 -88
- package/build/store/actions.js.map +1 -1
- package/build/store/reducer.js +11 -43
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +11 -16
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-manager/category.js +14 -22
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/checklist.js +6 -13
- package/build-module/components/block-manager/checklist.js.map +1 -1
- package/build-module/components/block-manager/index.js +10 -14
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +21 -26
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build-module/components/device-preview/index.js +1 -1
- package/build-module/components/device-preview/index.js.map +1 -1
- package/build-module/components/editor-initialization/index.js +3 -4
- package/build-module/components/editor-initialization/index.js.map +1 -1
- package/build-module/components/header/document-title/index.js +88 -0
- package/build-module/components/header/document-title/index.js.map +1 -0
- package/build-module/components/header/fullscreen-mode-close/index.js +7 -8
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js +12 -13
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/index.js +7 -6
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/main-dashboard-button/index.js +3 -4
- package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +19 -23
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/post-publish-button-or-toggle.js +15 -16
- package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
- package/build-module/components/header/tools-more-menu-group/index.js +7 -10
- package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +42 -52
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/layout/actions-panel.js +5 -6
- package/build-module/components/layout/actions-panel.js.map +1 -1
- package/build-module/components/layout/index.js +3 -4
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +3 -7
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/meta-boxes/index.js +9 -13
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-box-visibility.js +5 -8
- package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js +3 -4
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +16 -23
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-custom-fields.js +7 -9
- package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-feature.js +12 -16
- package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-panel.js +10 -17
- package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js +7 -10
- package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +58 -44
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/discussion-panel/index.js +5 -7
- package/build-module/components/sidebar/discussion-panel/index.js.map +1 -1
- package/build-module/components/sidebar/featured-image/index.js +9 -17
- package/build-module/components/sidebar/featured-image/index.js.map +1 -1
- package/build-module/components/sidebar/page-attributes/index.js +3 -9
- package/build-module/components/sidebar/page-attributes/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-document-setting-panel/index.js +20 -25
- package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-post-publish-panel/index.js +12 -15
- package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-post-status-info/index.js +6 -9
- package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +12 -15
- package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js +4 -5
- package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-excerpt/index.js +5 -7
- package/build-module/components/sidebar/post-excerpt/index.js.map +1 -1
- package/build-module/components/sidebar/post-schedule/index.js +16 -23
- package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +7 -11
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js +9 -15
- package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
- package/build-module/components/sidebar/post-template/create-modal.js +3 -4
- package/build-module/components/sidebar/post-template/create-modal.js.map +1 -1
- package/build-module/components/sidebar/post-template/form.js +13 -20
- package/build-module/components/sidebar/post-template/form.js.map +1 -1
- package/build-module/components/sidebar/post-template/index.js +18 -25
- package/build-module/components/sidebar/post-template/index.js.map +1 -1
- package/build-module/components/sidebar/post-url/index.js +16 -23
- package/build-module/components/sidebar/post-url/index.js.map +1 -1
- package/build-module/components/sidebar/post-visibility/index.js +26 -36
- package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
- package/build-module/components/sidebar/settings-header/index.js +3 -4
- package/build-module/components/sidebar/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar/template-summary/index.js +1 -1
- package/build-module/components/sidebar/template-summary/index.js.map +1 -1
- package/build-module/components/start-page-options/index.js +3 -4
- package/build-module/components/start-page-options/index.js.map +1 -1
- package/build-module/components/view-link/index.js +1 -1
- package/build-module/components/view-link/index.js.map +1 -1
- package/build-module/components/visual-editor/block-inspector-button.js +4 -5
- package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/visual-editor/header.native.js +6 -7
- package/build-module/components/visual-editor/header.native.js.map +1 -1
- package/build-module/components/visual-editor/index.js +35 -49
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +4 -5
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/editor.js +14 -20
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js +3 -6
- package/build-module/editor.native.js.map +1 -1
- package/build-module/hooks/validate-multiple-use/index.js +18 -29
- package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
- package/build-module/plugins/index.js +20 -23
- package/build-module/plugins/index.js.map +1 -1
- package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +3 -4
- package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js +60 -88
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/reducer.js +11 -43
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +11 -16
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +63 -101
- package/build-style/style.css +63 -101
- package/package.json +32 -32
- package/src/components/header/document-title/index.js +86 -0
- package/src/components/header/document-title/style.scss +61 -0
- package/src/components/header/header-toolbar/style.scss +0 -1
- package/src/components/header/index.js +4 -2
- package/src/components/header/style.scss +6 -0
- package/src/components/secondary-sidebar/list-view-sidebar.js +68 -66
- package/src/components/secondary-sidebar/style.scss +28 -31
- package/src/components/visual-editor/index.js +10 -21
- package/src/components/visual-editor/style.scss +0 -13
- package/src/style.scss +1 -1
- package/build/components/header/template-title/delete-template.js +0 -117
- package/build/components/header/template-title/delete-template.js.map +0 -1
- package/build/components/header/template-title/edit-template-title.js +0 -95
- package/build/components/header/template-title/edit-template-title.js.map +0 -1
- package/build/components/header/template-title/index.js +0 -124
- package/build/components/header/template-title/index.js.map +0 -1
- package/build/components/header/template-title/template-description.js +0 -55
- package/build/components/header/template-title/template-description.js.map +0 -1
- package/build-module/components/header/template-title/delete-template.js +0 -104
- package/build-module/components/header/template-title/delete-template.js.map +0 -1
- package/build-module/components/header/template-title/edit-template-title.js +0 -83
- package/build-module/components/header/template-title/edit-template-title.js.map +0 -1
- package/build-module/components/header/template-title/index.js +0 -105
- package/build-module/components/header/template-title/index.js.map +0 -1
- package/build-module/components/header/template-title/template-description.js +0 -45
- package/build-module/components/header/template-title/template-description.js.map +0 -1
- package/src/components/header/template-title/delete-template.js +0 -106
- package/src/components/header/template-title/edit-template-title.js +0 -78
- package/src/components/header/template-title/index.js +0 -115
- package/src/components/header/template-title/style.scss +0 -94
- package/src/components/header/template-title/template-description.js +0 -42
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/components/layout/actions-panel.js"],"names":["Fill","Slot","ActionsPanelFill","ActionsPanel","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","isEntitiesSavedStatesOpen","closePublishSidebar","togglePublishSidebar","editPostStore","publishSidebarOpened","hasActiveMetaboxes","isSavingMetaBoxes","hasNonPostEntityChanges","select","isPublishSidebarOpened","hasMetaBoxes","editorStore","openEntitiesSavedStates","unmountableContent","PluginPrePublishPanel","PluginPostPublishPanel"],"mappings":";;;;;;;;;;AAWA;;AARA;;AAKA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AAjBA;AACA;AACA;;AAUA;AACA;AACA;AAKA,MAAM;AAAEA,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiB,gCAAgB,cAAhB,CAAvB;AAEO,MAAMC,gBAAgB,GAAGF,IAAzB;;;AAEQ,SAASG,YAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/components/layout/actions-panel.js"],"names":["Fill","Slot","ActionsPanelFill","ActionsPanel","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","isEntitiesSavedStatesOpen","closePublishSidebar","togglePublishSidebar","editPostStore","publishSidebarOpened","hasActiveMetaboxes","isSavingMetaBoxes","hasNonPostEntityChanges","select","isPublishSidebarOpened","hasMetaBoxes","editorStore","openEntitiesSavedStates","unmountableContent","PluginPrePublishPanel","PluginPostPublishPanel"],"mappings":";;;;;;;;;;AAWA;;AARA;;AAKA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AAjBA;AACA;AACA;;AAUA;AACA;AACA;AAKA,MAAM;AAAEA,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiB,gCAAgB,cAAhB,CAAvB;AAEO,MAAMC,gBAAgB,GAAGF,IAAzB;;;AAEQ,SAASG,YAAT,CAAuB;AACrCC,EAAAA,8BADqC;AAErCC,EAAAA,wBAFqC;AAGrCC,EAAAA;AAHqC,CAAvB,EAIX;AACH,QAAM;AAAEC,IAAAA,mBAAF;AAAuBC,IAAAA;AAAvB,MACL,uBAAaC,YAAb,CADD;AAEA,QAAM;AACLC,IAAAA,oBADK;AAELC,IAAAA,kBAFK;AAGLC,IAAAA,iBAHK;AAILC,IAAAA;AAJK,MAKF,qBAAaC,MAAF,IAAc;AAC5B,WAAO;AACNJ,MAAAA,oBAAoB,EACnBI,MAAM,CAAEL,YAAF,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;;AACA,SACC,qDACGF,yBAAyB,IAC1B,4BAAC,2BAAD;AAAqB,IAAA,KAAK,EAAGD;AAA7B,IAFF,EAIC,4BAAC,IAAD;AAAM,IAAA,gBAAgB;AAAtB,IAJD,EAKG,CAAEC,yBAAF,IAA+Ba,kBALlC,CADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tEntitiesSavedStates,\n\tPostPublishPanel,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport PluginPostPublishPanel from '../sidebar/plugin-post-publish-panel';\nimport PluginPrePublishPanel from '../sidebar/plugin-pre-publish-panel';\nimport { store as editPostStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'ActionsPanel' );\n\nexport const ActionsPanelFill = Fill;\n\nexport default function ActionsPanel( {\n\tsetEntitiesSavedStatesCallback,\n\tcloseEntitiesSavedStates,\n\tisEntitiesSavedStatesOpen,\n} ) {\n\tconst { closePublishSidebar, togglePublishSidebar } =\n\t\tuseDispatch( editPostStore );\n\tconst {\n\t\tpublishSidebarOpened,\n\t\thasActiveMetaboxes,\n\t\tisSavingMetaBoxes,\n\t\thasNonPostEntityChanges,\n\t} = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpublishSidebarOpened:\n\t\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tisSavingMetaBoxes: select( editPostStore ).isSavingMetaBoxes(),\n\t\t\thasNonPostEntityChanges:\n\t\t\t\tselect( editorStore ).hasNonPostEntityChanges(),\n\t\t};\n\t}, [] );\n\n\tconst openEntitiesSavedStates = useCallback(\n\t\t() => setEntitiesSavedStatesCallback( true ),\n\t\t[]\n\t);\n\n\t// It is ok for these components to be unmounted when not in visual use.\n\t// We don't want more than one present at a time, decide which to render.\n\tlet unmountableContent;\n\tif ( publishSidebarOpened ) {\n\t\tunmountableContent = (\n\t\t\t<PostPublishPanel\n\t\t\t\tonClose={ closePublishSidebar }\n\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\tforceIsSaving={ isSavingMetaBoxes }\n\t\t\t\tPrePublishExtension={ PluginPrePublishPanel.Slot }\n\t\t\t\tPostPublishExtension={ PluginPostPublishPanel.Slot }\n\t\t\t/>\n\t\t);\n\t} else if ( hasNonPostEntityChanges ) {\n\t\tunmountableContent = (\n\t\t\t<div className=\"edit-post-layout__toggle-entities-saved-states-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"edit-post-layout__toggle-entities-saved-states-panel-button\"\n\t\t\t\t\tonClick={ openEntitiesSavedStates }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\tunmountableContent = (\n\t\t\t<div className=\"edit-post-layout__toggle-publish-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"edit-post-layout__toggle-publish-panel-button\"\n\t\t\t\t\tonClick={ togglePublishSidebar }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open publish panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Since EntitiesSavedStates controls its own panel, we can keep it\n\t// always mounted to retain its own component state (such as checkboxes).\n\treturn (\n\t\t<>\n\t\t\t{ isEntitiesSavedStatesOpen && (\n\t\t\t\t<EntitiesSavedStates close={ closeEntitiesSavedStates } />\n\t\t\t) }\n\t\t\t<Slot bubblesVirtually />\n\t\t\t{ ! isEntitiesSavedStatesOpen && unmountableContent }\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -89,10 +89,9 @@ const interfaceLabels = {
|
|
|
89
89
|
footer: (0, _i18n.__)('Editor footer')
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
function Layout(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
} = _ref;
|
|
92
|
+
function Layout({
|
|
93
|
+
styles
|
|
94
|
+
}) {
|
|
96
95
|
const isMobileViewport = (0, _compose.useViewportMatch)('medium', '<');
|
|
97
96
|
const isHugeViewport = (0, _compose.useViewportMatch)('huge', '>=');
|
|
98
97
|
const isLargeViewport = (0, _compose.useViewportMatch)('large');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/components/layout/index.js"],"names":["interfaceLabels","header","body","sidebar","actions","footer","Layout","styles","isMobileViewport","isHugeViewport","isLargeViewport","openGeneralSidebar","closeGeneralSidebar","setIsInserterOpened","editPostStore","createErrorNotice","noticesStore","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","hasFixedToolbar","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","isTemplateMode","documentLabel","select","getEditorSettings","getPostTypeLabel","editorStore","editorSettings","postTypeLabel","isEditingTemplate","isFeatureActive","interfaceStore","getActiveComplementaryArea","name","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","keyboardShortcutsStore","getAllShortcutKeyCombinations","openSidebarPanel","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","arg","className","secondarySidebarLabel","secondarySidebar","onPluginAreaError","previous","next"],"mappings":";;;;;;;;;AA6BA;;AA1BA;;AAKA;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAOA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAlDA;AACA;AACA;;AAGA;AACA;AACA;;AA0BA;AACA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AQ,EAAEpC,gBADC;AAEXqC,MAAAA,IAAI,EAAEpC;AAFK;AAhFb,IATD,EA8FC,4BAAC,yBAAD,OA9FD,EA+FC,4BAAC,kCAAD,OA/FD,EAgGC,4BAAC,qBAAD,OAhGD,EAiGC,4BAAC,yBAAD,OAjGD,EAkGC,4BAAC,mBAAD,CAAS,IAAT,OAlGD,EAmGC,4BAAC,mBAAD;AAAY,IAAA,OAAO,EAAGkC;AAAtB,IAnGD,CADD;AAuGA;;eAEcpD,M","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { BlockBreadcrumb } from '@wordpress/block-editor';\nimport { Button, ScrollLock, Popover } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tFullscreenMode,\n\tInterfaceSkeleton,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { useState, useEffect, useCallback } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport EditPostPreferencesModal from '../preferences-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport InserterSidebar from '../secondary-sidebar/inserter-sidebar';\nimport ListViewSidebar from '../secondary-sidebar/list-view-sidebar';\nimport SettingsSidebar from '../sidebar/settings-sidebar';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport ActionsPanel from './actions-panel';\nimport StartPageOptions from '../start-page-options';\nimport { store as editPostStore } from '../../store';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nfunction Layout( { styles } ) {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\tconst { openGeneralSidebar, closeGeneralSidebar, setIsInserterOpened } =\n\t\tuseDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tisRichEditingEnabled,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\thasFixedToolbar,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tisTemplateMode,\n\t\tdocumentLabel,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tisTemplateMode: select( editPostStore ).isEditingTemplate(),\n\t\t\thasFixedToolbar:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fixedToolbar' ),\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\t\teditPostStore.name\n\t\t\t\t) || select( editPostStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editPostStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editPostStore ).isListViewOpened(),\n\t\t\tmode: select( editPostStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/next-region' ),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t\tisDistractionFree:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: select( editPostStore ).isFeatureActive(\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\tdocumentLabel: postTypeLabel || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\tconst openSidebarPanel = () =>\n\t\topenGeneralSidebar(\n\t\t\thasBlockSelected ? 'edit-post/block' : 'edit-post/document'\n\t\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( sidebarIsOpened && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t}\n\t}, [ sidebarIsOpened, isHugeViewport ] );\n\tuseEffect( () => {\n\t\tif ( isInserterOpened && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isHugeViewport ] );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\tconst className = classnames( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'show-icon-labels': showIconLabels,\n\t\t'is-distraction-free': isDistractionFree && isLargeViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t} );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\tconst secondarySidebar = () => {\n\t\tif ( mode === 'visual' && isInserterOpened ) {\n\t\t\treturn <InserterSidebar />;\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn <ListViewSidebar />;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<SettingsSidebar />\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isLargeViewport }\n\t\t\t\tclassName={ className }\n\t\t\t\tlabels={ {\n\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t} }\n\t\t\t\theader={\n\t\t\t\t\t<Header\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\t\tsecondarySidebar={ secondarySidebar() }\n\t\t\t\tsidebar={\n\t\t\t\t\t( ! isMobileViewport || sidebarIsOpened ) && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! isMobileViewport && ! sidebarIsOpened && (\n\t\t\t\t\t\t\t\t<div className=\"edit-post-layout__toggle-sidebar-panel\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-post-layout__toggle-sidebar-panel-button\"\n\t\t\t\t\t\t\t\t\t\tonClick={ openSidebarPanel }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ hasBlockSelected\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Open block settings' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Open document settings' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-post\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isDistractionFree && <EditorNotices /> }\n\t\t\t\t\t\t{ ( mode === 'text' || ! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t<TextEditor />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isRichEditingEnabled && mode === 'visual' && (\n\t\t\t\t\t\t\t<VisualEditor styles={ styles } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isDistractionFree && ! isTemplateMode && (\n\t\t\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isMobileViewport && sidebarIsOpened && (\n\t\t\t\t\t\t\t<ScrollLock />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t! isMobileViewport &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\tisRichEditingEnabled &&\n\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t<div className=\"edit-post-layout__footer\">\n\t\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<ActionsPanel\n\t\t\t\t\t\tcloseEntitiesSavedStates={ closeEntitiesSavedStates }\n\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tshortcuts={ {\n\t\t\t\t\tprevious: previousShortcut,\n\t\t\t\t\tnext: nextShortcut,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<EditPostPreferencesModal />\n\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t<WelcomeGuide />\n\t\t\t<StartPageOptions />\n\t\t\t<Popover.Slot />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/components/layout/index.js"],"names":["interfaceLabels","header","body","sidebar","actions","footer","Layout","styles","isMobileViewport","isHugeViewport","isLargeViewport","openGeneralSidebar","closeGeneralSidebar","setIsInserterOpened","editPostStore","createErrorNotice","noticesStore","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","hasFixedToolbar","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","isTemplateMode","documentLabel","select","getEditorSettings","getPostTypeLabel","editorStore","editorSettings","postTypeLabel","isEditingTemplate","isFeatureActive","interfaceStore","getActiveComplementaryArea","name","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","keyboardShortcutsStore","getAllShortcutKeyCombinations","openSidebarPanel","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","arg","className","secondarySidebarLabel","secondarySidebar","onPluginAreaError","previous","next"],"mappings":";;;;;;;;;AA6BA;;AA1BA;;AAKA;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAOA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAlDA;AACA;AACA;;AAGA;AACA;AACA;;AA0BA;AACA;AACA;AAiBA,MAAMA,eAAe,GAAG;AACvB;AACAC,EAAAA,MAAM,EAAE,cAAI,gBAAJ,CAFe;;AAGvB;AACAC,EAAAA,IAAI,EAAE,cAAI,gBAAJ,CAJiB;;A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,OAhGD,EAiGC,4BAAC,yBAAD,OAjGD,EAkGC,4BAAC,mBAAD,CAAS,IAAT,OAlGD,EAmGC,4BAAC,mBAAD;AAAY,IAAA,OAAO,EAAGkC;AAAtB,IAnGD,CADD;AAuGA;;eAEcpD,M","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { BlockBreadcrumb } from '@wordpress/block-editor';\nimport { Button, ScrollLock, Popover } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tFullscreenMode,\n\tInterfaceSkeleton,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { useState, useEffect, useCallback } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport EditPostPreferencesModal from '../preferences-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport InserterSidebar from '../secondary-sidebar/inserter-sidebar';\nimport ListViewSidebar from '../secondary-sidebar/list-view-sidebar';\nimport SettingsSidebar from '../sidebar/settings-sidebar';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport ActionsPanel from './actions-panel';\nimport StartPageOptions from '../start-page-options';\nimport { store as editPostStore } from '../../store';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nfunction Layout( { styles } ) {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\tconst { openGeneralSidebar, closeGeneralSidebar, setIsInserterOpened } =\n\t\tuseDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tisRichEditingEnabled,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\thasFixedToolbar,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tisTemplateMode,\n\t\tdocumentLabel,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tisTemplateMode: select( editPostStore ).isEditingTemplate(),\n\t\t\thasFixedToolbar:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fixedToolbar' ),\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\t\teditPostStore.name\n\t\t\t\t) || select( editPostStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editPostStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editPostStore ).isListViewOpened(),\n\t\t\tmode: select( editPostStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/next-region' ),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t\tisDistractionFree:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: select( editPostStore ).isFeatureActive(\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\tdocumentLabel: postTypeLabel || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\tconst openSidebarPanel = () =>\n\t\topenGeneralSidebar(\n\t\t\thasBlockSelected ? 'edit-post/block' : 'edit-post/document'\n\t\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( sidebarIsOpened && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t}\n\t}, [ sidebarIsOpened, isHugeViewport ] );\n\tuseEffect( () => {\n\t\tif ( isInserterOpened && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isHugeViewport ] );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\tconst className = classnames( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'show-icon-labels': showIconLabels,\n\t\t'is-distraction-free': isDistractionFree && isLargeViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t} );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\tconst secondarySidebar = () => {\n\t\tif ( mode === 'visual' && isInserterOpened ) {\n\t\t\treturn <InserterSidebar />;\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn <ListViewSidebar />;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<SettingsSidebar />\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isLargeViewport }\n\t\t\t\tclassName={ className }\n\t\t\t\tlabels={ {\n\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t} }\n\t\t\t\theader={\n\t\t\t\t\t<Header\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\t\tsecondarySidebar={ secondarySidebar() }\n\t\t\t\tsidebar={\n\t\t\t\t\t( ! isMobileViewport || sidebarIsOpened ) && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! isMobileViewport && ! sidebarIsOpened && (\n\t\t\t\t\t\t\t\t<div className=\"edit-post-layout__toggle-sidebar-panel\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-post-layout__toggle-sidebar-panel-button\"\n\t\t\t\t\t\t\t\t\t\tonClick={ openSidebarPanel }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ hasBlockSelected\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Open block settings' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Open document settings' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-post\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isDistractionFree && <EditorNotices /> }\n\t\t\t\t\t\t{ ( mode === 'text' || ! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t<TextEditor />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isRichEditingEnabled && mode === 'visual' && (\n\t\t\t\t\t\t\t<VisualEditor styles={ styles } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isDistractionFree && ! isTemplateMode && (\n\t\t\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isMobileViewport && sidebarIsOpened && (\n\t\t\t\t\t\t\t<ScrollLock />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t! isMobileViewport &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\tisRichEditingEnabled &&\n\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t<div className=\"edit-post-layout__footer\">\n\t\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<ActionsPanel\n\t\t\t\t\t\tcloseEntitiesSavedStates={ closeEntitiesSavedStates }\n\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tshortcuts={ {\n\t\t\t\t\tprevious: previousShortcut,\n\t\t\t\t\tnext: nextShortcut,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<EditPostPreferencesModal />\n\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t<WelcomeGuide />\n\t\t\t<StartPageOptions />\n\t\t\t<Popover.Slot />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"]}
|
|
@@ -70,9 +70,7 @@ class Layout extends _element.Component {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
componentWillUnmount() {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
(_this$safeAreaSubscri = this.safeAreaSubscription) === null || _this$safeAreaSubscri === void 0 ? void 0 : _this$safeAreaSubscri.remove();
|
|
73
|
+
this.safeAreaSubscription?.remove();
|
|
76
74
|
this._isMounted = false;
|
|
77
75
|
}
|
|
78
76
|
|
|
@@ -146,7 +144,7 @@ class Layout extends _element.Component {
|
|
|
146
144
|
bottom: this.state.safeAreaInsets.bottom,
|
|
147
145
|
backgroundColor: containerStyles.backgroundColor
|
|
148
146
|
};
|
|
149
|
-
const editorStyles = [getStylesFromColorScheme(_style.default.background, _style.default.backgroundDark),
|
|
147
|
+
const editorStyles = [getStylesFromColorScheme(_style.default.background, _style.default.backgroundDark), globalStyles?.background && {
|
|
150
148
|
backgroundColor: globalStyles.background
|
|
151
149
|
}];
|
|
152
150
|
return (0, _element.createElement)(_components.Tooltip.Slot, null, (0, _element.createElement)(_reactNative.SafeAreaView, {
|
|
@@ -172,8 +170,6 @@ class Layout extends _element.Component {
|
|
|
172
170
|
}
|
|
173
171
|
|
|
174
172
|
var _default = (0, _compose.compose)([(0, _data.withSelect)(select => {
|
|
175
|
-
var _getSettings, _getSettings$__experi;
|
|
176
|
-
|
|
177
173
|
const {
|
|
178
174
|
__unstableIsEditorReady: isEditorReady
|
|
179
175
|
} = select(_editor.store);
|
|
@@ -183,7 +179,7 @@ var _default = (0, _compose.compose)([(0, _data.withSelect)(select => {
|
|
|
183
179
|
const {
|
|
184
180
|
getSettings
|
|
185
181
|
} = select(_blockEditor.store);
|
|
186
|
-
const globalStyles =
|
|
182
|
+
const globalStyles = getSettings()?.__experimentalGlobalStylesBaseStyles?.color;
|
|
187
183
|
return {
|
|
188
184
|
isReady: isEditorReady(),
|
|
189
185
|
mode: getEditorMode(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/components/layout/index.native.js"],"names":["Layout","Component","constructor","arguments","onSafeAreaInsetsUpdate","bind","onRootViewLayout","state","rootViewHeight","safeAreaInsets","top","bottom","right","left","SafeArea","getSafeAreaInsetsForRootView","then","componentDidMount","_isMounted","safeAreaSubscription","addEventListener","componentWillUnmount","remove","result","setState","event","setHeightState","height","nativeEvent","layout","sendNativeEditorDidLayout","renderHTML","globalStyles","props","renderVisual","isReady","setTitleRef","render","getStylesFromColorScheme","mode","isHtmlView","marginBottom","Platform","OS","headerToolbarStyles","containerStyles","styles","container","containerDark","toolbarKeyboardAvoidingViewStyle","toolbarKeyboardAvoidingView","backgroundColor","editorStyles","background","backgroundDark","flex","flexBasis","select","__unstableIsEditorReady","isEditorReady","editorStore","getEditorMode","editPostStore","getSettings","blockEditorStore","__experimentalGlobalStylesBaseStyles","color","withPreferredColorScheme"],"mappings":";;;;;;;;;AASA;;AANA;;AACA;;AAMA;;AACA;;AAKA;;AACA;;AAOA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAlCA;AACA;AACA;;AAIA;AACA;AACA;;AAmBA;AACA;AACA;AAOA,MAAMA,MAAN,SAAqBC,kBAArB,CAA+B;AAC9BC,EAAAA,WAAW,GAAG;AACb,UAAO,GAAGC,SAAV;AAEA,SAAKC,sBAAL,GAA8B,KAAKA,sBAAL,CAA4BC,IAA5B,CAAkC,IAAlC,CAA9B;AACA,SAAKC,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBD,IAAtB,CAA4B,IAA5B,CAAxB;AAEA,SAAKE,KAAL,GAAa;AACZC,MAAAA,cAAc,EAAE,CADJ;AAEZC,MAAAA,cAAc,EAAE;AAAEC,QAAAA,GAAG,EAAE,CAAP;AAAUC,QAAAA,MAAM,EAAE,CAAlB;AAAqBC,QAAAA,KAAK,EAAE,CAA5B;A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ADhB;AAENpB,IAAAA,IAAI,EAAEsB,aAAa,EAFb;AAGN7B,IAAAA;AAHM,GAAP;AAKA,CAbD,CADuB,EAevBmC,iCAfuB,CAAT,EAgBVnE,MAhBU,C","sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, SafeAreaView, View } from 'react-native';\nimport SafeArea from 'react-native-safe-area';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport {\n\tBottomSheetSettings,\n\tFloatingToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport {\n\tHTMLTextInput,\n\tKeyboardAvoidingView,\n\tNoticeList,\n\tTooltip,\n\t__unstableAutocompletionItemsSlot as AutocompletionItemsSlot,\n} from '@wordpress/components';\nimport { AutosaveMonitor, store as editorStore } from '@wordpress/editor';\nimport { sendNativeEditorDidLayout } from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport headerToolbarStyles from '../header/header-toolbar/style.scss';\nimport Header from '../header';\nimport VisualEditor from '../visual-editor';\nimport { store as editPostStore } from '../../store';\n\nclass Layout extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onSafeAreaInsetsUpdate = this.onSafeAreaInsetsUpdate.bind( this );\n\t\tthis.onRootViewLayout = this.onRootViewLayout.bind( this );\n\n\t\tthis.state = {\n\t\t\trootViewHeight: 0,\n\t\t\tsafeAreaInsets: { top: 0, bottom: 0, right: 0, left: 0 },\n\t\t};\n\n\t\tSafeArea.getSafeAreaInsetsForRootView().then(\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis._isMounted = true;\n\t\tthis.safeAreaSubscription = SafeArea.addEventListener(\n\t\t\t'safeAreaInsetsForRootViewDidChange',\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.safeAreaSubscription?.remove();\n\t\tthis._isMounted = false;\n\t}\n\n\tonSafeAreaInsetsUpdate( result ) {\n\t\tconst { safeAreaInsets } = result;\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setState( { safeAreaInsets } );\n\t\t}\n\t}\n\n\tonRootViewLayout( event ) {\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setHeightState( event );\n\t\t}\n\t}\n\n\tsetHeightState( event ) {\n\t\tconst { height } = event.nativeEvent.layout;\n\t\tif ( height !== this.state.rootViewHeight ) {\n\t\t\tthis.setState(\n\t\t\t\t{ rootViewHeight: height },\n\t\t\t\tsendNativeEditorDidLayout\n\t\t\t);\n\t\t}\n\t}\n\n\trenderHTML() {\n\t\tconst { globalStyles } = this.props;\n\t\treturn (\n\t\t\t<HTMLTextInput\n\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\tstyle={ globalStyles }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderVisual() {\n\t\tconst { isReady } = this.props;\n\n\t\tif ( ! isReady ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn <VisualEditor setTitleRef={ this.props.setTitleRef } />;\n\t}\n\n\trender() {\n\t\tconst { getStylesFromColorScheme, mode, globalStyles } = this.props;\n\n\t\tconst isHtmlView = mode === 'text';\n\n\t\t// Add a margin view at the bottom for the header.\n\t\tconst marginBottom =\n\t\t\tPlatform.OS === 'android' && ! isHtmlView\n\t\t\t\t? headerToolbarStyles[ 'header-toolbar__container' ].height\n\t\t\t\t: 0;\n\n\t\tconst containerStyles = getStylesFromColorScheme(\n\t\t\tstyles.container,\n\t\t\tstyles.containerDark\n\t\t);\n\n\t\tconst toolbarKeyboardAvoidingViewStyle = {\n\t\t\t...styles.toolbarKeyboardAvoidingView,\n\t\t\tleft: this.state.safeAreaInsets.left,\n\t\t\tright: this.state.safeAreaInsets.right,\n\t\t\tbottom: this.state.safeAreaInsets.bottom,\n\t\t\tbackgroundColor: containerStyles.backgroundColor,\n\t\t};\n\n\t\tconst editorStyles = [\n\t\t\tgetStylesFromColorScheme(\n\t\t\t\tstyles.background,\n\t\t\t\tstyles.backgroundDark\n\t\t\t),\n\t\t\tglobalStyles?.background && {\n\t\t\t\tbackgroundColor: globalStyles.background,\n\t\t\t},\n\t\t];\n\n\t\treturn (\n\t\t\t<Tooltip.Slot>\n\t\t\t\t<SafeAreaView\n\t\t\t\t\tstyle={ containerStyles }\n\t\t\t\t\tonLayout={ this.onRootViewLayout }\n\t\t\t\t>\n\t\t\t\t\t<AutosaveMonitor disableIntervalChecks />\n\t\t\t\t\t<View style={ editorStyles }>\n\t\t\t\t\t\t{ isHtmlView ? this.renderHTML() : this.renderVisual() }\n\t\t\t\t\t\t{ ! isHtmlView && Platform.OS === 'android' && (\n\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<NoticeList />\n\t\t\t\t\t</View>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tflex: 0,\n\t\t\t\t\t\t\tflexBasis: marginBottom,\n\t\t\t\t\t\t\theight: marginBottom,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isHtmlView && (\n\t\t\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\t\t\t\tstyle={ toolbarKeyboardAvoidingViewStyle }\n\t\t\t\t\t\t\twithAnimatedHeight\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ Platform.OS === 'ios' && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<AutocompletionItemsSlot />\n\t\t\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Header />\n\t\t\t\t\t\t\t<BottomSheetSettings />\n\t\t\t\t\t\t</KeyboardAvoidingView>\n\t\t\t\t\t) }\n\t\t\t\t\t{ Platform.OS === 'android' && <AutocompletionItemsSlot /> }\n\t\t\t\t</SafeAreaView>\n\t\t\t</Tooltip.Slot>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { __unstableIsEditorReady: isEditorReady } =\n\t\t\tselect( editorStore );\n\t\tconst { getEditorMode } = select( editPostStore );\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst globalStyles =\n\t\t\tgetSettings()?.__experimentalGlobalStylesBaseStyles?.color;\n\n\t\treturn {\n\t\t\tisReady: isEditorReady(),\n\t\t\tmode: getEditorMode(),\n\t\t\tglobalStyles,\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( Layout );\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/components/layout/index.native.js"],"names":["Layout","Component","constructor","arguments","onSafeAreaInsetsUpdate","bind","onRootViewLayout","state","rootViewHeight","safeAreaInsets","top","bottom","right","left","SafeArea","getSafeAreaInsetsForRootView","then","componentDidMount","_isMounted","safeAreaSubscription","addEventListener","componentWillUnmount","remove","result","setState","event","setHeightState","height","nativeEvent","layout","sendNativeEditorDidLayout","renderHTML","globalStyles","props","renderVisual","isReady","setTitleRef","render","getStylesFromColorScheme","mode","isHtmlView","marginBottom","Platform","OS","headerToolbarStyles","containerStyles","styles","container","containerDark","toolbarKeyboardAvoidingViewStyle","toolbarKeyboardAvoidingView","backgroundColor","editorStyles","background","backgroundDark","flex","flexBasis","select","__unstableIsEditorReady","isEditorReady","editorStore","getEditorMode","editPostStore","getSettings","blockEditorStore","__experimentalGlobalStylesBaseStyles","color","withPreferredColorScheme"],"mappings":";;;;;;;;;AASA;;AANA;;AACA;;AAMA;;AACA;;AAKA;;AACA;;AAOA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAlCA;AACA;AACA;;AAIA;AACA;AACA;;AAmBA;AACA;AACA;AAOA,MAAMA,MAAN,SAAqBC,kBAArB,CAA+B;AAC9B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AAA,uBAAuB,EAAEC;AAA3B,MACLF,MAAM,CAAEG,aAAF,CADP;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAoBJ,MAAM,CAAEK,YAAF,CAAhC;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAkBN,MAAM,CAAEO,kBAAF,CAA9B;AACA,QAAMhC,YAAY,GACjB+B,WAAW,IAAIE,oCAAf,EAAqDC,KADtD;AAGA,SAAO;AACN/B,IAAAA,OAAO,EAAEwB,aAAa,EADhB;AAENpB,IAAAA,IAAI,EAAEsB,aAAa,EAFb;AAGN7B,IAAAA;AAHM,GAAP;AAKA,CAbD,CADuB,EAevBmC,iCAfuB,CAAT,EAgBVnE,MAhBU,C","sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, SafeAreaView, View } from 'react-native';\nimport SafeArea from 'react-native-safe-area';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport {\n\tBottomSheetSettings,\n\tFloatingToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport {\n\tHTMLTextInput,\n\tKeyboardAvoidingView,\n\tNoticeList,\n\tTooltip,\n\t__unstableAutocompletionItemsSlot as AutocompletionItemsSlot,\n} from '@wordpress/components';\nimport { AutosaveMonitor, store as editorStore } from '@wordpress/editor';\nimport { sendNativeEditorDidLayout } from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport headerToolbarStyles from '../header/header-toolbar/style.scss';\nimport Header from '../header';\nimport VisualEditor from '../visual-editor';\nimport { store as editPostStore } from '../../store';\n\nclass Layout extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onSafeAreaInsetsUpdate = this.onSafeAreaInsetsUpdate.bind( this );\n\t\tthis.onRootViewLayout = this.onRootViewLayout.bind( this );\n\n\t\tthis.state = {\n\t\t\trootViewHeight: 0,\n\t\t\tsafeAreaInsets: { top: 0, bottom: 0, right: 0, left: 0 },\n\t\t};\n\n\t\tSafeArea.getSafeAreaInsetsForRootView().then(\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis._isMounted = true;\n\t\tthis.safeAreaSubscription = SafeArea.addEventListener(\n\t\t\t'safeAreaInsetsForRootViewDidChange',\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.safeAreaSubscription?.remove();\n\t\tthis._isMounted = false;\n\t}\n\n\tonSafeAreaInsetsUpdate( result ) {\n\t\tconst { safeAreaInsets } = result;\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setState( { safeAreaInsets } );\n\t\t}\n\t}\n\n\tonRootViewLayout( event ) {\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setHeightState( event );\n\t\t}\n\t}\n\n\tsetHeightState( event ) {\n\t\tconst { height } = event.nativeEvent.layout;\n\t\tif ( height !== this.state.rootViewHeight ) {\n\t\t\tthis.setState(\n\t\t\t\t{ rootViewHeight: height },\n\t\t\t\tsendNativeEditorDidLayout\n\t\t\t);\n\t\t}\n\t}\n\n\trenderHTML() {\n\t\tconst { globalStyles } = this.props;\n\t\treturn (\n\t\t\t<HTMLTextInput\n\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\tstyle={ globalStyles }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderVisual() {\n\t\tconst { isReady } = this.props;\n\n\t\tif ( ! isReady ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn <VisualEditor setTitleRef={ this.props.setTitleRef } />;\n\t}\n\n\trender() {\n\t\tconst { getStylesFromColorScheme, mode, globalStyles } = this.props;\n\n\t\tconst isHtmlView = mode === 'text';\n\n\t\t// Add a margin view at the bottom for the header.\n\t\tconst marginBottom =\n\t\t\tPlatform.OS === 'android' && ! isHtmlView\n\t\t\t\t? headerToolbarStyles[ 'header-toolbar__container' ].height\n\t\t\t\t: 0;\n\n\t\tconst containerStyles = getStylesFromColorScheme(\n\t\t\tstyles.container,\n\t\t\tstyles.containerDark\n\t\t);\n\n\t\tconst toolbarKeyboardAvoidingViewStyle = {\n\t\t\t...styles.toolbarKeyboardAvoidingView,\n\t\t\tleft: this.state.safeAreaInsets.left,\n\t\t\tright: this.state.safeAreaInsets.right,\n\t\t\tbottom: this.state.safeAreaInsets.bottom,\n\t\t\tbackgroundColor: containerStyles.backgroundColor,\n\t\t};\n\n\t\tconst editorStyles = [\n\t\t\tgetStylesFromColorScheme(\n\t\t\t\tstyles.background,\n\t\t\t\tstyles.backgroundDark\n\t\t\t),\n\t\t\tglobalStyles?.background && {\n\t\t\t\tbackgroundColor: globalStyles.background,\n\t\t\t},\n\t\t];\n\n\t\treturn (\n\t\t\t<Tooltip.Slot>\n\t\t\t\t<SafeAreaView\n\t\t\t\t\tstyle={ containerStyles }\n\t\t\t\t\tonLayout={ this.onRootViewLayout }\n\t\t\t\t>\n\t\t\t\t\t<AutosaveMonitor disableIntervalChecks />\n\t\t\t\t\t<View style={ editorStyles }>\n\t\t\t\t\t\t{ isHtmlView ? this.renderHTML() : this.renderVisual() }\n\t\t\t\t\t\t{ ! isHtmlView && Platform.OS === 'android' && (\n\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<NoticeList />\n\t\t\t\t\t</View>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tflex: 0,\n\t\t\t\t\t\t\tflexBasis: marginBottom,\n\t\t\t\t\t\t\theight: marginBottom,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isHtmlView && (\n\t\t\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\t\t\t\tstyle={ toolbarKeyboardAvoidingViewStyle }\n\t\t\t\t\t\t\twithAnimatedHeight\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ Platform.OS === 'ios' && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<AutocompletionItemsSlot />\n\t\t\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Header />\n\t\t\t\t\t\t\t<BottomSheetSettings />\n\t\t\t\t\t\t</KeyboardAvoidingView>\n\t\t\t\t\t) }\n\t\t\t\t\t{ Platform.OS === 'android' && <AutocompletionItemsSlot /> }\n\t\t\t\t</SafeAreaView>\n\t\t\t</Tooltip.Slot>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { __unstableIsEditorReady: isEditorReady } =\n\t\t\tselect( editorStore );\n\t\tconst { getEditorMode } = select( editPostStore );\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst globalStyles =\n\t\t\tgetSettings()?.__experimentalGlobalStylesBaseStyles?.color;\n\n\t\treturn {\n\t\t\tisReady: isEditorReady(),\n\t\t\tmode: getEditorMode(),\n\t\t\tglobalStyles,\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( Layout );\n"]}
|
|
@@ -26,10 +26,9 @@ var _store = require("../../store");
|
|
|
26
26
|
/**
|
|
27
27
|
* Internal dependencies
|
|
28
28
|
*/
|
|
29
|
-
function MetaBoxes(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref;
|
|
29
|
+
function MetaBoxes({
|
|
30
|
+
location
|
|
31
|
+
}) {
|
|
33
32
|
const registry = (0, _data.useRegistry)();
|
|
34
33
|
const {
|
|
35
34
|
metaBoxes,
|
|
@@ -62,15 +61,12 @@ function MetaBoxes(_ref) {
|
|
|
62
61
|
return null;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
return (0, _element.createElement)(_element.Fragment, null, (metaBoxes !== null && metaBoxes !== void 0 ? metaBoxes : []).map(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
id: id
|
|
72
|
-
});
|
|
73
|
-
}), (0, _element.createElement)(_metaBoxesArea.default, {
|
|
64
|
+
return (0, _element.createElement)(_element.Fragment, null, (metaBoxes !== null && metaBoxes !== void 0 ? metaBoxes : []).map(({
|
|
65
|
+
id
|
|
66
|
+
}) => (0, _element.createElement)(_metaBoxVisibility.default, {
|
|
67
|
+
key: id,
|
|
68
|
+
id: id
|
|
69
|
+
})), (0, _element.createElement)(_metaBoxesArea.default, {
|
|
74
70
|
location: location
|
|
75
71
|
}));
|
|
76
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/components/meta-boxes/index.js"],"names":["MetaBoxes","location","registry","metaBoxes","areMetaBoxesInitialized","isEditorReady","select","__unstableIsEditorReady","editorStore","getMetaBoxesPerLocation","_areMetaBoxesInitialized","editPostStore","dispatch","initializeMetaBoxes","map","id"],"mappings":";;;;;;;;;AAIA;;AADA;;AAEA;;AAKA;;AACA;;AACA;;AAZA;AACA;AACA;;AAKA;AACA;AACA;AAKe,SAASA,SAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/components/meta-boxes/index.js"],"names":["MetaBoxes","location","registry","metaBoxes","areMetaBoxesInitialized","isEditorReady","select","__unstableIsEditorReady","editorStore","getMetaBoxesPerLocation","_areMetaBoxesInitialized","editPostStore","dispatch","initializeMetaBoxes","map","id"],"mappings":";;;;;;;;;AAIA;;AADA;;AAEA;;AAKA;;AACA;;AACA;;AAZA;AACA;AACA;;AAKA;AACA;AACA;AAKe,SAASA,SAAT,CAAoB;AAAEC,EAAAA;AAAF,CAApB,EAAmC;AACjD,QAAMC,QAAQ,GAAG,wBAAjB;AACA,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,uBAAb;AAAsCC,IAAAA;AAAtC,MAAwD,qBAC3DC,MAAF,IAAc;AACb,UAAM;AAAEC,MAAAA;AAAF,QAA8BD,MAAM,CAAEE,aAAF,CAA1C;AACA,UAAM;AACLC,MAAAA,uBADK;AAELL,MAAAA,uBAAuB,EAAEM;AAFpB,QAGFJ,MAAM,CAAEK,YAAF,CAHV;AAIA,WAAO;AACNR,MAAAA,SAAS,EAAEM,uBAAuB,CAAER,QAAF,CAD5B;AAENG,MAAAA,uBAAuB,EAAEM,wBAAwB,EAF3C;AAGNL,MAAAA,aAAa,EAAEE,uBAAuB;AAHhC,KAAP;AAKA,GAZ4D,EAa7D,CAAEN,QAAF,CAb6D,CAA9D,CAFiD,CAkBjD;AACA;AACA;;AACA,0BAAW,MAAM;AAChB,QAAKI,aAAa,IAAI,CAAED,uBAAxB,EAAkD;AACjDF,MAAAA,QAAQ,CAACU,QAAT,CAAmBD,YAAnB,EAAmCE,mBAAnC;AACA;AACD,GAJD,EAIG,CAAER,aAAF,EAAiBD,uBAAjB,CAJH;;AAMA,MAAK,CAAEA,uBAAP,EAAiC;AAChC,WAAO,IAAP;AACA;;AAED,SACC,qDACG,CAAED,SAAF,aAAEA,SAAF,cAAEA,SAAF,GAAe,EAAf,EAAoBW,GAApB,CAAyB,CAAE;AAAEC,IAAAA;AAAF,GAAF,KAC1B,4BAAC,0BAAD;AAAmB,IAAA,GAAG,EAAGA,EAAzB;AAA8B,IAAA,EAAE,EAAGA;AAAnC,IADC,CADH,EAIC,4BAAC,sBAAD;AAAe,IAAA,QAAQ,EAAGd;AAA1B,IAJD,CADD;AAQA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useRegistry } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MetaBoxesArea from './meta-boxes-area';\nimport MetaBoxVisibility from './meta-box-visibility';\nimport { store as editPostStore } from '../../store';\n\nexport default function MetaBoxes( { location } ) {\n\tconst registry = useRegistry();\n\tconst { metaBoxes, areMetaBoxesInitialized, isEditorReady } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { __unstableIsEditorReady } = select( editorStore );\n\t\t\tconst {\n\t\t\t\tgetMetaBoxesPerLocation,\n\t\t\t\tareMetaBoxesInitialized: _areMetaBoxesInitialized,\n\t\t\t} = select( editPostStore );\n\t\t\treturn {\n\t\t\t\tmetaBoxes: getMetaBoxesPerLocation( location ),\n\t\t\t\tareMetaBoxesInitialized: _areMetaBoxesInitialized(),\n\t\t\t\tisEditorReady: __unstableIsEditorReady(),\n\t\t\t};\n\t\t},\n\t\t[ location ]\n\t);\n\n\t// When editor is ready, initialize postboxes (wp core script) and metabox\n\t// saving. This initializes all meta box locations, not just this specific\n\t// one.\n\tuseEffect( () => {\n\t\tif ( isEditorReady && ! areMetaBoxesInitialized ) {\n\t\t\tregistry.dispatch( editPostStore ).initializeMetaBoxes();\n\t\t}\n\t}, [ isEditorReady, areMetaBoxesInitialized ] );\n\n\tif ( ! areMetaBoxesInitialized ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ ( metaBoxes ?? [] ).map( ( { id } ) => (\n\t\t\t\t<MetaBoxVisibility key={ id } id={ id } />\n\t\t\t) ) }\n\t\t\t<MetaBoxesArea location={ location } />\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -53,14 +53,11 @@ class MetaBoxVisibility extends _element.Component {
|
|
|
53
53
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
var _default = (0, _data.withSelect)((select,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
isVisible: select(_store.store).isEditorPanelEnabled(`meta-box-${id}`)
|
|
62
|
-
};
|
|
63
|
-
})(MetaBoxVisibility);
|
|
56
|
+
var _default = (0, _data.withSelect)((select, {
|
|
57
|
+
id
|
|
58
|
+
}) => ({
|
|
59
|
+
isVisible: select(_store.store).isEditorPanelEnabled(`meta-box-${id}`)
|
|
60
|
+
}))(MetaBoxVisibility);
|
|
64
61
|
|
|
65
62
|
exports.default = _default;
|
|
66
63
|
//# sourceMappingURL=meta-box-visibility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-box-visibility.js"],"names":["MetaBoxVisibility","Component","componentDidMount","updateDOM","componentDidUpdate","prevProps","props","isVisible","id","element","document","getElementById","classList","remove","add","render","select","editPostStore","isEditorPanelEnabled"],"mappings":";;;;;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;AAGA,MAAMA,iBAAN,SAAgCC,kBAAhC,CAA0C;AACzCC,EAAAA,iBAAiB,GAAG;AACnB,SAAKC,SAAL;AACA;;AAEDC,EAAAA,kBAAkB,CAAEC,SAAF,EAAc;AAC/B,QAAK,KAAKC,KAAL,CAAWC,SAAX,KAAyBF,SAAS,CAACE,SAAxC,EAAoD;AACnD,WAAKJ,SAAL;AACA;AACD;;AAEDA,EAAAA,SAAS,GAAG;AACX,UAAM;AAAEK,MAAAA,EAAF;AAAMD,MAAAA;AAAN,QAAoB,KAAKD,KAA/B;AAEA,UAAMG,OAAO,GAAGC,QAAQ,CAACC,cAAT,CAAyBH,EAAzB,CAAhB;;AACA,QAAK,CAAEC,OAAP,EAAiB;AAChB;AACA;;AAED,QAAKF,SAAL,EAAiB;AAChBE,MAAAA,OAAO,CAACG,SAAR,CAAkBC,MAAlB,CAA0B,WAA1B;AACA,KAFD,MAEO;AACNJ,MAAAA,OAAO,CAACG,SAAR,CAAkBE,GAAlB,CAAuB,WAAvB;AACA;AACD;;AAEDC,EAAAA,MAAM,GAAG;AACR,WAAO,IAAP;AACA;;AA5BwC;;eA+B3B,sBAAY,CAAEC,MAAF
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-box-visibility.js"],"names":["MetaBoxVisibility","Component","componentDidMount","updateDOM","componentDidUpdate","prevProps","props","isVisible","id","element","document","getElementById","classList","remove","add","render","select","editPostStore","isEditorPanelEnabled"],"mappings":";;;;;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;AAGA,MAAMA,iBAAN,SAAgCC,kBAAhC,CAA0C;AACzCC,EAAAA,iBAAiB,GAAG;AACnB,SAAKC,SAAL;AACA;;AAEDC,EAAAA,kBAAkB,CAAEC,SAAF,EAAc;AAC/B,QAAK,KAAKC,KAAL,CAAWC,SAAX,KAAyBF,SAAS,CAACE,SAAxC,EAAoD;AACnD,WAAKJ,SAAL;AACA;AACD;;AAEDA,EAAAA,SAAS,GAAG;AACX,UAAM;AAAEK,MAAAA,EAAF;AAAMD,MAAAA;AAAN,QAAoB,KAAKD,KAA/B;AAEA,UAAMG,OAAO,GAAGC,QAAQ,CAACC,cAAT,CAAyBH,EAAzB,CAAhB;;AACA,QAAK,CAAEC,OAAP,EAAiB;AAChB;AACA;;AAED,QAAKF,SAAL,EAAiB;AAChBE,MAAAA,OAAO,CAACG,SAAR,CAAkBC,MAAlB,CAA0B,WAA1B;AACA,KAFD,MAEO;AACNJ,MAAAA,OAAO,CAACG,SAAR,CAAkBE,GAAlB,CAAuB,WAAvB;AACA;AACD;;AAEDC,EAAAA,MAAM,GAAG;AACR,WAAO,IAAP;AACA;;AA5BwC;;eA+B3B,sBAAY,CAAEC,MAAF,EAAU;AAAER,EAAAA;AAAF,CAAV,MAAwB;AAClDD,EAAAA,SAAS,EAAES,MAAM,CAAEC,YAAF,CAAN,CAAwBC,oBAAxB,CACT,YAAYV,EAAI,EADP;AADuC,CAAxB,CAAZ,EAIRR,iBAJQ,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nclass MetaBoxVisibility extends Component {\n\tcomponentDidMount() {\n\t\tthis.updateDOM();\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.isVisible !== prevProps.isVisible ) {\n\t\t\tthis.updateDOM();\n\t\t}\n\t}\n\n\tupdateDOM() {\n\t\tconst { id, isVisible } = this.props;\n\n\t\tconst element = document.getElementById( id );\n\t\tif ( ! element ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isVisible ) {\n\t\t\telement.classList.remove( 'is-hidden' );\n\t\t} else {\n\t\t\telement.classList.add( 'is-hidden' );\n\t\t}\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default withSelect( ( select, { id } ) => ( {\n\tisVisible: select( editPostStore ).isEditorPanelEnabled(\n\t\t`meta-box-${ id }`\n\t),\n} ) )( MetaBoxVisibility );\n"]}
|
|
@@ -36,10 +36,9 @@ var _store = require("../../../store");
|
|
|
36
36
|
* @param {string} props.location metabox location.
|
|
37
37
|
* @return {WPComponent} The component to be rendered.
|
|
38
38
|
*/
|
|
39
|
-
function MetaBoxesArea(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} = _ref;
|
|
39
|
+
function MetaBoxesArea({
|
|
40
|
+
location
|
|
41
|
+
}) {
|
|
43
42
|
const container = (0, _element.useRef)(null);
|
|
44
43
|
const formRef = (0, _element.useRef)(null);
|
|
45
44
|
(0, _element.useEffect)(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-boxes-area/index.js"],"names":["MetaBoxesArea","location","container","formRef","current","document","querySelector","appendChild","isSaving","select","editPostStore","isSavingMetaBoxes","classes"],"mappings":";;;;;;;;;AAQA;;AALA;;AAMA;;AACA;;AAKA;;AAfA;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-boxes-area/index.js"],"names":["MetaBoxesArea","location","container","formRef","current","document","querySelector","appendChild","isSaving","select","editPostStore","isSavingMetaBoxes","classes"],"mappings":";;;;;;;;;AAQA;;AALA;;AAMA;;AACA;;AAKA;;AAfA;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAT,CAAwB;AAAEC,EAAAA;AAAF,CAAxB,EAAuC;AACtC,QAAMC,SAAS,GAAG,qBAAQ,IAAR,CAAlB;AACA,QAAMC,OAAO,GAAG,qBAAQ,IAAR,CAAhB;AAEA,0BAAW,MAAM;AAChBA,IAAAA,OAAO,CAACC,OAAR,GAAkBC,QAAQ,CAACC,aAAT,CACjB,uBAAuBL,QADN,CAAlB;;AAIA,QAAKE,OAAO,CAACC,OAAb,EAAuB;AACtBF,MAAAA,SAAS,CAACE,OAAV,CAAkBG,WAAlB,CAA+BJ,OAAO,CAACC,OAAvC;AACA;;AAED,WAAO,MAAM;AACZ,UAAKD,OAAO,CAACC,OAAb,EAAuB;AACtBC,QAAAA,QAAQ,CACNC,aADF,CACiB,YADjB,EAEEC,WAFF,CAEeJ,OAAO,CAACC,OAFvB;AAGA;AACD,KAND;AAOA,GAhBD,EAgBG,CAAEH,QAAF,CAhBH;AAkBA,QAAMO,QAAQ,GAAG,qBAAaC,MAAF,IAAc;AACzC,WAAOA,MAAM,CAAEC,YAAF,CAAN,CAAwBC,iBAAxB,EAAP;AACA,GAFgB,EAEd,EAFc,CAAjB;AAIA,QAAMC,OAAO,GAAG,yBACf,2BADe,EAEd,MAAMX,QAAU,EAFF,EAGf;AACC,kBAAcO;AADf,GAHe,CAAhB;AAQA,SACC;AAAK,IAAA,SAAS,EAAGI;AAAjB,KACGJ,QAAQ,IAAI,4BAAC,mBAAD,OADf,EAEC;AACC,IAAA,SAAS,EAAC,sCADX;AAEC,IAAA,GAAG,EAAGN;AAFP,IAFD,EAMC;AAAK,IAAA,SAAS,EAAC;AAAf,IAND,CADD;AAUA;;eAEcF,a","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { Spinner } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Render metabox area.\n *\n * @param {Object} props Component props.\n * @param {string} props.location metabox location.\n * @return {WPComponent} The component to be rendered.\n */\nfunction MetaBoxesArea( { location } ) {\n\tconst container = useRef( null );\n\tconst formRef = useRef( null );\n\n\tuseEffect( () => {\n\t\tformRef.current = document.querySelector(\n\t\t\t'.metabox-location-' + location\n\t\t);\n\n\t\tif ( formRef.current ) {\n\t\t\tcontainer.current.appendChild( formRef.current );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( formRef.current ) {\n\t\t\t\tdocument\n\t\t\t\t\t.querySelector( '#metaboxes' )\n\t\t\t\t\t.appendChild( formRef.current );\n\t\t\t}\n\t\t};\n\t}, [ location ] );\n\n\tconst isSaving = useSelect( ( select ) => {\n\t\treturn select( editPostStore ).isSavingMetaBoxes();\n\t}, [] );\n\n\tconst classes = classnames(\n\t\t'edit-post-meta-boxes-area',\n\t\t`is-${ location }`,\n\t\t{\n\t\t\t'is-loading': isSaving,\n\t\t}\n\t);\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t{ isSaving && <Spinner /> }\n\t\t\t<div\n\t\t\t\tclassName=\"edit-post-meta-boxes-area__container\"\n\t\t\t\tref={ container }\n\t\t\t/>\n\t\t\t<div className=\"edit-post-meta-boxes-area__clear\" />\n\t\t</div>\n\t);\n}\n\nexport default MetaBoxesArea;\n"]}
|
|
@@ -27,19 +27,15 @@ var _store = require("../../store");
|
|
|
27
27
|
/**
|
|
28
28
|
* Internal dependencies
|
|
29
29
|
*/
|
|
30
|
-
function MetaBoxesSection(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} = _ref;
|
|
30
|
+
function MetaBoxesSection({
|
|
31
|
+
areCustomFieldsRegistered,
|
|
32
|
+
metaBoxes,
|
|
33
|
+
...sectionProps
|
|
34
|
+
}) {
|
|
36
35
|
// The 'Custom Fields' meta box is a special case that we handle separately.
|
|
37
|
-
const thirdPartyMetaBoxes = metaBoxes.filter(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} = _ref2;
|
|
41
|
-
return id !== 'postcustom';
|
|
42
|
-
});
|
|
36
|
+
const thirdPartyMetaBoxes = metaBoxes.filter(({
|
|
37
|
+
id
|
|
38
|
+
}) => id !== 'postcustom');
|
|
43
39
|
|
|
44
40
|
if (!areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0) {
|
|
45
41
|
return null;
|
|
@@ -47,17 +43,14 @@ function MetaBoxesSection(_ref) {
|
|
|
47
43
|
|
|
48
44
|
return (0, _element.createElement)(_interface.PreferencesModalSection, sectionProps, areCustomFieldsRegistered && (0, _element.createElement)(_options.EnableCustomFieldsOption, {
|
|
49
45
|
label: (0, _i18n.__)('Custom fields')
|
|
50
|
-
}), thirdPartyMetaBoxes.map(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
panelName: `meta-box-${id}`
|
|
59
|
-
});
|
|
60
|
-
}));
|
|
46
|
+
}), thirdPartyMetaBoxes.map(({
|
|
47
|
+
id,
|
|
48
|
+
title
|
|
49
|
+
}) => (0, _element.createElement)(_options.EnablePanelOption, {
|
|
50
|
+
key: id,
|
|
51
|
+
label: title,
|
|
52
|
+
panelName: `meta-box-${id}`
|
|
53
|
+
})));
|
|
61
54
|
}
|
|
62
55
|
|
|
63
56
|
var _default = (0, _data.withSelect)(select => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"names":["MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","map","title","select","getEditorSettings","editorStore","getAllMetaBoxes","editPostStore","enableCustomFields","undefined"],"mappings":";;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAZA;AACA;AACA;;AAMA;AACA;AACA;AAIO,SAASA,gBAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"names":["MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","map","title","select","getEditorSettings","editorStore","getAllMetaBoxes","editPostStore","enableCustomFields","undefined"],"mappings":";;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAZA;AACA;AACA;;AAMA;AACA;AACA;AAIO,SAASA,gBAAT,CAA2B;AACjCC,EAAAA,yBADiC;AAEjCC,EAAAA,SAFiC;AAGjC,KAAGC;AAH8B,CAA3B,EAIH;AACH;AACA,QAAMC,mBAAmB,GAAGF,SAAS,CAACG,MAAV,CAC3B,CAAE;AAAEC,IAAAA;AAAF,GAAF,KAAcA,EAAE,KAAK,YADM,CAA5B;;AAIA,MAAK,CAAEL,yBAAF,IAA+BG,mBAAmB,CAACG,MAApB,KAA+B,CAAnE,EAAuE;AACtE,WAAO,IAAP;AACA;;AAED,SACC,4BAAC,kCAAD,EAA8BJ,YAA9B,EACGF,yBAAyB,IAC1B,4BAAC,iCAAD;AAA0B,IAAA,KAAK,EAAG,cAAI,eAAJ;AAAlC,IAFF,EAIGG,mBAAmB,CAACI,GAApB,CAAyB,CAAE;AAAEF,IAAAA,EAAF;AAAMG,IAAAA;AAAN,GAAF,KAC1B,4BAAC,0BAAD;AACC,IAAA,GAAG,EAAGH,EADP;AAEC,IAAA,KAAK,EAAGG,KAFT;AAGC,IAAA,SAAS,EAAI,YAAYH,EAAI;AAH9B,IADC,CAJH,CADD;AAcA;;eAEc,sBAAcI,MAAF,IAAc;AACxC,QAAM;AAAEC,IAAAA;AAAF,MAAwBD,MAAM,CAAEE,aAAF,CAApC;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAsBH,MAAM,CAAEI,YAAF,CAAlC;AAEA,SAAO;AACN;AACAb,IAAAA,yBAAyB,EACxBU,iBAAiB,GAAGI,kBAApB,KAA2CC,SAHtC;AAINd,IAAAA,SAAS,EAAEW,eAAe;AAJpB,GAAP;AAMA,CAVc,EAUVb,gBAVU,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { PreferencesModalSection } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { EnableCustomFieldsOption, EnablePanelOption } from './options';\nimport { store as editPostStore } from '../../store';\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"]}
|
|
@@ -22,10 +22,9 @@ var _interface = require("@wordpress/interface");
|
|
|
22
22
|
/**
|
|
23
23
|
* WordPress dependencies
|
|
24
24
|
*/
|
|
25
|
-
function CustomFieldsConfirmation(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
25
|
+
function CustomFieldsConfirmation({
|
|
26
|
+
willEnable
|
|
27
|
+
}) {
|
|
29
28
|
const [isReloading, setIsReloading] = (0, _element.useState)(false);
|
|
30
29
|
return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)("p", {
|
|
31
30
|
className: "edit-post-preferences-modal__custom-fields-confirmation-message"
|
|
@@ -41,11 +40,10 @@ function CustomFieldsConfirmation(_ref) {
|
|
|
41
40
|
}, willEnable ? (0, _i18n.__)('Enable & Reload') : (0, _i18n.__)('Disable & Reload')));
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
function EnableCustomFieldsOption(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} = _ref2;
|
|
43
|
+
function EnableCustomFieldsOption({
|
|
44
|
+
label,
|
|
45
|
+
areCustomFieldsEnabled
|
|
46
|
+
}) {
|
|
49
47
|
const [isChecked, setIsChecked] = (0, _element.useState)(areCustomFieldsEnabled);
|
|
50
48
|
return (0, _element.createElement)(_interface.___unstablePreferencesModalBaseOption, {
|
|
51
49
|
label: label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-custom-fields.js"],"names":["CustomFieldsConfirmation","willEnable","isReloading","setIsReloading","document","getElementById","submit","EnableCustomFieldsOption","label","areCustomFieldsEnabled","isChecked","setIsChecked","select","editorStore","getEditorSettings","enableCustomFields"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AARA;AACA;AACA;AAQO,SAASA,wBAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-custom-fields.js"],"names":["CustomFieldsConfirmation","willEnable","isReloading","setIsReloading","document","getElementById","submit","EnableCustomFieldsOption","label","areCustomFieldsEnabled","isChecked","setIsChecked","select","editorStore","getEditorSettings","enableCustomFields"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AARA;AACA;AACA;AAQO,SAASA,wBAAT,CAAmC;AAAEC,EAAAA;AAAF,CAAnC,EAAoD;AAC1D,QAAM,CAAEC,WAAF,EAAeC,cAAf,IAAkC,uBAAU,KAAV,CAAxC;AAEA,SACC,qDACC;AAAG,IAAA,SAAS,EAAC;AAAb,KACG,cACD,8FADC,CADH,CADD,EAMC,4BAAC,kBAAD;AACC,IAAA,SAAS,EAAC,gEADX;AAEC,IAAA,OAAO,EAAC,WAFT;AAGC,IAAA,MAAM,EAAGD,WAHV;AAIC,IAAA,QAAQ,EAAGA,WAJZ;AAKC,IAAA,OAAO,EAAG,MAAM;AACfC,MAAAA,cAAc,CAAE,IAAF,CAAd;AACAC,MAAAA,QAAQ,CACNC,cADF,CACkB,2BADlB,EAEEC,MAFF;AAGA;AAVF,KAYGL,UAAU,GACT,cAAI,iBAAJ,CADS,GAET,cAAI,kBAAJ,CAdJ,CAND,CADD;AAyBA;;AAEM,SAASM,wBAAT,CAAmC;AAAEC,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAnC,EAAuE;AAC7E,QAAM,CAAEC,SAAF,EAAaC,YAAb,IAA8B,uBAAUF,sBAAV,CAApC;AAEA,SACC,4BAAC,gDAAD;AACC,IAAA,KAAK,EAAGD,KADT;AAEC,IAAA,SAAS,EAAGE,SAFb;AAGC,IAAA,QAAQ,EAAGC;AAHZ,KAKGD,SAAS,KAAKD,sBAAd,IACD,4BAAC,wBAAD;AAA0B,IAAA,UAAU,EAAGC;AAAvC,IANF,CADD;AAWA;;eAEc,sBAAcE,MAAF,KAAgB;AAC1CH,EAAAA,sBAAsB,EACrB,CAAC,CAAEG,MAAM,CAAEC,aAAF,CAAN,CAAsBC,iBAAtB,GAA0CC;AAFJ,CAAhB,CAAZ,EAGRR,wBAHQ,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { ___unstablePreferencesModalBaseOption as BaseOption } from '@wordpress/interface';\n\nexport function CustomFieldsConfirmation( { willEnable } ) {\n\tconst [ isReloading, setIsReloading ] = useState( false );\n\n\treturn (\n\t\t<>\n\t\t\t<p className=\"edit-post-preferences-modal__custom-fields-confirmation-message\">\n\t\t\t\t{ __(\n\t\t\t\t\t'A page reload is required for this change. Make sure your content is saved before reloading.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<Button\n\t\t\t\tclassName=\"edit-post-preferences-modal__custom-fields-confirmation-button\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isReloading }\n\t\t\t\tdisabled={ isReloading }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsReloading( true );\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'toggle-custom-fields-form' )\n\t\t\t\t\t\t.submit();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ willEnable\n\t\t\t\t\t? __( 'Enable & Reload' )\n\t\t\t\t\t: __( 'Disable & Reload' ) }\n\t\t\t</Button>\n\t\t</>\n\t);\n}\n\nexport function EnableCustomFieldsOption( { label, areCustomFieldsEnabled } ) {\n\tconst [ isChecked, setIsChecked ] = useState( areCustomFieldsEnabled );\n\n\treturn (\n\t\t<BaseOption\n\t\t\tlabel={ label }\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ setIsChecked }\n\t\t>\n\t\t\t{ isChecked !== areCustomFieldsEnabled && (\n\t\t\t\t<CustomFieldsConfirmation willEnable={ isChecked } />\n\t\t\t) }\n\t\t</BaseOption>\n\t);\n}\n\nexport default withSelect( ( select ) => ( {\n\tareCustomFieldsEnabled:\n\t\t!! select( editorStore ).getEditorSettings().enableCustomFields,\n} ) )( EnableCustomFieldsOption );\n"]}
|
|
@@ -20,28 +20,24 @@ var _store = require("../../../store");
|
|
|
20
20
|
/**
|
|
21
21
|
* Internal dependencies
|
|
22
22
|
*/
|
|
23
|
-
var _default = (0, _compose.compose)((0, _data.withSelect)((select,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} = _ref;
|
|
23
|
+
var _default = (0, _compose.compose)((0, _data.withSelect)((select, {
|
|
24
|
+
featureName
|
|
25
|
+
}) => {
|
|
27
26
|
const {
|
|
28
27
|
isFeatureActive
|
|
29
28
|
} = select(_store.store);
|
|
30
29
|
return {
|
|
31
30
|
isChecked: isFeatureActive(featureName)
|
|
32
31
|
};
|
|
33
|
-
}), (0, _data.withDispatch)((dispatch,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}))(_interface.___unstablePreferencesModalBaseOption);
|
|
32
|
+
}), (0, _data.withDispatch)((dispatch, {
|
|
33
|
+
featureName,
|
|
34
|
+
onToggle = () => {}
|
|
35
|
+
}) => ({
|
|
36
|
+
onChange: () => {
|
|
37
|
+
onToggle();
|
|
38
|
+
dispatch(_store.store).toggleFeature(featureName);
|
|
39
|
+
}
|
|
40
|
+
})))(_interface.___unstablePreferencesModalBaseOption);
|
|
45
41
|
|
|
46
42
|
exports.default = _default;
|
|
47
43
|
//# sourceMappingURL=enable-feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-feature.js"],"names":["select","featureName","isFeatureActive","editPostStore","isChecked","dispatch","onToggle","onChange","toggleFeature","BaseOption"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAKA;AACA;AACA;eAGe,sBACd,sBAAY,CAAEA,MAAF,
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-feature.js"],"names":["select","featureName","isFeatureActive","editPostStore","isChecked","dispatch","onToggle","onChange","toggleFeature","BaseOption"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAKA;AACA;AACA;eAGe,sBACd,sBAAY,CAAEA,MAAF,EAAU;AAAEC,EAAAA;AAAF,CAAV,KAA+B;AAC1C,QAAM;AAAEC,IAAAA;AAAF,MAAsBF,MAAM,CAAEG,YAAF,CAAlC;AACA,SAAO;AACNC,IAAAA,SAAS,EAAEF,eAAe,CAAED,WAAF;AADpB,GAAP;AAGA,CALD,CADc,EAOd,wBAAc,CAAEI,QAAF,EAAY;AAAEJ,EAAAA,WAAF;AAAeK,EAAAA,QAAQ,GAAG,MAAM,CAAE;AAAlC,CAAZ,MAAwD;AACrEC,EAAAA,QAAQ,EAAE,MAAM;AACfD,IAAAA,QAAQ;AACRD,IAAAA,QAAQ,CAAEF,YAAF,CAAR,CAA0BK,aAA1B,CAAyCP,WAAzC;AACA;AAJoE,CAAxD,CAAd,CAPc,EAaZQ,gDAbY,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { ___unstablePreferencesModalBaseOption as BaseOption } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\nexport default compose(\n\twithSelect( ( select, { featureName } ) => {\n\t\tconst { isFeatureActive } = select( editPostStore );\n\t\treturn {\n\t\t\tisChecked: isFeatureActive( featureName ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { featureName, onToggle = () => {} } ) => ( {\n\t\tonChange: () => {\n\t\t\tonToggle();\n\t\t\tdispatch( editPostStore ).toggleFeature( featureName );\n\t\t},\n\t} ) )\n)( BaseOption );\n"]}
|
|
@@ -20,10 +20,9 @@ var _store = require("../../../store");
|
|
|
20
20
|
/**
|
|
21
21
|
* Internal dependencies
|
|
22
22
|
*/
|
|
23
|
-
var _default = (0, _compose.compose)((0, _data.withSelect)((select,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} = _ref;
|
|
23
|
+
var _default = (0, _compose.compose)((0, _data.withSelect)((select, {
|
|
24
|
+
panelName
|
|
25
|
+
}) => {
|
|
27
26
|
const {
|
|
28
27
|
isEditorPanelEnabled,
|
|
29
28
|
isEditorPanelRemoved
|
|
@@ -32,19 +31,13 @@ var _default = (0, _compose.compose)((0, _data.withSelect)((select, _ref) => {
|
|
|
32
31
|
isRemoved: isEditorPanelRemoved(panelName),
|
|
33
32
|
isChecked: isEditorPanelEnabled(panelName)
|
|
34
33
|
};
|
|
35
|
-
}), (0, _compose.ifCondition)(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
panelName
|
|
43
|
-
} = _ref3;
|
|
44
|
-
return {
|
|
45
|
-
onChange: () => dispatch(_store.store).toggleEditorPanelEnabled(panelName)
|
|
46
|
-
};
|
|
47
|
-
}))(_interface.___unstablePreferencesModalBaseOption);
|
|
34
|
+
}), (0, _compose.ifCondition)(({
|
|
35
|
+
isRemoved
|
|
36
|
+
}) => !isRemoved), (0, _data.withDispatch)((dispatch, {
|
|
37
|
+
panelName
|
|
38
|
+
}) => ({
|
|
39
|
+
onChange: () => dispatch(_store.store).toggleEditorPanelEnabled(panelName)
|
|
40
|
+
})))(_interface.___unstablePreferencesModalBaseOption);
|
|
48
41
|
|
|
49
42
|
exports.default = _default;
|
|
50
43
|
//# sourceMappingURL=enable-panel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-panel.js"],"names":["select","panelName","isEditorPanelEnabled","isEditorPanelRemoved","editPostStore","isRemoved","isChecked","dispatch","onChange","toggleEditorPanelEnabled","BaseOption"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAKA;AACA;AACA;eAGe,sBACd,sBAAY,CAAEA,MAAF,
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-panel.js"],"names":["select","panelName","isEditorPanelEnabled","isEditorPanelRemoved","editPostStore","isRemoved","isChecked","dispatch","onChange","toggleEditorPanelEnabled","BaseOption"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAKA;AACA;AACA;eAGe,sBACd,sBAAY,CAAEA,MAAF,EAAU;AAAEC,EAAAA;AAAF,CAAV,KAA6B;AACxC,QAAM;AAAEC,IAAAA,oBAAF;AAAwBC,IAAAA;AAAxB,MACLH,MAAM,CAAEI,YAAF,CADP;AAEA,SAAO;AACNC,IAAAA,SAAS,EAAEF,oBAAoB,CAAEF,SAAF,CADzB;AAENK,IAAAA,SAAS,EAAEJ,oBAAoB,CAAED,SAAF;AAFzB,GAAP;AAIA,CAPD,CADc,EASd,0BAAa,CAAE;AAAEI,EAAAA;AAAF,CAAF,KAAqB,CAAEA,SAApC,CATc,EAUd,wBAAc,CAAEE,QAAF,EAAY;AAAEN,EAAAA;AAAF,CAAZ,MAAiC;AAC9CO,EAAAA,QAAQ,EAAE,MACTD,QAAQ,CAAEH,YAAF,CAAR,CAA0BK,wBAA1B,CAAoDR,SAApD;AAF6C,CAAjC,CAAd,CAVc,EAcZS,gDAdY,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { ___unstablePreferencesModalBaseOption as BaseOption } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\nexport default compose(\n\twithSelect( ( select, { panelName } ) => {\n\t\tconst { isEditorPanelEnabled, isEditorPanelRemoved } =\n\t\t\tselect( editPostStore );\n\t\treturn {\n\t\t\tisRemoved: isEditorPanelRemoved( panelName ),\n\t\t\tisChecked: isEditorPanelEnabled( panelName ),\n\t\t};\n\t} ),\n\tifCondition( ( { isRemoved } ) => ! isRemoved ),\n\twithDispatch( ( dispatch, { panelName } ) => ( {\n\t\tonChange: () =>\n\t\t\tdispatch( editPostStore ).toggleEditorPanelEnabled( panelName ),\n\t} ) )\n)( BaseOption );\n"]}
|