@wordpress/edit-post 7.11.0 → 7.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/block-manager/category.js +14 -22
  3. package/build/components/block-manager/category.js.map +1 -1
  4. package/build/components/block-manager/checklist.js +6 -13
  5. package/build/components/block-manager/checklist.js.map +1 -1
  6. package/build/components/block-manager/index.js +10 -14
  7. package/build/components/block-manager/index.js.map +1 -1
  8. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +21 -26
  9. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  10. package/build/components/device-preview/index.js +1 -1
  11. package/build/components/device-preview/index.js.map +1 -1
  12. package/build/components/editor-initialization/index.js +3 -4
  13. package/build/components/editor-initialization/index.js.map +1 -1
  14. package/build/components/header/document-title/index.js +103 -0
  15. package/build/components/header/document-title/index.js.map +1 -0
  16. package/build/components/header/fullscreen-mode-close/index.js +8 -9
  17. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  18. package/build/components/header/header-toolbar/index.native.js +12 -13
  19. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  20. package/build/components/header/index.js +7 -6
  21. package/build/components/header/index.js.map +1 -1
  22. package/build/components/header/main-dashboard-button/index.js +3 -4
  23. package/build/components/header/main-dashboard-button/index.js.map +1 -1
  24. package/build/components/header/more-menu/index.js +19 -23
  25. package/build/components/header/more-menu/index.js.map +1 -1
  26. package/build/components/header/post-publish-button-or-toggle.js +15 -16
  27. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  28. package/build/components/header/tools-more-menu-group/index.js +7 -10
  29. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  30. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
  31. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  32. package/build/components/keyboard-shortcut-help-modal/index.js +44 -54
  33. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  34. package/build/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
  35. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  36. package/build/components/layout/actions-panel.js +5 -6
  37. package/build/components/layout/actions-panel.js.map +1 -1
  38. package/build/components/layout/index.js +3 -4
  39. package/build/components/layout/index.js.map +1 -1
  40. package/build/components/layout/index.native.js +3 -7
  41. package/build/components/layout/index.native.js.map +1 -1
  42. package/build/components/meta-boxes/index.js +9 -13
  43. package/build/components/meta-boxes/index.js.map +1 -1
  44. package/build/components/meta-boxes/meta-box-visibility.js +5 -8
  45. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  46. package/build/components/meta-boxes/meta-boxes-area/index.js +3 -4
  47. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  48. package/build/components/preferences-modal/meta-boxes-section.js +16 -23
  49. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  50. package/build/components/preferences-modal/options/enable-custom-fields.js +7 -9
  51. package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  52. package/build/components/preferences-modal/options/enable-feature.js +12 -16
  53. package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
  54. package/build/components/preferences-modal/options/enable-panel.js +10 -17
  55. package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
  56. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js +7 -10
  57. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  58. package/build/components/secondary-sidebar/list-view-sidebar.js +58 -44
  59. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  60. package/build/components/sidebar/discussion-panel/index.js +5 -7
  61. package/build/components/sidebar/discussion-panel/index.js.map +1 -1
  62. package/build/components/sidebar/featured-image/index.js +9 -17
  63. package/build/components/sidebar/featured-image/index.js.map +1 -1
  64. package/build/components/sidebar/page-attributes/index.js +3 -9
  65. package/build/components/sidebar/page-attributes/index.js.map +1 -1
  66. package/build/components/sidebar/plugin-document-setting-panel/index.js +20 -25
  67. package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  68. package/build/components/sidebar/plugin-post-publish-panel/index.js +12 -15
  69. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  70. package/build/components/sidebar/plugin-post-status-info/index.js +6 -9
  71. package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  72. package/build/components/sidebar/plugin-pre-publish-panel/index.js +12 -15
  73. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  74. package/build/components/sidebar/plugin-sidebar/index.js +4 -5
  75. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  76. package/build/components/sidebar/post-excerpt/index.js +5 -7
  77. package/build/components/sidebar/post-excerpt/index.js.map +1 -1
  78. package/build/components/sidebar/post-schedule/index.js +16 -23
  79. package/build/components/sidebar/post-schedule/index.js.map +1 -1
  80. package/build/components/sidebar/post-status/index.js +7 -11
  81. package/build/components/sidebar/post-status/index.js.map +1 -1
  82. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js +9 -15
  83. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  84. package/build/components/sidebar/post-template/create-modal.js +3 -4
  85. package/build/components/sidebar/post-template/create-modal.js.map +1 -1
  86. package/build/components/sidebar/post-template/form.js +13 -20
  87. package/build/components/sidebar/post-template/form.js.map +1 -1
  88. package/build/components/sidebar/post-template/index.js +18 -25
  89. package/build/components/sidebar/post-template/index.js.map +1 -1
  90. package/build/components/sidebar/post-url/index.js +16 -23
  91. package/build/components/sidebar/post-url/index.js.map +1 -1
  92. package/build/components/sidebar/post-visibility/index.js +26 -36
  93. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  94. package/build/components/sidebar/settings-header/index.js +3 -4
  95. package/build/components/sidebar/settings-header/index.js.map +1 -1
  96. package/build/components/sidebar/template-summary/index.js +1 -1
  97. package/build/components/sidebar/template-summary/index.js.map +1 -1
  98. package/build/components/start-page-options/index.js +3 -4
  99. package/build/components/start-page-options/index.js.map +1 -1
  100. package/build/components/view-link/index.js +1 -1
  101. package/build/components/view-link/index.js.map +1 -1
  102. package/build/components/visual-editor/block-inspector-button.js +4 -5
  103. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  104. package/build/components/visual-editor/header.native.js +6 -7
  105. package/build/components/visual-editor/header.native.js.map +1 -1
  106. package/build/components/visual-editor/index.js +32 -48
  107. package/build/components/visual-editor/index.js.map +1 -1
  108. package/build/components/welcome-guide/image.js +4 -5
  109. package/build/components/welcome-guide/image.js.map +1 -1
  110. package/build/editor.js +14 -20
  111. package/build/editor.js.map +1 -1
  112. package/build/editor.native.js +3 -6
  113. package/build/editor.native.js.map +1 -1
  114. package/build/hooks/validate-multiple-use/index.js +18 -29
  115. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  116. package/build/plugins/index.js +20 -23
  117. package/build/plugins/index.js.map +1 -1
  118. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +3 -4
  119. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  120. package/build/store/actions.js +60 -88
  121. package/build/store/actions.js.map +1 -1
  122. package/build/store/reducer.js +11 -43
  123. package/build/store/reducer.js.map +1 -1
  124. package/build/store/selectors.js +11 -16
  125. package/build/store/selectors.js.map +1 -1
  126. package/build-module/components/block-manager/category.js +14 -22
  127. package/build-module/components/block-manager/category.js.map +1 -1
  128. package/build-module/components/block-manager/checklist.js +6 -13
  129. package/build-module/components/block-manager/checklist.js.map +1 -1
  130. package/build-module/components/block-manager/index.js +10 -14
  131. package/build-module/components/block-manager/index.js.map +1 -1
  132. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +21 -26
  133. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  134. package/build-module/components/device-preview/index.js +1 -1
  135. package/build-module/components/device-preview/index.js.map +1 -1
  136. package/build-module/components/editor-initialization/index.js +3 -4
  137. package/build-module/components/editor-initialization/index.js.map +1 -1
  138. package/build-module/components/header/document-title/index.js +88 -0
  139. package/build-module/components/header/document-title/index.js.map +1 -0
  140. package/build-module/components/header/fullscreen-mode-close/index.js +7 -8
  141. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  142. package/build-module/components/header/header-toolbar/index.native.js +12 -13
  143. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  144. package/build-module/components/header/index.js +7 -6
  145. package/build-module/components/header/index.js.map +1 -1
  146. package/build-module/components/header/main-dashboard-button/index.js +3 -4
  147. package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
  148. package/build-module/components/header/more-menu/index.js +19 -23
  149. package/build-module/components/header/more-menu/index.js.map +1 -1
  150. package/build-module/components/header/post-publish-button-or-toggle.js +15 -16
  151. package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
  152. package/build-module/components/header/tools-more-menu-group/index.js +7 -10
  153. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  154. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
  155. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  156. package/build-module/components/keyboard-shortcut-help-modal/index.js +42 -52
  157. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  158. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
  159. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  160. package/build-module/components/layout/actions-panel.js +5 -6
  161. package/build-module/components/layout/actions-panel.js.map +1 -1
  162. package/build-module/components/layout/index.js +3 -4
  163. package/build-module/components/layout/index.js.map +1 -1
  164. package/build-module/components/layout/index.native.js +3 -7
  165. package/build-module/components/layout/index.native.js.map +1 -1
  166. package/build-module/components/meta-boxes/index.js +9 -13
  167. package/build-module/components/meta-boxes/index.js.map +1 -1
  168. package/build-module/components/meta-boxes/meta-box-visibility.js +5 -8
  169. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  170. package/build-module/components/meta-boxes/meta-boxes-area/index.js +3 -4
  171. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  172. package/build-module/components/preferences-modal/meta-boxes-section.js +16 -23
  173. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  174. package/build-module/components/preferences-modal/options/enable-custom-fields.js +7 -9
  175. package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  176. package/build-module/components/preferences-modal/options/enable-feature.js +12 -16
  177. package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
  178. package/build-module/components/preferences-modal/options/enable-panel.js +10 -17
  179. package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
  180. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js +7 -10
  181. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  182. package/build-module/components/secondary-sidebar/list-view-sidebar.js +58 -44
  183. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  184. package/build-module/components/sidebar/discussion-panel/index.js +5 -7
  185. package/build-module/components/sidebar/discussion-panel/index.js.map +1 -1
  186. package/build-module/components/sidebar/featured-image/index.js +9 -17
  187. package/build-module/components/sidebar/featured-image/index.js.map +1 -1
  188. package/build-module/components/sidebar/page-attributes/index.js +3 -9
  189. package/build-module/components/sidebar/page-attributes/index.js.map +1 -1
  190. package/build-module/components/sidebar/plugin-document-setting-panel/index.js +20 -25
  191. package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  192. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +12 -15
  193. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  194. package/build-module/components/sidebar/plugin-post-status-info/index.js +6 -9
  195. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  196. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +12 -15
  197. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  198. package/build-module/components/sidebar/plugin-sidebar/index.js +4 -5
  199. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  200. package/build-module/components/sidebar/post-excerpt/index.js +5 -7
  201. package/build-module/components/sidebar/post-excerpt/index.js.map +1 -1
  202. package/build-module/components/sidebar/post-schedule/index.js +16 -23
  203. package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
  204. package/build-module/components/sidebar/post-status/index.js +7 -11
  205. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  206. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js +9 -15
  207. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  208. package/build-module/components/sidebar/post-template/create-modal.js +3 -4
  209. package/build-module/components/sidebar/post-template/create-modal.js.map +1 -1
  210. package/build-module/components/sidebar/post-template/form.js +13 -20
  211. package/build-module/components/sidebar/post-template/form.js.map +1 -1
  212. package/build-module/components/sidebar/post-template/index.js +18 -25
  213. package/build-module/components/sidebar/post-template/index.js.map +1 -1
  214. package/build-module/components/sidebar/post-url/index.js +16 -23
  215. package/build-module/components/sidebar/post-url/index.js.map +1 -1
  216. package/build-module/components/sidebar/post-visibility/index.js +26 -36
  217. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  218. package/build-module/components/sidebar/settings-header/index.js +3 -4
  219. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  220. package/build-module/components/sidebar/template-summary/index.js +1 -1
  221. package/build-module/components/sidebar/template-summary/index.js.map +1 -1
  222. package/build-module/components/start-page-options/index.js +3 -4
  223. package/build-module/components/start-page-options/index.js.map +1 -1
  224. package/build-module/components/view-link/index.js +1 -1
  225. package/build-module/components/view-link/index.js.map +1 -1
  226. package/build-module/components/visual-editor/block-inspector-button.js +4 -5
  227. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  228. package/build-module/components/visual-editor/header.native.js +6 -7
  229. package/build-module/components/visual-editor/header.native.js.map +1 -1
  230. package/build-module/components/visual-editor/index.js +35 -49
  231. package/build-module/components/visual-editor/index.js.map +1 -1
  232. package/build-module/components/welcome-guide/image.js +4 -5
  233. package/build-module/components/welcome-guide/image.js.map +1 -1
  234. package/build-module/editor.js +14 -20
  235. package/build-module/editor.js.map +1 -1
  236. package/build-module/editor.native.js +3 -6
  237. package/build-module/editor.native.js.map +1 -1
  238. package/build-module/hooks/validate-multiple-use/index.js +18 -29
  239. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  240. package/build-module/plugins/index.js +20 -23
  241. package/build-module/plugins/index.js.map +1 -1
  242. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +3 -4
  243. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  244. package/build-module/store/actions.js +60 -88
  245. package/build-module/store/actions.js.map +1 -1
  246. package/build-module/store/reducer.js +11 -43
  247. package/build-module/store/reducer.js.map +1 -1
  248. package/build-module/store/selectors.js +11 -16
  249. package/build-module/store/selectors.js.map +1 -1
  250. package/build-style/style-rtl.css +63 -101
  251. package/build-style/style.css +63 -101
  252. package/package.json +32 -32
  253. package/src/components/header/document-title/index.js +86 -0
  254. package/src/components/header/document-title/style.scss +61 -0
  255. package/src/components/header/header-toolbar/style.scss +0 -1
  256. package/src/components/header/index.js +4 -2
  257. package/src/components/header/style.scss +6 -0
  258. package/src/components/secondary-sidebar/list-view-sidebar.js +68 -66
  259. package/src/components/secondary-sidebar/style.scss +28 -31
  260. package/src/components/visual-editor/index.js +10 -21
  261. package/src/components/visual-editor/style.scss +0 -13
  262. package/src/style.scss +1 -1
  263. package/build/components/header/template-title/delete-template.js +0 -117
  264. package/build/components/header/template-title/delete-template.js.map +0 -1
  265. package/build/components/header/template-title/edit-template-title.js +0 -95
  266. package/build/components/header/template-title/edit-template-title.js.map +0 -1
  267. package/build/components/header/template-title/index.js +0 -124
  268. package/build/components/header/template-title/index.js.map +0 -1
  269. package/build/components/header/template-title/template-description.js +0 -55
  270. package/build/components/header/template-title/template-description.js.map +0 -1
  271. package/build-module/components/header/template-title/delete-template.js +0 -104
  272. package/build-module/components/header/template-title/delete-template.js.map +0 -1
  273. package/build-module/components/header/template-title/edit-template-title.js +0 -83
  274. package/build-module/components/header/template-title/edit-template-title.js.map +0 -1
  275. package/build-module/components/header/template-title/index.js +0 -105
  276. package/build-module/components/header/template-title/index.js.map +0 -1
  277. package/build-module/components/header/template-title/template-description.js +0 -45
  278. package/build-module/components/header/template-title/template-description.js.map +0 -1
  279. package/src/components/header/template-title/delete-template.js +0 -106
  280. package/src/components/header/template-title/edit-template-title.js +0 -78
  281. package/src/components/header/template-title/index.js +0 -115
  282. package/src/components/header/template-title/style.scss +0 -94
  283. package/src/components/header/template-title/template-description.js +0 -42
