@wordpress/edit-site 5.11.0 → 5.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/build/components/add-new-page/index.js +105 -0
- package/build/components/add-new-page/index.js.map +1 -0
- package/build/components/add-new-pattern/index.js +99 -0
- package/build/components/add-new-pattern/index.js.map +1 -0
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +4 -5
- 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 +27 -44
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +6 -15
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/new-template.js +26 -35
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/add-new-template/utils.js +71 -120
- package/build/components/add-new-template/utils.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 +6 -6
- package/build/components/block-editor/back-button.js.map +1 -1
- package/build/components/block-editor/block-inspector-button.js +3 -4
- package/build/components/block-editor/block-inspector-button.js.map +1 -1
- package/build/components/block-editor/constants.js +9 -0
- package/build/components/block-editor/constants.js.map +1 -0
- package/build/components/block-editor/editor-canvas.js +14 -15
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/get-block-editor-provider.js +42 -0
- package/build/components/block-editor/get-block-editor-provider.js.map +1 -0
- package/build/components/block-editor/index.js +6 -129
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/block-editor/inserter-media-categories.js +25 -42
- package/build/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build/components/block-editor/providers/default-block-editor-provider.js +58 -0
- package/build/components/block-editor/providers/default-block-editor-provider.js.map +1 -0
- package/build/components/block-editor/providers/navigation-block-editor-provider.js +117 -0
- package/build/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -0
- package/build/components/block-editor/resizable-editor.js +6 -7
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/block-editor/resize-handle.js +5 -7
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/block-editor/site-editor-canvas.js +137 -0
- package/build/components/block-editor/site-editor-canvas.js.map +1 -0
- package/build/components/block-editor/use-site-editor-settings.js +82 -0
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -0
- package/build/components/canvas-spinner/index.js +18 -1
- package/build/components/canvas-spinner/index.js.map +1 -1
- package/build/components/code-editor/code-editor-text-area.js +5 -6
- package/build/components/code-editor/code-editor-text-area.js.map +1 -1
- package/build/components/create-pattern-modal/index.js +125 -0
- package/build/components/create-pattern-modal/index.js.map +1 -0
- package/build/components/create-template-part-modal/index.js +73 -33
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/editor/index.js +43 -24
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +29 -12
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/error-boundary/warning.js +8 -10
- package/build/components/error-boundary/warning.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +7 -10
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/color-indicator-wrapper.js +7 -9
- package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +5 -6
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +3 -5
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js +20 -26
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +5 -6
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/header.js +4 -5
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/hooks.js +3 -3
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/icon-with-current-color.js +7 -9
- package/build/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build/components/global-styles/navigation-button.js +15 -17
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +12 -16
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview.js +43 -53
- package/build/components/global-styles/preview.js.map +1 -1
- package/build/components/global-styles/root-menu.js +2 -2
- package/build/components/global-styles/root-menu.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +6 -9
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +11 -12
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +3 -4
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +2 -2
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js +2 -2
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +2 -2
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +12 -12
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +14 -19
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +7 -13
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build/components/global-styles/screen-root.js +5 -5
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js +3 -4
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +8 -9
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +15 -8
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/subtitle.js +4 -5
- package/build/components/global-styles/subtitle.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +6 -7
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-preview.js +7 -8
- package/build/components/global-styles/typography-preview.js.map +1 -1
- package/build/components/global-styles/ui.js +123 -50
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/variations-panel.js +5 -6
- package/build/components/global-styles/variations-panel.js.map +1 -1
- package/build/components/global-styles-renderer/index.js +2 -2
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/header-edit-mode/document-actions/index.js +136 -24
- package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build/components/header-edit-mode/index.js +8 -14
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +49 -53
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +4 -7
- 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 +5 -14
- 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 +2 -6
- package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
- package/build/components/header-edit-mode/undo-redo/undo.js +2 -6
- package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +42 -51
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/keyboard-shortcuts/edit-mode.js +7 -2
- package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +7 -2
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +1 -1
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/hooks.js +21 -0
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +44 -34
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/added-by.js +13 -23
- package/build/components/list/added-by.js.map +1 -1
- package/build/components/list/header.js +4 -7
- package/build/components/list/header.js.map +1 -1
- package/build/components/list/index.js +4 -6
- package/build/components/list/index.js.map +1 -1
- package/build/components/list/table.js +35 -40
- package/build/components/list/table.js.map +1 -1
- package/build/components/page/header.js +41 -0
- package/build/components/page/header.js.map +1 -0
- package/build/components/page/index.js +49 -0
- package/build/components/page/index.js.map +1 -0
- package/build/components/page-actions/delete-page-menu-item.js +70 -0
- package/build/components/page-actions/delete-page-menu-item.js.map +1 -0
- package/build/components/page-actions/index.js +43 -0
- package/build/components/page-actions/index.js.map +1 -0
- package/build/components/page-content-focus-manager/back-to-page-notification.js +67 -0
- package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -0
- package/build/components/page-content-focus-manager/constants.js +9 -0
- package/build/components/page-content-focus-manager/constants.js.map +1 -0
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +60 -0
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -0
- package/build/components/page-content-focus-manager/edit-template-notification.js +121 -0
- package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -0
- package/build/components/page-content-focus-manager/index.js +37 -0
- package/build/components/page-content-focus-manager/index.js.map +1 -0
- package/build/components/page-library/grid-item.js +165 -0
- package/build/components/page-library/grid-item.js.map +1 -0
- package/build/components/page-library/grid.js +49 -0
- package/build/components/page-library/grid.js.map +1 -0
- package/build/components/page-library/index.js +61 -0
- package/build/components/page-library/index.js.map +1 -0
- package/build/components/page-library/no-patterns.js +20 -0
- package/build/components/page-library/no-patterns.js.map +1 -0
- package/build/components/page-library/patterns-list.js +108 -0
- package/build/components/page-library/patterns-list.js.map +1 -0
- package/build/components/page-library/search-items.js +172 -0
- package/build/components/page-library/search-items.js.map +1 -0
- package/build/components/page-library/use-library-settings.js +53 -0
- package/build/components/page-library/use-library-settings.js.map +1 -0
- package/build/components/page-library/use-patterns.js +194 -0
- package/build/components/page-library/use-patterns.js.map +1 -0
- package/build/components/page-library/utils.js +30 -0
- package/build/components/page-library/utils.js.map +1 -0
- package/build/components/page-main/index.js +46 -0
- package/build/components/page-main/index.js.map +1 -0
- package/build/components/page-templates/index.js +101 -0
- package/build/components/page-templates/index.js.map +1 -0
- package/build/components/preferences-modal/enable-feature.js +4 -7
- package/build/components/preferences-modal/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/index.js +4 -5
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/resizable-frame/index.js +25 -15
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/revisions/index.js +14 -17
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/routes/link.js +15 -22
- package/build/components/routes/link.js.map +1 -1
- package/build/components/routes/use-title.js +3 -7
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js +23 -13
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +97 -5
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-panel/index.js +63 -19
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +4 -8
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +51 -9
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +14 -8
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js +2 -4
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/default-sidebar.js +11 -12
- package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +22 -8
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +13 -10
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js +84 -0
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -0
- package/build/components/sidebar-edit-mode/page-panels/index.js +99 -0
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -0
- package/build/components/sidebar-edit-mode/page-panels/page-content.js +35 -0
- package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -0
- package/build/components/sidebar-edit-mode/page-panels/page-status.js +192 -0
- package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -0
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js +45 -0
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -0
- package/build/components/sidebar-edit-mode/page-panels/publish-date.js +98 -0
- package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -0
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +8 -12
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/settings-header/index.js +52 -21
- package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/sidebar-card/index.js +46 -0
- package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -0
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +5 -6
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
- package/build/components/sidebar-edit-mode/{template-card → template-panel}/index.js +30 -22
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -0
- package/build/components/sidebar-edit-mode/{template-revisions/index.js → template-panel/last-revision.js} +7 -8
- package/{build-module/components/sidebar-edit-mode/template-revisions/index.js.map → build/components/sidebar-edit-mode/template-panel/last-revision.js.map} +1 -1
- package/build/components/sidebar-edit-mode/{template-card → template-panel}/template-actions.js +12 -16
- package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -0
- package/build/components/sidebar-edit-mode/{template-card → template-panel}/template-areas.js +15 -19
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -0
- package/build/components/sidebar-navigation-item/index.js +17 -14
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +38 -20
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +36 -0
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-panel/index.js +58 -0
- package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +22 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +35 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +22 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -0
- package/build/components/sidebar-navigation-screen-global-styles/index.js +114 -24
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-library/category-item.js +48 -0
- package/build/components/sidebar-navigation-screen-library/category-item.js.map +1 -0
- package/build/components/sidebar-navigation-screen-library/index.js +112 -0
- package/build/components/sidebar-navigation-screen-library/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +36 -0
- package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +1 -0
- package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js +76 -0
- package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +1 -0
- package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js +41 -0
- package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +1 -0
- package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js +40 -0
- package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +1 -0
- package/build/components/sidebar-navigation-screen-main/index.js +12 -13
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +5 -7
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +42 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +41 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +49 -97
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +84 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +71 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +54 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +49 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +163 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +59 -26
- 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 +75 -31
- 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 +23 -53
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +63 -12
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/page-details.js +150 -0
- package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -0
- package/build/components/sidebar-navigation-screen-page/status-label.js +111 -0
- package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pages/index.js +133 -21
- package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +66 -0
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +41 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +33 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +40 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +47 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +82 -0
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +80 -0
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -0
- package/build/components/sidebar-navigation-screen-template/home-template-details.js +212 -0
- package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -0
- package/build/components/sidebar-navigation-screen-template/index.js +43 -23
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates/index.js +23 -28
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/site-hub/index.js +29 -24
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js +4 -5
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/start-template-options/index.js +15 -21
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/style-book/index.js +45 -50
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -6
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +4 -4
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js +21 -12
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build/components/table/index.js +29 -0
- package/build/components/table/index.js.map +1 -0
- package/build/components/{list/actions → template-actions}/index.js +34 -31
- package/build/components/template-actions/index.js.map +1 -0
- package/build/components/{list/actions → template-actions}/rename-menu-item.js +4 -5
- package/build/components/template-actions/rename-menu-item.js.map +1 -0
- package/build/components/template-part-converter/convert-to-regular.js +4 -5
- package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js +7 -27
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/components/template-part-converter/index.js +12 -18
- package/build/components/template-part-converter/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js +1 -1
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/image.js +4 -5
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/styles.js +4 -3
- package/build/components/welcome-guide/styles.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +190 -0
- package/build/hooks/commands/use-common-commands.js.map +1 -0
- package/build/hooks/commands/use-edit-mode-commands.js +71 -29
- package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/navigation-menu-edit.js +95 -0
- package/build/hooks/navigation-menu-edit.js.map +1 -0
- package/build/hooks/push-changes-to-global-styles/index.js +15 -10
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/template-part-edit.js +11 -15
- package/build/hooks/template-part-edit.js.map +1 -1
- package/build/index.js +3 -6
- package/build/index.js.map +1 -1
- package/build/{private-apis.js → lock-unlock.js} +1 -1
- package/build/lock-unlock.js.map +1 -0
- package/build/store/actions.js +165 -125
- package/build/store/actions.js.map +1 -1
- package/build/store/index.js +3 -3
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +7 -10
- package/build/store/private-actions.js.map +1 -1
- package/build/store/reducer.js +33 -33
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +70 -22
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +1 -3
- package/build/store/utils.js.map +1 -1
- package/build/utils/get-is-list-page.js +13 -7
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build/utils/is-previewing-theme.js +2 -4
- package/build/utils/is-previewing-theme.js.map +1 -1
- package/build/utils/is-template-revertable.js +1 -1
- package/build/utils/is-template-revertable.js.map +1 -1
- package/build/utils/use-activate-theme.js +3 -3
- package/build/utils/use-activate-theme.js.map +1 -1
- package/build/utils/use-debounced-input.js +26 -0
- package/build/utils/use-debounced-input.js.map +1 -0
- package/build-module/components/add-new-page/index.js +93 -0
- package/build-module/components/add-new-page/index.js.map +1 -0
- package/build-module/components/add-new-pattern/index.js +82 -0
- package/build-module/components/add-new-pattern/index.js.map +1 -0
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +4 -5
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js +25 -41
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/index.js +6 -13
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +22 -31
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +71 -120
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +1 -1
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/back-button.js +5 -5
- package/build-module/components/block-editor/back-button.js.map +1 -1
- package/build-module/components/block-editor/block-inspector-button.js +3 -4
- package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/block-editor/constants.js +2 -0
- package/build-module/components/block-editor/constants.js.map +1 -0
- package/build-module/components/block-editor/editor-canvas.js +12 -12
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/get-block-editor-provider.js +31 -0
- package/build-module/components/block-editor/get-block-editor-provider.js.map +1 -0
- package/build-module/components/block-editor/index.js +9 -125
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js +25 -42
- package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build-module/components/block-editor/providers/default-block-editor-provider.js +42 -0
- package/build-module/components/block-editor/providers/default-block-editor-provider.js.map +1 -0
- package/build-module/components/block-editor/providers/navigation-block-editor-provider.js +102 -0
- package/build-module/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -0
- package/build-module/components/block-editor/resizable-editor.js +6 -7
- package/build-module/components/block-editor/resizable-editor.js.map +1 -1
- package/build-module/components/block-editor/resize-handle.js +5 -7
- package/build-module/components/block-editor/resize-handle.js.map +1 -1
- package/build-module/components/block-editor/site-editor-canvas.js +115 -0
- package/build-module/components/block-editor/site-editor-canvas.js.map +1 -0
- package/build-module/components/block-editor/use-site-editor-settings.js +67 -0
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -0
- package/build-module/components/canvas-spinner/index.js +15 -1
- package/build-module/components/canvas-spinner/index.js.map +1 -1
- package/build-module/components/code-editor/code-editor-text-area.js +5 -6
- package/build-module/components/code-editor/code-editor-text-area.js.map +1 -1
- package/build-module/components/create-pattern-modal/index.js +113 -0
- package/build-module/components/create-pattern-modal/index.js.map +1 -0
- package/build-module/components/create-template-part-modal/index.js +70 -34
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/editor/index.js +43 -24
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +26 -10
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/error-boundary/warning.js +8 -10
- package/build-module/components/error-boundary/warning.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +7 -10
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js +7 -8
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +4 -5
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +2 -4
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js +18 -25
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +4 -5
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/header.js +4 -5
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +1 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/icon-with-current-color.js +7 -8
- package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js +15 -14
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +11 -15
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview.js +42 -52
- package/build-module/components/global-styles/preview.js.map +1 -1
- package/build-module/components/global-styles/root-menu.js +1 -1
- package/build-module/components/global-styles/root-menu.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +5 -8
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +10 -11
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +3 -4
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +1 -1
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +1 -1
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +1 -1
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +9 -9
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +14 -19
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +6 -11
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +4 -4
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-typography-element.js +3 -4
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +6 -7
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +15 -8
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/subtitle.js +4 -5
- package/build-module/components/global-styles/subtitle.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +5 -6
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-preview.js +6 -7
- package/build-module/components/global-styles/typography-preview.js.map +1 -1
- package/build-module/components/global-styles/ui.js +123 -50
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/variations-panel.js +5 -6
- package/build-module/components/global-styles/variations-panel.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js +1 -1
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/header-edit-mode/document-actions/index.js +136 -25
- package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +6 -12
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +49 -53
- package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +4 -4
- 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 +5 -13
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/header-edit-mode/undo-redo/redo.js +2 -3
- package/build-module/components/header-edit-mode/undo-redo/redo.js.map +1 -1
- package/build-module/components/header-edit-mode/undo-redo/undo.js +2 -3
- package/build-module/components/header-edit-mode/undo-redo/undo.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +40 -49
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/edit-mode.js +7 -2
- package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +7 -2
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +1 -1
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/hooks.js +21 -0
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +37 -28
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/list/added-by.js +13 -23
- package/build-module/components/list/added-by.js.map +1 -1
- package/build-module/components/list/header.js +4 -7
- package/build-module/components/list/header.js.map +1 -1
- package/build-module/components/list/index.js +3 -5
- package/build-module/components/list/index.js.map +1 -1
- package/build-module/components/list/table.js +34 -39
- package/build-module/components/list/table.js.map +1 -1
- package/build-module/components/page/header.js +33 -0
- package/build-module/components/page/header.js.map +1 -0
- package/build-module/components/page/index.js +37 -0
- package/build-module/components/page/index.js.map +1 -0
- package/build-module/components/page-actions/delete-page-menu-item.js +58 -0
- package/build-module/components/page-actions/delete-page-menu-item.js.map +1 -0
- package/build-module/components/page-actions/index.js +30 -0
- package/build-module/components/page-actions/index.js.map +1 -0
- package/build-module/components/page-content-focus-manager/back-to-page-notification.js +53 -0
- package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -0
- package/build-module/components/page-content-focus-manager/constants.js +2 -0
- package/build-module/components/page-content-focus-manager/constants.js.map +1 -0
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +45 -0
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -0
- package/build-module/components/page-content-focus-manager/edit-template-notification.js +110 -0
- package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +1 -0
- package/build-module/components/page-content-focus-manager/index.js +23 -0
- package/build-module/components/page-content-focus-manager/index.js.map +1 -0
- package/build-module/components/page-library/grid-item.js +145 -0
- package/build-module/components/page-library/grid-item.js.map +1 -0
- package/build-module/components/page-library/grid.js +38 -0
- package/build-module/components/page-library/grid.js.map +1 -0
- package/build-module/components/page-library/index.js +43 -0
- package/build-module/components/page-library/index.js.map +1 -0
- package/build-module/components/page-library/no-patterns.js +12 -0
- package/build-module/components/page-library/no-patterns.js.map +1 -0
- package/build-module/components/page-library/patterns-list.js +87 -0
- package/build-module/components/page-library/patterns-list.js.map +1 -0
- package/build-module/components/page-library/search-items.js +156 -0
- package/build-module/components/page-library/search-items.js.map +1 -0
- package/build-module/components/page-library/use-library-settings.js +40 -0
- package/build-module/components/page-library/use-library-settings.js.map +1 -0
- package/build-module/components/page-library/use-patterns.js +176 -0
- package/build-module/components/page-library/use-patterns.js.map +1 -0
- package/build-module/components/page-library/utils.js +13 -0
- package/build-module/components/page-library/utils.js.map +1 -0
- package/build-module/components/page-main/index.js +32 -0
- package/build-module/components/page-main/index.js.map +1 -0
- package/build-module/components/page-templates/index.js +80 -0
- package/build-module/components/page-templates/index.js.map +1 -0
- package/build-module/components/preferences-modal/enable-feature.js +4 -4
- package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +4 -5
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +24 -14
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/revisions/index.js +12 -14
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/routes/link.js +14 -18
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/routes/use-title.js +2 -6
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js +23 -13
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +95 -8
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +62 -20
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +4 -5
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +48 -8
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js +11 -7
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js +2 -3
- package/build-module/components/sidebar-button/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/default-sidebar.js +11 -12
- package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +19 -6
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +14 -11
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +71 -0
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +78 -0
- package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +23 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +176 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +33 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +85 -0
- package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +8 -9
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/settings-header/index.js +50 -23
- package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +35 -0
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +4 -5
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js +72 -0
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/{template-revisions/index.js → template-panel/last-revision.js} +7 -8
- package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/{template-card → template-panel}/template-actions.js +12 -16
- package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/{template-card → template-panel}/template-areas.js +15 -19
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -0
- package/build-module/components/sidebar-navigation-item/index.js +17 -14
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +39 -21
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +27 -0
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js +30 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +14 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +24 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +14 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +112 -21
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-library/category-item.js +37 -0
- package/build-module/components/sidebar-navigation-screen-library/category-item.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-library/index.js +87 -0
- package/build-module/components/sidebar-navigation-screen-library/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +25 -0
- package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js +61 -0
- package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js +34 -0
- package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js +27 -0
- package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-main/index.js +13 -13
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +4 -6
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +33 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +26 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +47 -95
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +70 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +58 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +46 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +35 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +151 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +58 -26
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +73 -28
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +24 -53
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +59 -14
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/page-details.js +131 -0
- package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-page/status-label.js +98 -0
- package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pages/index.js +130 -22
- package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +46 -0
- package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +28 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +22 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +27 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +34 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +71 -0
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +64 -0
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +192 -0
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-template/index.js +40 -23
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates/index.js +23 -27
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +28 -22
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js +4 -5
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +15 -21
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/style-book/index.js +44 -48
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +15 -5
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +20 -11
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build-module/components/table/index.js +21 -0
- package/build-module/components/table/index.js.map +1 -0
- package/build-module/components/{list/actions → template-actions}/index.js +34 -31
- package/build-module/components/template-actions/index.js.map +1 -0
- package/build-module/components/{list/actions → template-actions}/rename-menu-item.js +4 -5
- package/build-module/components/template-actions/rename-menu-item.js.map +1 -0
- package/build-module/components/template-part-converter/convert-to-regular.js +4 -5
- package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js +8 -26
- package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build-module/components/template-part-converter/index.js +12 -18
- package/build-module/components/template-part-converter/index.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js +1 -1
- package/build-module/components/welcome-guide/editor.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +4 -5
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/styles.js +5 -3
- package/build-module/components/welcome-guide/styles.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +172 -0
- package/build-module/hooks/commands/use-common-commands.js.map +1 -0
- package/build-module/hooks/commands/use-edit-mode-commands.js +72 -30
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/navigation-menu-edit.js +77 -0
- package/build-module/hooks/navigation-menu-edit.js.map +1 -0
- package/build-module/hooks/push-changes-to-global-styles/index.js +14 -9
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/template-part-edit.js +10 -11
- package/build-module/hooks/template-part-edit.js.map +1 -1
- package/build-module/index.js +3 -6
- package/build-module/index.js.map +1 -1
- package/build-module/{private-apis.js → lock-unlock.js} +1 -1
- package/build-module/lock-unlock.js.map +1 -0
- package/build-module/store/actions.js +157 -126
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/index.js +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +7 -10
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/reducer.js +31 -33
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +62 -21
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +1 -3
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/get-is-list-page.js +13 -7
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-module/utils/is-previewing-theme.js +2 -4
- package/build-module/utils/is-previewing-theme.js.map +1 -1
- package/build-module/utils/is-template-revertable.js +1 -1
- package/build-module/utils/is-template-revertable.js.map +1 -1
- package/build-module/utils/use-activate-theme.js +2 -2
- package/build-module/utils/use-activate-theme.js.map +1 -1
- package/build-module/utils/use-debounced-input.js +17 -0
- package/build-module/utils/use-debounced-input.js.map +1 -0
- package/build-style/style-rtl.css +587 -71
- package/build-style/style.css +587 -71
- package/package.json +44 -37
- package/src/components/add-new-page/index.js +105 -0
- package/src/components/add-new-pattern/index.js +94 -0
- package/src/components/add-new-template/add-custom-template-modal-content.js +1 -13
- package/src/components/add-new-template/index.js +0 -3
- package/src/components/add-new-template/new-template.js +3 -3
- package/src/components/app/index.js +1 -1
- package/src/components/block-editor/back-button.js +5 -2
- package/src/components/block-editor/constants.js +1 -0
- package/src/components/block-editor/editor-canvas.js +1 -1
- package/src/components/block-editor/get-block-editor-provider.js +29 -0
- package/src/components/block-editor/index.js +15 -188
- package/src/components/block-editor/providers/default-block-editor-provider.js +44 -0
- package/src/components/block-editor/providers/navigation-block-editor-provider.js +114 -0
- package/src/components/block-editor/site-editor-canvas.js +155 -0
- package/src/components/block-editor/style.scss +6 -0
- package/src/components/block-editor/use-site-editor-settings.js +91 -0
- package/src/components/canvas-spinner/index.js +11 -1
- package/src/components/create-pattern-modal/index.js +134 -0
- package/src/components/create-pattern-modal/style.scss +3 -0
- package/src/components/create-template-part-modal/index.js +63 -3
- package/src/components/editor/index.js +32 -17
- package/src/components/editor/style.scss +6 -11
- package/src/components/editor-canvas-container/index.js +21 -4
- package/src/components/global-styles/color-palette-panel.js +1 -1
- package/src/components/global-styles/dimensions-panel.js +1 -1
- package/src/components/global-styles/global-styles-provider.js +10 -14
- package/src/components/global-styles/gradients-palette-panel.js +1 -1
- package/src/components/global-styles/hooks.js +1 -1
- package/src/components/global-styles/palette.js +2 -2
- package/src/components/global-styles/preview.js +1 -1
- package/src/components/global-styles/root-menu.js +1 -1
- package/src/components/global-styles/screen-block-list.js +1 -1
- package/src/components/global-styles/screen-block.js +1 -1
- package/src/components/global-styles/screen-colors.js +1 -1
- package/src/components/global-styles/screen-css.js +1 -1
- package/src/components/global-styles/screen-layout.js +1 -1
- package/src/components/global-styles/screen-revisions/index.js +1 -1
- package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +8 -6
- package/src/components/global-styles/screen-root.js +1 -1
- package/src/components/global-styles/screen-typography.js +1 -1
- package/src/components/global-styles/stories/index.js +1 -1
- package/src/components/global-styles/style-variations-container.js +13 -3
- package/src/components/global-styles/style.scss +11 -0
- package/src/components/global-styles/typography-panel.js +1 -1
- package/src/components/global-styles/typography-preview.js +1 -1
- package/src/components/global-styles/ui.js +132 -45
- package/src/components/global-styles-renderer/index.js +1 -1
- package/src/components/header-edit-mode/document-actions/index.js +155 -36
- package/src/components/header-edit-mode/document-actions/style.scss +72 -13
- package/src/components/header-edit-mode/index.js +4 -4
- package/src/components/header-edit-mode/tools-more-menu-group/index.js +1 -6
- package/src/components/keyboard-shortcuts/edit-mode.js +5 -1
- package/src/components/keyboard-shortcuts/index.js +5 -1
- package/src/components/keyboard-shortcuts/register.js +1 -1
- package/src/components/layout/hooks.js +21 -0
- package/src/components/layout/index.js +92 -70
- package/src/components/layout/style.scss +7 -0
- package/src/components/list/index.js +1 -1
- package/src/components/list/table.js +6 -2
- package/src/components/page/header.js +38 -0
- package/src/components/page/index.js +38 -0
- package/src/components/page/style.scss +38 -0
- package/src/components/page-actions/delete-page-menu-item.js +71 -0
- package/src/components/page-actions/index.js +36 -0
- package/src/components/page-content-focus-manager/back-to-page-notification.js +65 -0
- package/src/components/page-content-focus-manager/constants.js +5 -0
- package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +52 -0
- package/src/components/page-content-focus-manager/edit-template-notification.js +108 -0
- package/src/components/page-content-focus-manager/index.js +26 -0
- package/src/components/page-library/grid-item.js +179 -0
- package/src/components/page-library/grid.js +39 -0
- package/src/components/page-library/index.js +39 -0
- package/src/components/page-library/no-patterns.js +12 -0
- package/src/components/page-library/patterns-list.js +114 -0
- package/src/components/page-library/search-items.js +171 -0
- package/src/components/page-library/style.scss +105 -0
- package/src/components/page-library/use-library-settings.js +51 -0
- package/src/components/page-library/use-patterns.js +238 -0
- package/src/components/page-library/utils.js +21 -0
- package/src/components/page-main/index.js +27 -0
- package/src/components/page-templates/index.js +104 -0
- package/src/components/resizable-frame/index.js +18 -6
- package/src/components/resizable-frame/style.scss +20 -18
- package/src/components/revisions/index.js +7 -8
- package/src/components/routes/link.js +2 -2
- package/src/components/routes/use-title.js +1 -1
- package/src/components/save-button/index.js +16 -7
- package/src/components/save-hub/index.js +143 -38
- package/src/components/save-hub/style.scss +6 -0
- package/src/components/save-panel/index.js +63 -16
- package/src/components/secondary-sidebar/list-view-sidebar.js +56 -2
- package/src/components/sidebar/index.js +13 -7
- package/src/components/sidebar/style.scss +3 -4
- package/src/components/sidebar-edit-mode/global-styles-sidebar.js +42 -29
- package/src/components/sidebar-edit-mode/index.js +16 -14
- package/src/components/sidebar-edit-mode/page-panels/edit-template.js +69 -0
- package/src/components/sidebar-edit-mode/page-panels/index.js +89 -0
- package/src/components/sidebar-edit-mode/page-panels/page-content.js +27 -0
- package/src/components/sidebar-edit-mode/page-panels/page-status.js +233 -0
- package/src/components/sidebar-edit-mode/page-panels/page-summary.js +35 -0
- package/src/components/sidebar-edit-mode/page-panels/publish-date.js +94 -0
- package/src/components/sidebar-edit-mode/page-panels/style.scss +41 -0
- package/src/components/sidebar-edit-mode/settings-header/index.js +61 -29
- package/src/components/sidebar-edit-mode/sidebar-card/index.js +34 -0
- package/src/components/sidebar-edit-mode/sidebar-card/style.scss +34 -0
- package/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
- package/src/components/sidebar-edit-mode/template-panel/index.js +65 -0
- package/src/components/sidebar-edit-mode/{template-card → template-panel}/style.scss +2 -32
- package/src/components/sidebar-navigation-item/index.js +6 -2
- package/src/components/sidebar-navigation-item/style.scss +7 -0
- package/src/components/sidebar-navigation-screen/index.js +89 -53
- package/src/components/sidebar-navigation-screen/style.scss +66 -5
- package/src/components/sidebar-navigation-screen-details-footer/index.js +45 -0
- package/src/components/sidebar-navigation-screen-details-footer/style.scss +5 -0
- package/src/components/sidebar-navigation-screen-details-panel/index.js +40 -0
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +14 -0
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +29 -0
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +14 -0
- package/src/components/sidebar-navigation-screen-details-panel/style.scss +25 -0
- package/src/components/sidebar-navigation-screen-global-styles/index.js +126 -14
- package/src/components/sidebar-navigation-screen-global-styles/style.scss +12 -0
- package/src/components/sidebar-navigation-screen-library/category-item.js +43 -0
- package/src/components/sidebar-navigation-screen-library/index.js +136 -0
- package/src/components/sidebar-navigation-screen-library/style.scss +7 -0
- package/src/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +32 -0
- package/src/components/sidebar-navigation-screen-library/use-pattern-categories.js +64 -0
- package/src/components/sidebar-navigation-screen-library/use-template-part-areas.js +33 -0
- package/src/components/sidebar-navigation-screen-library/use-theme-patterns.js +44 -0
- package/src/components/sidebar-navigation-screen-main/index.js +11 -14
- package/src/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +45 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js +24 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/index.js +50 -96
- package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +89 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +51 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +51 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +39 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +15 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +175 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +43 -7
- package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +61 -2
- package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +25 -47
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +5 -1
- package/src/components/sidebar-navigation-screen-page/index.js +98 -24
- package/src/components/sidebar-navigation-screen-page/page-details.js +166 -0
- package/src/components/sidebar-navigation-screen-page/status-label.js +105 -0
- package/src/components/sidebar-navigation-screen-page/style.scss +63 -0
- package/src/components/sidebar-navigation-screen-pages/index.js +181 -44
- package/src/components/sidebar-navigation-screen-pattern/index.js +44 -0
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +28 -0
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +21 -0
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +30 -0
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +33 -0
- package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +71 -0
- package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +86 -0
- package/src/components/sidebar-navigation-screen-template/home-template-details.js +230 -0
- package/src/components/sidebar-navigation-screen-template/index.js +44 -27
- package/src/components/sidebar-navigation-screen-template/style.scss +23 -0
- package/src/components/sidebar-navigation-screen-templates/index.js +19 -26
- package/src/components/site-hub/index.js +26 -7
- package/src/components/site-hub/style.scss +26 -0
- package/src/components/style-book/index.js +1 -1
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -3
- package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +11 -1
- package/src/components/table/index.js +33 -0
- package/src/components/table/style.scss +37 -0
- package/src/components/{list/actions → template-actions}/index.js +19 -6
- package/src/components/template-part-converter/convert-to-template-part.js +4 -27
- package/src/components/welcome-guide/editor.js +1 -1
- package/src/components/welcome-guide/styles.js +5 -3
- package/src/hooks/commands/use-common-commands.js +167 -0
- package/src/hooks/commands/use-edit-mode-commands.js +61 -25
- package/src/hooks/index.js +1 -0
- package/src/hooks/navigation-menu-edit.js +95 -0
- package/src/hooks/push-changes-to-global-styles/index.js +14 -8
- package/src/hooks/template-part-edit.js +1 -1
- package/src/store/actions.js +52 -1
- package/src/store/index.js +1 -1
- package/src/store/reducer.js +21 -0
- package/src/store/selectors.js +54 -5
- package/src/store/test/actions.js +31 -0
- package/src/store/test/reducer.js +44 -0
- package/src/store/test/selectors.js +57 -0
- package/src/style.scss +17 -4
- package/src/utils/get-is-list-page.js +16 -4
- package/src/utils/is-previewing-theme.js +2 -3
- package/src/utils/use-activate-theme.js +3 -2
- package/src/utils/use-debounced-input.js +17 -0
- package/build/components/add-new-template/new-template-part.js +0 -116
- package/build/components/add-new-template/new-template-part.js.map +0 -1
- package/build/components/list/actions/index.js.map +0 -1
- package/build/components/list/actions/rename-menu-item.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-card/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-card/template-actions.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-card/template-areas.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-revisions/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -53
- package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +0 -1
- package/build/components/sidebar-navigation-subtitle/index.js +0 -18
- package/build/components/sidebar-navigation-subtitle/index.js.map +0 -1
- package/build/private-apis.js.map +0 -1
- package/build-module/components/add-new-template/new-template-part.js +0 -96
- package/build-module/components/add-new-template/new-template-part.js.map +0 -1
- package/build-module/components/list/actions/index.js.map +0 -1
- package/build-module/components/list/actions/rename-menu-item.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-card/index.js +0 -68
- package/build-module/components/sidebar-edit-mode/template-card/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-card/template-actions.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-card/template-areas.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -40
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +0 -1
- package/build-module/components/sidebar-navigation-subtitle/index.js +0 -10
- package/build-module/components/sidebar-navigation-subtitle/index.js.map +0 -1
- package/build-module/private-apis.js.map +0 -1
- package/src/components/add-new-template/new-template-part.js +0 -109
- package/src/components/sidebar-edit-mode/template-card/index.js +0 -59
- package/src/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -47
- package/src/components/sidebar-navigation-screen-pages/style.scss +0 -4
- package/src/components/sidebar-navigation-screen-templates/style.scss +0 -4
- package/src/components/sidebar-navigation-subtitle/index.js +0 -5
- package/src/components/sidebar-navigation-subtitle/style.scss +0 -7
- /package/src/components/sidebar-edit-mode/{template-revisions/index.js → template-panel/last-revision.js} +0 -0
- /package/src/components/sidebar-edit-mode/{template-card → template-panel}/template-actions.js +0 -0
- /package/src/components/sidebar-edit-mode/{template-card → template-panel}/template-areas.js +0 -0
- /package/src/components/{list/actions → template-actions}/rename-menu-item.js +0 -0
- /package/src/{private-apis.js → lock-unlock.js} +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = PageStatus;
|
|
9
|
+
|
|
10
|
+
var _element = require("@wordpress/element");
|
|
11
|
+
|
|
12
|
+
var _components = require("@wordpress/components");
|
|
13
|
+
|
|
14
|
+
var _i18n = require("@wordpress/i18n");
|
|
15
|
+
|
|
16
|
+
var _data = require("@wordpress/data");
|
|
17
|
+
|
|
18
|
+
var _coreData = require("@wordpress/core-data");
|
|
19
|
+
|
|
20
|
+
var _notices = require("@wordpress/notices");
|
|
21
|
+
|
|
22
|
+
var _blockEditor = require("@wordpress/block-editor");
|
|
23
|
+
|
|
24
|
+
var _statusLabel = _interopRequireDefault(require("../../sidebar-navigation-screen-page/status-label"));
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* WordPress dependencies
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Internal dependencies
|
|
32
|
+
*/
|
|
33
|
+
const STATUS_OPTIONS = [{
|
|
34
|
+
label: (0, _element.createElement)(_element.Fragment, null, (0, _i18n.__)('Draft'), (0, _element.createElement)(_components.__experimentalText, {
|
|
35
|
+
variant: "muted"
|
|
36
|
+
}, (0, _i18n.__)('Not ready to publish.'))),
|
|
37
|
+
value: 'draft'
|
|
38
|
+
}, {
|
|
39
|
+
label: (0, _element.createElement)(_element.Fragment, null, (0, _i18n.__)('Pending'), (0, _element.createElement)(_components.__experimentalText, {
|
|
40
|
+
variant: "muted"
|
|
41
|
+
}, (0, _i18n.__)('Waiting for review before publishing.'))),
|
|
42
|
+
value: 'pending'
|
|
43
|
+
}, {
|
|
44
|
+
label: (0, _element.createElement)(_element.Fragment, null, (0, _i18n.__)('Private'), (0, _element.createElement)(_components.__experimentalText, {
|
|
45
|
+
variant: "muted"
|
|
46
|
+
}, (0, _i18n.__)('Only visible to site admins and editors.'))),
|
|
47
|
+
value: 'private'
|
|
48
|
+
}, {
|
|
49
|
+
label: (0, _element.createElement)(_element.Fragment, null, (0, _i18n.__)('Scheduled'), (0, _element.createElement)(_components.__experimentalText, {
|
|
50
|
+
variant: "muted"
|
|
51
|
+
}, (0, _i18n.__)('Publish automatically on a chosen date.'))),
|
|
52
|
+
value: 'future'
|
|
53
|
+
}, {
|
|
54
|
+
label: (0, _element.createElement)(_element.Fragment, null, (0, _i18n.__)('Published'), (0, _element.createElement)(_components.__experimentalText, {
|
|
55
|
+
variant: "muted"
|
|
56
|
+
}, (0, _i18n.__)('Visible to everyone.'))),
|
|
57
|
+
value: 'publish'
|
|
58
|
+
}];
|
|
59
|
+
|
|
60
|
+
function PageStatus({
|
|
61
|
+
postType,
|
|
62
|
+
postId,
|
|
63
|
+
status,
|
|
64
|
+
password,
|
|
65
|
+
date
|
|
66
|
+
}) {
|
|
67
|
+
const [showPassword, setShowPassword] = (0, _element.useState)(!!password);
|
|
68
|
+
const {
|
|
69
|
+
editEntityRecord
|
|
70
|
+
} = (0, _data.useDispatch)(_coreData.store);
|
|
71
|
+
const {
|
|
72
|
+
createErrorNotice
|
|
73
|
+
} = (0, _data.useDispatch)(_notices.store);
|
|
74
|
+
const [popoverAnchor, setPopoverAnchor] = (0, _element.useState)(null); // Memoize popoverProps to avoid returning a new object every time.
|
|
75
|
+
|
|
76
|
+
const popoverProps = (0, _element.useMemo)(() => ({
|
|
77
|
+
// Anchor the popover to the middle of the entire row so that it doesn't
|
|
78
|
+
// move around when the label changes.
|
|
79
|
+
anchor: popoverAnchor,
|
|
80
|
+
'aria-label': (0, _i18n.__)('Change status'),
|
|
81
|
+
placement: 'bottom-end'
|
|
82
|
+
}), [popoverAnchor]);
|
|
83
|
+
|
|
84
|
+
const saveStatus = async ({
|
|
85
|
+
status: newStatus = status,
|
|
86
|
+
password: newPassword = password,
|
|
87
|
+
date: newDate = date
|
|
88
|
+
}) => {
|
|
89
|
+
try {
|
|
90
|
+
await editEntityRecord('postType', postType, postId, {
|
|
91
|
+
status: newStatus,
|
|
92
|
+
date: newDate,
|
|
93
|
+
password: newPassword
|
|
94
|
+
});
|
|
95
|
+
} catch (error) {
|
|
96
|
+
const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0, _i18n.__)('An error occurred while updating the status');
|
|
97
|
+
createErrorNotice(errorMessage, {
|
|
98
|
+
type: 'snackbar'
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const handleTogglePassword = value => {
|
|
104
|
+
setShowPassword(value);
|
|
105
|
+
|
|
106
|
+
if (!value) {
|
|
107
|
+
saveStatus({
|
|
108
|
+
password: ''
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const handleStatus = value => {
|
|
114
|
+
let newDate = date;
|
|
115
|
+
let newPassword = password;
|
|
116
|
+
|
|
117
|
+
if (value === 'publish') {
|
|
118
|
+
if (new Date(date) > new Date()) {
|
|
119
|
+
newDate = null;
|
|
120
|
+
}
|
|
121
|
+
} else if (value === 'future') {
|
|
122
|
+
if (!date || new Date(date) < new Date()) {
|
|
123
|
+
newDate = new Date();
|
|
124
|
+
newDate.setDate(newDate.getDate() + 7);
|
|
125
|
+
}
|
|
126
|
+
} else if (value === 'private' && password) {
|
|
127
|
+
setShowPassword(false);
|
|
128
|
+
newPassword = '';
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
saveStatus({
|
|
132
|
+
status: value,
|
|
133
|
+
date: newDate,
|
|
134
|
+
password: newPassword
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
return (0, _element.createElement)(_components.__experimentalHStack, {
|
|
139
|
+
className: "edit-site-summary-field"
|
|
140
|
+
}, (0, _element.createElement)(_components.__experimentalText, {
|
|
141
|
+
className: "edit-site-summary-field__label"
|
|
142
|
+
}, (0, _i18n.__)('Status')), (0, _element.createElement)(_components.Dropdown, {
|
|
143
|
+
contentClassName: "edit-site-change-status__content",
|
|
144
|
+
popoverProps: popoverProps,
|
|
145
|
+
focusOnMount: true,
|
|
146
|
+
ref: setPopoverAnchor,
|
|
147
|
+
renderToggle: ({
|
|
148
|
+
onToggle
|
|
149
|
+
}) => (0, _element.createElement)(_components.Button, {
|
|
150
|
+
className: "edit-site-summary-field__trigger",
|
|
151
|
+
variant: "tertiary",
|
|
152
|
+
onClick: onToggle
|
|
153
|
+
}, (0, _element.createElement)(_statusLabel.default, {
|
|
154
|
+
status: password ? 'protected' : status
|
|
155
|
+
})),
|
|
156
|
+
renderContent: ({
|
|
157
|
+
onClose
|
|
158
|
+
}) => (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_blockEditor.__experimentalInspectorPopoverHeader, {
|
|
159
|
+
title: (0, _i18n.__)('Status'),
|
|
160
|
+
onClose: onClose
|
|
161
|
+
}), (0, _element.createElement)("form", null, (0, _element.createElement)(_components.__experimentalVStack, {
|
|
162
|
+
spacing: 5
|
|
163
|
+
}, (0, _element.createElement)(_components.RadioControl, {
|
|
164
|
+
className: "edit-site-change-status__options",
|
|
165
|
+
hideLabelFromVision: true,
|
|
166
|
+
label: (0, _i18n.__)('Status'),
|
|
167
|
+
options: STATUS_OPTIONS,
|
|
168
|
+
onChange: handleStatus,
|
|
169
|
+
selected: status
|
|
170
|
+
}), status !== 'private' && (0, _element.createElement)(_components.BaseControl, {
|
|
171
|
+
id: `edit-site-change-status__password`,
|
|
172
|
+
label: (0, _i18n.__)('Password')
|
|
173
|
+
}, (0, _element.createElement)(_components.ToggleControl, {
|
|
174
|
+
label: (0, _i18n.__)('Hide this page behind a password'),
|
|
175
|
+
checked: showPassword,
|
|
176
|
+
onChange: handleTogglePassword
|
|
177
|
+
}), showPassword && (0, _element.createElement)(_components.TextControl, {
|
|
178
|
+
onChange: value => saveStatus({
|
|
179
|
+
password: value
|
|
180
|
+
}),
|
|
181
|
+
value: password
|
|
182
|
+
/* eslint-disable jsx-a11y/no-autofocus */
|
|
183
|
+
,
|
|
184
|
+
autoFocus: !password
|
|
185
|
+
/* eslint-enable jsx-a11y/no-autofocus */
|
|
186
|
+
,
|
|
187
|
+
placeholder: (0, _i18n.__)('Enter a secure password'),
|
|
188
|
+
type: "password"
|
|
189
|
+
})))))
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=page-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/page-panels/page-status.js"],"names":["STATUS_OPTIONS","label","value","PageStatus","postType","postId","status","password","date","showPassword","setShowPassword","editEntityRecord","coreStore","createErrorNotice","noticesStore","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","saveStatus","newStatus","newPassword","newDate","error","errorMessage","message","code","type","handleTogglePassword","handleStatus","Date","setDate","getDate","onToggle","onClose"],"mappings":";;;;;;;;;AAgBA;;AAbA;;AAWA;;AACA;;AAEA;;AACA;;AACA;;AAIA;;AAvBA;AACA;AACA;;AAkBA;AACA;AACA;AAGA,MAAMA,cAAc,GAAG,CACtB;AACCC,EAAAA,KAAK,EACJ,qDACG,cAAI,OAAJ,CADH,EAEC,4BAAC,8BAAD;AAAM,IAAA,OAAO,EAAC;AAAd,KAAwB,cAAI,uBAAJ,CAAxB,CAFD,CAFF;AAOCC,EAAAA,KAAK,EAAE;AAPR,CADsB,EAUtB;AACCD,EAAAA,KAAK,EACJ,qDACG,cAAI,SAAJ,CADH,EAEC,4BAAC,8BAAD;AAAM,IAAA,OAAO,EAAC;AAAd,KACG,cAAI,uCAAJ,CADH,CAFD,CAFF;AASCC,EAAAA,KAAK,EAAE;AATR,CAVsB,EAqBtB;AACCD,EAAAA,KAAK,EACJ,qDACG,cAAI,SAAJ,CADH,EAEC,4BAAC,8BAAD;AAAM,IAAA,OAAO,EAAC;AAAd,KACG,cAAI,0CAAJ,CADH,CAFD,CAFF;AASCC,EAAAA,KAAK,EAAE;AATR,CArBsB,EAgCtB;AACCD,EAAAA,KAAK,EACJ,qDACG,cAAI,WAAJ,CADH,EAEC,4BAAC,8BAAD;AAAM,IAAA,OAAO,EAAC;AAAd,KACG,cAAI,yCAAJ,CADH,CAFD,CAFF;AASCC,EAAAA,KAAK,EAAE;AATR,CAhCsB,EA2CtB;AACCD,EAAAA,KAAK,EACJ,qDACG,cAAI,WAAJ,CADH,EAEC,4BAAC,8BAAD;AAAM,IAAA,OAAO,EAAC;AAAd,KAAwB,cAAI,sBAAJ,CAAxB,CAFD,CAFF;AAOCC,EAAAA,KAAK,EAAE;AAPR,CA3CsB,CAAvB;;AAsDe,SAASC,UAAT,CAAqB;AACnCC,EAAAA,QADmC;AAEnCC,EAAAA,MAFmC;AAGnCC,EAAAA,MAHmC;AAInCC,EAAAA,QAJmC;AAKnCC,EAAAA;AALmC,CAArB,EAMX;AACH,QAAM,CAAEC,YAAF,EAAgBC,eAAhB,IAAoC,uBAAU,CAAC,CAAEH,QAAb,CAA1C;AAEA,QAAM;AAAEI,IAAAA;AAAF,MAAuB,uBAAaC,eAAb,CAA7B;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAwB,uBAAaC,cAAb,CAA9B;AAEA,QAAM,CAAEC,aAAF,EAAiBC,gBAAjB,IAAsC,uBAAU,IAAV,CAA5C,CANG,CAOH;;AACA,QAAMC,YAAY,GAAG,sBACpB,OAAQ;AACP;AACA;AACAC,IAAAA,MAAM,EAAEH,aAHD;AAIP,kBAAc,cAAI,eAAJ,CAJP;AAKPI,IAAAA,SAAS,EAAE;AALJ,GAAR,CADoB,EAQpB,CAAEJ,aAAF,CARoB,CAArB;;AAWA,QAAMK,UAAU,GAAG,OAAQ;AAC1Bd,IAAAA,MAAM,EAAEe,SAAS,GAAGf,MADM;AAE1BC,IAAAA,QAAQ,EAAEe,WAAW,GAAGf,QAFE;AAG1BC,IAAAA,IAAI,EAAEe,OAAO,GAAGf;AAHU,GAAR,KAIZ;AACN,QAAI;AACH,YAAMG,gBAAgB,CAAE,UAAF,EAAcP,QAAd,EAAwBC,MAAxB,EAAgC;AACrDC,QAAAA,MAAM,EAAEe,SAD6C;AAErDb,QAAAA,IAAI,EAAEe,OAF+C;AAGrDhB,QAAAA,QAAQ,EAAEe;AAH2C,OAAhC,CAAtB;AAKA,KAND,CAME,OAAQE,KAAR,EAAgB;AACjB,YAAMC,YAAY,GACjBD,KAAK,CAACE,OAAN,IAAiBF,KAAK,CAACG,IAAN,KAAe,eAAhC,GACGH,KAAK,CAACE,OADT,GAEG,cAAI,6CAAJ,CAHJ;AAKAb,MAAAA,iBAAiB,CAAEY,YAAF,EAAgB;AAChCG,QAAAA,IAAI,EAAE;AAD0B,OAAhB,CAAjB;AAGA;AACD,GArBD;;AAuBA,QAAMC,oBAAoB,GAAK3B,KAAF,IAAa;AACzCQ,IAAAA,eAAe,CAAER,KAAF,CAAf;;AACA,QAAK,CAAEA,KAAP,EAAe;AACdkB,MAAAA,UAAU,CAAE;AAAEb,QAAAA,QAAQ,EAAE;AAAZ,OAAF,CAAV;AACA;AACD,GALD;;AAOA,QAAMuB,YAAY,GAAK5B,KAAF,IAAa;AACjC,QAAIqB,OAAO,GAAGf,IAAd;AACA,QAAIc,WAAW,GAAGf,QAAlB;;AACA,QAAKL,KAAK,KAAK,SAAf,EAA2B;AAC1B,UAAK,IAAI6B,IAAJ,CAAUvB,IAAV,IAAmB,IAAIuB,IAAJ,EAAxB,EAAqC;AACpCR,QAAAA,OAAO,GAAG,IAAV;AACA;AACD,KAJD,MAIO,IAAKrB,KAAK,KAAK,QAAf,EAA0B;AAChC,UAAK,CAAEM,IAAF,IAAU,IAAIuB,IAAJ,CAAUvB,IAAV,IAAmB,IAAIuB,IAAJ,EAAlC,EAA+C;AAC9CR,QAAAA,OAAO,GAAG,IAAIQ,IAAJ,EAAV;AACAR,QAAAA,OAAO,CAACS,OAAR,CAAiBT,OAAO,CAACU,OAAR,KAAoB,CAArC;AACA;AACD,KALM,MAKA,IAAK/B,KAAK,KAAK,SAAV,IAAuBK,QAA5B,EAAuC;AAC7CG,MAAAA,eAAe,CAAE,KAAF,CAAf;AACAY,MAAAA,WAAW,GAAG,EAAd;AACA;;AACDF,IAAAA,UAAU,CAAE;AACXd,MAAAA,MAAM,EAAEJ,KADG;AAEXM,MAAAA,IAAI,EAAEe,OAFK;AAGXhB,MAAAA,QAAQ,EAAEe;AAHC,KAAF,CAAV;AAKA,GArBD;;AAuBA,SACC,4BAAC,gCAAD;AAAQ,IAAA,SAAS,EAAC;AAAlB,KACC,4BAAC,8BAAD;AAAM,IAAA,SAAS,EAAC;AAAhB,KACG,cAAI,QAAJ,CADH,CADD,EAIC,4BAAC,oBAAD;AACC,IAAA,gBAAgB,EAAC,kCADlB;AAEC,IAAA,YAAY,EAAGL,YAFhB;AAGC,IAAA,YAAY,MAHb;AAIC,IAAA,GAAG,EAAGD,gBAJP;AAKC,IAAA,YAAY,EAAG,CAAE;AAAEkB,MAAAA;AAAF,KAAF,KACd,4BAAC,kBAAD;AACC,MAAA,SAAS,EAAC,kCADX;AAEC,MAAA,OAAO,EAAC,UAFT;AAGC,MAAA,OAAO,EAAGA;AAHX,OAKC,4BAAC,oBAAD;AACC,MAAA,MAAM,EAAG3B,QAAQ,GAAG,WAAH,GAAiBD;AADnC,MALD,CANF;AAgBC,IAAA,aAAa,EAAG,CAAE;AAAE6B,MAAAA;AAAF,KAAF,KACf,qDACC,4BAAC,iDAAD;AACC,MAAA,KAAK,EAAG,cAAI,QAAJ,CADT;AAEC,MAAA,OAAO,EAAGA;AAFX,MADD,EAKC,0CACC,4BAAC,gCAAD;AAAQ,MAAA,OAAO,EAAG;AAAlB,OACC,4BAAC,wBAAD;AACC,MAAA,SAAS,EAAC,kCADX;AAEC,MAAA,mBAAmB,MAFpB;AAGC,MAAA,KAAK,EAAG,cAAI,QAAJ,CAHT;AAIC,MAAA,OAAO,EAAGnC,cAJX;AAKC,MAAA,QAAQ,EAAG8B,YALZ;AAMC,MAAA,QAAQ,EAAGxB;AANZ,MADD,EASGA,MAAM,KAAK,SAAX,IACD,4BAAC,uBAAD;AACC,MAAA,EAAE,EAAI,mCADP;AAEC,MAAA,KAAK,EAAG,cAAI,UAAJ;AAFT,OAIC,4BAAC,yBAAD;AACC,MAAA,KAAK,EAAG,cACP,kCADO,CADT;AAIC,MAAA,OAAO,EAAGG,YAJX;AAKC,MAAA,QAAQ,EAAGoB;AALZ,MAJD,EAWGpB,YAAY,IACb,4BAAC,uBAAD;AACC,MAAA,QAAQ,EAAKP,KAAF,IACVkB,UAAU,CAAE;AACXb,QAAAA,QAAQ,EAAEL;AADC,OAAF,CAFZ;AAMC,MAAA,KAAK,EAAGK;AACR;AAPD;AAQC,MAAA,SAAS,EAAG,CAAEA;AACd;AATD;AAUC,MAAA,WAAW,EAAG,cACb,yBADa,CAVf;AAaC,MAAA,IAAI,EAAC;AAbN,MAZF,CAVF,CADD,CALD;AAjBF,IAJD,CADD;AA2EA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tBaseControl,\n\tToggleControl,\n\tDropdown,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tTextControl,\n\tRadioControl,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n/**\n * Internal dependencies\n */\nimport StatusLabel from '../../sidebar-navigation-screen-page/status-label';\n\nconst STATUS_OPTIONS = [\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Draft' ) }\n\t\t\t\t<Text variant=\"muted\">{ __( 'Not ready to publish.' ) }</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'draft',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Pending' ) }\n\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t{ __( 'Waiting for review before publishing.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'pending',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Private' ) }\n\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t{ __( 'Only visible to site admins and editors.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'private',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Scheduled' ) }\n\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t{ __( 'Publish automatically on a chosen date.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'future',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Published' ) }\n\t\t\t\t<Text variant=\"muted\">{ __( 'Visible to everyone.' ) }</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'publish',\n\t},\n];\n\nexport default function PageStatus( {\n\tpostType,\n\tpostId,\n\tstatus,\n\tpassword,\n\tdate,\n} ) {\n\tconst [ showPassword, setShowPassword ] = useState( !! password );\n\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': __( 'Change status' ),\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst saveStatus = async ( {\n\t\tstatus: newStatus = status,\n\t\tpassword: newPassword = password,\n\t\tdate: newDate = date,\n\t} ) => {\n\t\ttry {\n\t\t\tawait editEntityRecord( 'postType', postType, postId, {\n\t\t\t\tstatus: newStatus,\n\t\t\t\tdate: newDate,\n\t\t\t\tpassword: newPassword,\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while updating the status' );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst handleTogglePassword = ( value ) => {\n\t\tsetShowPassword( value );\n\t\tif ( ! value ) {\n\t\t\tsaveStatus( { password: '' } );\n\t\t}\n\t};\n\n\tconst handleStatus = ( value ) => {\n\t\tlet newDate = date;\n\t\tlet newPassword = password;\n\t\tif ( value === 'publish' ) {\n\t\t\tif ( new Date( date ) > new Date() ) {\n\t\t\t\tnewDate = null;\n\t\t\t}\n\t\t} else if ( value === 'future' ) {\n\t\t\tif ( ! date || new Date( date ) < new Date() ) {\n\t\t\t\tnewDate = new Date();\n\t\t\t\tnewDate.setDate( newDate.getDate() + 7 );\n\t\t\t}\n\t\t} else if ( value === 'private' && password ) {\n\t\t\tsetShowPassword( false );\n\t\t\tnewPassword = '';\n\t\t}\n\t\tsaveStatus( {\n\t\t\tstatus: value,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<HStack className=\"edit-site-summary-field\">\n\t\t\t<Text className=\"edit-site-summary-field__label\">\n\t\t\t\t{ __( 'Status' ) }\n\t\t\t</Text>\n\t\t\t<Dropdown\n\t\t\t\tcontentClassName=\"edit-site-change-status__content\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tfocusOnMount\n\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\trenderToggle={ ( { onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"edit-site-summary-field__trigger\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t<StatusLabel\n\t\t\t\t\t\t\tstatus={ password ? 'protected' : status }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Status' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<form>\n\t\t\t\t\t\t\t<VStack spacing={ 5 }>\n\t\t\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-change-status__options\"\n\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Status' ) }\n\t\t\t\t\t\t\t\t\toptions={ STATUS_OPTIONS }\n\t\t\t\t\t\t\t\t\tonChange={ handleStatus }\n\t\t\t\t\t\t\t\t\tselected={ status }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ status !== 'private' && (\n\t\t\t\t\t\t\t\t\t<BaseControl\n\t\t\t\t\t\t\t\t\t\tid={ `edit-site-change-status__password` }\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Password' ) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Hide this page behind a password'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\tchecked={ showPassword }\n\t\t\t\t\t\t\t\t\t\t\tonChange={ handleTogglePassword }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ showPassword && (\n\t\t\t\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tsaveStatus( {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpassword: value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={ password }\n\t\t\t\t\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-autofocus */\n\t\t\t\t\t\t\t\t\t\t\t\tautoFocus={ ! password }\n\t\t\t\t\t\t\t\t\t\t\t\t/* eslint-enable jsx-a11y/no-autofocus */\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Enter a secure password'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</BaseControl>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</HStack>\n\t);\n}\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = PageSummary;
|
|
9
|
+
|
|
10
|
+
var _element = require("@wordpress/element");
|
|
11
|
+
|
|
12
|
+
var _components = require("@wordpress/components");
|
|
13
|
+
|
|
14
|
+
var _pageStatus = _interopRequireDefault(require("./page-status"));
|
|
15
|
+
|
|
16
|
+
var _publishDate = _interopRequireDefault(require("./publish-date"));
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* WordPress dependencies
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Internal dependencies
|
|
24
|
+
*/
|
|
25
|
+
function PageSummary({
|
|
26
|
+
status,
|
|
27
|
+
date,
|
|
28
|
+
password,
|
|
29
|
+
postId,
|
|
30
|
+
postType
|
|
31
|
+
}) {
|
|
32
|
+
return (0, _element.createElement)(_components.__experimentalVStack, null, (0, _element.createElement)(_pageStatus.default, {
|
|
33
|
+
status: status,
|
|
34
|
+
date: date,
|
|
35
|
+
password: password,
|
|
36
|
+
postId: postId,
|
|
37
|
+
postType: postType
|
|
38
|
+
}), (0, _element.createElement)(_publishDate.default, {
|
|
39
|
+
status: status,
|
|
40
|
+
date: date,
|
|
41
|
+
postId: postId,
|
|
42
|
+
postType: postType
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=page-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/page-panels/page-summary.js"],"names":["PageSummary","status","date","password","postId","postType"],"mappings":";;;;;;;;;;;AAGA;;AAIA;;AACA;;AARA;AACA;AACA;;AAEA;AACA;AACA;AAIe,SAASA,WAAT,CAAsB;AACpCC,EAAAA,MADoC;AAEpCC,EAAAA,IAFoC;AAGpCC,EAAAA,QAHoC;AAIpCC,EAAAA,MAJoC;AAKpCC,EAAAA;AALoC,CAAtB,EAMX;AACH,SACC,4BAAC,gCAAD,QACC,4BAAC,mBAAD;AACC,IAAA,MAAM,EAAGJ,MADV;AAEC,IAAA,IAAI,EAAGC,IAFR;AAGC,IAAA,QAAQ,EAAGC,QAHZ;AAIC,IAAA,MAAM,EAAGC,MAJV;AAKC,IAAA,QAAQ,EAAGC;AALZ,IADD,EAQC,4BAAC,oBAAD;AACC,IAAA,MAAM,EAAGJ,MADV;AAEC,IAAA,IAAI,EAAGC,IAFR;AAGC,IAAA,MAAM,EAAGE,MAHV;AAIC,IAAA,QAAQ,EAAGC;AAJZ,IARD,CADD;AAiBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\n/**\n * Internal dependencies\n */\nimport PageStatus from './page-status';\nimport PublishDate from './publish-date';\n\nexport default function PageSummary( {\n\tstatus,\n\tdate,\n\tpassword,\n\tpostId,\n\tpostType,\n} ) {\n\treturn (\n\t\t<VStack>\n\t\t\t<PageStatus\n\t\t\t\tstatus={ status }\n\t\t\t\tdate={ date }\n\t\t\t\tpassword={ password }\n\t\t\t\tpostId={ postId }\n\t\t\t\tpostType={ postType }\n\t\t\t/>\n\t\t\t<PublishDate\n\t\t\t\tstatus={ status }\n\t\t\t\tdate={ date }\n\t\t\t\tpostId={ postId }\n\t\t\t\tpostType={ postType }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n"]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = ChangeStatus;
|
|
7
|
+
|
|
8
|
+
var _element = require("@wordpress/element");
|
|
9
|
+
|
|
10
|
+
var _components = require("@wordpress/components");
|
|
11
|
+
|
|
12
|
+
var _i18n = require("@wordpress/i18n");
|
|
13
|
+
|
|
14
|
+
var _data = require("@wordpress/data");
|
|
15
|
+
|
|
16
|
+
var _coreData = require("@wordpress/core-data");
|
|
17
|
+
|
|
18
|
+
var _notices = require("@wordpress/notices");
|
|
19
|
+
|
|
20
|
+
var _blockEditor = require("@wordpress/block-editor");
|
|
21
|
+
|
|
22
|
+
var _date = require("@wordpress/date");
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* WordPress dependencies
|
|
26
|
+
*/
|
|
27
|
+
function ChangeStatus({
|
|
28
|
+
postType,
|
|
29
|
+
postId,
|
|
30
|
+
status,
|
|
31
|
+
date
|
|
32
|
+
}) {
|
|
33
|
+
const {
|
|
34
|
+
editEntityRecord
|
|
35
|
+
} = (0, _data.useDispatch)(_coreData.store);
|
|
36
|
+
const {
|
|
37
|
+
createErrorNotice
|
|
38
|
+
} = (0, _data.useDispatch)(_notices.store);
|
|
39
|
+
const [popoverAnchor, setPopoverAnchor] = (0, _element.useState)(null); // Memoize popoverProps to avoid returning a new object every time.
|
|
40
|
+
|
|
41
|
+
const popoverProps = (0, _element.useMemo)(() => ({
|
|
42
|
+
// Anchor the popover to the middle of the entire row so that it doesn't
|
|
43
|
+
// move around when the label changes.
|
|
44
|
+
anchor: popoverAnchor,
|
|
45
|
+
'aria-label': (0, _i18n.__)('Change publish date'),
|
|
46
|
+
placement: 'bottom-end'
|
|
47
|
+
}), [popoverAnchor]);
|
|
48
|
+
|
|
49
|
+
const saveDate = async newDate => {
|
|
50
|
+
try {
|
|
51
|
+
let newStatus = status;
|
|
52
|
+
|
|
53
|
+
if (status === 'future' && new Date(newDate) < new Date()) {
|
|
54
|
+
newStatus = 'publish';
|
|
55
|
+
} else if (status === 'publish' && new Date(newDate) > new Date()) {
|
|
56
|
+
newStatus = 'future';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
await editEntityRecord('postType', postType, postId, {
|
|
60
|
+
status: newStatus,
|
|
61
|
+
date: newDate
|
|
62
|
+
});
|
|
63
|
+
} catch (error) {
|
|
64
|
+
const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0, _i18n.__)('An error occurred while updating the status');
|
|
65
|
+
createErrorNotice(errorMessage, {
|
|
66
|
+
type: 'snackbar'
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const relateToNow = date ? (0, _date.humanTimeDiff)(date) : (0, _i18n.__)('Immediately');
|
|
72
|
+
return (0, _element.createElement)(_components.__experimentalHStack, {
|
|
73
|
+
className: "edit-site-summary-field"
|
|
74
|
+
}, (0, _element.createElement)(_components.__experimentalText, {
|
|
75
|
+
className: "edit-site-summary-field__label"
|
|
76
|
+
}, (0, _i18n.__)('Publish')), (0, _element.createElement)(_components.Dropdown, {
|
|
77
|
+
contentClassName: "edit-site-change-status__content",
|
|
78
|
+
popoverProps: popoverProps,
|
|
79
|
+
focusOnMount: true,
|
|
80
|
+
ref: setPopoverAnchor,
|
|
81
|
+
renderToggle: ({
|
|
82
|
+
onToggle
|
|
83
|
+
}) => (0, _element.createElement)(_components.Button, {
|
|
84
|
+
className: "edit-site-summary-field__trigger",
|
|
85
|
+
variant: "tertiary",
|
|
86
|
+
onClick: onToggle
|
|
87
|
+
}, relateToNow),
|
|
88
|
+
renderContent: ({
|
|
89
|
+
onClose
|
|
90
|
+
}) => (0, _element.createElement)(_blockEditor.__experimentalPublishDateTimePicker, {
|
|
91
|
+
currentDate: date,
|
|
92
|
+
is12Hour: true,
|
|
93
|
+
onClose: onClose,
|
|
94
|
+
onChange: saveDate
|
|
95
|
+
})
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=publish-date.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/page-panels/publish-date.js"],"names":["ChangeStatus","postType","postId","status","date","editEntityRecord","coreStore","createErrorNotice","noticesStore","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","saveDate","newDate","newStatus","Date","error","errorMessage","message","code","type","relateToNow","onToggle","onClose"],"mappings":";;;;;;;AAWA;;AARA;;AAMA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAfA;AACA;AACA;AAee,SAASA,YAAT,CAAuB;AAAEC,EAAAA,QAAF;AAAYC,EAAAA,MAAZ;AAAoBC,EAAAA,MAApB;AAA4BC,EAAAA;AAA5B,CAAvB,EAA4D;AAC1E,QAAM;AAAEC,IAAAA;AAAF,MAAuB,uBAAaC,eAAb,CAA7B;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAwB,uBAAaC,cAAb,CAA9B;AAEA,QAAM,CAAEC,aAAF,EAAiBC,gBAAjB,IAAsC,uBAAU,IAAV,CAA5C,CAJ0E,CAK1E;;AACA,QAAMC,YAAY,GAAG,sBACpB,OAAQ;AACP;AACA;AACAC,IAAAA,MAAM,EAAEH,aAHD;AAIP,kBAAc,cAAI,qBAAJ,CAJP;AAKPI,IAAAA,SAAS,EAAE;AALJ,GAAR,CADoB,EAQpB,CAAEJ,aAAF,CARoB,CAArB;;AAWA,QAAMK,QAAQ,GAAG,MAAQC,OAAR,IAAqB;AACrC,QAAI;AACH,UAAIC,SAAS,GAAGb,MAAhB;;AACA,UAAKA,MAAM,KAAK,QAAX,IAAuB,IAAIc,IAAJ,CAAUF,OAAV,IAAsB,IAAIE,IAAJ,EAAlD,EAA+D;AAC9DD,QAAAA,SAAS,GAAG,SAAZ;AACA,OAFD,MAEO,IACNb,MAAM,KAAK,SAAX,IACA,IAAIc,IAAJ,CAAUF,OAAV,IAAsB,IAAIE,IAAJ,EAFhB,EAGL;AACDD,QAAAA,SAAS,GAAG,QAAZ;AACA;;AACD,YAAMX,gBAAgB,CAAE,UAAF,EAAcJ,QAAd,EAAwBC,MAAxB,EAAgC;AACrDC,QAAAA,MAAM,EAAEa,SAD6C;AAErDZ,QAAAA,IAAI,EAAEW;AAF+C,OAAhC,CAAtB;AAIA,KAdD,CAcE,OAAQG,KAAR,EAAgB;AACjB,YAAMC,YAAY,GACjBD,KAAK,CAACE,OAAN,IAAiBF,KAAK,CAACG,IAAN,KAAe,eAAhC,GACGH,KAAK,CAACE,OADT,GAEG,cAAI,6CAAJ,CAHJ;AAKAb,MAAAA,iBAAiB,CAAEY,YAAF,EAAgB;AAChCG,QAAAA,IAAI,EAAE;AAD0B,OAAhB,CAAjB;AAGA;AACD,GAzBD;;AA2BA,QAAMC,WAAW,GAAGnB,IAAI,GAAG,yBAAeA,IAAf,CAAH,GAA2B,cAAI,aAAJ,CAAnD;AAEA,SACC,4BAAC,gCAAD;AAAQ,IAAA,SAAS,EAAC;AAAlB,KACC,4BAAC,8BAAD;AAAM,IAAA,SAAS,EAAC;AAAhB,KACG,cAAI,SAAJ,CADH,CADD,EAIC,4BAAC,oBAAD;AACC,IAAA,gBAAgB,EAAC,kCADlB;AAEC,IAAA,YAAY,EAAGO,YAFhB;AAGC,IAAA,YAAY,MAHb;AAIC,IAAA,GAAG,EAAGD,gBAJP;AAKC,IAAA,YAAY,EAAG,CAAE;AAAEc,MAAAA;AAAF,KAAF,KACd,4BAAC,kBAAD;AACC,MAAA,SAAS,EAAC,kCADX;AAEC,MAAA,OAAO,EAAC,UAFT;AAGC,MAAA,OAAO,EAAGA;AAHX,OAKGD,WALH,CANF;AAcC,IAAA,aAAa,EAAG,CAAE;AAAEE,MAAAA;AAAF,KAAF,KACf,4BAAC,gDAAD;AACC,MAAA,WAAW,EAAGrB,IADf;AAEC,MAAA,QAAQ,MAFT;AAGC,MAAA,OAAO,EAAGqB,OAHX;AAIC,MAAA,QAAQ,EAAGX;AAJZ;AAfF,IAJD,CADD;AA8BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tDropdown,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __experimentalPublishDateTimePicker as PublishDateTimePicker } from '@wordpress/block-editor';\nimport { humanTimeDiff } from '@wordpress/date';\n\nexport default function ChangeStatus( { postType, postId, status, date } ) {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': __( 'Change publish date' ),\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst saveDate = async ( newDate ) => {\n\t\ttry {\n\t\t\tlet newStatus = status;\n\t\t\tif ( status === 'future' && new Date( newDate ) < new Date() ) {\n\t\t\t\tnewStatus = 'publish';\n\t\t\t} else if (\n\t\t\t\tstatus === 'publish' &&\n\t\t\t\tnew Date( newDate ) > new Date()\n\t\t\t) {\n\t\t\t\tnewStatus = 'future';\n\t\t\t}\n\t\t\tawait editEntityRecord( 'postType', postType, postId, {\n\t\t\t\tstatus: newStatus,\n\t\t\t\tdate: newDate,\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while updating the status' );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst relateToNow = date ? humanTimeDiff( date ) : __( 'Immediately' );\n\n\treturn (\n\t\t<HStack className=\"edit-site-summary-field\">\n\t\t\t<Text className=\"edit-site-summary-field__label\">\n\t\t\t\t{ __( 'Publish' ) }\n\t\t\t</Text>\n\t\t\t<Dropdown\n\t\t\t\tcontentClassName=\"edit-site-change-status__content\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tfocusOnMount\n\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\trenderToggle={ ( { onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"edit-site-summary-field__trigger\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ relateToNow }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<PublishDateTimePicker\n\t\t\t\t\t\tcurrentDate={ date }\n\t\t\t\t\t\tis12Hour\n\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\tonChange={ saveDate }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</HStack>\n\t);\n}\n"]}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -9,8 +7,6 @@ exports.default = PluginSidebarEditSite;
|
|
|
9
7
|
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
9
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
10
|
var _interface = require("@wordpress/interface");
|
|
15
11
|
|
|
16
12
|
var _data = require("@wordpress/data");
|
|
@@ -90,17 +86,17 @@ var _store = require("../../../store");
|
|
|
90
86
|
* );
|
|
91
87
|
* ```
|
|
92
88
|
*/
|
|
93
|
-
function PluginSidebarEditSite(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} = _ref;
|
|
89
|
+
function PluginSidebarEditSite({
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
}) {
|
|
98
93
|
const showIconLabels = (0, _data.useSelect)(select => select(_store.store).getSettings().showIconLabels, []);
|
|
99
|
-
return (0, _element.createElement)(_interface.ComplementaryArea,
|
|
94
|
+
return (0, _element.createElement)(_interface.ComplementaryArea, {
|
|
100
95
|
panelClassName: className,
|
|
101
96
|
className: "edit-site-sidebar-edit-mode",
|
|
102
97
|
scope: "core/edit-site",
|
|
103
|
-
showIconLabels: showIconLabels
|
|
104
|
-
|
|
98
|
+
showIconLabels: showIconLabels,
|
|
99
|
+
...props
|
|
100
|
+
});
|
|
105
101
|
}
|
|
106
102
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/plugin-sidebar/index.js"],"names":["PluginSidebarEditSite","className","props","showIconLabels","select","editSiteStore","getSettings"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/plugin-sidebar/index.js"],"names":["PluginSidebarEditSite","className","props","showIconLabels","select","editSiteStore","getSettings"],"mappings":";;;;;;;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,qBAAT,CAAgC;AAAEC,EAAAA,SAAF;AAAa,KAAGC;AAAhB,CAAhC,EAA0D;AACxE,QAAMC,cAAc,GAAG,qBACpBC,MAAF,IAAcA,MAAM,CAAEC,YAAF,CAAN,CAAwBC,WAAxB,GAAsCH,cAD9B,EAEtB,EAFsB,CAAvB;AAKA,SACC,4BAAC,4BAAD;AACC,IAAA,cAAc,EAAGF,SADlB;AAEC,IAAA,SAAS,EAAC,6BAFX;AAGC,IAAA,KAAK,EAAC,gBAHP;AAIC,IAAA,cAAc,EAAGE,cAJlB;AAAA,OAKMD;AALN,IADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ComplementaryArea } from '@wordpress/interface';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\n\n/**\n * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.\n * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.\n * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:\n *\n * ```js\n * wp.data.dispatch( 'core/edit-site' ).openGeneralSidebar( 'plugin-name/sidebar-name' );\n * ```\n *\n * @see PluginSidebarMoreMenuItem\n *\n * @param {Object} props Element props.\n * @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.\n * @param {string} [props.className] An optional class name added to the sidebar body.\n * @param {string} props.title Title displayed at the top of the sidebar.\n * @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var el = wp.element.createElement;\n * var PanelBody = wp.components.PanelBody;\n * var PluginSidebar = wp.editSite.PluginSidebar;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function MyPluginSidebar() {\n * \treturn el(\n * \t\t\tPluginSidebar,\n * \t\t\t{\n * \t\t\t\tname: 'my-sidebar',\n * \t\t\t\ttitle: 'My sidebar title',\n * \t\t\t\ticon: moreIcon,\n * \t\t\t},\n * \t\t\tel(\n * \t\t\t\tPanelBody,\n * \t\t\t\t{},\n * \t\t\t\t__( 'My sidebar content' )\n * \t\t\t)\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PanelBody } from '@wordpress/components';\n * import { PluginSidebar } from '@wordpress/edit-site';\n * import { more } from '@wordpress/icons';\n *\n * const MyPluginSidebar = () => (\n * \t<PluginSidebar\n * \t\tname=\"my-sidebar\"\n * \t\ttitle=\"My sidebar title\"\n * \t\ticon={ more }\n * \t>\n * \t\t<PanelBody>\n * \t\t\t{ __( 'My sidebar content' ) }\n * \t\t</PanelBody>\n * \t</PluginSidebar>\n * );\n * ```\n */\nexport default function PluginSidebarEditSite( { className, ...props } ) {\n\tconst showIconLabels = useSelect(\n\t\t( select ) => select( editSiteStore ).getSettings().showIconLabels,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"edit-site-sidebar-edit-mode\"\n\t\t\tscope=\"core/edit-site\"\n\t\t\tshowIconLabels={ showIconLabels }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -7,6 +9,8 @@ exports.default = void 0;
|
|
|
7
9
|
|
|
8
10
|
var _element = require("@wordpress/element");
|
|
9
11
|
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
var _components = require("@wordpress/components");
|
|
11
15
|
|
|
12
16
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -19,6 +23,12 @@ var _constants = require("../../../store/constants");
|
|
|
19
23
|
|
|
20
24
|
var _constants2 = require("../constants");
|
|
21
25
|
|
|
26
|
+
var _store = require("../../../store");
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* External dependencies
|
|
30
|
+
*/
|
|
31
|
+
|
|
22
32
|
/**
|
|
23
33
|
* WordPress dependencies
|
|
24
34
|
*/
|
|
@@ -26,10 +36,23 @@ var _constants2 = require("../constants");
|
|
|
26
36
|
/**
|
|
27
37
|
* Internal dependencies
|
|
28
38
|
*/
|
|
29
|
-
const SettingsHeader =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
const SettingsHeader = ({
|
|
40
|
+
sidebarName
|
|
41
|
+
}) => {
|
|
42
|
+
const {
|
|
43
|
+
hasPageContentFocus,
|
|
44
|
+
entityType
|
|
45
|
+
} = (0, _data.useSelect)(select => {
|
|
46
|
+
const {
|
|
47
|
+
getEditedPostType,
|
|
48
|
+
hasPageContentFocus: _hasPageContentFocus
|
|
49
|
+
} = select(_store.store);
|
|
50
|
+
return {
|
|
51
|
+
hasPageContentFocus: _hasPageContentFocus(),
|
|
52
|
+
entityType: getEditedPostType()
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
const entityLabel = entityType === 'wp_navigation' ? (0, _i18n.__)('Navigation') : (0, _i18n.__)('Template');
|
|
33
56
|
const {
|
|
34
57
|
enableComplementaryArea
|
|
35
58
|
} = (0, _data.useDispatch)(_interface.store);
|
|
@@ -38,29 +61,37 @@ const SettingsHeader = _ref => {
|
|
|
38
61
|
|
|
39
62
|
const openBlockSettings = () => enableComplementaryArea(_constants.STORE_NAME, _constants2.SIDEBAR_BLOCK);
|
|
40
63
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
64
|
+
let templateAriaLabel;
|
|
65
|
+
|
|
66
|
+
if (hasPageContentFocus) {
|
|
67
|
+
templateAriaLabel = sidebarName === _constants2.SIDEBAR_TEMPLATE ? // translators: ARIA label for the Template sidebar tab, selected.
|
|
68
|
+
(0, _i18n.__)('Page (selected)') : // translators: ARIA label for the Template Settings Sidebar tab, not selected.
|
|
69
|
+
(0, _i18n.__)('Page');
|
|
70
|
+
} else {
|
|
71
|
+
templateAriaLabel = sidebarName === _constants2.SIDEBAR_TEMPLATE ? // translators: ARIA label for the Template sidebar tab, selected.
|
|
72
|
+
(0, _i18n.sprintf)((0, _i18n.__)('%s (selected)'), entityLabel) : // translators: ARIA label for the Template Settings Sidebar tab, not selected.
|
|
73
|
+
entityLabel;
|
|
74
|
+
}
|
|
47
75
|
/* Use a list so screen readers will announce how many tabs there are. */
|
|
48
76
|
|
|
77
|
+
|
|
49
78
|
return (0, _element.createElement)("ul", null, (0, _element.createElement)("li", null, (0, _element.createElement)(_components.Button, {
|
|
50
79
|
onClick: openTemplateSettings,
|
|
51
|
-
className:
|
|
52
|
-
|
|
53
|
-
,
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
(0, _i18n.__)('
|
|
80
|
+
className: (0, _classnames.default)('edit-site-sidebar-edit-mode__panel-tab', {
|
|
81
|
+
'is-active': sidebarName === _constants2.SIDEBAR_TEMPLATE
|
|
82
|
+
}),
|
|
83
|
+
"aria-label": templateAriaLabel,
|
|
84
|
+
"data-label": hasPageContentFocus ? (0, _i18n.__)('Page') : entityLabel
|
|
85
|
+
}, hasPageContentFocus ? (0, _i18n.__)('Page') : entityLabel)), (0, _element.createElement)("li", null, (0, _element.createElement)(_components.Button, {
|
|
57
86
|
onClick: openBlockSettings,
|
|
58
|
-
className:
|
|
59
|
-
|
|
60
|
-
,
|
|
87
|
+
className: (0, _classnames.default)('edit-site-sidebar-edit-mode__panel-tab', {
|
|
88
|
+
'is-active': sidebarName === _constants2.SIDEBAR_BLOCK
|
|
89
|
+
}),
|
|
90
|
+
"aria-label": sidebarName === _constants2.SIDEBAR_BLOCK ? // translators: ARIA label for the Block Settings Sidebar tab, selected.
|
|
91
|
+
(0, _i18n.__)('Block (selected)') : // translators: ARIA label for the Block Settings Sidebar tab, not selected.
|
|
92
|
+
(0, _i18n.__)('Block'),
|
|
61
93
|
"data-label": (0, _i18n.__)('Block')
|
|
62
|
-
},
|
|
63
|
-
(0, _i18n.__)('Block'))));
|
|
94
|
+
}, (0, _i18n.__)('Block'))));
|
|
64
95
|
};
|
|
65
96
|
|
|
66
97
|
var _default = SettingsHeader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/settings-header/index.js"],"names":["SettingsHeader","sidebarName","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/settings-header/index.js"],"names":["SettingsHeader","sidebarName","hasPageContentFocus","entityType","select","getEditedPostType","_hasPageContentFocus","editSiteStore","entityLabel","enableComplementaryArea","interfaceStore","openTemplateSettings","STORE_NAME","SIDEBAR_TEMPLATE","openBlockSettings","SIDEBAR_BLOCK","templateAriaLabel"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AAlBA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;AAKA,MAAMA,cAAc,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAuB;AAC7C,QAAM;AAAEC,IAAAA,mBAAF;AAAuBC,IAAAA;AAAvB,MAAsC,qBAAaC,MAAF,IAAc;AACpE,UAAM;AAAEC,MAAAA,iBAAF;AAAqBH,MAAAA,mBAAmB,EAAEI;AAA1C,QACLF,MAAM,CAAEG,YAAF,CADP;AAGA,WAAO;AACNL,MAAAA,mBAAmB,EAAEI,oBAAoB,EADnC;AAENH,MAAAA,UAAU,EAAEE,iBAAiB;AAFvB,KAAP;AAIA,GAR2C,CAA5C;AAUA,QAAMG,WAAW,GAChBL,UAAU,KAAK,eAAf,GAAiC,cAAI,YAAJ,CAAjC,GAAsD,cAAI,UAAJ,CADvD;AAGA,QAAM;AAAEM,IAAAA;AAAF,MAA8B,uBAAaC,gBAAb,CAApC;;AACA,QAAMC,oBAAoB,GAAG,MAC5BF,uBAAuB,CAAEG,qBAAF,EAAcC,4BAAd,CADxB;;AAEA,QAAMC,iBAAiB,GAAG,MACzBL,uBAAuB,CAAEG,qBAAF,EAAcG,yBAAd,CADxB;;AAGA,MAAIC,iBAAJ;;AACA,MAAKd,mBAAL,EAA2B;AAC1Bc,IAAAA,iBAAiB,GAChBf,WAAW,KAAKY,4BAAhB,GACG;AACA,kBAAI,iBAAJ,CAFH,GAGG;AACA,kBAAI,MAAJ,CALJ;AAMA,GAPD,MAOO;AACNG,IAAAA,iBAAiB,GAChBf,WAAW,KAAKY,4BAAhB,GACG;AACA,uBAAS,cAAI,eAAJ,CAAT,EAAgCL,WAAhC,CAFH,GAGG;AACAA,IAAAA,WALJ;AAMA;AAED;;;AACA,SACC,wCACC,wCACC,4BAAC,kBAAD;AACC,IAAA,OAAO,EAAGG,oBADX;AAEC,IAAA,SAAS,EAAG,yBACX,wCADW,EAEX;AACC,mBAAaV,WAAW,KAAKY;AAD9B,KAFW,CAFb;AAQC,kBAAaG,iBARd;AASC,kBACCd,mBAAmB,GAAG,cAAI,MAAJ,CAAH,GAAkBM;AAVvC,KAaGN,mBAAmB,GAAG,cAAI,MAAJ,CAAH,GAAkBM,WAbxC,CADD,CADD,EAkBC,wCACC,4BAAC,kBAAD;AACC,IAAA,OAAO,EAAGM,iBADX;AAEC,IAAA,SAAS,EAAG,yBACX,wCADW,EAEX;AACC,mBAAab,WAAW,KAAKc;AAD9B,KAFW,CAFb;AAQC,kBACCd,WAAW,KAAKc,yBAAhB,GACG;AACA,kBAAI,kBAAJ,CAFH,GAGG;AACA,kBAAI,OAAJ,CAbL;AAeC,kBAAa,cAAI,OAAJ;AAfd,KAiBG,cAAI,OAAJ,CAjBH,CADD,CAlBD,CADD;AA0CA,CAhFD;;eAkFef,c","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from '../../../store/constants';\nimport { SIDEBAR_BLOCK, SIDEBAR_TEMPLATE } from '../constants';\nimport { store as editSiteStore } from '../../../store';\n\nconst SettingsHeader = ( { sidebarName } ) => {\n\tconst { hasPageContentFocus, entityType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, hasPageContentFocus: _hasPageContentFocus } =\n\t\t\tselect( editSiteStore );\n\n\t\treturn {\n\t\t\thasPageContentFocus: _hasPageContentFocus(),\n\t\t\tentityType: getEditedPostType(),\n\t\t};\n\t} );\n\n\tconst entityLabel =\n\t\tentityType === 'wp_navigation' ? __( 'Navigation' ) : __( 'Template' );\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\tconst openTemplateSettings = () =>\n\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_TEMPLATE );\n\tconst openBlockSettings = () =>\n\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );\n\n\tlet templateAriaLabel;\n\tif ( hasPageContentFocus ) {\n\t\ttemplateAriaLabel =\n\t\t\tsidebarName === SIDEBAR_TEMPLATE\n\t\t\t\t? // translators: ARIA label for the Template sidebar tab, selected.\n\t\t\t\t __( 'Page (selected)' )\n\t\t\t\t: // translators: ARIA label for the Template Settings Sidebar tab, not selected.\n\t\t\t\t __( 'Page' );\n\t} else {\n\t\ttemplateAriaLabel =\n\t\t\tsidebarName === SIDEBAR_TEMPLATE\n\t\t\t\t? // translators: ARIA label for the Template sidebar tab, selected.\n\t\t\t\t sprintf( __( '%s (selected)' ), entityLabel )\n\t\t\t\t: // translators: ARIA label for the Template Settings Sidebar tab, not selected.\n\t\t\t\t entityLabel;\n\t}\n\n\t/* Use a list so screen readers will announce how many tabs there are. */\n\treturn (\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<Button\n\t\t\t\t\tonClick={ openTemplateSettings }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-sidebar-edit-mode__panel-tab',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-active': sidebarName === SIDEBAR_TEMPLATE,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\taria-label={ templateAriaLabel }\n\t\t\t\t\tdata-label={\n\t\t\t\t\t\thasPageContentFocus ? __( 'Page' ) : entityLabel\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ hasPageContentFocus ? __( 'Page' ) : entityLabel }\n\t\t\t\t</Button>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<Button\n\t\t\t\t\tonClick={ openBlockSettings }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-sidebar-edit-mode__panel-tab',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-active': sidebarName === SIDEBAR_BLOCK,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\taria-label={\n\t\t\t\t\t\tsidebarName === SIDEBAR_BLOCK\n\t\t\t\t\t\t\t? // translators: ARIA label for the Block Settings Sidebar tab, selected.\n\t\t\t\t\t\t\t __( 'Block (selected)' )\n\t\t\t\t\t\t\t: // translators: ARIA label for the Block Settings Sidebar tab, not selected.\n\t\t\t\t\t\t\t __( 'Block' )\n\t\t\t\t\t}\n\t\t\t\t\tdata-label={ __( 'Block' ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Block' ) }\n\t\t\t\t</Button>\n\t\t\t</li>\n\t\t</ul>\n\t);\n};\n\nexport default SettingsHeader;\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = SidebarCard;
|
|
9
|
+
|
|
10
|
+
var _element = require("@wordpress/element");
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _components = require("@wordpress/components");
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* External dependencies
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* WordPress dependencies
|
|
22
|
+
*/
|
|
23
|
+
function SidebarCard({
|
|
24
|
+
className,
|
|
25
|
+
title,
|
|
26
|
+
icon,
|
|
27
|
+
description,
|
|
28
|
+
actions,
|
|
29
|
+
children
|
|
30
|
+
}) {
|
|
31
|
+
return (0, _element.createElement)("div", {
|
|
32
|
+
className: (0, _classnames.default)('edit-site-sidebar-card', className)
|
|
33
|
+
}, (0, _element.createElement)(_components.Icon, {
|
|
34
|
+
className: "edit-site-sidebar-card__icon",
|
|
35
|
+
icon: icon
|
|
36
|
+
}), (0, _element.createElement)("div", {
|
|
37
|
+
className: "edit-site-sidebar-card__content"
|
|
38
|
+
}, (0, _element.createElement)("div", {
|
|
39
|
+
className: "edit-site-sidebar-card__header"
|
|
40
|
+
}, (0, _element.createElement)("h2", {
|
|
41
|
+
className: "edit-site-sidebar-card__title"
|
|
42
|
+
}, title), actions), (0, _element.createElement)("div", {
|
|
43
|
+
className: "edit-site-sidebar-card__description"
|
|
44
|
+
}, description), children));
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/sidebar-card/index.js"],"names":["SidebarCard","className","title","icon","description","actions","children"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGe,SAASA,WAAT,CAAsB;AACpCC,EAAAA,SADoC;AAEpCC,EAAAA,KAFoC;AAGpCC,EAAAA,IAHoC;AAIpCC,EAAAA,WAJoC;AAKpCC,EAAAA,OALoC;AAMpCC,EAAAA;AANoC,CAAtB,EAOX;AACH,SACC;AAAK,IAAA,SAAS,EAAG,yBAAY,wBAAZ,EAAsCL,SAAtC;AAAjB,KACC,4BAAC,gBAAD;AAAM,IAAA,SAAS,EAAC,8BAAhB;AAA+C,IAAA,IAAI,EAAGE;AAAtD,IADD,EAEC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAI,IAAA,SAAS,EAAC;AAAd,KAAgDD,KAAhD,CADD,EAEGG,OAFH,CADD,EAKC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGD,WADH,CALD,EAQGE,QARH,CAFD,CADD;AAeA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\n\nexport default function SidebarCard( {\n\tclassName,\n\ttitle,\n\ticon,\n\tdescription,\n\tactions,\n\tchildren,\n} ) {\n\treturn (\n\t\t<div className={ classnames( 'edit-site-sidebar-card', className ) }>\n\t\t\t<Icon className=\"edit-site-sidebar-card__icon\" icon={ icon } />\n\t\t\t<div className=\"edit-site-sidebar-card__content\">\n\t\t\t\t<div className=\"edit-site-sidebar-card__header\">\n\t\t\t\t\t<h2 className=\"edit-site-sidebar-card__title\">{ title }</h2>\n\t\t\t\t\t{ actions }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"edit-site-sidebar-card__description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</div>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
|