@wordpress/edit-site 6.31.1-next.f56bd8138.0 → 6.32.1-next.47f435fc9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/add-new-pattern/index.js +153 -141
- package/build/components/add-new-pattern/index.js.map +7 -1
- package/build/components/add-new-post/index.js +114 -89
- package/build/components/add-new-post/index.js.map +7 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +80 -60
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +7 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js +284 -207
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +7 -1
- package/build/components/add-new-template/index.js +309 -248
- package/build/components/add-new-template/index.js.map +7 -1
- package/build/components/add-new-template/utils.js +459 -446
- package/build/components/add-new-template/utils.js.map +7 -1
- package/build/components/app/index.js +72 -63
- package/build/components/app/index.js.map +7 -1
- package/build/components/block-editor/use-editor-iframe-props.js +63 -66
- package/build/components/block-editor/use-editor-iframe-props.js.map +7 -1
- package/build/components/block-editor/use-navigate-to-entity-record.js +34 -22
- package/build/components/block-editor/use-navigate-to-entity-record.js.map +7 -1
- package/build/components/block-editor/use-site-editor-settings.js +64 -51
- package/build/components/block-editor/use-site-editor-settings.js.map +7 -1
- package/build/components/canvas-loader/index.js +41 -56
- package/build/components/canvas-loader/index.js.map +7 -1
- package/build/components/dataviews-actions/index.js +96 -83
- package/build/components/dataviews-actions/index.js.map +7 -1
- package/build/components/editor/index.js +288 -235
- package/build/components/editor/index.js.map +7 -1
- package/build/components/editor/site-preview.js +55 -42
- package/build/components/editor/site-preview.js.map +7 -1
- package/build/components/editor/use-adapt-editor-to-canvas.js +49 -31
- package/build/components/editor/use-adapt-editor-to-canvas.js.map +7 -1
- package/build/components/editor/use-editor-title.js +79 -61
- package/build/components/editor/use-editor-title.js.map +7 -1
- package/build/components/editor/use-resolve-edited-entity.js +112 -140
- package/build/components/editor/use-resolve-edited-entity.js.map +7 -1
- package/build/components/editor-canvas-container/index.js +101 -91
- package/build/components/editor-canvas-container/index.js.map +7 -1
- package/build/components/global-styles/background-panel.js +46 -39
- package/build/components/global-styles/background-panel.js.map +7 -1
- package/build/components/global-styles/block-preview-panel.js +58 -52
- package/build/components/global-styles/block-preview-panel.js.map +7 -1
- package/build/components/global-styles/color-indicator-wrapper.js +47 -26
- package/build/components/global-styles/color-indicator-wrapper.js.map +7 -1
- package/build/components/global-styles/color-palette-panel.js +130 -81
- package/build/components/global-styles/color-palette-panel.js.map +7 -1
- package/build/components/global-styles/confirm-reset-shadow-dialog.js +38 -22
- package/build/components/global-styles/confirm-reset-shadow-dialog.js.map +7 -1
- package/build/components/global-styles/dimensions-panel.js +46 -41
- package/build/components/global-styles/dimensions-panel.js.map +7 -1
- package/build/components/global-styles/font-families.js +106 -102
- package/build/components/global-styles/font-families.js.map +7 -1
- package/build/components/global-styles/font-family-item.js +41 -43
- package/build/components/global-styles/font-family-item.js.map +7 -1
- package/build/components/global-styles/font-library-modal/collection-font-variant.js +55 -39
- package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +7 -1
- package/build/components/global-styles/font-library-modal/context.js +228 -243
- package/build/components/global-styles/font-library-modal/context.js.map +7 -1
- package/build/components/global-styles/font-library-modal/font-card.js +70 -59
- package/build/components/global-styles/font-library-modal/font-card.js.map +7 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +407 -321
- package/build/components/global-styles/font-library-modal/font-collection.js.map +7 -1
- package/build/components/global-styles/font-library-modal/font-demo.js +54 -50
- package/build/components/global-styles/font-library-modal/font-demo.js.map +7 -1
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +52 -44
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +7 -1
- package/build/components/global-styles/font-library-modal/index.js +90 -87
- package/build/components/global-styles/font-library-modal/index.js.map +7 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +369 -255
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +7 -1
- package/build/components/global-styles/font-library-modal/library-font-details.js +60 -42
- package/build/components/global-styles/font-library-modal/library-font-details.js.map +7 -1
- package/build/components/global-styles/font-library-modal/library-font-variant.js +64 -49
- package/build/components/global-styles/font-library-modal/library-font-variant.js.map +7 -1
- package/build/components/global-styles/font-library-modal/resolvers.js +64 -31
- package/build/components/global-styles/font-library-modal/resolvers.js.map +7 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js +133 -145
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/constants.js +45 -24
- package/build/components/global-styles/font-library-modal/utils/constants.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/filter-fonts.js +30 -27
- package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/fonts-outline.js +41 -13
- package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/index.js +127 -161
- package/build/components/global-styles/font-library-modal/utils/index.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js +25 -18
- package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/preview-styles.js +55 -74
- package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js +32 -16
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/toggleFont.js +43 -72
- package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +7 -1
- package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +44 -23
- package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +7 -1
- package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +38 -22
- package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -1
- package/build/components/global-styles/font-sizes/font-size-preview.js +42 -35
- package/build/components/global-styles/font-sizes/font-size-preview.js.map +7 -1
- package/build/components/global-styles/font-sizes/font-size.js +207 -170
- package/build/components/global-styles/font-sizes/font-size.js.map +7 -1
- package/build/components/global-styles/font-sizes/font-sizes-count.js +46 -45
- package/build/components/global-styles/font-sizes/font-sizes-count.js.map +7 -1
- package/build/components/global-styles/font-sizes/font-sizes.js +199 -136
- package/build/components/global-styles/font-sizes/font-sizes.js.map +7 -1
- package/build/components/global-styles/font-sizes/rename-font-size-dialog.js +81 -58
- package/build/components/global-styles/font-sizes/rename-font-size-dialog.js.map +7 -1
- package/build/components/global-styles/gradients-palette-panel.js +140 -85
- package/build/components/global-styles/gradients-palette-panel.js.map +7 -1
- package/build/components/global-styles/header.js +51 -48
- package/build/components/global-styles/header.js.map +7 -1
- package/build/components/global-styles/highlighted-colors.js +48 -40
- package/build/components/global-styles/highlighted-colors.js.map +7 -1
- package/build/components/global-styles/hooks.js +89 -68
- package/build/components/global-styles/hooks.js.map +7 -1
- package/build/components/global-styles/icon-with-current-color.js +50 -25
- package/build/components/global-styles/icon-with-current-color.js.map +7 -1
- package/build/components/global-styles/index.js +36 -11
- package/build/components/global-styles/index.js.map +7 -1
- package/build/components/global-styles/navigation-button.js +41 -42
- package/build/components/global-styles/navigation-button.js.map +7 -1
- package/build/components/global-styles/palette.js +82 -73
- package/build/components/global-styles/palette.js.map +7 -1
- package/build/components/global-styles/preset-colors.js +36 -24
- package/build/components/global-styles/preset-colors.js.map +7 -1
- package/build/components/global-styles/preview-colors.js +68 -46
- package/build/components/global-styles/preview-colors.js.map +7 -1
- package/build/components/global-styles/preview-styles.js +182 -136
- package/build/components/global-styles/preview-styles.js.map +7 -1
- package/build/components/global-styles/preview-typography.js +65 -44
- package/build/components/global-styles/preview-typography.js.map +7 -1
- package/build/components/global-styles/preview-wrapper.js +70 -85
- package/build/components/global-styles/preview-wrapper.js.map +7 -1
- package/build/components/global-styles/root-menu.js +53 -52
- package/build/components/global-styles/root-menu.js.map +7 -1
- package/build/components/global-styles/screen-background.js +54 -35
- package/build/components/global-styles/screen-background.js.map +7 -1
- package/build/components/global-styles/screen-block-list.js +129 -118
- package/build/components/global-styles/screen-block-list.js.map +7 -1
- package/build/components/global-styles/screen-block.js +185 -182
- package/build/components/global-styles/screen-block.js.map +7 -1
- package/build/components/global-styles/screen-color-palette.js +61 -56
- package/build/components/global-styles/screen-color-palette.js.map +7 -1
- package/build/components/global-styles/screen-colors.js +64 -40
- package/build/components/global-styles/screen-colors.js.map +7 -1
- package/build/components/global-styles/screen-css.js +80 -50
- package/build/components/global-styles/screen-css.js.map +7 -1
- package/build/components/global-styles/screen-layout.js +45 -32
- package/build/components/global-styles/screen-layout.js.map +7 -1
- package/build/components/global-styles/screen-revisions/index.js +144 -116
- package/build/components/global-styles/screen-revisions/index.js.map +7 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +165 -166
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +7 -1
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +93 -81
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +7 -1
- package/build/components/global-styles/screen-root.js +93 -84
- package/build/components/global-styles/screen-root.js.map +7 -1
- package/build/components/global-styles/screen-shadows.js +43 -16
- package/build/components/global-styles/screen-shadows.js.map +7 -1
- package/build/components/global-styles/screen-style-variations.js +64 -44
- package/build/components/global-styles/screen-style-variations.js.map +7 -1
- package/build/components/global-styles/screen-typography-element.js +146 -93
- package/build/components/global-styles/screen-typography-element.js.map +7 -1
- package/build/components/global-styles/screen-typography.js +64 -40
- package/build/components/global-styles/screen-typography.js.map +7 -1
- package/build/components/global-styles/shadow-utils.js +75 -180
- package/build/components/global-styles/shadow-utils.js.map +7 -1
- package/build/components/global-styles/shadows-edit-panel.js +433 -358
- package/build/components/global-styles/shadows-edit-panel.js.map +7 -1
- package/build/components/global-styles/shadows-panel.js +178 -131
- package/build/components/global-styles/shadows-panel.js.map +7 -1
- package/build/components/global-styles/size-control/index.js +66 -76
- package/build/components/global-styles/size-control/index.js.map +7 -1
- package/build/components/global-styles/style-variations-container.js +114 -102
- package/build/components/global-styles/style-variations-container.js.map +7 -1
- package/build/components/global-styles/subtitle.js +34 -21
- package/build/components/global-styles/subtitle.js.map +7 -1
- package/build/components/global-styles/typeset.js +73 -75
- package/build/components/global-styles/typeset.js.map +7 -1
- package/build/components/global-styles/typography-elements.js +109 -86
- package/build/components/global-styles/typography-elements.js.map +7 -1
- package/build/components/global-styles/typography-example.js +66 -65
- package/build/components/global-styles/typography-example.js.map +7 -1
- package/build/components/global-styles/typography-panel.js +57 -39
- package/build/components/global-styles/typography-panel.js.map +7 -1
- package/build/components/global-styles/typography-preview.js +73 -53
- package/build/components/global-styles/typography-preview.js.map +7 -1
- package/build/components/global-styles/ui.js +282 -314
- package/build/components/global-styles/ui.js.map +7 -1
- package/build/components/global-styles/utils.js +45 -31
- package/build/components/global-styles/utils.js.map +7 -1
- package/build/components/global-styles/variations/variation.js +90 -74
- package/build/components/global-styles/variations/variation.js.map +7 -1
- package/build/components/global-styles/variations/variations-color.js +52 -41
- package/build/components/global-styles/variations/variations-color.js.map +7 -1
- package/build/components/global-styles/variations/variations-panel.js +61 -51
- package/build/components/global-styles/variations/variations-panel.js.map +7 -1
- package/build/components/global-styles/variations/variations-typography.js +69 -49
- package/build/components/global-styles/variations/variations-typography.js.map +7 -1
- package/build/components/global-styles-renderer/index.js +39 -33
- package/build/components/global-styles-renderer/index.js.map +7 -1
- package/build/components/global-styles-sidebar/default-sidebar.js +53 -40
- package/build/components/global-styles-sidebar/default-sidebar.js.map +7 -1
- package/build/components/global-styles-sidebar/index.js +164 -141
- package/build/components/global-styles-sidebar/index.js.map +7 -1
- package/build/components/layout/animation.js +53 -78
- package/build/components/layout/animation.js.map +7 -1
- package/build/components/layout/hooks.js +40 -35
- package/build/components/layout/hooks.js.map +7 -1
- package/build/components/layout/index.js +220 -199
- package/build/components/layout/index.js.map +7 -1
- package/build/components/media/index.js +31 -26
- package/build/components/media/index.js.map +7 -1
- package/build/components/more-menu/index.js +45 -28
- package/build/components/more-menu/index.js.map +7 -1
- package/build/components/more-menu/site-export.js +69 -44
- package/build/components/more-menu/site-export.js.map +7 -1
- package/build/components/more-menu/welcome-guide-menu-item.js +29 -21
- package/build/components/more-menu/welcome-guide-menu-item.js.map +7 -1
- package/build/components/page-patterns/actions.js +82 -0
- package/build/components/page-patterns/actions.js.map +7 -0
- package/build/components/page-patterns/delete-category-menu-item.js +94 -82
- package/build/components/page-patterns/delete-category-menu-item.js.map +7 -1
- package/build/components/page-patterns/fields.js +135 -123
- package/build/components/page-patterns/fields.js.map +7 -1
- package/build/components/page-patterns/index.js +182 -148
- package/build/components/page-patterns/index.js.map +7 -1
- package/build/components/page-patterns/rename-category-menu-item.js +67 -62
- package/build/components/page-patterns/rename-category-menu-item.js.map +7 -1
- package/build/components/page-patterns/search-items.js +65 -89
- package/build/components/page-patterns/search-items.js.map +7 -1
- package/build/components/page-patterns/use-pattern-settings.js +45 -35
- package/build/components/page-patterns/use-pattern-settings.js.map +7 -1
- package/build/components/page-patterns/use-patterns.js +266 -200
- package/build/components/page-patterns/use-patterns.js.map +7 -1
- package/build/components/page-patterns/utils.js +27 -7
- package/build/components/page-patterns/utils.js.map +7 -1
- package/build/components/page-templates/fields.js +165 -159
- package/build/components/page-templates/fields.js.map +7 -1
- package/build/components/page-templates/hooks.js +66 -64
- package/build/components/page-templates/hooks.js.map +7 -1
- package/build/components/page-templates/index.js +211 -207
- package/build/components/page-templates/index.js.map +7 -1
- package/build/components/page-templates/view-utils.js +67 -0
- package/build/components/page-templates/view-utils.js.map +7 -0
- package/build/components/pagination/index.js +119 -82
- package/build/components/pagination/index.js.map +7 -1
- package/build/components/plugin-template-setting-panel/index.js +49 -56
- package/build/components/plugin-template-setting-panel/index.js.map +7 -1
- package/build/components/post-edit/index.js +171 -144
- package/build/components/post-edit/index.js.map +7 -1
- package/build/components/post-list/index.js +230 -301
- package/build/components/post-list/index.js.map +7 -1
- package/build/components/post-list/view-utils.js +167 -0
- package/build/components/post-list/view-utils.js.map +7 -0
- package/build/components/posts-app/index.js +44 -32
- package/build/components/posts-app/index.js.map +7 -1
- package/build/components/posts-app-routes/index.js +36 -25
- package/build/components/posts-app-routes/index.js.map +7 -1
- package/build/components/posts-app-routes/post-item.js +54 -35
- package/build/components/posts-app-routes/post-item.js.map +7 -1
- package/build/components/posts-app-routes/posts.js +91 -76
- package/build/components/posts-app-routes/posts.js.map +7 -1
- package/build/components/resizable-frame/index.js +200 -224
- package/build/components/resizable-frame/index.js.map +7 -1
- package/build/components/revisions/index.js +102 -71
- package/build/components/revisions/index.js.map +7 -1
- package/build/components/routes/use-title.js +45 -35
- package/build/components/routes/use-title.js.map +7 -1
- package/build/components/save-button/index.js +113 -111
- package/build/components/save-button/index.js.map +7 -1
- package/build/components/save-hub/index.js +52 -40
- package/build/components/save-hub/index.js.map +7 -1
- package/build/components/save-keyboard-shortcut/index.js +46 -52
- package/build/components/save-keyboard-shortcut/index.js.map +7 -1
- package/build/components/save-panel/index.js +155 -136
- package/build/components/save-panel/index.js.map +7 -1
- package/build/components/sidebar/index.js +81 -79
- package/build/components/sidebar/index.js.map +7 -1
- package/build/components/sidebar-button/index.js +43 -22
- package/build/components/sidebar-button/index.js.map +7 -1
- package/build/components/sidebar-dataviews/dataview-item.js +68 -55
- package/build/components/sidebar-dataviews/dataview-item.js.map +7 -1
- package/build/components/sidebar-dataviews/index.js +68 -54
- package/build/components/sidebar-dataviews/index.js.map +7 -1
- package/build/components/sidebar-global-styles-wrapper/index.js +125 -111
- package/build/components/sidebar-global-styles-wrapper/index.js.map +7 -1
- package/build/components/sidebar-navigation-item/index.js +79 -62
- package/build/components/sidebar-navigation-item/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen/index.js +129 -104
- package/build/components/sidebar-navigation-screen/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +63 -53
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-global-styles/content.js +50 -33
- package/build/components/sidebar-navigation-screen-global-styles/content.js.map +7 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +94 -81
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-main/index.js +141 -90
- package/build/components/sidebar-navigation-screen-main/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +40 -29
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +124 -91
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +116 -83
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +57 -48
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +80 -66
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +64 -38
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +125 -96
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +33 -19
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +30 -16
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +119 -105
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +130 -121
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +106 -88
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +44 -21
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +129 -106
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +36 -25
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +81 -70
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +42 -32
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +41 -28
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +7 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +95 -76
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +7 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +48 -27
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-unsupported/index.js +28 -20
- package/build/components/sidebar-navigation-screen-unsupported/index.js.map +7 -1
- package/build/components/site-editor-routes/home.js +50 -32
- package/build/components/site-editor-routes/home.js.map +7 -1
- package/build/components/site-editor-routes/index.js +62 -36
- package/build/components/site-editor-routes/index.js.map +7 -1
- package/build/components/site-editor-routes/navigation-item.js +55 -49
- package/build/components/site-editor-routes/navigation-item.js.map +7 -1
- package/build/components/site-editor-routes/navigation.js +55 -49
- package/build/components/site-editor-routes/navigation.js.map +7 -1
- package/build/components/site-editor-routes/notfound.js +54 -34
- package/build/components/site-editor-routes/notfound.js.map +7 -1
- package/build/components/site-editor-routes/page-item.js +58 -41
- package/build/components/site-editor-routes/page-item.js.map +7 -1
- package/build/components/site-editor-routes/pages.js +96 -86
- package/build/components/site-editor-routes/pages.js.map +7 -1
- package/build/components/site-editor-routes/pattern-item.js +48 -26
- package/build/components/site-editor-routes/pattern-item.js.map +7 -1
- package/build/components/site-editor-routes/patterns.js +51 -36
- package/build/components/site-editor-routes/patterns.js.map +7 -1
- package/build/components/site-editor-routes/stylebook.js +60 -43
- package/build/components/site-editor-routes/stylebook.js.map +7 -1
- package/build/components/site-editor-routes/styles.js +58 -46
- package/build/components/site-editor-routes/styles.js.map +7 -1
- package/build/components/site-editor-routes/template-item.js +54 -34
- package/build/components/site-editor-routes/template-item.js.map +7 -1
- package/build/components/site-editor-routes/template-part-item.js +45 -21
- package/build/components/site-editor-routes/template-part-item.js.map +7 -1
- package/build/components/site-editor-routes/templates.js +69 -44
- package/build/components/site-editor-routes/templates.js.map +7 -1
- package/build/components/site-editor-routes/utils.js +27 -13
- package/build/components/site-editor-routes/utils.js.map +7 -1
- package/build/components/site-hub/index.js +233 -222
- package/build/components/site-hub/index.js.map +7 -1
- package/build/components/site-icon/index.js +61 -49
- package/build/components/site-icon/index.js.map +7 -1
- package/build/components/style-book/categories.js +61 -52
- package/build/components/style-book/categories.js.map +7 -1
- package/build/components/style-book/color-examples.js +54 -40
- package/build/components/style-book/color-examples.js.map +7 -1
- package/build/components/style-book/constants.js +218 -144
- package/build/components/style-book/constants.js.map +7 -1
- package/build/components/style-book/duotone-examples.js +54 -40
- package/build/components/style-book/duotone-examples.js.map +7 -1
- package/build/components/style-book/examples.js +145 -120
- package/build/components/style-book/examples.js.map +7 -1
- package/build/components/style-book/index.js +454 -409
- package/build/components/style-book/index.js.map +7 -1
- package/build/components/style-book/types.js +16 -5
- package/build/components/style-book/types.js.map +7 -1
- package/build/components/welcome-guide/editor.js +87 -60
- package/build/components/welcome-guide/editor.js.map +7 -1
- package/build/components/welcome-guide/image.js +34 -22
- package/build/components/welcome-guide/image.js.map +7 -1
- package/build/components/welcome-guide/index.js +44 -21
- package/build/components/welcome-guide/index.js.map +7 -1
- package/build/components/welcome-guide/page.js +76 -52
- package/build/components/welcome-guide/page.js.map +7 -1
- package/build/components/welcome-guide/styles.js +135 -102
- package/build/components/welcome-guide/styles.js.map +7 -1
- package/build/components/welcome-guide/template.js +71 -59
- package/build/components/welcome-guide/template.js.map +7 -1
- package/build/deprecated.js +56 -46
- package/build/deprecated.js.map +7 -1
- package/build/hooks/commands/use-common-commands.js +117 -119
- package/build/hooks/commands/use-common-commands.js.map +7 -1
- package/build/hooks/commands/use-set-command-context.js +40 -50
- package/build/hooks/commands/use-set-command-context.js.map +7 -1
- package/build/hooks/index.js +2 -3
- package/build/hooks/index.js.map +7 -1
- package/build/hooks/push-changes-to-global-styles/index.js +236 -251
- package/build/hooks/push-changes-to-global-styles/index.js.map +7 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +78 -111
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +7 -1
- package/build/index.js +87 -112
- package/build/index.js.map +7 -1
- package/build/lock-unlock.js +31 -14
- package/build/lock-unlock.js.map +7 -1
- package/build/posts.js +67 -63
- package/build/posts.js.map +7 -1
- package/build/store/actions.js +199 -365
- package/build/store/actions.js.map +7 -1
- package/build/store/constants.js +27 -11
- package/build/store/constants.js.map +7 -1
- package/build/store/index.js +52 -30
- package/build/store/index.js.map +7 -1
- package/build/store/private-actions.js +34 -19
- package/build/store/private-actions.js.map +7 -1
- package/build/store/private-selectors.js +28 -13
- package/build/store/private-selectors.js.map +7 -1
- package/build/store/reducer.js +42 -57
- package/build/store/reducer.js.map +7 -1
- package/build/store/selectors.js +205 -301
- package/build/store/selectors.js.map +7 -1
- package/build/utils/constants.js +94 -53
- package/build/utils/constants.js.map +7 -1
- package/build/utils/get-filtered-template-parts.js +36 -42
- package/build/utils/get-filtered-template-parts.js.map +7 -1
- package/build/utils/is-previewing-theme.js +31 -13
- package/build/utils/is-previewing-theme.js.map +7 -1
- package/build/utils/is-template-removable.js +24 -17
- package/build/utils/is-template-removable.js.map +7 -1
- package/build/utils/is-template-revertable.js +24 -19
- package/build/utils/is-template-revertable.js.map +7 -1
- package/build/utils/set-nested-value.js +24 -25
- package/build/utils/set-nested-value.js.map +7 -1
- package/build/utils/template-part-create.js +1 -1
- package/build/utils/template-part-create.js.map +7 -1
- package/build/utils/use-activate-theme.js +40 -45
- package/build/utils/use-activate-theme.js.map +7 -1
- package/build/utils/use-actual-current-theme.js +47 -25
- package/build/utils/use-actual-current-theme.js.map +7 -1
- package/build-module/components/add-new-pattern/index.js +133 -127
- package/build-module/components/add-new-pattern/index.js.map +7 -1
- package/build-module/components/add-new-post/index.js +100 -82
- package/build-module/components/add-new-post/index.js.map +7 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +63 -51
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +7 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js +269 -196
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +7 -1
- package/build-module/components/add-new-template/index.js +289 -219
- package/build-module/components/add-new-template/index.js.map +7 -1
- package/build-module/components/add-new-template/utils.js +430 -432
- package/build-module/components/add-new-template/utils.js.map +7 -1
- package/build-module/components/app/index.js +41 -51
- package/build-module/components/app/index.js.map +7 -1
- package/build-module/components/block-editor/use-editor-iframe-props.js +33 -58
- package/build-module/components/block-editor/use-editor-iframe-props.js.map +7 -1
- package/build-module/components/block-editor/use-navigate-to-entity-record.js +17 -18
- package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +7 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +28 -41
- package/build-module/components/block-editor/use-site-editor-settings.js.map +7 -1
- package/build-module/components/canvas-loader/index.js +25 -50
- package/build-module/components/canvas-loader/index.js.map +7 -1
- package/build-module/components/dataviews-actions/index.js +75 -78
- package/build-module/components/dataviews-actions/index.js.map +7 -1
- package/build-module/components/editor/index.js +261 -220
- package/build-module/components/editor/index.js.map +7 -1
- package/build-module/components/editor/site-preview.js +38 -38
- package/build-module/components/editor/site-preview.js.map +7 -1
- package/build-module/components/editor/use-adapt-editor-to-canvas.js +25 -24
- package/build-module/components/editor/use-adapt-editor-to-canvas.js.map +7 -1
- package/build-module/components/editor/use-editor-title.js +49 -53
- package/build-module/components/editor/use-editor-title.js.map +7 -1
- package/build-module/components/editor/use-resolve-edited-entity.js +89 -129
- package/build-module/components/editor/use-resolve-edited-entity.js.map +7 -1
- package/build-module/components/editor-canvas-container/index.js +79 -80
- package/build-module/components/editor-canvas-container/index.js.map +7 -1
- package/build-module/components/global-styles/background-panel.js +25 -35
- package/build-module/components/global-styles/background-panel.js.map +7 -1
- package/build-module/components/global-styles/block-preview-panel.js +36 -43
- package/build-module/components/global-styles/block-preview-panel.js.map +7 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js +19 -20
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +7 -1
- package/build-module/components/global-styles/color-palette-panel.js +105 -74
- package/build-module/components/global-styles/color-palette-panel.js.map +7 -1
- package/build-module/components/global-styles/confirm-reset-shadow-dialog.js +20 -17
- package/build-module/components/global-styles/confirm-reset-shadow-dialog.js.map +7 -1
- package/build-module/components/global-styles/dimensions-panel.js +26 -34
- package/build-module/components/global-styles/dimensions-panel.js.map +7 -1
- package/build-module/components/global-styles/font-families.js +86 -93
- package/build-module/components/global-styles/font-families.js.map +7 -1
- package/build-module/components/global-styles/font-family-item.js +26 -37
- package/build-module/components/global-styles/font-family-item.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +26 -32
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/context.js +203 -224
- package/build-module/components/global-styles/font-library-modal/context.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/font-card.js +48 -52
- package/build-module/components/global-styles/font-library-modal/font-card.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +397 -302
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/font-demo.js +32 -38
- package/build-module/components/global-styles/font-library-modal/font-demo.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +41 -39
- package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/index.js +65 -81
- package/build-module/components/global-styles/font-library-modal/index.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +354 -243
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/library-font-details.js +35 -36
- package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js +35 -42
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/resolvers.js +27 -20
- package/build-module/components/global-styles/font-library-modal/resolvers.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js +111 -135
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/constants.js +21 -19
- package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js +13 -24
- package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js +20 -10
- package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/index.js +102 -154
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js +8 -14
- package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js +34 -71
- package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js +11 -13
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js +22 -69
- package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +26 -18
- package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +20 -17
- package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/font-size-preview.js +26 -29
- package/build-module/components/global-styles/font-sizes/font-size-preview.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/font-size.js +185 -160
- package/build-module/components/global-styles/font-sizes/font-size.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/font-sizes-count.js +23 -39
- package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/font-sizes.js +184 -128
- package/build-module/components/global-styles/font-sizes/font-sizes.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js +68 -52
- package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js.map +7 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +117 -79
- package/build-module/components/global-styles/gradients-palette-panel.js.map +7 -1
- package/build-module/components/global-styles/header.js +40 -43
- package/build-module/components/global-styles/header.js.map +7 -1
- package/build-module/components/global-styles/highlighted-colors.js +31 -36
- package/build-module/components/global-styles/highlighted-colors.js.map +7 -1
- package/build-module/components/global-styles/hooks.js +56 -61
- package/build-module/components/global-styles/hooks.js.map +7 -1
- package/build-module/components/global-styles/icon-with-current-color.js +18 -19
- package/build-module/components/global-styles/icon-with-current-color.js.map +7 -1
- package/build-module/components/global-styles/index.js +5 -2
- package/build-module/components/global-styles/index.js.map +7 -1
- package/build-module/components/global-styles/navigation-button.js +23 -37
- package/build-module/components/global-styles/navigation-button.js.map +7 -1
- package/build-module/components/global-styles/palette.js +61 -67
- package/build-module/components/global-styles/palette.js.map +7 -1
- package/build-module/components/global-styles/preset-colors.js +19 -20
- package/build-module/components/global-styles/preset-colors.js.map +7 -1
- package/build-module/components/global-styles/preview-colors.js +43 -40
- package/build-module/components/global-styles/preview-colors.js.map +7 -1
- package/build-module/components/global-styles/preview-styles.js +158 -130
- package/build-module/components/global-styles/preview-styles.js.map +7 -1
- package/build-module/components/global-styles/preview-typography.js +37 -38
- package/build-module/components/global-styles/preview-typography.js.map +7 -1
- package/build-module/components/global-styles/preview-wrapper.js +51 -75
- package/build-module/components/global-styles/preview-wrapper.js.map +7 -1
- package/build-module/components/global-styles/root-menu.js +38 -44
- package/build-module/components/global-styles/root-menu.js.map +7 -1
- package/build-module/components/global-styles/screen-background.js +26 -29
- package/build-module/components/global-styles/screen-background.js.map +7 -1
- package/build-module/components/global-styles/screen-block-list.js +105 -105
- package/build-module/components/global-styles/screen-block-list.js.map +7 -1
- package/build-module/components/global-styles/screen-block.js +156 -169
- package/build-module/components/global-styles/screen-block.js.map +7 -1
- package/build-module/components/global-styles/screen-color-palette.js +33 -50
- package/build-module/components/global-styles/screen-color-palette.js.map +7 -1
- package/build-module/components/global-styles/screen-colors.js +35 -33
- package/build-module/components/global-styles/screen-colors.js.map +7 -1
- package/build-module/components/global-styles/screen-css.js +52 -44
- package/build-module/components/global-styles/screen-css.js.map +7 -1
- package/build-module/components/global-styles/screen-layout.js +17 -26
- package/build-module/components/global-styles/screen-layout.js.map +7 -1
- package/build-module/components/global-styles/screen-revisions/index.js +117 -105
- package/build-module/components/global-styles/screen-revisions/index.js.map +7 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +145 -158
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +7 -1
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +74 -75
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +7 -1
- package/build-module/components/global-styles/screen-root.js +74 -77
- package/build-module/components/global-styles/screen-root.js.map +7 -1
- package/build-module/components/global-styles/screen-shadows.js +12 -11
- package/build-module/components/global-styles/screen-shadows.js.map +7 -1
- package/build-module/components/global-styles/screen-style-variations.js +38 -37
- package/build-module/components/global-styles/screen-style-variations.js.map +7 -1
- package/build-module/components/global-styles/screen-typography-element.js +122 -87
- package/build-module/components/global-styles/screen-typography-element.js.map +7 -1
- package/build-module/components/global-styles/screen-typography.js +36 -34
- package/build-module/components/global-styles/screen-typography.js.map +7 -1
- package/build-module/components/global-styles/shadow-utils.js +53 -176
- package/build-module/components/global-styles/shadow-utils.js.map +7 -1
- package/build-module/components/global-styles/shadows-edit-panel.js +426 -344
- package/build-module/components/global-styles/shadows-edit-panel.js.map +7 -1
- package/build-module/components/global-styles/shadows-panel.js +159 -124
- package/build-module/components/global-styles/shadows-panel.js.map +7 -1
- package/build-module/components/global-styles/size-control/index.js +57 -70
- package/build-module/components/global-styles/size-control/index.js.map +7 -1
- package/build-module/components/global-styles/style-variations-container.js +85 -95
- package/build-module/components/global-styles/style-variations-container.js.map +7 -1
- package/build-module/components/global-styles/subtitle.js +16 -16
- package/build-module/components/global-styles/subtitle.js.map +7 -1
- package/build-module/components/global-styles/typeset.js +50 -65
- package/build-module/components/global-styles/typeset.js.map +7 -1
- package/build-module/components/global-styles/typography-elements.js +86 -80
- package/build-module/components/global-styles/typography-elements.js.map +7 -1
- package/build-module/components/global-styles/typography-example.js +45 -57
- package/build-module/components/global-styles/typography-example.js.map +7 -1
- package/build-module/components/global-styles/typography-panel.js +38 -33
- package/build-module/components/global-styles/typography-panel.js.map +7 -1
- package/build-module/components/global-styles/typography-preview.js +55 -48
- package/build-module/components/global-styles/typography-preview.js.map +7 -1
- package/build-module/components/global-styles/ui.js +252 -295
- package/build-module/components/global-styles/ui.js.map +7 -1
- package/build-module/components/global-styles/utils.js +24 -28
- package/build-module/components/global-styles/utils.js.map +7 -1
- package/build-module/components/global-styles/variations/variation.js +59 -65
- package/build-module/components/global-styles/variations/variation.js.map +7 -1
- package/build-module/components/global-styles/variations/variations-color.js +26 -34
- package/build-module/components/global-styles/variations/variations-color.js.map +7 -1
- package/build-module/components/global-styles/variations/variations-panel.js +39 -46
- package/build-module/components/global-styles/variations/variations-panel.js.map +7 -1
- package/build-module/components/global-styles/variations/variations-typography.js +43 -42
- package/build-module/components/global-styles/variations/variations-typography.js.map +7 -1
- package/build-module/components/global-styles-renderer/index.js +16 -27
- package/build-module/components/global-styles-renderer/index.js.map +7 -1
- package/build-module/components/global-styles-sidebar/default-sidebar.js +36 -36
- package/build-module/components/global-styles-sidebar/default-sidebar.js.map +7 -1
- package/build-module/components/global-styles-sidebar/index.js +137 -133
- package/build-module/components/global-styles-sidebar/index.js.map +7 -1
- package/build-module/components/layout/animation.js +31 -69
- package/build-module/components/layout/animation.js.map +7 -1
- package/build-module/components/layout/hooks.js +16 -28
- package/build-module/components/layout/hooks.js.map +7 -1
- package/build-module/components/layout/index.js +199 -183
- package/build-module/components/layout/index.js.map +7 -1
- package/build-module/components/media/index.js +13 -21
- package/build-module/components/media/index.js.map +7 -1
- package/build-module/components/more-menu/index.js +18 -23
- package/build-module/components/more-menu/index.js.map +7 -1
- package/build-module/components/more-menu/site-export.js +41 -38
- package/build-module/components/more-menu/site-export.js.map +7 -1
- package/build-module/components/more-menu/welcome-guide-menu-item.js +12 -17
- package/build-module/components/more-menu/welcome-guide-menu-item.js.map +7 -1
- package/build-module/components/page-patterns/actions.js +52 -0
- package/build-module/components/page-patterns/actions.js.map +7 -0
- package/build-module/components/page-patterns/delete-category-menu-item.js +78 -76
- package/build-module/components/page-patterns/delete-category-menu-item.js.map +7 -1
- package/build-module/components/page-patterns/fields.js +103 -112
- package/build-module/components/page-patterns/fields.js.map +7 -1
- package/build-module/components/page-patterns/index.js +144 -120
- package/build-module/components/page-patterns/index.js.map +7 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js +37 -53
- package/build-module/components/page-patterns/rename-category-menu-item.js.map +7 -1
- package/build-module/components/page-patterns/search-items.js +43 -77
- package/build-module/components/page-patterns/search-items.js.map +7 -1
- package/build-module/components/page-patterns/use-pattern-settings.js +27 -30
- package/build-module/components/page-patterns/use-pattern-settings.js.map +7 -1
- package/build-module/components/page-patterns/use-patterns.js +249 -192
- package/build-module/components/page-patterns/use-patterns.js.map +7 -1
- package/build-module/components/page-patterns/utils.js +5 -2
- package/build-module/components/page-patterns/utils.js.map +7 -1
- package/build-module/components/page-templates/fields.js +132 -147
- package/build-module/components/page-templates/fields.js.map +7 -1
- package/build-module/components/page-templates/hooks.js +44 -55
- package/build-module/components/page-templates/hooks.js.map +7 -1
- package/build-module/components/page-templates/index.js +189 -194
- package/build-module/components/page-templates/index.js.map +7 -1
- package/build-module/components/page-templates/view-utils.js +42 -0
- package/build-module/components/page-templates/view-utils.js.map +7 -0
- package/build-module/components/pagination/index.js +96 -77
- package/build-module/components/pagination/index.js.map +7 -1
- package/build-module/components/plugin-template-setting-panel/index.js +21 -50
- package/build-module/components/plugin-template-setting-panel/index.js.map +7 -1
- package/build-module/components/post-edit/index.js +136 -135
- package/build-module/components/post-edit/index.js.map +7 -1
- package/build-module/components/post-list/index.js +205 -291
- package/build-module/components/post-list/index.js.map +7 -1
- package/build-module/components/post-list/view-utils.js +149 -0
- package/build-module/components/post-list/view-utils.js.map +7 -0
- package/build-module/components/posts-app/index.js +15 -25
- package/build-module/components/posts-app/index.js.map +7 -1
- package/build-module/components/posts-app-routes/index.js +12 -18
- package/build-module/components/posts-app-routes/index.js.map +7 -1
- package/build-module/components/posts-app-routes/post-item.js +22 -29
- package/build-module/components/posts-app-routes/post-item.js.map +7 -1
- package/build-module/components/posts-app-routes/posts.js +59 -70
- package/build-module/components/posts-app-routes/posts.js.map +7 -1
- package/build-module/components/resizable-frame/index.js +169 -211
- package/build-module/components/resizable-frame/index.js.map +7 -1
- package/build-module/components/revisions/index.js +78 -64
- package/build-module/components/revisions/index.js.map +7 -1
- package/build-module/components/routes/use-title.js +25 -28
- package/build-module/components/routes/use-title.js.map +7 -1
- package/build-module/components/save-button/index.js +99 -104
- package/build-module/components/save-button/index.js.map +7 -1
- package/build-module/components/save-hub/index.js +23 -33
- package/build-module/components/save-hub/index.js.map +7 -1
- package/build-module/components/save-keyboard-shortcut/index.js +31 -47
- package/build-module/components/save-keyboard-shortcut/index.js.map +7 -1
- package/build-module/components/save-panel/index.js +125 -124
- package/build-module/components/save-panel/index.js.map +7 -1
- package/build-module/components/sidebar/index.js +47 -65
- package/build-module/components/sidebar/index.js.map +7 -1
- package/build-module/components/sidebar-button/index.js +16 -17
- package/build-module/components/sidebar-button/index.js.map +7 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +41 -50
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +7 -1
- package/build-module/components/sidebar-dataviews/index.js +40 -48
- package/build-module/components/sidebar-dataviews/index.js.map +7 -1
- package/build-module/components/sidebar-global-styles-wrapper/index.js +100 -104
- package/build-module/components/sidebar-global-styles-wrapper/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-item/index.js +56 -57
- package/build-module/components/sidebar-navigation-item/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen/index.js +108 -98
- package/build-module/components/sidebar-navigation-screen/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +36 -48
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js +23 -28
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +61 -73
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +108 -82
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +22 -24
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +92 -84
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +87 -76
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +28 -41
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +67 -60
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +37 -32
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +107 -91
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +14 -14
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +8 -12
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +89 -98
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +113 -117
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +82 -82
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +17 -16
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +108 -99
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +19 -21
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +53 -59
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +27 -27
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +24 -24
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +67 -70
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +20 -21
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js +11 -16
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js.map +7 -1
- package/build-module/components/site-editor-routes/home.js +18 -26
- package/build-module/components/site-editor-routes/home.js.map +7 -1
- package/build-module/components/site-editor-routes/index.js +39 -30
- package/build-module/components/site-editor-routes/index.js.map +7 -1
- package/build-module/components/site-editor-routes/navigation-item.js +23 -43
- package/build-module/components/site-editor-routes/navigation-item.js.map +7 -1
- package/build-module/components/site-editor-routes/navigation.js +23 -43
- package/build-module/components/site-editor-routes/navigation.js.map +7 -1
- package/build-module/components/site-editor-routes/notfound.js +22 -28
- package/build-module/components/site-editor-routes/notfound.js.map +7 -1
- package/build-module/components/site-editor-routes/page-item.js +26 -35
- package/build-module/components/site-editor-routes/page-item.js.map +7 -1
- package/build-module/components/site-editor-routes/pages.js +64 -80
- package/build-module/components/site-editor-routes/pages.js.map +7 -1
- package/build-module/components/site-editor-routes/pattern-item.js +16 -20
- package/build-module/components/site-editor-routes/pattern-item.js.map +7 -1
- package/build-module/components/site-editor-routes/patterns.js +19 -30
- package/build-module/components/site-editor-routes/patterns.js.map +7 -1
- package/build-module/components/site-editor-routes/stylebook.js +28 -37
- package/build-module/components/site-editor-routes/stylebook.js.map +7 -1
- package/build-module/components/site-editor-routes/styles.js +26 -40
- package/build-module/components/site-editor-routes/styles.js.map +7 -1
- package/build-module/components/site-editor-routes/template-item.js +21 -28
- package/build-module/components/site-editor-routes/template-item.js.map +7 -1
- package/build-module/components/site-editor-routes/template-part-item.js +13 -15
- package/build-module/components/site-editor-routes/template-part-item.js.map +7 -1
- package/build-module/components/site-editor-routes/templates.js +37 -38
- package/build-module/components/site-editor-routes/templates.js.map +7 -1
- package/build-module/components/site-editor-routes/utils.js +6 -10
- package/build-module/components/site-editor-routes/utils.js.map +7 -1
- package/build-module/components/site-hub/index.js +204 -215
- package/build-module/components/site-hub/index.js.map +7 -1
- package/build-module/components/site-icon/index.js +33 -43
- package/build-module/components/site-icon/index.js.map +7 -1
- package/build-module/components/style-book/categories.js +41 -48
- package/build-module/components/style-book/categories.js.map +7 -1
- package/build-module/components/style-book/color-examples.js +29 -37
- package/build-module/components/style-book/color-examples.js.map +7 -1
- package/build-module/components/style-book/constants.js +191 -140
- package/build-module/components/style-book/constants.js.map +7 -1
- package/build-module/components/style-book/duotone-examples.js +36 -35
- package/build-module/components/style-book/duotone-examples.js.map +7 -1
- package/build-module/components/style-book/examples.js +114 -116
- package/build-module/components/style-book/examples.js.map +7 -1
- package/build-module/components/style-book/index.js +431 -384
- package/build-module/components/style-book/index.js.map +7 -1
- package/build-module/components/style-book/types.js +1 -2
- package/build-module/components/style-book/types.js.map +7 -1
- package/build-module/components/welcome-guide/editor.js +59 -54
- package/build-module/components/welcome-guide/editor.js.map +7 -1
- package/build-module/components/welcome-guide/image.js +16 -18
- package/build-module/components/welcome-guide/image.js.map +7 -1
- package/build-module/components/welcome-guide/index.js +16 -15
- package/build-module/components/welcome-guide/index.js.map +7 -1
- package/build-module/components/welcome-guide/page.js +59 -48
- package/build-module/components/welcome-guide/page.js.map +7 -1
- package/build-module/components/welcome-guide/styles.js +108 -97
- package/build-module/components/welcome-guide/styles.js.map +7 -1
- package/build-module/components/welcome-guide/template.js +54 -55
- package/build-module/components/welcome-guide/template.js.map +7 -1
- package/build-module/deprecated.js +28 -40
- package/build-module/deprecated.js.map +7 -1
- package/build-module/hooks/commands/use-common-commands.js +89 -108
- package/build-module/hooks/commands/use-common-commands.js.map +7 -1
- package/build-module/hooks/commands/use-set-command-context.js +21 -44
- package/build-module/hooks/commands/use-set-command-context.js.map +7 -1
- package/build-module/hooks/index.js +2 -5
- package/build-module/hooks/index.js.map +7 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +218 -243
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +7 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +56 -105
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +7 -1
- package/build-module/index.js +55 -69
- package/build-module/index.js.map +7 -1
- package/build-module/lock-unlock.js +8 -7
- package/build-module/lock-unlock.js.map +7 -1
- package/build-module/posts.js +38 -54
- package/build-module/posts.js.map +7 -1
- package/build-module/store/actions.js +140 -320
- package/build-module/store/actions.js.map +7 -1
- package/build-module/store/constants.js +5 -7
- package/build-module/store/constants.js.map +7 -1
- package/build-module/store/index.js +15 -18
- package/build-module/store/index.js.map +7 -1
- package/build-module/store/private-actions.js +12 -14
- package/build-module/store/private-actions.js.map +7 -1
- package/build-module/store/private-selectors.js +7 -10
- package/build-module/store/private-selectors.js.map +7 -1
- package/build-module/store/reducer.js +21 -53
- package/build-module/store/reducer.js.map +7 -1
- package/build-module/store/selectors.js +151 -278
- package/build-module/store/selectors.js.map +7 -1
- package/build-module/utils/constants.js +53 -44
- package/build-module/utils/constants.js.map +7 -1
- package/build-module/utils/get-filtered-template-parts.js +18 -37
- package/build-module/utils/get-filtered-template-parts.js.map +7 -1
- package/build-module/utils/is-previewing-theme.js +10 -9
- package/build-module/utils/is-previewing-theme.js.map +7 -1
- package/build-module/utils/is-template-removable.js +6 -13
- package/build-module/utils/is-template-removable.js.map +7 -1
- package/build-module/utils/is-template-revertable.js +6 -15
- package/build-module/utils/is-template-revertable.js.map +7 -1
- package/build-module/utils/set-nested-value.js +7 -22
- package/build-module/utils/set-nested-value.js.map +7 -1
- package/build-module/utils/template-part-create.js +1 -2
- package/build-module/utils/template-part-create.js.map +7 -1
- package/build-module/utils/use-activate-theme.js +21 -40
- package/build-module/utils/use-activate-theme.js.map +7 -1
- package/build-module/utils/use-actual-current-theme.js +13 -17
- package/build-module/utils/use-actual-current-theme.js.map +7 -1
- package/build-style/posts-rtl.css +484 -214
- package/build-style/posts.css +484 -214
- package/build-style/style-rtl.css +629 -271
- package/build-style/style.css +629 -271
- package/package.json +52 -42
- package/src/components/add-new-post/index.js +2 -1
- package/src/components/add-new-template/index.js +7 -4
- package/src/components/add-new-template/style.scss +4 -0
- package/src/components/dataviews-actions/index.js +16 -9
- package/src/components/editor/index.js +1 -1
- package/src/components/editor/style.scss +3 -0
- package/src/components/editor/use-resolve-edited-entity.js +4 -18
- package/src/components/editor-canvas-container/style.scss +4 -1
- package/src/components/global-styles/font-library-modal/style.scss +4 -0
- package/src/components/global-styles/screen-revisions/style.scss +4 -0
- package/src/components/global-styles/style.scss +3 -0
- package/src/components/global-styles/variations/style.scss +3 -0
- package/src/components/global-styles-sidebar/style.scss +3 -0
- package/src/components/layout/index.js +2 -1
- package/src/components/layout/style.scss +5 -0
- package/src/components/page-patterns/actions.js +54 -0
- package/src/components/page-patterns/index.js +79 -32
- package/src/components/page-patterns/style.scss +4 -0
- package/src/components/page-templates/fields.js +22 -1
- package/src/components/page-templates/index.js +71 -104
- package/src/components/page-templates/style.scss +4 -0
- package/src/components/page-templates/view-utils.js +41 -0
- package/src/components/pagination/style.scss +2 -0
- package/src/components/post-edit/index.js +10 -4
- package/src/components/post-edit/style.scss +3 -6
- package/src/components/post-list/index.js +76 -188
- package/src/components/post-list/style.scss +3 -0
- package/src/components/post-list/view-utils.js +155 -0
- package/src/components/posts-app-routes/posts.js +29 -16
- package/src/components/resizable-frame/style.scss +3 -0
- package/src/components/save-hub/style.scss +3 -0
- package/src/components/save-panel/index.js +2 -2
- package/src/components/save-panel/style.scss +2 -0
- package/src/components/sidebar/style.scss +4 -0
- package/src/components/sidebar-button/style.scss +2 -0
- package/src/components/sidebar-dataviews/dataview-item.js +5 -11
- package/src/components/sidebar-dataviews/index.js +17 -17
- package/src/components/sidebar-dataviews/style.scss +2 -16
- package/src/components/sidebar-global-styles-wrapper/index.js +16 -21
- package/src/components/sidebar-global-styles-wrapper/style.scss +4 -30
- package/src/components/sidebar-navigation-item/style.scss +3 -0
- package/src/components/sidebar-navigation-screen/style.scss +5 -0
- package/src/components/sidebar-navigation-screen-main/style.scss +2 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +2 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +3 -0
- package/src/components/sidebar-navigation-screen-patterns/style.scss +3 -0
- package/src/components/sidebar-navigation-screen-templates-browse/style.scss +2 -0
- package/src/components/site-editor-routes/pages.js +29 -16
- package/src/components/site-editor-routes/templates.js +21 -4
- package/src/components/site-hub/style.scss +3 -0
- package/src/components/site-icon/style.scss +3 -0
- package/src/components/style-book/style.scss +3 -0
- package/src/components/welcome-guide/style.scss +2 -0
- package/src/posts.scss +14 -11
- package/src/style.scss +42 -39
- package/tsconfig.json +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/page/header.js +0 -45
- package/build/components/page/header.js.map +0 -1
- package/build/components/page/index.js +0 -50
- package/build/components/page/index.js.map +0 -1
- package/build/components/page-patterns/header.js +0 -96
- package/build/components/page-patterns/header.js.map +0 -1
- package/build/components/sidebar-dataviews/add-new-view.js +0 -137
- package/build/components/sidebar-dataviews/add-new-view.js.map +0 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js +0 -211
- package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +0 -1
- package/build/components/sidebar-dataviews/default-views.js +0 -141
- package/build/components/sidebar-dataviews/default-views.js.map +0 -1
- package/build-module/components/page/header.js +0 -40
- package/build-module/components/page/header.js.map +0 -1
- package/build-module/components/page/index.js +0 -42
- package/build-module/components/page/index.js.map +0 -1
- package/build-module/components/page-patterns/header.js +0 -88
- package/build-module/components/page-patterns/header.js.map +0 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js +0 -129
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +0 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +0 -202
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +0 -1
- package/build-module/components/sidebar-dataviews/default-views.js +0 -133
- package/build-module/components/sidebar-dataviews/default-views.js.map +0 -1
- package/src/components/page/header.js +0 -44
- package/src/components/page/index.js +0 -43
- package/src/components/page/style.scss +0 -56
- package/src/components/page-patterns/header.js +0 -120
- package/src/components/sidebar-dataviews/add-new-view.js +0 -143
- package/src/components/sidebar-dataviews/custom-dataviews-list.js +0 -233
- package/src/components/sidebar-dataviews/default-views.js +0 -168
package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport NavigationMenuContent from '../sidebar-navigation-screen-navigation-menus/navigation-menu-content';\n\nconst noop = () => {};\n\nexport default function NavigationMenuEditor( { navigationMenuId } ) {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst blocks = useMemo( () => {\n\t\tif ( ! navigationMenuId ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [ createBlock( 'core/navigation', { ref: navigationMenuId } ) ];\n\t}, [ navigationMenuId ] );\n\n\tif ( ! navigationMenuId || ! blocks?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tvalue={ blocks }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__content\">\n\t\t\t\t<NavigationMenuContent rootClientId={ blocks[ 0 ].clientId } />\n\t\t\t</div>\n\t\t</BlockEditorProvider>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CI;AA3CJ,qBAAwB;AACxB,kBAA0B;AAC1B,0BAAoC;AACpC,oBAA4B;AAK5B,yBAAuB;AACvB,mBAAuC;AACvC,qCAAkC;AAElC,MAAM,OAAO,MAAM;AAAC;AAEL,SAAR,qBAAuC,EAAE,iBAAiB,GAAI;AACpE,QAAM,EAAE,eAAe,QAAI,uBAAW,CAAE,WAAY;AACnD,UAAM,EAAE,YAAY,QAAI,2BAAQ,OAAQ,aAAAA,KAAc,CAAE;AAExD,WAAO;AAAA,MACN,gBAAgB,YAAY;AAAA,IAC7B;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,QAAM,aAAS,wBAAS,MAAM;AAC7B,QAAK,CAAE,kBAAmB;AACzB,aAAO,CAAC;AAAA,IACT;AAEA,WAAO,KAAE,2BAAa,mBAAmB,EAAE,KAAK,iBAAiB,CAAE,CAAE;AAAA,EACtE,GAAG,CAAE,gBAAiB,CAAE;AAExB,MAAK,CAAE,oBAAoB,CAAE,QAAQ,QAAS;AAC7C,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,UAAW;AAAA,MACX,OAAQ;AAAA,MACR,UAAW;AAAA,MACX,SAAU;AAAA,MAEV,sDAAC,SAAI,WAAU,iEACd,sDAAC,+BAAAC,SAAA,EAAsB,cAAe,OAAQ,CAAE,EAAE,UAAW,GAC9D;AAAA;AAAA,EACD;AAEF;",
|
|
6
|
+
"names": ["editSiteStore", "NavigationMenuContent"]
|
|
7
|
+
}
|
|
@@ -1,72 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var rename_modal_exports = {};
|
|
20
|
+
__export(rename_modal_exports, {
|
|
21
|
+
default: () => RenameModal
|
|
5
22
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const notEmptyString = testString => testString?.trim()?.length > 0;
|
|
16
|
-
function RenameModal({
|
|
17
|
-
menuTitle,
|
|
18
|
-
onClose,
|
|
19
|
-
onSave
|
|
20
|
-
}) {
|
|
21
|
-
const [editedMenuTitle, setEditedMenuTitle] = (0, _element.useState)(menuTitle);
|
|
23
|
+
module.exports = __toCommonJS(rename_modal_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_components = require("@wordpress/components");
|
|
26
|
+
var import_i18n = require("@wordpress/i18n");
|
|
27
|
+
var import_element = require("@wordpress/element");
|
|
28
|
+
const notEmptyString = (testString) => testString?.trim()?.length > 0;
|
|
29
|
+
function RenameModal({ menuTitle, onClose, onSave }) {
|
|
30
|
+
const [editedMenuTitle, setEditedMenuTitle] = (0, import_element.useState)(menuTitle);
|
|
22
31
|
const titleHasChanged = editedMenuTitle !== menuTitle;
|
|
23
32
|
const isEditedMenuTitleValid = titleHasChanged && notEmptyString(editedMenuTitle);
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
children:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
value: editedMenuTitle,
|
|
37
|
-
placeholder: (0, _i18n.__)('Navigation title'),
|
|
38
|
-
onChange: setEditedMenuTitle,
|
|
39
|
-
label: (0, _i18n.__)('Name')
|
|
40
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
|
|
41
|
-
justify: "right",
|
|
42
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
33
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
34
|
+
import_components.Modal,
|
|
35
|
+
{
|
|
36
|
+
title: (0, import_i18n.__)("Rename"),
|
|
37
|
+
onRequestClose: onClose,
|
|
38
|
+
focusOnMount: "firstContentElement",
|
|
39
|
+
size: "small",
|
|
40
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("form", { className: "sidebar-navigation__rename-modal-form", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { spacing: "3", children: [
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
+
import_components.TextControl,
|
|
43
|
+
{
|
|
44
|
+
__nextHasNoMarginBottom: true,
|
|
43
45
|
__next40pxDefaultSize: true,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
46
|
+
value: editedMenuTitle,
|
|
47
|
+
placeholder: (0, import_i18n.__)("Navigation title"),
|
|
48
|
+
onChange: setEditedMenuTitle,
|
|
49
|
+
label: (0, import_i18n.__)("Name")
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalHStack, { justify: "right", children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
import_components.Button,
|
|
55
|
+
{
|
|
56
|
+
__next40pxDefaultSize: true,
|
|
57
|
+
variant: "tertiary",
|
|
58
|
+
onClick: onClose,
|
|
59
|
+
children: (0, import_i18n.__)("Cancel")
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
import_components.Button,
|
|
64
|
+
{
|
|
65
|
+
__next40pxDefaultSize: true,
|
|
66
|
+
accessibleWhenDisabled: true,
|
|
67
|
+
disabled: !isEditedMenuTitleValid,
|
|
68
|
+
variant: "primary",
|
|
69
|
+
type: "submit",
|
|
70
|
+
onClick: (e) => {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
if (!isEditedMenuTitleValid) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
onSave({ title: editedMenuTitle });
|
|
76
|
+
onClose();
|
|
77
|
+
},
|
|
78
|
+
children: (0, import_i18n.__)("Save")
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] })
|
|
82
|
+
] }) })
|
|
83
|
+
}
|
|
84
|
+
);
|
|
71
85
|
}
|
|
72
|
-
//# sourceMappingURL=rename-modal.js.map
|
|
86
|
+
//# sourceMappingURL=rename-modal.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tTextControl,\n\tModal,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\nconst notEmptyString = ( testString ) => testString?.trim()?.length > 0;\n\nexport default function RenameModal( { menuTitle, onClose, onSave } ) {\n\tconst [ editedMenuTitle, setEditedMenuTitle ] = useState( menuTitle );\n\n\tconst titleHasChanged = editedMenuTitle !== menuTitle;\n\n\tconst isEditedMenuTitleValid =\n\t\ttitleHasChanged && notEmptyString( editedMenuTitle );\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Rename' ) }\n\t\t\tonRequestClose={ onClose }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"small\"\n\t\t>\n\t\t\t<form className=\"sidebar-navigation__rename-modal-form\">\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvalue={ editedMenuTitle }\n\t\t\t\t\t\tplaceholder={ __( 'Navigation title' ) }\n\t\t\t\t\t\tonChange={ setEditedMenuTitle }\n\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tdisabled={ ! isEditedMenuTitleValid }\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tonClick={ ( e ) => {\n\t\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\t\tif ( ! isEditedMenuTitleValid ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSave( { title: editedMenuTitle } );\n\n\t\t\t\t\t\t\t\t// Immediate close avoids ability to hit save multiple times.\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCK;AA7BL,wBAMO;AACP,kBAAmB;AACnB,qBAAyB;AAEzB,MAAM,iBAAiB,CAAE,eAAgB,YAAY,KAAK,GAAG,SAAS;AAEvD,SAAR,YAA8B,EAAE,WAAW,SAAS,OAAO,GAAI;AACrE,QAAM,CAAE,iBAAiB,kBAAmB,QAAI,yBAAU,SAAU;AAEpE,QAAM,kBAAkB,oBAAoB;AAE5C,QAAM,yBACL,mBAAmB,eAAgB,eAAgB;AAEpD,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAQ,gBAAI,QAAS;AAAA,MACrB,gBAAiB;AAAA,MACjB,cAAa;AAAA,MACb,MAAK;AAAA,MAEL,sDAAC,UAAK,WAAU,yCACf,uDAAC,kBAAAA,sBAAA,EAAO,SAAQ,KACf;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,yBAAuB;AAAA,YACvB,uBAAqB;AAAA,YACrB,OAAQ;AAAA,YACR,iBAAc,gBAAI,kBAAmB;AAAA,YACrC,UAAW;AAAA,YACX,WAAQ,gBAAI,MAAO;AAAA;AAAA,QACpB;AAAA,QACA,6CAAC,kBAAAC,sBAAA,EAAO,SAAQ,SACf;AAAA;AAAA,YAAC;AAAA;AAAA,cACA,uBAAqB;AAAA,cACrB,SAAQ;AAAA,cACR,SAAU;AAAA,cAER,8BAAI,QAAS;AAAA;AAAA,UAChB;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACA,uBAAqB;AAAA,cACrB,wBAAsB;AAAA,cACtB,UAAW,CAAE;AAAA,cACb,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,SAAU,CAAE,MAAO;AAClB,kBAAE,eAAe;AAEjB,oBAAK,CAAE,wBAAyB;AAC/B;AAAA,gBACD;AACA,uBAAQ,EAAE,OAAO,gBAAgB,CAAE;AAGnC,wBAAQ;AAAA,cACT;AAAA,cAEE,8BAAI,MAAO;AAAA;AAAA,UACd;AAAA,WACD;AAAA,SACD,GACD;AAAA;AAAA,EACD;AAEF;",
|
|
6
|
+
"names": ["VStack", "HStack"]
|
|
7
|
+
}
|
package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js
CHANGED
|
@@ -1,25 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
Object.
|
|
5
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var single_navigation_menu_exports = {};
|
|
30
|
+
__export(single_navigation_menu_exports, {
|
|
31
|
+
default: () => SingleNavigationMenu
|
|
6
32
|
});
|
|
7
|
-
exports
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
/**
|
|
16
|
-
* WordPress dependencies
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Internal dependencies
|
|
21
|
-
*/
|
|
22
|
-
|
|
33
|
+
module.exports = __toCommonJS(single_navigation_menu_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_i18n = require("@wordpress/i18n");
|
|
36
|
+
var import_html_entities = require("@wordpress/html-entities");
|
|
37
|
+
var import_sidebar_navigation_screen_navigation_menus = require("../sidebar-navigation-screen-navigation-menus");
|
|
38
|
+
var import_more_menu = __toESM(require("./more-menu"));
|
|
39
|
+
var import_navigation_menu_editor = __toESM(require("./navigation-menu-editor"));
|
|
40
|
+
var import_build_navigation_label = __toESM(require("../sidebar-navigation-screen-navigation-menus/build-navigation-label"));
|
|
23
41
|
function SingleNavigationMenu({
|
|
24
42
|
navigationMenu,
|
|
25
43
|
backPath,
|
|
@@ -28,22 +46,30 @@ function SingleNavigationMenu({
|
|
|
28
46
|
handleSave
|
|
29
47
|
}) {
|
|
30
48
|
const menuTitle = navigationMenu?.title?.rendered;
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
+
import_sidebar_navigation_screen_navigation_menus.SidebarNavigationScreenWrapper,
|
|
51
|
+
{
|
|
52
|
+
actions: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
+
import_more_menu.default,
|
|
54
|
+
{
|
|
55
|
+
menuId: navigationMenu?.id,
|
|
56
|
+
menuTitle: (0, import_html_entities.decodeEntities)(menuTitle),
|
|
57
|
+
onDelete: handleDelete,
|
|
58
|
+
onSave: handleSave,
|
|
59
|
+
onDuplicate: handleDuplicate
|
|
60
|
+
}
|
|
61
|
+
) }),
|
|
62
|
+
backPath,
|
|
63
|
+
title: (0, import_build_navigation_label.default)(
|
|
64
|
+
navigationMenu?.title,
|
|
65
|
+
navigationMenu?.id,
|
|
66
|
+
navigationMenu?.status
|
|
67
|
+
),
|
|
68
|
+
description: (0, import_i18n.__)(
|
|
69
|
+
"Navigation Menus are a curated collection of blocks that allow visitors to get around your site."
|
|
70
|
+
),
|
|
71
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_navigation_menu_editor.default, { navigationMenuId: navigationMenu?.id })
|
|
72
|
+
}
|
|
73
|
+
);
|
|
48
74
|
}
|
|
49
|
-
//# sourceMappingURL=single-navigation-menu.js.map
|
|
75
|
+
//# sourceMappingURL=single-navigation-menu.js.map
|
package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport NavigationMenuEditor from './navigation-menu-editor';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\n\nexport default function SingleNavigationMenu( {\n\tnavigationMenu,\n\tbackPath,\n\thandleDelete,\n\thandleDuplicate,\n\thandleSave,\n} ) {\n\tconst menuTitle = navigationMenu?.title?.rendered;\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuId={ navigationMenu?.id }\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ handleDelete }\n\t\t\t\t\t\tonSave={ handleSave }\n\t\t\t\t\t\tonDuplicate={ handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tbackPath={ backPath }\n\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\tnavigationMenu?.title,\n\t\t\t\tnavigationMenu?.id,\n\t\t\t\tnavigationMenu?.status\n\t\t\t) }\n\t\t\tdescription={ __(\n\t\t\t\t'Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t) }\n\t\t>\n\t\t\t<NavigationMenuEditor navigationMenuId={ navigationMenu?.id } />\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBI;AAtBJ,kBAAmB;AACnB,2BAA+B;AAI/B,wDAA+C;AAC/C,uBAAqC;AACrC,oCAAiC;AACjC,oCAAiC;AAElB,SAAR,qBAAuC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,YAAY,gBAAgB,OAAO;AAEzC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SACC,2EACC;AAAA,QAAC,iBAAAA;AAAA,QAAA;AAAA,UACA,QAAS,gBAAgB;AAAA,UACzB,eAAY,qCAAgB,SAAU;AAAA,UACtC,UAAW;AAAA,UACX,QAAS;AAAA,UACT,aAAc;AAAA;AAAA,MACf,GACD;AAAA,MAED;AAAA,MACA,WAAQ,8BAAAC;AAAA,QACP,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,MACjB;AAAA,MACA,iBAAc;AAAA,QACb;AAAA,MACD;AAAA,MAEA,sDAAC,8BAAAC,SAAA,EAAqB,kBAAmB,gBAAgB,IAAK;AAAA;AAAA,EAC/D;AAEF;",
|
|
6
|
+
"names": ["ScreenNavigationMoreMenu", "buildNavigationLabel", "NavigationMenuEditor"]
|
|
7
|
+
}
|
package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js
CHANGED
|
@@ -1,65 +1,78 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var use_navigation_menu_handlers_exports = {};
|
|
20
|
+
__export(use_navigation_menu_handlers_exports, {
|
|
21
|
+
default: () => useNavigationMenuHandlers
|
|
5
22
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
* WordPress dependencies
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Internal dependencies
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
const {
|
|
24
|
-
useHistory
|
|
25
|
-
} = (0, _lockUnlock.unlock)(_router.privateApis);
|
|
23
|
+
module.exports = __toCommonJS(use_navigation_menu_handlers_exports);
|
|
24
|
+
var import_core_data = require("@wordpress/core-data");
|
|
25
|
+
var import_i18n = require("@wordpress/i18n");
|
|
26
|
+
var import_data = require("@wordpress/data");
|
|
27
|
+
var import_notices = require("@wordpress/notices");
|
|
28
|
+
var import_router = require("@wordpress/router");
|
|
29
|
+
var import__ = require(".");
|
|
30
|
+
var import_constants = require("../../utils/constants");
|
|
31
|
+
var import_lock_unlock = require("../../lock-unlock");
|
|
32
|
+
const { useHistory } = (0, import_lock_unlock.unlock)(import_router.privateApis);
|
|
26
33
|
function useDeleteNavigationMenu() {
|
|
27
|
-
const {
|
|
28
|
-
|
|
29
|
-
} = (0, _data.useDispatch)(_coreData.store);
|
|
30
|
-
const {
|
|
31
|
-
createSuccessNotice,
|
|
32
|
-
createErrorNotice
|
|
33
|
-
} = (0, _data.useDispatch)(_notices.store);
|
|
34
|
+
const { deleteEntityRecord } = (0, import_data.useDispatch)(import_core_data.store);
|
|
35
|
+
const { createSuccessNotice, createErrorNotice } = (0, import_data.useDispatch)(import_notices.store);
|
|
34
36
|
const history = useHistory();
|
|
35
|
-
const handleDelete = async navigationMenu => {
|
|
37
|
+
const handleDelete = async (navigationMenu) => {
|
|
36
38
|
const postId = navigationMenu?.id;
|
|
37
39
|
try {
|
|
38
|
-
await deleteEntityRecord(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
await deleteEntityRecord(
|
|
41
|
+
"postType",
|
|
42
|
+
import__.postType,
|
|
43
|
+
postId,
|
|
44
|
+
{
|
|
45
|
+
force: true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
throwOnError: true
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
createSuccessNotice(
|
|
52
|
+
(0, import_i18n.__)("Navigation Menu successfully deleted."),
|
|
53
|
+
{
|
|
54
|
+
type: "snackbar"
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
history.navigate("/navigation");
|
|
47
58
|
} catch (error) {
|
|
48
|
-
createErrorNotice(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
59
|
+
createErrorNotice(
|
|
60
|
+
(0, import_i18n.sprintf)(
|
|
61
|
+
/* translators: %s: error message describing why the navigation menu could not be deleted. */
|
|
62
|
+
(0, import_i18n.__)(`Unable to delete Navigation Menu (%s).`),
|
|
63
|
+
error?.message
|
|
64
|
+
),
|
|
65
|
+
{
|
|
66
|
+
type: "snackbar"
|
|
67
|
+
}
|
|
68
|
+
);
|
|
52
69
|
}
|
|
53
70
|
};
|
|
54
71
|
return handleDelete;
|
|
55
72
|
}
|
|
56
73
|
function useSaveNavigationMenu() {
|
|
57
|
-
const {
|
|
58
|
-
getEditedEntityRecord
|
|
59
|
-
} = (0, _data.useSelect)(select => {
|
|
60
|
-
const {
|
|
61
|
-
getEditedEntityRecord: getEditedEntityRecordSelector
|
|
62
|
-
} = select(_coreData.store);
|
|
74
|
+
const { getEditedEntityRecord } = (0, import_data.useSelect)((select) => {
|
|
75
|
+
const { getEditedEntityRecord: getEditedEntityRecordSelector } = select(import_core_data.store);
|
|
63
76
|
return {
|
|
64
77
|
getEditedEntityRecord: getEditedEntityRecordSelector
|
|
65
78
|
};
|
|
@@ -67,73 +80,89 @@ function useSaveNavigationMenu() {
|
|
|
67
80
|
const {
|
|
68
81
|
editEntityRecord,
|
|
69
82
|
__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits
|
|
70
|
-
} = (0,
|
|
71
|
-
const {
|
|
72
|
-
createSuccessNotice,
|
|
73
|
-
createErrorNotice
|
|
74
|
-
} = (0, _data.useDispatch)(_notices.store);
|
|
83
|
+
} = (0, import_data.useDispatch)(import_core_data.store);
|
|
84
|
+
const { createSuccessNotice, createErrorNotice } = (0, import_data.useDispatch)(import_notices.store);
|
|
75
85
|
const handleSave = async (navigationMenu, edits) => {
|
|
76
86
|
if (!edits) {
|
|
77
87
|
return;
|
|
78
88
|
}
|
|
79
89
|
const postId = navigationMenu?.id;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
const originalRecord = getEditedEntityRecord(
|
|
91
|
+
"postType",
|
|
92
|
+
import_constants.NAVIGATION_POST_TYPE,
|
|
93
|
+
postId
|
|
94
|
+
);
|
|
95
|
+
editEntityRecord("postType", import__.postType, postId, edits);
|
|
85
96
|
const recordPropertiesToSave = Object.keys(edits);
|
|
86
|
-
|
|
87
|
-
// Attempt to persist.
|
|
88
97
|
try {
|
|
89
|
-
await saveSpecifiedEntityEdits(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
await saveSpecifiedEntityEdits(
|
|
99
|
+
"postType",
|
|
100
|
+
import__.postType,
|
|
101
|
+
postId,
|
|
102
|
+
recordPropertiesToSave,
|
|
103
|
+
{
|
|
104
|
+
throwOnError: true
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
createSuccessNotice((0, import_i18n.__)("Renamed Navigation Menu"), {
|
|
108
|
+
type: "snackbar"
|
|
94
109
|
});
|
|
95
110
|
} catch (error) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
111
|
+
editEntityRecord("postType", import__.postType, postId, originalRecord);
|
|
112
|
+
createErrorNotice(
|
|
113
|
+
(0, import_i18n.sprintf)(
|
|
114
|
+
/* translators: %s: error message describing why the navigation menu could not be renamed. */
|
|
115
|
+
(0, import_i18n.__)(`Unable to rename Navigation Menu (%s).`),
|
|
116
|
+
error?.message
|
|
117
|
+
),
|
|
118
|
+
{
|
|
119
|
+
type: "snackbar"
|
|
120
|
+
}
|
|
121
|
+
);
|
|
102
122
|
}
|
|
103
123
|
};
|
|
104
124
|
return handleSave;
|
|
105
125
|
}
|
|
106
126
|
function useDuplicateNavigationMenu() {
|
|
107
127
|
const history = useHistory();
|
|
108
|
-
const {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const {
|
|
112
|
-
createSuccessNotice,
|
|
113
|
-
createErrorNotice
|
|
114
|
-
} = (0, _data.useDispatch)(_notices.store);
|
|
115
|
-
const handleDuplicate = async navigationMenu => {
|
|
128
|
+
const { saveEntityRecord } = (0, import_data.useDispatch)(import_core_data.store);
|
|
129
|
+
const { createSuccessNotice, createErrorNotice } = (0, import_data.useDispatch)(import_notices.store);
|
|
130
|
+
const handleDuplicate = async (navigationMenu) => {
|
|
116
131
|
const menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;
|
|
117
132
|
try {
|
|
118
|
-
const savedRecord = await saveEntityRecord(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
133
|
+
const savedRecord = await saveEntityRecord(
|
|
134
|
+
"postType",
|
|
135
|
+
import__.postType,
|
|
136
|
+
{
|
|
137
|
+
title: (0, import_i18n.sprintf)(
|
|
138
|
+
/* translators: %s: Navigation menu title */
|
|
139
|
+
(0, import_i18n._x)("%s (Copy)", "navigation menu"),
|
|
140
|
+
menuTitle
|
|
141
|
+
),
|
|
142
|
+
content: navigationMenu?.content?.raw,
|
|
143
|
+
status: "publish"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
throwOnError: true
|
|
147
|
+
}
|
|
148
|
+
);
|
|
126
149
|
if (savedRecord) {
|
|
127
|
-
createSuccessNotice((0,
|
|
128
|
-
type:
|
|
150
|
+
createSuccessNotice((0, import_i18n.__)("Duplicated Navigation Menu"), {
|
|
151
|
+
type: "snackbar"
|
|
129
152
|
});
|
|
130
153
|
history.navigate(`/wp_navigation/${savedRecord.id}`);
|
|
131
154
|
}
|
|
132
155
|
} catch (error) {
|
|
133
|
-
createErrorNotice(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
156
|
+
createErrorNotice(
|
|
157
|
+
(0, import_i18n.sprintf)(
|
|
158
|
+
/* translators: %s: error message describing why the navigation menu could not be deleted. */
|
|
159
|
+
(0, import_i18n.__)(`Unable to duplicate Navigation Menu (%s).`),
|
|
160
|
+
error?.message
|
|
161
|
+
),
|
|
162
|
+
{
|
|
163
|
+
type: "snackbar"
|
|
164
|
+
}
|
|
165
|
+
);
|
|
137
166
|
}
|
|
138
167
|
};
|
|
139
168
|
return handleDuplicate;
|
|
@@ -145,4 +174,4 @@ function useNavigationMenuHandlers() {
|
|
|
145
174
|
handleDuplicate: useDuplicateNavigationMenu()
|
|
146
175
|
};
|
|
147
176
|
}
|
|
148
|
-
//# sourceMappingURL=use-navigation-menu-handlers.js.map
|
|
177
|
+
//# sourceMappingURL=use-navigation-menu-handlers.js.map
|