@@ -19,7 +19,7 @@ import { store as editPostStore } from '../../../store';
19
19
 
20
20
  const PANEL_NAME = 'page-attributes';
21
21
  export function PageAttributes() {
22
- var _postType$labels$attr, _postType$labels;
22
+ var _postType$labels$attr;
23
23
 
24
24
  const {
25
25
  isEnabled,
@@ -50,16 +50,10 @@ export function PageAttributes() {
50
50
  return null;
51
51
  }
52
52
 
53
- const onTogglePanel = function () {
54
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
55
- args[_key] = arguments[_key];
56
- }
57
-
58
- return toggleEditorPanelOpened(PANEL_NAME, ...args);
59
- };
53
+ const onTogglePanel = (...args) => toggleEditorPanelOpened(PANEL_NAME, ...args);
60
54
 
61
55
  return createElement(PageAttributesCheck, null, createElement(PanelBody, {
62
- title: (_postType$labels$attr = postType === null || postType === void 0 ? void 0 : (_postType$labels = postType.labels) === null || _postType$labels === void 0 ? void 0 : _postType$labels.attributes) !== null && _postType$labels$attr !== void 0 ? _postType$labels$attr : __('Page attributes'),
56
+ title: (_postType$labels$attr = postType?.labels?.attributes) !== null && _postType$labels$attr !== void 0 ? _postType$labels$attr : __('Page attributes'),
63
57
  opened: isOpened,
64
58
  onToggle: onTogglePanel
65
59
  }, createElement(PageAttributesParent, null), createElement(PanelRow, null, createElement(PageAttributesOrder, null))));
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/page-attributes/index.js"],"names":["__","PanelBody","PanelRow","store","editorStore","PageAttributesCheck","PageAttributesOrder","PageAttributesParent","useSelect","useDispatch","coreStore","editPostStore","PANEL_NAME","PageAttributes","isEnabled","isOpened","postType","select","getEditedPostAttribute","isEditorPanelEnabled","isEditorPanelOpened","getPostType","toggleEditorPanelOpened","onTogglePanel","args","labels","attributes"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,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;AAAA;;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,GAAG;AAAA,sCAAKC,IAAL;AAAKA,MAAAA,IAAL;AAAA;;AAAA,WACrBF,uBAAuB,CAAEV,UAAF,EAAc,GAAGY,IAAjB,CADF;AAAA,GAAtB;;AAGA,SACC,cAAC,mBAAD,QACC,cAAC,SAAD;AACC,IAAA,KAAK,2BACJR,QADI,aACJA,QADI,2CACJA,QAAQ,CAAES,MADN,qDACJ,iBAAkBC,UADd,yEAC4B1B,EAAE,CAAE,iBAAF,CAFpC;AAIC,IAAA,MAAM,EAAGe,QAJV;AAKC,IAAA,QAAQ,EAAGQ;AALZ,KAOC,cAAC,oBAAD,OAPD,EAQC,cAAC,QAAD,QACC,cAAC,mBAAD,OADD,CARD,CADD,CADD;AAgBA;AAED,eAAeV,cAAf","sourcesContent":["/**\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 = ( ...args ) =>\n\t\ttoggleEditorPanelOpened( PANEL_NAME, ...args );\n\n\treturn (\n\t\t<PageAttributesCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={\n\t\t\t\t\tpostType?.labels?.attributes ?? __( '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":["__","PanelBody","PanelRow","store","editorStore","PageAttributesCheck","PageAttributesOrder","PageAttributesParent","useSelect","useDispatch","coreStore","editPostStore","PANEL_NAME","PageAttributes","isEnabled","isOpened","postType","select","getEditedPostAttribute","isEditorPanelEnabled","isEditorPanelOpened","getPostType","toggleEditorPanelOpened","onTogglePanel","args","labels","attributes"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,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;AAAA;;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,GAAG,CAAE,GAAGC,IAAL,KACrBF,uBAAuB,CAAEV,UAAF,EAAc,GAAGY,IAAjB,CADxB;;AAGA,SACC,cAAC,mBAAD,QACC,cAAC,SAAD;AACC,IAAA,KAAK,2BACJR,QAAQ,EAAES,MAAV,EAAkBC,UADd,yEAC4B1B,EAAE,CAAE,iBAAF,CAFpC;AAIC,IAAA,MAAM,EAAGe,QAJV;AAKC,IAAA,QAAQ,EAAGQ;AALZ,KAOC,cAAC,oBAAD,OAPD,EAQC,cAAC,QAAD,QACC,cAAC,mBAAD,OADD,CARD,CADD,CADD;AAgBA;AAED,eAAeV,cAAf","sourcesContent":["/**\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 = ( ...args ) =>\n\t\ttoggleEditorPanelOpened( PANEL_NAME, ...args );\n\n\treturn (\n\t\t<PageAttributesCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={\n\t\t\t\t\tpostType?.labels?.attributes ?? __( '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"]}
@@ -23,17 +23,16 @@ const {
23
23
  Slot
24
24
  } = createSlotFill('PluginDocumentSettingPanel');
25
25
 
26
- const PluginDocumentSettingFill = _ref => {
27
- let {
28
- isEnabled,
29
- panelName,
30
- opened,
31
- onToggle,
32
- className,
33
- title,
34
- icon,
35
- children
36
- } = _ref;
26
+ const PluginDocumentSettingFill = ({
27
+ isEnabled,
28
+ panelName,
29
+ opened,
30
+ onToggle,
31
+ className,
32
+ title,
33
+ icon,
34
+ children
35
+ }) => {
37
36
  return createElement(Fragment, null, createElement(EnablePluginDocumentSettingPanelOption, {
38
37
  label: title,
39
38
  panelName: panelName
@@ -105,25 +104,21 @@ const PluginDocumentSettingPanel = compose(withPluginContext((context, ownProps)
105
104
  return {
106
105
  panelName: `${context.name}/${ownProps.name}`
107
106
  };
108
- }), withSelect((select, _ref2) => {
109
- let {
110
- panelName
111
- } = _ref2;
107
+ }), withSelect((select, {
108
+ panelName
109
+ }) => {
112
110
  return {
113
111
  opened: select(editPostStore).isEditorPanelOpened(panelName),
114
112
  isEnabled: select(editPostStore).isEditorPanelEnabled(panelName)
115
113
  };
116
- }), withDispatch((dispatch, _ref3) => {
117
- let {
118
- panelName
119
- } = _ref3;
120
- return {
121
- onToggle() {
122
- return dispatch(editPostStore).toggleEditorPanelOpened(panelName);
123
- }
114
+ }), withDispatch((dispatch, {
115
+ panelName
116
+ }) => ({
117
+ onToggle() {
118
+ return dispatch(editPostStore).toggleEditorPanelOpened(panelName);
119
+ }
124
120
 
125
- };
126
- }))(PluginDocumentSettingFill);
121
+ })))(PluginDocumentSettingFill);
127
122
  PluginDocumentSettingPanel.Slot = Slot;
128
123
  export default PluginDocumentSettingPanel;
129
124
  //# sourceMappingURL=index.js.map
@@ -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,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBX,cAAc,CAAE,4BAAF,CAArC;;AAEA,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\nconst { 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
+ {"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,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBX,cAAc,CAAE,4BAAF,CAArC;;AAEA,MAAMY,yBAAyB,GAAG,CAAE;AACnCC,EAAAA,SADmC;AAEnCC,EAAAA,SAFmC;AAGnCC,EAAAA,MAHmC;AAInCC,EAAAA,QAJmC;AAKnCC,EAAAA,SALmC;AAMnCC,EAAAA,KANmC;AAOnCC,EAAAA,IAPmC;AAQnCC,EAAAA;AARmC,CAAF,KAS3B;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,EAAU;AAAEZ,EAAAA;AAAF,CAAV,KAA6B;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,EAAY;AAAEf,EAAAA;AAAF,CAAZ,MAAiC;AAC9CE,EAAAA,QAAQ,GAAG;AACV,WAAOa,QAAQ,CAAEpB,aAAF,CAAR,CAA0BqB,uBAA1B,CACNhB,SADM,CAAP;AAGA;;AAL6C,CAAjC,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\nconst { 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"]}
@@ -11,21 +11,18 @@ const {
11
11
  Slot
12
12
  } = createSlotFill('PluginPostPublishPanel');
13
13
 
14
- const PluginPostPublishPanelFill = _ref => {
15
- let {
16
- children,
17
- className,
18
- title,
19
- initialOpen = false,
20
- icon
21
- } = _ref;
22
- return createElement(Fill, null, createElement(PanelBody, {
23
- className: className,
24
- initialOpen: initialOpen || !title,
25
- title: title,
26
- icon: icon
27
- }, children));
28
- };
14
+ const PluginPostPublishPanelFill = ({
15
+ children,
16
+ className,
17
+ title,
18
+ initialOpen = false,
19
+ icon
20
+ }) => createElement(Fill, null, createElement(PanelBody, {
21
+ className: className,
22
+ initialOpen: initialOpen || !title,
23
+ title: title,
24
+ icon: icon
25
+ }, children));
29
26
  /**
30
27
  * Renders provided content to the post-publish panel in the publish flow
31
28
  * (side panel that opens after a user publishes the post).
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/plugin-post-publish-panel/index.js"],"names":["compose","withPluginContext","createSlotFill","PanelBody","Fill","Slot","PluginPostPublishPanelFill","children","className","title","initialOpen","icon","PluginPostPublishPanel","context","ownProps"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AACA,SAASC,iBAAT,QAAkC,oBAAlC;AACA,SAASC,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AAEA,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBH,cAAc,CAAE,wBAAF,CAArC;;AAEA,MAAMI,0BAA0B,GAAG;AAAA,MAAE;AACpCC,IAAAA,QADoC;AAEpCC,IAAAA,SAFoC;AAGpCC,IAAAA,KAHoC;AAIpCC,IAAAA,WAAW,GAAG,KAJsB;AAKpCC,IAAAA;AALoC,GAAF;AAAA,SAOlC,cAAC,IAAD,QACC,cAAC,SAAD;AACC,IAAA,SAAS,EAAGH,SADb;AAEC,IAAA,WAAW,EAAGE,WAAW,IAAI,CAAED,KAFhC;AAGC,IAAA,KAAK,EAAGA,KAHT;AAIC,IAAA,IAAI,EAAGE;AAJR,KAMGJ,QANH,CADD,CAPkC;AAAA,CAAnC;AAkBA;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;;;AAEA,MAAMK,sBAAsB,GAAGZ,OAAO,CACrCC,iBAAiB,CAAE,CAAEY,OAAF,EAAWC,QAAX,KAAyB;AAC3C,SAAO;AACNH,IAAAA,IAAI,EAAEG,QAAQ,CAACH,IAAT,IAAiBE,OAAO,CAACF;AADzB,GAAP;AAGA,CAJgB,CADoB,CAAP,CAM5BL,0BAN4B,CAA/B;AAQAM,sBAAsB,CAACP,IAAvB,GAA8BA,IAA9B;AAEA,eAAeO,sBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withPluginContext } from '@wordpress/plugins';\nimport { createSlotFill, PanelBody } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostPublishPanel' );\n\nconst PluginPostPublishPanelFill = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => (\n\t<Fill>\n\t\t<PanelBody\n\t\t\tclassName={ className }\n\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\ttitle={ title }\n\t\t\ticon={ icon }\n\t\t>\n\t\t\t{ children }\n\t\t</PanelBody>\n\t</Fill>\n);\n/**\n * Renders provided content to the post-publish panel in the publish flow\n * (side panel that opens after a user publishes the post).\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostPublishPanel = wp.editPost.PluginPostPublishPanel;\n *\n * function MyPluginPostPublishPanel() {\n * \treturn wp.element.createElement(\n * \t\tPluginPostPublishPanel,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-publish-panel',\n * \t\t\ttitle: __( 'My panel title' ),\n * \t\t\tinitialOpen: true,\n * \t\t},\n * \t\t__( 'My panel content' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostPublishPanel } from '@wordpress/edit-post';\n *\n * const MyPluginPostPublishPanel = () => (\n * \t<PluginPostPublishPanel\n * \t\tclassName=\"my-plugin-post-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * { __( 'My panel content' ) }\n * \t</PluginPostPublishPanel>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\n\nconst PluginPostPublishPanel = compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t};\n\t} )\n)( PluginPostPublishPanelFill );\n\nPluginPostPublishPanel.Slot = Slot;\n\nexport default PluginPostPublishPanel;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/plugin-post-publish-panel/index.js"],"names":["compose","withPluginContext","createSlotFill","PanelBody","Fill","Slot","PluginPostPublishPanelFill","children","className","title","initialOpen","icon","PluginPostPublishPanel","context","ownProps"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AACA,SAASC,iBAAT,QAAkC,oBAAlC;AACA,SAASC,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AAEA,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBH,cAAc,CAAE,wBAAF,CAArC;;AAEA,MAAMI,0BAA0B,GAAG,CAAE;AACpCC,EAAAA,QADoC;AAEpCC,EAAAA,SAFoC;AAGpCC,EAAAA,KAHoC;AAIpCC,EAAAA,WAAW,GAAG,KAJsB;AAKpCC,EAAAA;AALoC,CAAF,KAOlC,cAAC,IAAD,QACC,cAAC,SAAD;AACC,EAAA,SAAS,EAAGH,SADb;AAEC,EAAA,WAAW,EAAGE,WAAW,IAAI,CAAED,KAFhC;AAGC,EAAA,KAAK,EAAGA,KAHT;AAIC,EAAA,IAAI,EAAGE;AAJR,GAMGJ,QANH,CADD,CAPD;AAkBA;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;;;AAEA,MAAMK,sBAAsB,GAAGZ,OAAO,CACrCC,iBAAiB,CAAE,CAAEY,OAAF,EAAWC,QAAX,KAAyB;AAC3C,SAAO;AACNH,IAAAA,IAAI,EAAEG,QAAQ,CAACH,IAAT,IAAiBE,OAAO,CAACF;AADzB,GAAP;AAGA,CAJgB,CADoB,CAAP,CAM5BL,0BAN4B,CAA/B;AAQAM,sBAAsB,CAACP,IAAvB,GAA8BA,IAA9B;AAEA,eAAeO,sBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withPluginContext } from '@wordpress/plugins';\nimport { createSlotFill, PanelBody } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostPublishPanel' );\n\nconst PluginPostPublishPanelFill = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => (\n\t<Fill>\n\t\t<PanelBody\n\t\t\tclassName={ className }\n\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\ttitle={ title }\n\t\t\ticon={ icon }\n\t\t>\n\t\t\t{ children }\n\t\t</PanelBody>\n\t</Fill>\n);\n/**\n * Renders provided content to the post-publish panel in the publish flow\n * (side panel that opens after a user publishes the post).\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostPublishPanel = wp.editPost.PluginPostPublishPanel;\n *\n * function MyPluginPostPublishPanel() {\n * \treturn wp.element.createElement(\n * \t\tPluginPostPublishPanel,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-publish-panel',\n * \t\t\ttitle: __( 'My panel title' ),\n * \t\t\tinitialOpen: true,\n * \t\t},\n * \t\t__( 'My panel content' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostPublishPanel } from '@wordpress/edit-post';\n *\n * const MyPluginPostPublishPanel = () => (\n * \t<PluginPostPublishPanel\n * \t\tclassName=\"my-plugin-post-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * { __( 'My panel content' ) }\n * \t</PluginPostPublishPanel>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\n\nconst PluginPostPublishPanel = compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t};\n\t} )\n)( PluginPostPublishPanelFill );\n\nPluginPostPublishPanel.Slot = Slot;\n\nexport default PluginPostPublishPanel;\n"]}
@@ -56,15 +56,12 @@ const {
56
56
  * @return {WPComponent} The component to be rendered.
57
57
  */
58
58
 
59
- const PluginPostStatusInfo = _ref => {
60
- let {
61
- children,
62
- className
63
- } = _ref;
64
- return createElement(Fill, null, createElement(PanelRow, {
65
- className: className
66
- }, children));
67
- };
59
+ const PluginPostStatusInfo = ({
60
+ children,
61
+ className
62
+ }) => createElement(Fill, null, createElement(PanelRow, {
63
+ className: className
64
+ }, children));
68
65
 
69
66
  PluginPostStatusInfo.Slot = Slot;
70
67
  export default PluginPostStatusInfo;
@@ -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,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBH,cAAc,CAAE,sBAAF,CAArC;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,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\nconst { 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
+ {"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,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBH,cAAc,CAAE,sBAAF,CAArC;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,MAAMI,oBAAoB,GAAG,CAAE;AAAEC,EAAAA,QAAF;AAAYC,EAAAA;AAAZ,CAAF,KAC5B,cAAC,IAAD,QACC,cAAC,QAAD;AAAU,EAAA,SAAS,EAAGA;AAAtB,GAAoCD,QAApC,CADD,CADD;;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\nconst { 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"]}
@@ -11,21 +11,18 @@ const {
11
11
  Slot
12
12
  } = createSlotFill('PluginPrePublishPanel');
13
13
 
14
- const PluginPrePublishPanelFill = _ref => {
15
- let {
16
- children,
17
- className,
18
- title,
19
- initialOpen = false,
20
- icon
21
- } = _ref;
22
- return createElement(Fill, null, createElement(PanelBody, {
23
- className: className,
24
- initialOpen: initialOpen || !title,
25
- title: title,
26
- icon: icon
27
- }, children));
28
- };
14
+ const PluginPrePublishPanelFill = ({
15
+ children,
16
+ className,
17
+ title,
18
+ initialOpen = false,
19
+ icon
20
+ }) => createElement(Fill, null, createElement(PanelBody, {
21
+ className: className,
22
+ initialOpen: initialOpen || !title,
23
+ title: title,
24
+ icon: icon
25
+ }, children));
29
26
  /**
30
27
  * Renders provided content to the pre-publish side panel in the publish flow
31
28
  * (side panel that opens when a user first pushes "Publish" from the main editor).
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/plugin-pre-publish-panel/index.js"],"names":["createSlotFill","PanelBody","compose","withPluginContext","Fill","Slot","PluginPrePublishPanelFill","children","className","title","initialOpen","icon","PluginPrePublishPanel","context","ownProps"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,iBAAT,QAAkC,oBAAlC;AACA,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBL,cAAc,CAAE,uBAAF,CAArC;;AAEA,MAAMM,yBAAyB,GAAG;AAAA,MAAE;AACnCC,IAAAA,QADmC;AAEnCC,IAAAA,SAFmC;AAGnCC,IAAAA,KAHmC;AAInCC,IAAAA,WAAW,GAAG,KAJqB;AAKnCC,IAAAA;AALmC,GAAF;AAAA,SAOjC,cAAC,IAAD,QACC,cAAC,SAAD;AACC,IAAA,SAAS,EAAGH,SADb;AAEC,IAAA,WAAW,EAAGE,WAAW,IAAI,CAAED,KAFhC;AAGC,IAAA,KAAK,EAAGA,KAHT;AAIC,IAAA,IAAI,EAAGE;AAJR,KAMGJ,QANH,CADD,CAPiC;AAAA,CAAlC;AAmBA;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,MAAMK,qBAAqB,GAAGV,OAAO,CACpCC,iBAAiB,CAAE,CAAEU,OAAF,EAAWC,QAAX,KAAyB;AAC3C,SAAO;AACNH,IAAAA,IAAI,EAAEG,QAAQ,CAACH,IAAT,IAAiBE,OAAO,CAACF;AADzB,GAAP;AAGA,CAJgB,CADmB,CAAP,CAM3BL,yBAN2B,CAA9B;AAQAM,qBAAqB,CAACP,IAAtB,GAA6BA,IAA7B;AAEA,eAAeO,qBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\nimport { withPluginContext } from '@wordpress/plugins';\nconst { Fill, Slot } = createSlotFill( 'PluginPrePublishPanel' );\n\nconst PluginPrePublishPanelFill = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => (\n\t<Fill>\n\t\t<PanelBody\n\t\t\tclassName={ className }\n\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\ttitle={ title }\n\t\t\ticon={ icon }\n\t\t>\n\t\t\t{ children }\n\t\t</PanelBody>\n\t</Fill>\n);\n\n/**\n * Renders provided content to the pre-publish side panel in the publish flow\n * (side panel that opens when a user first pushes \"Publish\" from the main editor).\n *\n * @param {Object} props Component props.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened.\n * When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/)\n * icon slug string, or an SVG WP element, to be rendered when\n * the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPrePublishPanel = wp.editPost.PluginPrePublishPanel;\n *\n * function MyPluginPrePublishPanel() {\n * \treturn wp.element.createElement(\n * \t\tPluginPrePublishPanel,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-pre-publish-panel',\n * \t\t\ttitle: __( 'My panel title' ),\n * \t\t\tinitialOpen: true,\n * \t\t},\n * \t\t__( 'My panel content' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPrePublishPanel } from '@wordpress/edit-post';\n *\n * const MyPluginPrePublishPanel = () => (\n * \t<PluginPrePublishPanel\n * \t\tclassName=\"my-plugin-pre-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * \t { __( 'My panel content' ) }\n * \t</PluginPrePublishPanel>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\nconst PluginPrePublishPanel = compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t};\n\t} )\n)( PluginPrePublishPanelFill );\n\nPluginPrePublishPanel.Slot = Slot;\n\nexport default PluginPrePublishPanel;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/plugin-pre-publish-panel/index.js"],"names":["createSlotFill","PanelBody","compose","withPluginContext","Fill","Slot","PluginPrePublishPanelFill","children","className","title","initialOpen","icon","PluginPrePublishPanel","context","ownProps"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,iBAAT,QAAkC,oBAAlC;AACA,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IAAiBL,cAAc,CAAE,uBAAF,CAArC;;AAEA,MAAMM,yBAAyB,GAAG,CAAE;AACnCC,EAAAA,QADmC;AAEnCC,EAAAA,SAFmC;AAGnCC,EAAAA,KAHmC;AAInCC,EAAAA,WAAW,GAAG,KAJqB;AAKnCC,EAAAA;AALmC,CAAF,KAOjC,cAAC,IAAD,QACC,cAAC,SAAD;AACC,EAAA,SAAS,EAAGH,SADb;AAEC,EAAA,WAAW,EAAGE,WAAW,IAAI,CAAED,KAFhC;AAGC,EAAA,KAAK,EAAGA,KAHT;AAIC,EAAA,IAAI,EAAGE;AAJR,GAMGJ,QANH,CADD,CAPD;AAmBA;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,MAAMK,qBAAqB,GAAGV,OAAO,CACpCC,iBAAiB,CAAE,CAAEU,OAAF,EAAWC,QAAX,KAAyB;AAC3C,SAAO;AACNH,IAAAA,IAAI,EAAEG,QAAQ,CAACH,IAAT,IAAiBE,OAAO,CAACF;AADzB,GAAP;AAGA,CAJgB,CADmB,CAAP,CAM3BL,yBAN2B,CAA9B;AAQAM,qBAAqB,CAACP,IAAtB,GAA6BA,IAA7B;AAEA,eAAeO,qBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\nimport { withPluginContext } from '@wordpress/plugins';\nconst { Fill, Slot } = createSlotFill( 'PluginPrePublishPanel' );\n\nconst PluginPrePublishPanelFill = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => (\n\t<Fill>\n\t\t<PanelBody\n\t\t\tclassName={ className }\n\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\ttitle={ title }\n\t\t\ticon={ icon }\n\t\t>\n\t\t\t{ children }\n\t\t</PanelBody>\n\t</Fill>\n);\n\n/**\n * Renders provided content to the pre-publish side panel in the publish flow\n * (side panel that opens when a user first pushes \"Publish\" from the main editor).\n *\n * @param {Object} props Component props.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened.\n * When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/)\n * icon slug string, or an SVG WP element, to be rendered when\n * the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPrePublishPanel = wp.editPost.PluginPrePublishPanel;\n *\n * function MyPluginPrePublishPanel() {\n * \treturn wp.element.createElement(\n * \t\tPluginPrePublishPanel,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-pre-publish-panel',\n * \t\t\ttitle: __( 'My panel title' ),\n * \t\t\tinitialOpen: true,\n * \t\t},\n * \t\t__( 'My panel content' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPrePublishPanel } from '@wordpress/edit-post';\n *\n * const MyPluginPrePublishPanel = () => (\n * \t<PluginPrePublishPanel\n * \t\tclassName=\"my-plugin-pre-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * \t { __( 'My panel content' ) }\n * \t</PluginPrePublishPanel>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\nconst PluginPrePublishPanel = compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t};\n\t} )\n)( PluginPrePublishPanelFill );\n\nPluginPrePublishPanel.Slot = Slot;\n\nexport default PluginPrePublishPanel;\n"]}
@@ -80,11 +80,10 @@ import { store as editPostStore } from '../../../store';
80
80
  * ```
81
81
  */
82
82
 
83
- export default function PluginSidebarEditPost(_ref) {
84
- let {
85
- className,
86
- ...props
87
- } = _ref;
83
+ export default function PluginSidebarEditPost({
84
+ className,
85
+ ...props
86
+ }) {
88
87
  const {
89
88
  postTitle,
90
89
  shortcut,
@@ -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,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
+ {"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,CAAgC;AAAEC,EAAAA,SAAF;AAAa,KAAGC;AAAhB,CAAhC,EAA0D;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"]}
@@ -19,13 +19,11 @@ import { store as editPostStore } from '../../../store';
19
19
 
20
20
  const PANEL_NAME = 'post-excerpt';
21
21
 
22
- function PostExcerpt(_ref) {
23
- let {
24
- isEnabled,
25
- isOpened,
26
- onTogglePanel
27
- } = _ref;
28
-
22
+ function PostExcerpt({
23
+ isEnabled,
24
+ isOpened,
25
+ onTogglePanel
26
+ }) {
29
27
  if (!isEnabled) {
30
28
  return null;
31
29
  }
@@ -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,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
+ {"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,CAAsB;AAAES,EAAAA,SAAF;AAAaC,EAAAA,QAAb;AAAuBC,EAAAA;AAAvB,CAAtB,EAA+D;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"]}
@@ -23,32 +23,25 @@ export default function PostSchedule() {
23
23
  popoverProps: popoverProps,
24
24
  contentClassName: "edit-post-post-schedule__dialog",
25
25
  focusOnMount: true,
26
- renderToggle: _ref => {
27
- let {
28
- isOpen,
29
- onToggle
30
- } = _ref;
31
- return createElement(PostScheduleToggle, {
32
- isOpen: isOpen,
33
- onClick: onToggle
34
- });
35
- },
36
- renderContent: _ref2 => {
37
- let {
38
- onClose
39
- } = _ref2;
40
- return createElement(PostScheduleForm, {
41
- onClose: onClose
42
- });
43
- }
26
+ renderToggle: ({
27
+ isOpen,
28
+ onToggle
29
+ }) => createElement(PostScheduleToggle, {
30
+ isOpen: isOpen,
31
+ onClick: onToggle
32
+ }),
33
+ renderContent: ({
34
+ onClose
35
+ }) => createElement(PostScheduleForm, {
36
+ onClose: onClose
37
+ })
44
38
  })));
45
39
  }
46
40
 
47
- function PostScheduleToggle(_ref3) {
48
- let {
49
- isOpen,
50
- onClick
51
- } = _ref3;
41
+ function PostScheduleToggle({
42
+ isOpen,
43
+ onClick
44
+ }) {
52
45
  const label = usePostScheduleLabel();
53
46
  const fullLabel = usePostScheduleLabel({
54
47
  full: true
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-schedule/index.js"],"names":["__","sprintf","PanelRow","Dropdown","Button","useState","useMemo","PostSchedule","PostScheduleForm","PostScheduleCheck","usePostScheduleLabel","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","isOpen","onToggle","onClose","PostScheduleToggle","onClick","label","fullLabel","full"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASC,QAAT,EAAmBC,QAAnB,EAA6BC,MAA7B,QAA2C,uBAA3C;AACA,SAASC,QAAT,EAAmBC,OAAnB,QAAkC,oBAAlC;AACA,SACCC,YAAY,IAAIC,gBADjB,EAECC,iBAFD,EAGCC,oBAHD,QAIO,mBAJP;AAMA,eAAe,SAASH,YAAT,GAAwB;AACtC;AACA;AACA,QAAM,CAAEI,aAAF,EAAiBC,gBAAjB,IAAsCP,QAAQ,CAAE,IAAF,CAApD,CAHsC,CAItC;;AACA,QAAMQ,YAAY,GAAGP,OAAO,CAC3B,OAAQ;AAAEQ,IAAAA,MAAM,EAAEH,aAAV;AAAyBI,IAAAA,SAAS,EAAE;AAApC,GAAR,CAD2B,EAE3B,CAAEJ,aAAF,CAF2B,CAA5B;AAKA,SACC,cAAC,iBAAD,QACC,cAAC,QAAD;AACC,IAAA,SAAS,EAAC,yBADX;AAEC,IAAA,GAAG,EAAGC;AAFP,KAIC,4BAAQZ,EAAE,CAAE,SAAF,CAAV,CAJD,EAKC,cAAC,QAAD;AACC,IAAA,YAAY,EAAGa,YADhB;AAEC,IAAA,gBAAgB,EAAC,iCAFlB;AAGC,IAAA,YAAY,MAHb;AAIC,IAAA,YAAY,EAAG;AAAA,UAAE;AAAEG,QAAAA,MAAF;AAAUC,QAAAA;AAAV,OAAF;AAAA,aACd,cAAC,kBAAD;AACC,QAAA,MAAM,EAAGD,MADV;AAEC,QAAA,OAAO,EAAGC;AAFX,QADc;AAAA,KAJhB;AAUC,IAAA,aAAa,EAAG;AAAA,UAAE;AAAEC,QAAAA;AAAF,OAAF;AAAA,aACf,cAAC,gBAAD;AAAkB,QAAA,OAAO,EAAGA;AAA5B,QADe;AAAA;AAVjB,IALD,CADD,CADD;AAwBA;;AAED,SAASC,kBAAT,QAAmD;AAAA,MAAtB;AAAEH,IAAAA,MAAF;AAAUI,IAAAA;AAAV,GAAsB;AAClD,QAAMC,KAAK,GAAGX,oBAAoB,EAAlC;AACA,QAAMY,SAAS,GAAGZ,oBAAoB,CAAE;AAAEa,IAAAA,IAAI,EAAE;AAAR,GAAF,CAAtC;AACA,SACC,cAAC,MAAD;AACC,IAAA,SAAS,EAAC,iCADX;AAEC,IAAA,OAAO,EAAC,UAFT;AAGC,IAAA,KAAK,EAAGD,SAHT;AAIC,IAAA,WAAW,MAJZ;AAKC,qBAAgBN,MALjB,CAMC;AAND;AAOC,kBAAaf,OAAO,CAAED,EAAE,CAAE,iBAAF,CAAJ,EAA2BqB,KAA3B,CAPrB;AAQC,IAAA,OAAO,EAAGD;AARX,KAUGC,KAVH,CADD;AAcA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { PanelRow, Dropdown, Button } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport {\n\tPostSchedule as PostScheduleForm,\n\tPostScheduleCheck,\n\tusePostScheduleLabel,\n} from '@wordpress/editor';\n\nexport default function PostSchedule() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( { anchor: popoverAnchor, placement: 'bottom-end' } ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostScheduleCheck>\n\t\t\t<PanelRow\n\t\t\t\tclassName=\"edit-post-post-schedule\"\n\t\t\t\tref={ setPopoverAnchor }\n\t\t\t>\n\t\t\t\t<span>{ __( 'Publish' ) }</span>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"edit-post-post-schedule__dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostScheduleToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\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\nfunction PostScheduleToggle( { isOpen, onClick } ) {\n\tconst label = usePostScheduleLabel();\n\tconst fullLabel = usePostScheduleLabel( { full: true } );\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"edit-post-post-schedule__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\tlabel={ fullLabel }\n\t\t\tshowTooltip\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post date.\n\t\t\taria-label={ sprintf( __( 'Change date: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-schedule/index.js"],"names":["__","sprintf","PanelRow","Dropdown","Button","useState","useMemo","PostSchedule","PostScheduleForm","PostScheduleCheck","usePostScheduleLabel","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","isOpen","onToggle","onClose","PostScheduleToggle","onClick","label","fullLabel","full"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASC,QAAT,EAAmBC,QAAnB,EAA6BC,MAA7B,QAA2C,uBAA3C;AACA,SAASC,QAAT,EAAmBC,OAAnB,QAAkC,oBAAlC;AACA,SACCC,YAAY,IAAIC,gBADjB,EAECC,iBAFD,EAGCC,oBAHD,QAIO,mBAJP;AAMA,eAAe,SAASH,YAAT,GAAwB;AACtC;AACA;AACA,QAAM,CAAEI,aAAF,EAAiBC,gBAAjB,IAAsCP,QAAQ,CAAE,IAAF,CAApD,CAHsC,CAItC;;AACA,QAAMQ,YAAY,GAAGP,OAAO,CAC3B,OAAQ;AAAEQ,IAAAA,MAAM,EAAEH,aAAV;AAAyBI,IAAAA,SAAS,EAAE;AAApC,GAAR,CAD2B,EAE3B,CAAEJ,aAAF,CAF2B,CAA5B;AAKA,SACC,cAAC,iBAAD,QACC,cAAC,QAAD;AACC,IAAA,SAAS,EAAC,yBADX;AAEC,IAAA,GAAG,EAAGC;AAFP,KAIC,4BAAQZ,EAAE,CAAE,SAAF,CAAV,CAJD,EAKC,cAAC,QAAD;AACC,IAAA,YAAY,EAAGa,YADhB;AAEC,IAAA,gBAAgB,EAAC,iCAFlB;AAGC,IAAA,YAAY,MAHb;AAIC,IAAA,YAAY,EAAG,CAAE;AAAEG,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAF,KACd,cAAC,kBAAD;AACC,MAAA,MAAM,EAAGD,MADV;AAEC,MAAA,OAAO,EAAGC;AAFX,MALF;AAUC,IAAA,aAAa,EAAG,CAAE;AAAEC,MAAAA;AAAF,KAAF,KACf,cAAC,gBAAD;AAAkB,MAAA,OAAO,EAAGA;AAA5B;AAXF,IALD,CADD,CADD;AAwBA;;AAED,SAASC,kBAAT,CAA6B;AAAEH,EAAAA,MAAF;AAAUI,EAAAA;AAAV,CAA7B,EAAmD;AAClD,QAAMC,KAAK,GAAGX,oBAAoB,EAAlC;AACA,QAAMY,SAAS,GAAGZ,oBAAoB,CAAE;AAAEa,IAAAA,IAAI,EAAE;AAAR,GAAF,CAAtC;AACA,SACC,cAAC,MAAD;AACC,IAAA,SAAS,EAAC,iCADX;AAEC,IAAA,OAAO,EAAC,UAFT;AAGC,IAAA,KAAK,EAAGD,SAHT;AAIC,IAAA,WAAW,MAJZ;AAKC,qBAAgBN,MALjB,CAMC;AAND;AAOC,kBAAaf,OAAO,CAAED,EAAE,CAAE,iBAAF,CAAJ,EAA2BqB,KAA3B,CAPrB;AAQC,IAAA,OAAO,EAAGD;AARX,KAUGC,KAVH,CADD;AAcA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { PanelRow, Dropdown, Button } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport {\n\tPostSchedule as PostScheduleForm,\n\tPostScheduleCheck,\n\tusePostScheduleLabel,\n} from '@wordpress/editor';\n\nexport default function PostSchedule() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( { anchor: popoverAnchor, placement: 'bottom-end' } ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostScheduleCheck>\n\t\t\t<PanelRow\n\t\t\t\tclassName=\"edit-post-post-schedule\"\n\t\t\t\tref={ setPopoverAnchor }\n\t\t\t>\n\t\t\t\t<span>{ __( 'Publish' ) }</span>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"edit-post-post-schedule__dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostScheduleToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\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\nfunction PostScheduleToggle( { isOpen, onClick } ) {\n\tconst label = usePostScheduleLabel();\n\tconst fullLabel = usePostScheduleLabel( { full: true } );\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"edit-post-post-schedule__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\tlabel={ fullLabel }\n\t\t\tshowTooltip\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post date.\n\t\t\taria-label={ sprintf( __( 'Change date: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n"]}
@@ -30,11 +30,10 @@ import PostURL from '../post-url';
30
30
 
31
31
  const PANEL_NAME = 'post-status';
32
32
 
33
- function PostStatus(_ref) {
34
- let {
35
- isOpened,
36
- onTogglePanel
37
- } = _ref;
33
+ function PostStatus({
34
+ isOpened,
35
+ onTogglePanel
36
+ }) {
38
37
  return createElement(PanelBody, {
39
38
  className: "edit-post-post-status",
40
39
  title: __('Summary'),
@@ -59,12 +58,9 @@ export default compose([withSelect(select => {
59
58
  isRemoved: isEditorPanelRemoved(PANEL_NAME),
60
59
  isOpened: isEditorPanelOpened(PANEL_NAME)
61
60
  };
62
- }), ifCondition(_ref2 => {
63
- let {
64
- isRemoved
65
- } = _ref2;
66
- return !isRemoved;
67
- }), withDispatch(dispatch => ({
61
+ }), ifCondition(({
62
+ isRemoved
63
+ }) => !isRemoved), withDispatch(dispatch => ({
68
64
  onTogglePanel() {
69
65
  return dispatch(editPostStore).toggleEditorPanelOpened(PANEL_NAME);
70
66
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-status/index.js"],"names":["__","__experimentalHStack","HStack","PanelBody","withSelect","withDispatch","compose","ifCondition","PostSwitchToDraftButton","PostVisibility","PostTrash","PostSchedule","PostSticky","PostAuthor","PostSlug","PostFormat","PostPendingStatus","PluginPostStatusInfo","store","editPostStore","PostTemplate","PostURL","PANEL_NAME","PostStatus","isOpened","onTogglePanel","fills","marginTop","select","isEditorPanelRemoved","isEditorPanelOpened","isRemoved","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,oBAAoB,IAAIC,MADzB,EAECC,SAFD,QAGO,uBAHP;AAIA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,oBAArC;AACA,SAASC,uBAAT,QAAwC,mBAAxC;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AACA,OAAOC,oBAAP,MAAiC,4BAAjC;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,OAAP,MAAoB,aAApB;AAEA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG,aAAnB;;AAEA,SAASC,UAAT,OAAmD;AAAA,MAA9B;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GAA8B;AAClD,SACC,cAAC,SAAD;AACC,IAAA,SAAS,EAAC,uBADX;AAEC,IAAA,KAAK,EAAGzB,EAAE,CAAE,SAAF,CAFX;AAGC,IAAA,MAAM,EAAGwB,QAHV;AAIC,IAAA,QAAQ,EAAGC;AAJZ,KAMC,cAAC,oBAAD,CAAsB,IAAtB,QACKC,KAAF,IACD,8BACC,cAAC,cAAD,OADD,EAEC,cAAC,YAAD,OAFD,EAGC,cAAC,YAAD,OAHD,EAIC,cAAC,OAAD,OAJD,EAKC,cAAC,UAAD,OALD,EAMC,cAAC,iBAAD,OAND,EAOC,cAAC,UAAD,OAPD,EAQC,cAAC,QAAD,OARD,EASC,cAAC,UAAD,OATD,EAUGA,KAVH,EAWC,cAAC,MAAD;AACC,IAAA,KAAK,EAAG;AACPC,MAAAA,SAAS,EAAE;AADJ,KADT;AAIC,IAAA,OAAO,EAAG;AAJX,KAMC,cAAC,uBAAD,OAND,EAOC,cAAC,SAAD,OAPD,CAXD,CAFF,CAND,CADD;AAkCA;;AAED,eAAerB,OAAO,CAAE,CACvBF,UAAU,CAAIwB,MAAF,IAAc;AACzB;AACA;AACA,QAAM;AAAEC,IAAAA,oBAAF;AAAwBC,IAAAA;AAAxB,MACLF,MAAM,CAAET,aAAF,CADP;AAEA,SAAO;AACNY,IAAAA,SAAS,EAAEF,oBAAoB,CAAEP,UAAF,CADzB;AAENE,IAAAA,QAAQ,EAAEM,mBAAmB,CAAER,UAAF;AAFvB,GAAP;AAIA,CATS,CADa,EAWvBf,WAAW,CAAE;AAAA,MAAE;AAAEwB,IAAAA;AAAF,GAAF;AAAA,SAAqB,CAAEA,SAAvB;AAAA,CAAF,CAXY,EAYvB1B,YAAY,CAAI2B,QAAF,KAAkB;AAC/BP,EAAAA,aAAa,GAAG;AACf,WAAOO,QAAQ,CAAEb,aAAF,CAAR,CAA0Bc,uBAA1B,CACNX,UADM,CAAP;AAGA;;AAL8B,CAAlB,CAAF,CAZW,CAAF,CAAP,CAmBVC,UAnBU,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\tPanelBody,\n} from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { PostSwitchToDraftButton } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport PostVisibility from '../post-visibility';\nimport PostTrash from '../post-trash';\nimport PostSchedule from '../post-schedule';\nimport PostSticky from '../post-sticky';\nimport PostAuthor from '../post-author';\nimport PostSlug from '../post-slug';\nimport PostFormat from '../post-format';\nimport PostPendingStatus from '../post-pending-status';\nimport PluginPostStatusInfo from '../plugin-post-status-info';\nimport { store as editPostStore } from '../../../store';\nimport PostTemplate from '../post-template';\nimport PostURL from '../post-url';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nfunction PostStatus( { isOpened, onTogglePanel } ) {\n\treturn (\n\t\t<PanelBody\n\t\t\tclassName=\"edit-post-post-status\"\n\t\t\ttitle={ __( 'Summary' ) }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ onTogglePanel }\n\t\t>\n\t\t\t<PluginPostStatusInfo.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PostVisibility />\n\t\t\t\t\t\t<PostSchedule />\n\t\t\t\t\t\t<PostTemplate />\n\t\t\t\t\t\t<PostURL />\n\t\t\t\t\t\t<PostSticky />\n\t\t\t\t\t\t<PostPendingStatus />\n\t\t\t\t\t\t<PostFormat />\n\t\t\t\t\t\t<PostSlug />\n\t\t\t\t\t\t<PostAuthor />\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tmarginTop: '16px',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostSwitchToDraftButton />\n\t\t\t\t\t\t\t<PostTrash />\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostStatusInfo.Slot>\n\t\t</PanelBody>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\t// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do\n\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\tconst { isEditorPanelRemoved, isEditorPanelOpened } =\n\t\t\tselect( editPostStore );\n\t\treturn {\n\t\t\tisRemoved: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t} ),\n\tifCondition( ( { isRemoved } ) => ! isRemoved ),\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] )( PostStatus );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-status/index.js"],"names":["__","__experimentalHStack","HStack","PanelBody","withSelect","withDispatch","compose","ifCondition","PostSwitchToDraftButton","PostVisibility","PostTrash","PostSchedule","PostSticky","PostAuthor","PostSlug","PostFormat","PostPendingStatus","PluginPostStatusInfo","store","editPostStore","PostTemplate","PostURL","PANEL_NAME","PostStatus","isOpened","onTogglePanel","fills","marginTop","select","isEditorPanelRemoved","isEditorPanelOpened","isRemoved","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,oBAAoB,IAAIC,MADzB,EAECC,SAFD,QAGO,uBAHP;AAIA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,oBAArC;AACA,SAASC,uBAAT,QAAwC,mBAAxC;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AACA,OAAOC,oBAAP,MAAiC,4BAAjC;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,OAAP,MAAoB,aAApB;AAEA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG,aAAnB;;AAEA,SAASC,UAAT,CAAqB;AAAEC,EAAAA,QAAF;AAAYC,EAAAA;AAAZ,CAArB,EAAmD;AAClD,SACC,cAAC,SAAD;AACC,IAAA,SAAS,EAAC,uBADX;AAEC,IAAA,KAAK,EAAGzB,EAAE,CAAE,SAAF,CAFX;AAGC,IAAA,MAAM,EAAGwB,QAHV;AAIC,IAAA,QAAQ,EAAGC;AAJZ,KAMC,cAAC,oBAAD,CAAsB,IAAtB,QACKC,KAAF,IACD,8BACC,cAAC,cAAD,OADD,EAEC,cAAC,YAAD,OAFD,EAGC,cAAC,YAAD,OAHD,EAIC,cAAC,OAAD,OAJD,EAKC,cAAC,UAAD,OALD,EAMC,cAAC,iBAAD,OAND,EAOC,cAAC,UAAD,OAPD,EAQC,cAAC,QAAD,OARD,EASC,cAAC,UAAD,OATD,EAUGA,KAVH,EAWC,cAAC,MAAD;AACC,IAAA,KAAK,EAAG;AACPC,MAAAA,SAAS,EAAE;AADJ,KADT;AAIC,IAAA,OAAO,EAAG;AAJX,KAMC,cAAC,uBAAD,OAND,EAOC,cAAC,SAAD,OAPD,CAXD,CAFF,CAND,CADD;AAkCA;;AAED,eAAerB,OAAO,CAAE,CACvBF,UAAU,CAAIwB,MAAF,IAAc;AACzB;AACA;AACA,QAAM;AAAEC,IAAAA,oBAAF;AAAwBC,IAAAA;AAAxB,MACLF,MAAM,CAAET,aAAF,CADP;AAEA,SAAO;AACNY,IAAAA,SAAS,EAAEF,oBAAoB,CAAEP,UAAF,CADzB;AAENE,IAAAA,QAAQ,EAAEM,mBAAmB,CAAER,UAAF;AAFvB,GAAP;AAIA,CATS,CADa,EAWvBf,WAAW,CAAE,CAAE;AAAEwB,EAAAA;AAAF,CAAF,KAAqB,CAAEA,SAAzB,CAXY,EAYvB1B,YAAY,CAAI2B,QAAF,KAAkB;AAC/BP,EAAAA,aAAa,GAAG;AACf,WAAOO,QAAQ,CAAEb,aAAF,CAAR,CAA0Bc,uBAA1B,CACNX,UADM,CAAP;AAGA;;AAL8B,CAAlB,CAAF,CAZW,CAAF,CAAP,CAmBVC,UAnBU,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\tPanelBody,\n} from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { PostSwitchToDraftButton } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport PostVisibility from '../post-visibility';\nimport PostTrash from '../post-trash';\nimport PostSchedule from '../post-schedule';\nimport PostSticky from '../post-sticky';\nimport PostAuthor from '../post-author';\nimport PostSlug from '../post-slug';\nimport PostFormat from '../post-format';\nimport PostPendingStatus from '../post-pending-status';\nimport PluginPostStatusInfo from '../plugin-post-status-info';\nimport { store as editPostStore } from '../../../store';\nimport PostTemplate from '../post-template';\nimport PostURL from '../post-url';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nfunction PostStatus( { isOpened, onTogglePanel } ) {\n\treturn (\n\t\t<PanelBody\n\t\t\tclassName=\"edit-post-post-status\"\n\t\t\ttitle={ __( 'Summary' ) }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ onTogglePanel }\n\t\t>\n\t\t\t<PluginPostStatusInfo.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PostVisibility />\n\t\t\t\t\t\t<PostSchedule />\n\t\t\t\t\t\t<PostTemplate />\n\t\t\t\t\t\t<PostURL />\n\t\t\t\t\t\t<PostSticky />\n\t\t\t\t\t\t<PostPendingStatus />\n\t\t\t\t\t\t<PostFormat />\n\t\t\t\t\t\t<PostSlug />\n\t\t\t\t\t\t<PostAuthor />\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tmarginTop: '16px',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostSwitchToDraftButton />\n\t\t\t\t\t\t\t<PostTrash />\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostStatusInfo.Slot>\n\t\t</PanelBody>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\t// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do\n\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\tconst { isEditorPanelRemoved, isEditorPanelOpened } =\n\t\t\tselect( editPostStore );\n\t\treturn {\n\t\t\tisRemoved: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t} ),\n\tifCondition( ( { isRemoved } ) => ! isRemoved ),\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] )( PostStatus );\n"]}
@@ -12,22 +12,18 @@ import { withSelect, withDispatch } from '@wordpress/data';
12
12
 
13
13
  import { store as editPostStore } from '../../../store';
14
14
 
15
- function TaxonomyPanel(_ref) {
16
- var _taxonomy$labels;
17
-
18
- let {
19
- isEnabled,
20
- taxonomy,
21
- isOpened,
22
- onTogglePanel,
23
- children
24
- } = _ref;
25
-
15
+ function TaxonomyPanel({
16
+ isEnabled,
17
+ taxonomy,
18
+ isOpened,
19
+ onTogglePanel,
20
+ children
21
+ }) {
26
22
  if (!isEnabled) {
27
23
  return null;
28
24
  }
29
25
 
30
- const taxonomyMenuName = taxonomy === null || taxonomy === void 0 ? void 0 : (_taxonomy$labels = taxonomy.labels) === null || _taxonomy$labels === void 0 ? void 0 : _taxonomy$labels.menu_name;
26
+ const taxonomyMenuName = taxonomy?.labels?.menu_name;
31
27
 
32
28
  if (!taxonomyMenuName) {
33
29
  return null;
@@ -41,9 +37,7 @@ function TaxonomyPanel(_ref) {
41
37
  }
42
38
 
43
39
  export default compose(withSelect((select, ownProps) => {
44
- var _ownProps$taxonomy;
45
-
46
- const slug = (_ownProps$taxonomy = ownProps.taxonomy) === null || _ownProps$taxonomy === void 0 ? void 0 : _ownProps$taxonomy.slug;
40
+ const slug = ownProps.taxonomy?.slug;
47
41
  const panelName = slug ? `taxonomy-panel-${slug}` : '';
48
42
  return {
49
43
  panelName,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-taxonomies/taxonomy-panel.js"],"names":["compose","PanelBody","withSelect","withDispatch","store","editPostStore","TaxonomyPanel","isEnabled","taxonomy","isOpened","onTogglePanel","children","taxonomyMenuName","labels","menu_name","select","ownProps","slug","panelName","isEditorPanelEnabled","isEditorPanelOpened","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;;AAEA,SAASC,aAAT,OAMI;AAAA;;AAAA,MANoB;AACvBC,IAAAA,SADuB;AAEvBC,IAAAA,QAFuB;AAGvBC,IAAAA,QAHuB;AAIvBC,IAAAA,aAJuB;AAKvBC,IAAAA;AALuB,GAMpB;;AACH,MAAK,CAAEJ,SAAP,EAAmB;AAClB,WAAO,IAAP;AACA;;AAED,QAAMK,gBAAgB,GAAGJ,QAAH,aAAGA,QAAH,2CAAGA,QAAQ,CAAEK,MAAb,qDAAG,iBAAkBC,SAA3C;;AACA,MAAK,CAAEF,gBAAP,EAA0B;AACzB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGA,gBADT;AAEC,IAAA,MAAM,EAAGH,QAFV;AAGC,IAAA,QAAQ,EAAGC;AAHZ,KAKGC,QALH,CADD;AASA;;AAED,eAAeX,OAAO,CACrBE,UAAU,CAAE,CAAEa,MAAF,EAAUC,QAAV,KAAwB;AAAA;;AACnC,QAAMC,IAAI,yBAAGD,QAAQ,CAACR,QAAZ,uDAAG,mBAAmBS,IAAhC;AACA,QAAMC,SAAS,GAAGD,IAAI,GAAI,kBAAkBA,IAAM,EAA5B,GAAgC,EAAtD;AACA,SAAO;AACNC,IAAAA,SADM;AAENX,IAAAA,SAAS,EAAEU,IAAI,GACZF,MAAM,CAAEV,aAAF,CAAN,CAAwBc,oBAAxB,CAA8CD,SAA9C,CADY,GAEZ,KAJG;AAKNT,IAAAA,QAAQ,EAAEQ,IAAI,GACXF,MAAM,CAAEV,aAAF,CAAN,CAAwBe,mBAAxB,CAA6CF,SAA7C,CADW,GAEX;AAPG,GAAP;AASA,CAZS,CADW,EAcrBf,YAAY,CAAE,CAAEkB,QAAF,EAAYL,QAAZ,MAA4B;AACzCN,EAAAA,aAAa,EAAE,MAAM;AACpBW,IAAAA,QAAQ,CAAEhB,aAAF,CAAR,CAA0BiB,uBAA1B,CACCN,QAAQ,CAACE,SADV;AAGA;AALwC,CAA5B,CAAF,CAdS,CAAP,CAqBZZ,aArBY,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { PanelBody } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\nfunction TaxonomyPanel( {\n\tisEnabled,\n\ttaxonomy,\n\tisOpened,\n\tonTogglePanel,\n\tchildren,\n} ) {\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst taxonomyMenuName = taxonomy?.labels?.menu_name;\n\tif ( ! taxonomyMenuName ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ taxonomyMenuName }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ onTogglePanel }\n\t\t>\n\t\t\t{ children }\n\t\t</PanelBody>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select, ownProps ) => {\n\t\tconst slug = ownProps.taxonomy?.slug;\n\t\tconst panelName = slug ? `taxonomy-panel-${ slug }` : '';\n\t\treturn {\n\t\t\tpanelName,\n\t\t\tisEnabled: slug\n\t\t\t\t? select( editPostStore ).isEditorPanelEnabled( panelName )\n\t\t\t\t: false,\n\t\t\tisOpened: slug\n\t\t\t\t? select( editPostStore ).isEditorPanelOpened( panelName )\n\t\t\t\t: false,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => ( {\n\t\tonTogglePanel: () => {\n\t\t\tdispatch( editPostStore ).toggleEditorPanelOpened(\n\t\t\t\townProps.panelName\n\t\t\t);\n\t\t},\n\t} ) )\n)( TaxonomyPanel );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/post-taxonomies/taxonomy-panel.js"],"names":["compose","PanelBody","withSelect","withDispatch","store","editPostStore","TaxonomyPanel","isEnabled","taxonomy","isOpened","onTogglePanel","children","taxonomyMenuName","labels","menu_name","select","ownProps","slug","panelName","isEditorPanelEnabled","isEditorPanelOpened","dispatch","toggleEditorPanelOpened"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;;AAEA,SAASC,aAAT,CAAwB;AACvBC,EAAAA,SADuB;AAEvBC,EAAAA,QAFuB;AAGvBC,EAAAA,QAHuB;AAIvBC,EAAAA,aAJuB;AAKvBC,EAAAA;AALuB,CAAxB,EAMI;AACH,MAAK,CAAEJ,SAAP,EAAmB;AAClB,WAAO,IAAP;AACA;;AAED,QAAMK,gBAAgB,GAAGJ,QAAQ,EAAEK,MAAV,EAAkBC,SAA3C;;AACA,MAAK,CAAEF,gBAAP,EAA0B;AACzB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGA,gBADT;AAEC,IAAA,MAAM,EAAGH,QAFV;AAGC,IAAA,QAAQ,EAAGC;AAHZ,KAKGC,QALH,CADD;AASA;;AAED,eAAeX,OAAO,CACrBE,UAAU,CAAE,CAAEa,MAAF,EAAUC,QAAV,KAAwB;AACnC,QAAMC,IAAI,GAAGD,QAAQ,CAACR,QAAT,EAAmBS,IAAhC;AACA,QAAMC,SAAS,GAAGD,IAAI,GAAI,kBAAkBA,IAAM,EAA5B,GAAgC,EAAtD;AACA,SAAO;AACNC,IAAAA,SADM;AAENX,IAAAA,SAAS,EAAEU,IAAI,GACZF,MAAM,CAAEV,aAAF,CAAN,CAAwBc,oBAAxB,CAA8CD,SAA9C,CADY,GAEZ,KAJG;AAKNT,IAAAA,QAAQ,EAAEQ,IAAI,GACXF,MAAM,CAAEV,aAAF,CAAN,CAAwBe,mBAAxB,CAA6CF,SAA7C,CADW,GAEX;AAPG,GAAP;AASA,CAZS,CADW,EAcrBf,YAAY,CAAE,CAAEkB,QAAF,EAAYL,QAAZ,MAA4B;AACzCN,EAAAA,aAAa,EAAE,MAAM;AACpBW,IAAAA,QAAQ,CAAEhB,aAAF,CAAR,CAA0BiB,uBAA1B,CACCN,QAAQ,CAACE,SADV;AAGA;AALwC,CAA5B,CAAF,CAdS,CAAP,CAqBZZ,aArBY,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { PanelBody } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\nfunction TaxonomyPanel( {\n\tisEnabled,\n\ttaxonomy,\n\tisOpened,\n\tonTogglePanel,\n\tchildren,\n} ) {\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst taxonomyMenuName = taxonomy?.labels?.menu_name;\n\tif ( ! taxonomyMenuName ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ taxonomyMenuName }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ onTogglePanel }\n\t\t>\n\t\t\t{ children }\n\t\t</PanelBody>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select, ownProps ) => {\n\t\tconst slug = ownProps.taxonomy?.slug;\n\t\tconst panelName = slug ? `taxonomy-panel-${ slug }` : '';\n\t\treturn {\n\t\t\tpanelName,\n\t\t\tisEnabled: slug\n\t\t\t\t? select( editPostStore ).isEditorPanelEnabled( panelName )\n\t\t\t\t: false,\n\t\t\tisOpened: slug\n\t\t\t\t? select( editPostStore ).isEditorPanelOpened( panelName )\n\t\t\t\t: false,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => ( {\n\t\tonTogglePanel: () => {\n\t\t\tdispatch( editPostStore ).toggleEditorPanelOpened(\n\t\t\t\townProps.panelName\n\t\t\t);\n\t\t},\n\t} ) )\n)( TaxonomyPanel );\n"]}
@@ -18,10 +18,9 @@ import { store as editPostStore } from '../../../store';
18
18
 
19
19
  const DEFAULT_TITLE = __('Custom Template');
20
20
 
21
- export default function PostTemplateCreateModal(_ref) {
22
- let {
23
- onClose
24
- } = _ref;
21
+ export default function PostTemplateCreateModal({
22
+ onClose
23
+ }) {
25
24
  const defaultBlockTemplate = useSelect(select => select(editorStore).getEditorSettings().defaultBlockTemplate, []);
26
25
  const {
27
26
  __unstableCreateTemplate,