@wordpress/edit-site 5.19.2 → 5.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/add-new-page/index.js +9 -8
- package/build/components/add-new-page/index.js.map +1 -1
- package/build/components/add-new-pattern/index.js +12 -15
- 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 +9 -7
- 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 +28 -31
- 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 +44 -23
- 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 +16 -8
- package/build/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +39 -18
- 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 +39 -11
- package/build/components/global-styles/font-library-modal/local-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/resolvers.js +1 -1
- package/build/components/global-styles/font-library-modal/resolvers.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 +26 -0
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -0
- package/build/components/global-styles/font-library-modal/utils/fonts-outline.js +4 -1
- package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/get-notice-from-response.js +71 -0
- package/build/components/global-styles/font-library-modal/utils/get-notice-from-response.js.map +1 -0
- package/build/components/global-styles/font-library-modal/utils/index.js +4 -1
- package/build/components/global-styles/font-library-modal/utils/index.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 -4
- 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 +16 -15
- 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-patterns/use-patterns.js +5 -1
- package/build/components/page-patterns/use-patterns.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 +21 -10
- 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 +3 -3
- 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/hooks.js +71 -0
- package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -0
- 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 +5 -4
- 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 +83 -0
- package/build/components/sidebar-edit-mode/template-panel/replace-template-button.js.map +1 -0
- package/build/components/sidebar-edit-mode/template-panel/template-actions.js +12 -5
- 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 +8 -8
- 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 +5 -3
- 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 -4
- 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 +10 -3
- 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 +27 -15
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/home-template-details.js +26 -30
- 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 +17 -5
- 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/utils/constants.js +1 -1
- package/build/utils/constants.js.map +1 -1
- package/build/utils/get-is-list-page.js +1 -1
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build-module/components/add-new-page/index.js +1 -1
- package/build-module/components/add-new-pattern/index.js +8 -12
- package/build-module/components/add-new-pattern/index.js.map +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 +4 -2
- package/build-module/components/global-styles/font-library-modal/collection-font-details.js.map +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 +27 -31
- package/build-module/components/global-styles/font-library-modal/context.js.map +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 +33 -13
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +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 +11 -4
- package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +29 -9
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/library-font-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 +39 -12
- package/build-module/components/global-styles/font-library-modal/local-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/resolvers.js +1 -1
- package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/tab-layout.js +1 -1
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js +17 -0
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -0
- package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js +4 -1
- package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/get-notice-from-response.js +63 -0
- package/build-module/components/global-styles/font-library-modal/utils/get-notice-from-response.js.map +1 -0
- package/build-module/components/global-styles/font-library-modal/utils/index.js +4 -1
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +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 -2
- package/build-module/components/page-patterns/grid.js.map +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 +2 -2
- package/build-module/components/page-patterns/patterns-list.js.map +1 -1
- package/build-module/components/page-patterns/rename-menu-item.js +1 -1
- package/build-module/components/page-patterns/use-patterns.js +5 -1
- package/build-module/components/page-patterns/use-patterns.js.map +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 +13 -2
- package/build-module/components/page-template-parts/index.js.map +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 +2 -2
- package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +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/hooks.js +64 -0
- package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -0
- 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 +4 -4
- package/build-module/components/sidebar-edit-mode/template-panel/pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/replace-template-button.js +76 -0
- package/build-module/components/sidebar-edit-mode/template-panel/replace-template-button.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +11 -4
- package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +2 -2
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +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 +4 -2
- 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 -2
- 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 +8 -2
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +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 +15 -3
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +15 -20
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +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 +17 -5
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +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/utils/constants.js +1 -1
- package/build-module/utils/constants.js.map +1 -1
- package/build-module/utils/get-is-list-page.js +1 -1
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-style/style-rtl.css +93 -18
- package/build-style/style.css +93 -18
- package/package.json +41 -40
- package/src/components/add-new-pattern/index.js +7 -10
- 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/font-library-modal/collection-font-details.js +1 -1
- package/src/components/global-styles/font-library-modal/context.js +36 -38
- package/src/components/global-styles/font-library-modal/font-collection.js +41 -12
- package/src/components/global-styles/font-library-modal/index.js +16 -6
- package/src/components/global-styles/font-library-modal/installed-fonts.js +36 -6
- package/src/components/global-styles/font-library-modal/local-fonts.js +65 -23
- package/src/components/global-styles/font-library-modal/resolvers.js +1 -1
- package/src/components/global-styles/font-library-modal/style.scss +18 -1
- package/src/components/global-styles/font-library-modal/upload-fonts.js +20 -0
- package/src/components/global-styles/font-library-modal/utils/fonts-outline.js +4 -3
- package/src/components/global-styles/font-library-modal/utils/get-notice-from-response.js +62 -0
- package/src/components/global-styles/font-library-modal/utils/index.js +5 -1
- package/src/components/global-styles/font-library-modal/utils/test/makeFormDataFromFontFamilies.spec.js +1 -1
- 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/page-patterns/grid.js +1 -1
- package/src/components/page-patterns/patterns-list.js +1 -1
- package/src/components/page-patterns/use-patterns.js +7 -3
- package/src/components/page-template-parts/index.js +14 -1
- 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-edit-mode/page-panels/reset-default-template.js +1 -1
- package/src/components/sidebar-edit-mode/template-panel/hooks.js +97 -0
- package/src/components/sidebar-edit-mode/template-panel/pattern-categories.js +18 -16
- package/src/components/sidebar-edit-mode/template-panel/replace-template-button.js +89 -0
- package/src/components/sidebar-edit-mode/template-panel/style.scss +18 -0
- package/src/components/sidebar-edit-mode/template-panel/template-actions.js +27 -12
- package/src/components/sidebar-edit-mode/template-panel/template-areas.js +1 -1
- package/src/components/sidebar-navigation-screen/style.scss +0 -1
- 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 +3 -1
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +3 -1
- package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +11 -5
- package/src/components/sidebar-navigation-screen-patterns/index.js +25 -4
- package/src/components/sidebar-navigation-screen-template/home-template-details.js +27 -35
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +12 -4
- package/src/components/start-template-options/index.js +3 -3
- package/src/hooks/commands/use-common-commands.js +12 -4
- package/src/style.scss +1 -0
- package/src/utils/constants.js +1 -1
- package/src/utils/get-is-list-page.js +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_changeCase","require","_i18n","_coreData","_editor","_data","_addedBy","_useEditedEntityRecord","_interopRequireDefault","_useNavigationMenuContent","_sidebarNavigationScreenDetailsFooter","_sidebarNavigationScreenDetailsPanel","_constants","usePatternDetails","postType","postId","getDescription","getTitle","record","useEditedEntityRecord","templatePartAreas","useSelect","select","editorStore","__experimentalGetDefaultTemplatePartAreas","currentTheme","userPatternCategories","getCurrentTheme","getUserPatternCategories","coreStore","addedBy","useAddedBy","isAddedByActiveTheme","type","theme","stylesheet","title","description","text","PATTERN_TYPES","user","sprintf","__","footer","modified","_element","createElement","default","details","TEMPLATE_PART_POST_TYPE","push","label","value","wp_pattern_sync_status","PATTERN_SYNC_TYPES","unsynced","wp_pattern_category","length","patternCategories","Map","forEach","userCategory","set","id","categories","filter","category","get","map","join","templatePartArea","find","area","areaDetailValue","sentenceCase","className","origin","TEMPLATE_ORIGINS","plugin","has_theme_file","isCustomized","content","Fragment","useNavigationMenuContent","SidebarNavigationScreenDetailsPanel","spacing","SidebarNavigationScreenDetailsPanelRow","key","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelValue"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { sentenceCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useAddedBy } from '../list/added-by';\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport useNavigationMenuContent from './use-navigation-menu-content';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\nimport {\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_SYNC_TYPES,\n\tTEMPLATE_ORIGINS,\n} from '../../utils/constants';\n\nexport default function usePatternDetails( postType, postId ) {\n\tconst { getDescription, getTitle, record } = useEditedEntityRecord(\n\t\tpostType,\n\t\tpostId\n\t);\n\tconst templatePartAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).__experimentalGetDefaultTemplatePartAreas(),\n\t\t[]\n\t);\n\tconst { currentTheme, userPatternCategories } = useSelect( ( select ) => {\n\t\tconst { getCurrentTheme, getUserPatternCategories } =\n\t\t\tselect( coreStore );\n\n\t\treturn {\n\t\t\tcurrentTheme: getCurrentTheme(),\n\t\t\tuserPatternCategories: getUserPatternCategories(),\n\t\t};\n\t}, [] );\n\n\tconst addedBy = useAddedBy( postType, postId );\n\tconst isAddedByActiveTheme =\n\t\taddedBy.type === 'theme' && record.theme === currentTheme?.stylesheet;\n\tconst title = getTitle();\n\tlet description = getDescription();\n\n\tif ( ! description && addedBy.text ) {\n\t\tdescription =\n\t\t\tpostType === PATTERN_TYPES.user\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: %s: pattern title e.g: \"Header\".\n\t\t\t\t\t\t__( 'This is the %s pattern.' ),\n\t\t\t\t\t\tgetTitle()\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t// translators: %s: template part title e.g: \"Header\".\n\t\t\t\t\t\t__( 'This is the %s template part.' ),\n\t\t\t\t\t\tgetTitle()\n\t\t\t\t );\n\t}\n\n\tif ( ! description && postType === PATTERN_TYPES.user && record?.title ) {\n\t\tdescription = sprintf(\n\t\t\t// translators: %s: user created pattern title e.g. \"Footer\".\n\t\t\t__( 'This is the %s pattern.' ),\n\t\t\trecord.title\n\t\t);\n\t}\n\n\tconst footer = record?.modified ? (\n\t\t<SidebarNavigationScreenDetailsFooter record={ record } />\n\t) : null;\n\n\tconst details = [];\n\n\tif (\n\t\tpostType === PATTERN_TYPES.user ||\n\t\tpostType === TEMPLATE_PART_POST_TYPE\n\t) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Syncing' ),\n\t\t\tvalue:\n\t\t\t\trecord.wp_pattern_sync_status === PATTERN_SYNC_TYPES.unsynced\n\t\t\t\t\t? __( 'Not synced' )\n\t\t\t\t\t: __( 'Fully synced' ),\n\t\t} );\n\n\t\tif ( record.wp_pattern_category?.length === 0 ) {\n\t\t\tdetails.push( {\n\t\t\t\tlabel: __( 'Categories' ),\n\t\t\t\tvalue: __( 'Uncategorized' ),\n\t\t\t} );\n\t\t}\n\t\tif ( record.wp_pattern_category?.length > 0 ) {\n\t\t\tconst patternCategories = new Map();\n\t\t\tuserPatternCategories.forEach( ( userCategory ) =>\n\t\t\t\tpatternCategories.set( userCategory.id, userCategory )\n\t\t\t);\n\n\t\t\tconst categories = record.wp_pattern_category\n\t\t\t\t.filter( ( category ) => patternCategories.get( category ) )\n\t\t\t\t.map( ( category ) => patternCategories.get( category ).label );\n\n\t\t\tdetails.push( {\n\t\t\t\tlabel: __( 'Categories' ),\n\t\t\t\tvalue: categories.length > 0 ? categories.join( ', ' ) : '',\n\t\t\t} );\n\t\t}\n\t}\n\n\tif ( postType === TEMPLATE_PART_POST_TYPE ) {\n\t\tconst templatePartArea = templatePartAreas.find(\n\t\t\t( area ) => area.area === record.area\n\t\t);\n\n\t\tlet areaDetailValue = templatePartArea?.label;\n\n\t\tif ( ! areaDetailValue ) {\n\t\t\tareaDetailValue = record.area\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: %s: Sentenced cased template part area e.g: \"My custom area\".\n\t\t\t\t\t\t__( '%s (removed)' ),\n\t\t\t\t\t\tsentenceCase( record.area )\n\t\t\t\t )\n\t\t\t\t: __( 'None' );\n\t\t}\n\n\t\tdetails.push( { label: __( 'Area' ), value: areaDetailValue } );\n\t}\n\n\tif (\n\t\tpostType === TEMPLATE_PART_POST_TYPE &&\n\t\taddedBy.text &&\n\t\t! isAddedByActiveTheme\n\t) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Added by' ),\n\t\t\tvalue: (\n\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-pattern__added-by-description-author\">\n\t\t\t\t\t{ addedBy.text }\n\t\t\t\t</span>\n\t\t\t),\n\t\t} );\n\t}\n\n\tif (\n\t\tpostType === TEMPLATE_PART_POST_TYPE &&\n\t\taddedBy.text &&\n\t\t( record.origin === TEMPLATE_ORIGINS.plugin ||\n\t\t\trecord.has_theme_file === true )\n\t) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Customized' ),\n\t\t\tvalue: (\n\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-pattern__added-by-description-customized\">\n\t\t\t\t\t{ addedBy.isCustomized ? __( 'Yes' ) : __( 'No' ) }\n\t\t\t\t</span>\n\t\t\t),\n\t\t} );\n\t}\n\n\tconst content = (\n\t\t<>\n\t\t\t{ useNavigationMenuContent( postType, postId ) }\n\t\t\t{ !! details.length && (\n\t\t\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\t\t\tspacing={ 5 }\n\t\t\t\t\ttitle={ __( 'Details' ) }\n\t\t\t\t>\n\t\t\t\t\t{ details.map( ( { label, value } ) => (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelRow key={ label }>\n\t\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t\t\t{ value }\n\t\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t) ) }\n\t\t\t\t</SidebarNavigationScreenDetailsPanel>\n\t\t\t) }\n\t\t</>\n\t);\n\n\treturn { title, description, content, footer };\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,yBAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,qCAAA,GAAAF,sBAAA,CAAAP,OAAA;AACA,IAAAU,oCAAA,GAAAV,OAAA;AAMA,IAAAW,UAAA,GAAAX,OAAA;AA1BA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAkBe,SAASY,iBAAiBA,CAAEC,QAAQ,EAAEC,MAAM,EAAG;EAC7D,MAAM;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AAI,KACVpB,MAAM,CAAC0D,MAAM,KAAKC,2BAAgB,CAACC,MAAM,IAC1C5D,MAAM,CAAC6D,cAAc,KAAK,IAAI,CAAE,EAChC;IACD/B,OAAO,CAACE,IAAI,CAAE;MACbC,KAAK,EAAE,IAAAT,QAAE,EAAE,YAAa,CAAC;MACzBU,KAAK,EACJ,IAAAP,QAAA,CAAAC,aAAA;QAAM6B,SAAS,EAAC;MAA8E,GAC3F7C,OAAO,CAACkD,YAAY,GAAG,IAAAtC,QAAE,EAAE,KAAM,CAAC,GAAG,IAAAA,QAAE,EAAE,IAAK,CAC3C;IAER,CAAE,CAAC;EACJ;EAEA,MAAMuC,OAAO,GACZ,IAAApC,QAAA,CAAAC,aAAA,EAAAD,QAAA,CAAAqC,QAAA,QACG,IAAAC,iCAAwB,EAAErE,QAAQ,EAAEC,MAAO,CAAC,EAC5C,CAAC,CAAEiC,OAAO,CAACS,MAAM,IAClB,IAAAZ,QAAA,CAAAC,aAAA,EAACnC,oCAAA,CAAAyE,mCAAmC;IACnCC,OAAO,EAAG,CAAG;IACbjD,KAAK,EAAG,IAAAM,QAAE,EAAE,SAAU;EAAG,GAEvBM,OAAO,CAACoB,GAAG,CAAE,CAAE;IAAEjB,KAAK;IAAEC;EAAM,CAAC,KAChC,IAAAP,QAAA,CAAAC,aAAA,EAACnC,oCAAA,CAAA2E,sCAAsC;IAACC,GAAG,EAAGpC;EAAO,GACpD,IAAAN,QAAA,CAAAC,aAAA,EAACnC,oCAAA,CAAA6E,wCAAwC,QACtCrC,KACuC,CAAC,EAC3C,IAAAN,QAAA,CAAAC,aAAA,EAACnC,oCAAA,CAAA8E,wCAAwC,QACtCrC,KACuC,CACH,CACvC,CACkC,CAErC,CACF;EAED,OAAO;IAAEhB,KAAK;IAAEC,WAAW;IAAE4C,OAAO;IAAEtC;EAAO,CAAC;AAC/C"}
|
|
1
|
+
{"version":3,"names":["_changeCase","require","_i18n","_coreData","_editor","_data","_addedBy","_useEditedEntityRecord","_interopRequireDefault","_useNavigationMenuContent","_sidebarNavigationScreenDetailsFooter","_sidebarNavigationScreenDetailsPanel","_constants","usePatternDetails","postType","postId","getDescription","getTitle","record","useEditedEntityRecord","templatePartAreas","useSelect","select","editorStore","__experimentalGetDefaultTemplatePartAreas","currentTheme","userPatternCategories","getCurrentTheme","getUserPatternCategories","coreStore","addedBy","useAddedBy","isAddedByActiveTheme","type","theme","stylesheet","title","description","text","PATTERN_TYPES","user","sprintf","__","footer","modified","_react","createElement","default","details","TEMPLATE_PART_POST_TYPE","push","label","value","wp_pattern_sync_status","PATTERN_SYNC_TYPES","unsynced","wp_pattern_category","length","patternCategories","Map","forEach","userCategory","set","id","categories","filter","category","get","map","join","templatePartArea","find","area","areaDetailValue","sentenceCase","className","origin","TEMPLATE_ORIGINS","plugin","has_theme_file","isCustomized","content","Fragment","useNavigationMenuContent","SidebarNavigationScreenDetailsPanel","spacing","SidebarNavigationScreenDetailsPanelRow","key","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelValue"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { sentenceCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useAddedBy } from '../list/added-by';\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport useNavigationMenuContent from './use-navigation-menu-content';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\nimport {\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_SYNC_TYPES,\n\tTEMPLATE_ORIGINS,\n} from '../../utils/constants';\n\nexport default function usePatternDetails( postType, postId ) {\n\tconst { getDescription, getTitle, record } = useEditedEntityRecord(\n\t\tpostType,\n\t\tpostId\n\t);\n\tconst templatePartAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).__experimentalGetDefaultTemplatePartAreas(),\n\t\t[]\n\t);\n\tconst { currentTheme, userPatternCategories } = useSelect( ( select ) => {\n\t\tconst { getCurrentTheme, getUserPatternCategories } =\n\t\t\tselect( coreStore );\n\n\t\treturn {\n\t\t\tcurrentTheme: getCurrentTheme(),\n\t\t\tuserPatternCategories: getUserPatternCategories(),\n\t\t};\n\t}, [] );\n\n\tconst addedBy = useAddedBy( postType, postId );\n\tconst isAddedByActiveTheme =\n\t\taddedBy.type === 'theme' && record.theme === currentTheme?.stylesheet;\n\tconst title = getTitle();\n\tlet description = getDescription();\n\n\tif ( ! description && addedBy.text ) {\n\t\tdescription =\n\t\t\tpostType === PATTERN_TYPES.user\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: %s: pattern title e.g: \"Header\".\n\t\t\t\t\t\t__( 'This is the %s pattern.' ),\n\t\t\t\t\t\tgetTitle()\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t// translators: %s: template part title e.g: \"Header\".\n\t\t\t\t\t\t__( 'This is the %s template part.' ),\n\t\t\t\t\t\tgetTitle()\n\t\t\t\t );\n\t}\n\n\tif ( ! description && postType === PATTERN_TYPES.user && record?.title ) {\n\t\tdescription = sprintf(\n\t\t\t// translators: %s: user created pattern title e.g. \"Footer\".\n\t\t\t__( 'This is the %s pattern.' ),\n\t\t\trecord.title\n\t\t);\n\t}\n\n\tconst footer = record?.modified ? (\n\t\t<SidebarNavigationScreenDetailsFooter record={ record } />\n\t) : null;\n\n\tconst details = [];\n\n\tif (\n\t\tpostType === PATTERN_TYPES.user ||\n\t\tpostType === TEMPLATE_PART_POST_TYPE\n\t) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Syncing' ),\n\t\t\tvalue:\n\t\t\t\trecord.wp_pattern_sync_status === PATTERN_SYNC_TYPES.unsynced\n\t\t\t\t\t? __( 'Not synced' )\n\t\t\t\t\t: __( 'Fully synced' ),\n\t\t} );\n\n\t\tif ( record.wp_pattern_category?.length === 0 ) {\n\t\t\tdetails.push( {\n\t\t\t\tlabel: __( 'Categories' ),\n\t\t\t\tvalue: __( 'Uncategorized' ),\n\t\t\t} );\n\t\t}\n\t\tif ( record.wp_pattern_category?.length > 0 ) {\n\t\t\tconst patternCategories = new Map();\n\t\t\tuserPatternCategories.forEach( ( userCategory ) =>\n\t\t\t\tpatternCategories.set( userCategory.id, userCategory )\n\t\t\t);\n\n\t\t\tconst categories = record.wp_pattern_category\n\t\t\t\t.filter( ( category ) => patternCategories.get( category ) )\n\t\t\t\t.map( ( category ) => patternCategories.get( category ).label );\n\n\t\t\tdetails.push( {\n\t\t\t\tlabel: __( 'Categories' ),\n\t\t\t\tvalue: categories.length > 0 ? categories.join( ', ' ) : '',\n\t\t\t} );\n\t\t}\n\t}\n\n\tif ( postType === TEMPLATE_PART_POST_TYPE ) {\n\t\tconst templatePartArea = templatePartAreas.find(\n\t\t\t( area ) => area.area === record.area\n\t\t);\n\n\t\tlet areaDetailValue = templatePartArea?.label;\n\n\t\tif ( ! areaDetailValue ) {\n\t\t\tareaDetailValue = record.area\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: %s: Sentenced cased template part area e.g: \"My custom area\".\n\t\t\t\t\t\t__( '%s (removed)' ),\n\t\t\t\t\t\tsentenceCase( record.area )\n\t\t\t\t )\n\t\t\t\t: __( 'None' );\n\t\t}\n\n\t\tdetails.push( { label: __( 'Area' ), value: areaDetailValue } );\n\t}\n\n\tif (\n\t\tpostType === TEMPLATE_PART_POST_TYPE &&\n\t\taddedBy.text &&\n\t\t! isAddedByActiveTheme\n\t) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Added by' ),\n\t\t\tvalue: (\n\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-pattern__added-by-description-author\">\n\t\t\t\t\t{ addedBy.text }\n\t\t\t\t</span>\n\t\t\t),\n\t\t} );\n\t}\n\n\tif (\n\t\tpostType === TEMPLATE_PART_POST_TYPE &&\n\t\taddedBy.text &&\n\t\t( record.origin === TEMPLATE_ORIGINS.plugin ||\n\t\t\trecord.has_theme_file === true )\n\t) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Customized' ),\n\t\t\tvalue: (\n\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-pattern__added-by-description-customized\">\n\t\t\t\t\t{ addedBy.isCustomized ? __( 'Yes' ) : __( 'No' ) }\n\t\t\t\t</span>\n\t\t\t),\n\t\t} );\n\t}\n\n\tconst content = (\n\t\t<>\n\t\t\t{ useNavigationMenuContent( postType, postId ) }\n\t\t\t{ !! details.length && (\n\t\t\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\t\t\tspacing={ 5 }\n\t\t\t\t\ttitle={ __( 'Details' ) }\n\t\t\t\t>\n\t\t\t\t\t{ details.map( ( { label, value } ) => (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelRow key={ label }>\n\t\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t\t\t{ value }\n\t\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t) ) }\n\t\t\t\t</SidebarNavigationScreenDetailsPanel>\n\t\t\t) }\n\t\t</>\n\t);\n\n\treturn { title, description, content, footer };\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC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EjB,KAAK;IAAEC;EAAM,CAAC,KAChC,IAAAP,MAAA,CAAAC,aAAA,EAACnC,oCAAA,CAAA2E,sCAAsC;IAACC,GAAG,EAAGpC;EAAO,GACpD,IAAAN,MAAA,CAAAC,aAAA,EAACnC,oCAAA,CAAA6E,wCAAwC,QACtCrC,KACuC,CAAC,EAC3C,IAAAN,MAAA,CAAAC,aAAA,EAACnC,oCAAA,CAAA8E,wCAAwC,QACtCrC,KACuC,CACH,CACvC,CACkC,CAErC,CACF;EAED,OAAO;IAAEhB,KAAK;IAAEC,WAAW;IAAE4C,OAAO;IAAEtC;EAAO,CAAC;AAC/C"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = CategoryItem;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _sidebarNavigationItem = _interopRequireDefault(require("../sidebar-navigation-item"));
|
|
10
10
|
var _link = require("../routes/link");
|
|
11
11
|
/**
|
|
@@ -28,10 +28,10 @@ function CategoryItem({
|
|
|
28
28
|
if (!count) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
return (0,
|
|
31
|
+
return (0, _react.createElement)(_sidebarNavigationItem.default, {
|
|
32
32
|
...linkInfo,
|
|
33
33
|
icon: icon,
|
|
34
|
-
suffix: (0,
|
|
34
|
+
suffix: (0, _react.createElement)("span", null, count),
|
|
35
35
|
"aria-current": isActive ? 'true' : undefined
|
|
36
36
|
}, label);
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_sidebarNavigationItem","_interopRequireDefault","require","_link","CategoryItem","count","icon","id","isActive","label","type","linkInfo","useLink","path","categoryType","categoryId","
|
|
1
|
+
{"version":3,"names":["_sidebarNavigationItem","_interopRequireDefault","require","_link","CategoryItem","count","icon","id","isActive","label","type","linkInfo","useLink","path","categoryType","categoryId","_react","createElement","default","suffix","undefined"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/category-item.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { useLink } from '../routes/link';\n\nexport default function CategoryItem( {\n\tcount,\n\ticon,\n\tid,\n\tisActive,\n\tlabel,\n\ttype,\n} ) {\n\tconst linkInfo = useLink( {\n\t\tpath: '/patterns',\n\t\tcategoryType: type,\n\t\tcategoryId: id,\n\t} );\n\n\tif ( ! count ) {\n\t\treturn;\n\t}\n\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...linkInfo }\n\t\t\ticon={ icon }\n\t\t\tsuffix={ <span>{ count }</span> }\n\t\t\taria-current={ isActive ? 'true' : undefined }\n\t\t>\n\t\t\t{ label }\n\t\t</SidebarNavigationItem>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIe,SAASE,YAAYA,CAAE;EACrCC,KAAK;EACLC,IAAI;EACJC,EAAE;EACFC,QAAQ;EACRC,KAAK;EACLC;AACD,CAAC,EAAG;EACH,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EAAE;IACzBC,IAAI,EAAE,WAAW;IACjBC,YAAY,EAAEJ,IAAI;IAClBK,UAAU,EAAER;EACb,CAAE,CAAC;EAEH,IAAK,CAAEF,KAAK,EAAG;IACd;EACD;EAEA,OACC,IAAAW,MAAA,CAAAC,aAAA,EAACjB,sBAAA,CAAAkB,OAAqB;IAAA,GAChBP,QAAQ;IACbL,IAAI,EAAGA,IAAM;IACba,MAAM,EAAG,IAAAH,MAAA,CAAAC,aAAA,gBAAQZ,KAAa,CAAG;IACjC,gBAAeG,QAAQ,GAAG,MAAM,GAAGY;EAAW,GAE5CX,KACoB,CAAC;AAE1B"}
|
|
@@ -5,12 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = SidebarNavigationScreenPatterns;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _components = require("@wordpress/components");
|
|
10
10
|
var _compose = require("@wordpress/compose");
|
|
11
11
|
var _editor = require("@wordpress/editor");
|
|
12
12
|
var _i18n = require("@wordpress/i18n");
|
|
13
13
|
var _url = require("@wordpress/url");
|
|
14
|
+
var _coreData = require("@wordpress/core-data");
|
|
15
|
+
var _data = require("@wordpress/data");
|
|
14
16
|
var _icons = require("@wordpress/icons");
|
|
15
17
|
var _addNewPattern = _interopRequireDefault(require("../add-new-pattern"));
|
|
16
18
|
var _sidebarNavigationItem = _interopRequireDefault(require("../sidebar-navigation-item"));
|
|
@@ -20,6 +22,7 @@ var _constants = require("../../utils/constants");
|
|
|
20
22
|
var _link = require("../routes/link");
|
|
21
23
|
var _usePatternCategories = _interopRequireDefault(require("./use-pattern-categories"));
|
|
22
24
|
var _useTemplatePartAreas = _interopRequireDefault(require("./use-template-part-areas"));
|
|
25
|
+
var _store = require("../../store");
|
|
23
26
|
/**
|
|
24
27
|
* WordPress dependencies
|
|
25
28
|
*/
|
|
@@ -33,16 +36,16 @@ function TemplatePartGroup({
|
|
|
33
36
|
currentArea,
|
|
34
37
|
currentType
|
|
35
38
|
}) {
|
|
36
|
-
return (0,
|
|
39
|
+
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)("div", {
|
|
37
40
|
className: "edit-site-sidebar-navigation-screen-patterns__group-header"
|
|
38
|
-
}, (0,
|
|
41
|
+
}, (0, _react.createElement)(_components.__experimentalHeading, {
|
|
39
42
|
level: 2
|
|
40
|
-
}, (0, _i18n.__)('Template parts'))), (0,
|
|
43
|
+
}, (0, _i18n.__)('Template parts'))), (0, _react.createElement)(_components.__experimentalItemGroup, {
|
|
41
44
|
className: "edit-site-sidebar-navigation-screen-patterns__group"
|
|
42
45
|
}, Object.entries(areas).map(([area, {
|
|
43
46
|
label,
|
|
44
47
|
templateParts
|
|
45
|
-
}]) => (0,
|
|
48
|
+
}]) => (0, _react.createElement)(_categoryItem.default, {
|
|
46
49
|
key: area,
|
|
47
50
|
count: templateParts?.length,
|
|
48
51
|
icon: (0, _editor.getTemplatePartIcon)(area),
|
|
@@ -57,9 +60,9 @@ function PatternCategoriesGroup({
|
|
|
57
60
|
currentCategory,
|
|
58
61
|
currentType
|
|
59
62
|
}) {
|
|
60
|
-
return (0,
|
|
63
|
+
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.__experimentalItemGroup, {
|
|
61
64
|
className: "edit-site-sidebar-navigation-screen-patterns__group"
|
|
62
|
-
}, categories.map(category => (0,
|
|
65
|
+
}, categories.map(category => (0, _react.createElement)(_categoryItem.default, {
|
|
63
66
|
key: category.name,
|
|
64
67
|
count: category.count,
|
|
65
68
|
label: category.label,
|
|
@@ -86,29 +89,38 @@ function SidebarNavigationScreenPatterns() {
|
|
|
86
89
|
patternCategories,
|
|
87
90
|
hasPatterns
|
|
88
91
|
} = (0, _usePatternCategories.default)();
|
|
92
|
+
const isBlockBasedTheme = (0, _data.useSelect)(select => select(_coreData.store).getCurrentTheme()?.is_block_theme, []);
|
|
93
|
+
const isTemplatePartsMode = (0, _data.useSelect)(select => {
|
|
94
|
+
const settings = select(_store.store).getSettings();
|
|
95
|
+
return !!settings.supportsTemplatePartsMode;
|
|
96
|
+
}, []);
|
|
89
97
|
const templatePartsLink = (0, _link.useLink)({
|
|
90
|
-
path: '/wp_template_part/all'
|
|
98
|
+
path: '/wp_template_part/all',
|
|
99
|
+
// If a classic theme that supports template parts accessed
|
|
100
|
+
// the Patterns page directly, preserve that state in the URL.
|
|
101
|
+
didAccessPatternsPage: !isBlockBasedTheme && isTemplatePartsMode ? 1 : undefined
|
|
91
102
|
});
|
|
92
|
-
const footer = !isMobileViewport ? (0,
|
|
103
|
+
const footer = !isMobileViewport ? (0, _react.createElement)(_components.__experimentalItemGroup, null, (0, _react.createElement)(_sidebarNavigationItem.default, {
|
|
93
104
|
as: "a",
|
|
94
105
|
href: "edit.php?post_type=wp_block",
|
|
95
106
|
withChevron: true
|
|
96
|
-
}, (0, _i18n.__)('Manage all of my patterns')), (0,
|
|
107
|
+
}, (0, _i18n.__)('Manage all of my patterns')), (isBlockBasedTheme || isTemplatePartsMode) && (0, _react.createElement)(_sidebarNavigationItem.default, {
|
|
97
108
|
withChevron: true,
|
|
98
109
|
...templatePartsLink
|
|
99
110
|
}, (0, _i18n.__)('Manage all template parts'))) : undefined;
|
|
100
|
-
return (0,
|
|
111
|
+
return (0, _react.createElement)(_sidebarNavigationScreen.default, {
|
|
112
|
+
isRoot: !isBlockBasedTheme,
|
|
101
113
|
title: (0, _i18n.__)('Patterns'),
|
|
102
114
|
description: (0, _i18n.__)('Manage what patterns are available when editing the site.'),
|
|
103
|
-
actions: (0,
|
|
115
|
+
actions: (0, _react.createElement)(_addNewPattern.default, null),
|
|
104
116
|
footer: footer,
|
|
105
|
-
content: (0,
|
|
117
|
+
content: (0, _react.createElement)(_react.Fragment, null, isLoading && (0, _i18n.__)('Loading patterns…'), !isLoading && (0, _react.createElement)(_react.Fragment, null, !hasTemplateParts && !hasPatterns && (0, _react.createElement)(_components.__experimentalItemGroup, {
|
|
106
118
|
className: "edit-site-sidebar-navigation-screen-patterns__group"
|
|
107
|
-
}, (0,
|
|
119
|
+
}, (0, _react.createElement)(_components.__experimentalItem, null, (0, _i18n.__)('No template parts or patterns found'))), hasPatterns && (0, _react.createElement)(PatternCategoriesGroup, {
|
|
108
120
|
categories: patternCategories,
|
|
109
121
|
currentCategory: currentCategory,
|
|
110
122
|
currentType: currentType
|
|
111
|
-
}), hasTemplateParts && (0,
|
|
123
|
+
}), hasTemplateParts && (0, _react.createElement)(TemplatePartGroup, {
|
|
112
124
|
areas: templatePartAreas,
|
|
113
125
|
currentArea: currentCategory,
|
|
114
126
|
currentType: currentType
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_compose","_editor","_i18n","_url","_icons","_addNewPattern","_interopRequireDefault","_sidebarNavigationItem","_sidebarNavigationScreen","_categoryItem","_constants","_link","_usePatternCategories","_useTemplatePartAreas","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","templatePartsLink","useLink","path","footer","as","withChevron","undefined","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 { 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';\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\n\tconst templatePartsLink = useLink( { path: '/wp_template_part/all' } );\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<SidebarNavigationItem withChevron { ...templatePartsLink }>\n\t\t\t\t{ __( 'Manage all template parts' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t</ItemGroup>\n\t) : undefined;\n\n\treturn (\n\t\t<SidebarNavigationScreen\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,MAAA,GAAAL,OAAA;AAKA,IAAAM,cAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,wBAAA,GAAAF,sBAAA,CAAAP,OAAA;AACA,IAAAU,aAAA,GAAAH,sBAAA,CAAAP,OAAA;AACA,IAAAW,UAAA,GAAAX,OAAA;AAKA,IAAAY,KAAA,GAAAZ,OAAA;AACA,IAAAa,qBAAA,GAAAN,sBAAA,CAAAP,OAAA;AACA,IAAAc,qBAAA,GAAAP,sBAAA,CAAAP,OAAA;AA5BA;AACA;AACA;;AAYA;AACA;AACA;;AAcA,SAASe,iBAAiBA,CAAE;EAAEC,KAAK;EAAEC,WAAW;EAAEC;AAAY,CAAC,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|
|
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\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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,
|
|
@@ -55,13 +56,6 @@ function TemplateAreaButton({
|
|
|
55
56
|
}, (0, _htmlEntities.decodeEntities)(title)));
|
|
56
57
|
}
|
|
57
58
|
function HomeTemplateDetails() {
|
|
58
|
-
const navigator = (0, _components.__experimentalUseNavigator)();
|
|
59
|
-
const {
|
|
60
|
-
params: {
|
|
61
|
-
postType,
|
|
62
|
-
postId
|
|
63
|
-
}
|
|
64
|
-
} = navigator;
|
|
65
59
|
const {
|
|
66
60
|
editEntityRecord
|
|
67
61
|
} = (0, _data.useDispatch)(_coreData.store);
|
|
@@ -76,22 +70,21 @@ function HomeTemplateDetails() {
|
|
|
76
70
|
const {
|
|
77
71
|
getEntityRecord
|
|
78
72
|
} = select(_coreData.store);
|
|
79
|
-
const siteSettings = getEntityRecord('root', 'site');
|
|
80
73
|
const {
|
|
81
|
-
getSettings
|
|
74
|
+
getSettings,
|
|
75
|
+
getCurrentTemplateTemplateParts
|
|
82
76
|
} = (0, _lockUnlock.unlock)(select(_store.store));
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
const _postsPageRecord = siteSettings?.page_for_posts ? select(_coreData.store).getEntityRecord('postType', 'page', siteSettings?.page_for_posts) : EMPTY_OBJECT;
|
|
77
|
+
const siteSettings = getEntityRecord('root', 'site');
|
|
78
|
+
const _postsPageRecord = siteSettings?.page_for_posts ? getEntityRecord('postType', 'page', siteSettings?.page_for_posts) : EMPTY_OBJECT;
|
|
86
79
|
return {
|
|
87
80
|
allowCommentsOnNewPosts: siteSettings?.default_comment_status === 'open',
|
|
88
81
|
postsPageTitle: _postsPageRecord?.title?.rendered,
|
|
89
82
|
postsPageId: _postsPageRecord?.id,
|
|
90
83
|
postsPerPage: siteSettings?.posts_per_page,
|
|
91
|
-
templatePartAreas:
|
|
92
|
-
currentTemplateParts:
|
|
84
|
+
templatePartAreas: getSettings()?.defaultTemplatePartAreas,
|
|
85
|
+
currentTemplateParts: getCurrentTemplateTemplateParts()
|
|
93
86
|
};
|
|
94
|
-
}, [
|
|
87
|
+
}, []);
|
|
95
88
|
const [commentsOnNewPostsValue, setCommentsOnNewPostsValue] = (0, _element.useState)('');
|
|
96
89
|
const [postsCountValue, setPostsCountValue] = (0, _element.useState)(1);
|
|
97
90
|
const [postsPageTitleValue, setPostsPageTitleValue] = (0, _element.useState)('');
|
|
@@ -113,12 +106,14 @@ function HomeTemplateDetails() {
|
|
|
113
106
|
*/
|
|
114
107
|
const templateAreas = (0, _element.useMemo)(() => {
|
|
115
108
|
return currentTemplateParts.length && templatePartAreas ? currentTemplateParts.map(({
|
|
116
|
-
templatePart
|
|
109
|
+
templatePart,
|
|
110
|
+
block
|
|
117
111
|
}) => ({
|
|
118
112
|
...templatePartAreas?.find(({
|
|
119
113
|
area
|
|
120
114
|
}) => area === templatePart?.area),
|
|
121
|
-
...templatePart
|
|
115
|
+
...templatePart,
|
|
116
|
+
clientId: block.clientId
|
|
122
117
|
})) : [];
|
|
123
118
|
}, [currentTemplateParts, templatePartAreas]);
|
|
124
119
|
const setAllowCommentsOnNewPosts = newValue => {
|
|
@@ -139,9 +134,9 @@ function HomeTemplateDetails() {
|
|
|
139
134
|
posts_per_page: newValue
|
|
140
135
|
});
|
|
141
136
|
};
|
|
142
|
-
return (0,
|
|
137
|
+
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanel, {
|
|
143
138
|
spacing: 6
|
|
144
|
-
}, postsPageId && (0,
|
|
139
|
+
}, postsPageId && (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, null, (0, _react.createElement)(_components.__experimentalInputControl, {
|
|
145
140
|
className: "edit-site-sidebar-navigation-screen__input-control",
|
|
146
141
|
placeholder: (0, _i18n.__)('No Title'),
|
|
147
142
|
size: '__unstable-large',
|
|
@@ -149,7 +144,7 @@ function HomeTemplateDetails() {
|
|
|
149
144
|
onChange: (0, _compose.debounce)(setPostsPageTitle, 300),
|
|
150
145
|
label: (0, _i18n.__)('Blog title'),
|
|
151
146
|
help: (0, _i18n.__)('Set the Posts Page title. Appears in search results, and when the page is shared on social media.')
|
|
152
|
-
})), (0,
|
|
147
|
+
})), (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, null, (0, _react.createElement)(_components.__experimentalNumberControl, {
|
|
153
148
|
className: "edit-site-sidebar-navigation-screen__input-control",
|
|
154
149
|
placeholder: 0,
|
|
155
150
|
value: postsCountValue,
|
|
@@ -160,27 +155,28 @@ function HomeTemplateDetails() {
|
|
|
160
155
|
onChange: setPostsPerPage,
|
|
161
156
|
label: (0, _i18n.__)('Posts per page'),
|
|
162
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.')
|
|
163
|
-
}))), (0,
|
|
158
|
+
}))), (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanel, {
|
|
164
159
|
title: (0, _i18n.__)('Discussion'),
|
|
165
160
|
spacing: 3
|
|
166
|
-
}, (0,
|
|
161
|
+
}, (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, null, (0, _react.createElement)(_components.CheckboxControl, {
|
|
167
162
|
className: "edit-site-sidebar-navigation-screen__input-control",
|
|
168
163
|
label: (0, _i18n.__)('Allow comments on new posts'),
|
|
169
164
|
help: (0, _i18n.__)('Changes will apply to new posts only. Individual posts may override these settings.'),
|
|
170
165
|
checked: commentsOnNewPostsValue,
|
|
171
166
|
onChange: setAllowCommentsOnNewPosts
|
|
172
|
-
}))), (0,
|
|
167
|
+
}))), (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanel, {
|
|
173
168
|
title: (0, _i18n.__)('Areas'),
|
|
174
169
|
spacing: 3
|
|
175
|
-
}, (0,
|
|
170
|
+
}, (0, _react.createElement)(_components.__experimentalItemGroup, null, templateAreas.map(({
|
|
171
|
+
clientId,
|
|
176
172
|
label,
|
|
177
173
|
icon,
|
|
178
174
|
theme,
|
|
179
175
|
slug,
|
|
180
176
|
title
|
|
181
|
-
}) => (0,
|
|
182
|
-
key:
|
|
183
|
-
}, (0,
|
|
177
|
+
}) => (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, {
|
|
178
|
+
key: clientId
|
|
179
|
+
}, (0, _react.createElement)(TemplateAreaButton, {
|
|
184
180
|
postId: `${theme}//${slug}`,
|
|
185
181
|
title: title?.rendered || label,
|
|
186
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","navigator","useNavigator","params","editEntityRecord","useDispatch","coreStore","allowCommentsOnNewPosts","templatePartAreas","postsPerPage","postsPageTitle","postsPageId","currentTemplateParts","useSelect","select","getEntityRecord","siteSettings","getSettings","unlock","editSiteStore","_currentTemplateParts","getCurrentTemplateTemplateParts","siteEditorSettings","_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","find","area","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__experimentalUseNavigator as useNavigator,\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 navigator = useNavigator();\n\tconst {\n\t\tparams: { postType, postId },\n\t} = navigator;\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(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst _currentTemplateParts =\n\t\t\t\tselect( editSiteStore ).getCurrentTemplateTemplateParts();\n\t\t\tconst siteEditorSettings = getSettings();\n\t\t\tconst _postsPageRecord = siteSettings?.page_for_posts\n\t\t\t\t? select( coreStore ).getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'page',\n\t\t\t\t\t\tsiteSettings?.page_for_posts\n\t\t\t\t )\n\t\t\t\t: EMPTY_OBJECT;\n\n\t\t\treturn {\n\t\t\t\tallowCommentsOnNewPosts:\n\t\t\t\t\tsiteSettings?.default_comment_status === 'open',\n\t\t\t\tpostsPageTitle: _postsPageRecord?.title?.rendered,\n\t\t\t\tpostsPageId: _postsPageRecord?.id,\n\t\t\t\tpostsPerPage: siteSettings?.posts_per_page,\n\t\t\t\ttemplatePartAreas: siteEditorSettings?.defaultTemplatePartAreas,\n\t\t\t\tcurrentTemplateParts: _currentTemplateParts,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\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 } ) => ( {\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 } ) )\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( { label, icon, theme, slug, title } ) => (\n\t\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelRow\n\t\t\t\t\t\t\t\tkey={ slug }\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":";;;;;;;AAgBA,IAAAA,QAAA,GAAAC,OAAA;AAbA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAQA,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;AA9BA;AACA;AACA;;AAiBA;AACA;AACA;;AAWA,MAAMe,YAAY,GAAG,CAAC,CAAC;AAEvB,SAASC,kBAAkBA,CAAE;EAAEC,MAAM;EAAE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CM,IAAI,EAAG,IAAAN,QAAE,EACR,qFACD,CAAG;IACHY,OAAO,EAAGtC,uBAAyB;IACnC6B,QAAQ,EAAGd;EAA4B,CACvC,CACsC,CACJ,CAAC,EACtC,IAAApF,QAAA,CAAA6B,aAAA,EAACpB,oCAAA,CAAAiF,mCAAmC;IACnCtE,KAAK,EAAG,IAAA2E,QAAE,EAAE,OAAQ,CAAG;IACvBJ,OAAO,EAAG;EAAG,GAEb,IAAA3F,QAAA,CAAA6B,aAAA,EAACvB,WAAA,CAAAsG,uBAAS,QACP/B,aAAa,CAACG,GAAG,CAClB,CAAE;IAAEoB,KAAK;IAAEjF,IAAI;IAAE0F,KAAK;IAAEC,IAAI;IAAE1F;EAAM,CAAC,KACpC,IAAApB,QAAA,CAAA6B,aAAA,EAACpB,oCAAA,CAAAmF,sCAAsC;IACtCmB,GAAG,EAAGD;EAAM,GAEZ,IAAA9G,QAAA,CAAA6B,aAAA,EAACZ,kBAAkB;IAClBC,MAAM,EAAI,GAAG2F,KAAO,KAAKC,IAAM,EAAG;IAClC1F,KAAK,EAAGA,KAAK,EAAE6C,QAAQ,IAAImC,KAAO;IAClCjF,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,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AAAmG,eAAe;IACfxE,SAAS,EAAC,oDAAoD;IAC9DkE,KAAK,EAAG,IAAAL,QAAE,EAAE,6BAA8B,CAAG;IAC7CM,IAAI,EAAG,IAAAN,QAAE,EACR,qFACD,CAAG;IACHY,OAAO,EAAGxC,uBAAyB;IACnC+B,QAAQ,EAAGd;EAA4B,CACvC,CACsC,CACJ,CAAC,EACtC,IAAArD,MAAA,CAAAC,aAAA,EAACrB,oCAAA,CAAA+E,mCAAmC;IACnCpE,KAAK,EAAG,IAAAyE,QAAE,EAAE,OAAQ,CAAG;IACvBJ,OAAO,EAAG;EAAG,GAEb,IAAA5D,MAAA,CAAAC,aAAA,EAACzB,WAAA,CAAAqG,uBAAS,QACPjC,aAAa,CAACG,GAAG,CAClB,CAAE;IAAEK,QAAQ;IAAEiB,KAAK;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,OAAA;AAIA,IAAAI,SAAA,GAAAJ,OAAA;AAIA,IAAAK,wBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,cAAA,GAAAJ,sBAAA,CAAAN,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY,gBAAA,GAAAN,sBAAA,CAAAN,OAAA;AACA,IAAAa,oBAAA,GAAAP,sBAAA,CAAAN,OAAA;AACA,IAAAc,qCAAA,GAAAR,sBAAA,CAAAN,OAAA;AAtBA;AACA;AACA;;AASA;AACA;AACA;;AAWA,SAASe,kBAAkBA,CAAEC,QAAQ,EAAEC,MAAM,EAAG;EAC/C,MAAM;IAAEC,cAAc;IAAEC,QAAQ;IAAEC;EAAO,CAAC,GAAG,IAAAC,8BAAqB,EACjEL,QAAQ,EACRC,MACD,CAAC;EACD,MAAMK,YAAY,GAAG,IAAAC,eAAS,EAC3BC,MAAM,IAAMA,MAAM,CAAEC,eAAU,CAAC,CAACC,eAAe,CAAC,CAAC,EACnD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