@wordpress/edit-post 6.6.0 → 6.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/build/components/block-manager/category.js.map +1 -1
  4. package/build/components/block-manager/index.js +12 -4
  5. package/build/components/block-manager/index.js.map +1 -1
  6. package/build/components/device-preview/index.js.map +1 -1
  7. package/build/components/editor-initialization/listener-hooks.js.map +1 -1
  8. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  9. package/build/components/header/header-toolbar/index.js.map +1 -1
  10. package/build/components/header/index.js.map +1 -1
  11. package/build/components/header/mode-switcher/index.js.map +1 -1
  12. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  13. package/build/components/header/template-title/delete-template.js.map +1 -1
  14. package/build/components/header/template-title/index.js.map +1 -1
  15. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  16. package/build/components/keyboard-shortcut-help-modal/config.js +12 -0
  17. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  18. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  19. package/build/components/layout/actions-panel.js.map +1 -1
  20. package/build/components/layout/index.js.map +1 -1
  21. package/build/components/layout/index.native.js.map +1 -1
  22. package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  23. package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
  24. package/build/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
  25. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  26. package/build/components/sidebar/discussion-panel/index.js.map +1 -1
  27. package/build/components/sidebar/featured-image/index.js.map +1 -1
  28. package/build/components/sidebar/page-attributes/index.js.map +1 -1
  29. package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  30. package/build/components/sidebar/plugin-post-status-info/index.js +2 -2
  31. package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  32. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  33. package/build/components/sidebar/post-excerpt/index.js.map +1 -1
  34. package/build/components/sidebar/post-link/index.js.map +1 -1
  35. package/build/components/sidebar/post-schedule/index.js +14 -7
  36. package/build/components/sidebar/post-schedule/index.js.map +1 -1
  37. package/build/components/sidebar/post-status/index.js +4 -2
  38. package/build/components/sidebar/post-status/index.js.map +1 -1
  39. package/build/components/sidebar/post-template/create-modal.js +116 -0
  40. package/build/components/sidebar/post-template/create-modal.js.map +1 -0
  41. package/build/components/sidebar/post-template/form.js +123 -0
  42. package/build/components/sidebar/post-template/form.js.map +1 -0
  43. package/build/components/sidebar/post-template/index.js +123 -0
  44. package/build/components/sidebar/post-template/index.js.map +1 -0
  45. package/build/components/sidebar/settings-sidebar/index.js +1 -3
  46. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  47. package/build/components/start-page-options/index.js +31 -13
  48. package/build/components/start-page-options/index.js.map +1 -1
  49. package/build/components/visual-editor/block-inspector-button.js +3 -7
  50. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  51. package/build/editor.js +1 -1
  52. package/build/editor.js.map +1 -1
  53. package/build/editor.native.js +9 -1
  54. package/build/editor.native.js.map +1 -1
  55. package/build/plugins/copy-content-menu-item/index.js +1 -1
  56. package/build/plugins/copy-content-menu-item/index.js.map +1 -1
  57. package/build/store/actions.js.map +1 -1
  58. package/build/store/selectors.js +8 -8
  59. package/build/store/selectors.js.map +1 -1
  60. package/build-module/components/block-manager/category.js.map +1 -1
  61. package/build-module/components/block-manager/index.js +13 -5
  62. package/build-module/components/block-manager/index.js.map +1 -1
  63. package/build-module/components/device-preview/index.js.map +1 -1
  64. package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
  65. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  66. package/build-module/components/header/header-toolbar/index.js.map +1 -1
  67. package/build-module/components/header/index.js.map +1 -1
  68. package/build-module/components/header/mode-switcher/index.js.map +1 -1
  69. package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
  70. package/build-module/components/header/template-title/delete-template.js.map +1 -1
  71. package/build-module/components/header/template-title/index.js.map +1 -1
  72. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  73. package/build-module/components/keyboard-shortcut-help-modal/config.js +12 -0
  74. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  75. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  76. package/build-module/components/layout/actions-panel.js.map +1 -1
  77. package/build-module/components/layout/index.js.map +1 -1
  78. package/build-module/components/layout/index.native.js.map +1 -1
  79. package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  80. package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
  81. package/build-module/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
  82. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  83. package/build-module/components/sidebar/discussion-panel/index.js.map +1 -1
  84. package/build-module/components/sidebar/featured-image/index.js.map +1 -1
  85. package/build-module/components/sidebar/page-attributes/index.js.map +1 -1
  86. package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  87. package/build-module/components/sidebar/plugin-post-status-info/index.js +2 -2
  88. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  89. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  90. package/build-module/components/sidebar/post-excerpt/index.js.map +1 -1
  91. package/build-module/components/sidebar/post-link/index.js.map +1 -1
  92. package/build-module/components/sidebar/post-schedule/index.js +15 -5
  93. package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
  94. package/build-module/components/sidebar/post-status/index.js +3 -2
  95. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  96. package/build-module/components/sidebar/post-template/create-modal.js +104 -0
  97. package/build-module/components/sidebar/post-template/create-modal.js.map +1 -0
  98. package/build-module/components/sidebar/post-template/form.js +106 -0
  99. package/build-module/components/sidebar/post-template/form.js.map +1 -0
  100. package/build-module/components/sidebar/post-template/index.js +109 -0
  101. package/build-module/components/sidebar/post-template/index.js.map +1 -0
  102. package/build-module/components/sidebar/settings-sidebar/index.js +1 -2
  103. package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
  104. package/build-module/components/start-page-options/index.js +32 -14
  105. package/build-module/components/start-page-options/index.js.map +1 -1
  106. package/build-module/components/visual-editor/block-inspector-button.js +3 -5
  107. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  108. package/build-module/editor.js +2 -2
  109. package/build-module/editor.js.map +1 -1
  110. package/build-module/editor.native.js +10 -2
  111. package/build-module/editor.native.js.map +1 -1
  112. package/build-module/plugins/copy-content-menu-item/index.js +1 -1
  113. package/build-module/plugins/copy-content-menu-item/index.js.map +1 -1
  114. package/build-module/store/actions.js.map +1 -1
  115. package/build-module/store/selectors.js +8 -7
  116. package/build-module/store/selectors.js.map +1 -1
  117. package/build-style/style-rtl.css +60 -49
  118. package/build-style/style.css +60 -49
  119. package/package.json +28 -28
  120. package/src/components/block-manager/category.js +2 -2
  121. package/src/components/block-manager/index.js +15 -4
  122. package/src/components/device-preview/index.js +4 -6
  123. package/src/components/editor-initialization/listener-hooks.js +2 -3
  124. package/src/components/header/fullscreen-mode-close/index.js +2 -3
  125. package/src/components/header/header-toolbar/index.js +6 -11
  126. package/src/components/header/index.js +6 -9
  127. package/src/components/header/mode-switcher/index.js +4 -4
  128. package/src/components/header/post-publish-button-or-toggle.js +4 -6
  129. package/src/components/header/template-title/delete-template.js +2 -3
  130. package/src/components/header/template-title/index.js +2 -3
  131. package/src/components/header/tools-more-menu-group/index.js +2 -3
  132. package/src/components/keyboard-shortcut-help-modal/config.js +8 -0
  133. package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +14 -0
  134. package/src/components/keyboard-shortcut-help-modal/test/index.js +2 -1
  135. package/src/components/keyboard-shortcuts/index.js +4 -8
  136. package/src/components/layout/actions-panel.js +6 -9
  137. package/src/components/layout/index.js +12 -21
  138. package/src/components/layout/index.native.js +4 -5
  139. package/src/components/preferences-modal/options/enable-custom-fields.js +2 -2
  140. package/src/components/preferences-modal/options/enable-panel.js +2 -3
  141. package/src/components/preferences-modal/options/enable-publish-sidebar.js +2 -3
  142. package/src/components/secondary-sidebar/inserter-sidebar.js +2 -3
  143. package/src/components/sidebar/discussion-panel/index.js +2 -3
  144. package/src/components/sidebar/featured-image/index.js +2 -3
  145. package/src/components/sidebar/page-attributes/index.js +2 -3
  146. package/src/components/sidebar/plugin-document-setting-panel/index.js +2 -3
  147. package/src/components/sidebar/plugin-post-status-info/index.js +2 -2
  148. package/src/components/sidebar/plugin-sidebar/index.js +2 -3
  149. package/src/components/sidebar/post-excerpt/index.js +2 -3
  150. package/src/components/sidebar/post-link/index.js +2 -3
  151. package/src/components/sidebar/post-schedule/index.js +8 -4
  152. package/src/components/sidebar/post-schedule/style.scss +19 -6
  153. package/src/components/sidebar/post-status/index.js +5 -4
  154. package/src/components/sidebar/post-template/create-modal.js +146 -0
  155. package/src/components/sidebar/post-template/form.js +140 -0
  156. package/src/components/sidebar/post-template/index.js +101 -0
  157. package/src/components/sidebar/post-template/style.scss +46 -0
  158. package/src/components/sidebar/post-visibility/style.scss +5 -4
  159. package/src/components/sidebar/settings-sidebar/index.js +0 -2
  160. package/src/components/start-page-options/index.js +48 -28
  161. package/src/components/visual-editor/block-inspector-button.js +4 -8
  162. package/src/editor.js +8 -10
  163. package/src/editor.native.js +13 -6
  164. package/src/plugins/copy-content-menu-item/index.js +1 -1
  165. package/src/store/actions.js +322 -295
  166. package/src/store/selectors.js +21 -24
  167. package/src/style.scss +1 -1
  168. package/build/components/sidebar/template/actions.js +0 -167
  169. package/build/components/sidebar/template/actions.js.map +0 -1
  170. package/build/components/sidebar/template/index.js +0 -164
  171. package/build/components/sidebar/template/index.js.map +0 -1
  172. package/build-module/components/sidebar/template/actions.js +0 -153
  173. package/build-module/components/sidebar/template/actions.js.map +0 -1
  174. package/build-module/components/sidebar/template/index.js +0 -145
  175. package/build-module/components/sidebar/template/index.js.map +0 -1
  176. package/src/components/sidebar/template/actions.js +0 -203
  177. package/src/components/sidebar/template/index.js +0 -164
  178. package/src/components/sidebar/template/style.scss +0 -43
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/layout/index.js"],"names":["classnames","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorNotices","EditorKeyboardShortcutsRegister","EditorSnackbars","store","editorStore","useSelect","useDispatch","BlockBreadcrumb","BlockStyles","Button","ScrollLock","Popover","useViewportMatch","PluginArea","__","_x","sprintf","ComplementaryArea","FullscreenMode","InterfaceSkeleton","interfaceStore","useState","useEffect","useCallback","keyboardShortcutsStore","noticesStore","TextEditor","VisualEditor","EditPostKeyboardShortcuts","KeyboardShortcutHelpModal","EditPostPreferencesModal","BrowserURL","Header","InserterSidebar","ListViewSidebar","SettingsSidebar","MetaBoxes","WelcomeGuide","ActionsPanel","StartPageOptions","editPostStore","interfaceLabels","header","body","sidebar","actions","footer","Layout","styles","isMobileViewport","isHugeViewport","openGeneralSidebar","closeGeneralSidebar","setIsInserterOpened","createErrorNotice","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","hasFixedToolbar","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","hasReducedUI","showBlockBreadcrumbs","isTemplateMode","documentLabel","select","getEditorSettings","getPostTypeLabel","editorSettings","postTypeLabel","isEditingTemplate","isFeatureActive","getActiveComplementaryArea","name","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","getAllShortcutKeyCombinations","className","openSidebarPanel","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","arg","secondarySidebarLabel","secondarySidebar","onPluginAreaError","previous","next"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,eADD,EAECC,oBAFD,EAGCC,qBA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OA/FD,EAgGC,cAAC,gBAAD,OAhGD,EAiGC,cAAC,OAAD,CAAS,IAAT,OAjGD,EAkGC,cAAC,UAAD;AAAY,IAAA,OAAO,EAAG+B;AAAtB,IAlGD,CADD;AAsGA;;AAED,eAAe9C,MAAf","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, BlockStyles } 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 {\n\t\topenGeneralSidebar,\n\t\tcloseGeneralSidebar,\n\t\tsetIsInserterOpened,\n\t} = useDispatch( 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\thasReducedUI,\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: select( editPostStore ).isFeatureActive(\n\t\t\t\t'fixedToolbar'\n\t\t\t),\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: select( editPostStore ).isFeatureActive(\n\t\t\t\t'fullscreenMode'\n\t\t\t),\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: select( editPostStore ).isFeatureActive(\n\t\t\t\t'showIconLabels'\n\t\t\t),\n\t\t\thasReducedUI: select( editPostStore ).isFeatureActive(\n\t\t\t\t'reducedUI'\n\t\t\t),\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\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} );\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 [\n\t\tentitiesSavedStatesCallback,\n\t\tsetEntitiesSavedStatesCallback,\n\t] = useState( 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 secondarySidebarLabel = isListViewOpened\n\t\t? __( 'List View' )\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\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\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<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{ ! 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\t<BlockStyles.Slot scope=\"core/block-inspector\" />\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! hasReducedUI &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\t! isMobileViewport &&\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":["classnames","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorNotices","EditorKeyboardShortcutsRegister","EditorSnackbars","store","editorStore","useSelect","useDispatch","BlockBreadcrumb","BlockStyles","Button","ScrollLock","Popover","useViewportMatch","PluginArea","__","_x","sprintf","ComplementaryArea","FullscreenMode","InterfaceSkeleton","interfaceStore","useState","useEffect","useCallback","keyboardShortcutsStore","noticesStore","TextEditor","VisualEditor","EditPostKeyboardShortcuts","KeyboardShortcutHelpModal","EditPostPreferencesModal","BrowserURL","Header","InserterSidebar","ListViewSidebar","SettingsSidebar","MetaBoxes","WelcomeGuide","ActionsPanel","StartPageOptions","editPostStore","interfaceLabels","header","body","sidebar","actions","footer","Layout","styles","isMobileViewport","isHugeViewport","openGeneralSidebar","closeGeneralSidebar","setIsInserterOpened","createErrorNotice","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","hasFixedToolbar","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","hasReducedUI","showBlockBreadcrumbs","isTemplateMode","documentLabel","select","getEditorSettings","getPostTypeLabel","editorSettings","postTypeLabel","isEditingTemplate","isFeatureActive","getActiveComplementaryArea","name","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","getAllShortcutKeyCombinations","className","openSidebarPanel","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","arg","secondarySidebarLabel","secondarySidebar","onPluginAreaError","previous","next"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,eADD,EAECC,oBAFD,EAGCC,qBAHD,EAICC,aAJD,EAKCC,+BALD,EAMCC,eAND,EAOCC,KAAK,IAAIC,WAPV,QAQO,mBARP;AASA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,eAAT,EAA0BC,WAA1B,QAA6C,y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AAe9C,MAAf","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, BlockStyles } 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 { 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\thasReducedUI,\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\thasReducedUI:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'reducedUI' ),\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\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} );\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 secondarySidebarLabel = isListViewOpened\n\t\t? __( 'List View' )\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\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\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<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{ ! 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\t<BlockStyles.Slot scope=\"core/block-inspector\" />\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! hasReducedUI &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\t! isMobileViewport &&\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 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/layout/index.native.js"],"names":["Platform","SafeAreaView","View","SafeArea","Component","withSelect","BottomSheetSettings","FloatingToolbar","store","blockEditorStore","compose","withPreferredColorScheme","HTMLTextInput","KeyboardAvoidingView","NoticeList","Tooltip","__unstableAutocompletionItemsSlot","AutocompletionItemsSlot","AutosaveMonitor","editorStore","sendNativeEditorDidLayout","styles","headerToolbarStyles","Header","VisualEditor","editPostStore","Layout","constructor","arguments","onSafeAreaInsetsUpdate","bind","onRootViewLayout","state","rootViewHeight","safeAreaInsets","top","bottom","right","left","getSafeAreaInsetsForRootView","then","componentDidMount","_isMounted","safeAreaSubscription","addEventListener","componentWillUnmount","remove","result","setState","event","setHeightState","height","nativeEvent","layout","renderHTML","globalStyles","props","renderVisual","isReady","setTitleRef","render","getStylesFromColorScheme","mode","isHtmlView","marginBottom","OS","containerStyles","container","containerDark","toolbarKeyboardAvoidingViewStyle","toolbarKeyboardAvoidingView","backgroundColor","editorStyles","background","backgroundDark","flex","flexBasis","select","__unstableIsEditorReady","isEditorReady","getEditorMode","getSettings","__experimentalGlobalStylesBaseStyles","color"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,YAAnB,EAAiCC,IAAjC,QAA6C,cAA7C;AACA,OAAOC,QAAP,MAAqB,wBAArB;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,UAAT,QAA2B,iBAA3B;AACA,SACCC,mBADD,EAECC,eAFD,EAGCC,KAAK,IAAIC,gBAHV,QAIO,yBAJP;AAKA,SAASC,OAAT,EAAkBC,wBAAlB,QAAkD,oBAAlD;AACA,SACCC,aADD,EAECC,oBAFD,EAGCC,UAHD,EAICC,OAJD,EAKCC,iCAAiC,IAAIC,uBALtC,QAMO,uBANP;AAOA,SAASC,eAAT,EAA0BV,KAAK,IAAIW,WAAnC,QAAsD,mBAAtD;AACA,SAASC,yBAAT,QAA0C,gCAA1C;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,OAAOC,mBAAP,MAAgC,qCAAhC;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,SAAShB,KAAK,IAAIiB,aAAlB,QAAuC,aAAvC;;AAEA,MAAMC,MAAN,SAAqBtB,SAArB,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iE,EAAT,KAAgB,SAAhB,IAA6B,cAAC,uBAAD,OAnChC,CADD,CADD;AAyCA;;AApJ6B;;AAuJ/B,eAAevD,OAAO,CAAE,CACvBL,UAAU,CAAIwE,MAAF,IAAc;AAAA;;AACzB,QAAM;AAAEC,IAAAA,uBAAuB,EAAEC;AAA3B,MAA6CF,MAAM,CACxD1D,WADwD,CAAzD;AAGA,QAAM;AAAE6D,IAAAA;AAAF,MAAoBH,MAAM,CAAEpD,aAAF,CAAhC;AACA,QAAM;AAAEwD,IAAAA;AAAF,MAAkBJ,MAAM,CAAEpE,gBAAF,CAA9B;AACA,QAAM8C,YAAY,mBAAG0B,WAAW,EAAd,0EAAG,aAAeC,oCAAlB,0DAAG,sBAClBC,KADH;AAGA,SAAO;AACNzB,IAAAA,OAAO,EAAEqB,aAAa,EADhB;AAENjB,IAAAA,IAAI,EAAEkB,aAAa,EAFb;AAGNzB,IAAAA;AAHM,GAAP;AAKA,CAdS,CADa,EAgBvB5C,wBAhBuB,CAAF,CAAP,CAiBVe,MAjBU,CAAf","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 } = select(\n\t\t\teditorStore\n\t\t);\n\t\tconst { getEditorMode } = select( editPostStore );\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst globalStyles = getSettings()?.__experimentalGlobalStylesBaseStyles\n\t\t\t?.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":["Platform","SafeAreaView","View","SafeArea","Component","withSelect","BottomSheetSettings","FloatingToolbar","store","blockEditorStore","compose","withPreferredColorScheme","HTMLTextInput","KeyboardAvoidingView","NoticeList","Tooltip","__unstableAutocompletionItemsSlot","AutocompletionItemsSlot","AutosaveMonitor","editorStore","sendNativeEditorDidLayout","styles","headerToolbarStyles","Header","VisualEditor","editPostStore","Layout","constructor","arguments","onSafeAreaInsetsUpdate","bind","onRootViewLayout","state","rootViewHeight","safeAreaInsets","top","bottom","right","left","getSafeAreaInsetsForRootView","then","componentDidMount","_isMounted","safeAreaSubscription","addEventListener","componentWillUnmount","remove","result","setState","event","setHeightState","height","nativeEvent","layout","renderHTML","globalStyles","props","renderVisual","isReady","setTitleRef","render","getStylesFromColorScheme","mode","isHtmlView","marginBottom","OS","containerStyles","container","containerDark","toolbarKeyboardAvoidingViewStyle","toolbarKeyboardAvoidingView","backgroundColor","editorStyles","background","backgroundDark","flex","flexBasis","select","__unstableIsEditorReady","isEditorReady","getEditorMode","getSettings","__experimentalGlobalStylesBaseStyles","color"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,YAAnB,EAAiCC,IAAjC,QAA6C,cAA7C;AACA,OAAOC,QAAP,MAAqB,wBAArB;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,UAAT,QAA2B,iBAA3B;AACA,SACCC,mBADD,EAECC,eAFD,EAGCC,KAAK,IAAIC,gBAHV,QAIO,yBAJP;AAKA,SAASC,OAAT,EAAkBC,wBAAlB,QAAkD,oBAAlD;AACA,SACCC,aADD,EAECC,oBAFD,EAGCC,UAHD,EAICC,OAJD,EAKCC,iCAAiC,IAAIC,uBALtC,QAMO,uBANP;AAOA,SAASC,eAAT,EAA0BV,KAAK,IAAIW,WAAnC,QAAsD,mBAAtD;AACA,SAASC,yBAAT,QAA0C,gCAA1C;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,OAAOC,mBAAP,MAAgC,qCAAhC;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,SAAShB,KAAK,IAAIiB,aAAlB,QAAuC,aAAvC;;AAEA,MAAMC,MAAN,SAAqBtB,SAArB,CAA+B;AAC9BuB,EAAAA,WA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A6B,cAAC,uBAAD,OAnChC,CADD,CADD;AAyCA;;AApJ6B;;AAuJ/B,eAAevD,OAAO,CAAE,CACvBL,UAAU,CAAIwE,MAAF,IAAc;AAAA;;AACzB,QAAM;AAAEC,IAAAA,uBAAuB,EAAEC;AAA3B,MACLF,MAAM,CAAE1D,WAAF,CADP;AAEA,QAAM;AAAE6D,IAAAA;AAAF,MAAoBH,MAAM,CAAEpD,aAAF,CAAhC;AACA,QAAM;AAAEwD,IAAAA;AAAF,MAAkBJ,MAAM,CAAEpE,gBAAF,CAA9B;AACA,QAAM8C,YAAY,mBACjB0B,WAAW,EADM,0EACjB,aAAeC,oCADE,0DACjB,sBAAqDC,KADtD;AAGA,SAAO;AACNzB,IAAAA,OAAO,EAAEqB,aAAa,EADhB;AAENjB,IAAAA,IAAI,EAAEkB,aAAa,EAFb;AAGNzB,IAAAA;AAHM,GAAP;AAKA,CAbS,CADa,EAevB5C,wBAfuB,CAAF,CAAP,CAgBVe,MAhBU,CAAf","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 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-custom-fields.js"],"names":["useState","__","Button","withSelect","store","editorStore","___unstablePreferencesModalBaseOption","BaseOption","CustomFieldsConfirmation","willEnable","isReloading","setIsReloading","document","getElementById","submit","EnableCustomFieldsOption","label","areCustomFieldsEnabled","isChecked","setIsChecked","select","getEditorSettings","enableCustomFields"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,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,EAAAA,sBAAsB,EAAE,CAAC,CAAEG,MAAM,CAAEf,WAAF,CAAN,CAAsBgB,iBAAtB,GACzBC;AAFwC,CAAhB,CAAF,CAAV,CAGRP,wBAHQ,CAAf","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: !! select( editorStore ).getEditorSettings()\n\t\t.enableCustomFields,\n} ) )( EnableCustomFieldsOption );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-custom-fields.js"],"names":["useState","__","Button","withSelect","store","editorStore","___unstablePreferencesModalBaseOption","BaseOption","CustomFieldsConfirmation","willEnable","isReloading","setIsReloading","document","getElementById","submit","EnableCustomFieldsOption","label","areCustomFieldsEnabled","isChecked","setIsChecked","select","getEditorSettings","enableCustomFields"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,QAAyB,oBAAzB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,MAAT,QAAuB,uBAAvB;AACA,SAASC,UAAT,QAA2B,iBAA3B;AACA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,mBAArC;AACA,SAASC,qCAAqC,IAAIC,UAAlD,QAAoE,sBAApE;AAEA,OAAO,SAASC,wBAAT,OAAoD;AAAA,MAAjB;AAAEC,IAAAA;AAAF,GAAiB;AAC1D,QAAM,CAAEC,WAAF,EAAeC,cAAf,IAAkCX,QAAQ,CAAE,KAAF,CAAhD;AAEA,SACC,8BACC;AAAG,IAAA,SAAS,EAAC;AAAb,KACGC,EAAE,CACH,8FADG,CADL,CADD,EAMC,cAAC,MAAD;AACC,IAAA,SAAS,EAAC,gEADX;AAEC,IAAA,OAAO,EAAC,WAFT;AAGC,IAAA,MAAM,EAAGS,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,GACTR,EAAE,CAAE,iBAAF,CADO,GAETA,EAAE,CAAE,kBAAF,CAdN,CAND,CADD;AAyBA;AAED,OAAO,SAASc,wBAAT,QAAuE;AAAA,MAApC;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAoC;AAC7E,QAAM,CAAEC,SAAF,EAAaC,YAAb,IAA8BnB,QAAQ,CAAEiB,sBAAF,CAA5C;AAEA,SACC,cAAC,UAAD;AACC,IAAA,KAAK,EAAGD,KADT;AAEC,IAAA,SAAS,EAAGE,SAFb;AAGC,IAAA,QAAQ,EAAGC;AAHZ,KAKGD,SAAS,KAAKD,sBAAd,IACD,cAAC,wBAAD;AAA0B,IAAA,UAAU,EAAGC;AAAvC,IANF,CADD;AAWA;AAED,eAAef,UAAU,CAAIiB,MAAF,KAAgB;AAC1CH,EAAAA,sBAAsB,EACrB,CAAC,CAAEG,MAAM,CAAEf,WAAF,CAAN,CAAsBgB,iBAAtB,GAA0CC;AAFJ,CAAhB,CAAF,CAAV,CAGRP,wBAHQ,CAAf","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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-panel.js"],"names":["compose","ifCondition","withSelect","withDispatch","___unstablePreferencesModalBaseOption","BaseOption","store","editPostStore","select","panelName","isEditorPanelEnabled","isEditorPanelRemoved","isRemoved","isChecked","dispatch","onChange","toggleEditorPanelEnabled"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,EAAkBC,WAAlB,QAAqC,oBAArC;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,qCAAqC,IAAIC,UAAlD,QAAoE,sBAApE;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AAEA,eAAeP,OAAO,CACrBE,UAAU,CAAE,CAAEM,MAAF,WAA6B;AAAA,MAAnB;AAAEC,IAAAA;AAAF,GAAmB;AACxC,QAAM;AAAEC,IAAAA,oBAAF;AAAwBC,IAAAA;AAAxB,MAAiDH,MAAM,CAC5DD,aAD4D,CAA7D;AAGA,SAAO;AACNK,IAAAA,SAAS,EAAED,oBAAoB,CAAEF,SAAF,CADzB;AAENI,IAAAA,SAAS,EAAEH,oBAAoB,CAAED,SAAF;AAFzB,GAAP;AAIA,CARS,CADW,EAUrBR,WAAW,CAAE;AAAA,MAAE;AAAEW,IAAAA;AAAF,GAAF;AAAA,SAAqB,CAAEA,SAAvB;AAAA,CAAF,CAVU,EAWrBT,YAAY,CAAE,CAAEW,QAAF;AAAA,MAAY;AAAEL,IAAAA;AAAF,GAAZ;AAAA,SAAiC;AAC9CM,IAAAA,QAAQ,EAAE,MACTD,QAAQ,CAAEP,aAAF,CAAR,CAA0BS,wBAA1B,CAAoDP,SAApD;AAF6C,GAAjC;AAAA,CAAF,CAXS,CAAP,CAeZJ,UAfY,CAAf","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 } = select(\n\t\t\teditPostStore\n\t\t);\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"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-panel.js"],"names":["compose","ifCondition","withSelect","withDispatch","___unstablePreferencesModalBaseOption","BaseOption","store","editPostStore","select","panelName","isEditorPanelEnabled","isEditorPanelRemoved","isRemoved","isChecked","dispatch","onChange","toggleEditorPanelEnabled"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,EAAkBC,WAAlB,QAAqC,oBAArC;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,qCAAqC,IAAIC,UAAlD,QAAoE,sBAApE;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AAEA,eAAeP,OAAO,CACrBE,UAAU,CAAE,CAAEM,MAAF,WAA6B;AAAA,MAAnB;AAAEC,IAAAA;AAAF,GAAmB;AACxC,QAAM;AAAEC,IAAAA,oBAAF;AAAwBC,IAAAA;AAAxB,MACLH,MAAM,CAAED,aAAF,CADP;AAEA,SAAO;AACNK,IAAAA,SAAS,EAAED,oBAAoB,CAAEF,SAAF,CADzB;AAENI,IAAAA,SAAS,EAAEH,oBAAoB,CAAED,SAAF;AAFzB,GAAP;AAIA,CAPS,CADW,EASrBR,WAAW,CAAE;AAAA,MAAE;AAAEW,IAAAA;AAAF,GAAF;AAAA,SAAqB,CAAEA,SAAvB;AAAA,CAAF,CATU,EAUrBT,YAAY,CAAE,CAAEW,QAAF;AAAA,MAAY;AAAEL,IAAAA;AAAF,GAAZ;AAAA,SAAiC;AAC9CM,IAAAA,QAAQ,EAAE,MACTD,QAAQ,CAAEP,aAAF,CAAR,CAA0BS,wBAA1B,CAAoDP,SAApD;AAF6C,GAAjC;AAAA,CAAF,CAVS,CAAP,CAcZJ,UAdY,CAAf","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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-publish-sidebar.js"],"names":["compose","withSelect","withDispatch","ifViewportMatches","store","editorStore","___unstablePreferencesModalBaseOption","BaseOption","select","isChecked","isPublishSidebarEnabled","dispatch","enablePublishSidebar","disablePublishSidebar","onChange","isEnabled"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,mBAArC;AACA,SAASC,qCAAqC,IAAIC,UAAlD,QAAoE,sBAApE;AAEA,eAAeP,OAAO,CACrBC,UAAU,CAAIO,MAAF,KAAgB;AAC3BC,EAAAA,SAAS,EAAED,MAAM,CAAEH,WAAF,CAAN,CAAsBK,uBAAtB;AADgB,CAAhB,CAAF,CADW,EAIrBR,YAAY,CAAIS,QAAF,IAAgB;AAC7B,QAAM;AAAEC,IAAAA,oBAAF;AAAwBC,IAAAA;AAAxB,MAAkDF,QAAQ,CAC/DN,WAD+D,CAAhE;AAGA,SAAO;AACNS,IAAAA,QAAQ,EAAIC,SAAF,IACTA,SAAS,GAAGH,oBAAoB,EAAvB,GAA4BC,qBAAqB;AAFrD,GAAP;AAIA,CARW,CAJS,EAarB;AACA;AACAV,iBAAiB,CAAE,QAAF,CAfI,CAAP,CAgBZI,UAhBY,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { ifViewportMatches } from '@wordpress/viewport';\nimport { store as editorStore } from '@wordpress/editor';\nimport { ___unstablePreferencesModalBaseOption as BaseOption } from '@wordpress/interface';\n\nexport default compose(\n\twithSelect( ( select ) => ( {\n\t\tisChecked: select( editorStore ).isPublishSidebarEnabled(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { enablePublishSidebar, disablePublishSidebar } = dispatch(\n\t\t\teditorStore\n\t\t);\n\t\treturn {\n\t\t\tonChange: ( isEnabled ) =>\n\t\t\t\tisEnabled ? enablePublishSidebar() : disablePublishSidebar(),\n\t\t};\n\t} ),\n\t// In < medium viewports we override this option and always show the publish sidebar.\n\t// See the edit-post's header component for the specific logic.\n\tifViewportMatches( 'medium' )\n)( BaseOption );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/preferences-modal/options/enable-publish-sidebar.js"],"names":["compose","withSelect","withDispatch","ifViewportMatches","store","editorStore","___unstablePreferencesModalBaseOption","BaseOption","select","isChecked","isPublishSidebarEnabled","dispatch","enablePublishSidebar","disablePublishSidebar","onChange","isEnabled"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,mBAArC;AACA,SAASC,qCAAqC,IAAIC,UAAlD,QAAoE,sBAApE;AAEA,eAAeP,OAAO,CACrBC,UAAU,CAAIO,MAAF,KAAgB;AAC3BC,EAAAA,SAAS,EAAED,MAAM,CAAEH,WAAF,CAAN,CAAsBK,uBAAtB;AADgB,CAAhB,CAAF,CADW,EAIrBR,YAAY,CAAIS,QAAF,IAAgB;AAC7B,QAAM;AAAEC,IAAAA,oBAAF;AAAwBC,IAAAA;AAAxB,MACLF,QAAQ,CAAEN,WAAF,CADT;AAEA,SAAO;AACNS,IAAAA,QAAQ,EAAIC,SAAF,IACTA,SAAS,GAAGH,oBAAoB,EAAvB,GAA4BC,qBAAqB;AAFrD,GAAP;AAIA,CAPW,CAJS,EAYrB;AACA;AACAV,iBAAiB,CAAE,QAAF,CAdI,CAAP,CAeZI,UAfY,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { ifViewportMatches } from '@wordpress/viewport';\nimport { store as editorStore } from '@wordpress/editor';\nimport { ___unstablePreferencesModalBaseOption as BaseOption } from '@wordpress/interface';\n\nexport default compose(\n\twithSelect( ( select ) => ( {\n\t\tisChecked: select( editorStore ).isPublishSidebarEnabled(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { enablePublishSidebar, disablePublishSidebar } =\n\t\t\tdispatch( editorStore );\n\t\treturn {\n\t\t\tonChange: ( isEnabled ) =>\n\t\t\t\tisEnabled ? enablePublishSidebar() : disablePublishSidebar(),\n\t\t};\n\t} ),\n\t// In < medium viewports we override this option and always show the publish sidebar.\n\t// See the edit-post's header component for the specific logic.\n\tifViewportMatches( 'medium' )\n)( BaseOption );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/secondary-sidebar/inserter-sidebar.js"],"names":["useDispatch","useSelect","Button","VisuallyHidden","__experimentalLibrary","Library","close","useViewportMatch","__experimentalUseDialog","useDialog","__","useEffect","useRef","store","editPostStore","InserterSidebar","insertionPoint","showMostUsedBlocks","select","isFeatureActive","__experimentalGetInsertionPoint","setIsInserterOpened","isMobileViewport","TagName","inserterDialogRef","inserterDialogProps","onClose","focusOnMount","libraryRef","current","focusSearch","rootClientId","insertionIndex","filterValue"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SAASC,MAAT,EAAiBC,cAAjB,QAAuC,uBAAvC;AACA,SAASC,qBAAqB,IAAIC,OAAlC,QAAiD,yBAAjD;AACA,SAASC,KAAT,QAAs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AAAnB,KACC,cAAC,MAAD;AACC,IAAA,IAAI,EAAGnB,KADR;AAEC,IAAA,KAAK,EAAGI,EAAE,CAAE,sBAAF,CAFX;AAGC,IAAA,OAAO,EAAG,MAAMW,mBAAmB,CAAE,KAAF;AAHpC,IADD,CALD,EAYC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,OAAD;AACC,IAAA,kBAAkB,EAAGJ,kBADtB;AAEC,IAAA,qBAAqB,MAFtB;AAGC,IAAA,gBAAgB,EAAGK,gBAHpB;AAIC,IAAA,YAAY,EAAGN,cAAc,CAACe,YAJ/B;AAKC,IAAA,4BAA4B,EAC3Bf,cAAc,CAACgB,cANjB;AAQC,IAAA,yBAAyB,EAAGhB,cAAc,CAACiB,WAR5C;AASC,IAAA,GAAG,EAAGL;AATP,IADD,CAZD,CADD;AA4BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport { close } from '@wordpress/icons';\nimport {\n\tuseViewportMatch,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport default function InserterSidebar() {\n\tconst { insertionPoint, showMostUsedBlocks } = useSelect( ( select ) => {\n\t\tconst { isFeatureActive, __experimentalGetInsertionPoint } = select(\n\t\t\teditPostStore\n\t\t);\n\t\treturn {\n\t\t\tinsertionPoint: __experimentalGetInsertionPoint(),\n\t\t\tshowMostUsedBlocks: isFeatureActive( 'mostUsedBlocks' ),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editPostStore );\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst TagName = ! isMobileViewport ? VisuallyHidden : 'div';\n\tconst [ inserterDialogRef, inserterDialogProps ] = useDialog( {\n\t\tonClose: () => setIsInserterOpened( false ),\n\t\tfocusOnMount: null,\n\t} );\n\n\tconst libraryRef = useRef();\n\tuseEffect( () => {\n\t\tlibraryRef.current.focusSearch();\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ inserterDialogRef }\n\t\t\t{ ...inserterDialogProps }\n\t\t\tclassName=\"edit-post-editor__inserter-panel\"\n\t\t>\n\t\t\t<TagName className=\"edit-post-editor__inserter-panel-header\">\n\t\t\t\t<Button\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tlabel={ __( 'Close block inserter' ) }\n\t\t\t\t\tonClick={ () => setIsInserterOpened( false ) }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t\t<div className=\"edit-post-editor__inserter-panel-content\">\n\t\t\t\t<Library\n\t\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\t\tshowInserterHelpPanel\n\t\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\t\trootClientId={ insertionPoint.rootClientId }\n\t\t\t\t\t__experimentalInsertionIndex={\n\t\t\t\t\t\tinsertionPoint.insertionIndex\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalFilterValue={ insertionPoint.filterValue }\n\t\t\t\t\tref={ libraryRef }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/secondary-sidebar/inserter-sidebar.js"],"names":["useDispatch","useSelect","Button","VisuallyHidden","__experimentalLibrary","Library","close","useViewportMatch","__experimentalUseDialog","useDialog","__","useEffect","useRef","store","editPostStore","InserterSidebar","insertionPoint","showMostUsedBlocks","select","isFeatureActive","__experimentalGetInsertionPoint","setIsInserterOpened","isMobileViewport","TagName","inserterDialogRef","inserterDialogProps","onClose","focusOnMount","libraryRef","current","focusSearch","rootClientId","insertionIndex","filterValue"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,WAAT,EAAsBC,SAAtB,QAAu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T;AAIA,SACC;AACC,IAAA,GAAG,EAAGN;AADP,KAEMC,mBAFN;AAGC,IAAA,SAAS,EAAC;AAHX,MAKC,cAAC,OAAD;AAAS,IAAA,SAAS,EAAC;AAAnB,KACC,cAAC,MAAD;AACC,IAAA,IAAI,EAAGnB,KADR;AAEC,IAAA,KAAK,EAAGI,EAAE,CAAE,sBAAF,CAFX;AAGC,IAAA,OAAO,EAAG,MAAMW,mBAAmB,CAAE,KAAF;AAHpC,IADD,CALD,EAYC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,OAAD;AACC,IAAA,kBAAkB,EAAGJ,kBADtB;AAEC,IAAA,qBAAqB,MAFtB;AAGC,IAAA,gBAAgB,EAAGK,gBAHpB;AAIC,IAAA,YAAY,EAAGN,cAAc,CAACe,YAJ/B;AAKC,IAAA,4BAA4B,EAC3Bf,cAAc,CAACgB,cANjB;AAQC,IAAA,yBAAyB,EAAGhB,cAAc,CAACiB,WAR5C;AASC,IAAA,GAAG,EAAGL;AATP,IADD,CAZD,CADD;AA4BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport { close } from '@wordpress/icons';\nimport {\n\tuseViewportMatch,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport default function InserterSidebar() {\n\tconst { insertionPoint, showMostUsedBlocks } = useSelect( ( select ) => {\n\t\tconst { isFeatureActive, __experimentalGetInsertionPoint } =\n\t\t\tselect( editPostStore );\n\t\treturn {\n\t\t\tinsertionPoint: __experimentalGetInsertionPoint(),\n\t\t\tshowMostUsedBlocks: isFeatureActive( 'mostUsedBlocks' ),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editPostStore );\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst TagName = ! isMobileViewport ? VisuallyHidden : 'div';\n\tconst [ inserterDialogRef, inserterDialogProps ] = useDialog( {\n\t\tonClose: () => setIsInserterOpened( false ),\n\t\tfocusOnMount: null,\n\t} );\n\n\tconst libraryRef = useRef();\n\tuseEffect( () => {\n\t\tlibraryRef.current.focusSearch();\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ inserterDialogRef }\n\t\t\t{ ...inserterDialogProps }\n\t\t\tclassName=\"edit-post-editor__inserter-panel\"\n\t\t>\n\t\t\t<TagName className=\"edit-post-editor__inserter-panel-header\">\n\t\t\t\t<Button\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tlabel={ __( 'Close block inserter' ) }\n\t\t\t\t\tonClick={ () => setIsInserterOpened( false ) }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t\t<div className=\"edit-post-editor__inserter-panel-content\">\n\t\t\t\t<Library\n\t\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\t\tshowInserterHelpPanel\n\t\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\t\trootClientId={ insertionPoint.rootClientId }\n\t\t\t\t\t__experimentalInsertionIndex={\n\t\t\t\t\t\tinsertionPoint.insertionIndex\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalFilterValue={ insertionPoint.filterValue }\n\t\t\t\t\tref={ libraryRef }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/discussion-panel/index.js"],"names":["__","PanelBody","PanelRow","PostComments","PostPingbacks","PostTypeSupportCheck","compose","withSelect","withDispatch","store","editPostStore","PANEL_NAME","DiscussionPanel","isEnabled","isOpened","onTogglePanel","select","isEditorPanelEnabled","isEditorPanelOpened","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;A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BJ,EAAAA,aAAa,GAAG;AACf,WAAOI,QAAQ,CAAET,aAAF,CAAR,CAA0BU,uBAA1B,CACNT,UADM,CAAP;AAGA;;AAL8B,CAAlB,CAAF,CATW,CAAF,CAAP,CAgBVC,eAhBU,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport {\n\tPostComments,\n\tPostPingbacks,\n\tPostTypeSupportCheck,\n} from '@wordpress/editor';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'discussion-panel';\n\nfunction DiscussionPanel( { isEnabled, isOpened, onTogglePanel } ) {\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys={ [ 'comments', 'trackbacks' ] }>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ onTogglePanel }\n\t\t\t>\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"comments\">\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<PostComments />\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PostTypeSupportCheck>\n\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"trackbacks\">\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<PostPingbacks />\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PostTypeSupportCheck>\n\t\t\t</PanelBody>\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tisEnabled: select( editPostStore ).isEditorPanelEnabled(\n\t\t\t\tPANEL_NAME\n\t\t\t),\n\t\t\tisOpened: select( editPostStore ).isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonTogglePanel() {\n\t\t\treturn dispatch( editPostStore ).toggleEditorPanelOpened(\n\t\t\t\tPANEL_NAME\n\t\t\t);\n\t\t},\n\t} ) ),\n] )( DiscussionPanel );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/discussion-panel/index.js"],"names":["__","PanelBody","PanelRow","PostComments","PostPingbacks","PostTypeSupportCheck","compose","withSelect","withDispatch","store","editPostStore","PANEL_NAME","DiscussionPanel","isEnabled","isOpened","onTogglePanel","select","isEditorPanelEnabled","isEditorPanelOpened","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,EAAoBC,QAApB,QAAoC,uBAApC;AACA,SACCC,YADD,EAECC,aAFD,EAGCC,oBAHD,QAIO,mBAJP;AAKA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AAEA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG,kBAAnB;;AAEA,SAASC,eAAT,OAAmE;AAAA,MAAzC;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuBC,IAAAA;AAAvB,GAAyC;;AAClE,MAAK,CAAEF,SAAP,EAAmB;AAClB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,oBAAD;AAAsB,IAAA,WAAW,EAAG,CAAE,UAAF,EAAc,YAAd;AAApC,KACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGb,EAAE,CAAE,YAAF,CADX;AAEC,IAAA,MAAM,EAAGc,QAFV;AAGC,IAAA,QAAQ,EAAGC;AAHZ,KAKC,cAAC,oBAAD;AAAsB,IAAA,WAAW,EAAC;AAAlC,KACC,cAAC,QAAD,QACC,cAAC,YAAD,OADD,CADD,CALD,EAWC,cAAC,oBAAD;AAAsB,IAAA,WAAW,EAAC;AAAlC,KACC,cAAC,QAAD,QACC,cAAC,aAAD,OADD,CADD,CAXD,CADD,CADD;AAqBA;;AAED,eAAeT,OAAO,CAAE,CACvBC,UAAU,CAAIS,MAAF,IAAc;AACzB,SAAO;AACNH,IAAAA,SAAS,EACRG,MAAM,CAAEN,aAAF,CAAN,CAAwBO,oBAAxB,CAA8CN,UAA9C,CAFK;AAGNG,IAAAA,QAAQ,EAAEE,MAAM,CAAEN,aAAF,CAAN,CAAwBQ,mBAAxB,CAA6CP,UAA7C;AAHJ,GAAP;AAKA,CANS,CADa,EAQvBH,YAAY,CAAIW,QAAF,KAAkB;AAC/BJ,EAAAA,aAAa,GAAG;AACf,WAAOI,QAAQ,CAAET,aAAF,CAAR,CAA0BU,uBAA1B,CACNT,UADM,CAAP;AAGA;;AAL8B,CAAlB,CAAF,CARW,CAAF,CAAP,CAeVC,eAfU,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport {\n\tPostComments,\n\tPostPingbacks,\n\tPostTypeSupportCheck,\n} from '@wordpress/editor';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'discussion-panel';\n\nfunction DiscussionPanel( { isEnabled, isOpened, onTogglePanel } ) {\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys={ [ 'comments', 'trackbacks' ] }>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ onTogglePanel }\n\t\t\t>\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"comments\">\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<PostComments />\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PostTypeSupportCheck>\n\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"trackbacks\">\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<PostPingbacks />\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PostTypeSupportCheck>\n\t\t\t</PanelBody>\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tisEnabled:\n\t\t\t\tselect( editPostStore ).isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: select( editPostStore ).isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonTogglePanel() {\n\t\t\treturn dispatch( editPostStore ).toggleEditorPanelOpened(\n\t\t\t\tPANEL_NAME\n\t\t\t);\n\t\t},\n\t} ) ),\n] )( DiscussionPanel );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/featured-image/index.js"],"names":["get","partial","__","PanelBody","PostFeaturedImage","PostFeaturedImageCheck","store","editorStore","compose","withSelect","withDispatch","coreStore","editPostStore","PANEL_NAME","FeaturedImage","isEnabled","isOpened","postType","onTogglePanel","applyWithSelect","select","getEditedPostAttribute","getPostType","isEditorPanelEnabled","isEditorPanelOpened","applyWithDispatch","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,GAAT,EAAcC,OAAd,QAA6B,QAA7B;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SACCC,iBADD,EAECC,sBAFD,EAGCC,KAAK,IAAIC,WAHV,QAIO,mBAJP;AAKA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASJ,KAAK,IAAIK,SAAlB,QAA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,aAAa,EAAEjB,OAAO,CAAE0B,uBAAF,EAA2Bd,UAA3B;AADhB,GAAP;AAGA,CANqC,CAAtC;AAQA,eAAeL,OAAO,CAAEW,eAAF,EAAmBM,iBAAnB,CAAP,CAA+CX,aAA/C,CAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { get, partial } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody } from '@wordpress/components';\nimport {\n\tPostFeaturedImage,\n\tPostFeaturedImageCheck,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'featured-image';\n\nfunction FeaturedImage( { isEnabled, isOpened, postType, onTogglePanel } ) {\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ get(\n\t\t\t\t\tpostType,\n\t\t\t\t\t[ 'labels', 'featured_image' ],\n\t\t\t\t\t__( 'Featured image' )\n\t\t\t\t) }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ onTogglePanel }\n\t\t\t>\n\t\t\t\t<PostFeaturedImage />\n\t\t\t</PanelBody>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getEditedPostAttribute } = select( editorStore );\n\tconst { getPostType } = select( coreStore );\n\tconst { isEditorPanelEnabled, isEditorPanelOpened } = select(\n\t\teditPostStore\n\t);\n\n\treturn {\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t};\n} );\n\nconst applyWithDispatch = withDispatch( ( dispatch ) => {\n\tconst { toggleEditorPanelOpened } = dispatch( editPostStore );\n\n\treturn {\n\t\tonTogglePanel: partial( toggleEditorPanelOpened, PANEL_NAME ),\n\t};\n} );\n\nexport default compose( applyWithSelect, applyWithDispatch )( FeaturedImage );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/featured-image/index.js"],"names":["get","partial","__","PanelBody","PostFeaturedImage","PostFeaturedImageCheck","store","editorStore","compose","withSelect","withDispatch","coreStore","editPostStore","PANEL_NAME","FeaturedImage","isEnabled","isOpened","postType","onTogglePanel","applyWithSelect","select","getEditedPostAttribute","getPostType","isEditorPanelEnabled","isEditorPanelOpened","applyWithDispatch","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,GAAT,EAAcC,OAAd,QAA6B,QAA7B;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SACCC,iBADD,EAECC,sBAFD,EAGCC,KAAK,IAAIC,WAHV,QAIO,mBAJP;AAKA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASJ,KAAK,IAAIK,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASL,KAAK,IAAIM,aAAlB,QAAuC,gBAAvC;AAEA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG,gBAAnB;;AAEA,SAASC,aAAT,OAA2E;AAAA,MAAnD;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuBC,IAAAA,QAAvB;AAAiCC,IAAAA;AAAjC,GAAmD;;AAC1E,MAAK,CAAEH,SAAP,EAAmB;AAClB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,sBAAD,QACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGf,GAAG,CACViB,QADU,EAEV,CAAE,QAAF,EAAY,gBAAZ,CAFU,EAGVf,EAAE,CAAE,gBAAF,CAHQ,CADZ;AAMC,IAAA,MAAM,EAAGc,QANV;AAOC,IAAA,QAAQ,EAAGE;AAPZ,KASC,cAAC,iBAAD,OATD,CADD,CADD;AAeA;;AAED,MAAMC,eAAe,GAAGV,UAAU,CAAIW,MAAF,IAAc;AACjD,QAAM;AAAEC,IAAAA;AAAF,MAA6BD,MAAM,CAAEb,WAAF,CAAzC;AACA,QAAM;AAAEe,IAAAA;AAAF,MAAkBF,MAAM,CAAET,SAAF,CAA9B;AACA,QAAM;AAAEY,IAAAA,oBAAF;AAAwBC,IAAAA;AAAxB,MACLJ,MAAM,CAAER,aAAF,CADP;AAGA,SAAO;AACNK,IAAAA,QAAQ,EAAEK,WAAW,CAAED,sBAAsB,CAAE,MAAF,CAAxB,CADf;AAENN,IAAAA,SAAS,EAAEQ,oBAAoB,CAAEV,UAAF,CAFzB;AAGNG,IAAAA,QAAQ,EAAEQ,mBAAmB,CAAEX,UAAF;AAHvB,GAAP;AAKA,CAXiC,CAAlC;AAaA,MAAMY,iBAAiB,GAAGf,YAAY,CAAIgB,QAAF,IAAgB;AACvD,QAAM;AAAEC,IAAAA;AAAF,MAA8BD,QAAQ,CAAEd,aAAF,CAA5C;AAEA,SAAO;AACNM,IAAAA,aAAa,EAAEjB,OAAO,CAAE0B,uBAAF,EAA2Bd,UAA3B;AADhB,GAAP;AAGA,CANqC,CAAtC;AAQA,eAAeL,OAAO,CAAEW,eAAF,EAAmBM,iBAAnB,CAAP,CAA+CX,aAA/C,CAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { get, partial } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody } from '@wordpress/components';\nimport {\n\tPostFeaturedImage,\n\tPostFeaturedImageCheck,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'featured-image';\n\nfunction FeaturedImage( { isEnabled, isOpened, postType, onTogglePanel } ) {\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ get(\n\t\t\t\t\tpostType,\n\t\t\t\t\t[ 'labels', 'featured_image' ],\n\t\t\t\t\t__( 'Featured image' )\n\t\t\t\t) }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ onTogglePanel }\n\t\t\t>\n\t\t\t\t<PostFeaturedImage />\n\t\t\t</PanelBody>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getEditedPostAttribute } = select( editorStore );\n\tconst { getPostType } = select( coreStore );\n\tconst { isEditorPanelEnabled, isEditorPanelOpened } =\n\t\tselect( editPostStore );\n\n\treturn {\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t};\n} );\n\nconst applyWithDispatch = withDispatch( ( dispatch ) => {\n\tconst { toggleEditorPanelOpened } = dispatch( editPostStore );\n\n\treturn {\n\t\tonTogglePanel: partial( toggleEditorPanelOpened, PANEL_NAME ),\n\t};\n} );\n\nexport default compose( applyWithSelect, applyWithDispatch )( FeaturedImage );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/page-attributes/index.js"],"names":["get","partial","__","PanelBody","PanelRow","store","editorStore","PageAttributesCheck","PageAttributesOrder","PageAttributesParent","useSelect","useDispatch","coreStore","editPostStore","PANEL_NAME","PageAttributes","isEnabled","isOpened","postType","select","getEditedPostAttribute","isEditorPanelEnabled","isEditorPanelOpened","getPostType","toggleEditorPanelOpened","onTogglePanel"],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B,OAAO,CAAEuB,uBAAF,EAA2BV,UAA3B,CAA7B;AAEA,SACC,cAAC,mBAAD,QACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGd,GAAG,CACVkB,QADU,EAEV,CAAE,QAAF,EAAY,YAAZ,CAFU,EAGVhB,EAAE,CAAE,iBAAF,CAHQ,CADZ;AAMC,IAAA,MAAM,EAAGe,QANV;AAOC,IAAA,QAAQ,EAAGQ;AAPZ,KASC,cAAC,oBAAD,OATD,EAUC,cAAC,QAAD,QACC,cAAC,mBAAD,OADD,CAVD,CADD,CADD;AAkBA;AAED,eAAeV,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { get, partial } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport {\n\tstore as editorStore,\n\tPageAttributesCheck,\n\tPageAttributesOrder,\n\tPageAttributesParent,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'page-attributes';\n\nexport function PageAttributes() {\n\tconst { isEnabled, isOpened, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { isEditorPanelEnabled, isEditorPanelOpened } = select(\n\t\t\teditPostStore\n\t\t);\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn {\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editPostStore );\n\n\tif ( ! isEnabled || ! postType ) {\n\t\treturn null;\n\t}\n\n\tconst onTogglePanel = partial( toggleEditorPanelOpened, PANEL_NAME );\n\n\treturn (\n\t\t<PageAttributesCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ get(\n\t\t\t\t\tpostType,\n\t\t\t\t\t[ 'labels', 'attributes' ],\n\t\t\t\t\t__( 'Page attributes' )\n\t\t\t\t) }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ onTogglePanel }\n\t\t\t>\n\t\t\t\t<PageAttributesParent />\n\t\t\t\t<PanelRow>\n\t\t\t\t\t<PageAttributesOrder />\n\t\t\t\t</PanelRow>\n\t\t\t</PanelBody>\n\t\t</PageAttributesCheck>\n\t);\n}\n\nexport default PageAttributes;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/page-attributes/index.js"],"names":["get","partial","__","PanelBody","PanelRow","store","editorStore","PageAttributesCheck","PageAttributesOrder","PageAttributesParent","useSelect","useDispatch","coreStore","editPostStore","PANEL_NAME","PageAttributes","isEnabled","isOpened","postType","select","getEditedPostAttribute","isEditorPanelEnabled","isEditorPanelOpened","getPostType","toggleEditorPanelOpened","onTogglePanel"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,GAAT,EAAcC,OAAd,QAA6B,QAA7B;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,EAAoBC,QAApB,QAAoC,uBAApC;AACA,SACCC,KAAK,IAAIC,WADV,EAECC,mBAFD,EAGCC,mBAHD,EAICC,oBAJD,QAKO,mBALP;AAMA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASN,KAAK,IAAIO,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASP,KAAK,IAAIQ,aAAlB,QAAuC,gBAAvC;AAEA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG,iBAAnB;AAEA,OAAO,SAASC,cAAT,GAA0B;AAChC,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuBC,IAAAA;AAAvB,MAAoCR,SAAS,CAAIS,MAAF,IAAc;AAClE,UAAM;AAAEC,MAAAA;AAAF,QAA6BD,MAAM,CAAEb,WAAF,CAAzC;AACA,UAAM;AAAEe,MAAAA,oBAAF;AAAwBC,MAAAA;AAAxB,QACLH,MAAM,CAAEN,aAAF,CADP;AAEA,UAAM;AAAEU,MAAAA;AAAF,QAAkBJ,MAAM,CAAEP,SAAF,CAA9B;AACA,WAAO;AACNI,MAAAA,SAAS,EAAEK,oBAAoB,CAAEP,UAAF,CADzB;AAENG,MAAAA,QAAQ,EAAEK,mBAAmB,CAAER,UAAF,CAFvB;AAGNI,MAAAA,QAAQ,EAAEK,WAAW,CAAEH,sBAAsB,CAAE,MAAF,CAAxB;AAHf,KAAP;AAKA,GAVkD,EAUhD,EAVgD,CAAnD;AAYA,QAAM;AAAEI,IAAAA;AAAF,MAA8Bb,WAAW,CAAEE,aAAF,CAA/C;;AAEA,MAAK,CAAEG,SAAF,IAAe,CAAEE,QAAtB,EAAiC;AAChC,WAAO,IAAP;AACA;;AAED,QAAMO,aAAa,GAAGxB,OAAO,CAAEuB,uBAAF,EAA2BV,UAA3B,CAA7B;AAEA,SACC,cAAC,mBAAD,QACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGd,GAAG,CACVkB,QADU,EAEV,CAAE,QAAF,EAAY,YAAZ,CAFU,EAGVhB,EAAE,CAAE,iBAAF,CAHQ,CADZ;AAMC,IAAA,MAAM,EAAGe,QANV;AAOC,IAAA,QAAQ,EAAGQ;AAPZ,KASC,cAAC,oBAAD,OATD,EAUC,cAAC,QAAD,QACC,cAAC,mBAAD,OADD,CAVD,CADD,CADD;AAkBA;AAED,eAAeV,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { get, partial } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport {\n\tstore as editorStore,\n\tPageAttributesCheck,\n\tPageAttributesOrder,\n\tPageAttributesParent,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'page-attributes';\n\nexport function PageAttributes() {\n\tconst { isEnabled, isOpened, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { isEditorPanelEnabled, isEditorPanelOpened } =\n\t\t\tselect( editPostStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn {\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editPostStore );\n\n\tif ( ! isEnabled || ! postType ) {\n\t\treturn null;\n\t}\n\n\tconst onTogglePanel = partial( toggleEditorPanelOpened, PANEL_NAME );\n\n\treturn (\n\t\t<PageAttributesCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ get(\n\t\t\t\t\tpostType,\n\t\t\t\t\t[ 'labels', 'attributes' ],\n\t\t\t\t\t__( 'Page attributes' )\n\t\t\t\t) }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ onTogglePanel }\n\t\t\t>\n\t\t\t\t<PageAttributesParent />\n\t\t\t\t<PanelRow>\n\t\t\t\t\t<PageAttributesOrder />\n\t\t\t\t</PanelRow>\n\t\t\t</PanelBody>\n\t\t</PageAttributesCheck>\n\t);\n}\n\nexport default PageAttributes;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/plugin-document-setting-panel/index.js"],"names":["createSlotFill","PanelBody","compose","withPluginContext","withDispatch","withSelect","warning","EnablePluginDocumentSettingPanelOption","store","editPostStore","Fill","Slot","PluginDocumentSettingFill","isEnabled","panelName","opened","onToggle","className","title","icon","children","PluginDocumentSettingPanel","context","ownProps","undefined","name","select","isEditorPanelOpened","isEditorPanelEnabled","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,iBAAT,QAAkC,oBAAlC;AACA,SAASC,YAAT,EAAuBC,UAAvB,QAAyC,iBAAzC;AACA,OAAOC,OAAP,MAAoB,oBAApB;AAEA;AACA;AACA;;AACA,SAASC,sCAAT,QAAuD,iCAAvD;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AAEA,OAAO,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBX,cAAc,CAAE,4BAAF,CAArC;;AAEP,MAAMY,yBAAyB,GAAG,QAS3B;AAAA,MAT6B;AACnCC,IAAAA,SADmC;AAEnCC,IAAAA,SAFmC;AAGnCC,IAAAA,MAHmC;AAInCC,IAAAA,QAJmC;AAKnCC,IAAAA,SALmC;AAMnCC,IAAAA,KANmC;AAOnCC,IAAAA,IAPmC;AAQnCC,IAAAA;AARmC,GAS7B;AACN,SACC,8BACC,cAAC,sCAAD;AACC,IAAA,KAAK,EAAGF,KADT;AAEC,IAAA,SAAS,EAAGJ;AAFb,IADD,EAKC,cAAC,IAAD,QACGD,SAAS,IACV,cAAC,SAAD;AACC,IAAA,SAAS,EAAGI,SADb;AAEC,IAAA,KAAK,EAAGC,KAFT;AAGC,IAAA,IAAI,EAAGC,IAHR;AAIC,IAAA,MAAM,EAAGJ,MAJV;AAKC,IAAA,QAAQ,EAAGC;AALZ,KAOGI,QAPH,CAFF,CALD,CADD;AAqBA,CA/BD;AAiCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMC,0BAA0B,GAAGnB,OAAO,CACzCC,iBAAiB,CAAE,CAAEmB,OAAF,EAAWC,QAAX,KAAyB;AAC3C,MAAKC,SAAS,KAAKD,QAAQ,CAACE,IAA5B,EAAmC;AAClC,6FAAAnB,OAAO,CAAE,sDAAF,CAAP;AACA;;AACD,SAAO;AACNQ,IAAAA,SAAS,EAAG,GAAGQ,OAAO,CAACG,IAAM,IAAIF,QAAQ,CAACE,IAAM;AAD1C,GAAP;AAGA,CAPgB,CADwB,EASzCpB,UAAU,CAAE,CAAEqB,MAAF,YAA6B;AAAA,MAAnB;AAAEZ,IAAAA;AAAF,GAAmB;AACxC,SAAO;AACNC,IAAAA,MAAM,EAAEW,MAAM,CAAEjB,aAAF,CAAN,CAAwBkB,mBAAxB,CAA6Cb,SAA7C,CADF;AAEND,IAAAA,SAAS,EAAEa,MAAM,CAAEjB,aAAF,CAAN,CAAwBmB,oBAAxB,CACVd,SADU;AAFL,GAAP;AAMA,CAPS,CAT+B,EAiBzCV,YAAY,CAAE,CAAEyB,QAAF;AAAA,MAAY;AAAEf,IAAAA;AAAF,GAAZ;AAAA,SAAiC;AAC9CE,IAAAA,QAAQ,GAAG;AACV,aAAOa,QAAQ,CAAEpB,aAAF,CAAR,CAA0BqB,uBAA1B,CACNhB,SADM,CAAP;AAGA;;AAL6C,GAAjC;AAAA,CAAF,CAjB6B,CAAP,CAwBhCF,yBAxBgC,CAAnC;AA0BAS,0BAA0B,CAACV,IAA3B,GAAkCA,IAAlC;AAEA,eAAeU,0BAAf","sourcesContent":["/**\n * Defines as extensibility slot for the Settings sidebar\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\nimport { withPluginContext } from '@wordpress/plugins';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { EnablePluginDocumentSettingPanelOption } from '../../preferences-modal/options';\nimport { store as editPostStore } from '../../../store';\n\nexport const { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\nconst PluginDocumentSettingFill = ( {\n\tisEnabled,\n\tpanelName,\n\topened,\n\tonToggle,\n\tclassName,\n\ttitle,\n\ticon,\n\tchildren,\n} ) => {\n\treturn (\n\t\t<>\n\t\t\t<EnablePluginDocumentSettingPanelOption\n\t\t\t\tlabel={ title }\n\t\t\t\tpanelName={ panelName }\n\t\t\t/>\n\t\t\t<Fill>\n\t\t\t\t{ isEnabled && (\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\topened={ opened }\n\t\t\t\t\t\tonToggle={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</Fill>\n\t\t</>\n\t);\n};\n\n/**\n * Renders items below the Status & Availability panel in the Document Sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.name] The machine-friendly name for the panel.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {string} [props.title] The title of the panel\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = wp.element.createElement;\n * var __ = wp.i18n.__;\n * var registerPlugin = wp.plugins.registerPlugin;\n * var PluginDocumentSettingPanel = wp.editPost.PluginDocumentSettingPanel;\n *\n * function MyDocumentSettingPlugin() {\n * \treturn el(\n * \t\tPluginDocumentSettingPanel,\n * \t\t{\n * \t\t\tclassName: 'my-document-setting-plugin',\n * \t\t\ttitle: 'My Panel',\n * \t\t},\n * \t\t__( 'My Document Setting Panel' )\n * \t);\n * }\n *\n * registerPlugin( 'my-document-setting-plugin', {\n * \t\trender: MyDocumentSettingPlugin\n * } );\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { registerPlugin } from '@wordpress/plugins';\n * import { PluginDocumentSettingPanel } from '@wordpress/edit-post';\n *\n * const MyDocumentSettingTest = () => (\n * \t\t<PluginDocumentSettingPanel className=\"my-document-setting-plugin\" title=\"My Panel\">\n *\t\t\t<p>My Document Setting Panel</p>\n *\t\t</PluginDocumentSettingPanel>\n *\t);\n *\n * registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\nconst PluginDocumentSettingPanel = compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\tif ( undefined === ownProps.name ) {\n\t\t\twarning( 'PluginDocumentSettingPanel requires a name property.' );\n\t\t}\n\t\treturn {\n\t\t\tpanelName: `${ context.name }/${ ownProps.name }`,\n\t\t};\n\t} ),\n\twithSelect( ( select, { panelName } ) => {\n\t\treturn {\n\t\t\topened: select( editPostStore ).isEditorPanelOpened( panelName ),\n\t\t\tisEnabled: select( editPostStore ).isEditorPanelEnabled(\n\t\t\t\tpanelName\n\t\t\t),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { panelName } ) => ( {\n\t\tonToggle() {\n\t\t\treturn dispatch( editPostStore ).toggleEditorPanelOpened(\n\t\t\t\tpanelName\n\t\t\t);\n\t\t},\n\t} ) )\n)( PluginDocumentSettingFill );\n\nPluginDocumentSettingPanel.Slot = Slot;\n\nexport default PluginDocumentSettingPanel;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/plugin-document-setting-panel/index.js"],"names":["createSlotFill","PanelBody","compose","withPluginContext","withDispatch","withSelect","warning","EnablePluginDocumentSettingPanelOption","store","editPostStore","Fill","Slot","PluginDocumentSettingFill","isEnabled","panelName","opened","onToggle","className","title","icon","children","PluginDocumentSettingPanel","context","ownProps","undefined","name","select","isEditorPanelOpened","isEditorPanelEnabled","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,iBAAT,QAAkC,oBAAlC;AACA,SAASC,YAAT,EAAuBC,UAAvB,QAAyC,iBAAzC;AACA,OAAOC,OAAP,MAAoB,oBAApB;AAEA;AACA;AACA;;AACA,SAASC,sCAAT,QAAuD,iCAAvD;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AAEA,OAAO,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBX,cAAc,CAAE,4BAAF,CAArC;;AAEP,MAAMY,yBAAyB,GAAG,QAS3B;AAAA,MAT6B;AACnCC,IAAAA,SADmC;AAEnCC,IAAAA,SAFmC;AAGnCC,IAAAA,MAHmC;AAInCC,IAAAA,QAJmC;AAKnCC,IAAAA,SALmC;AAMnCC,IAAAA,KANmC;AAOnCC,IAAAA,IAPmC;AAQnCC,IAAAA;AARmC,GAS7B;AACN,SACC,8BACC,cAAC,sCAAD;AACC,IAAA,KAAK,EAAGF,KADT;AAEC,IAAA,SAAS,EAAGJ;AAFb,IADD,EAKC,cAAC,IAAD,QACGD,SAAS,IACV,cAAC,SAAD;AACC,IAAA,SAAS,EAAGI,SADb;AAEC,IAAA,KAAK,EAAGC,KAFT;AAGC,IAAA,IAAI,EAAGC,IAHR;AAIC,IAAA,MAAM,EAAGJ,MAJV;AAKC,IAAA,QAAQ,EAAGC;AALZ,KAOGI,QAPH,CAFF,CALD,CADD;AAqBA,CA/BD;AAiCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMC,0BAA0B,GAAGnB,OAAO,CACzCC,iBAAiB,CAAE,CAAEmB,OAAF,EAAWC,QAAX,KAAyB;AAC3C,MAAKC,SAAS,KAAKD,QAAQ,CAACE,IAA5B,EAAmC;AAClC,6FAAAnB,OAAO,CAAE,sDAAF,CAAP;AACA;;AACD,SAAO;AACNQ,IAAAA,SAAS,EAAG,GAAGQ,OAAO,CAACG,IAAM,IAAIF,QAAQ,CAACE,IAAM;AAD1C,GAAP;AAGA,CAPgB,CADwB,EASzCpB,UAAU,CAAE,CAAEqB,MAAF,YAA6B;AAAA,MAAnB;AAAEZ,IAAAA;AAAF,GAAmB;AACxC,SAAO;AACNC,IAAAA,MAAM,EAAEW,MAAM,CAAEjB,aAAF,CAAN,CAAwBkB,mBAAxB,CAA6Cb,SAA7C,CADF;AAEND,IAAAA,SAAS,EACRa,MAAM,CAAEjB,aAAF,CAAN,CAAwBmB,oBAAxB,CAA8Cd,SAA9C;AAHK,GAAP;AAKA,CANS,CAT+B,EAgBzCV,YAAY,CAAE,CAAEyB,QAAF;AAAA,MAAY;AAAEf,IAAAA;AAAF,GAAZ;AAAA,SAAiC;AAC9CE,IAAAA,QAAQ,GAAG;AACV,aAAOa,QAAQ,CAAEpB,aAAF,CAAR,CAA0BqB,uBAA1B,CACNhB,SADM,CAAP;AAGA;;AAL6C,GAAjC;AAAA,CAAF,CAhB6B,CAAP,CAuBhCF,yBAvBgC,CAAnC;AAyBAS,0BAA0B,CAACV,IAA3B,GAAkCA,IAAlC;AAEA,eAAeU,0BAAf","sourcesContent":["/**\n * Defines as extensibility slot for the Settings sidebar\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\nimport { withPluginContext } from '@wordpress/plugins';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { EnablePluginDocumentSettingPanelOption } from '../../preferences-modal/options';\nimport { store as editPostStore } from '../../../store';\n\nexport const { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\nconst PluginDocumentSettingFill = ( {\n\tisEnabled,\n\tpanelName,\n\topened,\n\tonToggle,\n\tclassName,\n\ttitle,\n\ticon,\n\tchildren,\n} ) => {\n\treturn (\n\t\t<>\n\t\t\t<EnablePluginDocumentSettingPanelOption\n\t\t\t\tlabel={ title }\n\t\t\t\tpanelName={ panelName }\n\t\t\t/>\n\t\t\t<Fill>\n\t\t\t\t{ isEnabled && (\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\topened={ opened }\n\t\t\t\t\t\tonToggle={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</Fill>\n\t\t</>\n\t);\n};\n\n/**\n * Renders items below the Status & Availability panel in the Document Sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.name] The machine-friendly name for the panel.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {string} [props.title] The title of the panel\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = wp.element.createElement;\n * var __ = wp.i18n.__;\n * var registerPlugin = wp.plugins.registerPlugin;\n * var PluginDocumentSettingPanel = wp.editPost.PluginDocumentSettingPanel;\n *\n * function MyDocumentSettingPlugin() {\n * \treturn el(\n * \t\tPluginDocumentSettingPanel,\n * \t\t{\n * \t\t\tclassName: 'my-document-setting-plugin',\n * \t\t\ttitle: 'My Panel',\n * \t\t},\n * \t\t__( 'My Document Setting Panel' )\n * \t);\n * }\n *\n * registerPlugin( 'my-document-setting-plugin', {\n * \t\trender: MyDocumentSettingPlugin\n * } );\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { registerPlugin } from '@wordpress/plugins';\n * import { PluginDocumentSettingPanel } from '@wordpress/edit-post';\n *\n * const MyDocumentSettingTest = () => (\n * \t\t<PluginDocumentSettingPanel className=\"my-document-setting-plugin\" title=\"My Panel\">\n *\t\t\t<p>My Document Setting Panel</p>\n *\t\t</PluginDocumentSettingPanel>\n *\t);\n *\n * registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\nconst PluginDocumentSettingPanel = compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\tif ( undefined === ownProps.name ) {\n\t\t\twarning( 'PluginDocumentSettingPanel requires a name property.' );\n\t\t}\n\t\treturn {\n\t\t\tpanelName: `${ context.name }/${ ownProps.name }`,\n\t\t};\n\t} ),\n\twithSelect( ( select, { panelName } ) => {\n\t\treturn {\n\t\t\topened: select( editPostStore ).isEditorPanelOpened( panelName ),\n\t\t\tisEnabled:\n\t\t\t\tselect( editPostStore ).isEditorPanelEnabled( panelName ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { panelName } ) => ( {\n\t\tonToggle() {\n\t\t\treturn dispatch( editPostStore ).toggleEditorPanelOpened(\n\t\t\t\tpanelName\n\t\t\t);\n\t\t},\n\t} ) )\n)( PluginDocumentSettingFill );\n\nPluginDocumentSettingPanel.Slot = Slot;\n\nexport default PluginDocumentSettingPanel;\n"]}
@@ -1,7 +1,7 @@
1
1
  import { createElement } from "@wordpress/element";
2
2
 
3
3
  /**
4
- * Defines as extensibility slot for the Status & visibility panel.
4
+ * Defines as extensibility slot for the Summary panel.
5
5
  */
6
6
 
7
7
  /**
@@ -13,7 +13,7 @@ export const {
13
13
  Slot
14
14
  } = createSlotFill('PluginPostStatusInfo');
15
15
  /**
16
- * Renders a row in the Status & visibility panel of the Document sidebar.
16
+ * Renders a row in the Summary panel of the Document sidebar.
17
17
  * It should be noted that this is named and implemented around the function it serves
18
18
  * and not its location, which may change in future iterations.
19
19
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/plugin-post-status-info/index.js"],"names":["createSlotFill","PanelRow","Fill","Slot","PluginPostStatusInfo","children","className"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,QAAzB,QAAyC,uBAAzC;AAEA,OAAO,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBH,cAAc,CAAE,sBAAF,CAArC;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMI,oBAAoB,GAAG;AAAA,MAAE;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GAAF;AAAA,SAC5B,cAAC,IAAD,QACC,cAAC,QAAD;AAAU,IAAA,SAAS,EAAGA;AAAtB,KAAoCD,QAApC,CADD,CAD4B;AAAA,CAA7B;;AAMAD,oBAAoB,CAACD,IAArB,GAA4BA,IAA5B;AAEA,eAAeC,oBAAf","sourcesContent":["/**\n * Defines as extensibility slot for the Status & visibility panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nexport const { Fill, Slot } = createSlotFill( 'PluginPostStatusInfo' );\n\n/**\n * Renders a row in the Status & visibility panel of the Document sidebar.\n * It should be noted that this is named and implemented around the function it serves\n * and not its location, which may change in future iterations.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {WPElement} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostStatusInfo = wp.editPost.PluginPostStatusInfo;\n *\n * function MyPluginPostStatusInfo() {\n * \treturn wp.element.createElement(\n * \t\tPluginPostStatusInfo,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-status-info',\n * \t\t},\n * \t\t__( 'My post status info' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostStatusInfo } from '@wordpress/edit-post';\n *\n * const MyPluginPostStatusInfo = () => (\n * \t<PluginPostStatusInfo\n * \t\tclassName=\"my-plugin-post-status-info\"\n * \t>\n * \t\t{ __( 'My post status info' ) }\n * \t</PluginPostStatusInfo>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\nconst PluginPostStatusInfo = ( { children, className } ) => (\n\t<Fill>\n\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t</Fill>\n);\n\nPluginPostStatusInfo.Slot = Slot;\n\nexport default PluginPostStatusInfo;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/plugin-post-status-info/index.js"],"names":["createSlotFill","PanelRow","Fill","Slot","PluginPostStatusInfo","children","className"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,QAAzB,QAAyC,uBAAzC;AAEA,OAAO,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBH,cAAc,CAAE,sBAAF,CAArC;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMI,oBAAoB,GAAG;AAAA,MAAE;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GAAF;AAAA,SAC5B,cAAC,IAAD,QACC,cAAC,QAAD;AAAU,IAAA,SAAS,EAAGA;AAAtB,KAAoCD,QAApC,CADD,CAD4B;AAAA,CAA7B;;AAMAD,oBAAoB,CAACD,IAArB,GAA4BA,IAA5B;AAEA,eAAeC,oBAAf","sourcesContent":["/**\n * Defines as extensibility slot for the Summary panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nexport const { Fill, Slot } = createSlotFill( 'PluginPostStatusInfo' );\n\n/**\n * Renders a row in the Summary panel of the Document sidebar.\n * It should be noted that this is named and implemented around the function it serves\n * and not its location, which may change in future iterations.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {WPElement} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostStatusInfo = wp.editPost.PluginPostStatusInfo;\n *\n * function MyPluginPostStatusInfo() {\n * \treturn wp.element.createElement(\n * \t\tPluginPostStatusInfo,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-status-info',\n * \t\t},\n * \t\t__( 'My post status info' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostStatusInfo } from '@wordpress/edit-post';\n *\n * const MyPluginPostStatusInfo = () => (\n * \t<PluginPostStatusInfo\n * \t\tclassName=\"my-plugin-post-status-info\"\n * \t>\n * \t\t{ __( 'My post status info' ) }\n * \t</PluginPostStatusInfo>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\nconst PluginPostStatusInfo = ( { children, className } ) => (\n\t<Fill>\n\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t</Fill>\n);\n\nPluginPostStatusInfo.Slot = Slot;\n\nexport default PluginPostStatusInfo;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/plugin-sidebar/index.js"],"names":["ComplementaryArea","useSelect","__","store","keyboardShortcutsStore","editorStore","editPostStore","PluginSidebarEditPost","className","props","postTitle","shortcut","showIconLabels","select","getEditedPostAttribute","getShortcutRepresentation","isFeatureActive"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,iBAAT,QAAkC,sBAAlC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,+BAAhD;AACA,SAASD,KAAK,IAAIE,WAAlB,QAAqC,mBAArC;AAEA;AACA;AACA;;AACA,SAASF,KAAK,IAAIG,aAAlB,QAAuC,gBAAvC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,qBAAT,OAA0D;AAAA,MAA1B;AAAEC,IAAAA,SAAF;AAAa,OAAGC;AAAhB,GAA0B;AACxE,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuBC,IAAAA;AAAvB,MAA0CX,SAAS,CAAIY,MAAF,IAAc;AACxE,WAAO;AACNH,MAAAA,SAAS,EAAEG,MAAM,CAAER,WAAF,CAAN,CAAsBS,sBAAtB,CAA8C,OAA9C,CADL;AAENH,MAAAA,QAAQ,EAAEE,MAAM,CACfT,sBADe,CAAN,CAERW,yBAFQ,CAEmB,+BAFnB,CAFJ;AAKNH,MAAAA,cAAc,EAAEC,MAAM,CAAEP,aAAF,CAAN,CAAwBU,eAAxB,CACf,gBADe;AALV,KAAP;AASA,GAVwD,EAUtD,EAVsD,CAAzD;AAWA,SACC,cAAC,iBAAD;AACC,IAAA,cAAc,EAAGR,SADlB;AAEC,IAAA,SAAS,EAAC,mBAFX;AAGC,IAAA,gBAAgB,EAAGE,SAAS,IAAIR,EAAE,CAAE,YAAF,CAHnC;AAIC,IAAA,KAAK,EAAC,gBAJP;AAKC,IAAA,cAAc,EAAGS,QALlB;AAMC,IAAA,cAAc,EAAGC;AANlB,KAOMH,KAPN,EADD;AAWA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ComplementaryArea } from '@wordpress/interface';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.\n * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.\n * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:\n *\n * ```js\n * wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );\n * ```\n *\n * @see PluginSidebarMoreMenuItem\n *\n * @param {Object} props Element props.\n * @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.\n * @param {string} [props.className] An optional class name added to the sidebar body.\n * @param {string} props.title Title displayed at the top of the sidebar.\n * @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var el = wp.element.createElement;\n * var PanelBody = wp.components.PanelBody;\n * var PluginSidebar = wp.editPost.PluginSidebar;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function MyPluginSidebar() {\n * \treturn el(\n * \t\t\tPluginSidebar,\n * \t\t\t{\n * \t\t\t\tname: 'my-sidebar',\n * \t\t\t\ttitle: 'My sidebar title',\n * \t\t\t\ticon: moreIcon,\n * \t\t\t},\n * \t\t\tel(\n * \t\t\t\tPanelBody,\n * \t\t\t\t{},\n * \t\t\t\t__( 'My sidebar content' )\n * \t\t\t)\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PanelBody } from '@wordpress/components';\n * import { PluginSidebar } from '@wordpress/edit-post';\n * import { more } from '@wordpress/icons';\n *\n * const MyPluginSidebar = () => (\n * \t<PluginSidebar\n * \t\tname=\"my-sidebar\"\n * \t\ttitle=\"My sidebar title\"\n * \t\ticon={ more }\n * \t>\n * \t\t<PanelBody>\n * \t\t\t{ __( 'My sidebar content' ) }\n * \t\t</PanelBody>\n * \t</PluginSidebar>\n * );\n * ```\n */\nexport default function PluginSidebarEditPost( { className, ...props } ) {\n\tconst { postTitle, shortcut, showIconLabels } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostTitle: select( editorStore ).getEditedPostAttribute( 'title' ),\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/edit-post/toggle-sidebar' ),\n\t\t\tshowIconLabels: select( editPostStore ).isFeatureActive(\n\t\t\t\t'showIconLabels'\n\t\t\t),\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"edit-post-sidebar\"\n\t\t\tsmallScreenTitle={ postTitle || __( '(no title)' ) }\n\t\t\tscope=\"core/edit-post\"\n\t\t\ttoggleShortcut={ shortcut }\n\t\t\tshowIconLabels={ showIconLabels }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/plugin-sidebar/index.js"],"names":["ComplementaryArea","useSelect","__","store","keyboardShortcutsStore","editorStore","editPostStore","PluginSidebarEditPost","className","props","postTitle","shortcut","showIconLabels","select","getEditedPostAttribute","getShortcutRepresentation","isFeatureActive"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,iBAAT,QAAkC,sBAAlC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,+BAAhD;AACA,SAASD,KAAK,IAAIE,WAAlB,QAAqC,mBAArC;AAEA;AACA;AACA;;AACA,SAASF,KAAK,IAAIG,aAAlB,QAAuC,gBAAvC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,qBAAT,OAA0D;AAAA,MAA1B;AAAEC,IAAAA,SAAF;AAAa,OAAGC;AAAhB,GAA0B;AACxE,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuBC,IAAAA;AAAvB,MAA0CX,SAAS,CAAIY,MAAF,IAAc;AACxE,WAAO;AACNH,MAAAA,SAAS,EAAEG,MAAM,CAAER,WAAF,CAAN,CAAsBS,sBAAtB,CAA8C,OAA9C,CADL;AAENH,MAAAA,QAAQ,EAAEE,MAAM,CACfT,sBADe,CAAN,CAERW,yBAFQ,CAEmB,+BAFnB,CAFJ;AAKNH,MAAAA,cAAc,EACbC,MAAM,CAAEP,aAAF,CAAN,CAAwBU,eAAxB,CAAyC,gBAAzC;AANK,KAAP;AAQA,GATwD,EAStD,EATsD,CAAzD;AAUA,SACC,cAAC,iBAAD;AACC,IAAA,cAAc,EAAGR,SADlB;AAEC,IAAA,SAAS,EAAC,mBAFX;AAGC,IAAA,gBAAgB,EAAGE,SAAS,IAAIR,EAAE,CAAE,YAAF,CAHnC;AAIC,IAAA,KAAK,EAAC,gBAJP;AAKC,IAAA,cAAc,EAAGS,QALlB;AAMC,IAAA,cAAc,EAAGC;AANlB,KAOMH,KAPN,EADD;AAWA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ComplementaryArea } from '@wordpress/interface';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.\n * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.\n * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:\n *\n * ```js\n * wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );\n * ```\n *\n * @see PluginSidebarMoreMenuItem\n *\n * @param {Object} props Element props.\n * @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.\n * @param {string} [props.className] An optional class name added to the sidebar body.\n * @param {string} props.title Title displayed at the top of the sidebar.\n * @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var el = wp.element.createElement;\n * var PanelBody = wp.components.PanelBody;\n * var PluginSidebar = wp.editPost.PluginSidebar;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function MyPluginSidebar() {\n * \treturn el(\n * \t\t\tPluginSidebar,\n * \t\t\t{\n * \t\t\t\tname: 'my-sidebar',\n * \t\t\t\ttitle: 'My sidebar title',\n * \t\t\t\ticon: moreIcon,\n * \t\t\t},\n * \t\t\tel(\n * \t\t\t\tPanelBody,\n * \t\t\t\t{},\n * \t\t\t\t__( 'My sidebar content' )\n * \t\t\t)\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PanelBody } from '@wordpress/components';\n * import { PluginSidebar } from '@wordpress/edit-post';\n * import { more } from '@wordpress/icons';\n *\n * const MyPluginSidebar = () => (\n * \t<PluginSidebar\n * \t\tname=\"my-sidebar\"\n * \t\ttitle=\"My sidebar title\"\n * \t\ticon={ more }\n * \t>\n * \t\t<PanelBody>\n * \t\t\t{ __( 'My sidebar content' ) }\n * \t\t</PanelBody>\n * \t</PluginSidebar>\n * );\n * ```\n */\nexport default function PluginSidebarEditPost( { className, ...props } ) {\n\tconst { postTitle, shortcut, showIconLabels } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostTitle: select( editorStore ).getEditedPostAttribute( 'title' ),\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/edit-post/toggle-sidebar' ),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"edit-post-sidebar\"\n\t\t\tsmallScreenTitle={ postTitle || __( '(no title)' ) }\n\t\t\tscope=\"core/edit-post\"\n\t\t\ttoggleShortcut={ shortcut }\n\t\t\tshowIconLabels={ showIconLabels }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-excerpt/index.js"],"names":["__","PanelBody","PostExcerpt","PostExcerptForm","PostExcerptCheck","compose","withSelect","withDispatch","store","editPostStore","PANEL_NAME","isEnabled","isOpened","onTogglePanel","select","isEditorPanelEnabled","isEditorPanelOpened","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SACCC,WAAW,IAAIC,eADhB,EAECC,gBAFD,QAGO,mBAHP;AAIA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AAEA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG,cAAnB;;AAEA,SAASR,WAAT,OAA+D;AAAA,MAAzC;AAAES,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuBC,IAAAA;AAAvB,GAAyC;;AAC9D,MAAK,CAAEF,SAAP,EAAmB;AAClB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,gBAAD,QACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGX,EAAE,CAAE,SAAF,CADX;AAEC,IAAA,MAAM,EAAGY,QAFV;AAGC,IAAA,QAAQ,EAAGC;AAHZ,KAKC,cAAC,eAAD,OALD,CADD,CADD;AAWA;;AAED,eAAeR,OAAO,CAAE,CACvBC,UAAU,CAAIQ,MAAF,IAAc;AACzB,SAAO;AACNH,IAAAA,SAAS,EAAEG,MAAM,CAAEL,aAAF,CAAN,CAAwBM,oBAAxB,CACVL,UADU,CADL;AAINE,IAAAA,QAAQ,EAAEE,MAAM,CAAEL,aAAF,CAAN,CAAwBO,mBAAxB,CAA6CN,UAA7C;AAJJ,GAAP;AAMA,CAPS,CADa,EASvBH,YAAY,CAAIU,QAAF,KAAkB;AAC/BJ,EAAAA,aAAa,GAAG;AACf,WAAOI,QAAQ,CAAER,aAAF,CAAR,CAA0BS,uBAA1B,CACNR,UADM,CAAP;AAGA;;AAL8B,CAAlB,CAAF,CATW,CAAF,CAAP,CAgBVR,WAhBU,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody } from '@wordpress/components';\nimport {\n\tPostExcerpt as PostExcerptForm,\n\tPostExcerptCheck,\n} from '@wordpress/editor';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-excerpt';\n\nfunction PostExcerpt( { isEnabled, isOpened, onTogglePanel } ) {\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostExcerptCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ __( 'Excerpt' ) }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ onTogglePanel }\n\t\t\t>\n\t\t\t\t<PostExcerptForm />\n\t\t\t</PanelBody>\n\t\t</PostExcerptCheck>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tisEnabled: select( editPostStore ).isEditorPanelEnabled(\n\t\t\t\tPANEL_NAME\n\t\t\t),\n\t\t\tisOpened: select( editPostStore ).isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonTogglePanel() {\n\t\t\treturn dispatch( editPostStore ).toggleEditorPanelOpened(\n\t\t\t\tPANEL_NAME\n\t\t\t);\n\t\t},\n\t} ) ),\n] )( PostExcerpt );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-excerpt/index.js"],"names":["__","PanelBody","PostExcerpt","PostExcerptForm","PostExcerptCheck","compose","withSelect","withDispatch","store","editPostStore","PANEL_NAME","isEnabled","isOpened","onTogglePanel","select","isEditorPanelEnabled","isEditorPanelOpened","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SACCC,WAAW,IAAIC,eADhB,EAECC,gBAFD,QAGO,mBAHP;AAIA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AAEA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG,cAAnB;;AAEA,SAASR,WAAT,OAA+D;AAAA,MAAzC;AAAES,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuBC,IAAAA;AAAvB,GAAyC;;AAC9D,MAAK,CAAEF,SAAP,EAAmB;AAClB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,gBAAD,QACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGX,EAAE,CAAE,SAAF,CADX;AAEC,IAAA,MAAM,EAAGY,QAFV;AAGC,IAAA,QAAQ,EAAGC;AAHZ,KAKC,cAAC,eAAD,OALD,CADD,CADD;AAWA;;AAED,eAAeR,OAAO,CAAE,CACvBC,UAAU,CAAIQ,MAAF,IAAc;AACzB,SAAO;AACNH,IAAAA,SAAS,EACRG,MAAM,CAAEL,aAAF,CAAN,CAAwBM,oBAAxB,CAA8CL,UAA9C,CAFK;AAGNE,IAAAA,QAAQ,EAAEE,MAAM,CAAEL,aAAF,CAAN,CAAwBO,mBAAxB,CAA6CN,UAA7C;AAHJ,GAAP;AAKA,CANS,CADa,EAQvBH,YAAY,CAAIU,QAAF,KAAkB;AAC/BJ,EAAAA,aAAa,GAAG;AACf,WAAOI,QAAQ,CAAER,aAAF,CAAR,CAA0BS,uBAA1B,CACNR,UADM,CAAP;AAGA;;AAL8B,CAAlB,CAAF,CARW,CAAF,CAAP,CAeVR,WAfU,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody } from '@wordpress/components';\nimport {\n\tPostExcerpt as PostExcerptForm,\n\tPostExcerptCheck,\n} from '@wordpress/editor';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-excerpt';\n\nfunction PostExcerpt( { isEnabled, isOpened, onTogglePanel } ) {\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostExcerptCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ __( 'Excerpt' ) }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ onTogglePanel }\n\t\t\t>\n\t\t\t\t<PostExcerptForm />\n\t\t\t</PanelBody>\n\t\t</PostExcerptCheck>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tisEnabled:\n\t\t\t\tselect( editPostStore ).isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: select( editPostStore ).isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonTogglePanel() {\n\t\t\treturn dispatch( editPostStore ).toggleEditorPanelOpened(\n\t\t\t\tPANEL_NAME\n\t\t\t);\n\t\t},\n\t} ) ),\n] )( PostExcerpt );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-link/index.js"],"names":["get","__","PanelBody","TextControl","ExternalLink","withSelect","withDispatch","compose","ifCondition","store","editorStore","safeDecodeURIComponent","cleanForSlug","coreStore","useState","editPostStore","PANEL_NAME","PostLink","isOpened","onTogglePanel","isEditable","postLink","permalinkPrefix","permalinkSuffix","editPermalink","postSlug","postTypeLabel","forceEmptyField","setForceEmptyField","prefixElement","postNameElement","suffixElement","newValue","event","target","value","select","isPermalinkEditable","getCurrentPost","isCurrentPostPublished","getPermalinkParts","getEditedPostAttribute","getEditedPostSlug","isEditorPanelEnabled","isEditorPanelOpened","getPostType","link","postTypeName","postType","permalinkParts","isPublished","isEnabled","isViewable","hasPermalinkParts","prefix","suffix","dispatch","toggleEditorPanelOpened","editPost","newSlug","slug"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,GAAT,QAAoB,QAApB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,EAAoBC,WAApB,EAAiCC,YAAjC,QAAqD,uBAArD;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,oBAArC;AACA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,mBAArC;AACA,SAASC,sBAAT,EAAiCC,YAAjC,QAAqD,gBAArD;AACA,SAASH,KAAK,IAAII,SAAlB,QAAmC,sBAAnC;AACA,SAASC,QAAT,QAAyB,oBAAzB;AAEA;AACA;AACA;;AACA,SAASL,KAAK,IAAIM,aAAlB,QAAuC,gBAAvC;AAEA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG,WAAnB;;AAEA,SAASC,QAAT,OAUI;AAAA,MAVe;AAClBC,IAAAA,QADkB;AAElBC,IAAAA,aAFkB;AAGlBC,IAAAA,UAHkB;AAIlBC,IAAAA,QAJkB;AAKlBC,IAAAA,eALkB;AAMlBC,IAAAA,eANkB;AAOlBC,IAAAA,aAPkB;AAQlBC,IAAAA,QARkB;AASlBC,IAAAA;AATkB,GAUf;AACH,QAAM,CAAEC,eAAF,EAAmBC,kBAAnB,IAA0Cd,QAAQ,CAAE,KAAF,CAAxD;AAEA,MAAIe,aAAJ,EAAmBC,eAAnB,EAAoCC,aAApC;;AACA,MA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/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody, TextControl, ExternalLink } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { store as editorStore } from '@wordpress/editor';\nimport { safeDecodeURIComponent, cleanForSlug } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-link';\n\nfunction PostLink( {\n\tisOpened,\n\tonTogglePanel,\n\tisEditable,\n\tpostLink,\n\tpermalinkPrefix,\n\tpermalinkSuffix,\n\teditPermalink,\n\tpostSlug,\n\tpostTypeLabel,\n} ) {\n\tconst [ forceEmptyField, setForceEmptyField ] = useState( false );\n\n\tlet prefixElement, postNameElement, suffixElement;\n\tif ( isEditable ) {\n\t\tprefixElement = permalinkPrefix && (\n\t\t\t<span className=\"edit-post-post-link__link-prefix\">\n\t\t\t\t{ permalinkPrefix }\n\t\t\t</span>\n\t\t);\n\t\tpostNameElement = postSlug && (\n\t\t\t<span className=\"edit-post-post-link__link-post-name\">\n\t\t\t\t{ postSlug }\n\t\t\t</span>\n\t\t);\n\t\tsuffixElement = permalinkSuffix && (\n\t\t\t<span className=\"edit-post-post-link__link-suffix\">\n\t\t\t\t{ permalinkSuffix }\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ __( 'Permalink' ) }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ onTogglePanel }\n\t\t>\n\t\t\t{ isEditable && (\n\t\t\t\t<div className=\"editor-post-link\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __( 'URL Slug' ) }\n\t\t\t\t\t\tvalue={ forceEmptyField ? '' : postSlug }\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\teditPermalink( newValue );\n\t\t\t\t\t\t\t// When we delete the field the permalink gets\n\t\t\t\t\t\t\t// reverted to the original value.\n\t\t\t\t\t\t\t// The forceEmptyField logic allows the user to have\n\t\t\t\t\t\t\t// the field temporarily empty while typing.\n\t\t\t\t\t\t\tif ( ! newValue ) {\n\t\t\t\t\t\t\t\tif ( ! forceEmptyField ) {\n\t\t\t\t\t\t\t\t\tsetForceEmptyField( true );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonBlur={ ( event ) => {\n\t\t\t\t\t\t\teditPermalink( cleanForSlug( event.target.value ) );\n\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ __( 'The last part of the URL.' ) }{ ' ' }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t'https://wordpress.org/support/article/settings-sidebar/#permalink'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Read about permalinks' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<h3 className=\"edit-post-post-link__preview-label\">\n\t\t\t\t{ postTypeLabel || __( 'View post' ) }\n\t\t\t</h3>\n\t\t\t<div className=\"edit-post-post-link__preview-link-container\">\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"edit-post-post-link__link\"\n\t\t\t\t\thref={ postLink }\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t>\n\t\t\t\t\t{ isEditable ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ prefixElement }\n\t\t\t\t\t\t\t{ postNameElement }\n\t\t\t\t\t\t\t{ suffixElement }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tpostLink\n\t\t\t\t\t) }\n\t\t\t\t</ExternalLink>\n\t\t\t</div>\n\t\t</PanelBody>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisPermalinkEditable,\n\t\t\tgetCurrentPost,\n\t\t\tisCurrentPostPublished,\n\t\t\tgetPermalinkParts,\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetEditedPostSlug,\n\t\t} = select( editorStore );\n\t\tconst { isEditorPanelEnabled, isEditorPanelOpened } = select(\n\t\t\teditPostStore\n\t\t);\n\t\tconst { getPostType } = select( coreStore );\n\n\t\tconst { link } = getCurrentPost();\n\n\t\tconst postTypeName = getEditedPostAttribute( 'type' );\n\t\tconst postType = getPostType( postTypeName );\n\t\tconst permalinkParts = getPermalinkParts();\n\n\t\treturn {\n\t\t\tpostLink: link,\n\t\t\tisEditable: isPermalinkEditable(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisViewable: get( postType, [ 'viewable' ], false ),\n\t\t\tpostSlug: safeDecodeURIComponent( getEditedPostSlug() ),\n\t\t\tpostTypeLabel: get( postType, [ 'labels', 'view_item' ] ),\n\t\t\thasPermalinkParts: !! permalinkParts,\n\t\t\tpermalinkPrefix: permalinkParts?.prefix,\n\t\t\tpermalinkSuffix: permalinkParts?.suffix,\n\t\t};\n\t} ),\n\tifCondition( ( { isEnabled, postLink, isViewable, hasPermalinkParts } ) => {\n\t\treturn isEnabled && postLink && isViewable && hasPermalinkParts;\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { toggleEditorPanelOpened } = dispatch( editPostStore );\n\t\tconst { editPost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tonTogglePanel: () => toggleEditorPanelOpened( PANEL_NAME ),\n\t\t\teditPermalink: ( newSlug ) => {\n\t\t\t\teditPost( { slug: newSlug } );\n\t\t\t},\n\t\t};\n\t} ),\n] )( PostLink );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-link/index.js"],"names":["get","__","PanelBody","TextControl","ExternalLink","withSelect","withDispatch","compose","ifCondition","store","editorStore","safeDecodeURIComponent","cleanForSlug","coreStore","useState","editPostStore","PANEL_NAME","PostLink","isOpened","onTogglePanel","isEditable","postLink","permalinkPrefix","permalinkSuffix","editPermalink","postSlug","postTypeLabel","forceEmptyField","setForceEmptyField","prefixElement","postNameElement","suffixElement","newValue","event","target","value","select","isPermalinkEditable","getCurrentPost","isCurrentPostPublished","getPermalinkParts","getEditedPostAttribute","getEditedPostSlug","isEditorPanelEnabled","isEditorPanelOpened","getPostType","link","postTypeName","postType","permalinkParts","isPublished","isEnabled","isViewable","hasPermalinkParts","prefix","suffix","dispatch","toggleEditorPanelOpened","editPost","newSlug","slug"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,GAAT,QAAoB,QAApB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,EAAoBC,WAApB,EAAiCC,YAAjC,QAAqD,uBAArD;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,oBAArC;AACA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,mBAArC;AACA,SAASC,sBAAT,EAAiCC,YAAjC,QAAqD,gBAArD;AACA,SAASH,KAAK,IAAII,SAAlB,QAAmC,sBAAnC;AACA,SAASC,QAAT,QAAyB,oBAAzB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,IAAuCC,iBAA9C;AACA,CAFU,CAlCY,EAqCvB/C,YAAY,CAAIkD,QAAF,IAAgB;AAC7B,QAAM;AAAEC,IAAAA;AAAF,MAA8BD,QAAQ,CAAEzC,aAAF,CAA5C;AACA,QAAM;AAAE2C,IAAAA;AAAF,MAAeF,QAAQ,CAAE9C,WAAF,CAA7B;AACA,SAAO;AACNS,IAAAA,aAAa,EAAE,MAAMsC,uBAAuB,CAAEzC,UAAF,CADtC;AAENQ,IAAAA,aAAa,EAAImC,OAAF,IAAe;AAC7BD,MAAAA,QAAQ,CAAE;AAAEE,QAAAA,IAAI,EAAED;AAAR,OAAF,CAAR;AACA;AAJK,GAAP;AAMA,CATW,CArCW,CAAF,CAAP,CA+CV1C,QA/CU,CAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody, TextControl, ExternalLink } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { store as editorStore } from '@wordpress/editor';\nimport { safeDecodeURIComponent, cleanForSlug } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-link';\n\nfunction PostLink( {\n\tisOpened,\n\tonTogglePanel,\n\tisEditable,\n\tpostLink,\n\tpermalinkPrefix,\n\tpermalinkSuffix,\n\teditPermalink,\n\tpostSlug,\n\tpostTypeLabel,\n} ) {\n\tconst [ forceEmptyField, setForceEmptyField ] = useState( false );\n\n\tlet prefixElement, postNameElement, suffixElement;\n\tif ( isEditable ) {\n\t\tprefixElement = permalinkPrefix && (\n\t\t\t<span className=\"edit-post-post-link__link-prefix\">\n\t\t\t\t{ permalinkPrefix }\n\t\t\t</span>\n\t\t);\n\t\tpostNameElement = postSlug && (\n\t\t\t<span className=\"edit-post-post-link__link-post-name\">\n\t\t\t\t{ postSlug }\n\t\t\t</span>\n\t\t);\n\t\tsuffixElement = permalinkSuffix && (\n\t\t\t<span className=\"edit-post-post-link__link-suffix\">\n\t\t\t\t{ permalinkSuffix }\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ __( 'Permalink' ) }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ onTogglePanel }\n\t\t>\n\t\t\t{ isEditable && (\n\t\t\t\t<div className=\"editor-post-link\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __( 'URL Slug' ) }\n\t\t\t\t\t\tvalue={ forceEmptyField ? '' : postSlug }\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\teditPermalink( newValue );\n\t\t\t\t\t\t\t// When we delete the field the permalink gets\n\t\t\t\t\t\t\t// reverted to the original value.\n\t\t\t\t\t\t\t// The forceEmptyField logic allows the user to have\n\t\t\t\t\t\t\t// the field temporarily empty while typing.\n\t\t\t\t\t\t\tif ( ! newValue ) {\n\t\t\t\t\t\t\t\tif ( ! forceEmptyField ) {\n\t\t\t\t\t\t\t\t\tsetForceEmptyField( true );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonBlur={ ( event ) => {\n\t\t\t\t\t\t\teditPermalink( cleanForSlug( event.target.value ) );\n\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ __( 'The last part of the URL.' ) }{ ' ' }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t'https://wordpress.org/support/article/settings-sidebar/#permalink'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Read about permalinks' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<h3 className=\"edit-post-post-link__preview-label\">\n\t\t\t\t{ postTypeLabel || __( 'View post' ) }\n\t\t\t</h3>\n\t\t\t<div className=\"edit-post-post-link__preview-link-container\">\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"edit-post-post-link__link\"\n\t\t\t\t\thref={ postLink }\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t>\n\t\t\t\t\t{ isEditable ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ prefixElement }\n\t\t\t\t\t\t\t{ postNameElement }\n\t\t\t\t\t\t\t{ suffixElement }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tpostLink\n\t\t\t\t\t) }\n\t\t\t\t</ExternalLink>\n\t\t\t</div>\n\t\t</PanelBody>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisPermalinkEditable,\n\t\t\tgetCurrentPost,\n\t\t\tisCurrentPostPublished,\n\t\t\tgetPermalinkParts,\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetEditedPostSlug,\n\t\t} = select( editorStore );\n\t\tconst { isEditorPanelEnabled, isEditorPanelOpened } =\n\t\t\tselect( editPostStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\tconst { link } = getCurrentPost();\n\n\t\tconst postTypeName = getEditedPostAttribute( 'type' );\n\t\tconst postType = getPostType( postTypeName );\n\t\tconst permalinkParts = getPermalinkParts();\n\n\t\treturn {\n\t\t\tpostLink: link,\n\t\t\tisEditable: isPermalinkEditable(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisViewable: get( postType, [ 'viewable' ], false ),\n\t\t\tpostSlug: safeDecodeURIComponent( getEditedPostSlug() ),\n\t\t\tpostTypeLabel: get( postType, [ 'labels', 'view_item' ] ),\n\t\t\thasPermalinkParts: !! permalinkParts,\n\t\t\tpermalinkPrefix: permalinkParts?.prefix,\n\t\t\tpermalinkSuffix: permalinkParts?.suffix,\n\t\t};\n\t} ),\n\tifCondition( ( { isEnabled, postLink, isViewable, hasPermalinkParts } ) => {\n\t\treturn isEnabled && postLink && isViewable && hasPermalinkParts;\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { toggleEditorPanelOpened } = dispatch( editPostStore );\n\t\tconst { editPost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tonTogglePanel: () => toggleEditorPanelOpened( PANEL_NAME ),\n\t\t\teditPermalink: ( newSlug ) => {\n\t\t\t\teditPost( { slug: newSlug } );\n\t\t\t},\n\t\t};\n\t} ),\n] )( PostLink );\n"]}
@@ -6,9 +6,12 @@ import { createElement, Fragment } from "@wordpress/element";
6
6
  import { __ } from '@wordpress/i18n';
7
7
  import { PanelRow, Dropdown, Button } from '@wordpress/components';
8
8
  import { useRef } from '@wordpress/element';
9
- import { PostSchedule as PostScheduleForm, PostScheduleLabel, PostScheduleCheck } from '@wordpress/editor';
10
- export function PostSchedule() {
9
+ import { PostSchedule as PostScheduleForm, PostScheduleLabel, PostScheduleCheck, usePostScheduleLabel } from '@wordpress/editor';
10
+ export default function PostSchedule() {
11
11
  const anchorRef = useRef();
12
+ const fullLabel = usePostScheduleLabel({
13
+ full: true
14
+ });
12
15
  return createElement(PostScheduleCheck, null, createElement(PanelRow, {
13
16
  className: "edit-post-post-schedule",
14
17
  ref: anchorRef
@@ -27,11 +30,18 @@ export function PostSchedule() {
27
30
  className: "edit-post-post-schedule__toggle",
28
31
  onClick: onToggle,
29
32
  "aria-expanded": isOpen,
30
- variant: "tertiary"
33
+ variant: "tertiary",
34
+ label: fullLabel
31
35
  }, createElement(PostScheduleLabel, null)));
32
36
  },
33
- renderContent: () => createElement(PostScheduleForm, null)
37
+ renderContent: _ref2 => {
38
+ let {
39
+ onClose
40
+ } = _ref2;
41
+ return createElement(PostScheduleForm, {
42
+ onClose: onClose
43
+ });
44
+ }
34
45
  })));
35
46
  }
