@wordpress/edit-site 6.11.0 → 6.12.1-next.082ed6819.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/add-new-template/utils.js +1 -2
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +0 -5
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/use-editor-iframe-props.js +6 -8
- package/build/components/block-editor/use-editor-iframe-props.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js +4 -12
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/editor/index.js +23 -27
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor/use-editor-title.js +37 -12
- package/build/components/editor/use-editor-title.js.map +1 -1
- package/build/components/editor/use-resolve-edited-entity.js +133 -0
- package/build/components/editor/use-resolve-edited-entity.js.map +1 -0
- package/build/components/editor-canvas-container/index.js +1 -1
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +8 -10
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/screen-block.js +18 -5
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +24 -22
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +11 -5
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/shadows-edit-panel.js +2 -3
- package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build/components/global-styles/ui.js +42 -2
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles-renderer/index.js +6 -8
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/global-styles-sidebar/index.js +17 -1
- package/build/components/global-styles-sidebar/index.js.map +1 -1
- package/build/components/layout/hooks.js +1 -10
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +1 -0
- package/build/components/layout/index.js.map +1 -1
- package/build/components/page-patterns/fields.js +3 -7
- package/build/components/page-patterns/fields.js.map +1 -1
- package/build/components/page-patterns/header.js +2 -2
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +4 -8
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/fields.js +1 -2
- package/build/components/page-templates/fields.js.map +1 -1
- package/build/components/post-edit/index.js +15 -11
- package/build/components/post-edit/index.js.map +1 -1
- package/build/components/post-list/index.js +13 -3
- package/build/components/post-list/index.js.map +1 -1
- package/build/components/posts-app/index.js +3 -4
- package/build/components/posts-app/index.js.map +1 -1
- package/build/components/posts-app-routes/home.js +48 -0
- package/build/components/posts-app-routes/home.js.map +1 -0
- package/build/components/posts-app-routes/index.js +37 -0
- package/build/components/posts-app-routes/index.js.map +1 -0
- package/build/components/posts-app-routes/posts-edit.js +44 -0
- package/build/components/posts-app-routes/posts-edit.js.map +1 -0
- package/build/components/posts-app-routes/posts-list-view-quick-edit.js +63 -0
- package/build/components/posts-app-routes/posts-list-view-quick-edit.js.map +1 -0
- package/build/components/posts-app-routes/posts-list-view.js +48 -0
- package/build/components/posts-app-routes/posts-list-view.js.map +1 -0
- package/build/components/posts-app-routes/posts-view-quick-edit.js +60 -0
- package/build/components/posts-app-routes/posts-view-quick-edit.js.map +1 -0
- package/build/components/posts-app-routes/posts-view.js +41 -0
- package/build/components/posts-app-routes/posts-view.js.map +1 -0
- package/build/components/sidebar/index.js +11 -3
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-global-styles-wrapper/index.js +129 -0
- package/build/components/sidebar-global-styles-wrapper/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-footer/index.js +17 -23
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +18 -90
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +43 -42
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +2 -3
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build/components/site-editor-routes/index.js +1 -2
- package/build/components/site-editor-routes/index.js.map +1 -1
- package/build/components/site-editor-routes/styles-view.js +8 -2
- package/build/components/site-editor-routes/styles-view.js.map +1 -1
- package/build/components/site-hub/index.js +19 -6
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/style-book/constants.js +10 -3
- package/build/components/style-book/constants.js.map +1 -1
- package/build/components/style-book/examples.js +94 -2
- package/build/components/style-book/examples.js.map +1 -1
- package/build/components/style-book/index.js +70 -11
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/welcome-guide/index.js +4 -2
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/page.js +1 -9
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/components/welcome-guide/template.js +1 -12
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +15 -15
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/index.js +1 -9
- package/build/index.js.map +1 -1
- package/build/posts.js +1 -0
- package/build/posts.js.map +1 -1
- package/build/store/actions.js +13 -0
- package/build/store/actions.js.map +1 -1
- package/build/store/selectors.js +21 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +1 -2
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +0 -5
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/use-editor-iframe-props.js +6 -8
- package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +4 -12
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/editor/index.js +23 -27
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor/use-editor-title.js +37 -12
- package/build-module/components/editor/use-editor-title.js.map +1 -1
- package/build-module/components/editor/use-resolve-edited-entity.js +125 -0
- package/build-module/components/editor/use-resolve-edited-entity.js.map +1 -0
- package/build-module/components/editor-canvas-container/index.js +1 -1
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +8 -10
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +18 -5
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +25 -23
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +11 -5
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/shadows-edit-panel.js +2 -3
- package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build-module/components/global-styles/ui.js +42 -2
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js +6 -8
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/global-styles-sidebar/index.js +18 -2
- package/build-module/components/global-styles-sidebar/index.js.map +1 -1
- package/build-module/components/layout/hooks.js +1 -9
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +1 -0
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/page-patterns/fields.js +4 -8
- package/build-module/components/page-patterns/fields.js.map +1 -1
- package/build-module/components/page-patterns/header.js +2 -2
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +4 -8
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/fields.js +1 -2
- package/build-module/components/page-templates/fields.js.map +1 -1
- package/build-module/components/post-edit/index.js +14 -10
- package/build-module/components/post-edit/index.js.map +1 -1
- package/build-module/components/post-list/index.js +13 -3
- package/build-module/components/post-list/index.js.map +1 -1
- package/build-module/components/posts-app/index.js +3 -4
- package/build-module/components/posts-app/index.js.map +1 -1
- package/build-module/components/posts-app-routes/home.js +40 -0
- package/build-module/components/posts-app-routes/home.js.map +1 -0
- package/build-module/components/posts-app-routes/index.js +30 -0
- package/build-module/components/posts-app-routes/index.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-edit.js +36 -0
- package/build-module/components/posts-app-routes/posts-edit.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-list-view-quick-edit.js +55 -0
- package/build-module/components/posts-app-routes/posts-list-view-quick-edit.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-list-view.js +40 -0
- package/build-module/components/posts-app-routes/posts-list-view.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-view-quick-edit.js +52 -0
- package/build-module/components/posts-app-routes/posts-view-quick-edit.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-view.js +33 -0
- package/build-module/components/posts-app-routes/posts-view.js.map +1 -0
- package/build-module/components/sidebar/index.js +11 -3
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-global-styles-wrapper/index.js +121 -0
- package/build-module/components/sidebar-global-styles-wrapper/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +20 -26
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +19 -91
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +43 -43
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +3 -4
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build-module/components/site-editor-routes/index.js +1 -2
- package/build-module/components/site-editor-routes/index.js.map +1 -1
- package/build-module/components/site-editor-routes/styles-view.js +8 -2
- package/build-module/components/site-editor-routes/styles-view.js.map +1 -1
- package/build-module/components/site-hub/index.js +19 -6
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/style-book/constants.js +10 -3
- package/build-module/components/style-book/constants.js.map +1 -1
- package/build-module/components/style-book/examples.js +94 -2
- package/build-module/components/style-book/examples.js.map +1 -1
- package/build-module/components/style-book/index.js +71 -12
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +4 -2
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js +1 -9
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +1 -11
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +15 -15
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/index.js +2 -10
- package/build-module/index.js.map +1 -1
- package/build-module/posts.js +1 -0
- package/build-module/posts.js.map +1 -1
- package/build-module/store/actions.js +13 -0
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/selectors.js +21 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/posts-rtl.css +106 -16
- package/build-style/posts.css +106 -16
- package/build-style/style-rtl.css +176 -78
- package/build-style/style.css +176 -78
- package/package.json +39 -40
- package/src/components/add-new-template/utils.js +2 -2
- package/src/components/app/index.js +0 -5
- package/src/components/block-editor/use-editor-iframe-props.js +2 -3
- package/src/components/block-editor/use-site-editor-settings.js +7 -21
- package/src/components/editor/index.js +31 -30
- package/src/components/editor/use-editor-title.js +50 -13
- package/src/components/editor/use-resolve-edited-entity.js +132 -0
- package/src/components/editor-canvas-container/index.js +1 -1
- package/src/components/editor-canvas-container/style.scss +0 -1
- package/src/components/global-styles/block-preview-panel.js +10 -10
- package/src/components/global-styles/screen-block.js +26 -8
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +28 -31
- package/src/components/global-styles/screen-revisions/style.scss +11 -17
- package/src/components/global-styles/screen-style-variations.js +14 -5
- package/src/components/global-styles/shadows-edit-panel.js +4 -2
- package/src/components/global-styles/ui.js +41 -1
- package/src/components/global-styles-renderer/index.js +4 -10
- package/src/components/global-styles-sidebar/index.js +16 -2
- package/src/components/layout/hooks.js +1 -7
- package/src/components/layout/index.js +6 -1
- package/src/components/page-patterns/fields.js +6 -12
- package/src/components/page-patterns/header.js +3 -2
- package/src/components/page-patterns/style.scss +0 -5
- package/src/components/page-patterns/use-patterns.js +9 -7
- package/src/components/page-templates/fields.js +2 -3
- package/src/components/page-templates/style.scss +1 -0
- package/src/components/post-edit/index.js +37 -32
- package/src/components/post-edit/style.scss +7 -0
- package/src/components/post-list/index.js +10 -5
- package/src/components/post-list/style.scss +29 -3
- package/src/components/posts-app/index.js +3 -4
- package/src/components/posts-app-routes/home.js +36 -0
- package/src/components/posts-app-routes/index.js +36 -0
- package/src/components/posts-app-routes/posts-edit.js +31 -0
- package/src/components/posts-app-routes/posts-list-view-quick-edit.js +52 -0
- package/src/components/posts-app-routes/posts-list-view.js +40 -0
- package/src/components/posts-app-routes/posts-view-quick-edit.js +49 -0
- package/src/components/posts-app-routes/posts-view.js +35 -0
- package/src/components/sidebar/index.js +23 -7
- package/src/components/sidebar-global-styles-wrapper/index.js +150 -0
- package/src/components/sidebar-global-styles-wrapper/style.scss +35 -0
- package/src/components/sidebar-navigation-item/style.scss +2 -2
- package/src/components/sidebar-navigation-screen/style.scss +7 -2
- package/src/components/sidebar-navigation-screen-details-footer/index.js +27 -38
- package/src/components/sidebar-navigation-screen-details-footer/style.scss +0 -4
- package/src/components/sidebar-navigation-screen-global-styles/index.js +19 -103
- package/src/components/sidebar-navigation-screen-main/index.js +46 -45
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +8 -0
- package/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
- package/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +4 -4
- package/src/components/site-editor-routes/README.md +2 -2
- package/src/components/site-editor-routes/index.js +0 -2
- package/src/components/site-editor-routes/styles-view.js +11 -1
- package/src/components/site-hub/index.js +33 -16
- package/src/components/site-hub/style.scss +1 -1
- package/src/components/site-icon/style.scss +16 -0
- package/src/components/style-book/constants.ts +11 -3
- package/src/components/style-book/examples.tsx +128 -2
- package/src/components/style-book/index.js +86 -8
- package/src/components/welcome-guide/index.js +3 -3
- package/src/components/welcome-guide/page.js +1 -7
- package/src/components/welcome-guide/template.js +1 -8
- package/src/hooks/commands/use-common-commands.js +253 -246
- package/src/index.js +2 -13
- package/src/posts.js +1 -0
- package/src/store/actions.js +15 -0
- package/src/store/selectors.js +24 -1
- package/src/style.scss +2 -5
- package/build/components/async/index.js +0 -51
- package/build/components/async/index.js.map +0 -1
- package/build/components/post-fields/index.js +0 -290
- package/build/components/post-fields/index.js.map +0 -1
- package/build/components/posts-app/router.js +0 -85
- package/build/components/posts-app/router.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/index.js +0 -54
- package/build/components/sidebar-navigation-screen-details-panel/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -21
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -33
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -21
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +0 -1
- package/build/components/site-editor-routes/styles-edit.js +0 -28
- package/build/components/site-editor-routes/styles-edit.js.map +0 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -219
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +0 -1
- package/build/components/use-edited-entity-record/index.js +0 -60
- package/build/components/use-edited-entity-record/index.js.map +0 -1
- package/build/hooks/commands/use-edit-mode-commands.js +0 -179
- package/build/hooks/commands/use-edit-mode-commands.js.map +0 -1
- package/build-module/components/async/index.js +0 -44
- package/build-module/components/async/index.js.map +0 -1
- package/build-module/components/post-fields/index.js +0 -283
- package/build-module/components/post-fields/index.js.map +0 -1
- package/build-module/components/posts-app/router.js +0 -77
- package/build-module/components/posts-app/router.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js +0 -29
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -14
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -25
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -14
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +0 -1
- package/build-module/components/site-editor-routes/styles-edit.js +0 -20
- package/build-module/components/site-editor-routes/styles-edit.js.map +0 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -212
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +0 -1
- package/build-module/components/use-edited-entity-record/index.js +0 -53
- package/build-module/components/use-edited-entity-record/index.js.map +0 -1
- package/build-module/hooks/commands/use-edit-mode-commands.js +0 -171
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +0 -1
- package/src/components/async/index.js +0 -43
- package/src/components/post-fields/index.js +0 -361
- package/src/components/post-fields/style.scss +0 -3
- package/src/components/posts-app/router.js +0 -69
- package/src/components/sidebar-navigation-screen-details-panel/index.js +0 -40
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -14
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -31
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -14
- package/src/components/sidebar-navigation-screen-details-panel/style.scss +0 -26
- package/src/components/site-editor-routes/styles-edit.js +0 -17
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -267
- package/src/components/use-edited-entity-record/index.js +0 -58
- package/src/hooks/commands/use-edit-mode-commands.js +0 -168
- package/src/store/test/actions.js +0 -83
- package/src/store/test/reducer.js +0 -69
- package/src/store/test/selectors.js +0 -41
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { useEffect, useState, flushSync } from '@wordpress/element';
|
|
5
|
-
import { createQueue } from '@wordpress/priority-queue';
|
|
6
|
-
const blockPreviewQueue = createQueue();
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Renders a component at the next idle time.
|
|
10
|
-
* @param {*} props
|
|
11
|
-
*/
|
|
12
|
-
export function Async({
|
|
13
|
-
children,
|
|
14
|
-
placeholder
|
|
15
|
-
}) {
|
|
16
|
-
const [shouldRender, setShouldRender] = useState(false);
|
|
17
|
-
|
|
18
|
-
// In the future, we could try to use startTransition here, but currently
|
|
19
|
-
// react will batch all transitions, which means all previews will be
|
|
20
|
-
// rendered at the same time.
|
|
21
|
-
// https://react.dev/reference/react/startTransition#caveats
|
|
22
|
-
// > If there are multiple ongoing Transitions, React currently batches them
|
|
23
|
-
// > together. This is a limitation that will likely be removed in a future
|
|
24
|
-
// > release.
|
|
25
|
-
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
const context = {};
|
|
28
|
-
blockPreviewQueue.add(context, () => {
|
|
29
|
-
// Synchronously run all renders so it consumes timeRemaining.
|
|
30
|
-
// See https://github.com/WordPress/gutenberg/pull/48238
|
|
31
|
-
flushSync(() => {
|
|
32
|
-
setShouldRender(true);
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
return () => {
|
|
36
|
-
blockPreviewQueue.cancel(context);
|
|
37
|
-
};
|
|
38
|
-
}, []);
|
|
39
|
-
if (!shouldRender) {
|
|
40
|
-
return placeholder;
|
|
41
|
-
}
|
|
42
|
-
return children;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","flushSync","createQueue","blockPreviewQueue","Async","children","placeholder","shouldRender","setShouldRender","context","add","cancel"],"sources":["@wordpress/edit-site/src/components/async/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useState, flushSync } from '@wordpress/element';\nimport { createQueue } from '@wordpress/priority-queue';\n\nconst blockPreviewQueue = createQueue();\n\n/**\n * Renders a component at the next idle time.\n * @param {*} props\n */\nexport function Async( { children, placeholder } ) {\n\tconst [ shouldRender, setShouldRender ] = useState( false );\n\n\t// In the future, we could try to use startTransition here, but currently\n\t// react will batch all transitions, which means all previews will be\n\t// rendered at the same time.\n\t// https://react.dev/reference/react/startTransition#caveats\n\t// > If there are multiple ongoing Transitions, React currently batches them\n\t// > together. This is a limitation that will likely be removed in a future\n\t// > release.\n\n\tuseEffect( () => {\n\t\tconst context = {};\n\t\tblockPreviewQueue.add( context, () => {\n\t\t\t// Synchronously run all renders so it consumes timeRemaining.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/48238\n\t\t\tflushSync( () => {\n\t\t\t\tsetShouldRender( true );\n\t\t\t} );\n\t\t} );\n\t\treturn () => {\n\t\t\tblockPreviewQueue.cancel( context );\n\t\t};\n\t}, [] );\n\n\tif ( ! shouldRender ) {\n\t\treturn placeholder;\n\t}\n\n\treturn children;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACnE,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,MAAMC,iBAAiB,GAAGD,WAAW,CAAC,CAAC;;AAEvC;AACA;AACA;AACA;AACA,OAAO,SAASE,KAAKA,CAAE;EAAEC,QAAQ;EAAEC;AAAY,CAAC,EAAG;EAClD,MAAM,CAAEC,YAAY,EAAEC,eAAe,CAAE,GAAGR,QAAQ,CAAE,KAAM,CAAC;;EAE3D;EACA;EACA;EACA;EACA;EACA;EACA;;EAEAD,SAAS,CAAE,MAAM;IAChB,MAAMU,OAAO,GAAG,CAAC,CAAC;IAClBN,iBAAiB,CAACO,GAAG,CAAED,OAAO,EAAE,MAAM;MACrC;MACA;MACAR,SAAS,CAAE,MAAM;QAChBO,eAAe,CAAE,IAAK,CAAC;MACxB,CAAE,CAAC;IACJ,CAAE,CAAC;IACH,OAAO,MAAM;MACZL,iBAAiB,CAACQ,MAAM,CAAEF,OAAQ,CAAC;IACpC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEF,YAAY,EAAG;IACrB,OAAOD,WAAW;EACnB;EAEA,OAAOD,QAAQ;AAChB","ignoreList":[]}
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
10
|
-
import { decodeEntities } from '@wordpress/html-entities';
|
|
11
|
-
import { featuredImageField, slugField, parentField } from '@wordpress/fields';
|
|
12
|
-
import { createInterpolateElement, useMemo, useState } from '@wordpress/element';
|
|
13
|
-
import { dateI18n, getDate, getSettings } from '@wordpress/date';
|
|
14
|
-
import { trash, drafts, published, scheduled, pending, notAllowed, commentAuthorAvatar as authorIcon } from '@wordpress/icons';
|
|
15
|
-
import { __experimentalHStack as HStack, Icon } from '@wordpress/components';
|
|
16
|
-
import { useSelect } from '@wordpress/data';
|
|
17
|
-
import { useEntityRecords, store as coreStore } from '@wordpress/core-data';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Internal dependencies
|
|
21
|
-
*/
|
|
22
|
-
import { LAYOUT_GRID, LAYOUT_TABLE, OPERATOR_IS_ANY } from '../../utils/constants';
|
|
23
|
-
import { default as Link } from '../routes/link';
|
|
24
|
-
|
|
25
|
-
// See https://github.com/WordPress/gutenberg/issues/55886
|
|
26
|
-
// We do not support custom statutes at the moment.
|
|
27
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
-
const STATUSES = [{
|
|
29
|
-
value: 'draft',
|
|
30
|
-
label: __('Draft'),
|
|
31
|
-
icon: drafts,
|
|
32
|
-
description: __('Not ready to publish.')
|
|
33
|
-
}, {
|
|
34
|
-
value: 'future',
|
|
35
|
-
label: __('Scheduled'),
|
|
36
|
-
icon: scheduled,
|
|
37
|
-
description: __('Publish automatically on a chosen date.')
|
|
38
|
-
}, {
|
|
39
|
-
value: 'pending',
|
|
40
|
-
label: __('Pending Review'),
|
|
41
|
-
icon: pending,
|
|
42
|
-
description: __('Waiting for review before publishing.')
|
|
43
|
-
}, {
|
|
44
|
-
value: 'private',
|
|
45
|
-
label: __('Private'),
|
|
46
|
-
icon: notAllowed,
|
|
47
|
-
description: __('Only visible to site admins and editors.')
|
|
48
|
-
}, {
|
|
49
|
-
value: 'publish',
|
|
50
|
-
label: __('Published'),
|
|
51
|
-
icon: published,
|
|
52
|
-
description: __('Visible to everyone.')
|
|
53
|
-
}, {
|
|
54
|
-
value: 'trash',
|
|
55
|
-
label: __('Trash'),
|
|
56
|
-
icon: trash
|
|
57
|
-
}];
|
|
58
|
-
const getFormattedDate = dateToDisplay => dateI18n(getSettings().formats.datetimeAbbreviated, getDate(dateToDisplay));
|
|
59
|
-
function PostStatusField({
|
|
60
|
-
item
|
|
61
|
-
}) {
|
|
62
|
-
const status = STATUSES.find(({
|
|
63
|
-
value
|
|
64
|
-
}) => value === item.status);
|
|
65
|
-
const label = status?.label || item.status;
|
|
66
|
-
const icon = status?.icon;
|
|
67
|
-
return /*#__PURE__*/_jsxs(HStack, {
|
|
68
|
-
alignment: "left",
|
|
69
|
-
spacing: 0,
|
|
70
|
-
children: [icon && /*#__PURE__*/_jsx("div", {
|
|
71
|
-
className: "edit-site-post-list__status-icon",
|
|
72
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
73
|
-
icon: icon
|
|
74
|
-
})
|
|
75
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
76
|
-
children: label
|
|
77
|
-
})]
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
function PostAuthorField({
|
|
81
|
-
item
|
|
82
|
-
}) {
|
|
83
|
-
const {
|
|
84
|
-
text,
|
|
85
|
-
imageUrl
|
|
86
|
-
} = useSelect(select => {
|
|
87
|
-
const {
|
|
88
|
-
getUser
|
|
89
|
-
} = select(coreStore);
|
|
90
|
-
const user = getUser(item.author);
|
|
91
|
-
return {
|
|
92
|
-
imageUrl: user?.avatar_urls?.[48],
|
|
93
|
-
text: user?.name
|
|
94
|
-
};
|
|
95
|
-
}, [item]);
|
|
96
|
-
const [isImageLoaded, setIsImageLoaded] = useState(false);
|
|
97
|
-
return /*#__PURE__*/_jsxs(HStack, {
|
|
98
|
-
alignment: "left",
|
|
99
|
-
spacing: 0,
|
|
100
|
-
children: [!!imageUrl && /*#__PURE__*/_jsx("div", {
|
|
101
|
-
className: clsx('page-templates-author-field__avatar', {
|
|
102
|
-
'is-loaded': isImageLoaded
|
|
103
|
-
}),
|
|
104
|
-
children: /*#__PURE__*/_jsx("img", {
|
|
105
|
-
onLoad: () => setIsImageLoaded(true),
|
|
106
|
-
alt: __('Author avatar'),
|
|
107
|
-
src: imageUrl
|
|
108
|
-
})
|
|
109
|
-
}), !imageUrl && /*#__PURE__*/_jsx("div", {
|
|
110
|
-
className: "page-templates-author-field__icon",
|
|
111
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
112
|
-
icon: authorIcon
|
|
113
|
-
})
|
|
114
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
115
|
-
className: "page-templates-author-field__name",
|
|
116
|
-
children: text
|
|
117
|
-
})]
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function usePostFields(viewType) {
|
|
121
|
-
const {
|
|
122
|
-
records: authors,
|
|
123
|
-
isResolving: isLoadingAuthors
|
|
124
|
-
} = useEntityRecords('root', 'user', {
|
|
125
|
-
per_page: -1
|
|
126
|
-
});
|
|
127
|
-
const {
|
|
128
|
-
frontPageId,
|
|
129
|
-
postsPageId
|
|
130
|
-
} = useSelect(select => {
|
|
131
|
-
const {
|
|
132
|
-
getEntityRecord
|
|
133
|
-
} = select(coreStore);
|
|
134
|
-
const siteSettings = getEntityRecord('root', 'site');
|
|
135
|
-
return {
|
|
136
|
-
frontPageId: siteSettings?.page_on_front,
|
|
137
|
-
postsPageId: siteSettings?.page_for_posts
|
|
138
|
-
};
|
|
139
|
-
}, []);
|
|
140
|
-
const fields = useMemo(() => [featuredImageField, {
|
|
141
|
-
label: __('Title'),
|
|
142
|
-
id: 'title',
|
|
143
|
-
type: 'text',
|
|
144
|
-
getValue: ({
|
|
145
|
-
item
|
|
146
|
-
}) => typeof item.title === 'string' ? item.title : item.title?.raw,
|
|
147
|
-
render: ({
|
|
148
|
-
item
|
|
149
|
-
}) => {
|
|
150
|
-
const addLink = [LAYOUT_TABLE, LAYOUT_GRID].includes(viewType) && item.status !== 'trash';
|
|
151
|
-
const renderedTitle = typeof item.title === 'string' ? item.title : item.title?.rendered;
|
|
152
|
-
const title = addLink ? /*#__PURE__*/_jsx(Link, {
|
|
153
|
-
params: {
|
|
154
|
-
postId: item.id,
|
|
155
|
-
postType: item.type,
|
|
156
|
-
canvas: 'edit'
|
|
157
|
-
},
|
|
158
|
-
children: decodeEntities(renderedTitle) || __('(no title)')
|
|
159
|
-
}) : /*#__PURE__*/_jsx("span", {
|
|
160
|
-
children: decodeEntities(renderedTitle) || __('(no title)')
|
|
161
|
-
});
|
|
162
|
-
let suffix = '';
|
|
163
|
-
if (item.id === frontPageId) {
|
|
164
|
-
suffix = /*#__PURE__*/_jsx("span", {
|
|
165
|
-
className: "edit-site-post-list__title-badge",
|
|
166
|
-
children: __('Homepage')
|
|
167
|
-
});
|
|
168
|
-
} else if (item.id === postsPageId) {
|
|
169
|
-
suffix = /*#__PURE__*/_jsx("span", {
|
|
170
|
-
className: "edit-site-post-list__title-badge",
|
|
171
|
-
children: __('Posts Page')
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
return /*#__PURE__*/_jsxs(HStack, {
|
|
175
|
-
className: "edit-site-post-list__title",
|
|
176
|
-
alignment: "center",
|
|
177
|
-
justify: "flex-start",
|
|
178
|
-
children: [title, suffix]
|
|
179
|
-
});
|
|
180
|
-
},
|
|
181
|
-
enableHiding: false
|
|
182
|
-
}, {
|
|
183
|
-
label: __('Author'),
|
|
184
|
-
id: 'author',
|
|
185
|
-
type: 'integer',
|
|
186
|
-
elements: authors?.map(({
|
|
187
|
-
id,
|
|
188
|
-
name
|
|
189
|
-
}) => ({
|
|
190
|
-
value: id,
|
|
191
|
-
label: name
|
|
192
|
-
})) || [],
|
|
193
|
-
render: PostAuthorField,
|
|
194
|
-
sort: (a, b, direction) => {
|
|
195
|
-
const nameA = a._embedded?.author?.[0]?.name || '';
|
|
196
|
-
const nameB = b._embedded?.author?.[0]?.name || '';
|
|
197
|
-
return direction === 'asc' ? nameA.localeCompare(nameB) : nameB.localeCompare(nameA);
|
|
198
|
-
}
|
|
199
|
-
}, {
|
|
200
|
-
label: __('Status'),
|
|
201
|
-
id: 'status',
|
|
202
|
-
type: 'text',
|
|
203
|
-
elements: STATUSES,
|
|
204
|
-
render: PostStatusField,
|
|
205
|
-
Edit: 'radio',
|
|
206
|
-
enableSorting: false,
|
|
207
|
-
filterBy: {
|
|
208
|
-
operators: [OPERATOR_IS_ANY]
|
|
209
|
-
}
|
|
210
|
-
}, {
|
|
211
|
-
label: __('Date'),
|
|
212
|
-
id: 'date',
|
|
213
|
-
type: 'datetime',
|
|
214
|
-
render: ({
|
|
215
|
-
item
|
|
216
|
-
}) => {
|
|
217
|
-
const isDraftOrPrivate = ['draft', 'private'].includes(item.status);
|
|
218
|
-
if (isDraftOrPrivate) {
|
|
219
|
-
return createInterpolateElement(sprintf(/* translators: %s: page creation or modification date. */
|
|
220
|
-
__('<span>Modified: <time>%s</time></span>'), getFormattedDate(item.date)), {
|
|
221
|
-
span: /*#__PURE__*/_jsx("span", {}),
|
|
222
|
-
time: /*#__PURE__*/_jsx("time", {})
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
const isScheduled = item.status === 'future';
|
|
226
|
-
if (isScheduled) {
|
|
227
|
-
return createInterpolateElement(sprintf(/* translators: %s: page creation date */
|
|
228
|
-
__('<span>Scheduled: <time>%s</time></span>'), getFormattedDate(item.date)), {
|
|
229
|
-
span: /*#__PURE__*/_jsx("span", {}),
|
|
230
|
-
time: /*#__PURE__*/_jsx("time", {})
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
const isPublished = item.status === 'publish';
|
|
234
|
-
if (isPublished) {
|
|
235
|
-
return createInterpolateElement(sprintf(/* translators: %s: page creation time */
|
|
236
|
-
__('<span>Published: <time>%s</time></span>'), getFormattedDate(item.date)), {
|
|
237
|
-
span: /*#__PURE__*/_jsx("span", {}),
|
|
238
|
-
time: /*#__PURE__*/_jsx("time", {})
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
// Pending posts show the modified date if it's newer.
|
|
243
|
-
const dateToDisplay = getDate(item.modified) > getDate(item.date) ? item.modified : item.date;
|
|
244
|
-
const isPending = item.status === 'pending';
|
|
245
|
-
if (isPending) {
|
|
246
|
-
return createInterpolateElement(sprintf(/* translators: %s: page creation or modification date. */
|
|
247
|
-
__('<span>Modified: <time>%s</time></span>'), getFormattedDate(dateToDisplay)), {
|
|
248
|
-
span: /*#__PURE__*/_jsx("span", {}),
|
|
249
|
-
time: /*#__PURE__*/_jsx("time", {})
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
// Unknow status.
|
|
254
|
-
return /*#__PURE__*/_jsx("time", {
|
|
255
|
-
children: getFormattedDate(item.date)
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
}, slugField, parentField, {
|
|
259
|
-
id: 'comment_status',
|
|
260
|
-
label: __('Discussion'),
|
|
261
|
-
type: 'text',
|
|
262
|
-
Edit: 'radio',
|
|
263
|
-
enableSorting: false,
|
|
264
|
-
filterBy: {
|
|
265
|
-
operators: []
|
|
266
|
-
},
|
|
267
|
-
elements: [{
|
|
268
|
-
value: 'open',
|
|
269
|
-
label: __('Open'),
|
|
270
|
-
description: __('Visitors can add new comments and replies.')
|
|
271
|
-
}, {
|
|
272
|
-
value: 'closed',
|
|
273
|
-
label: __('Closed'),
|
|
274
|
-
description: __('Visitors cannot add new comments or replies. Existing comments remain visible.')
|
|
275
|
-
}]
|
|
276
|
-
}], [authors, viewType, frontPageId, postsPageId]);
|
|
277
|
-
return {
|
|
278
|
-
isLoading: isLoadingAuthors,
|
|
279
|
-
fields
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
export default usePostFields;
|
|
283
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","__","sprintf","decodeEntities","featuredImageField","slugField","parentField","createInterpolateElement","useMemo","useState","dateI18n","getDate","getSettings","trash","drafts","published","scheduled","pending","notAllowed","commentAuthorAvatar","authorIcon","__experimentalHStack","HStack","Icon","useSelect","useEntityRecords","store","coreStore","LAYOUT_GRID","LAYOUT_TABLE","OPERATOR_IS_ANY","default","Link","jsx","_jsx","jsxs","_jsxs","STATUSES","value","label","icon","description","getFormattedDate","dateToDisplay","formats","datetimeAbbreviated","PostStatusField","item","status","find","alignment","spacing","children","className","PostAuthorField","text","imageUrl","select","getUser","user","author","avatar_urls","name","isImageLoaded","setIsImageLoaded","onLoad","alt","src","usePostFields","viewType","records","authors","isResolving","isLoadingAuthors","per_page","frontPageId","postsPageId","getEntityRecord","siteSettings","page_on_front","page_for_posts","fields","id","type","getValue","title","raw","render","addLink","includes","renderedTitle","rendered","params","postId","postType","canvas","suffix","justify","enableHiding","elements","map","sort","a","b","direction","nameA","_embedded","nameB","localeCompare","Edit","enableSorting","filterBy","operators","isDraftOrPrivate","date","span","time","isScheduled","isPublished","modified","isPending","isLoading"],"sources":["@wordpress/edit-site/src/components/post-fields/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { featuredImageField, slugField, parentField } from '@wordpress/fields';\nimport {\n\tcreateInterpolateElement,\n\tuseMemo,\n\tuseState,\n} from '@wordpress/element';\nimport { dateI18n, getDate, getSettings } from '@wordpress/date';\nimport {\n\ttrash,\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n\tcommentAuthorAvatar as authorIcon,\n} from '@wordpress/icons';\nimport { __experimentalHStack as HStack, Icon } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tLAYOUT_GRID,\n\tLAYOUT_TABLE,\n\tOPERATOR_IS_ANY,\n} from '../../utils/constants';\nimport { default as Link } from '../routes/link';\n\n// See https://github.com/WordPress/gutenberg/issues/55886\n// We do not support custom statutes at the moment.\nconst STATUSES = [\n\t{\n\t\tvalue: 'draft',\n\t\tlabel: __( 'Draft' ),\n\t\ticon: drafts,\n\t\tdescription: __( 'Not ready to publish.' ),\n\t},\n\t{\n\t\tvalue: 'future',\n\t\tlabel: __( 'Scheduled' ),\n\t\ticon: scheduled,\n\t\tdescription: __( 'Publish automatically on a chosen date.' ),\n\t},\n\t{\n\t\tvalue: 'pending',\n\t\tlabel: __( 'Pending Review' ),\n\t\ticon: pending,\n\t\tdescription: __( 'Waiting for review before publishing.' ),\n\t},\n\t{\n\t\tvalue: 'private',\n\t\tlabel: __( 'Private' ),\n\t\ticon: notAllowed,\n\t\tdescription: __( 'Only visible to site admins and editors.' ),\n\t},\n\t{\n\t\tvalue: 'publish',\n\t\tlabel: __( 'Published' ),\n\t\ticon: published,\n\t\tdescription: __( 'Visible to everyone.' ),\n\t},\n\t{ value: 'trash', label: __( 'Trash' ), icon: trash },\n];\n\nconst getFormattedDate = ( dateToDisplay ) =>\n\tdateI18n(\n\t\tgetSettings().formats.datetimeAbbreviated,\n\t\tgetDate( dateToDisplay )\n\t);\n\nfunction PostStatusField( { item } ) {\n\tconst status = STATUSES.find( ( { value } ) => value === item.status );\n\tconst label = status?.label || item.status;\n\tconst icon = status?.icon;\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ icon && (\n\t\t\t\t<div className=\"edit-site-post-list__status-icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span>{ label }</span>\n\t\t</HStack>\n\t);\n}\n\nfunction PostAuthorField( { item } ) {\n\tconst { text, imageUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getUser } = select( coreStore );\n\t\t\tconst user = getUser( item.author );\n\t\t\treturn {\n\t\t\t\timageUrl: user?.avatar_urls?.[ 48 ],\n\t\t\t\ttext: user?.name,\n\t\t\t};\n\t\t},\n\t\t[ item ]\n\t);\n\tconst [ isImageLoaded, setIsImageLoaded ] = useState( false );\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ !! imageUrl && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx( 'page-templates-author-field__avatar', {\n\t\t\t\t\t\t'is-loaded': isImageLoaded,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tonLoad={ () => setIsImageLoaded( true ) }\n\t\t\t\t\t\talt={ __( 'Author avatar' ) }\n\t\t\t\t\t\tsrc={ imageUrl }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ ! imageUrl && (\n\t\t\t\t<div className=\"page-templates-author-field__icon\">\n\t\t\t\t\t<Icon icon={ authorIcon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span className=\"page-templates-author-field__name\">{ text }</span>\n\t\t</HStack>\n\t);\n}\n\nfunction usePostFields( viewType ) {\n\tconst { records: authors, isResolving: isLoadingAuthors } =\n\t\tuseEntityRecords( 'root', 'user', { per_page: -1 } );\n\n\tconst { frontPageId, postsPageId } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\treturn {\n\t\t\tfrontPageId: siteSettings?.page_on_front,\n\t\t\tpostsPageId: siteSettings?.page_for_posts,\n\t\t};\n\t}, [] );\n\n\tconst fields = useMemo(\n\t\t() => [\n\t\t\tfeaturedImageField,\n\t\t\t{\n\t\t\t\tlabel: __( 'Title' ),\n\t\t\t\tid: 'title',\n\t\t\t\ttype: 'text',\n\t\t\t\tgetValue: ( { item } ) =>\n\t\t\t\t\ttypeof item.title === 'string'\n\t\t\t\t\t\t? item.title\n\t\t\t\t\t\t: item.title?.raw,\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\tconst addLink =\n\t\t\t\t\t\t[ LAYOUT_TABLE, LAYOUT_GRID ].includes( viewType ) &&\n\t\t\t\t\t\titem.status !== 'trash';\n\t\t\t\t\tconst renderedTitle =\n\t\t\t\t\t\ttypeof item.title === 'string'\n\t\t\t\t\t\t\t? item.title\n\t\t\t\t\t\t\t: item.title?.rendered;\n\t\t\t\t\tconst title = addLink ? (\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\tpostId: item.id,\n\t\t\t\t\t\t\t\tpostType: item.type,\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ decodeEntities( renderedTitle ) ||\n\t\t\t\t\t\t\t\t__( '(no title)' ) }\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{ decodeEntities( renderedTitle ) ||\n\t\t\t\t\t\t\t\t__( '(no title)' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t);\n\n\t\t\t\t\tlet suffix = '';\n\t\t\t\t\tif ( item.id === frontPageId ) {\n\t\t\t\t\t\tsuffix = (\n\t\t\t\t\t\t\t<span className=\"edit-site-post-list__title-badge\">\n\t\t\t\t\t\t\t\t{ __( 'Homepage' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( item.id === postsPageId ) {\n\t\t\t\t\t\tsuffix = (\n\t\t\t\t\t\t\t<span className=\"edit-site-post-list__title-badge\">\n\t\t\t\t\t\t\t\t{ __( 'Posts Page' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tclassName=\"edit-site-post-list__title\"\n\t\t\t\t\t\t\talignment=\"center\"\n\t\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tenableHiding: false,\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Author' ),\n\t\t\t\tid: 'author',\n\t\t\t\ttype: 'integer',\n\t\t\t\telements:\n\t\t\t\t\tauthors?.map( ( { id, name } ) => ( {\n\t\t\t\t\t\tvalue: id,\n\t\t\t\t\t\tlabel: name,\n\t\t\t\t\t} ) ) || [],\n\t\t\t\trender: PostAuthorField,\n\t\t\t\tsort: ( a, b, direction ) => {\n\t\t\t\t\tconst nameA = a._embedded?.author?.[ 0 ]?.name || '';\n\t\t\t\t\tconst nameB = b._embedded?.author?.[ 0 ]?.name || '';\n\n\t\t\t\t\treturn direction === 'asc'\n\t\t\t\t\t\t? nameA.localeCompare( nameB )\n\t\t\t\t\t\t: nameB.localeCompare( nameA );\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Status' ),\n\t\t\t\tid: 'status',\n\t\t\t\ttype: 'text',\n\t\t\t\telements: STATUSES,\n\t\t\t\trender: PostStatusField,\n\t\t\t\tEdit: 'radio',\n\t\t\t\tenableSorting: false,\n\t\t\t\tfilterBy: {\n\t\t\t\t\toperators: [ OPERATOR_IS_ANY ],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Date' ),\n\t\t\t\tid: 'date',\n\t\t\t\ttype: 'datetime',\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\tconst isDraftOrPrivate = [ 'draft', 'private' ].includes(\n\t\t\t\t\t\titem.status\n\t\t\t\t\t);\n\t\t\t\t\tif ( isDraftOrPrivate ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: page creation or modification date. */\n\t\t\t\t\t\t\t\t__( '<span>Modified: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( item.date )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst isScheduled = item.status === 'future';\n\t\t\t\t\tif ( isScheduled ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: page creation date */\n\t\t\t\t\t\t\t\t__( '<span>Scheduled: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( item.date )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst isPublished = item.status === 'publish';\n\t\t\t\t\tif ( isPublished ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: page creation time */\n\t\t\t\t\t\t\t\t__( '<span>Published: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( item.date )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Pending posts show the modified date if it's newer.\n\t\t\t\t\tconst dateToDisplay =\n\t\t\t\t\t\tgetDate( item.modified ) > getDate( item.date )\n\t\t\t\t\t\t\t? item.modified\n\t\t\t\t\t\t\t: item.date;\n\n\t\t\t\t\tconst isPending = item.status === 'pending';\n\t\t\t\t\tif ( isPending ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: page creation or modification date. */\n\t\t\t\t\t\t\t\t__( '<span>Modified: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( dateToDisplay )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Unknow status.\n\t\t\t\t\treturn <time>{ getFormattedDate( item.date ) }</time>;\n\t\t\t\t},\n\t\t\t},\n\t\t\tslugField,\n\t\t\tparentField,\n\t\t\t{\n\t\t\t\tid: 'comment_status',\n\t\t\t\tlabel: __( 'Discussion' ),\n\t\t\t\ttype: 'text',\n\t\t\t\tEdit: 'radio',\n\t\t\t\tenableSorting: false,\n\t\t\t\tfilterBy: {\n\t\t\t\t\toperators: [],\n\t\t\t\t},\n\t\t\t\telements: [\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: 'open',\n\t\t\t\t\t\tlabel: __( 'Open' ),\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Visitors can add new comments and replies.'\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: 'closed',\n\t\t\t\t\t\tlabel: __( 'Closed' ),\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Visitors cannot add new comments or replies. Existing comments remain visible.'\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t\t[ authors, viewType, frontPageId, postsPageId ]\n\t);\n\n\treturn {\n\t\tisLoading: isLoadingAuthors,\n\t\tfields,\n\t};\n}\n\nexport default usePostFields;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,kBAAkB,EAAEC,SAAS,EAAEC,WAAW,QAAQ,mBAAmB;AAC9E,SACCC,wBAAwB,EACxBC,OAAO,EACPC,QAAQ,QACF,oBAA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AE,CAAE,MAAO,CAAC;MACnBwC,WAAW,EAAExC,EAAE,CACd,4CACD;IACD,CAAC,EACD;MACCqC,KAAK,EAAE,QAAQ;MACfC,KAAK,EAAEtC,EAAE,CAAE,QAAS,CAAC;MACrBwC,WAAW,EAAExC,EAAE,CACd,gFACD;IACD,CAAC;EAEH,CAAC,CACD,EACD,CAAEsE,OAAO,EAAEF,QAAQ,EAAEM,WAAW,EAAEC,WAAW,CAC9C,CAAC;EAED,OAAO;IACN6C,SAAS,EAAEhD,gBAAgB;IAC3BQ;EACD,CAAC;AACF;AAEA,eAAeb,aAAa","ignoreList":[]}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
5
|
-
import { useSelect } from '@wordpress/data';
|
|
6
|
-
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
|
-
import { unlock } from '../../lock-unlock';
|
|
12
|
-
import Editor from '../editor';
|
|
13
|
-
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
14
|
-
import SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';
|
|
15
|
-
import DataViewsSidebarContent from '../sidebar-dataviews';
|
|
16
|
-
import PostList from '../post-list';
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
const {
|
|
19
|
-
useLocation
|
|
20
|
-
} = unlock(routerPrivateApis);
|
|
21
|
-
export default function useActiveRoute() {
|
|
22
|
-
const {
|
|
23
|
-
params = {}
|
|
24
|
-
} = useLocation();
|
|
25
|
-
const {
|
|
26
|
-
postType,
|
|
27
|
-
layout,
|
|
28
|
-
canvas
|
|
29
|
-
} = params;
|
|
30
|
-
const labels = useSelect(select => {
|
|
31
|
-
return select(coreStore).getPostType(postType)?.labels;
|
|
32
|
-
}, [postType]);
|
|
33
|
-
|
|
34
|
-
// Posts list.
|
|
35
|
-
if (['post'].includes(postType)) {
|
|
36
|
-
const isListLayout = layout === 'list' || !layout;
|
|
37
|
-
return {
|
|
38
|
-
name: 'posts-list',
|
|
39
|
-
areas: {
|
|
40
|
-
sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreen, {
|
|
41
|
-
title: labels?.name,
|
|
42
|
-
isRoot: true,
|
|
43
|
-
content: /*#__PURE__*/_jsx(DataViewsSidebarContent, {})
|
|
44
|
-
}),
|
|
45
|
-
content: /*#__PURE__*/_jsx(PostList, {
|
|
46
|
-
postType: postType
|
|
47
|
-
}),
|
|
48
|
-
preview: (isListLayout || canvas === 'edit') && /*#__PURE__*/_jsx(Editor, {
|
|
49
|
-
isPostsList: true
|
|
50
|
-
}),
|
|
51
|
-
mobile: canvas === 'edit' ? /*#__PURE__*/_jsx(Editor, {
|
|
52
|
-
isPostsList: true
|
|
53
|
-
}) : /*#__PURE__*/_jsx(PostList, {
|
|
54
|
-
postType: postType
|
|
55
|
-
})
|
|
56
|
-
},
|
|
57
|
-
widths: {
|
|
58
|
-
content: isListLayout ? 380 : undefined
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Fallback shows the home page preview
|
|
64
|
-
return {
|
|
65
|
-
name: 'default',
|
|
66
|
-
areas: {
|
|
67
|
-
sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreenMain, {}),
|
|
68
|
-
preview: /*#__PURE__*/_jsx(Editor, {
|
|
69
|
-
isPostsList: true
|
|
70
|
-
}),
|
|
71
|
-
mobile: canvas === 'edit' && /*#__PURE__*/_jsx(Editor, {
|
|
72
|
-
isPostsList: true
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["privateApis","routerPrivateApis","useSelect","store","coreStore","unlock","Editor","SidebarNavigationScreen","SidebarNavigationScreenMain","DataViewsSidebarContent","PostList","jsx","_jsx","useLocation","useActiveRoute","params","postType","layout","canvas","labels","select","getPostType","includes","isListLayout","name","areas","sidebar","title","isRoot","content","preview","isPostsList","mobile","widths","undefined"],"sources":["@wordpress/edit-site/src/components/posts-app/router.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Editor from '../editor';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport PostList from '../post-list';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function useActiveRoute() {\n\tconst { params = {} } = useLocation();\n\tconst { postType, layout, canvas } = params;\n\tconst labels = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( coreStore ).getPostType( postType )?.labels;\n\t\t},\n\t\t[ postType ]\n\t);\n\n\t// Posts list.\n\tif ( [ 'post' ].includes( postType ) ) {\n\t\tconst isListLayout = layout === 'list' || ! layout;\n\t\treturn {\n\t\t\tname: 'posts-list',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\t\ttitle={ labels?.name }\n\t\t\t\t\t\tisRoot\n\t\t\t\t\t\tcontent={ <DataViewsSidebarContent /> }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tcontent: <PostList postType={ postType } />,\n\t\t\t\tpreview: ( isListLayout || canvas === 'edit' ) && (\n\t\t\t\t\t<Editor isPostsList />\n\t\t\t\t),\n\t\t\t\tmobile:\n\t\t\t\t\tcanvas === 'edit' ? (\n\t\t\t\t\t\t<Editor isPostsList />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<PostList postType={ postType } />\n\t\t\t\t\t),\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tcontent: isListLayout ? 380 : undefined,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Fallback shows the home page preview\n\treturn {\n\t\tname: 'default',\n\t\tareas: {\n\t\t\tsidebar: <SidebarNavigationScreenMain />,\n\t\t\tpreview: <Editor isPostsList />,\n\t\t\tmobile: canvas === 'edit' && <Editor isPostsList />,\n\t\t},\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,uBAAuB,MAAM,sBAAsB;AAC1D,OAAOC,QAAQ,MAAM,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEpC,MAAM;EAAEC;AAAY,CAAC,GAAGR,MAAM,CAAEJ,iBAAkB,CAAC;AAEnD,eAAe,SAASa,cAAcA,CAAA,EAAG;EACxC,MAAM;IAAEC,MAAM,GAAG,CAAC;EAAE,CAAC,GAAGF,WAAW,CAAC,CAAC;EACrC,MAAM;IAAEG,QAAQ;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGH,MAAM;EAC3C,MAAMI,MAAM,GAAGjB,SAAS,CACrBkB,MAAM,IAAM;IACb,OAAOA,MAAM,CAAEhB,SAAU,CAAC,CAACiB,WAAW,CAAEL,QAAS,CAAC,EAAEG,MAAM;EAC3D,CAAC,EACD,CAAEH,QAAQ,CACX,CAAC;;EAED;EACA,IAAK,CAAE,MAAM,CAAE,CAACM,QAAQ,CAAEN,QAAS,CAAC,EAAG;IACtC,MAAMO,YAAY,GAAGN,MAAM,KAAK,MAAM,IAAI,CAAEA,MAAM;IAClD,OAAO;MACNO,IAAI,EAAE,YAAY;MAClBC,KAAK,EAAE;QACNC,OAAO,eACNd,IAAA,CAACL,uBAAuB;UACvBoB,KAAK,EAAGR,MAAM,EAAEK,IAAM;UACtBI,MAAM;UACNC,OAAO,eAAGjB,IAAA,CAACH,uBAAuB,IAAE;QAAG,CACvC,CACD;QACDoB,OAAO,eAAEjB,IAAA,CAACF,QAAQ;UAACM,QAAQ,EAAGA;QAAU,CAAE,CAAC;QAC3Cc,OAAO,EAAE,CAAEP,YAAY,IAAIL,MAAM,KAAK,MAAM,kBAC3CN,IAAA,CAACN,MAAM;UAACyB,WAAW;QAAA,CAAE,CACrB;QACDC,MAAM,EACLd,MAAM,KAAK,MAAM,gBAChBN,IAAA,CAACN,MAAM;UAACyB,WAAW;QAAA,CAAE,CAAC,gBAEtBnB,IAAA,CAACF,QAAQ;UAACM,QAAQ,EAAGA;QAAU,CAAE;MAEpC,CAAC;MACDiB,MAAM,EAAE;QACPJ,OAAO,EAAEN,YAAY,GAAG,GAAG,GAAGW;MAC/B;IACD,CAAC;EACF;;EAEA;EACA,OAAO;IACNV,IAAI,EAAE,SAAS;IACfC,KAAK,EAAE;MACNC,OAAO,eAAEd,IAAA,CAACJ,2BAA2B,IAAE,CAAC;MACxCsB,OAAO,eAAElB,IAAA,CAACN,MAAM;QAACyB,WAAW;MAAA,CAAE,CAAC;MAC/BC,MAAM,EAAEd,MAAM,KAAK,MAAM,iBAAIN,IAAA,CAACN,MAAM;QAACyB,WAAW;MAAA,CAAE;IACnD;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { __experimentalVStack as VStack, __experimentalHeading as Heading } from '@wordpress/components';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import SidebarNavigationScreenDetailsPanelLabel from './sidebar-navigation-screen-details-panel-label';
|
|
10
|
-
import SidebarNavigationScreenDetailsPanelRow from './sidebar-navigation-screen-details-panel-row';
|
|
11
|
-
import SidebarNavigationScreenDetailsPanelValue from './sidebar-navigation-screen-details-panel-value';
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
function SidebarNavigationScreenDetailsPanel({
|
|
14
|
-
title,
|
|
15
|
-
children,
|
|
16
|
-
spacing
|
|
17
|
-
}) {
|
|
18
|
-
return /*#__PURE__*/_jsxs(VStack, {
|
|
19
|
-
className: "edit-site-sidebar-navigation-details-screen-panel",
|
|
20
|
-
spacing: spacing,
|
|
21
|
-
children: [title && /*#__PURE__*/_jsx(Heading, {
|
|
22
|
-
className: "edit-site-sidebar-navigation-details-screen-panel__heading",
|
|
23
|
-
level: 2,
|
|
24
|
-
children: title
|
|
25
|
-
}), children]
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
export { SidebarNavigationScreenDetailsPanel, SidebarNavigationScreenDetailsPanelRow, SidebarNavigationScreenDetailsPanelLabel, SidebarNavigationScreenDetailsPanelValue };
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalVStack","VStack","__experimentalHeading","Heading","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelRow","SidebarNavigationScreenDetailsPanelValue","jsx","_jsx","jsxs","_jsxs","SidebarNavigationScreenDetailsPanel","title","children","spacing","className","level"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenDetailsPanelLabel from './sidebar-navigation-screen-details-panel-label';\nimport SidebarNavigationScreenDetailsPanelRow from './sidebar-navigation-screen-details-panel-row';\nimport SidebarNavigationScreenDetailsPanelValue from './sidebar-navigation-screen-details-panel-value';\n\nfunction SidebarNavigationScreenDetailsPanel( { title, children, spacing } ) {\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel\"\n\t\t\tspacing={ spacing }\n\t\t>\n\t\t\t{ title && (\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t) }\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,qBAAqB,IAAIC,OAAO,QAC1B,uBAAuB;;AAE9B;AACA;AACA;AACA,OAAOC,wCAAwC,MAAM,iDAAiD;AACtG,OAAOC,sCAAsC,MAAM,+CAA+C;AAClG,OAAOC,wCAAwC,MAAM,iDAAiD;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEvG,SAASC,mCAAmCA,CAAE;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAQ,CAAC,EAAG;EAC5E,oBACCJ,KAAA,CAACT,MAAM;IACNc,SAAS,EAAC,mDAAmD;IAC7DD,OAAO,EAAGA,OAAS;IAAAD,QAAA,GAEjBD,KAAK,iBACNJ,IAAA,CAACL,OAAO;MACPY,SAAS,EAAC,4DAA4D;MACtEC,KAAK,EAAG,CAAG;MAAAH,QAAA,EAETD;IAAK,CACC,CACT,EACCC,QAAQ;EAAA,CACH,CAAC;AAEX;AAEA,SACCF,mCAAmC,EACnCN,sCAAsC,EACtCD,wCAAwC,EACxCE,wCAAwC","ignoreList":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { __experimentalText as Text } from '@wordpress/components';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export default function SidebarNavigationScreenDetailsPanelLabel({
|
|
7
|
-
children
|
|
8
|
-
}) {
|
|
9
|
-
return /*#__PURE__*/_jsx(Text, {
|
|
10
|
-
className: "edit-site-sidebar-navigation-details-screen-panel__label",
|
|
11
|
-
children: children
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=sidebar-navigation-screen-details-panel-label.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalText","Text","jsx","_jsx","SidebarNavigationScreenDetailsPanelLabel","children","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelLabel( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__label\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnE,eAAe,SAASC,wCAAwCA,CAAE;EACjEC;AACD,CAAC,EAAG;EACH,oBACCF,IAAA,CAACF,IAAI;IAACK,SAAS,EAAC,0DAA0D;IAAAD,QAAA,EACvEA;EAAQ,CACL,CAAC;AAET","ignoreList":[]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
|
-
import { __experimentalHStack as HStack } from '@wordpress/components';
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
export default function SidebarNavigationScreenDetailsPanelRow({
|
|
12
|
-
label,
|
|
13
|
-
children,
|
|
14
|
-
className,
|
|
15
|
-
...extraProps
|
|
16
|
-
}) {
|
|
17
|
-
return /*#__PURE__*/_jsx(HStack, {
|
|
18
|
-
spacing: 5,
|
|
19
|
-
alignment: "left",
|
|
20
|
-
className: clsx('edit-site-sidebar-navigation-details-screen-panel__row', className),
|
|
21
|
-
...extraProps,
|
|
22
|
-
children: children
|
|
23
|
-
}, label);
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=sidebar-navigation-screen-details-panel-row.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","__experimentalHStack","HStack","jsx","_jsx","SidebarNavigationScreenDetailsPanelRow","label","children","className","extraProps","spacing","alignment"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelRow( {\n\tlabel,\n\tchildren,\n\tclassName,\n\t...extraProps\n} ) {\n\treturn (\n\t\t<HStack\n\t\t\tkey={ label }\n\t\t\tspacing={ 5 }\n\t\t\talignment=\"left\"\n\t\t\tclassName={ clsx(\n\t\t\t\t'edit-site-sidebar-navigation-details-screen-panel__row',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...extraProps }\n\t\t>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEvE,eAAe,SAASC,sCAAsCA,CAAE;EAC/DC,KAAK;EACLC,QAAQ;EACRC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH,oBACCL,IAAA,CAACF,MAAM;IAENQ,OAAO,EAAG,CAAG;IACbC,SAAS,EAAC,MAAM;IAChBH,SAAS,EAAGR,IAAI,CACf,wDAAwD,EACxDQ,SACD,CAAG;IAAA,GACEC,UAAU;IAAAF,QAAA,EAEbA;EAAQ,GATJD,KAUC,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { __experimentalText as Text } from '@wordpress/components';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export default function SidebarNavigationScreenDetailsPanelValue({
|
|
7
|
-
children
|
|
8
|
-
}) {
|
|
9
|
-
return /*#__PURE__*/_jsx(Text, {
|
|
10
|
-
className: "edit-site-sidebar-navigation-details-screen-panel__value",
|
|
11
|
-
children: children
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=sidebar-navigation-screen-details-panel-value.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalText","Text","jsx","_jsx","SidebarNavigationScreenDetailsPanelValue","children","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelValue( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__value\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnE,eAAe,SAASC,wCAAwCA,CAAE;EACjEC;AACD,CAAC,EAAG;EACH,oBACCF,IAAA,CAACF,IAAI;IAACK,SAAS,EAAC,0DAA0D;IAAAD,QAAA,EACvEA;EAAQ,CACL,CAAC;AAET","ignoreList":[]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal dependencies
|
|
3
|
-
*/
|
|
4
|
-
import Editor from '../editor';
|
|
5
|
-
import SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export const stylesEditRoute = {
|
|
8
|
-
name: 'styles-edit',
|
|
9
|
-
match: params => {
|
|
10
|
-
return params.path === '/wp_global_styles' && params.canvas === 'edit';
|
|
11
|
-
},
|
|
12
|
-
areas: {
|
|
13
|
-
sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreenGlobalStyles, {
|
|
14
|
-
backPath: {}
|
|
15
|
-
}),
|
|
16
|
-
preview: /*#__PURE__*/_jsx(Editor, {}),
|
|
17
|
-
mobile: /*#__PURE__*/_jsx(Editor, {})
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=styles-edit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Editor","SidebarNavigationScreenGlobalStyles","jsx","_jsx","stylesEditRoute","name","match","params","path","canvas","areas","sidebar","backPath","preview","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/styles-edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\n\nexport const stylesEditRoute = {\n\tname: 'styles-edit',\n\tmatch: ( params ) => {\n\t\treturn params.path === '/wp_global_styles' && params.canvas === 'edit';\n\t},\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenGlobalStyles backPath={ {} } />,\n\t\tpreview: <Editor />,\n\t\tmobile: <Editor />,\n\t},\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,WAAW;AAC9B,OAAOC,mCAAmC,MAAM,4CAA4C;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7F,OAAO,MAAMC,eAAe,GAAG;EAC9BC,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAIC,MAAM,IAAM;IACpB,OAAOA,MAAM,CAACC,IAAI,KAAK,mBAAmB,IAAID,MAAM,CAACE,MAAM,KAAK,MAAM;EACvE,CAAC;EACDC,KAAK,EAAE;IACNC,OAAO,eAAER,IAAA,CAACF,mCAAmC;MAACW,QAAQ,EAAG,CAAC;IAAG,CAAE,CAAC;IAChEC,OAAO,eAAEV,IAAA,CAACH,MAAM,IAAE,CAAC;IACnBc,MAAM,eAAEX,IAAA,CAACH,MAAM,IAAE;EAClB;AACD,CAAC","ignoreList":[]}
|