@wordpress/edit-site 5.19.6 → 5.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/add-new-page/index.js +9 -8
- package/build/components/add-new-page/index.js.map +1 -1
- package/build/components/add-new-pattern/index.js +6 -5
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +8 -7
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js +20 -19
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +2 -2
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/new-template.js +17 -16
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/add-new-template/template-actions-loading-screen.js +4 -4
- package/build/components/add-new-template/template-actions-loading-screen.js.map +1 -1
- package/build/components/app/index.js +2 -2
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/back-button.js +2 -2
- package/build/components/block-editor/back-button.js.map +1 -1
- package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js +10 -6
- package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +1 -1
- package/build/components/block-editor/block-editor-provider/index.js +3 -3
- package/build/components/block-editor/block-editor-provider/index.js.map +1 -1
- package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +3 -2
- package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js.map +1 -1
- package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js +19 -11
- package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +1 -1
- package/build/components/block-editor/block-inspector-button.js +2 -2
- package/build/components/block-editor/block-inspector-button.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +4 -3
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/index.js +2 -2
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/block-editor/resizable-editor.js +4 -3
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/block-editor/resize-handle.js +3 -3
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/block-editor/site-editor-canvas.js +8 -7
- package/build/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build/components/canvas-loader/index.js +4 -4
- package/build/components/canvas-loader/index.js.map +1 -1
- package/build/components/code-editor/index.js +8 -7
- package/build/components/code-editor/index.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +17 -16
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/dataviews/dataviews.js +61 -0
- package/build/components/dataviews/dataviews.js.map +1 -0
- package/build/components/dataviews/index.js +21 -0
- package/build/components/dataviews/index.js.map +1 -0
- package/build/components/dataviews/list-view.js +89 -0
- package/build/components/dataviews/list-view.js.map +1 -0
- package/build/components/dataviews/pagination.js +89 -0
- package/build/components/dataviews/pagination.js.map +1 -0
- package/build/components/dataviews/text-filter.js +44 -0
- package/build/components/dataviews/text-filter.js.map +1 -0
- package/build/components/dataviews/view-actions.js +189 -0
- package/build/components/dataviews/view-actions.js.map +1 -0
- package/build/components/editor/index.js +15 -14
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +4 -3
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/error-boundary/index.js +2 -1
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/error-boundary/warning.js +4 -4
- package/build/components/error-boundary/warning.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +5 -4
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/color-indicator-wrapper.js +2 -2
- package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +5 -5
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +3 -2
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/font-families.js +14 -14
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-family-item.js +6 -5
- package/build/components/global-styles/font-family-item.js.map +1 -1
- package/build/components/global-styles/font-library-modal/collection-font-details.js +6 -6
- package/build/components/global-styles/font-library-modal/collection-font-details.js.map +1 -1
- package/build/components/global-styles/font-library-modal/collection-font-variant.js +5 -5
- 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 +2 -2
- 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 +2 -1
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-card.js +7 -7
- package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +17 -16
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-demo.js +5 -4
- package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-variant.js +7 -7
- package/build/components/global-styles/font-library-modal/font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/fonts-grid.js +8 -7
- package/build/components/global-styles/font-library-modal/fonts-grid.js.map +1 -1
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +9 -9
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
- package/build/components/global-styles/font-library-modal/index.js +7 -6
- package/build/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +17 -16
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/library-font-card.js +3 -2
- package/build/components/global-styles/font-library-modal/library-font-card.js.map +1 -1
- package/build/components/global-styles/font-library-modal/library-font-details.js +6 -6
- package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
- package/build/components/global-styles/font-library-modal/library-font-variant.js +5 -4
- 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 +12 -11
- package/build/components/global-styles/font-library-modal/local-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/tab-layout.js +9 -9
- package/build/components/global-styles/font-library-modal/tab-layout.js.map +1 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js +3 -3
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js +3 -2
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +8 -8
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/header.js +7 -7
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/icon-with-current-color.js +2 -2
- package/build/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build/components/global-styles/navigation-button.js +7 -7
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +11 -10
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview.js +17 -16
- package/build/components/global-styles/preview.js.map +1 -1
- package/build/components/global-styles/root-menu.js +4 -4
- package/build/components/global-styles/root-menu.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +10 -9
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +17 -16
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +5 -5
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +5 -5
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js +5 -5
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +3 -3
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +10 -9
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +10 -10
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/screen-root.js +14 -14
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +5 -4
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js +15 -14
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +5 -5
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +8 -7
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/subtitle.js +2 -2
- package/build/components/global-styles/subtitle.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +2 -2
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-preview.js +2 -2
- package/build/components/global-styles/typography-preview.js.map +1 -1
- package/build/components/global-styles/typogrphy-elements.js +13 -13
- package/build/components/global-styles/typogrphy-elements.js.map +1 -1
- package/build/components/global-styles/ui.js +41 -40
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/variations-panel.js +3 -3
- package/build/components/global-styles/variations-panel.js.map +1 -1
- package/build/components/header-edit-mode/document-actions/index.js +16 -15
- package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build/components/header-edit-mode/index.js +20 -19
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/mode-switcher/index.js +3 -3
- package/build/components/header-edit-mode/mode-switcher/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +2 -2
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +14 -14
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/site-export.js +2 -2
- package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +2 -2
- package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build/components/header-edit-mode/plugin-more-menu-item/index.js +1 -1
- package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -3
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build/components/header-edit-mode/tools-more-menu-group/index.js +2 -2
- package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
- package/build/components/header-edit-mode/undo-redo/redo.js +3 -2
- package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
- package/build/components/header-edit-mode/undo-redo/undo.js +3 -2
- package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +15 -15
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +8 -7
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/layout/index.js +15 -14
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/added-by.js +9 -8
- package/build/components/list/added-by.js.map +1 -1
- package/build/components/list/header.js +5 -5
- package/build/components/list/header.js.map +1 -1
- package/build/components/list/index.js +5 -5
- package/build/components/list/index.js.map +1 -1
- package/build/components/list/table.js +15 -15
- package/build/components/list/table.js.map +1 -1
- package/build/components/page/header.js +6 -6
- package/build/components/page/header.js.map +1 -1
- package/build/components/page/index.js +5 -5
- package/build/components/page/index.js.map +1 -1
- package/build/components/page-actions/index.js +3 -3
- package/build/components/page-actions/index.js.map +1 -1
- package/build/components/page-actions/trash-page-menu-item.js +2 -2
- package/build/components/page-actions/trash-page-menu-item.js.map +1 -1
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +3 -2
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/page-content-focus-manager/edit-template-notification.js +3 -2
- package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
- package/build/components/page-content-focus-manager/index.js +35 -4
- package/build/components/page-content-focus-manager/index.js.map +1 -1
- package/build/components/page-main/index.js +7 -4
- package/build/components/page-main/index.js.map +1 -1
- package/build/components/page-pages/index.js +174 -0
- package/build/components/page-pages/index.js.map +1 -0
- package/build/components/page-patterns/duplicate-menu-item.js +2 -2
- package/build/components/page-patterns/duplicate-menu-item.js.map +1 -1
- package/build/components/page-patterns/grid-item.js +21 -20
- package/build/components/page-patterns/grid-item.js.map +1 -1
- package/build/components/page-patterns/grid.js +3 -3
- package/build/components/page-patterns/grid.js.map +1 -1
- package/build/components/page-patterns/header.js +4 -4
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +4 -4
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/no-patterns.js +2 -2
- package/build/components/page-patterns/no-patterns.js.map +1 -1
- package/build/components/page-patterns/pagination.js +10 -10
- package/build/components/page-patterns/pagination.js.map +1 -1
- package/build/components/page-patterns/patterns-list.js +15 -14
- package/build/components/page-patterns/patterns-list.js.map +1 -1
- package/build/components/page-patterns/rename-menu-item.js +10 -9
- package/build/components/page-patterns/rename-menu-item.js.map +1 -1
- package/build/components/page-template-parts/add-new-template-part.js +4 -3
- package/build/components/page-template-parts/add-new-template-part.js.map +1 -1
- package/build/components/page-template-parts/index.js +9 -9
- package/build/components/page-template-parts/index.js.map +1 -1
- package/build/components/page-templates/index.js +10 -10
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +1 -1
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/preferences-modal/enable-feature.js +2 -2
- package/build/components/preferences-modal/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/index.js +12 -11
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/resizable-frame/index.js +7 -6
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/revisions/index.js +9 -8
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/routes/link.js +2 -2
- package/build/components/routes/link.js.map +1 -1
- package/build/components/save-button/index.js +2 -2
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +4 -4
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-panel/index.js +11 -11
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +7 -6
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +7 -6
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +23 -14
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js +2 -2
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/default-sidebar.js +3 -3
- package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +8 -7
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +6 -5
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js +20 -10
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/index.js +7 -7
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-content.js +3 -2
- package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-status.js +21 -20
- package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js +4 -4
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/publish-date.js +7 -6
- package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js +2 -2
- package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js +7 -6
- package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +1 -1
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -2
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/settings-header/index.js +3 -3
- package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/sidebar-card/index.js +7 -7
- package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +2 -2
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js +5 -5
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/last-revision.js +5 -5
- package/build/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/pattern-categories.js +4 -3
- package/build/components/sidebar-edit-mode/template-panel/pattern-categories.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/replace-template-button.js +7 -6
- package/build/components/sidebar-edit-mode/template-panel/replace-template-button.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/template-actions.js +4 -4
- package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js +7 -7
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
- package/build/components/sidebar-navigation-item/index.js +5 -5
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +11 -11
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +8 -7
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/index.js +3 -3
- package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +2 -2
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +2 -2
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +2 -2
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +12 -11
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +9 -8
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/template-part-hint.js +2 -2
- package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +4 -4
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -7
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +8 -7
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +4 -3
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +9 -8
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +5 -5
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +8 -8
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +7 -6
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +5 -4
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +11 -11
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/page-details.js +6 -6
- package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/status-label.js +5 -4
- package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pages/index.js +26 -17
- package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +4 -4
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +4 -4
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +3 -3
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +6 -5
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +4 -4
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +2 -2
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +7 -7
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -3
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +14 -14
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/home-template-details.js +13 -12
- package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js +12 -12
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates/index.js +6 -6
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +2 -2
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/site-hub/index.js +12 -11
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js +5 -5
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/start-template-options/index.js +10 -9
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/style-book/index.js +19 -18
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/table/index.js +6 -6
- package/build/components/table/index.js.map +1 -1
- package/build/components/template-actions/index.js +8 -7
- package/build/components/template-actions/index.js.map +1 -1
- package/build/components/template-actions/rename-menu-item.js +10 -9
- package/build/components/template-actions/rename-menu-item.js.map +1 -1
- package/build/components/template-part-converter/convert-to-regular.js +2 -2
- package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js +4 -3
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/components/template-part-converter/index.js +5 -5
- package/build/components/template-part-converter/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js +8 -7
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/image.js +4 -4
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js +2 -2
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/page.js +6 -6
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/components/welcome-guide/styles.js +15 -15
- package/build/components/welcome-guide/styles.js.map +1 -1
- package/build/components/welcome-guide/template.js +6 -6
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +2 -2
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/navigation-menu-edit.js +5 -5
- package/build/hooks/navigation-menu-edit.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +6 -5
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/template-part-edit.js +5 -5
- package/build/hooks/template-part-edit.js.map +1 -1
- package/build/index.js +3 -2
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/store/selectors.js +5 -4
- package/build/store/selectors.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-page/index.js +1 -1
- package/build-module/components/add-new-pattern/index.js +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js +1 -1
- package/build-module/components/add-new-template/index.js +1 -1
- package/build-module/components/add-new-template/new-template.js +1 -1
- package/build-module/components/add-new-template/template-actions-loading-screen.js +1 -1
- package/build-module/components/app/index.js +1 -1
- package/build-module/components/block-editor/back-button.js +1 -1
- package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js +9 -5
- package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +1 -1
- package/build-module/components/block-editor/block-editor-provider/index.js +1 -1
- package/build-module/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +1 -1
- package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js +19 -11
- package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +1 -1
- package/build-module/components/block-editor/block-inspector-button.js +1 -1
- package/build-module/components/block-editor/editor-canvas.js +1 -1
- package/build-module/components/block-editor/index.js +1 -1
- package/build-module/components/block-editor/resizable-editor.js +1 -1
- package/build-module/components/block-editor/resize-handle.js +1 -1
- package/build-module/components/block-editor/site-editor-canvas.js +1 -1
- package/build-module/components/canvas-loader/index.js +1 -1
- package/build-module/components/code-editor/index.js +1 -1
- package/build-module/components/create-template-part-modal/index.js +1 -1
- package/build-module/components/dataviews/dataviews.js +53 -0
- package/build-module/components/dataviews/dataviews.js.map +1 -0
- package/build-module/components/dataviews/index.js +3 -0
- package/build-module/components/dataviews/index.js.map +1 -0
- package/build-module/components/dataviews/list-view.js +80 -0
- package/build-module/components/dataviews/list-view.js.map +1 -0
- package/build-module/components/dataviews/pagination.js +83 -0
- package/build-module/components/dataviews/pagination.js.map +1 -0
- package/build-module/components/dataviews/text-filter.js +36 -0
- package/build-module/components/dataviews/text-filter.js.map +1 -0
- package/build-module/components/dataviews/view-actions.js +179 -0
- package/build-module/components/dataviews/view-actions.js.map +1 -0
- package/build-module/components/editor/index.js +1 -1
- package/build-module/components/editor-canvas-container/index.js +1 -1
- package/build-module/components/error-boundary/index.js +1 -1
- package/build-module/components/error-boundary/warning.js +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +1 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +1 -1
- package/build-module/components/global-styles/font-families.js +3 -4
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-family-item.js +1 -1
- package/build-module/components/global-styles/font-library-modal/collection-font-details.js +1 -1
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +1 -1
- package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +1 -1
- package/build-module/components/global-styles/font-library-modal/font-card.js +1 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +1 -1
- package/build-module/components/global-styles/font-library-modal/font-demo.js +1 -1
- package/build-module/components/global-styles/font-library-modal/font-variant.js +1 -1
- package/build-module/components/global-styles/font-library-modal/fonts-grid.js +1 -1
- package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +1 -1
- package/build-module/components/global-styles/font-library-modal/index.js +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +1 -1
- package/build-module/components/global-styles/font-library-modal/library-font-card.js +1 -1
- package/build-module/components/global-styles/font-library-modal/library-font-details.js +1 -1
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js +1 -1
- package/build-module/components/global-styles/font-library-modal/local-fonts.js +1 -1
- package/build-module/components/global-styles/font-library-modal/tab-layout.js +1 -1
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js +1 -1
- package/build-module/components/global-styles/global-styles-provider.js +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +1 -1
- package/build-module/components/global-styles/header.js +1 -1
- package/build-module/components/global-styles/icon-with-current-color.js +1 -1
- package/build-module/components/global-styles/navigation-button.js +1 -1
- package/build-module/components/global-styles/palette.js +1 -1
- package/build-module/components/global-styles/preview.js +1 -1
- package/build-module/components/global-styles/root-menu.js +1 -1
- package/build-module/components/global-styles/screen-block-list.js +1 -1
- package/build-module/components/global-styles/screen-block.js +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +1 -1
- package/build-module/components/global-styles/screen-colors.js +1 -1
- package/build-module/components/global-styles/screen-css.js +1 -1
- package/build-module/components/global-styles/screen-layout.js +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/build-module/components/global-styles/screen-root.js +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +1 -1
- package/build-module/components/global-styles/screen-typography-element.js +1 -1
- package/build-module/components/global-styles/screen-typography.js +2 -2
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +1 -1
- package/build-module/components/global-styles/subtitle.js +1 -1
- package/build-module/components/global-styles/typography-panel.js +1 -1
- package/build-module/components/global-styles/typography-preview.js +1 -1
- package/build-module/components/global-styles/typogrphy-elements.js +1 -1
- package/build-module/components/global-styles/ui.js +1 -1
- package/build-module/components/global-styles/variations-panel.js +1 -1
- package/build-module/components/header-edit-mode/document-actions/index.js +1 -1
- package/build-module/components/header-edit-mode/index.js +1 -1
- package/build-module/components/header-edit-mode/mode-switcher/index.js +1 -1
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +1 -1
- package/build-module/components/header-edit-mode/more-menu/site-export.js +1 -1
- package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +1 -1
- package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +1 -1
- package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +2 -2
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +1 -1
- package/build-module/components/header-edit-mode/undo-redo/redo.js +1 -1
- package/build-module/components/header-edit-mode/undo-redo/undo.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -1
- package/build-module/components/layout/index.js +1 -1
- package/build-module/components/list/added-by.js +1 -1
- package/build-module/components/list/header.js +1 -1
- package/build-module/components/list/index.js +1 -1
- package/build-module/components/list/table.js +1 -1
- package/build-module/components/page/header.js +1 -1
- package/build-module/components/page/index.js +1 -1
- package/build-module/components/page-actions/index.js +1 -1
- package/build-module/components/page-actions/trash-page-menu-item.js +1 -1
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +1 -1
- package/build-module/components/page-content-focus-manager/edit-template-notification.js +1 -1
- package/build-module/components/page-content-focus-manager/index.js +34 -4
- package/build-module/components/page-content-focus-manager/index.js.map +1 -1
- package/build-module/components/page-main/index.js +4 -1
- package/build-module/components/page-main/index.js.map +1 -1
- package/build-module/components/page-pages/index.js +166 -0
- package/build-module/components/page-pages/index.js.map +1 -0
- package/build-module/components/page-patterns/duplicate-menu-item.js +1 -1
- package/build-module/components/page-patterns/grid-item.js +1 -1
- package/build-module/components/page-patterns/grid.js +1 -1
- package/build-module/components/page-patterns/header.js +1 -1
- package/build-module/components/page-patterns/index.js +1 -1
- package/build-module/components/page-patterns/no-patterns.js +1 -1
- package/build-module/components/page-patterns/pagination.js +1 -1
- package/build-module/components/page-patterns/patterns-list.js +1 -1
- package/build-module/components/page-patterns/rename-menu-item.js +1 -1
- package/build-module/components/page-template-parts/add-new-template-part.js +1 -1
- package/build-module/components/page-template-parts/index.js +1 -1
- package/build-module/components/page-templates/index.js +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/preferences-modal/enable-feature.js +1 -1
- package/build-module/components/preferences-modal/index.js +1 -1
- package/build-module/components/resizable-frame/index.js +1 -1
- package/build-module/components/revisions/index.js +1 -1
- package/build-module/components/routes/link.js +1 -1
- package/build-module/components/save-button/index.js +1 -1
- package/build-module/components/save-hub/index.js +1 -1
- package/build-module/components/save-panel/index.js +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -1
- package/build-module/components/sidebar/index.js +10 -2
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js +1 -1
- package/build-module/components/sidebar-edit-mode/default-sidebar.js +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +15 -5
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js +1 -1
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +1 -1
- package/build-module/components/sidebar-edit-mode/settings-header/index.js +1 -1
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +1 -1
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/pattern-categories.js +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/replace-template-button.js +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +1 -1
- package/build-module/components/sidebar-navigation-item/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +1 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-page/page-details.js +1 -1
- package/build-module/components/sidebar-navigation-screen-page/status-label.js +1 -1
- package/build-module/components/sidebar-navigation-screen-pages/index.js +13 -5
- package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +3 -3
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +4 -3
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-templates/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +1 -1
- package/build-module/components/site-hub/index.js +1 -1
- package/build-module/components/site-icon/index.js +1 -1
- package/build-module/components/start-template-options/index.js +4 -4
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/style-book/index.js +1 -1
- package/build-module/components/table/index.js +1 -1
- package/build-module/components/template-actions/index.js +1 -1
- package/build-module/components/template-actions/rename-menu-item.js +1 -1
- package/build-module/components/template-part-converter/convert-to-regular.js +1 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js +1 -1
- package/build-module/components/template-part-converter/index.js +1 -1
- package/build-module/components/welcome-guide/editor.js +1 -1
- package/build-module/components/welcome-guide/image.js +1 -1
- package/build-module/components/welcome-guide/index.js +1 -1
- package/build-module/components/welcome-guide/page.js +1 -1
- package/build-module/components/welcome-guide/styles.js +1 -1
- package/build-module/components/welcome-guide/template.js +1 -1
- package/build-module/hooks/commands/use-common-commands.js +4 -4
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/navigation-menu-edit.js +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +1 -1
- package/build-module/hooks/template-part-edit.js +1 -1
- package/build-module/index.js +1 -1
- package/build-module/lock-unlock.js +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/store/selectors.js +5 -4
- package/build-module/store/selectors.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 +58 -21
- package/build-style/style.css +58 -21
- package/package.json +41 -40
- package/src/components/block-editor/block-editor-provider/default-block-editor-provider.js +10 -5
- package/src/components/block-editor/block-editor-provider/test/use-page-content-blocks.js +33 -4
- package/src/components/block-editor/block-editor-provider/use-page-content-blocks.js +27 -14
- package/src/components/dataviews/dataviews.js +60 -0
- package/src/components/dataviews/index.js +2 -0
- package/src/components/dataviews/list-view.js +106 -0
- package/src/components/dataviews/pagination.js +118 -0
- package/src/components/dataviews/style.scss +36 -0
- package/src/components/dataviews/text-filter.js +37 -0
- package/src/components/dataviews/view-actions.js +246 -0
- package/src/components/global-styles/font-families.js +1 -5
- package/src/components/global-styles/screen-typography.js +3 -4
- package/src/components/header-edit-mode/plugin-more-menu-item/index.js +1 -1
- package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +1 -1
- package/src/components/page-content-focus-manager/index.js +29 -4
- package/src/components/page-main/index.js +3 -0
- package/src/components/page-pages/index.js +190 -0
- package/src/components/plugin-template-setting-panel/index.js +1 -1
- package/src/components/sidebar/index.js +11 -0
- package/src/components/sidebar-edit-mode/page-panels/edit-template.js +31 -16
- package/src/components/sidebar-navigation-screen/style.scss +0 -13
- package/src/components/sidebar-navigation-screen-pages/index.js +11 -4
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +7 -2
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +8 -2
- package/src/components/start-template-options/index.js +3 -3
- package/src/hooks/commands/use-common-commands.js +12 -4
- package/src/lock-unlock.js +1 -1
- package/src/store/selectors.js +10 -9
- package/src/style.scss +1 -0
- package/src/utils/get-is-list-page.js +3 -2
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -29
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -22
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
- package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_compose","_editor","_i18n","_url","_coreData","_data","_icons","_addNewPattern","_interopRequireDefault","_sidebarNavigationItem","_sidebarNavigationScreen","_categoryItem","_constants","_link","_usePatternCategories","_useTemplatePartAreas","_store","TemplatePartGroup","areas","currentArea","currentType","_element","createElement","Fragment","className","__experimentalHeading","level","__","__experimentalItemGroup","Object","entries","map","area","label","templateParts","default","key","count","length","icon","getTemplatePartIcon","id","type","TEMPLATE_PART_POST_TYPE","isActive","PatternCategoriesGroup","categories","currentCategory","category","name","file","PATTERN_TYPES","theme","user","SidebarNavigationScreenPatterns","isMobileViewport","useViewportMatch","categoryType","categoryId","getQueryArgs","window","location","href","PATTERN_DEFAULT_CATEGORY","templatePartAreas","hasTemplateParts","isLoading","useTemplatePartAreas","patternCategories","hasPatterns","usePatternCategories","isBlockBasedTheme","useSelect","select","coreStore","getCurrentTheme","is_block_theme","isTemplatePartsMode","settings","editSiteStore","getSettings","supportsTemplatePartsMode","templatePartsLink","useLink","path","didAccessPatternsPage","undefined","footer","as","withChevron","isRoot","title","description","actions","content","__experimentalItem"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { getTemplatePartIcon } from '@wordpress/editor';\nimport { __ } from '@wordpress/i18n';\nimport { getQueryArgs } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { file } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport AddNewPattern from '../add-new-pattern';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport CategoryItem from './category-item';\nimport {\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../utils/constants';\nimport { useLink } from '../routes/link';\nimport usePatternCategories from './use-pattern-categories';\nimport useTemplatePartAreas from './use-template-part-areas';\nimport { store as editSiteStore } from '../../store';\n\nfunction TemplatePartGroup( { areas, currentArea, currentType } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-patterns__group-header\">\n\t\t\t\t<Heading level={ 2 }>{ __( 'Template parts' ) }</Heading>\n\t\t\t</div>\n\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t{ Object.entries( areas ).map(\n\t\t\t\t\t( [ area, { label, templateParts } ] ) => (\n\t\t\t\t\t\t<CategoryItem\n\t\t\t\t\t\t\tkey={ area }\n\t\t\t\t\t\t\tcount={ templateParts?.length }\n\t\t\t\t\t\t\ticon={ getTemplatePartIcon( area ) }\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\tid={ area }\n\t\t\t\t\t\t\ttype={ TEMPLATE_PART_POST_TYPE }\n\t\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\t\tcurrentArea === area &&\n\t\t\t\t\t\t\t\tcurrentType === TEMPLATE_PART_POST_TYPE\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nfunction PatternCategoriesGroup( {\n\tcategories,\n\tcurrentCategory,\n\tcurrentType,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t{ categories.map( ( category ) => (\n\t\t\t\t\t<CategoryItem\n\t\t\t\t\t\tkey={ category.name }\n\t\t\t\t\t\tcount={ category.count }\n\t\t\t\t\t\tlabel={ category.label }\n\t\t\t\t\t\ticon={ file }\n\t\t\t\t\t\tid={ category.name }\n\t\t\t\t\t\ttype=\"pattern\"\n\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\tcurrentCategory === `${ category.name }` &&\n\t\t\t\t\t\t\t( currentType === PATTERN_TYPES.theme ||\n\t\t\t\t\t\t\t\tcurrentType === PATTERN_TYPES.user )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nexport default function SidebarNavigationScreenPatterns() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { categoryType, categoryId } = getQueryArgs( window.location.href );\n\tconst currentCategory = categoryId || PATTERN_DEFAULT_CATEGORY;\n\tconst currentType = categoryType || PATTERN_TYPES.theme;\n\n\tconst { templatePartAreas, hasTemplateParts, isLoading } =\n\t\tuseTemplatePartAreas();\n\tconst { patternCategories, hasPatterns } = usePatternCategories();\n\tconst isBlockBasedTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t[]\n\t);\n\tconst isTemplatePartsMode = useSelect( ( select ) => {\n\t\tconst settings = select( editSiteStore ).getSettings();\n\t\treturn !! settings.supportsTemplatePartsMode;\n\t}, [] );\n\n\tconst templatePartsLink = useLink( {\n\t\tpath: '/wp_template_part/all',\n\t\t// If a classic theme that supports template parts accessed\n\t\t// the Patterns page directly, preserve that state in the URL.\n\t\tdidAccessPatternsPage:\n\t\t\t! isBlockBasedTheme && isTemplatePartsMode ? 1 : undefined,\n\t} );\n\n\tconst footer = ! isMobileViewport ? (\n\t\t<ItemGroup>\n\t\t\t<SidebarNavigationItem\n\t\t\t\tas=\"a\"\n\t\t\t\thref=\"edit.php?post_type=wp_block\"\n\t\t\t\twithChevron\n\t\t\t>\n\t\t\t\t{ __( 'Manage all of my patterns' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t\t{ ( isBlockBasedTheme || isTemplatePartsMode ) && (\n\t\t\t\t<SidebarNavigationItem withChevron { ...templatePartsLink }>\n\t\t\t\t\t{ __( 'Manage all template parts' ) }\n\t\t\t\t</SidebarNavigationItem>\n\t\t\t) }\n\t\t</ItemGroup>\n\t) : undefined;\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot={ ! isBlockBasedTheme }\n\t\t\ttitle={ __( 'Patterns' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Manage what patterns are available when editing the site.'\n\t\t\t) }\n\t\t\tactions={ <AddNewPattern /> }\n\t\t\tfooter={ footer }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading patterns…' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! hasTemplateParts && ! hasPatterns && (\n\t\t\t\t\t\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t\t\t\t\t\t<Item>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'No template parts or patterns found'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Item>\n\t\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ hasPatterns && (\n\t\t\t\t\t\t\t\t<PatternCategoriesGroup\n\t\t\t\t\t\t\t\t\tcategories={ patternCategories }\n\t\t\t\t\t\t\t\t\tcurrentCategory={ currentCategory }\n\t\t\t\t\t\t\t\t\tcurrentType={ currentType }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ hasTemplateParts && (\n\t\t\t\t\t\t\t\t<TemplatePartGroup\n\t\t\t\t\t\t\t\t\tareas={ templatePartAreas }\n\t\t\t\t\t\t\t\t\tcurrentArea={ currentCategory }\n\t\t\t\t\t\t\t\t\tcurrentType={ currentType }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAKA,IAAAQ,cAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,sBAAA,GAAAD,sBAAA,CAAAT,OAAA;AACA,IAAAW,wBAAA,GAAAF,sBAAA,CAAAT,OAAA;AACA,IAAAY,aAAA,GAAAH,sBAAA,CAAAT,OAAA;AACA,IAAAa,UAAA,GAAAb,OAAA;AAKA,IAAAc,KAAA,GAAAd,OAAA;AACA,IAAAe,qBAAA,GAAAN,sBAAA,CAAAT,OAAA;AACA,IAAAgB,qBAAA,GAAAP,sBAAA,CAAAT,OAAA;AACA,IAAAiB,MAAA,GAAAjB,OAAA;AA/BA;AACA;AACA;;AAcA;AACA;AACA;;AAeA,SA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QACG,CAAE0C,gBAAgB,IAAI,CAAEI,WAAW,IACpC,IAAAhD,QAAA,CAAAC,aAAA,EAACxB,WAAA,CAAA8B,uBAAS;MAACJ,SAAS,EAAC;IAAqD,GACzE,IAAAH,QAAA,CAAAC,aAAA,EAACxB,WAAA,CAAAiG,kBAAI,QACF,IAAApE,QAAE,EACH,qCACD,CACK,CACI,CACX,EACC0C,WAAW,IACZ,IAAAhD,QAAA,CAAAC,aAAA,EAACuB,sBAAsB;MACtBC,UAAU,EAAGsB,iBAAmB;MAChCrB,eAAe,EAAGA,eAAiB;MACnC3B,WAAW,EAAGA;IAAa,CAC3B,CACD,EACC6C,gBAAgB,IACjB,IAAA5C,QAAA,CAAAC,aAAA,EAACL,iBAAiB;MACjBC,KAAK,EAAG8C,iBAAmB;MAC3B7C,WAAW,EAAG4B,eAAiB;MAC/B3B,WAAW,EAAGA;IAAa,CAC3B,CAED,CAEF;EACF,CACD,CAAC;AAEJ"}
|
|
1
|
+
{"version":3,"names":["_components","require","_compose","_editor","_i18n","_url","_coreData","_data","_icons","_addNewPattern","_interopRequireDefault","_sidebarNavigationItem","_sidebarNavigationScreen","_categoryItem","_constants","_link","_usePatternCategories","_useTemplatePartAreas","_store","TemplatePartGroup","areas","currentArea","currentType","_react","createElement","Fragment","className","__experimentalHeading","level","__","__experimentalItemGroup","Object","entries","map","area","label","templateParts","default","key","count","length","icon","getTemplatePartIcon","id","type","TEMPLATE_PART_POST_TYPE","isActive","PatternCategoriesGroup","categories","currentCategory","category","name","file","PATTERN_TYPES","theme","user","SidebarNavigationScreenPatterns","isMobileViewport","useViewportMatch","categoryType","categoryId","getQueryArgs","window","location","href","PATTERN_DEFAULT_CATEGORY","templatePartAreas","hasTemplateParts","isLoading","useTemplatePartAreas","patternCategories","hasPatterns","usePatternCategories","isBlockBasedTheme","useSelect","select","coreStore","getCurrentTheme","is_block_theme","isTemplatePartsMode","settings","editSiteStore","getSettings","supportsTemplatePartsMode","templatePartsLink","useLink","path","didAccessPatternsPage","undefined","footer","as","withChevron","isRoot","title","description","actions","content","__experimentalItem"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { getTemplatePartIcon } from '@wordpress/editor';\nimport { __ } from '@wordpress/i18n';\nimport { getQueryArgs } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { file } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport AddNewPattern from '../add-new-pattern';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport CategoryItem from './category-item';\nimport {\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../utils/constants';\nimport { useLink } from '../routes/link';\nimport usePatternCategories from './use-pattern-categories';\nimport useTemplatePartAreas from './use-template-part-areas';\nimport { store as editSiteStore } from '../../store';\n\nfunction TemplatePartGroup( { areas, currentArea, currentType } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-patterns__group-header\">\n\t\t\t\t<Heading level={ 2 }>{ __( 'Template parts' ) }</Heading>\n\t\t\t</div>\n\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t{ Object.entries( areas ).map(\n\t\t\t\t\t( [ area, { label, templateParts } ] ) => (\n\t\t\t\t\t\t<CategoryItem\n\t\t\t\t\t\t\tkey={ area }\n\t\t\t\t\t\t\tcount={ templateParts?.length }\n\t\t\t\t\t\t\ticon={ getTemplatePartIcon( area ) }\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\tid={ area }\n\t\t\t\t\t\t\ttype={ TEMPLATE_PART_POST_TYPE }\n\t\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\t\tcurrentArea === area &&\n\t\t\t\t\t\t\t\tcurrentType === TEMPLATE_PART_POST_TYPE\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nfunction PatternCategoriesGroup( {\n\tcategories,\n\tcurrentCategory,\n\tcurrentType,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t{ categories.map( ( category ) => (\n\t\t\t\t\t<CategoryItem\n\t\t\t\t\t\tkey={ category.name }\n\t\t\t\t\t\tcount={ category.count }\n\t\t\t\t\t\tlabel={ category.label }\n\t\t\t\t\t\ticon={ file }\n\t\t\t\t\t\tid={ category.name }\n\t\t\t\t\t\ttype=\"pattern\"\n\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\tcurrentCategory === `${ category.name }` &&\n\t\t\t\t\t\t\t( currentType === PATTERN_TYPES.theme ||\n\t\t\t\t\t\t\t\tcurrentType === PATTERN_TYPES.user )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nexport default function SidebarNavigationScreenPatterns() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { categoryType, categoryId } = getQueryArgs( window.location.href );\n\tconst currentCategory = categoryId || PATTERN_DEFAULT_CATEGORY;\n\tconst currentType = categoryType || PATTERN_TYPES.theme;\n\n\tconst { templatePartAreas, hasTemplateParts, isLoading } =\n\t\tuseTemplatePartAreas();\n\tconst { patternCategories, hasPatterns } = usePatternCategories();\n\tconst isBlockBasedTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t[]\n\t);\n\tconst isTemplatePartsMode = useSelect( ( select ) => {\n\t\tconst settings = select( editSiteStore ).getSettings();\n\t\treturn !! settings.supportsTemplatePartsMode;\n\t}, [] );\n\n\tconst templatePartsLink = useLink( {\n\t\tpath: '/wp_template_part/all',\n\t\t// If a classic theme that supports template parts accessed\n\t\t// the Patterns page directly, preserve that state in the URL.\n\t\tdidAccessPatternsPage:\n\t\t\t! isBlockBasedTheme && isTemplatePartsMode ? 1 : undefined,\n\t} );\n\n\tconst footer = ! isMobileViewport ? (\n\t\t<ItemGroup>\n\t\t\t<SidebarNavigationItem\n\t\t\t\tas=\"a\"\n\t\t\t\thref=\"edit.php?post_type=wp_block\"\n\t\t\t\twithChevron\n\t\t\t>\n\t\t\t\t{ __( 'Manage all of my patterns' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t\t{ ( isBlockBasedTheme || isTemplatePartsMode ) && (\n\t\t\t\t<SidebarNavigationItem withChevron { ...templatePartsLink }>\n\t\t\t\t\t{ __( 'Manage all template parts' ) }\n\t\t\t\t</SidebarNavigationItem>\n\t\t\t) }\n\t\t</ItemGroup>\n\t) : undefined;\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot={ ! isBlockBasedTheme }\n\t\t\ttitle={ __( 'Patterns' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Manage what patterns are available when editing the site.'\n\t\t\t) }\n\t\t\tactions={ <AddNewPattern /> }\n\t\t\tfooter={ footer }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading patterns…' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! hasTemplateParts && ! hasPatterns && (\n\t\t\t\t\t\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t\t\t\t\t\t<Item>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'No template parts or patterns found'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Item>\n\t\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ hasPatterns && (\n\t\t\t\t\t\t\t\t<PatternCategoriesGroup\n\t\t\t\t\t\t\t\t\tcategories={ patternCategories }\n\t\t\t\t\t\t\t\t\tcurrentCategory={ currentCategory }\n\t\t\t\t\t\t\t\t\tcurrentType={ currentType }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ hasTemplateParts && (\n\t\t\t\t\t\t\t\t<TemplatePartGroup\n\t\t\t\t\t\t\t\t\tareas={ templatePartAreas }\n\t\t\t\t\t\t\t\t\tcurrentArea={ currentCategory }\n\t\t\t\t\t\t\t\t\tcurrentType={ currentType }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAKA,IAAAQ,cAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,sBAAA,GAAAD,sBAAA,CAAAT,OAAA;AACA,IAAAW,wBAAA,GAAAF,sBAAA,CAAAT,OAAA;AACA,IAAAY,aAAA,GAAAH,sBAAA,CAAAT,OAAA;AACA,IAAAa,UAAA,GAAAb,OAAA;AAKA,IAAAc,KAAA,GAAAd,OAAA;AACA,IAAAe,qBAAA,GAAAN,sBAAA,CAAAT,OAAA;AACA,IAAAgB,qBAAA,GAAAP,sBAAA,CAAAT,OAAA;AACA,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AEuC,SAAS,IACZ,IAAA7C,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACG,CAAE0C,gBAAgB,IAAI,CAAEI,WAAW,IACpC,IAAAhD,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAA8B,uBAAS;MAACJ,SAAS,EAAC;IAAqD,GACzE,IAAAH,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAAiG,kBAAI,QACF,IAAApE,QAAE,EACH,qCACD,CACK,CACI,CACX,EACC0C,WAAW,IACZ,IAAAhD,MAAA,CAAAC,aAAA,EAACuB,sBAAsB;MACtBC,UAAU,EAAGsB,iBAAmB;MAChCrB,eAAe,EAAGA,eAAiB;MACnC3B,WAAW,EAAGA;IAAa,CAC3B,CACD,EACC6C,gBAAgB,IACjB,IAAA5C,MAAA,CAAAC,aAAA,EAACL,iBAAiB;MACjBC,KAAK,EAAG8C,iBAAmB;MAC3B7C,WAAW,EAAG4B,eAAiB;MAC/B3B,WAAW,EAAGA;IAAa,CAC3B,CAED,CAEF;EACF,CACD,CAAC;AAEJ"}
|
|
@@ -5,13 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = HomeTemplateDetails;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _i18n = require("@wordpress/i18n");
|
|
10
10
|
var _compose = require("@wordpress/compose");
|
|
11
11
|
var _data = require("@wordpress/data");
|
|
12
12
|
var _coreData = require("@wordpress/core-data");
|
|
13
13
|
var _components = require("@wordpress/components");
|
|
14
14
|
var _icons = require("@wordpress/icons");
|
|
15
|
+
var _element = require("@wordpress/element");
|
|
15
16
|
var _htmlEntities = require("@wordpress/html-entities");
|
|
16
17
|
var _sidebarNavigationScreenDetailsPanel = require("../sidebar-navigation-screen-details-panel");
|
|
17
18
|
var _lockUnlock = require("../../lock-unlock");
|
|
@@ -42,12 +43,12 @@ function TemplateAreaButton({
|
|
|
42
43
|
postType: _constants.TEMPLATE_PART_POST_TYPE,
|
|
43
44
|
postId
|
|
44
45
|
});
|
|
45
|
-
return (0,
|
|
46
|
+
return (0, _react.createElement)(_sidebarNavigationItem.default, {
|
|
46
47
|
className: "edit-site-sidebar-navigation-screen-template__template-area-button",
|
|
47
48
|
...linkInfo,
|
|
48
49
|
icon: (_icons$icon = icons[icon]) !== null && _icons$icon !== void 0 ? _icons$icon : _icons.layout,
|
|
49
50
|
withChevron: true
|
|
50
|
-
}, (0,
|
|
51
|
+
}, (0, _react.createElement)(_components.__experimentalTruncate, {
|
|
51
52
|
limit: 20,
|
|
52
53
|
ellipsizeMode: "tail",
|
|
53
54
|
numberOfLines: 1,
|
|
@@ -133,9 +134,9 @@ function HomeTemplateDetails() {
|
|
|
133
134
|
posts_per_page: newValue
|
|
134
135
|
});
|
|
135
136
|
};
|
|
136
|
-
return (0,
|
|
137
|
+
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanel, {
|
|
137
138
|
spacing: 6
|
|
138
|
-
}, postsPageId && (0,
|
|
139
|
+
}, postsPageId && (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, null, (0, _react.createElement)(_components.__experimentalInputControl, {
|
|
139
140
|
className: "edit-site-sidebar-navigation-screen__input-control",
|
|
140
141
|
placeholder: (0, _i18n.__)('No Title'),
|
|
141
142
|
size: '__unstable-large',
|
|
@@ -143,7 +144,7 @@ function HomeTemplateDetails() {
|
|
|
143
144
|
onChange: (0, _compose.debounce)(setPostsPageTitle, 300),
|
|
144
145
|
label: (0, _i18n.__)('Blog title'),
|
|
145
146
|
help: (0, _i18n.__)('Set the Posts Page title. Appears in search results, and when the page is shared on social media.')
|
|
146
|
-
})), (0,
|
|
147
|
+
})), (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, null, (0, _react.createElement)(_components.__experimentalNumberControl, {
|
|
147
148
|
className: "edit-site-sidebar-navigation-screen__input-control",
|
|
148
149
|
placeholder: 0,
|
|
149
150
|
value: postsCountValue,
|
|
@@ -154,28 +155,28 @@ function HomeTemplateDetails() {
|
|
|
154
155
|
onChange: setPostsPerPage,
|
|
155
156
|
label: (0, _i18n.__)('Posts per page'),
|
|
156
157
|
help: (0, _i18n.__)('Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.')
|
|
157
|
-
}))), (0,
|
|
158
|
+
}))), (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanel, {
|
|
158
159
|
title: (0, _i18n.__)('Discussion'),
|
|
159
160
|
spacing: 3
|
|
160
|
-
}, (0,
|
|
161
|
+
}, (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, null, (0, _react.createElement)(_components.CheckboxControl, {
|
|
161
162
|
className: "edit-site-sidebar-navigation-screen__input-control",
|
|
162
163
|
label: (0, _i18n.__)('Allow comments on new posts'),
|
|
163
164
|
help: (0, _i18n.__)('Changes will apply to new posts only. Individual posts may override these settings.'),
|
|
164
165
|
checked: commentsOnNewPostsValue,
|
|
165
166
|
onChange: setAllowCommentsOnNewPosts
|
|
166
|
-
}))), (0,
|
|
167
|
+
}))), (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanel, {
|
|
167
168
|
title: (0, _i18n.__)('Areas'),
|
|
168
169
|
spacing: 3
|
|
169
|
-
}, (0,
|
|
170
|
+
}, (0, _react.createElement)(_components.__experimentalItemGroup, null, templateAreas.map(({
|
|
170
171
|
clientId,
|
|
171
172
|
label,
|
|
172
173
|
icon,
|
|
173
174
|
theme,
|
|
174
175
|
slug,
|
|
175
176
|
title
|
|
176
|
-
}) => (0,
|
|
177
|
+
}) => (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, {
|
|
177
178
|
key: clientId
|
|
178
|
-
}, (0,
|
|
179
|
+
}, (0, _react.createElement)(TemplateAreaButton, {
|
|
179
180
|
postId: `${theme}//${slug}`,
|
|
180
181
|
title: title?.rendered || label,
|
|
181
182
|
icon: icon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_i18n","_compose","_data","_coreData","_components","_icons","_htmlEntities","_sidebarNavigationScreenDetailsPanel","_lockUnlock","_store","_link","_sidebarNavigationItem","_interopRequireDefault","_constants","EMPTY_OBJECT","TemplateAreaButton","postId","icon","title","_icons$icon","icons","header","footer","linkInfo","useLink","postType","TEMPLATE_PART_POST_TYPE","createElement","default","className","layout","withChevron","__experimentalTruncate","limit","ellipsizeMode","numberOfLines","decodeEntities","HomeTemplateDetails","editEntityRecord","useDispatch","coreStore","allowCommentsOnNewPosts","templatePartAreas","postsPerPage","postsPageTitle","postsPageId","currentTemplateParts","useSelect","select","getEntityRecord","getSettings","getCurrentTemplateTemplateParts","unlock","editSiteStore","siteSettings","_postsPageRecord","page_for_posts","default_comment_status","rendered","id","posts_per_page","defaultTemplatePartAreas","commentsOnNewPostsValue","setCommentsOnNewPostsValue","useState","postsCountValue","setPostsCountValue","postsPageTitleValue","setPostsPageTitleValue","useEffect","templateAreas","useMemo","length","map","templatePart","block","find","area","clientId","setAllowCommentsOnNewPosts","newValue","undefined","setPostsPageTitle","setPostsPerPage","Fragment","SidebarNavigationScreenDetailsPanel","spacing","SidebarNavigationScreenDetailsPanelRow","__experimentalInputControl","placeholder","__","size","value","onChange","debounce","label","help","__experimentalNumberControl","spinControls","step","min","CheckboxControl","checked","__experimentalItemGroup","theme","slug","key"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-template/home-template-details.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { debounce } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tCheckboxControl,\n\t__experimentalInputControl as InputControl,\n\t__experimentalNumberControl as NumberControl,\n\t__experimentalTruncate as Truncate,\n\t__experimentalItemGroup as ItemGroup,\n} from '@wordpress/components';\nimport { header, footer, layout } from '@wordpress/icons';\nimport { useMemo, useState, useEffect } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n} from '../sidebar-navigation-screen-details-panel';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport { useLink } from '../routes/link';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { TEMPLATE_PART_POST_TYPE } from '../../utils/constants';\n\nconst EMPTY_OBJECT = {};\n\nfunction TemplateAreaButton( { postId, icon, title } ) {\n\tconst icons = {\n\t\theader,\n\t\tfooter,\n\t};\n\tconst linkInfo = useLink( {\n\t\tpostType: TEMPLATE_PART_POST_TYPE,\n\t\tpostId,\n\t} );\n\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\tclassName=\"edit-site-sidebar-navigation-screen-template__template-area-button\"\n\t\t\t{ ...linkInfo }\n\t\t\ticon={ icons[ icon ] ?? layout }\n\t\t\twithChevron\n\t\t>\n\t\t\t<Truncate\n\t\t\t\tlimit={ 20 }\n\t\t\t\tellipsizeMode=\"tail\"\n\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-template__template-area-label-text\"\n\t\t\t>\n\t\t\t\t{ decodeEntities( title ) }\n\t\t\t</Truncate>\n\t\t</SidebarNavigationItem>\n\t);\n}\n\nexport default function HomeTemplateDetails() {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst {\n\t\tallowCommentsOnNewPosts,\n\t\ttemplatePartAreas,\n\t\tpostsPerPage,\n\t\tpostsPageTitle,\n\t\tpostsPageId,\n\t\tcurrentTemplateParts,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst { getSettings, getCurrentTemplateTemplateParts } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\tconst _postsPageRecord = siteSettings?.page_for_posts\n\t\t\t? getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'page',\n\t\t\t\t\tsiteSettings?.page_for_posts\n\t\t\t )\n\t\t\t: EMPTY_OBJECT;\n\n\t\treturn {\n\t\t\tallowCommentsOnNewPosts:\n\t\t\t\tsiteSettings?.default_comment_status === 'open',\n\t\t\tpostsPageTitle: _postsPageRecord?.title?.rendered,\n\t\t\tpostsPageId: _postsPageRecord?.id,\n\t\t\tpostsPerPage: siteSettings?.posts_per_page,\n\t\t\ttemplatePartAreas: getSettings()?.defaultTemplatePartAreas,\n\t\t\tcurrentTemplateParts: getCurrentTemplateTemplateParts(),\n\t\t};\n\t}, [] );\n\n\tconst [ commentsOnNewPostsValue, setCommentsOnNewPostsValue ] =\n\t\tuseState( '' );\n\tconst [ postsCountValue, setPostsCountValue ] = useState( 1 );\n\tconst [ postsPageTitleValue, setPostsPageTitleValue ] = useState( '' );\n\n\t/*\n\t * This hook serves to set the server-retrieved values,\n\t * postsPageTitle, allowCommentsOnNewPosts, postsPerPage,\n\t * to local state.\n\t */\n\tuseEffect( () => {\n\t\tsetCommentsOnNewPostsValue( allowCommentsOnNewPosts );\n\t\tsetPostsPageTitleValue( postsPageTitle );\n\t\tsetPostsCountValue( postsPerPage );\n\t}, [ postsPageTitle, allowCommentsOnNewPosts, postsPerPage ] );\n\n\t/*\n\t * Merge data in currentTemplateParts with templatePartAreas,\n\t * which contains the template icon and fallback labels\n\t */\n\tconst templateAreas = useMemo( () => {\n\t\treturn currentTemplateParts.length && templatePartAreas\n\t\t\t? currentTemplateParts.map( ( { templatePart, block } ) => ( {\n\t\t\t\t\t...templatePartAreas?.find(\n\t\t\t\t\t\t( { area } ) => area === templatePart?.area\n\t\t\t\t\t),\n\t\t\t\t\t...templatePart,\n\t\t\t\t\tclientId: block.clientId,\n\t\t\t } ) )\n\t\t\t: [];\n\t}, [ currentTemplateParts, templatePartAreas ] );\n\n\tconst setAllowCommentsOnNewPosts = ( newValue ) => {\n\t\tsetCommentsOnNewPostsValue( newValue );\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tdefault_comment_status: newValue ? 'open' : null,\n\t\t} );\n\t};\n\n\tconst setPostsPageTitle = ( newValue ) => {\n\t\tsetPostsPageTitleValue( newValue );\n\t\teditEntityRecord( 'postType', 'page', postsPageId, {\n\t\t\ttitle: newValue,\n\t\t} );\n\t};\n\n\tconst setPostsPerPage = ( newValue ) => {\n\t\tsetPostsCountValue( newValue );\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tposts_per_page: newValue,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreenDetailsPanel spacing={ 6 }>\n\t\t\t\t{ postsPageId && (\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__input-control\"\n\t\t\t\t\t\t\tplaceholder={ __( 'No Title' ) }\n\t\t\t\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t\t\t\tvalue={ postsPageTitleValue }\n\t\t\t\t\t\t\tonChange={ debounce( setPostsPageTitle, 300 ) }\n\t\t\t\t\t\t\tlabel={ __( 'Blog title' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Set the Posts Page title. Appears in search results, and when the page is shared on social media.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t) }\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__input-control\"\n\t\t\t\t\t\tplaceholder={ 0 }\n\t\t\t\t\t\tvalue={ postsCountValue }\n\t\t\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t\t\tspinControls=\"custom\"\n\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\tonChange={ setPostsPerPage }\n\t\t\t\t\t\tlabel={ __( 'Posts per page' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t</SidebarNavigationScreenDetailsPanel>\n\n\t\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\tspacing={ 3 }\n\t\t\t>\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__input-control\"\n\t\t\t\t\t\tlabel={ __( 'Allow comments on new posts' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Changes will apply to new posts only. Individual posts may override these settings.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tchecked={ commentsOnNewPostsValue }\n\t\t\t\t\t\tonChange={ setAllowCommentsOnNewPosts }\n\t\t\t\t\t/>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t</SidebarNavigationScreenDetailsPanel>\n\t\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\t\ttitle={ __( 'Areas' ) }\n\t\t\t\tspacing={ 3 }\n\t\t\t>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t{ templateAreas.map(\n\t\t\t\t\t\t( { clientId, label, icon, theme, slug, title } ) => (\n\t\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelRow\n\t\t\t\t\t\t\t\tkey={ clientId }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<TemplateAreaButton\n\t\t\t\t\t\t\t\t\tpostId={ `${ theme }//${ slug }` }\n\t\t\t\t\t\t\t\t\ttitle={ title?.rendered || label }\n\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t\t)\n\t\t\t\t\t) }\n\t\t\t\t</ItemGroup>\n\t\t\t</SidebarNavigationScreenDetailsPanel>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAeA,IAAAA,QAAA,GAAAC,OAAA;AAZA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAOA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,aAAA,GAAAP,OAAA;AAKA,IAAAQ,oCAAA,GAAAR,OAAA;AAIA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,KAAA,GAAAX,OAAA;AACA,IAAAY,sBAAA,GAAAC,sBAAA,CAAAb,OAAA;AACA,IAAAc,UAAA,GAAAd,OAAA;AA7BA;AACA;AACA;;AAgBA;AACA;AACA;;AAWA,MAAMe,YAAY,GAAG,CAAC,CAAC;AAEvB,SAASC,kBAAkBA,CAAE;EAAEC,MAAM;EAAEC,IAAI;EAAEC;AAAM,CAAC,EAAG;EAAA,IAAAC,WAAA;EACtD,MAAMC,KAAK,GAAG;IACbC,MAAM,EAANA,aAAM;IACNC,MAAM,EAANA;EACD,CAAC;EACD,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EAAE;IACzBC,QAAQ,EAAEC,kCAAuB;IACjCV;EACD,CAAE,CAAC;EAEH,OACC,IAAAlB,QAAA,CAAA6B,aAAA,EAAChB,sBAAA,CAAAiB,O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AAgF,sCAAsC;IACtCmB,GAAG,EAAG5B;EAAU,GAEhB,IAAAhF,QAAA,CAAA6B,aAAA,EAACZ,kBAAkB;IAClBC,MAAM,EAAI,GAAGwF,KAAO,KAAKC,IAAM,EAAG;IAClCvF,KAAK,EAAGA,KAAK,EAAEwC,QAAQ,IAAIqC,KAAO;IAClC9E,IAAI,EAAGA;EAAM,CACb,CACsC,CAE1C,CACU,CACyB,CACpC,CAAC;AAEL"}
|
|
1
|
+
{"version":3,"names":["_i18n","require","_compose","_data","_coreData","_components","_icons","_element","_htmlEntities","_sidebarNavigationScreenDetailsPanel","_lockUnlock","_store","_link","_sidebarNavigationItem","_interopRequireDefault","_constants","EMPTY_OBJECT","TemplateAreaButton","postId","icon","title","_icons$icon","icons","header","footer","linkInfo","useLink","postType","TEMPLATE_PART_POST_TYPE","_react","createElement","default","className","layout","withChevron","__experimentalTruncate","limit","ellipsizeMode","numberOfLines","decodeEntities","HomeTemplateDetails","editEntityRecord","useDispatch","coreStore","allowCommentsOnNewPosts","templatePartAreas","postsPerPage","postsPageTitle","postsPageId","currentTemplateParts","useSelect","select","getEntityRecord","getSettings","getCurrentTemplateTemplateParts","unlock","editSiteStore","siteSettings","_postsPageRecord","page_for_posts","default_comment_status","rendered","id","posts_per_page","defaultTemplatePartAreas","commentsOnNewPostsValue","setCommentsOnNewPostsValue","useState","postsCountValue","setPostsCountValue","postsPageTitleValue","setPostsPageTitleValue","useEffect","templateAreas","useMemo","length","map","templatePart","block","find","area","clientId","setAllowCommentsOnNewPosts","newValue","undefined","setPostsPageTitle","setPostsPerPage","Fragment","SidebarNavigationScreenDetailsPanel","spacing","SidebarNavigationScreenDetailsPanelRow","__experimentalInputControl","placeholder","__","size","value","onChange","debounce","label","help","__experimentalNumberControl","spinControls","step","min","CheckboxControl","checked","__experimentalItemGroup","theme","slug","key"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-template/home-template-details.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { debounce } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tCheckboxControl,\n\t__experimentalInputControl as InputControl,\n\t__experimentalNumberControl as NumberControl,\n\t__experimentalTruncate as Truncate,\n\t__experimentalItemGroup as ItemGroup,\n} from '@wordpress/components';\nimport { header, footer, layout } from '@wordpress/icons';\nimport { useMemo, useState, useEffect } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n} from '../sidebar-navigation-screen-details-panel';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport { useLink } from '../routes/link';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { TEMPLATE_PART_POST_TYPE } from '../../utils/constants';\n\nconst EMPTY_OBJECT = {};\n\nfunction TemplateAreaButton( { postId, icon, title } ) {\n\tconst icons = {\n\t\theader,\n\t\tfooter,\n\t};\n\tconst linkInfo = useLink( {\n\t\tpostType: TEMPLATE_PART_POST_TYPE,\n\t\tpostId,\n\t} );\n\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\tclassName=\"edit-site-sidebar-navigation-screen-template__template-area-button\"\n\t\t\t{ ...linkInfo }\n\t\t\ticon={ icons[ icon ] ?? layout }\n\t\t\twithChevron\n\t\t>\n\t\t\t<Truncate\n\t\t\t\tlimit={ 20 }\n\t\t\t\tellipsizeMode=\"tail\"\n\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-template__template-area-label-text\"\n\t\t\t>\n\t\t\t\t{ decodeEntities( title ) }\n\t\t\t</Truncate>\n\t\t</SidebarNavigationItem>\n\t);\n}\n\nexport default function HomeTemplateDetails() {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst {\n\t\tallowCommentsOnNewPosts,\n\t\ttemplatePartAreas,\n\t\tpostsPerPage,\n\t\tpostsPageTitle,\n\t\tpostsPageId,\n\t\tcurrentTemplateParts,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst { getSettings, getCurrentTemplateTemplateParts } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\tconst _postsPageRecord = siteSettings?.page_for_posts\n\t\t\t? getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'page',\n\t\t\t\t\tsiteSettings?.page_for_posts\n\t\t\t )\n\t\t\t: EMPTY_OBJECT;\n\n\t\treturn {\n\t\t\tallowCommentsOnNewPosts:\n\t\t\t\tsiteSettings?.default_comment_status === 'open',\n\t\t\tpostsPageTitle: _postsPageRecord?.title?.rendered,\n\t\t\tpostsPageId: _postsPageRecord?.id,\n\t\t\tpostsPerPage: siteSettings?.posts_per_page,\n\t\t\ttemplatePartAreas: getSettings()?.defaultTemplatePartAreas,\n\t\t\tcurrentTemplateParts: getCurrentTemplateTemplateParts(),\n\t\t};\n\t}, [] );\n\n\tconst [ commentsOnNewPostsValue, setCommentsOnNewPostsValue ] =\n\t\tuseState( '' );\n\tconst [ postsCountValue, setPostsCountValue ] = useState( 1 );\n\tconst [ postsPageTitleValue, setPostsPageTitleValue ] = useState( '' );\n\n\t/*\n\t * This hook serves to set the server-retrieved values,\n\t * postsPageTitle, allowCommentsOnNewPosts, postsPerPage,\n\t * to local state.\n\t */\n\tuseEffect( () => {\n\t\tsetCommentsOnNewPostsValue( allowCommentsOnNewPosts );\n\t\tsetPostsPageTitleValue( postsPageTitle );\n\t\tsetPostsCountValue( postsPerPage );\n\t}, [ postsPageTitle, allowCommentsOnNewPosts, postsPerPage ] );\n\n\t/*\n\t * Merge data in currentTemplateParts with templatePartAreas,\n\t * which contains the template icon and fallback labels\n\t */\n\tconst templateAreas = useMemo( () => {\n\t\treturn currentTemplateParts.length && templatePartAreas\n\t\t\t? currentTemplateParts.map( ( { templatePart, block } ) => ( {\n\t\t\t\t\t...templatePartAreas?.find(\n\t\t\t\t\t\t( { area } ) => area === templatePart?.area\n\t\t\t\t\t),\n\t\t\t\t\t...templatePart,\n\t\t\t\t\tclientId: block.clientId,\n\t\t\t } ) )\n\t\t\t: [];\n\t}, [ currentTemplateParts, templatePartAreas ] );\n\n\tconst setAllowCommentsOnNewPosts = ( newValue ) => {\n\t\tsetCommentsOnNewPostsValue( newValue );\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tdefault_comment_status: newValue ? 'open' : null,\n\t\t} );\n\t};\n\n\tconst setPostsPageTitle = ( newValue ) => {\n\t\tsetPostsPageTitleValue( newValue );\n\t\teditEntityRecord( 'postType', 'page', postsPageId, {\n\t\t\ttitle: newValue,\n\t\t} );\n\t};\n\n\tconst setPostsPerPage = ( newValue ) => {\n\t\tsetPostsCountValue( newValue );\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tposts_per_page: newValue,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreenDetailsPanel spacing={ 6 }>\n\t\t\t\t{ postsPageId && (\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__input-control\"\n\t\t\t\t\t\t\tplaceholder={ __( 'No Title' ) }\n\t\t\t\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t\t\t\tvalue={ postsPageTitleValue }\n\t\t\t\t\t\t\tonChange={ debounce( setPostsPageTitle, 300 ) }\n\t\t\t\t\t\t\tlabel={ __( 'Blog title' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Set the Posts Page title. Appears in search results, and when the page is shared on social media.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t) }\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__input-control\"\n\t\t\t\t\t\tplaceholder={ 0 }\n\t\t\t\t\t\tvalue={ postsCountValue }\n\t\t\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t\t\tspinControls=\"custom\"\n\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\tonChange={ setPostsPerPage }\n\t\t\t\t\t\tlabel={ __( 'Posts per page' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t</SidebarNavigationScreenDetailsPanel>\n\n\t\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\tspacing={ 3 }\n\t\t\t>\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__input-control\"\n\t\t\t\t\t\tlabel={ __( 'Allow comments on new posts' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Changes will apply to new posts only. Individual posts may override these settings.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tchecked={ commentsOnNewPostsValue }\n\t\t\t\t\t\tonChange={ setAllowCommentsOnNewPosts }\n\t\t\t\t\t/>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t</SidebarNavigationScreenDetailsPanel>\n\t\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\t\ttitle={ __( 'Areas' ) }\n\t\t\t\tspacing={ 3 }\n\t\t\t>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t{ templateAreas.map(\n\t\t\t\t\t\t( { clientId, label, icon, theme, slug, title } ) => (\n\t\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelRow\n\t\t\t\t\t\t\t\tkey={ clientId }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<TemplateAreaButton\n\t\t\t\t\t\t\t\t\tpostId={ `${ theme }//${ slug }` }\n\t\t\t\t\t\t\t\t\ttitle={ title?.rendered || label }\n\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t\t)\n\t\t\t\t\t) }\n\t\t\t\t</ItemGroup>\n\t\t\t</SidebarNavigationScreenDetailsPanel>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAOA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AAKA,IAAAQ,oCAAA,GAAAR,OAAA;AAIA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,KAAA,GAAAX,OAAA;AACA,IAAAY,sBAAA,GAAAC,sBAAA,CAAAb,OAAA;AACA,IAAAc,UAAA,GAAAd,OAAA;AA7BA;AACA;AACA;;AAgBA;AACA;AACA;;AAWA,MAAMe,YAAY,GAAG,CAAC,CAAC;AAEvB,SAASC,kBAAkBA,CAAE;EAAEC,MAAM;EAAEC,IAAI;EAAEC;AAAM,CAAC,EAAG;EAAA,IAAAC,WAAA;EACtD,MAAMC,KAAK,GAAG;IACbC,MAAM,EAANA,aAAM;IACNC,MAAM,EAANA;EACD,CAAC;EACD,MAAMC,QAAQ,GAAG,IA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K;IAAE/E,IAAI;IAAEwF,KAAK;IAAEC,IAAI;IAAExF;EAAM,CAAC,KAC9C,IAAAS,MAAA,CAAAC,aAAA,EAACrB,oCAAA,CAAAiF,sCAAsC;IACtCmB,GAAG,EAAG5B;EAAU,GAEhB,IAAApD,MAAA,CAAAC,aAAA,EAACb,kBAAkB;IAClBC,MAAM,EAAI,GAAGyF,KAAO,KAAKC,IAAM,EAAG;IAClCxF,KAAK,EAAGA,KAAK,EAAEyC,QAAQ,IAAIqC,KAAO;IAClC/E,IAAI,EAAGA;EAAM,CACb,CACsC,CAE1C,CACU,CACyB,CACpC,CAAC;AAEL"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = SidebarNavigationScreenTemplate;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _i18n = require("@wordpress/i18n");
|
|
10
10
|
var _data = require("@wordpress/data");
|
|
11
11
|
var _icons = require("@wordpress/icons");
|
|
@@ -42,24 +42,24 @@ function useTemplateDetails(postType, postId) {
|
|
|
42
42
|
if (!descriptionText && addedBy.text) {
|
|
43
43
|
descriptionText = (0, _i18n.__)('This is a custom template that can be applied manually to any Post or Page.');
|
|
44
44
|
}
|
|
45
|
-
const content = record?.slug === 'home' || record?.slug === 'index' ? (0,
|
|
46
|
-
const footer = record?.modified ? (0,
|
|
45
|
+
const content = record?.slug === 'home' || record?.slug === 'index' ? (0, _react.createElement)(_homeTemplateDetails.default, null) : null;
|
|
46
|
+
const footer = record?.modified ? (0, _react.createElement)(_sidebarNavigationScreenDetailsFooter.default, {
|
|
47
47
|
record: record
|
|
48
48
|
}) : null;
|
|
49
|
-
const description = (0,
|
|
49
|
+
const description = (0, _react.createElement)(_react.Fragment, null, descriptionText, addedBy.text && !isAddedByActiveTheme && (0, _react.createElement)("span", {
|
|
50
50
|
className: "edit-site-sidebar-navigation-screen-template__added-by-description"
|
|
51
|
-
}, (0,
|
|
51
|
+
}, (0, _react.createElement)("span", {
|
|
52
52
|
className: "edit-site-sidebar-navigation-screen-template__added-by-description-author"
|
|
53
|
-
}, (0,
|
|
53
|
+
}, (0, _react.createElement)("span", {
|
|
54
54
|
className: "edit-site-sidebar-navigation-screen-template__added-by-description-author-icon"
|
|
55
|
-
}, addedBy.imageUrl ? (0,
|
|
55
|
+
}, addedBy.imageUrl ? (0, _react.createElement)("img", {
|
|
56
56
|
src: addedBy.imageUrl,
|
|
57
57
|
alt: "",
|
|
58
58
|
width: "24",
|
|
59
59
|
height: "24"
|
|
60
|
-
}) : (0,
|
|
60
|
+
}) : (0, _react.createElement)(_components.Icon, {
|
|
61
61
|
icon: addedBy.icon
|
|
62
|
-
})), addedBy.text), addedBy.isCustomized && (0,
|
|
62
|
+
})), addedBy.text), addedBy.isCustomized && (0, _react.createElement)("span", {
|
|
63
63
|
className: "edit-site-sidebar-navigation-screen-template__added-by-description-customized"
|
|
64
64
|
}, (0, _i18n._x)('(Customized)', 'template'))));
|
|
65
65
|
return {
|
|
@@ -86,9 +86,9 @@ function SidebarNavigationScreenTemplate() {
|
|
|
86
86
|
description,
|
|
87
87
|
footer
|
|
88
88
|
} = useTemplateDetails(postType, postId);
|
|
89
|
-
return (0,
|
|
89
|
+
return (0, _react.createElement)(_sidebarNavigationScreen.default, {
|
|
90
90
|
title: title,
|
|
91
|
-
actions: (0,
|
|
91
|
+
actions: (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_templateActions.default, {
|
|
92
92
|
postType: postType,
|
|
93
93
|
postId: postId,
|
|
94
94
|
toggleProps: {
|
|
@@ -97,7 +97,7 @@ function SidebarNavigationScreenTemplate() {
|
|
|
97
97
|
onRemove: () => {
|
|
98
98
|
navigator.goTo(`/${postType}/all`);
|
|
99
99
|
}
|
|
100
|
-
}), (0,
|
|
100
|
+
}), (0, _react.createElement)(_sidebarButton.default, {
|
|
101
101
|
onClick: () => setCanvasMode('edit'),
|
|
102
102
|
label: (0, _i18n.__)('Edit'),
|
|
103
103
|
icon: _icons.pencil
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_data","_icons","_components","_coreData","_sidebarNavigationScreen","_interopRequireDefault","_useEditedEntityRecord","_lockUnlock","_store","_sidebarButton","_addedBy","_templateActions","_homeTemplateDetails","_sidebarNavigationScreenDetailsFooter","useTemplateDetails","postType","postId","getDescription","getTitle","record","useEditedEntityRecord","currentTheme","useSelect","select","coreStore","getCurrentTheme","addedBy","useAddedBy","isAddedByActiveTheme","type","theme","stylesheet","title","descriptionText","text","__","content","slug","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_data","_icons","_components","_coreData","_sidebarNavigationScreen","_interopRequireDefault","_useEditedEntityRecord","_lockUnlock","_store","_sidebarButton","_addedBy","_templateActions","_homeTemplateDetails","_sidebarNavigationScreenDetailsFooter","useTemplateDetails","postType","postId","getDescription","getTitle","record","useEditedEntityRecord","currentTheme","useSelect","select","coreStore","getCurrentTheme","addedBy","useAddedBy","isAddedByActiveTheme","type","theme","stylesheet","title","descriptionText","text","__","content","slug","_react","createElement","default","footer","modified","description","Fragment","className","imageUrl","src","alt","width","height","Icon","icon","isCustomized","_x","SidebarNavigationScreenTemplate","navigator","useNavigator","params","setCanvasMode","unlock","useDispatch","editSiteStore","actions","toggleProps","as","SidebarButton","onRemove","goTo","onClick","label","pencil"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-template/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { pencil } from '@wordpress/icons';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\tIcon,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport { useAddedBy } from '../list/added-by';\nimport TemplateActions from '../template-actions';\nimport HomeTemplateDetails from './home-template-details';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\n\nfunction useTemplateDetails( postType, postId ) {\n\tconst { getDescription, getTitle, record } = useEditedEntityRecord(\n\t\tpostType,\n\t\tpostId\n\t);\n\tconst currentTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme(),\n\t\t[]\n\t);\n\tconst addedBy = useAddedBy( postType, postId );\n\tconst isAddedByActiveTheme =\n\t\taddedBy.type === 'theme' && record.theme === currentTheme?.stylesheet;\n\tconst title = getTitle();\n\tlet descriptionText = getDescription();\n\n\tif ( ! descriptionText && addedBy.text ) {\n\t\tdescriptionText = __(\n\t\t\t'This is a custom template that can be applied manually to any Post or Page.'\n\t\t);\n\t}\n\n\tconst content =\n\t\trecord?.slug === 'home' || record?.slug === 'index' ? (\n\t\t\t<HomeTemplateDetails />\n\t\t) : null;\n\n\tconst footer = record?.modified ? (\n\t\t<SidebarNavigationScreenDetailsFooter record={ record } />\n\t) : null;\n\n\tconst description = (\n\t\t<>\n\t\t\t{ descriptionText }\n\n\t\t\t{ addedBy.text && ! isAddedByActiveTheme && (\n\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-template__added-by-description\">\n\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-template__added-by-description-author\">\n\t\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-template__added-by-description-author-icon\">\n\t\t\t\t\t\t\t{ addedBy.imageUrl ? (\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tsrc={ addedBy.imageUrl }\n\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\twidth=\"24\"\n\t\t\t\t\t\t\t\t\theight=\"24\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Icon icon={ addedBy.icon } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{ addedBy.text }\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{ addedBy.isCustomized && (\n\t\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-template__added-by-description-customized\">\n\t\t\t\t\t\t\t{ _x( '(Customized)', 'template' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t</>\n\t);\n\n\treturn { title, description, content, footer };\n}\n\nexport default function SidebarNavigationScreenTemplate() {\n\tconst navigator = useNavigator();\n\tconst {\n\t\tparams: { postType, postId },\n\t} = navigator;\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst { title, content, description, footer } = useTemplateDetails(\n\t\tpostType,\n\t\tpostId\n\t);\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ title }\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<TemplateActions\n\t\t\t\t\t\tpostType={ postType }\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\tnavigator.goTo( `/${ postType }/all` );\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\tdescription={ description }\n\t\t\tcontent={ content }\n\t\t\tfooter={ footer }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,O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EAChC,MAAM;IACLC,MAAM,EAAE;MAAE3C,QAAQ;MAAEC;IAAO;EAC5B,CAAC,GAAGwC,SAAS;EACb,MAAM;IAAEG;EAAc,CAAC,GAAG,IAAAC,kBAAM,EAAE,IAAAC,iBAAW,EAAEC,YAAc,CAAE,CAAC;EAChE,MAAM;IAAE9B,KAAK;IAAEI,OAAO;IAAEO,WAAW;IAAEF;EAAO,CAAC,GAAG3B,kBAAkB,CACjEC,QAAQ,EACRC,MACD,CAAC;EAED,OACC,IAAAsB,MAAA,CAAAC,aAAA,EAACnC,wBAAA,CAAAoC,OAAuB;IACvBR,KAAK,EAAGA,KAAO;IACf+B,OAAO,EACN,IAAAzB,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAM,QAAA,QACC,IAAAN,MAAA,CAAAC,aAAA,EAAC5B,gBAAA,CAAA6B,OAAe;MACfzB,QAAQ,EAAGA,QAAU;MACrBC,MAAM,EAAGA,MAAQ;MACjBgD,WAAW,EAAG;QAAEC,EAAE,EAAEC;MAAc,CAAG;MACrCC,QAAQ,EAAGA,CAAA,KAAM;QAChBX,SAAS,CAACY,IAAI,CAAG,IAAIrD,QAAU,MAAM,CAAC;MACvC;IAAG,CACH,CAAC,EACF,IAAAuB,MAAA,CAAAC,aAAA,EAAC9B,cAAA,CAAA+B,OAAa;MACb6B,OAAO,EAAGA,CAAA,KAAMV,aAAa,CAAE,MAAO,CAAG;MACzCW,KAAK,EAAG,IAAAnC,QAAE,EAAE,MAAO,CAAG;MACtBiB,IAAI,EAAGmB;IAAQ,CACf,CACA,CACF;IACD5B,WAAW,EAAGA,WAAa;IAC3BP,OAAO,EAAGA,OAAS;IACnBK,MAAM,EAAGA;EAAQ,CACjB,CAAC;AAEJ"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = SidebarNavigationScreenTemplates;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _components = require("@wordpress/components");
|
|
10
10
|
var _i18n = require("@wordpress/i18n");
|
|
11
11
|
var _coreData = require("@wordpress/core-data");
|
|
@@ -34,7 +34,7 @@ const TemplateItem = ({
|
|
|
34
34
|
postType,
|
|
35
35
|
postId
|
|
36
36
|
});
|
|
37
|
-
return (0,
|
|
37
|
+
return (0, _react.createElement)(_sidebarNavigationItem.default, {
|
|
38
38
|
...linkInfo,
|
|
39
39
|
...props
|
|
40
40
|
});
|
|
@@ -53,22 +53,22 @@ function SidebarNavigationScreenTemplates() {
|
|
|
53
53
|
path: '/wp_template/all'
|
|
54
54
|
});
|
|
55
55
|
const canCreate = !isMobileViewport;
|
|
56
|
-
return (0,
|
|
56
|
+
return (0, _react.createElement)(_sidebarNavigationScreen.default, {
|
|
57
57
|
title: (0, _i18n.__)('Templates'),
|
|
58
58
|
description: (0, _i18n.__)('Express the layout of your site with templates.'),
|
|
59
|
-
actions: canCreate && (0,
|
|
59
|
+
actions: canCreate && (0, _react.createElement)(_addNewTemplate.default, {
|
|
60
60
|
templateType: _constants.TEMPLATE_POST_TYPE,
|
|
61
61
|
toggleProps: {
|
|
62
62
|
as: _sidebarButton.default
|
|
63
63
|
}
|
|
64
64
|
}),
|
|
65
|
-
content: (0,
|
|
65
|
+
content: (0, _react.createElement)(_react.Fragment, null, isLoading && (0, _i18n.__)('Loading templates…'), !isLoading && (0, _react.createElement)(_components.__experimentalItemGroup, null, !templates?.length && (0, _react.createElement)(_components.__experimentalItem, null, (0, _i18n.__)('No templates found')), sortedTemplates.map(template => (0, _react.createElement)(TemplateItem, {
|
|
66
66
|
postType: _constants.TEMPLATE_POST_TYPE,
|
|
67
67
|
postId: template.id,
|
|
68
68
|
key: template.id,
|
|
69
69
|
withChevron: true
|
|
70
70
|
}, (0, _htmlEntities.decodeEntities)(template.title?.rendered || template.slug))))),
|
|
71
|
-
footer: !isMobileViewport && (0,
|
|
71
|
+
footer: !isMobileViewport && (0, _react.createElement)(_sidebarNavigationItem.default, {
|
|
72
72
|
withChevron: true,
|
|
73
73
|
...browseAllLink
|
|
74
74
|
}, (0, _i18n.__)('Manage all templates'))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_coreData","_htmlEntities","_compose","_sidebarNavigationScreen","_interopRequireDefault","_link","_sidebarNavigationItem","_addNewTemplate","_sidebarButton","_constants","TemplateItem","postType","postId","props","linkInfo","useLink","
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_coreData","_htmlEntities","_compose","_sidebarNavigationScreen","_interopRequireDefault","_link","_sidebarNavigationItem","_addNewTemplate","_sidebarButton","_constants","TemplateItem","postType","postId","props","linkInfo","useLink","_react","createElement","default","SidebarNavigationScreenTemplates","isMobileViewport","useViewportMatch","records","templates","isResolving","isLoading","useEntityRecords","TEMPLATE_POST_TYPE","per_page","sortedTemplates","sort","a","b","title","rendered","localeCompare","browseAllLink","path","canCreate","__","description","actions","templateType","toggleProps","as","SidebarButton","content","Fragment","__experimentalItemGroup","length","__experimentalItem","map","template","id","key","withChevron","decodeEntities","slug","footer"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-templates/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { useLink } from '../routes/link';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport AddNewTemplate from '../add-new-template';\nimport SidebarButton from '../sidebar-button';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nconst TemplateItem = ( { postType, postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostType,\n\t\tpostId,\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n\nexport default function SidebarNavigationScreenTemplates() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\n\tconst { records: templates, isResolving: isLoading } = 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\n\tconst sortedTemplates = templates ? [ ...templates ] : [];\n\tsortedTemplates.sort( ( a, b ) =>\n\t\ta.title.rendered.localeCompare( b.title.rendered )\n\t);\n\n\tconst browseAllLink = useLink( { path: '/wp_template/all' } );\n\tconst canCreate = ! isMobileViewport;\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ __( 'Templates' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Express the layout of your site with templates.'\n\t\t\t) }\n\t\t\tactions={\n\t\t\t\tcanCreate && (\n\t\t\t\t\t<AddNewTemplate\n\t\t\t\t\t\ttemplateType={ TEMPLATE_POST_TYPE }\n\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\tas: SidebarButton,\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\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading templates…' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t{ ! templates?.length && (\n\t\t\t\t\t\t\t\t<Item>{ __( 'No templates found' ) }</Item>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ sortedTemplates.map( ( template ) => (\n\t\t\t\t\t\t\t\t<TemplateItem\n\t\t\t\t\t\t\t\t\tpostType={ TEMPLATE_POST_TYPE }\n\t\t\t\t\t\t\t\t\tpostId={ template.id }\n\t\t\t\t\t\t\t\t\tkey={ template.id }\n\t\t\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ decodeEntities(\n\t\t\t\t\t\t\t\t\t\ttemplate.title?.rendered ||\n\t\t\t\t\t\t\t\t\t\t\ttemplate.slug\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</TemplateItem>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<SidebarNavigationItem withChevron { ...browseAllLink }>\n\t\t\t\t\t\t{ __( 'Manage all templates' ) }\n\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t)\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,wBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAF,sBAAA,CAAAN,OAAA;AACA,IAAAS,eAAA,GAAAH,sBAAA,CAAAN,OAAA;AACA,IAAAU,cAAA,GAAAJ,sBAAA,CAAAN,OAAA;AACA,IAAAW,UAAA,GAAAX,OAAA;AApBA;AACA;AACA;;AAUA;AACA;AACA;;AAQA,MAAMY,YAAY,GAAGA,CAAE;EAAEC,QAAQ;EAAEC,MAAM;EAAE,GAAGC;AAAM,CAAC,KAAM;EAC1D,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EAAE;IACzBJ,QAAQ;IACRC;EACD,CAAE,CAAC;EACH,OAAO,IAAAI,MAAA,CAAAC,aAAA,EAACX,sBAAA,CAAAY,OAAqB;IAAA,GAAMJ,QAAQ;IAAA,GAAQD;EAAK,CAAI,CAAC;AAC9D,CAAC;AAEc,SAASM,gCAAgCA,CAAA,EAAG;EAC1D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AAI,QAAG,IAAAX,QAAE,EAAE,oBAAqB,CAAS,CAC1C,EACCV,eAAe,CAACsB,GAAG,CAAIC,QAAQ,IAChC,IAAApC,MAAA,CAAAC,aAAA,EAACP,YAAY;MACZC,QAAQ,EAAGgB,6BAAoB;MAC/Bf,MAAM,EAAGwC,QAAQ,CAACC,EAAI;MACtBC,GAAG,EAAGF,QAAQ,CAACC,EAAI;MACnBE,WAAW;IAAA,GAET,IAAAC,4BAAc,EACfJ,QAAQ,CAACnB,KAAK,EAAEC,QAAQ,IACvBkB,QAAQ,CAACK,IACX,CACa,CACb,CACQ,CAEX,CACF;IACDC,MAAM,EACL,CAAEtC,gBAAgB,IACjB,IAAAJ,MAAA,CAAAC,aAAA,EAACX,sBAAA,CAAAY,OAAqB;MAACqC,WAAW;MAAA,GAAMnB;IAAa,GAClD,IAAAG,QAAE,EAAE,sBAAuB,CACP;EAExB,CACD,CAAC;AAEJ"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = SidebarNavigationScreenTemplatesBrowse;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _i18n = require("@wordpress/i18n");
|
|
10
10
|
var _data = require("@wordpress/data");
|
|
11
11
|
var _components = require("@wordpress/components");
|
|
@@ -50,7 +50,7 @@ function SidebarNavigationScreenTemplatesBrowse() {
|
|
|
50
50
|
const isTemplatePartsMode = (0, _data.useSelect)(select => {
|
|
51
51
|
return !!select(_store.store).getSettings().supportsTemplatePartsMode;
|
|
52
52
|
}, []);
|
|
53
|
-
return (0,
|
|
53
|
+
return (0, _react.createElement)(_sidebarNavigationScreen.default
|
|
54
54
|
// If a classic theme that supports template parts has never
|
|
55
55
|
// accessed the Patterns page, return to the dashboard.
|
|
56
56
|
, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_data","_components","_router","_sidebarNavigationScreen","_interopRequireDefault","_store","_constants","_lockUnlock","config","TEMPLATE_POST_TYPE","title","__","description","TEMPLATE_PART_POST_TYPE","backPath","useLocation","unlock","routerPrivateApis","SidebarNavigationScreenTemplatesBrowse","params","postType","useNavigator","didAccessPatternsPage","isTemplatePartsMode","useSelect","select","editSiteStore","getSettings","supportsTemplatePartsMode","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_data","_components","_router","_sidebarNavigationScreen","_interopRequireDefault","_store","_constants","_lockUnlock","config","TEMPLATE_POST_TYPE","title","__","description","TEMPLATE_PART_POST_TYPE","backPath","useLocation","unlock","routerPrivateApis","SidebarNavigationScreenTemplatesBrowse","params","postType","useNavigator","didAccessPatternsPage","isTemplatePartsMode","useSelect","select","editSiteStore","getSettings","supportsTemplatePartsMode","_react","createElement","default","isRoot"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-templates-browse/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalUseNavigator as useNavigator } from '@wordpress/components';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\n\nconst config = {\n\t[ TEMPLATE_POST_TYPE ]: {\n\t\ttitle: __( 'All templates' ),\n\t\tdescription: __(\n\t\t\t'Create new templates, or reset any customizations made to the templates supplied by your theme.'\n\t\t),\n\t},\n\t[ TEMPLATE_PART_POST_TYPE ]: {\n\t\ttitle: __( 'All template parts' ),\n\t\tdescription: __(\n\t\t\t'Create new template parts, or reset any customizations made to the template parts supplied by your theme.'\n\t\t),\n\t\tbackPath: '/patterns',\n\t},\n};\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreenTemplatesBrowse() {\n\tconst {\n\t\tparams: { postType },\n\t} = useNavigator();\n\tconst {\n\t\tparams: { didAccessPatternsPage },\n\t} = useLocation();\n\n\tconst isTemplatePartsMode = useSelect( ( select ) => {\n\t\treturn !! select( editSiteStore ).getSettings()\n\t\t\t.supportsTemplatePartsMode;\n\t}, [] );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\t// If a classic theme that supports template parts has never\n\t\t\t// accessed the Patterns page, return to the dashboard.\n\t\t\tisRoot={ isTemplatePartsMode && ! didAccessPatternsPage }\n\t\t\ttitle={ config[ postType ].title }\n\t\t\tdescription={ config[ postType ].description }\n\t\t\tbackPath={ config[ postType ].backPath }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKA,IAAAI,wBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAIA,IAAAQ,WAAA,GAAAR,OAAA;AAjBA;AACA;AACA;;AAMA;AACA;AACA;;AASA,MAAMS,MAAM,GAAG;EACd,CAAEC,6BAAkB,GAAI;IACvBC,KAAK,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC;IAC5BC,WAAW,EAAE,IAAAD,QAAE,EACd,iGACD;EACD,CAAC;EACD,CAAEE,kCAAuB,GAAI;IAC5BH,KAAK,EAAE,IAAAC,QAAE,EAAE,oBAAqB,CAAC;IACjCC,WAAW,EAAE,IAAAD,QAAE,EACd,2GACD,CAAC;IACDG,QAAQ,EAAE;EACX;AACD,CAAC;AAED,MAAM;EAAEC;AAAY,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEpC,SAASC,sCAAsCA,CAAA,EAAG;EAChE,MAAM;IACLC,MAAM,EAAE;MAAEC;IAAS;EACpB,CAAC,GAAG,IAAAC,sCAAY,EAAC,CAAC;EAClB,MAAM;IACLF,MAAM,EAAE;MAAEG;IAAsB;EACjC,CAAC,GAAGP,WAAW,CAAC,CAAC;EAEjB,MAAMQ,mBAAmB,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACpD,OAAO,CAAC,CAAEA,MAAM,CAAEC,YAAc,CAAC,CAACC,WAAW,CAAC,CAAC,CAC7CC,yBAAyB;EAC5B,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAC,MAAA,CAAAC,aAAA,EAAC3B,wBAAA,CAAA4B;EACA;EACA;EAAA;IACAC,MAAM,EAAGT,mBAAmB,IAAI,CAAED,qBAAuB;IACzDZ,KAAK,EAAGF,MAAM,CAAEY,QAAQ,CAAE,CAACV,KAAO;IAClCE,WAAW,EAAGJ,MAAM,CAAEY,QAAQ,CAAE,CAACR,WAAa;IAC9CE,QAAQ,EAAGN,MAAM,CAAEY,QAAQ,CAAE,CAACN;EAAU,CACxC,CAAC;AAEJ"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _data = require("@wordpress/data");
|
|
11
11
|
var _components = require("@wordpress/components");
|
|
@@ -14,6 +14,7 @@ var _i18n = require("@wordpress/i18n");
|
|
|
14
14
|
var _blockEditor = require("@wordpress/block-editor");
|
|
15
15
|
var _coreData = require("@wordpress/core-data");
|
|
16
16
|
var _htmlEntities = require("@wordpress/html-entities");
|
|
17
|
+
var _element = require("@wordpress/element");
|
|
17
18
|
var _icons = require("@wordpress/icons");
|
|
18
19
|
var _commands = require("@wordpress/commands");
|
|
19
20
|
var _keycodes = require("@wordpress/keycodes");
|
|
@@ -87,7 +88,7 @@ const SiteHub = (0, _element.forwardRef)(({
|
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
};
|
|
90
|
-
return (0,
|
|
91
|
+
return (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
91
92
|
ref: ref,
|
|
92
93
|
...restProps,
|
|
93
94
|
className: (0, _classnames.default)('edit-site-site-hub', restProps.className),
|
|
@@ -97,15 +98,15 @@ const SiteHub = (0, _element.forwardRef)(({
|
|
|
97
98
|
duration: disableMotion ? 0 : HUB_ANIMATION_DURATION,
|
|
98
99
|
ease: 'easeOut'
|
|
99
100
|
}
|
|
100
|
-
}, (0,
|
|
101
|
+
}, (0, _react.createElement)(_components.__experimentalHStack, {
|
|
101
102
|
justify: "space-between",
|
|
102
103
|
alignment: "center",
|
|
103
104
|
className: "edit-site-site-hub__container"
|
|
104
|
-
}, (0,
|
|
105
|
+
}, (0, _react.createElement)(_components.__experimentalHStack, {
|
|
105
106
|
justify: "flex-start",
|
|
106
107
|
className: "edit-site-site-hub__text-content",
|
|
107
108
|
spacing: "0"
|
|
108
|
-
}, (0,
|
|
109
|
+
}, (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
109
110
|
className: (0, _classnames.default)('edit-site-site-hub__view-mode-toggle-container', {
|
|
110
111
|
'has-transparent-background': isTransparent
|
|
111
112
|
}),
|
|
@@ -115,10 +116,10 @@ const SiteHub = (0, _element.forwardRef)(({
|
|
|
115
116
|
duration: disableMotion ? 0 : HUB_ANIMATION_DURATION,
|
|
116
117
|
ease: 'easeOut'
|
|
117
118
|
}
|
|
118
|
-
}, (0,
|
|
119
|
+
}, (0, _react.createElement)(_components.Button, {
|
|
119
120
|
...siteIconButtonProps,
|
|
120
121
|
className: "edit-site-layout__view-mode-toggle"
|
|
121
|
-
}, (0,
|
|
122
|
+
}, (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
122
123
|
initial: false,
|
|
123
124
|
animate: {
|
|
124
125
|
scale: canvasMode === 'view' ? 0.5 : 1
|
|
@@ -131,9 +132,9 @@ const SiteHub = (0, _element.forwardRef)(({
|
|
|
131
132
|
duration: disableMotion ? 0 : HUB_ANIMATION_DURATION,
|
|
132
133
|
ease: 'easeOut'
|
|
133
134
|
}
|
|
134
|
-
}, (0,
|
|
135
|
+
}, (0, _react.createElement)(_siteIcon.default, {
|
|
135
136
|
className: "edit-site-layout__view-mode-toggle-icon"
|
|
136
|
-
})))), (0,
|
|
137
|
+
})))), (0, _react.createElement)(_components.__unstableAnimatePresence, null, (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
137
138
|
layout: canvasMode === 'edit',
|
|
138
139
|
animate: {
|
|
139
140
|
opacity: canvasMode === 'view' ? 1 : 0
|
|
@@ -150,14 +151,14 @@ const SiteHub = (0, _element.forwardRef)(({
|
|
|
150
151
|
ease: 'easeOut',
|
|
151
152
|
delay: canvasMode === 'view' ? 0.1 : 0
|
|
152
153
|
}
|
|
153
|
-
}, (0, _htmlEntities.decodeEntities)(siteTitle))), canvasMode === 'view' && (0,
|
|
154
|
+
}, (0, _htmlEntities.decodeEntities)(siteTitle))), canvasMode === 'view' && (0, _react.createElement)(_components.Button, {
|
|
154
155
|
href: homeUrl,
|
|
155
156
|
target: "_blank",
|
|
156
157
|
label: (0, _i18n.__)('View site (opens in a new tab)'),
|
|
157
158
|
"aria-label": (0, _i18n.__)('View site (opens in a new tab)'),
|
|
158
159
|
icon: _icons.external,
|
|
159
160
|
className: "edit-site-site-hub__site-view-link"
|
|
160
|
-
})), canvasMode === 'view' && (0,
|
|
161
|
+
})), canvasMode === 'view' && (0, _react.createElement)(_components.Button, {
|
|
161
162
|
className: (0, _classnames.default)('edit-site-site-hub_toggle-command-center', {
|
|
162
163
|
'is-transparent': isTransparent
|
|
163
164
|
}),
|