@wordpress/edit-site 5.24.1 → 5.25.1-next.79a6196f.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/LICENSE.md +1 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js +2 -3
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/block-editor/back-button.js +3 -2
- package/build/components/block-editor/back-button.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +48 -23
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/resizable-editor.js +2 -2
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/block-editor/site-editor-canvas.js +5 -54
- package/build/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build/components/block-editor/use-post-link-props.js +27 -0
- package/build/components/block-editor/use-post-link-props.js.map +1 -0
- package/build/components/block-editor/use-site-editor-settings.js +15 -23
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +15 -7
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/editor/index.js +21 -33
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +9 -7
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/collection-font-variant.js +11 -7
- package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js +3 -3
- package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +6 -6
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +8 -4
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/index.js +38 -21
- package/build/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +2 -2
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/library-font-variant.js +11 -7
- package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/local-fonts.js +26 -10
- package/build/components/global-styles/font-library-modal/local-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/resolvers.js +6 -6
- package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
- package/build/components/global-styles/font-library-modal/{tab-layout.js → tab-panel-layout.js} +4 -4
- package/build/components/global-styles/font-library-modal/tab-panel-layout.js.map +1 -0
- package/build/components/global-styles/font-library-modal/utils/index.js +35 -38
- package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build/components/global-styles/preview.js +43 -1
- package/build/components/global-styles/preview.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +16 -12
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +54 -58
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +56 -15
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +40 -22
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build/components/global-styles/ui.js +13 -62
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/header-edit-mode/document-tools/index.js +15 -106
- package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
- package/build/components/header-edit-mode/index.js +21 -47
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/mode-switcher/index.js +0 -2
- package/build/components/header-edit-mode/mode-switcher/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +19 -14
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/edit-mode.js +0 -23
- package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +0 -36
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/index.js +15 -21
- package/build/components/layout/index.js.map +1 -1
- package/build/components/page/header.js +2 -1
- package/build/components/page/header.js.map +1 -1
- package/build/components/page-main/index.js +4 -4
- package/build/components/page-main/index.js.map +1 -1
- package/build/components/page-pages/index.js +102 -52
- package/build/components/page-pages/index.js.map +1 -1
- package/build/components/page-patterns/dataviews-pattern-actions.js +305 -0
- package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -0
- package/build/components/page-patterns/dataviews-patterns.js +307 -0
- package/build/components/page-patterns/dataviews-patterns.js.map +1 -0
- package/build/components/page-patterns/duplicate-menu-item.js +1 -1
- package/build/components/page-patterns/duplicate-menu-item.js.map +1 -1
- package/build/components/page-patterns/grid-item.js +4 -3
- package/build/components/page-patterns/grid-item.js.map +1 -1
- package/build/components/page-patterns/patterns-list.js +3 -3
- package/build/components/page-patterns/patterns-list.js.map +1 -1
- package/build/components/page-patterns/rename-menu-item.js +3 -0
- package/build/components/page-patterns/rename-menu-item.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +23 -13
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/index.js +312 -36
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/{page-patterns/pagination.js → pagination/index.js} +25 -12
- package/build/components/pagination/index.js.map +1 -0
- package/build/components/{page-pages/side-editor.js → post-preview/index.js} +8 -4
- package/build/components/post-preview/index.js.map +1 -0
- package/build/components/preferences-modal/enable-feature.js +3 -2
- package/build/components/preferences-modal/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/enable-panel-option.js +33 -0
- package/build/components/preferences-modal/enable-panel-option.js.map +1 -0
- package/build/components/preferences-modal/index.js +89 -25
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/revisions/index.js +3 -7
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/routes/link.js +6 -2
- package/build/components/routes/link.js.map +1 -1
- package/build/components/routes/use-title.js +3 -4
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js +8 -4
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/sidebar/index.js +26 -20
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-dataviews/add-new-view.js +2 -2
- package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js +2 -10
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +19 -6
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +3 -3
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/default-sidebar.js +1 -5
- package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +62 -10
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/index.js +10 -4
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js +1 -2
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -4
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js +4 -13
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +5 -2
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +4 -1
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pages-dataviews/index.js +69 -0
- package/build/components/sidebar-navigation-screen-pages-dataviews/index.js.map +1 -0
- 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-template/home-template-details.js +3 -89
- package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js +2 -1
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/template-areas.js +117 -0
- package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -0
- package/build/components/sidebar-navigation-screen-templates/index.js +63 -8
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/site-hub/index.js +6 -3
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/style-book/index.js +38 -8
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/template-actions/rename-menu-item.js +3 -0
- package/build/components/template-actions/rename-menu-item.js.map +1 -1
- package/build/components/welcome-guide/styles.js +1 -1
- package/build/components/welcome-guide/styles.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +9 -1
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/commands/use-edit-mode-commands.js +11 -6
- package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build/hooks/navigation-menu-edit.js +1 -1
- package/build/hooks/navigation-menu-edit.js.map +1 -1
- package/build/hooks/template-part-edit.js +1 -1
- package/build/hooks/template-part-edit.js.map +1 -1
- package/build/index.js +12 -7
- package/build/index.js.map +1 -1
- package/build/store/actions.js +54 -52
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +6 -2
- package/build/store/private-actions.js.map +1 -1
- package/build/store/reducer.js +0 -64
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +44 -47
- package/build/store/selectors.js.map +1 -1
- package/build/utils/constants.js +15 -1
- package/build/utils/constants.js.map +1 -1
- package/build/utils/get-is-list-page.js +1 -1
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build-module/components/block-editor/back-button.js +4 -3
- package/build-module/components/block-editor/back-button.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +50 -25
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/resizable-editor.js +2 -2
- package/build-module/components/block-editor/resizable-editor.js.map +1 -1
- package/build-module/components/block-editor/site-editor-canvas.js +8 -56
- package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/use-post-link-props.js +20 -0
- package/build-module/components/block-editor/use-post-link-props.js.map +1 -0
- package/build-module/components/block-editor/use-site-editor-settings.js +16 -24
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +14 -7
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/editor/index.js +25 -37
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +9 -7
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +13 -8
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js +3 -3
- package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +8 -8
- package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +8 -4
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/index.js +39 -22
- package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +2 -2
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js +13 -8
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/local-fonts.js +27 -11
- package/build-module/components/global-styles/font-library-modal/local-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/resolvers.js +5 -5
- package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/{tab-layout.js → tab-panel-layout.js} +4 -4
- package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js.map +1 -0
- package/build-module/components/global-styles/font-library-modal/utils/index.js +34 -36
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build-module/components/global-styles/preview.js +45 -3
- package/build-module/components/global-styles/preview.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +17 -13
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +55 -59
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +56 -15
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +40 -22
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build-module/components/global-styles/ui.js +15 -64
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/header-edit-mode/document-tools/index.js +19 -109
- package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +25 -51
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/header-edit-mode/mode-switcher/index.js +0 -2
- package/build-module/components/header-edit-mode/mode-switcher/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +20 -15
- package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -23
- package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +0 -36
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/index.js +15 -21
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/page/header.js +2 -1
- package/build-module/components/page/header.js.map +1 -1
- package/build-module/components/page-main/index.js +4 -4
- package/build-module/components/page-main/index.js.map +1 -1
- package/build-module/components/page-pages/index.js +101 -51
- package/build-module/components/page-pages/index.js.map +1 -1
- package/build-module/components/page-patterns/dataviews-pattern-actions.js +292 -0
- package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -0
- package/build-module/components/page-patterns/dataviews-patterns.js +299 -0
- package/build-module/components/page-patterns/dataviews-patterns.js.map +1 -0
- package/build-module/components/page-patterns/duplicate-menu-item.js +1 -1
- package/build-module/components/page-patterns/duplicate-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/grid-item.js +4 -3
- package/build-module/components/page-patterns/grid-item.js.map +1 -1
- package/build-module/components/page-patterns/patterns-list.js +3 -3
- package/build-module/components/page-patterns/patterns-list.js.map +1 -1
- package/build-module/components/page-patterns/rename-menu-item.js +3 -0
- package/build-module/components/page-patterns/rename-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +23 -13
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/index.js +314 -38
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/{page-patterns/pagination.js → pagination/index.js} +24 -12
- package/build-module/components/pagination/index.js.map +1 -0
- package/build-module/components/{page-pages/side-editor.js → post-preview/index.js} +7 -3
- package/build-module/components/post-preview/index.js.map +1 -0
- package/build-module/components/preferences-modal/enable-feature.js +3 -2
- package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
- package/build-module/components/preferences-modal/enable-panel-option.js +26 -0
- package/build-module/components/preferences-modal/enable-panel-option.js.map +1 -0
- package/build-module/components/preferences-modal/index.js +90 -26
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/revisions/index.js +4 -8
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/routes/link.js +5 -2
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/routes/use-title.js +3 -4
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js +8 -4
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +26 -20
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js +1 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +2 -10
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +17 -5
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +2 -2
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/default-sidebar.js +1 -5
- package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +64 -12
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +10 -4
- package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +2 -3
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -4
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js +6 -15
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +1 -1
- 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 +5 -2
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +4 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pages-dataviews/index.js +61 -0
- package/build-module/components/sidebar-navigation-screen-pages-dataviews/index.js.map +1 -0
- 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-template/home-template-details.js +5 -90
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +2 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/template-areas.js +109 -0
- package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-templates/index.js +64 -9
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +6 -3
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/style-book/index.js +40 -10
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/template-actions/rename-menu-item.js +3 -0
- package/build-module/components/template-actions/rename-menu-item.js.map +1 -1
- package/build-module/components/welcome-guide/styles.js +1 -1
- package/build-module/components/welcome-guide/styles.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +9 -1
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/commands/use-edit-mode-commands.js +11 -6
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build-module/hooks/navigation-menu-edit.js +1 -1
- package/build-module/hooks/navigation-menu-edit.js.map +1 -1
- package/build-module/hooks/template-part-edit.js +1 -1
- package/build-module/hooks/template-part-edit.js.map +1 -1
- package/build-module/index.js +12 -7
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +49 -47
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +6 -2
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/reducer.js +0 -61
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +40 -41
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/constants.js +8 -0
- package/build-module/utils/constants.js.map +1 -1
- package/build-module/utils/get-is-list-page.js +1 -1
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-style/style-rtl.css +607 -561
- package/build-style/style.css +607 -561
- package/package.json +42 -42
- package/src/components/add-new-template/add-custom-template-modal-content.js +1 -1
- package/src/components/add-new-template/style.scss +2 -1
- package/src/components/block-editor/back-button.js +4 -2
- package/src/components/block-editor/editor-canvas.js +63 -47
- package/src/components/block-editor/resizable-editor.js +1 -1
- package/src/components/block-editor/site-editor-canvas.js +32 -96
- package/src/components/block-editor/style.scss +7 -14
- package/src/components/block-editor/use-post-link-props.js +20 -0
- package/src/components/block-editor/use-site-editor-settings.js +38 -58
- package/src/components/code-editor/style.scss +0 -4
- package/src/components/create-template-part-modal/index.js +83 -82
- package/src/components/editor/index.js +34 -47
- package/src/components/editor-canvas-container/index.js +8 -6
- package/src/components/global-styles/font-library-modal/collection-font-variant.js +18 -7
- package/src/components/global-styles/font-library-modal/confirm-delete-dialog.js +3 -3
- package/src/components/global-styles/font-library-modal/context.js +8 -8
- package/src/components/global-styles/font-library-modal/font-collection.js +10 -5
- package/src/components/global-styles/font-library-modal/index.js +44 -24
- package/src/components/global-styles/font-library-modal/installed-fonts.js +3 -3
- package/src/components/global-styles/font-library-modal/library-font-variant.js +18 -7
- package/src/components/global-styles/font-library-modal/local-fonts.js +53 -26
- package/src/components/global-styles/font-library-modal/resolvers.js +5 -5
- package/src/components/global-styles/font-library-modal/style.scss +5 -2
- package/src/components/global-styles/font-library-modal/{tab-layout.js → tab-panel-layout.js} +9 -3
- package/src/components/global-styles/font-library-modal/utils/index.js +21 -23
- package/src/components/global-styles/font-library-modal/utils/test/makeFormDataFromFontFamily.spec.js +58 -0
- package/src/components/global-styles/preview.js +55 -3
- package/src/components/global-styles/screen-color-palette.js +16 -26
- package/src/components/global-styles/screen-revisions/index.js +93 -101
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +85 -17
- package/src/components/global-styles/screen-revisions/style.scss +86 -21
- package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +67 -0
- package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +73 -46
- package/src/components/global-styles/ui.js +13 -74
- package/src/components/header-edit-mode/document-tools/index.js +35 -167
- package/src/components/header-edit-mode/index.js +33 -78
- package/src/components/header-edit-mode/mode-switcher/index.js +0 -4
- package/src/components/header-edit-mode/more-menu/index.js +25 -27
- package/src/components/header-edit-mode/style.scss +46 -68
- package/src/components/keyboard-shortcuts/edit-mode.js +1 -26
- package/src/components/keyboard-shortcuts/register.js +0 -43
- package/src/components/layout/index.js +29 -47
- package/src/components/layout/style.scss +10 -3
- package/src/components/page/header.js +2 -1
- package/src/components/page/style.scss +3 -3
- package/src/components/page-main/index.js +8 -8
- package/src/components/page-pages/index.js +157 -62
- package/src/components/page-pages/style.scss +4 -1
- package/src/components/page-patterns/dataviews-pattern-actions.js +329 -0
- package/src/components/page-patterns/dataviews-patterns.js +380 -0
- package/src/components/page-patterns/duplicate-menu-item.js +1 -1
- package/src/components/page-patterns/grid-item.js +3 -2
- package/src/components/page-patterns/patterns-list.js +7 -3
- package/src/components/page-patterns/rename-menu-item.js +7 -1
- package/src/components/page-patterns/style.scss +89 -26
- package/src/components/page-patterns/use-patterns.js +24 -15
- package/src/components/page-templates/index.js +399 -64
- package/src/components/{page-patterns/pagination.js → pagination/index.js} +21 -10
- package/src/components/pagination/style.scss +5 -0
- package/src/components/post-preview/index.js +16 -0
- package/src/components/preferences-modal/enable-feature.js +9 -5
- package/src/components/preferences-modal/enable-panel-option.js +23 -0
- package/src/components/preferences-modal/index.js +151 -40
- package/src/components/revisions/index.js +8 -15
- package/src/components/routes/link.js +11 -3
- package/src/components/routes/use-title.js +3 -10
- package/src/components/save-button/index.js +17 -3
- package/src/components/sidebar/index.js +45 -35
- package/src/components/sidebar/style.scss +10 -12
- package/src/components/sidebar-dataviews/add-new-view.js +1 -1
- package/src/components/sidebar-dataviews/dataview-item.js +3 -7
- package/src/components/sidebar-dataviews/default-views.js +23 -6
- package/src/components/sidebar-dataviews/index.js +2 -2
- package/src/components/sidebar-edit-mode/default-sidebar.js +0 -12
- package/src/components/sidebar-edit-mode/global-styles-sidebar.js +85 -14
- package/src/components/sidebar-edit-mode/page-panels/index.js +53 -25
- package/src/components/sidebar-edit-mode/page-panels/page-summary.js +2 -2
- package/src/components/sidebar-edit-mode/page-panels/style.scss +1 -42
- package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -12
- package/src/components/sidebar-edit-mode/style.scss +0 -10
- package/src/components/sidebar-edit-mode/template-panel/index.js +44 -40
- package/src/components/sidebar-edit-mode/template-panel/style.scss +0 -4
- package/src/components/sidebar-navigation-screen-details-footer/index.js +1 -1
- package/src/components/sidebar-navigation-screen-global-styles/index.js +3 -2
- package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +7 -1
- package/src/components/sidebar-navigation-screen-page/index.js +2 -1
- package/src/components/sidebar-navigation-screen-pages-dataviews/index.js +77 -0
- package/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
- package/src/components/sidebar-navigation-screen-template/home-template-details.js +1 -96
- package/src/components/sidebar-navigation-screen-template/index.js +8 -2
- package/src/components/sidebar-navigation-screen-template/template-areas.js +135 -0
- package/src/components/sidebar-navigation-screen-templates/index.js +85 -28
- package/src/components/sidebar-navigation-screen-templates/style.scss +9 -0
- package/src/components/site-hub/index.js +4 -5
- package/src/components/site-hub/style.scss +5 -2
- package/src/components/style-book/index.js +65 -21
- package/src/components/style-book/style.scss +3 -3
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +4 -1
- package/src/components/template-actions/rename-menu-item.js +7 -1
- package/src/components/welcome-guide/styles.js +1 -1
- package/src/hooks/commands/use-common-commands.js +10 -5
- package/src/hooks/commands/use-edit-mode-commands.js +8 -12
- package/src/hooks/navigation-menu-edit.js +1 -1
- package/src/hooks/template-part-edit.js +1 -1
- package/src/index.js +11 -5
- package/src/store/actions.js +50 -50
- package/src/store/private-actions.js +7 -3
- package/src/store/reducer.js +0 -62
- package/src/store/selectors.js +47 -41
- package/src/store/test/actions.js +11 -39
- package/src/store/test/reducer.js +1 -82
- package/src/store/test/selectors.js +0 -24
- package/src/style.scss +3 -3
- package/src/utils/constants.js +8 -0
- package/src/utils/get-is-list-page.js +2 -3
- package/build/components/dataviews/add-filter.js +0 -91
- package/build/components/dataviews/add-filter.js.map +0 -1
- package/build/components/dataviews/constants.js +0 -14
- package/build/components/dataviews/constants.js.map +0 -1
- package/build/components/dataviews/dataviews.js +0 -99
- package/build/components/dataviews/dataviews.js.map +0 -1
- package/build/components/dataviews/filter-summary.js +0 -62
- package/build/components/dataviews/filter-summary.js.map +0 -1
- package/build/components/dataviews/filters.js +0 -63
- package/build/components/dataviews/filters.js.map +0 -1
- package/build/components/dataviews/index.js +0 -21
- package/build/components/dataviews/index.js.map +0 -1
- package/build/components/dataviews/item-actions.js +0 -184
- package/build/components/dataviews/item-actions.js.map +0 -1
- package/build/components/dataviews/pagination.js +0 -123
- package/build/components/dataviews/pagination.js.map +0 -1
- package/build/components/dataviews/reset-filters.js +0 -33
- package/build/components/dataviews/reset-filters.js.map +0 -1
- package/build/components/dataviews/search.js +0 -51
- package/build/components/dataviews/search.js.map +0 -1
- package/build/components/dataviews/view-actions.js +0 -244
- package/build/components/dataviews/view-actions.js.map +0 -1
- package/build/components/dataviews/view-grid.js +0 -82
- package/build/components/dataviews/view-grid.js.map +0 -1
- package/build/components/dataviews/view-list.js +0 -399
- package/build/components/dataviews/view-list.js.map +0 -1
- package/build/components/dataviews/view-side-by-side.js +0 -20
- package/build/components/dataviews/view-side-by-side.js.map +0 -1
- package/build/components/global-styles/font-library-modal/tab-layout.js.map +0 -1
- package/build/components/header-edit-mode/document-actions/index.js +0 -172
- package/build/components/header-edit-mode/document-actions/index.js.map +0 -1
- package/build/components/header-edit-mode/undo-redo/redo.js +0 -41
- package/build/components/header-edit-mode/undo-redo/redo.js.map +0 -1
- package/build/components/header-edit-mode/undo-redo/undo.js +0 -40
- package/build/components/header-edit-mode/undo-redo/undo.js.map +0 -1
- package/build/components/page-content-focus-notifications/back-to-page-notification.js +0 -61
- package/build/components/page-content-focus-notifications/back-to-page-notification.js.map +0 -1
- package/build/components/page-content-focus-notifications/edit-template-notification.js +0 -102
- package/build/components/page-content-focus-notifications/edit-template-notification.js.map +0 -1
- package/build/components/page-content-focus-notifications/index.js +0 -22
- package/build/components/page-content-focus-notifications/index.js.map +0 -1
- package/build/components/page-pages/side-editor.js.map +0 -1
- package/build/components/page-patterns/pagination.js.map +0 -1
- package/build/components/page-templates/dataviews-templates.js +0 -316
- package/build/components/page-templates/dataviews-templates.js.map +0 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +0 -60
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +0 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +0 -109
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +0 -1
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js +0 -101
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +0 -1
- package/build/components/sidebar-edit-mode/page-panels/hooks.js +0 -79
- package/build/components/sidebar-edit-mode/page-panels/hooks.js.map +0 -1
- package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js +0 -48
- package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +0 -1
- package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js +0 -84
- package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +0 -1
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +0 -35
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-panel/last-revision.js +0 -73
- package/build/components/sidebar-edit-mode/template-panel/last-revision.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-panel/pattern-categories.js +0 -219
- package/build/components/sidebar-edit-mode/template-panel/pattern-categories.js.map +0 -1
- package/build/utils/use-debounced-input.js +0 -22
- package/build/utils/use-debounced-input.js.map +0 -1
- package/build-module/components/dataviews/add-filter.js +0 -84
- package/build-module/components/dataviews/add-filter.js.map +0 -1
- package/build-module/components/dataviews/constants.js +0 -6
- package/build-module/components/dataviews/constants.js.map +0 -1
- package/build-module/components/dataviews/dataviews.js +0 -90
- package/build-module/components/dataviews/dataviews.js.map +0 -1
- package/build-module/components/dataviews/filter-summary.js +0 -55
- package/build-module/components/dataviews/filter-summary.js.map +0 -1
- package/build-module/components/dataviews/filters.js +0 -55
- package/build-module/components/dataviews/filters.js.map +0 -1
- package/build-module/components/dataviews/index.js +0 -2
- package/build-module/components/dataviews/index.js.map +0 -1
- package/build-module/components/dataviews/item-actions.js +0 -177
- package/build-module/components/dataviews/item-actions.js.map +0 -1
- package/build-module/components/dataviews/pagination.js +0 -115
- package/build-module/components/dataviews/pagination.js.map +0 -1
- package/build-module/components/dataviews/reset-filters.js +0 -26
- package/build-module/components/dataviews/reset-filters.js.map +0 -1
- package/build-module/components/dataviews/search.js +0 -43
- package/build-module/components/dataviews/search.js.map +0 -1
- package/build-module/components/dataviews/view-actions.js +0 -237
- package/build-module/components/dataviews/view-actions.js.map +0 -1
- package/build-module/components/dataviews/view-grid.js +0 -74
- package/build-module/components/dataviews/view-grid.js.map +0 -1
- package/build-module/components/dataviews/view-list.js +0 -390
- package/build-module/components/dataviews/view-list.js.map +0 -1
- package/build-module/components/dataviews/view-side-by-side.js +0 -12
- package/build-module/components/dataviews/view-side-by-side.js.map +0 -1
- package/build-module/components/global-styles/font-library-modal/tab-layout.js.map +0 -1
- package/build-module/components/header-edit-mode/document-actions/index.js +0 -164
- package/build-module/components/header-edit-mode/document-actions/index.js.map +0 -1
- package/build-module/components/header-edit-mode/undo-redo/redo.js +0 -33
- package/build-module/components/header-edit-mode/undo-redo/redo.js.map +0 -1
- package/build-module/components/header-edit-mode/undo-redo/undo.js +0 -32
- package/build-module/components/header-edit-mode/undo-redo/undo.js.map +0 -1
- package/build-module/components/page-content-focus-notifications/back-to-page-notification.js +0 -54
- package/build-module/components/page-content-focus-notifications/back-to-page-notification.js.map +0 -1
- package/build-module/components/page-content-focus-notifications/edit-template-notification.js +0 -96
- package/build-module/components/page-content-focus-notifications/edit-template-notification.js.map +0 -1
- package/build-module/components/page-content-focus-notifications/index.js +0 -14
- package/build-module/components/page-content-focus-notifications/index.js.map +0 -1
- package/build-module/components/page-pages/side-editor.js.map +0 -1
- package/build-module/components/page-patterns/pagination.js.map +0 -1
- package/build-module/components/page-templates/dataviews-templates.js +0 -308
- package/build-module/components/page-templates/dataviews-templates.js.map +0 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +0 -53
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +0 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +0 -102
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +0 -93
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/page-panels/hooks.js +0 -69
- package/build-module/components/sidebar-edit-mode/page-panels/hooks.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js +0 -41
- package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js +0 -77
- package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +0 -27
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js +0 -65
- package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-panel/pattern-categories.js +0 -209
- package/build-module/components/sidebar-edit-mode/template-panel/pattern-categories.js.map +0 -1
- package/build-module/utils/use-debounced-input.js +0 -15
- package/build-module/utils/use-debounced-input.js.map +0 -1
- package/src/components/dataviews/README.md +0 -191
- package/src/components/dataviews/add-filter.js +0 -108
- package/src/components/dataviews/constants.js +0 -5
- package/src/components/dataviews/dataviews.js +0 -99
- package/src/components/dataviews/filter-summary.js +0 -79
- package/src/components/dataviews/filters.js +0 -65
- package/src/components/dataviews/index.js +0 -1
- package/src/components/dataviews/item-actions.js +0 -208
- package/src/components/dataviews/pagination.js +0 -144
- package/src/components/dataviews/reset-filters.js +0 -26
- package/src/components/dataviews/search.js +0 -42
- package/src/components/dataviews/style.scss +0 -131
- package/src/components/dataviews/view-actions.js +0 -319
- package/src/components/dataviews/view-grid.js +0 -90
- package/src/components/dataviews/view-list.js +0 -512
- package/src/components/dataviews/view-side-by-side.js +0 -9
- package/src/components/global-styles/font-library-modal/utils/test/makeFormDataFromFontFamilies.spec.js +0 -62
- package/src/components/global-styles/font-library-modal/utils/test/wpKebabCase.spec.js +0 -28
- package/src/components/header-edit-mode/document-actions/index.js +0 -204
- package/src/components/header-edit-mode/document-actions/style.scss +0 -145
- package/src/components/header-edit-mode/undo-redo/redo.js +0 -38
- package/src/components/header-edit-mode/undo-redo/undo.js +0 -34
- package/src/components/page-content-focus-notifications/back-to-page-notification.js +0 -58
- package/src/components/page-content-focus-notifications/edit-template-notification.js +0 -104
- package/src/components/page-content-focus-notifications/index.js +0 -14
- package/src/components/page-pages/side-editor.js +0 -14
- package/src/components/page-templates/dataviews-templates.js +0 -345
- package/src/components/secondary-sidebar/inserter-sidebar.js +0 -66
- package/src/components/secondary-sidebar/list-view-sidebar.js +0 -123
- package/src/components/secondary-sidebar/style.scss +0 -65
- package/src/components/sidebar-edit-mode/page-panels/edit-template.js +0 -108
- package/src/components/sidebar-edit-mode/page-panels/hooks.js +0 -99
- package/src/components/sidebar-edit-mode/page-panels/reset-default-template.js +0 -45
- package/src/components/sidebar-edit-mode/page-panels/swap-template-button.js +0 -83
- package/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js +0 -26
- package/src/components/sidebar-edit-mode/template-panel/last-revision.js +0 -82
- package/src/components/sidebar-edit-mode/template-panel/pattern-categories.js +0 -279
- package/src/utils/use-debounced-input.js +0 -18
|
@@ -9,7 +9,6 @@ var _react = require("react");
|
|
|
9
9
|
var _components = require("@wordpress/components");
|
|
10
10
|
var _editor = require("@wordpress/editor");
|
|
11
11
|
var _pageStatus = _interopRequireDefault(require("./page-status"));
|
|
12
|
-
var _editTemplate = _interopRequireDefault(require("./edit-template"));
|
|
13
12
|
/**
|
|
14
13
|
* WordPress dependencies
|
|
15
14
|
*/
|
|
@@ -33,6 +32,6 @@ function PageSummary({
|
|
|
33
32
|
password: password,
|
|
34
33
|
postId: postId,
|
|
35
34
|
postType: postType
|
|
36
|
-
}), (0, _react.createElement)(_editor.PostSchedulePanel, null), (0, _react.createElement)(
|
|
35
|
+
}), (0, _react.createElement)(_editor.PostSchedulePanel, null), (0, _react.createElement)(_editor.PostTemplatePanel, null), (0, _react.createElement)(_editor.PostURLPanel, null), (0, _react.createElement)(_editor.PostAuthorPanel, null));
|
|
37
36
|
}
|
|
38
37
|
//# sourceMappingURL=page-summary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_editor","_pageStatus","_interopRequireDefault","
|
|
1
|
+
{"version":3,"names":["_components","require","_editor","_pageStatus","_interopRequireDefault","PageSummary","status","date","password","postId","postType","_react","createElement","__experimentalVStack","spacing","default","PostSchedulePanel","PostTemplatePanel","PostURLPanel","PostAuthorPanel"],"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/page-panels/page-summary.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport {\n\tPostAuthorPanel,\n\tPostURLPanel,\n\tPostSchedulePanel,\n\tPostTemplatePanel,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport PageStatus from './page-status';\n\nexport default function PageSummary( {\n\tstatus,\n\tdate,\n\tpassword,\n\tpostId,\n\tpostType,\n} ) {\n\treturn (\n\t\t<VStack spacing={ 0 }>\n\t\t\t<PageStatus\n\t\t\t\tstatus={ status }\n\t\t\t\tdate={ date }\n\t\t\t\tpassword={ password }\n\t\t\t\tpostId={ postId }\n\t\t\t\tpostType={ postType }\n\t\t\t/>\n\t\t\t<PostSchedulePanel />\n\t\t\t<PostTemplatePanel />\n\t\t\t<PostURLPanel />\n\t\t\t<PostAuthorPanel />\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAUA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AAdA;AACA;AACA;;AASA;AACA;AACA;;AAGe,SAASI,WAAWA,CAAE;EACpCC,MAAM;EACNC,IAAI;EACJC,QAAQ;EACRC,MAAM;EACNC;AACD,CAAC,EAAG;EACH,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAa,oBAAM;IAACC,OAAO,EAAG;EAAG,GACpB,IAAAH,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAY,OAAU;IACVT,MAAM,EAAGA,MAAQ;IACjBC,IAAI,EAAGA,IAAM;IACbC,QAAQ,EAAGA,QAAU;IACrBC,MAAM,EAAGA,MAAQ;IACjBC,QAAQ,EAAGA;EAAU,CACrB,CAAC,EACF,IAAAC,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAc,iBAAiB,MAAE,CAAC,EACrB,IAAAL,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAe,iBAAiB,MAAE,CAAC,EACrB,IAAAN,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAgB,YAAY,MAAE,CAAC,EAChB,IAAAP,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAiB,eAAe,MAAE,CACX,CAAC;AAEX"}
|
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = PluginSidebarEditSite;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _interface = require("@wordpress/interface");
|
|
9
|
-
var _data = require("@wordpress/data");
|
|
10
|
-
var _preferences = require("@wordpress/preferences");
|
|
11
9
|
/**
|
|
12
10
|
* WordPress dependencies
|
|
13
11
|
*/
|
|
@@ -81,12 +79,10 @@ function PluginSidebarEditSite({
|
|
|
81
79
|
className,
|
|
82
80
|
...props
|
|
83
81
|
}) {
|
|
84
|
-
const showIconLabels = (0, _data.useSelect)(select => !!select(_preferences.store).get('core/edit-site', 'showIconLabels'), []);
|
|
85
82
|
return (0, _react.createElement)(_interface.ComplementaryArea, {
|
|
86
83
|
panelClassName: className,
|
|
87
84
|
className: "edit-site-sidebar-edit-mode",
|
|
88
85
|
scope: "core/edit-site",
|
|
89
|
-
showIconLabels: showIconLabels,
|
|
90
86
|
...props
|
|
91
87
|
});
|
|
92
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_interface","require","
|
|
1
|
+
{"version":3,"names":["_interface","require","PluginSidebarEditSite","className","props","_react","createElement","ComplementaryArea","panelClassName","scope"],"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/plugin-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ComplementaryArea } from '@wordpress/interface';\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-site' ).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.editSite.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-site';\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 PluginSidebarEditSite( { className, ...props } ) {\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"edit-site-sidebar-edit-mode\"\n\t\t\tscope=\"core/edit-site\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,qBAAqBA,CAAE;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAG;EACxE,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACN,UAAA,CAAAO,iBAAiB;IACjBC,cAAc,EAAGL,SAAW;IAC5BA,SAAS,EAAC,6BAA6B;IACvCM,KAAK,EAAC,gBAAgB;IAAA,GACjBL;EAAK,CACV,CAAC;AAEJ"}
|
|
@@ -15,10 +15,7 @@ var _icons = require("@wordpress/icons");
|
|
|
15
15
|
var _store = require("../../../store");
|
|
16
16
|
var _templateActions = _interopRequireDefault(require("./template-actions"));
|
|
17
17
|
var _templateAreas = _interopRequireDefault(require("./template-areas"));
|
|
18
|
-
var _lastRevision = _interopRequireDefault(require("./last-revision"));
|
|
19
18
|
var _sidebarCard = _interopRequireDefault(require("../sidebar-card"));
|
|
20
|
-
var _patternCategories = _interopRequireDefault(require("./pattern-categories"));
|
|
21
|
-
var _constants = require("../../../utils/constants");
|
|
22
19
|
/**
|
|
23
20
|
* WordPress dependencies
|
|
24
21
|
*/
|
|
@@ -37,8 +34,7 @@ function TemplatePanel() {
|
|
|
37
34
|
title,
|
|
38
35
|
description,
|
|
39
36
|
icon,
|
|
40
|
-
record
|
|
41
|
-
postType
|
|
37
|
+
record
|
|
42
38
|
} = (0, _data.useSelect)(select => {
|
|
43
39
|
const {
|
|
44
40
|
getEditedPostType,
|
|
@@ -58,16 +54,13 @@ function TemplatePanel() {
|
|
|
58
54
|
title: info.title,
|
|
59
55
|
description: info.description,
|
|
60
56
|
icon: info.icon,
|
|
61
|
-
record: _record
|
|
62
|
-
postType: type
|
|
57
|
+
record: _record
|
|
63
58
|
};
|
|
64
59
|
}, []);
|
|
65
60
|
if (!title && !description) {
|
|
66
61
|
return null;
|
|
67
62
|
}
|
|
68
|
-
return (0, _react.createElement)(_components.PanelBody, {
|
|
69
|
-
className: "edit-site-template-panel"
|
|
70
|
-
}, (0, _react.createElement)(_sidebarCard.default, {
|
|
63
|
+
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.PanelBody, null, (0, _react.createElement)(_sidebarCard.default, {
|
|
71
64
|
className: "edit-site-template-card",
|
|
72
65
|
title: (0, _htmlEntities.decodeEntities)(title),
|
|
73
66
|
icon: (_CARD_ICONS$record$ty = CARD_ICONS[record?.type]) !== null && _CARD_ICONS$record$ty !== void 0 ? _CARD_ICONS$record$ty : icon,
|
|
@@ -75,8 +68,6 @@ function TemplatePanel() {
|
|
|
75
68
|
actions: (0, _react.createElement)(_templateActions.default, {
|
|
76
69
|
template: record
|
|
77
70
|
})
|
|
78
|
-
}, (0, _react.createElement)(_templateAreas.default, null)), (0, _react.createElement)(
|
|
79
|
-
post: record
|
|
80
|
-
}));
|
|
71
|
+
}, (0, _react.createElement)(_templateAreas.default, null))), (0, _react.createElement)(_editor.PostLastRevisionPanel, null), (0, _react.createElement)(_editor.PostTaxonomiesPanel, null), (0, _react.createElement)(_editor.PostFeaturedImagePanel, null), (0, _react.createElement)(_editor.PostExcerptPanel, null), (0, _react.createElement)(_editor.PostDiscussionPanel, null), (0, _react.createElement)(_editor.PageAttributesPanel, null));
|
|
81
72
|
}
|
|
82
73
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_components","_editor","_coreData","_htmlEntities","_icons","_store","_templateActions","_interopRequireDefault","_templateAreas","
|
|
1
|
+
{"version":3,"names":["_data","require","_components","_editor","_coreData","_htmlEntities","_icons","_store","_templateActions","_interopRequireDefault","_templateAreas","_sidebarCard","CARD_ICONS","wp_block","symbol","wp_navigation","navigation","TemplatePanel","_CARD_ICONS$record$ty","title","description","icon","record","useSelect","select","getEditedPostType","getEditedPostId","editSiteStore","getEditedEntityRecord","coreStore","__experimentalGetTemplateInfo","getTemplateInfo","editorStore","type","postId","_record","info","_react","createElement","Fragment","PanelBody","default","className","decodeEntities","actions","template","PostLastRevisionPanel","PostTaxonomiesPanel","PostFeaturedImagePanel","PostExcerptPanel","PostDiscussionPanel","PageAttributesPanel"],"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/template-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport {\n\tPageAttributesPanel,\n\tPostDiscussionPanel,\n\tPostExcerptPanel,\n\tPostFeaturedImagePanel,\n\tPostLastRevisionPanel,\n\tPostTaxonomiesPanel,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { navigation, symbol } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\nimport TemplateActions from './template-actions';\nimport TemplateAreas from './template-areas';\nimport SidebarCard from '../sidebar-card';\n\nconst CARD_ICONS = {\n\twp_block: symbol,\n\twp_navigation: navigation,\n};\n\nexport default function TemplatePanel() {\n\tconst { title, description, icon, record } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getEditedPostId } = select( editSiteStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst { __experimentalGetTemplateInfo: getTemplateInfo } =\n\t\t\tselect( editorStore );\n\n\t\tconst type = getEditedPostType();\n\t\tconst postId = getEditedPostId();\n\t\tconst _record = getEditedEntityRecord( 'postType', type, postId );\n\t\tconst info = getTemplateInfo( _record );\n\n\t\treturn {\n\t\t\ttitle: info.title,\n\t\t\tdescription: info.description,\n\t\t\ticon: info.icon,\n\t\t\trecord: _record,\n\t\t};\n\t}, [] );\n\n\tif ( ! title && ! description ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<PanelBody>\n\t\t\t\t<SidebarCard\n\t\t\t\t\tclassName=\"edit-site-template-card\"\n\t\t\t\t\ttitle={ decodeEntities( title ) }\n\t\t\t\t\ticon={ CARD_ICONS[ record?.type ] ?? icon }\n\t\t\t\t\tdescription={ decodeEntities( description ) }\n\t\t\t\t\tactions={ <TemplateActions template={ record } /> }\n\t\t\t\t>\n\t\t\t\t\t<TemplateAreas />\n\t\t\t\t</SidebarCard>\n\t\t\t</PanelBody>\n\t\t\t<PostLastRevisionPanel />\n\t\t\t<PostTaxonomiesPanel />\n\t\t\t<PostFeaturedImagePanel />\n\t\t\t<PostExcerptPanel />\n\t\t\t<PostDiscussionPanel />\n\t\t\t<PageAttributesPanel />\n\t\t</>\n\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D,mBAAmB,MAAE,CACrB,CAAC;AAEL"}
|
|
@@ -42,7 +42,7 @@ function SidebarNavigationScreenDetailsFooter({
|
|
|
42
42
|
return (0, _react.createElement)(_components.__experimentalItemGroup, {
|
|
43
43
|
className: "edit-site-sidebar-navigation-screen-details-footer"
|
|
44
44
|
}, (0, _react.createElement)(_sidebarNavigationItem.default, {
|
|
45
|
-
label: (0, _i18n.__)('Revisions'),
|
|
45
|
+
"aria-label": (0, _i18n.__)('Revisions'),
|
|
46
46
|
...hrefProps,
|
|
47
47
|
...otherProps
|
|
48
48
|
}, (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_date","_element","_url","_components","_icons","_sidebarNavigationScreenDetailsPanel","_sidebarNavigationItem","_interopRequireDefault","SidebarNavigationScreenDetailsFooter","record","otherProps","hrefProps","_links","id","href","addQueryArgs","revision","as","_react","createElement","__experimentalItemGroup","className","default","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_date","_element","_url","_components","_icons","_sidebarNavigationScreenDetailsPanel","_sidebarNavigationItem","_interopRequireDefault","SidebarNavigationScreenDetailsFooter","record","otherProps","hrefProps","_links","id","href","addQueryArgs","revision","as","_react","createElement","__experimentalItemGroup","className","default","__","SidebarNavigationScreenDetailsPanelRow","justify","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelValue","createInterpolateElement","sprintf","humanTimeDiff","modified","time","dateTime","Icon","icon","backup"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-footer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport {\n\tIcon,\n\t__experimentalItemGroup as ItemGroup,\n} from '@wordpress/components';\nimport { backup } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nexport default function SidebarNavigationScreenDetailsFooter( {\n\trecord,\n\t...otherProps\n} ) {\n\t/*\n\t * There might be other items in the future,\n\t * but for now it's just modified date.\n\t * Later we might render a list of items and isolate\n\t * the following logic.\n\t */\n\tconst hrefProps = {};\n\tif ( record?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ) {\n\t\threfProps.href = addQueryArgs( 'revision.php', {\n\t\t\trevision: record?._links[ 'predecessor-version' ][ 0 ].id,\n\t\t} );\n\t\threfProps.as = 'a';\n\t}\n\n\treturn (\n\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-details-footer\">\n\t\t\t<SidebarNavigationItem\n\t\t\t\taria-label={ __( 'Revisions' ) }\n\t\t\t\t{ ...hrefProps }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow justify=\"space-between\">\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: is the relative time when the post was last modified. */\n\t\t\t\t\t\t\t\t__( '<time>%s</time>' ),\n\t\t\t\t\t\t\t\thumanTimeDiff( record.modified )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttime: <time dateTime={ record.modified } />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-details-footer__icon\"\n\t\t\t\t\t\ticon={ backup }\n\t\t\t\t\t/>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t</SidebarNavigationItem>\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAIA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,oCAAA,GAAAN,OAAA;AAKA,IAAAO,sBAAA,GAAAC,sBAAA,CAAAR,OAAA;AArBA;AACA;AACA;;AAWA;AACA;AACA;;AAQe,SAASS,oCAAoCA,CAAE;EAC7DC,MAAM;EACN,GAAGC;AACJ,CAAC,EAAG;EACH;AACD;AACA;AACA;AACA;AACA;EACC,MAAMC,SAAS,GAAG,CAAC,CAAC;EACpB,IAAKF,MAAM,EAAEG,MAAM,GAAI,qBAAqB,CAAE,GAAI,CAAC,CAAE,EAAEC,EAAE,EAAG;IAC3DF,SAAS,CAACG,IAAI,GAAG,IAAAC,iBAAY,EAAE,cAAc,EAAE;MAC9CC,QAAQ,EAAEP,MAAM,EAAEG,MAAM,CAAE,qBAAqB,CAAE,CAAE,CAAC,CAAE,CAACC;IACxD,CAAE,CAAC;IACHF,SAAS,CAACM,EAAE,GAAG,GAAG;EACnB;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAiB,uBAAS;IAACC,SAAS,EAAC;EAAoD,GACxE,IAAAH,MAAA,CAAAC,aAAA,EAACb,sBAAA,CAAAgB,OAAqB;IACrB,cAAa,IAAAC,QAAE,EAAE,WAAY,CAAG;IAAA,GAC3BZ,SAAS;IAAA,GACTD;EAAU,GAEf,IAAAQ,MAAA,CAAAC,aAAA,EAACd,oCAAA,CAAAmB,sCAAsC;IAACC,OAAO,EAAC;EAAe,GAC9D,IAAAP,MAAA,CAAAC,aAAA,EAACd,oCAAA,CAAAqB,wCAAwC,QACtC,IAAAH,QAAE,EAAE,eAAgB,CACmB,CAAC,EAC3C,IAAAL,MAAA,CAAAC,aAAA,EAACd,oCAAA,CAAAsB,wCAAwC,QACtC,IAAAC,iCAAwB,EACzB,IAAAC,aAAO,GACN;EACA,IAAAN,QAAE,EAAE,iBAAkB,CAAC,EACvB,IAAAO,mBAAa,EAAErB,MAAM,CAACsB,QAAS,CAChC,CAAC,EACD;IACCC,IAAI,EAAE,IAAAd,MAAA,CAAAC,aAAA;MAAMc,QAAQ,EAAGxB,MAAM,CAACsB;IAAU,CAAE;EAC3C,CACD,CACyC,CAAC,EAC3C,IAAAb,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA+B,IAAI;IACJb,SAAS,EAAC,0DAA0D;IACpEc,IAAI,EAAGC;EAAQ,CACf,CACsC,CAClB,CACb,CAAC;AAEd"}
|
|
@@ -15,6 +15,7 @@ var _components = require("@wordpress/components");
|
|
|
15
15
|
var _compose = require("@wordpress/compose");
|
|
16
16
|
var _blockEditor = require("@wordpress/block-editor");
|
|
17
17
|
var _element = require("@wordpress/element");
|
|
18
|
+
var _editor = require("@wordpress/editor");
|
|
18
19
|
var _sidebarNavigationScreen = _interopRequireDefault(require("../sidebar-navigation-screen"));
|
|
19
20
|
var _styleVariationsContainer = _interopRequireDefault(require("../global-styles/style-variations-container"));
|
|
20
21
|
var _lockUnlock = require("../../lock-unlock");
|
|
@@ -87,9 +88,11 @@ function SidebarNavigationScreenGlobalStyles() {
|
|
|
87
88
|
isLoading: isLoadingRevisions
|
|
88
89
|
} = (0, _useGlobalStylesRevisions.default)();
|
|
89
90
|
const {
|
|
90
|
-
openGeneralSidebar
|
|
91
|
-
setIsListViewOpened
|
|
91
|
+
openGeneralSidebar
|
|
92
92
|
} = (0, _data.useDispatch)(_store.store);
|
|
93
|
+
const {
|
|
94
|
+
setIsListViewOpened
|
|
95
|
+
} = (0, _data.useDispatch)(_editor.store);
|
|
93
96
|
const isMobileViewport = (0, _compose.useViewportMatch)('medium', '<');
|
|
94
97
|
const {
|
|
95
98
|
setCanvasMode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_icons","_data","_coreData","_components","_compose","_blockEditor","_element","_sidebarNavigationScreen","_interopRequireDefault","_styleVariationsContainer","_lockUnlock","_store","_sidebarButton","_sidebarNavigationItem","_styleBook","_useGlobalStylesRevisions","_sidebarNavigationScreenDetailsFooter","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","useDispatch","editSiteStore","setCanvasMode","unlock","hasGlobalStyleVariations","useSelect","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","length","_react","createElement","__experimentalNavigatorButton","as","SidebarNavigationItem","path","default","onClick","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","BlockEditorProvider","settings","onChange","onInput","SidebarNavigationScreenGlobalStyles","revisions","isLoading","isLoadingRevisions","useGlobalStylesRevisions","setIsListViewOpened","isMobileViewport","useViewportMatch","setEditorCanvasContainerView","isViewMode","isStyleBookOpened","revisionsCount","_globalStyles$_links$","getCanvasMode","getEditorCanvasContainerView","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","openGlobalStyles","useCallback","Promise","all","openStyleBook","openRevisions","hasRevisions","modifiedDateTime","modified","shouldShowGlobalStylesFooter","Fragment","title","__","description","content","footer","record","actions","icon","seen","label","isPressed","edit","enableResizing","isSelected","onSelect","showCloseButton","showTabs"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalNavigatorButton as NavigatorButton } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<NavigatorButton\n\t\t\t\t{ ...props }\n\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\tpath=\"/wp_global_styles\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<StyleVariationsContainer />\n\t\t</BlockEditorProvider>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar, setIsListViewOpened } =\n\t\tuseDispatch( editSiteStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\treturn Promise.all( [\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount > 0;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\t\t\trecord={ revisions?.[ 0 ] }\n\t\t\t\t\t\t\tonClick={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\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\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAKA,IAAAQ,wBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,I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gBAAgB,IAAIG,UAAU,IACtD,IAAAxB,MAAA,CAAAC,aAAA,EAAClB,UAAA,CAAAuB,OAAS;IACTsD,cAAc,EAAG,KAAO;IACxBC,UAAU,EAAGA,CAAA,KAAM,KAAO;IAC1BtD,OAAO,EAAGkC,aAAe;IACzBqB,QAAQ,EAAGrB,aAAe;IAC1BsB,eAAe,EAAG,KAAO;IACzBC,QAAQ,EAAG;EAAO,CAClB,CAED,CAAC;AAEL"}
|
|
1
|
+
{"version":3,"names":["_i18n","require","_icons","_data","_coreData","_components","_compose","_blockEditor","_element","_editor","_sidebarNavigationScreen","_interopRequireDefault","_styleVariationsContainer","_lockUnlock","_store","_sidebarButton","_sidebarNavigationItem","_styleBook","_useGlobalStylesRevisions","_sidebarNavigationScreenDetailsFooter","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","useDispatch","editSiteStore","setCanvasMode","unlock","hasGlobalStyleVariations","useSelect","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","length","_react","createElement","__experimentalNavigatorButton","as","SidebarNavigationItem","path","default","onClick","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","BlockEditorProvider","settings","onChange","onInput","SidebarNavigationScreenGlobalStyles","revisions","isLoading","isLoadingRevisions","useGlobalStylesRevisions","setIsListViewOpened","editorStore","isMobileViewport","useViewportMatch","setEditorCanvasContainerView","isViewMode","isStyleBookOpened","revisionsCount","_globalStyles$_links$","getCanvasMode","getEditorCanvasContainerView","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","openGlobalStyles","useCallback","Promise","all","openStyleBook","openRevisions","hasRevisions","modifiedDateTime","modified","shouldShowGlobalStylesFooter","Fragment","title","__","description","content","footer","record","actions","icon","seen","label","isPressed","edit","enableResizing","isSelected","onSelect","showCloseButton","showTabs"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalNavigatorButton as NavigatorButton } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { useCallback } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<NavigatorButton\n\t\t\t\t{ ...props }\n\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\tpath=\"/wp_global_styles\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<StyleVariationsContainer />\n\t\t</BlockEditorProvider>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\treturn Promise.all( [\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount > 0;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\t\t\trecord={ revisions?.[ 0 ] }\n\t\t\t\t\t\t\tonClick={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\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\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,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,aAAA,EAACpB,cAAA,CAAAyB,OAAa;MACbkD,IAAI,EAAGI,WAAM;MACbF,KAAK,EAAG,IAAAR,QAAE,EAAE,aAAc,CAAG;MAC7B3C,OAAO,EAAG,MAAAA,CAAA,KAAY,MAAM+B,gBAAgB,CAAC;IAAG,CAChD,CACA;EACF,CACD,CAAC,EACAZ,iBAAiB,IAAI,CAAEJ,gBAAgB,IAAIG,UAAU,IACtD,IAAAzB,MAAA,CAAAC,aAAA,EAAClB,UAAA,CAAAuB,OAAS;IACTuD,cAAc,EAAG,KAAO;IACxBC,UAAU,EAAGA,CAAA,KAAM,KAAO;IAC1BvD,OAAO,EAAGmC,aAAe;IACzBqB,QAAQ,EAAGrB,aAAe;IAC1BsB,eAAe,EAAG,KAAO;IACzBC,QAAQ,EAAG;EAAO,CAClB,CAED,CAAC;AAEL"}
|
|
@@ -30,15 +30,18 @@ function RenameModal({
|
|
|
30
30
|
spacing: "3"
|
|
31
31
|
}, (0, _react.createElement)(_components.TextControl, {
|
|
32
32
|
__nextHasNoMarginBottom: true,
|
|
33
|
+
__next40pxDefaultSize: true,
|
|
33
34
|
value: editedMenuTitle,
|
|
34
35
|
placeholder: (0, _i18n.__)('Navigation title'),
|
|
35
36
|
onChange: setEditedMenuTitle
|
|
36
37
|
}), (0, _react.createElement)(_components.__experimentalHStack, {
|
|
37
38
|
justify: "right"
|
|
38
39
|
}, (0, _react.createElement)(_components.Button, {
|
|
40
|
+
__next40pxDefaultSize: true,
|
|
39
41
|
variant: "tertiary",
|
|
40
42
|
onClick: onClose
|
|
41
43
|
}, (0, _i18n.__)('Cancel')), (0, _react.createElement)(_components.Button, {
|
|
44
|
+
__next40pxDefaultSize: true,
|
|
42
45
|
disabled: !isEditedMenuTitleValid,
|
|
43
46
|
variant: "primary",
|
|
44
47
|
type: "submit",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_element","notEmptyString","testString","trim","length","RenameModal","menuTitle","onClose","onSave","editedMenuTitle","setEditedMenuTitle","useState","titleHasChanged","isEditedMenuTitleValid","_react","createElement","Modal","title","__","onRequestClose","className","__experimentalVStack","spacing","TextControl","__nextHasNoMarginBottom","value","placeholder","onChange","__experimentalHStack","justify","Button","variant","onClick","disabled","type","e","preventDefault"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tTextControl,\n\tModal,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\nconst notEmptyString = ( testString ) => testString?.trim()?.length > 0;\n\nexport default function RenameModal( { menuTitle, onClose, onSave } ) {\n\tconst [ editedMenuTitle, setEditedMenuTitle ] = useState( menuTitle );\n\n\tconst titleHasChanged = editedMenuTitle !== menuTitle;\n\n\tconst isEditedMenuTitleValid =\n\t\ttitleHasChanged && notEmptyString( editedMenuTitle );\n\n\treturn (\n\t\t<Modal title={ __( 'Rename' ) } onRequestClose={ onClose }>\n\t\t\t<form className=\"sidebar-navigation__rename-modal-form\">\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tvalue={ editedMenuTitle }\n\t\t\t\t\t\tplaceholder={ __( 'Navigation title' ) }\n\t\t\t\t\t\tonChange={ setEditedMenuTitle }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_element","notEmptyString","testString","trim","length","RenameModal","menuTitle","onClose","onSave","editedMenuTitle","setEditedMenuTitle","useState","titleHasChanged","isEditedMenuTitleValid","_react","createElement","Modal","title","__","onRequestClose","className","__experimentalVStack","spacing","TextControl","__nextHasNoMarginBottom","__next40pxDefaultSize","value","placeholder","onChange","__experimentalHStack","justify","Button","variant","onClick","disabled","type","e","preventDefault"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tTextControl,\n\tModal,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\nconst notEmptyString = ( testString ) => testString?.trim()?.length > 0;\n\nexport default function RenameModal( { menuTitle, onClose, onSave } ) {\n\tconst [ editedMenuTitle, setEditedMenuTitle ] = useState( menuTitle );\n\n\tconst titleHasChanged = editedMenuTitle !== menuTitle;\n\n\tconst isEditedMenuTitleValid =\n\t\ttitleHasChanged && notEmptyString( editedMenuTitle );\n\n\treturn (\n\t\t<Modal title={ __( 'Rename' ) } onRequestClose={ onClose }>\n\t\t\t<form className=\"sidebar-navigation__rename-modal-form\">\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvalue={ editedMenuTitle }\n\t\t\t\t\t\tplaceholder={ __( 'Navigation title' ) }\n\t\t\t\t\t\tonChange={ setEditedMenuTitle }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tdisabled={ ! isEditedMenuTitleValid }\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tonClick={ ( e ) => {\n\t\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\t\tif ( ! isEditedMenuTitleValid ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSave( { title: editedMenuTitle } );\n\n\t\t\t\t\t\t\t\t// Immediate close avoids ability to hit save multiple times.\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAXA;AACA;AACA;;AAWA,MAAMG,cAAc,GAAKC,UAAU,IAAMA,UAAU,EAAEC,IAAI,CAAC,CAAC,EAAEC,MAAM,GAAG,CAAC;AAExD,SAASC,WAAWA,CAAE;EAAEC,SAAS;EAAEC,OAAO;EAAEC;AAAO,CAAC,EAAG;EACrE,MAAM,CAAEC,eAAe,EAAEC,kBAAkB,CAAE,GAAG,IAAAC,iBAAQ,EAAEL,SAAU,CAAC;EAErE,MAAMM,eAAe,GAAGH,eAAe,KAAKH,SAAS;EAErD,MAAMO,sBAAsB,GAC3BD,eAAe,IAAIX,cAAc,CAAEQ,eAAgB,CAAC;EAErD,OACC,IAAAK,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAAmB,KAAK;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS,CAAG;IAACC,cAAc,EAAGZ;EAAS,GACzD,IAAAO,MAAA,CAAAC,aAAA;IAAMK,SAAS,EAAC;EAAuC,GACtD,IAAAN,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAAwB,oBAAM;IAACC,OAAO,EAAC;EAAG,GAClB,IAAAR,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAA0B,WAAW;IACXC,uBAAuB;IACvBC,qBAAqB;IACrBC,KAAK,EAAGjB,eAAiB;IACzBkB,WAAW,EAAG,IAAAT,QAAE,EAAE,kBAAmB,CAAG;IACxCU,QAAQ,EAAGlB;EAAoB,CAC/B,CAAC,EACF,IAAAI,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAAgC,oBAAM;IAACC,OAAO,EAAC;EAAO,GACtB,IAAAhB,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAAkC,MAAM;IACNN,qBAAqB;IACrBO,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAG1B;EAAS,GAEjB,IAAAW,QAAE,EAAE,QAAS,CACR,CAAC,EAET,IAAAJ,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAAkC,MAAM;IACNN,qBAAqB;IACrBS,QAAQ,EAAG,CAAErB,sBAAwB;IACrCmB,OAAO,EAAC,SAAS;IACjBG,IAAI,EAAC,QAAQ;IACbF,OAAO,EAAKG,CAAC,IAAM;MAClBA,CAAC,CAACC,cAAc,CAAC,CAAC;MAElB,IAAK,CAAExB,sBAAsB,EAAG;QAC/B;MACD;MACAL,MAAM,CAAE;QAAES,KAAK,EAAER;MAAgB,CAAE,CAAC;;MAEpC;MACAF,OAAO,CAAC,CAAC;IACV;EAAG,GAED,IAAAW,QAAE,EAAE,MAAO,CACN,CACD,CACD,CACH,CACA,CAAC;AAEV"}
|
|
@@ -35,7 +35,9 @@ var _sidebarNavigationScreenDetailsFooter = _interopRequireDefault(require("../s
|
|
|
35
35
|
const {
|
|
36
36
|
useHistory
|
|
37
37
|
} = (0, _lockUnlock.unlock)(_router.privateApis);
|
|
38
|
-
function SidebarNavigationScreenPage(
|
|
38
|
+
function SidebarNavigationScreenPage({
|
|
39
|
+
backPath
|
|
40
|
+
}) {
|
|
39
41
|
const {
|
|
40
42
|
setCanvasMode
|
|
41
43
|
} = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
|
|
@@ -78,6 +80,7 @@ function SidebarNavigationScreenPage() {
|
|
|
78
80
|
}, [hasResolved, history]);
|
|
79
81
|
const featureImageAltText = featuredMediaAltText ? (0, _htmlEntities.decodeEntities)(featuredMediaAltText) : (0, _htmlEntities.decodeEntities)(record?.title?.rendered || (0, _i18n.__)('Featured image'));
|
|
80
82
|
return record ? (0, _react.createElement)(_sidebarNavigationScreen.default, {
|
|
83
|
+
backPath: backPath,
|
|
81
84
|
title: (0, _htmlEntities.decodeEntities)(record?.title?.rendered || (0, _i18n.__)('(no title)')),
|
|
82
85
|
actions: (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_pageActions.default, {
|
|
83
86
|
postId: postId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_data","_components","_coreData","_htmlEntities","_icons","_dom","_escapeHtml","_url","_element","_router","_sidebarNavigationScreen","_interopRequireDefault","_lockUnlock","_store","_sidebarButton","_pageDetails","_pageActions","_sidebarNavigationScreenDetailsFooter","useHistory","unlock","routerPrivateApis","SidebarNavigationScreenPage","setCanvasMode","useDispatch","editSiteStore","history","params","postId","goTo","useNavigator","record","hasResolved","useEntityRecord","featuredMediaAltText","featuredMediaSourceUrl","useSelect","select","getEntityRecord","coreStore","attachedMedia","featured_media","media_details","sizes","medium","source_url","escapeAttribute","alt_text","description","raw","useEffect","push","path","undefined","postType","canvas","featureImageAltText","decodeEntities","title","rendered","__","_react","createElement","default","actions","Fragment","toggleProps","as","SidebarButton","onRemove","onClick","label","icon","pencil","meta","ExternalLink","className","href","link","filterURLForDisplay","safeDecodeURIComponent","content","__experimentalVStack","alignment","spacing","alt","src","excerpt","__experimentalTruncate","numberOfLines","stripHTML","id","footer","modified"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-page/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalVStack as VStack,\n\tExternalLink,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { pencil } from '@wordpress/icons';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { escapeAttribute } from '@wordpress/escape-html';\nimport { safeDecodeURIComponent, filterURLForDisplay } from '@wordpress/url';\nimport { useEffect } from '@wordpress/element';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport PageDetails from './page-details';\nimport PageActions from '../page-actions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreenPage() {\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst history = useHistory();\n\tconst {\n\t\tparams: { postId },\n\t\tgoTo,\n\t} = useNavigator();\n\tconst { record, hasResolved } = useEntityRecord(\n\t\t'postType',\n\t\t'page',\n\t\tpostId\n\t);\n\n\tconst { featuredMediaAltText, featuredMediaSourceUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\t// Featured image.\n\t\t\tconst attachedMedia = record?.featured_media\n\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'attachment',\n\t\t\t\t\t\trecord?.featured_media\n\t\t\t\t )\n\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\tfeaturedMediaSourceUrl:\n\t\t\t\t\tattachedMedia?.media_details.sizes?.medium?.source_url ||\n\t\t\t\t\tattachedMedia?.source_url,\n\t\t\t\tfeaturedMediaAltText: escapeAttribute(\n\t\t\t\t\tattachedMedia?.alt_text ||\n\t\t\t\t\t\tattachedMedia?.description?.raw ||\n\t\t\t\t\t\t''\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ record ]\n\t);\n\n\t// Redirect to the main pages navigation screen if the page is not found or has been deleted.\n\tuseEffect( () => {\n\t\tif ( hasResolved && ! record ) {\n\t\t\thistory.push( {\n\t\t\t\tpath: '/page',\n\t\t\t\tpostId: undefined,\n\t\t\t\tpostType: undefined,\n\t\t\t\tcanvas: 'view',\n\t\t\t} );\n\t\t}\n\t}, [ hasResolved, history ] );\n\n\tconst featureImageAltText = featuredMediaAltText\n\t\t? decodeEntities( featuredMediaAltText )\n\t\t: decodeEntities( record?.title?.rendered || __( 'Featured image' ) );\n\n\treturn record ? (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ decodeEntities(\n\t\t\t\trecord?.title?.rendered || __( '(no title)' )\n\t\t\t) }\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<PageActions\n\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\ttoggleProps={ { as: SidebarButton } }\n\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\tgoTo( '/page' );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\tonClick={ () => setCanvasMode( 'edit' ) }\n\t\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\t\ticon={ pencil }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tmeta={\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__page-link\"\n\t\t\t\t\thref={ record.link }\n\t\t\t\t>\n\t\t\t\t\t{ filterURLForDisplay(\n\t\t\t\t\t\tsafeDecodeURIComponent( record.link )\n\t\t\t\t\t) }\n\t\t\t\t</ExternalLink>\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ !! featuredMediaSourceUrl && (\n\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-page__featured-image-wrapper\"\n\t\t\t\t\t\t\talignment=\"left\"\n\t\t\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen-page__featured-image has-image\">\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\talt={ featureImageAltText }\n\t\t\t\t\t\t\t\t\tsrc={ featuredMediaSourceUrl }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! record?.excerpt?.rendered && (\n\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-page__excerpt\"\n\t\t\t\t\t\t\tnumberOfLines={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ stripHTML( record.excerpt.rendered ) }\n\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t) }\n\t\t\t\t\t<PageDetails id={ postId } />\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\trecord?.modified ? (\n\t\t\t\t\t<SidebarNavigationScreenDetailsFooter record={ record } />\n\t\t\t\t) : null\n\t\t\t}\n\t\t/>\n\t) : null;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAMA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAKA,IAAAW,wBAAA,GAAAC,sBAAA,CAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AACA,IAAAe,cAAA,GAAAH,sBAAA,CAAAZ,OAAA;AACA,IAAAgB,YAAA,GAAAJ,sBAAA,CAAAZ,OAAA;AACA,IAAAiB,YAAA,GAAAL,sBAAA,CAAAZ,OAAA;AACA,IAAAkB,qCAAA,GAAAN,sBAAA,CAAAZ,OAAA;AA7BA;AACA;AACA;;AAkBA;AACA;AACA;;AASA,MAAM;EAAEmB;AAAW,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEnC,SAASC,2BAA2BA,
|
|
1
|
+
{"version":3,"names":["_i18n","require","_data","_components","_coreData","_htmlEntities","_icons","_dom","_escapeHtml","_url","_element","_router","_sidebarNavigationScreen","_interopRequireDefault","_lockUnlock","_store","_sidebarButton","_pageDetails","_pageActions","_sidebarNavigationScreenDetailsFooter","useHistory","unlock","routerPrivateApis","SidebarNavigationScreenPage","backPath","setCanvasMode","useDispatch","editSiteStore","history","params","postId","goTo","useNavigator","record","hasResolved","useEntityRecord","featuredMediaAltText","featuredMediaSourceUrl","useSelect","select","getEntityRecord","coreStore","attachedMedia","featured_media","media_details","sizes","medium","source_url","escapeAttribute","alt_text","description","raw","useEffect","push","path","undefined","postType","canvas","featureImageAltText","decodeEntities","title","rendered","__","_react","createElement","default","actions","Fragment","toggleProps","as","SidebarButton","onRemove","onClick","label","icon","pencil","meta","ExternalLink","className","href","link","filterURLForDisplay","safeDecodeURIComponent","content","__experimentalVStack","alignment","spacing","alt","src","excerpt","__experimentalTruncate","numberOfLines","stripHTML","id","footer","modified"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-page/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalVStack as VStack,\n\tExternalLink,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { pencil } from '@wordpress/icons';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { escapeAttribute } from '@wordpress/escape-html';\nimport { safeDecodeURIComponent, filterURLForDisplay } from '@wordpress/url';\nimport { useEffect } from '@wordpress/element';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport PageDetails from './page-details';\nimport PageActions from '../page-actions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreenPage( { backPath } ) {\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst history = useHistory();\n\tconst {\n\t\tparams: { postId },\n\t\tgoTo,\n\t} = useNavigator();\n\tconst { record, hasResolved } = useEntityRecord(\n\t\t'postType',\n\t\t'page',\n\t\tpostId\n\t);\n\n\tconst { featuredMediaAltText, featuredMediaSourceUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\t// Featured image.\n\t\t\tconst attachedMedia = record?.featured_media\n\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'attachment',\n\t\t\t\t\t\trecord?.featured_media\n\t\t\t\t )\n\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\tfeaturedMediaSourceUrl:\n\t\t\t\t\tattachedMedia?.media_details.sizes?.medium?.source_url ||\n\t\t\t\t\tattachedMedia?.source_url,\n\t\t\t\tfeaturedMediaAltText: escapeAttribute(\n\t\t\t\t\tattachedMedia?.alt_text ||\n\t\t\t\t\t\tattachedMedia?.description?.raw ||\n\t\t\t\t\t\t''\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ record ]\n\t);\n\n\t// Redirect to the main pages navigation screen if the page is not found or has been deleted.\n\tuseEffect( () => {\n\t\tif ( hasResolved && ! record ) {\n\t\t\thistory.push( {\n\t\t\t\tpath: '/page',\n\t\t\t\tpostId: undefined,\n\t\t\t\tpostType: undefined,\n\t\t\t\tcanvas: 'view',\n\t\t\t} );\n\t\t}\n\t}, [ hasResolved, history ] );\n\n\tconst featureImageAltText = featuredMediaAltText\n\t\t? decodeEntities( featuredMediaAltText )\n\t\t: decodeEntities( record?.title?.rendered || __( 'Featured image' ) );\n\n\treturn record ? (\n\t\t<SidebarNavigationScreen\n\t\t\tbackPath={ backPath }\n\t\t\ttitle={ decodeEntities(\n\t\t\t\trecord?.title?.rendered || __( '(no title)' )\n\t\t\t) }\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<PageActions\n\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\ttoggleProps={ { as: SidebarButton } }\n\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\tgoTo( '/page' );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\tonClick={ () => setCanvasMode( 'edit' ) }\n\t\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\t\ticon={ pencil }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tmeta={\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__page-link\"\n\t\t\t\t\thref={ record.link }\n\t\t\t\t>\n\t\t\t\t\t{ filterURLForDisplay(\n\t\t\t\t\t\tsafeDecodeURIComponent( record.link )\n\t\t\t\t\t) }\n\t\t\t\t</ExternalLink>\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ !! featuredMediaSourceUrl && (\n\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-page__featured-image-wrapper\"\n\t\t\t\t\t\t\talignment=\"left\"\n\t\t\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen-page__featured-image has-image\">\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\talt={ featureImageAltText }\n\t\t\t\t\t\t\t\t\tsrc={ featuredMediaSourceUrl }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! record?.excerpt?.rendered && (\n\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-page__excerpt\"\n\t\t\t\t\t\t\tnumberOfLines={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ stripHTML( record.excerpt.rendered ) }\n\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t) }\n\t\t\t\t\t<PageDetails id={ postId } />\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\trecord?.modified ? (\n\t\t\t\t\t<SidebarNavigationScreenDetailsFooter record={ record } />\n\t\t\t\t) : null\n\t\t\t}\n\t\t/>\n\t) : null;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAMA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OA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AAAC,aAAA,EAAC7C,qCAAA,CAAA8C,OAAoC;MAAChC,MAAM,EAAGA;IAAQ,CAAE,CAAC,GACvD;EACJ,CACD,CAAC,GACC,IAAI;AACT"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = SidebarNavigationScreenPagesDataViews;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _components = require("@wordpress/components");
|
|
10
|
+
var _icons = require("@wordpress/icons");
|
|
11
|
+
var _element = require("@wordpress/element");
|
|
12
|
+
var _coreData = require("@wordpress/core-data");
|
|
13
|
+
var _htmlEntities = require("@wordpress/html-entities");
|
|
14
|
+
var _i18n = require("@wordpress/i18n");
|
|
15
|
+
var _link = require("../routes/link");
|
|
16
|
+
var _constants = require("../../utils/constants");
|
|
17
|
+
var _sidebarNavigationItem = _interopRequireDefault(require("../sidebar-navigation-item"));
|
|
18
|
+
var _sidebarNavigationScreen = _interopRequireDefault(require("../sidebar-navigation-screen"));
|
|
19
|
+
var _sidebarDataviews = _interopRequireDefault(require("../sidebar-dataviews"));
|
|
20
|
+
/**
|
|
21
|
+
* WordPress dependencies
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Internal dependencies
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
const PageItem = ({
|
|
29
|
+
postType = 'page',
|
|
30
|
+
postId,
|
|
31
|
+
...props
|
|
32
|
+
}) => {
|
|
33
|
+
const linkInfo = (0, _link.useLink)({
|
|
34
|
+
postType,
|
|
35
|
+
postId
|
|
36
|
+
}, {
|
|
37
|
+
backPath: '/page'
|
|
38
|
+
});
|
|
39
|
+
return (0, _react.createElement)(_sidebarNavigationItem.default, {
|
|
40
|
+
...linkInfo,
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
function SidebarNavigationScreenPagesDataViews() {
|
|
45
|
+
const {
|
|
46
|
+
records: templateRecords
|
|
47
|
+
} = (0, _coreData.useEntityRecords)('postType', _constants.TEMPLATE_POST_TYPE, {
|
|
48
|
+
per_page: -1
|
|
49
|
+
});
|
|
50
|
+
const templates = (0, _element.useMemo)(() => templateRecords?.filter(({
|
|
51
|
+
slug
|
|
52
|
+
}) => ['404', 'search'].includes(slug)), [templateRecords]);
|
|
53
|
+
return (0, _react.createElement)(_sidebarNavigationScreen.default, {
|
|
54
|
+
title: (0, _i18n.__)('Pages'),
|
|
55
|
+
content: (0, _react.createElement)(_sidebarDataviews.default, null),
|
|
56
|
+
footer: (0, _react.createElement)(_components.__experimentalVStack, {
|
|
57
|
+
spacing: 0
|
|
58
|
+
}, templates?.map(item => (0, _react.createElement)(PageItem, {
|
|
59
|
+
postType: _constants.TEMPLATE_POST_TYPE,
|
|
60
|
+
postId: item.id,
|
|
61
|
+
key: item.id,
|
|
62
|
+
icon: _icons.layout,
|
|
63
|
+
withChevron: true
|
|
64
|
+
}, (0, _react.createElement)(_components.__experimentalTruncate, {
|
|
65
|
+
numberOfLines: 1
|
|
66
|
+
}, (0, _htmlEntities.decodeEntities)(item.title?.rendered || (0, _i18n.__)('(no title)'))))))
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_components","require","_icons","_element","_coreData","_htmlEntities","_i18n","_link","_constants","_sidebarNavigationItem","_interopRequireDefault","_sidebarNavigationScreen","_sidebarDataviews","PageItem","postType","postId","props","linkInfo","useLink","backPath","_react","createElement","default","SidebarNavigationScreenPagesDataViews","records","templateRecords","useEntityRecords","TEMPLATE_POST_TYPE","per_page","templates","useMemo","filter","slug","includes","title","__","content","footer","__experimentalVStack","spacing","map","item","id","key","icon","layout","withChevron","__experimentalTruncate","numberOfLines","decodeEntities","rendered"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-pages-dataviews/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalTruncate as Truncate,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { layout } from '@wordpress/icons';\nimport { useMemo } from '@wordpress/element';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useLink } from '../routes/link';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\n\nconst PageItem = ( { postType = 'page', postId, ...props } ) => {\n\tconst linkInfo = useLink(\n\t\t{\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t},\n\t\t{\n\t\t\tbackPath: '/page',\n\t\t}\n\t);\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n\nexport default function SidebarNavigationScreenPagesDataViews() {\n\tconst { records: templateRecords } = useEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_POST_TYPE,\n\t\t{\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\tconst templates = useMemo(\n\t\t() =>\n\t\t\ttemplateRecords?.filter( ( { slug } ) =>\n\t\t\t\t[ '404', 'search' ].includes( slug )\n\t\t\t),\n\t\t[ templateRecords ]\n\t);\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ __( 'Pages' ) }\n\t\t\tcontent={ <DataViewsSidebarContent /> }\n\t\t\tfooter={\n\t\t\t\t<VStack spacing={ 0 }>\n\t\t\t\t\t{ templates?.map( ( item ) => (\n\t\t\t\t\t\t<PageItem\n\t\t\t\t\t\t\tpostType={ TEMPLATE_POST_TYPE }\n\t\t\t\t\t\t\tpostId={ item.id }\n\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t\t\t\t{ decodeEntities(\n\t\t\t\t\t\t\t\t\titem.title?.rendered || __( '(no title)' )\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t</PageItem>\n\t\t\t\t\t) ) }\n\t\t\t\t</VStack>\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAKA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,wBAAA,GAAAD,sBAAA,CAAAT,OAAA;AACA,IAAAW,iBAAA,GAAAF,sBAAA,CAAAT,OAAA;AApBA;AACA;AACA;;AAWA;AACA;AACA;;AAOA,MAAMY,QAAQ,GAAGA,CAAE;EAAEC,QAAQ,GAAG,MAAM;EAAEC,MAAM;EAAE,GAAGC;AAAM,CAAC,KAAM;EAC/D,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EACvB;IACCJ,QAAQ;IACRC;EACD,CAAC,EACD;IACCI,QAAQ,EAAE;EACX,CACD,CAAC;EACD,OAAO,IAAAC,MAAA,CAAAC,aAAA,EAACZ,sBAAA,CAAAa,OAAqB;IAAA,GAAML,QAAQ;IAAA,GAAQD;EAAK,CAAI,CAAC;AAC9D,CAAC;AAEc,SAASO,qCAAqCA,CAAA,EAAG;EAC/D,MAAM;IAAEC,OAAO,EAAEC;EAAgB,CAAC,GAAG,IAAAC,0BAAgB,EACpD,UAAU,EACVC,6BAAkB,EAClB;IACCC,QAAQ,EAAE,CAAC;EACZ,CACD,CAAC;EACD,MAAMC,SAAS,GAAG,IAAAC,gBAAO,EACxB,MACCL,eAAe,EAAEM,MAAM,CAAE,CAAE;IAAEC;EAAK,CAAC,KAClC,CAAE,KAAK,EAAE,QAAQ,CAAE,CAACC,QAAQ,CAAED,IAAK,CACpC,CAAC,EACF,CAAEP,eAAe,CAClB,CAAC;EAED,OACC,IAAAL,MAAA,CAAAC,aAAA,EAACV,wBAAA,CAAAW,OAAuB;IACvBY,KAAK,EAAG,IAAAC,QAAE,EAAE,OAAQ,CAAG;IACvBC,OAAO,EAAG,IAAAhB,MAAA,CAAAC,aAAA,EAACT,iBAAA,CAAAU,OAAuB,MAAE,CAAG;IACvCe,MAAM,EACL,IAAAjB,MAAA,CAAAC,aAAA,EAACrB,WAAA,CAAAsC,oBAAM;MAACC,OAAO,EAAG;IAAG,GAClBV,SAAS,EAAEW,GAAG,CAAIC,IAAI,IACvB,IAAArB,MAAA,CAAAC,aAAA,EAACR,QAAQ;MACRC,QAAQ,EAAGa,6BAAoB;MAC/BZ,MAAM,EAAG0B,IAAI,CAACC,EAAI;MAClBC,GAAG,EAAGF,IAAI,CAACC,EAAI;MACfE,IAAI,EAAGC,aAAQ;MACfC,WAAW;IAAA,GAEX,IAAA1B,MAAA,CAAAC,aAAA,EAACrB,WAAA,CAAA+C,sBAAQ;MAACC,aAAa,EAAG;IAAG,GAC1B,IAAAC,4BAAc,EACfR,IAAI,CAACP,KAAK,EAAEgB,QAAQ,IAAI,IAAAf,QAAE,EAAE,YAAa,CAC1C,CACS,CACD,CACT,CACK;EACR,CACD,CAAC;AAEJ"}
|
|
@@ -93,7 +93,7 @@ function usePatternCategories() {
|
|
|
93
93
|
sortedCategories.unshift({
|
|
94
94
|
name: _constants.PATTERN_DEFAULT_CATEGORY,
|
|
95
95
|
label: (0, _i18n.__)('All patterns'),
|
|
96
|
-
description: (0, _i18n.__)('A list of all patterns from all sources'),
|
|
96
|
+
description: (0, _i18n.__)('A list of all patterns from all sources.'),
|
|
97
97
|
count: themePatterns.length + userPatterns.length
|
|
98
98
|
});
|
|
99
99
|
return sortedCategories;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_i18n","_useDefaultPatternCategories","_interopRequireDefault","_useThemePatterns","_usePatterns","_constants","usePatternCategories","defaultCategories","useDefaultPatternCategories","push","name","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","label","__","themePatterns","useThemePatterns","patterns","userPatterns","categories","userPatternCategories","usePatterns","PATTERN_TYPES","user","patternCategories","useMemo","categoryMap","categoriesWithCounts","forEach","category","count","pattern","length","uncategorized","find","cat","sortedCategories","sort","a","b","localeCompare","unshift","PATTERN_USER_CATEGORY","PATTERN_DEFAULT_CATEGORY","description","hasPatterns"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useDefaultPatternCategories from './use-default-pattern-categories';\nimport useThemePatterns from './use-theme-patterns';\nimport usePatterns from '../page-patterns/use-patterns';\nimport {\n\tPATTERN_TYPES,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_USER_CATEGORY,\n\tTEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n} from '../../utils/constants';\n\nexport default function usePatternCategories() {\n\tconst defaultCategories = useDefaultPatternCategories();\n\tdefaultCategories.push( {\n\t\tname: TEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n\t\tlabel: __( 'Uncategorized' ),\n\t} );\n\tconst themePatterns = useThemePatterns();\n\tconst { patterns: userPatterns, categories: userPatternCategories } =\n\t\tusePatterns( PATTERN_TYPES.user );\n\n\tconst patternCategories = useMemo( () => {\n\t\tconst categoryMap = {};\n\t\tconst categoriesWithCounts = [];\n\n\t\t// Create a map for easier counting of patterns in categories.\n\t\tdefaultCategories.forEach( ( category ) => {\n\t\t\tif ( ! categoryMap[ category.name ] ) {\n\t\t\t\tcategoryMap[ category.name ] = { ...category, count: 0 };\n\t\t\t}\n\t\t} );\n\t\tuserPatternCategories.forEach( ( category ) => {\n\t\t\tif ( ! categoryMap[ category.name ] ) {\n\t\t\t\tcategoryMap[ category.name ] = { ...category, count: 0 };\n\t\t\t}\n\t\t} );\n\n\t\t// Update the category counts to reflect theme registered patterns.\n\t\tthemePatterns.forEach( ( pattern ) => {\n\t\t\tpattern.categories?.forEach( ( category ) => {\n\t\t\t\tif ( categoryMap[ category ] ) {\n\t\t\t\t\tcategoryMap[ category ].count += 1;\n\t\t\t\t}\n\t\t\t} );\n\t\t\t// If the pattern has no categories, add it to uncategorized.\n\t\t\tif ( ! pattern.categories?.length ) {\n\t\t\t\tcategoryMap.uncategorized.count += 1;\n\t\t\t}\n\t\t} );\n\n\t\t// Update the category counts to reflect user registered patterns.\n\t\tuserPatterns.forEach( ( pattern ) => {\n\t\t\tpattern.categories?.forEach( ( category ) => {\n\t\t\t\tif ( categoryMap[ category ] ) {\n\t\t\t\t\tcategoryMap[ category ].count += 1;\n\t\t\t\t}\n\t\t\t} );\n\t\t\t// If the pattern has no categories, add it to uncategorized.\n\t\t\tif ( ! pattern.categories?.length ) {\n\t\t\t\tcategoryMap.uncategorized.count += 1;\n\t\t\t}\n\t\t} );\n\n\t\t// Filter categories so we only have those containing patterns.\n\t\t[ ...defaultCategories, ...userPatternCategories ].forEach(\n\t\t\t( category ) => {\n\t\t\t\tif (\n\t\t\t\t\tcategoryMap[ category.name ].count &&\n\t\t\t\t\t! categoriesWithCounts.find(\n\t\t\t\t\t\t( cat ) => cat.name === category.name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tcategoriesWithCounts.push( categoryMap[ category.name ] );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\tconst sortedCategories = categoriesWithCounts.sort( ( a, b ) =>\n\t\t\ta.label.localeCompare( b.label )\n\t\t);\n\n\t\tsortedCategories.unshift( {\n\t\t\tname: PATTERN_USER_CATEGORY,\n\t\t\tlabel: __( 'My patterns' ),\n\t\t\tcount: userPatterns.length,\n\t\t} );\n\n\t\tsortedCategories.unshift( {\n\t\t\tname: PATTERN_DEFAULT_CATEGORY,\n\t\t\tlabel: __( 'All patterns' ),\n\t\t\tdescription: __( 'A list of all patterns from all sources' ),\n\t\t\tcount: themePatterns.length + userPatterns.length,\n\t\t} );\n\n\t\treturn sortedCategories;\n\t}, [\n\t\tdefaultCategories,\n\t\tthemePatterns,\n\t\tuserPatternCategories,\n\t\tuserPatterns,\n\t] );\n\n\treturn { patternCategories, hasPatterns: !! patternCategories.length };\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,4BAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,YAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAZA;AACA;AACA;;AAIA;AACA;AACA;;AAWe,SAASO,oBAAoBA,CAAA,EAAG;EAC9C,MAAMC,iBAAiB,GAAG,IAAAC,oCAA2B,EAAC,CAAC;EACvDD,iBAAiB,CAACE,IAAI,CAAE;IACvBC,IAAI,EAAEC,8CAAmC;IACzCC,KAAK,EAAE,IAAAC,QAAE,EAAE,eAAgB;EAC5B,CAAE,CAAC;EACH,MAAMC,aAAa,GAAG,IAAAC,yBAAgB,EAAC,CAAC;EACxC,MAAM;IAAEC,QAAQ,EAAEC,YAAY;IAAEC,UAAU,EAAEC;EAAsB,CAAC,GAClE,IAAAC,oBAAW,EAAEC,wBAAa,CAACC,IAAK,CAAC;EAElC,MAAMC,iBAAiB,GAAG,IAAAC,gBAAO,EAAE,MAAM;IACxC,MAAMC,WAAW,GA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AACO,aAAa,CAACH,KAAK,IAAI,CAAC;MACrC;IACD,CAAE,CAAC;;IAEH;IACA,CAAE,GAAGtB,iBAAiB,EAAE,GAAGY,qBAAqB,CAAE,CAACQ,OAAO,CACvDC,QAAQ,IAAM;MACf,IACCH,WAAW,CAAEG,QAAQ,CAAClB,IAAI,CAAE,CAACmB,KAAK,IAClC,CAAEH,oBAAoB,CAACO,IAAI,CACxBC,GAAG,IAAMA,GAAG,CAACxB,IAAI,KAAKkB,QAAQ,CAAClB,IAClC,CAAC,EACA;QACDgB,oBAAoB,CAACjB,IAAI,CAAEgB,WAAW,CAAEG,QAAQ,CAAClB,IAAI,CAAG,CAAC;MAC1D;IACD,CACD,CAAC;IACD,MAAMyB,gBAAgB,GAAGT,oBAAoB,CAACU,IAAI,CAAE,CAAEC,CAAC,EAAEC,CAAC,KACzDD,CAAC,CAACzB,KAAK,CAAC2B,aAAa,CAAED,CAAC,CAAC1B,KAAM,CAChC,CAAC;IAEDuB,gBAAgB,CAACK,OAAO,CAAE;MACzB9B,IAAI,EAAE+B,gCAAqB;MAC3B7B,KAAK,EAAE,IAAAC,QAAE,EAAE,aAAc,CAAC;MAC1BgB,KAAK,EAAEZ,YAAY,CAACc;IACrB,CAAE,CAAC;IAEHI,gBAAgB,CAACK,OAAO,CAAE;MACzB9B,IAAI,EAAEgC,mCAAwB;MAC9B9B,KAAK,EAAE,IAAAC,QAAE,EAAE,cAAe,CAAC;MAC3B8B,WAAW,EAAE,IAAA9B,QAAE,EAAE,
|
|
1
|
+
{"version":3,"names":["_element","require","_i18n","_useDefaultPatternCategories","_interopRequireDefault","_useThemePatterns","_usePatterns","_constants","usePatternCategories","defaultCategories","useDefaultPatternCategories","push","name","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","label","__","themePatterns","useThemePatterns","patterns","userPatterns","categories","userPatternCategories","usePatterns","PATTERN_TYPES","user","patternCategories","useMemo","categoryMap","categoriesWithCounts","forEach","category","count","pattern","length","uncategorized","find","cat","sortedCategories","sort","a","b","localeCompare","unshift","PATTERN_USER_CATEGORY","PATTERN_DEFAULT_CATEGORY","description","hasPatterns"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useDefaultPatternCategories from './use-default-pattern-categories';\nimport useThemePatterns from './use-theme-patterns';\nimport usePatterns from '../page-patterns/use-patterns';\nimport {\n\tPATTERN_TYPES,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_USER_CATEGORY,\n\tTEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n} from '../../utils/constants';\n\nexport default function usePatternCategories() {\n\tconst defaultCategories = useDefaultPatternCategories();\n\tdefaultCategories.push( {\n\t\tname: TEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n\t\tlabel: __( 'Uncategorized' ),\n\t} );\n\tconst themePatterns = useThemePatterns();\n\tconst { patterns: userPatterns, categories: userPatternCategories } =\n\t\tusePatterns( PATTERN_TYPES.user );\n\n\tconst patternCategories = useMemo( () => {\n\t\tconst categoryMap = {};\n\t\tconst categoriesWithCounts = [];\n\n\t\t// Create a map for easier counting of patterns in categories.\n\t\tdefaultCategories.forEach( ( category ) => {\n\t\t\tif ( ! categoryMap[ category.name ] ) {\n\t\t\t\tcategoryMap[ category.name ] = { ...category, count: 0 };\n\t\t\t}\n\t\t} );\n\t\tuserPatternCategories.forEach( ( category ) => {\n\t\t\tif ( ! categoryMap[ category.name ] ) {\n\t\t\t\tcategoryMap[ category.name ] = { ...category, count: 0 };\n\t\t\t}\n\t\t} );\n\n\t\t// Update the category counts to reflect theme registered patterns.\n\t\tthemePatterns.forEach( ( pattern ) => {\n\t\t\tpattern.categories?.forEach( ( category ) => {\n\t\t\t\tif ( categoryMap[ category ] ) {\n\t\t\t\t\tcategoryMap[ category ].count += 1;\n\t\t\t\t}\n\t\t\t} );\n\t\t\t// If the pattern has no categories, add it to uncategorized.\n\t\t\tif ( ! pattern.categories?.length ) {\n\t\t\t\tcategoryMap.uncategorized.count += 1;\n\t\t\t}\n\t\t} );\n\n\t\t// Update the category counts to reflect user registered patterns.\n\t\tuserPatterns.forEach( ( pattern ) => {\n\t\t\tpattern.categories?.forEach( ( category ) => {\n\t\t\t\tif ( categoryMap[ category ] ) {\n\t\t\t\t\tcategoryMap[ category ].count += 1;\n\t\t\t\t}\n\t\t\t} );\n\t\t\t// If the pattern has no categories, add it to uncategorized.\n\t\t\tif ( ! pattern.categories?.length ) {\n\t\t\t\tcategoryMap.uncategorized.count += 1;\n\t\t\t}\n\t\t} );\n\n\t\t// Filter categories so we only have those containing patterns.\n\t\t[ ...defaultCategories, ...userPatternCategories ].forEach(\n\t\t\t( category ) => {\n\t\t\t\tif (\n\t\t\t\t\tcategoryMap[ category.name ].count &&\n\t\t\t\t\t! categoriesWithCounts.find(\n\t\t\t\t\t\t( cat ) => cat.name === category.name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tcategoriesWithCounts.push( categoryMap[ category.name ] );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\tconst sortedCategories = categoriesWithCounts.sort( ( a, b ) =>\n\t\t\ta.label.localeCompare( b.label )\n\t\t);\n\n\t\tsortedCategories.unshift( {\n\t\t\tname: PATTERN_USER_CATEGORY,\n\t\t\tlabel: __( 'My patterns' ),\n\t\t\tcount: userPatterns.length,\n\t\t} );\n\n\t\tsortedCategories.unshift( {\n\t\t\tname: PATTERN_DEFAULT_CATEGORY,\n\t\t\tlabel: __( 'All patterns' ),\n\t\t\tdescription: __( 'A list of all patterns from all sources.' ),\n\t\t\tcount: themePatterns.length + userPatterns.length,\n\t\t} );\n\n\t\treturn sortedCategories;\n\t}, [\n\t\tdefaultCategories,\n\t\tthemePatterns,\n\t\tuserPatternCategories,\n\t\tuserPatterns,\n\t] );\n\n\treturn { patternCategories, hasPatterns: !! patternCategories.length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