36
- export default PostSchedule;
37
47
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-schedule/index.js"],"names":["__","PanelRow","Dropdown","Button","useRef","PostSchedule","PostScheduleForm","PostScheduleLabel","PostScheduleCheck","anchorRef","onToggle","isOpen"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,QAAT,EAAmBC,QAAnB,EAA6BC,MAA7B,QAA2C,uBAA3C;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,SACCC,YAAY,IAAIC,gBADjB,EAECC,iBAFD,EAGCC,iBAHD,QAIO,mBAJP;AAMA,OAAO,SAASH,YAAT,GAAwB;AAC9B,QAAMI,SAAS,GAAGL,MAAM,EAAxB;AAEA,SACC,cAAC,iBAAD,QACC,cAAC,QAAD;AAAU,IAAA,SAAS,EAAC,yBAApB;AAA8C,IAAA,GAAG,EAAGK;AAApD,KACC,4BAAQT,EAAE,CAAE,SAAF,CAAV,CADD,EAEC,cAAC,QAAD;AACC,IAAA,YAAY,EAAG;AAAES,MAAAA;AAAF,KADhB;AAEC,IAAA,QAAQ,EAAC,aAFV;AAGC,IAAA,gBAAgB,EAAC,iCAHlB;AAIC,IAAA,YAAY,EAAG;AAAA,UAAE;AAAEC,QAAAA,QAAF;AAAYC,QAAAA;AAAZ,OAAF;AAAA,aACd,8BACC,cAAC,MAAD;AACC,QAAA,SAAS,EAAC,iCADX;AAEC,QAAA,OAAO,EAAGD,QAFX;AAGC,yBAAgBC,MAHjB;AAIC,QAAA,OAAO,EAAC;AAJT,SAMC,cAAC,iBAAD,OAND,CADD,CADc;AAAA,KAJhB;AAgBC,IAAA,aAAa,EAAG,MAAM,cAAC,gBAAD;AAhBvB,IAFD,CADD,CADD;AAyBA;AAED,eAAeN,YAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelRow, Dropdown, Button } from '@wordpress/components';\nimport { useRef } from '@wordpress/element';\nimport {\n\tPostSchedule as PostScheduleForm,\n\tPostScheduleLabel,\n\tPostScheduleCheck,\n} from '@wordpress/editor';\n\nexport function PostSchedule() {\n\tconst anchorRef = useRef();\n\n\treturn (\n\t\t<PostScheduleCheck>\n\t\t\t<PanelRow className=\"edit-post-post-schedule\" ref={ anchorRef }>\n\t\t\t\t<span>{ __( 'Publish' ) }</span>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ { anchorRef } }\n\t\t\t\t\tposition=\"bottom left\"\n\t\t\t\t\tcontentClassName=\"edit-post-post-schedule__dialog\"\n\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-post-post-schedule__toggle\"\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostScheduleLabel />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ () => <PostScheduleForm /> }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PostScheduleCheck>\n\t);\n}\n\nexport default PostSchedule;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-schedule/index.js"],"names":["__","PanelRow","Dropdown","Button","useRef","PostSchedule","PostScheduleForm","PostScheduleLabel","PostScheduleCheck","usePostScheduleLabel","anchorRef","fullLabel","full","onToggle","isOpen","onClose"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,QAAT,EAAmBC,QAAnB,EAA6BC,MAA7B,QAA2C,uBAA3C;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,SACCC,YAAY,IAAIC,gBADjB,EAECC,iBAFD,EAGCC,iBAHD,EAICC,oBAJD,QAKO,mBALP;AAOA,eAAe,SAASJ,YAAT,GAAwB;AACtC,QAAMK,SAAS,GAAGN,MAAM,EAAxB;AAEA,QAAMO,SAAS,GAAGF,oBAAoB,CAAE;AAAEG,IAAAA,IAAI,EAAE;AAAR,GAAF,CAAtC;AAEA,SACC,cAAC,iBAAD,QACC,cAAC,QAAD;AAAU,IAAA,SAAS,EAAC,yBAApB;AAA8C,IAAA,GAAG,EAAGF;AAApD,KACC,4BAAQV,EAAE,CAAE,SAAF,CAAV,CADD,EAEC,cAAC,QAAD;AACC,IAAA,YAAY,EAAG;AAAEU,MAAAA;AAAF,KADhB;AAEC,IAAA,QAAQ,EAAC,aAFV;AAGC,IAAA,gBAAgB,EAAC,iCAHlB;AAIC,IAAA,YAAY,EAAG;AAAA,UAAE;AAAEG,QAAAA,QAAF;AAAYC,QAAAA;AAAZ,OAAF;AAAA,aACd,8BACC,cAAC,MAAD;AACC,QAAA,SAAS,EAAC,iCADX;AAEC,QAAA,OAAO,EAAGD,QAFX;AAGC,yBAAgBC,MAHjB;AAIC,QAAA,OAAO,EAAC,UAJT;AAKC,QAAA,KAAK,EAAGH;AALT,SAOC,cAAC,iBAAD,OAPD,CADD,CADc;AAAA,KAJhB;AAiBC,IAAA,aAAa,EAAG;AAAA,UAAE;AAAEI,QAAAA;AAAF,OAAF;AAAA,aACf,cAAC,gBAAD;AAAkB,QAAA,OAAO,EAAGA;AAA5B,QADe;AAAA;AAjBjB,IAFD,CADD,CADD;AA4BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelRow, Dropdown, Button } from '@wordpress/components';\nimport { useRef } from '@wordpress/element';\nimport {\n\tPostSchedule as PostScheduleForm,\n\tPostScheduleLabel,\n\tPostScheduleCheck,\n\tusePostScheduleLabel,\n} from '@wordpress/editor';\n\nexport default function PostSchedule() {\n\tconst anchorRef = useRef();\n\n\tconst fullLabel = usePostScheduleLabel( { full: true } );\n\n\treturn (\n\t\t<PostScheduleCheck>\n\t\t\t<PanelRow className=\"edit-post-post-schedule\" ref={ anchorRef }>\n\t\t\t\t<span>{ __( 'Publish' ) }</span>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ { anchorRef } }\n\t\t\t\t\tposition=\"bottom left\"\n\t\t\t\t\tcontentClassName=\"edit-post-post-schedule__dialog\"\n\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-post-post-schedule__toggle\"\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\tlabel={ fullLabel }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostScheduleLabel />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<PostScheduleForm onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PostScheduleCheck>\n\t);\n}\n"]}
@@ -21,6 +21,7 @@ import PostFormat from '../post-format';
21
21
  import PostPendingStatus from '../post-pending-status';
22
22
  import PluginPostStatusInfo from '../plugin-post-status-info';
23
23
  import { store as editPostStore } from '../../../store';
24
+ import PostTemplate from '../post-template';
24
25
  /**
25
26
  * Module Constants
26
27
  */
@@ -34,10 +35,10 @@ function PostStatus(_ref) {
34
35
  } = _ref;
35
36
  return createElement(PanelBody, {
36
37
  className: "edit-post-post-status",
37
- title: __('Status & visibility'),
38
+ title: __('Summary'),
38
39
  opened: isOpened,
39
40
  onToggle: onTogglePanel
40
- }, createElement(PluginPostStatusInfo.Slot, null, fills => createElement(Fragment, null, createElement(PostVisibility, null), createElement(PostSchedule, null), createElement(PostFormat, null), createElement(PostSticky, null), createElement(PostPendingStatus, null), createElement(PostSlug, null), createElement(PostAuthor, null), fills, createElement(PostTrash, null))));
41
+ }, createElement(PluginPostStatusInfo.Slot, null, fills => createElement(Fragment, null, createElement(PostVisibility, null), createElement(PostSchedule, null), createElement(PostTemplate, null), createElement(PostFormat, null), createElement(PostSticky, null), createElement(PostPendingStatus, null), createElement(PostSlug, null), createElement(PostAuthor, null), fills, createElement(PostTrash, null))));
41
42
  }
42
43
 
43
44
  export default compose([withSelect(select => {