@wordpress/block-library 7.19.0 → 8.1.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 +8 -0
- package/build/audio/edit.native.js +1 -3
- package/build/audio/edit.native.js.map +1 -1
- package/build/audio/index.js +2 -1
- package/build/audio/index.js.map +1 -1
- package/build/avatar/edit.js +1 -0
- package/build/avatar/edit.js.map +1 -1
- package/build/avatar/user-control.js +1 -0
- package/build/avatar/user-control.js.map +1 -1
- package/build/block/edit.js +14 -2
- package/build/block/edit.js.map +1 -1
- package/build/block/edit.native.js +14 -6
- package/build/block/edit.native.js.map +1 -1
- package/build/block/index.js +1 -2
- package/build/block/index.js.map +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/categories/edit.js +1 -1
- package/build/categories/edit.js.map +1 -1
- package/build/code/transforms.js +1 -1
- package/build/code/transforms.js.map +1 -1
- package/build/columns/edit.js +1 -0
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +13 -30
- package/build/columns/edit.native.js.map +1 -1
- package/build/comment-author-avatar/edit.js +1 -0
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +3 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/edit.native.js +24 -16
- package/build/cover/edit.native.js.map +1 -1
- package/build/embed/embed-controls.native.js +1 -0
- package/build/embed/embed-controls.native.js.map +1 -1
- package/build/embed/embed-preview.native.js +1 -3
- package/build/embed/embed-preview.native.js.map +1 -1
- package/build/file/inspector.js +1 -0
- package/build/file/inspector.js.map +1 -1
- package/build/freeform/edit.js +21 -6
- package/build/freeform/edit.js.map +1 -1
- package/build/freeform/modal.js +97 -0
- package/build/freeform/modal.js.map +1 -0
- package/build/gallery/edit.js +38 -15
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +2 -16
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/gallery.native.js +1 -3
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/shared.js +4 -10
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/transforms.js +1 -7
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/use-get-media.js +1 -1
- package/build/gallery/use-get-media.js.map +1 -1
- package/build/gallery/use-get-media.native.js +3 -1
- package/build/gallery/use-get-media.native.js.map +1 -1
- package/build/gallery/v1/edit.js +22 -15
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/gallery/v1/gallery.native.js +1 -3
- package/build/gallery/v1/gallery.native.js.map +1 -1
- package/build/gallery/v1/shared.js +4 -1
- package/build/gallery/v1/shared.js.map +1 -1
- package/build/group/edit.js +1 -2
- package/build/group/edit.js.map +1 -1
- package/build/group/index.js +3 -1
- package/build/group/index.js.map +1 -1
- package/build/group/placeholder.js +5 -26
- package/build/group/placeholder.js.map +1 -1
- package/build/heading/deprecated.js +152 -69
- package/build/heading/deprecated.js.map +1 -1
- package/build/heading/index.js +1 -2
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +1 -2
- package/build/heading/transforms.js.map +1 -1
- package/build/html/index.js +1 -1
- package/build/image/edit.js +8 -5
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +3 -2
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +13 -8
- package/build/image/image.js.map +1 -1
- package/build/index.js +3 -1
- package/build/index.js.map +1 -1
- package/build/latest-comments/edit.js +1 -0
- package/build/latest-comments/edit.js.map +1 -1
- package/build/latest-posts/edit.js +2 -0
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/transforms.js +1 -9
- package/build/list/transforms.js.map +1 -1
- package/build/list/utils.js +5 -2
- package/build/list/utils.js.map +1 -1
- package/build/list-item/index.js +4 -1
- package/build/list-item/index.js.map +1 -1
- package/build/list-item/transforms.js +22 -0
- package/build/list-item/transforms.js.map +1 -0
- package/build/list-item/utils.js +77 -1
- package/build/list-item/utils.js.map +1 -1
- package/build/media-text/edit.js +5 -2
- package/build/media-text/edit.js.map +1 -1
- package/build/missing/edit.native.js +2 -2
- package/build/missing/edit.native.js.map +1 -1
- package/build/navigation/edit/are-blocks-dirty.js +52 -0
- package/build/navigation/edit/are-blocks-dirty.js.map +1 -0
- package/build/navigation/edit/index.js +95 -117
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +94 -0
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -0
- package/build/navigation/edit/navigation-menu-selector.js +2 -4
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +11 -7
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/edit/utils.js +81 -0
- package/build/navigation/edit/utils.js.map +1 -1
- package/build/navigation/view-modal.js +6 -2
- package/build/navigation/view-modal.js.map +1 -1
- package/build/navigation-link/edit.js +46 -356
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/link-ui.js +222 -0
- package/build/navigation-link/link-ui.js.map +1 -0
- package/build/navigation-link/transforms.js +12 -0
- package/build/navigation-link/transforms.js.map +1 -1
- package/build/navigation-link/update-attributes.js +108 -0
- package/build/navigation-link/update-attributes.js.map +1 -0
- package/build/navigation-submenu/edit.js +49 -245
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/constants.js +15 -0
- package/build/page-list/constants.js.map +1 -0
- package/build/page-list/convert-to-links-modal.js +22 -86
- package/build/page-list/convert-to-links-modal.js.map +1 -1
- package/build/page-list/convert-to-navigation-links.js +76 -0
- package/build/page-list/convert-to-navigation-links.js.map +1 -0
- package/build/page-list/edit.js +143 -78
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +35 -3
- package/build/page-list/index.js.map +1 -1
- package/build/page-list-item/edit.js +91 -0
- package/build/page-list-item/edit.js.map +1 -0
- package/build/page-list-item/index.js +85 -0
- package/build/page-list-item/index.js.map +1 -0
- package/build/page-list-item/init.js +16 -0
- package/build/page-list-item/init.js.map +1 -0
- package/build/paragraph/index.js +1 -7
- package/build/paragraph/index.js.map +1 -1
- package/build/post-author/edit.js +3 -2
- package/build/post-author/edit.js.map +1 -1
- package/build/post-featured-image/overlay.js +1 -1
- package/build/post-featured-image/overlay.js.map +1 -1
- package/build/post-template/index.js +8 -0
- package/build/post-template/index.js.map +1 -1
- package/build/preformatted/transforms.js +3 -1
- package/build/preformatted/transforms.js.map +1 -1
- package/build/query/deprecated.js +192 -21
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/index.js +2 -1
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +11 -5
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +101 -37
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/query-content.js +2 -3
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +16 -27
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/index.js +0 -8
- package/build/query/index.js.map +1 -1
- package/build/query/utils.js +73 -9
- package/build/query/utils.js.map +1 -1
- package/build/rss/edit.js +3 -0
- package/build/rss/edit.js.map +1 -1
- package/build/search/edit.js +2 -2
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +22 -22
- package/build/search/edit.native.js.map +1 -1
- package/build/search/index.js +9 -1
- package/build/search/index.js.map +1 -1
- package/build/site-logo/edit.js +17 -9
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +1 -0
- package/build/site-logo/index.js.map +1 -1
- package/build/site-title/index.js +1 -0
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/social-list.js +4 -12
- package/build/social-link/social-list.js.map +1 -1
- package/build/social-links/edit.js +0 -1
- package/build/social-links/edit.js.map +1 -1
- package/build/table/edit.js +3 -1
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +17 -1
- package/build/table/index.js.map +1 -1
- package/build/table/save.js +4 -2
- package/build/table/save.js.map +1 -1
- package/build/table/state.js +24 -12
- package/build/table/state.js.map +1 -1
- package/build/table/transforms.js +3 -2
- package/build/table/transforms.js.map +1 -1
- package/build/table-of-contents/edit.js +3 -3
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/tag-cloud/edit.js +2 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +11 -1
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/import-controls.js +160 -0
- package/build/template-part/edit/import-controls.js.map +1 -0
- package/build/template-part/edit/index.js +2 -1
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +5 -2
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/utils/hooks.js +2 -6
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build/template-part/edit/utils/transformers.js +48 -0
- package/build/template-part/edit/utils/transformers.js.map +1 -0
- package/build/text-columns/edit.js +1 -0
- package/build/text-columns/edit.js.map +1 -1
- package/build/utils/transformation-categories.native.js +1 -1
- package/build/utils/transformation-categories.native.js.map +1 -1
- package/build/video/edit.js +1 -1
- package/build/video/edit.js.map +1 -1
- package/build/video/edit.native.js +1 -3
- package/build/video/edit.native.js.map +1 -1
- package/build-module/audio/edit.native.js +1 -2
- package/build-module/audio/edit.native.js.map +1 -1
- package/build-module/audio/index.js +2 -1
- package/build-module/audio/index.js.map +1 -1
- package/build-module/avatar/edit.js +1 -0
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/avatar/user-control.js +1 -0
- package/build-module/avatar/user-control.js.map +1 -1
- package/build-module/block/edit.js +14 -2
- package/build-module/block/edit.js.map +1 -1
- package/build-module/block/edit.native.js +14 -6
- package/build-module/block/edit.native.js.map +1 -1
- package/build-module/block/index.js +1 -2
- package/build-module/block/index.js.map +1 -1
- package/build-module/button/edit.native.js +2 -1
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/categories/edit.js +1 -1
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/code/transforms.js +1 -1
- package/build-module/code/transforms.js.map +1 -1
- package/build-module/columns/edit.js +1 -0
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +13 -29
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +1 -0
- package/build-module/comment-author-avatar/edit.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +5 -3
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/edit.native.js +22 -14
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/embed/embed-controls.native.js +2 -1
- package/build-module/embed/embed-controls.native.js.map +1 -1
- package/build-module/embed/embed-preview.native.js +1 -2
- package/build-module/embed/embed-preview.native.js.map +1 -1
- package/build-module/file/inspector.js +1 -0
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/freeform/edit.js +22 -8
- package/build-module/freeform/edit.js.map +1 -1
- package/build-module/freeform/modal.js +90 -0
- package/build-module/freeform/modal.js.map +1 -0
- package/build-module/gallery/edit.js +39 -15
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +3 -16
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/gallery.native.js +1 -2
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/shared.js +5 -11
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/transforms.js +1 -6
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/use-get-media.js +1 -1
- package/build-module/gallery/use-get-media.js.map +1 -1
- package/build-module/gallery/use-get-media.native.js +3 -1
- package/build-module/gallery/use-get-media.native.js.map +1 -1
- package/build-module/gallery/v1/edit.js +23 -16
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/gallery/v1/gallery.native.js +1 -2
- package/build-module/gallery/v1/gallery.native.js.map +1 -1
- package/build-module/gallery/v1/shared.js +5 -2
- package/build-module/gallery/v1/shared.js.map +1 -1
- package/build-module/group/edit.js +1 -3
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/index.js +3 -1
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/placeholder.js +5 -26
- package/build-module/group/placeholder.js.map +1 -1
- package/build-module/heading/deprecated.js +152 -69
- package/build-module/heading/deprecated.js.map +1 -1
- package/build-module/heading/index.js +1 -2
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +1 -2
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/html/index.js +1 -1
- package/build-module/image/edit.js +9 -6
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +2 -1
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +14 -9
- package/build-module/image/image.js.map +1 -1
- package/build-module/index.js +2 -1
- package/build-module/index.js.map +1 -1
- package/build-module/latest-comments/edit.js +1 -0
- package/build-module/latest-comments/edit.js.map +1 -1
- package/build-module/latest-posts/edit.js +2 -0
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/transforms.js +1 -9
- package/build-module/list/transforms.js.map +1 -1
- package/build-module/list/utils.js +5 -2
- package/build-module/list/utils.js.map +1 -1
- package/build-module/list-item/index.js +3 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/list-item/transforms.js +13 -0
- package/build-module/list-item/transforms.js.map +1 -0
- package/build-module/list-item/utils.js +78 -1
- package/build-module/list-item/utils.js.map +1 -1
- package/build-module/media-text/edit.js +6 -3
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/missing/edit.native.js +2 -2
- package/build-module/missing/edit.native.js.map +1 -1
- package/build-module/navigation/edit/are-blocks-dirty.js +44 -0
- package/build-module/navigation/edit/are-blocks-dirty.js.map +1 -0
- package/build-module/navigation/edit/index.js +95 -118
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +80 -0
- package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-selector.js +2 -4
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +9 -6
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/utils.js +75 -0
- package/build-module/navigation/edit/utils.js.map +1 -1
- package/build-module/navigation/view-modal.js +6 -2
- package/build-module/navigation/view-modal.js.map +1 -1
- package/build-module/navigation-link/edit.js +49 -357
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/link-ui.js +206 -0
- package/build-module/navigation-link/link-ui.js.map +1 -0
- package/build-module/navigation-link/transforms.js +12 -0
- package/build-module/navigation-link/transforms.js.map +1 -1
- package/build-module/navigation-link/update-attributes.js +97 -0
- package/build-module/navigation-link/update-attributes.js.map +1 -0
- package/build-module/navigation-submenu/edit.js +52 -246
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/constants.js +6 -0
- package/build-module/page-list/constants.js.map +1 -0
- package/build-module/page-list/convert-to-links-modal.js +20 -81
- package/build-module/page-list/convert-to-links-modal.js.map +1 -1
- package/build-module/page-list/convert-to-navigation-links.js +66 -0
- package/build-module/page-list/convert-to-navigation-links.js.map +1 -0
- package/build-module/page-list/edit.js +146 -82
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +36 -4
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/page-list-item/edit.js +77 -0
- package/build-module/page-list-item/edit.js.map +1 -0
- package/build-module/page-list-item/index.js +68 -0
- package/build-module/page-list-item/index.js.map +1 -0
- package/build-module/page-list-item/init.js +6 -0
- package/build-module/page-list-item/init.js.map +1 -0
- package/build-module/paragraph/index.js +1 -7
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/post-author/edit.js +3 -2
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-featured-image/overlay.js +1 -1
- package/build-module/post-featured-image/overlay.js.map +1 -1
- package/build-module/post-template/index.js +8 -0
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/preformatted/transforms.js +3 -1
- package/build-module/preformatted/transforms.js.map +1 -1
- package/build-module/query/deprecated.js +185 -21
- package/build-module/query/deprecated.js.map +1 -1
- package/build-module/query/edit/index.js +2 -1
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +11 -5
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +99 -35
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/query-content.js +1 -1
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +15 -27
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/index.js +0 -8
- package/build-module/query/index.js.map +1 -1
- package/build-module/query/utils.js +69 -8
- package/build-module/query/utils.js.map +1 -1
- package/build-module/rss/edit.js +3 -0
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/search/edit.js +2 -2
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +20 -20
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/search/index.js +8 -1
- package/build-module/search/index.js.map +1 -1
- package/build-module/site-logo/edit.js +17 -8
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +1 -0
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-title/index.js +1 -0
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +2 -2
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/social-list.js +2 -11
- package/build-module/social-link/social-list.js.map +1 -1
- package/build-module/social-links/edit.js +0 -1
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/table/edit.js +3 -1
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +17 -1
- package/build-module/table/index.js.map +1 -1
- package/build-module/table/save.js +4 -2
- package/build-module/table/save.js.map +1 -1
- package/build-module/table/state.js +25 -13
- package/build-module/table/state.js.map +1 -1
- package/build-module/table/transforms.js +3 -2
- package/build-module/table/transforms.js.map +1 -1
- package/build-module/table-of-contents/edit.js +3 -3
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/tag-cloud/edit.js +3 -2
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +10 -1
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/import-controls.js +146 -0
- package/build-module/template-part/edit/import-controls.js.map +1 -0
- package/build-module/template-part/edit/index.js +2 -1
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +6 -3
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/hooks.js +3 -7
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/template-part/edit/utils/transformers.js +40 -0
- package/build-module/template-part/edit/utils/transformers.js.map +1 -0
- package/build-module/text-columns/edit.js +1 -0
- package/build-module/text-columns/edit.js.map +1 -1
- package/build-module/utils/transformation-categories.native.js +1 -1
- package/build-module/utils/transformation-categories.native.js.map +1 -1
- package/build-module/video/edit.js +1 -1
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/edit.native.js +1 -2
- package/build-module/video/edit.native.js.map +1 -1
- package/build-style/archives/editor-rtl.css +15 -3
- package/build-style/archives/editor.css +15 -3
- package/build-style/archives/style-rtl.css +15 -3
- package/build-style/archives/style.css +15 -3
- package/build-style/audio/editor-rtl.css +15 -3
- package/build-style/audio/editor.css +15 -3
- package/build-style/audio/style-rtl.css +15 -3
- package/build-style/audio/style.css +15 -3
- package/build-style/audio/theme-rtl.css +15 -3
- package/build-style/audio/theme.css +15 -3
- package/build-style/avatar/editor-rtl.css +15 -3
- package/build-style/avatar/editor.css +15 -3
- package/build-style/avatar/style-rtl.css +15 -3
- package/build-style/avatar/style.css +15 -3
- package/build-style/block/editor-rtl.css +25 -3
- package/build-style/block/editor.css +25 -3
- package/build-style/button/editor-rtl.css +15 -3
- package/build-style/button/editor.css +15 -3
- package/build-style/button/style-rtl.css +15 -3
- package/build-style/button/style.css +15 -3
- package/build-style/buttons/editor-rtl.css +15 -3
- package/build-style/buttons/editor.css +15 -3
- package/build-style/buttons/style-rtl.css +15 -3
- package/build-style/buttons/style.css +15 -3
- package/build-style/calendar/style-rtl.css +15 -3
- package/build-style/calendar/style.css +15 -3
- package/build-style/categories/editor-rtl.css +15 -3
- package/build-style/categories/editor.css +15 -3
- package/build-style/categories/style-rtl.css +15 -3
- package/build-style/categories/style.css +15 -3
- package/build-style/classic-rtl.css +15 -3
- package/build-style/classic.css +15 -3
- package/build-style/code/editor-rtl.css +15 -3
- package/build-style/code/editor.css +15 -3
- package/build-style/code/style-rtl.css +15 -3
- package/build-style/code/style.css +15 -3
- package/build-style/code/theme-rtl.css +15 -3
- package/build-style/code/theme.css +15 -3
- package/build-style/columns/editor-rtl.css +15 -3
- package/build-style/columns/editor.css +15 -3
- package/build-style/columns/style-rtl.css +15 -3
- package/build-style/columns/style.css +15 -3
- package/build-style/comment-author-avatar/editor-rtl.css +15 -3
- package/build-style/comment-author-avatar/editor.css +15 -3
- package/build-style/comment-content/style-rtl.css +15 -3
- package/build-style/comment-content/style.css +15 -3
- package/build-style/comment-template/style-rtl.css +15 -3
- package/build-style/comment-template/style.css +15 -3
- package/build-style/comments/editor-rtl.css +15 -3
- package/build-style/comments/editor.css +15 -3
- package/build-style/comments/style-rtl.css +15 -3
- package/build-style/comments/style.css +15 -3
- package/build-style/comments-pagination/editor-rtl.css +15 -3
- package/build-style/comments-pagination/editor.css +15 -3
- package/build-style/comments-pagination/style-rtl.css +15 -3
- package/build-style/comments-pagination/style.css +15 -3
- package/build-style/comments-pagination-numbers/editor-rtl.css +15 -3
- package/build-style/comments-pagination-numbers/editor.css +15 -3
- package/build-style/comments-title/editor-rtl.css +15 -3
- package/build-style/comments-title/editor.css +15 -3
- package/build-style/common-rtl.css +20 -4
- package/build-style/common.css +20 -4
- package/build-style/cover/editor-rtl.css +15 -3
- package/build-style/cover/editor.css +15 -3
- package/build-style/cover/style-rtl.css +17 -4
- package/build-style/cover/style.css +17 -4
- package/build-style/editor-elements-rtl.css +15 -3
- package/build-style/editor-elements.css +15 -3
- package/build-style/editor-rtl.css +46 -29
- package/build-style/editor.css +46 -29
- package/build-style/elements-rtl.css +15 -3
- package/build-style/elements.css +15 -3
- package/build-style/embed/editor-rtl.css +15 -3
- package/build-style/embed/editor.css +15 -3
- package/build-style/embed/style-rtl.css +15 -3
- package/build-style/embed/style.css +15 -3
- package/build-style/embed/theme-rtl.css +15 -3
- package/build-style/embed/theme.css +15 -3
- package/build-style/file/editor-rtl.css +15 -3
- package/build-style/file/editor.css +15 -3
- package/build-style/file/style-rtl.css +15 -3
- package/build-style/file/style.css +15 -3
- package/build-style/freeform/editor-rtl.css +15 -3
- package/build-style/freeform/editor.css +15 -3
- package/build-style/gallery/editor-rtl.css +16 -4
- package/build-style/gallery/editor.css +16 -4
- package/build-style/gallery/style-rtl.css +19 -5
- package/build-style/gallery/style.css +19 -5
- package/build-style/gallery/theme-rtl.css +15 -3
- package/build-style/gallery/theme.css +15 -3
- package/build-style/group/editor-rtl.css +15 -3
- package/build-style/group/editor.css +15 -3
- package/build-style/group/style-rtl.css +15 -3
- package/build-style/group/style.css +15 -3
- package/build-style/group/theme-rtl.css +15 -3
- package/build-style/group/theme.css +15 -3
- package/build-style/heading/style-rtl.css +15 -3
- package/build-style/heading/style.css +15 -3
- package/build-style/html/editor-rtl.css +15 -3
- package/build-style/html/editor.css +15 -3
- package/build-style/image/editor-rtl.css +15 -12
- package/build-style/image/editor.css +15 -12
- package/build-style/image/style-rtl.css +15 -3
- package/build-style/image/style.css +15 -3
- package/build-style/image/theme-rtl.css +15 -3
- package/build-style/image/theme.css +15 -3
- package/build-style/latest-comments/style-rtl.css +15 -3
- package/build-style/latest-comments/style.css +15 -3
- package/build-style/latest-posts/editor-rtl.css +15 -3
- package/build-style/latest-posts/editor.css +15 -3
- package/build-style/latest-posts/style-rtl.css +15 -3
- package/build-style/latest-posts/style.css +15 -3
- package/build-style/list/style-rtl.css +15 -3
- package/build-style/list/style.css +15 -3
- package/build-style/media-text/editor-rtl.css +15 -3
- package/build-style/media-text/editor.css +15 -3
- package/build-style/media-text/style-rtl.css +15 -3
- package/build-style/media-text/style.css +15 -3
- package/build-style/more/editor-rtl.css +15 -3
- package/build-style/more/editor.css +15 -3
- package/build-style/navigation/editor-rtl.css +15 -9
- package/build-style/navigation/editor.css +15 -9
- package/build-style/navigation/style-rtl.css +15 -4
- package/build-style/navigation/style.css +15 -4
- package/build-style/navigation-link/editor-rtl.css +15 -3
- package/build-style/navigation-link/editor.css +15 -3
- package/build-style/navigation-link/style-rtl.css +15 -3
- package/build-style/navigation-link/style.css +15 -3
- package/build-style/navigation-submenu/editor-rtl.css +15 -3
- package/build-style/navigation-submenu/editor.css +15 -3
- package/build-style/nextpage/editor-rtl.css +15 -3
- package/build-style/nextpage/editor.css +15 -3
- package/build-style/page-list/editor-rtl.css +19 -3
- package/build-style/page-list/editor.css +19 -3
- package/build-style/page-list/style-rtl.css +15 -3
- package/build-style/page-list/style.css +15 -3
- package/build-style/paragraph/editor-rtl.css +15 -3
- package/build-style/paragraph/editor.css +15 -3
- package/build-style/paragraph/style-rtl.css +15 -3
- package/build-style/paragraph/style.css +15 -3
- package/build-style/post-author/style-rtl.css +15 -3
- package/build-style/post-author/style.css +15 -3
- package/build-style/post-comments-form/editor-rtl.css +15 -3
- package/build-style/post-comments-form/editor.css +15 -3
- package/build-style/post-comments-form/style-rtl.css +15 -3
- package/build-style/post-comments-form/style.css +15 -3
- package/build-style/post-date/style-rtl.css +15 -3
- package/build-style/post-date/style.css +15 -3
- package/build-style/post-excerpt/editor-rtl.css +15 -3
- package/build-style/post-excerpt/editor.css +15 -3
- package/build-style/post-excerpt/style-rtl.css +15 -3
- package/build-style/post-excerpt/style.css +15 -3
- package/build-style/post-featured-image/editor-rtl.css +15 -3
- package/build-style/post-featured-image/editor.css +15 -3
- package/build-style/post-featured-image/style-rtl.css +15 -3
- package/build-style/post-featured-image/style.css +15 -3
- package/build-style/post-navigation-link/style-rtl.css +15 -3
- package/build-style/post-navigation-link/style.css +15 -3
- package/build-style/post-template/editor-rtl.css +15 -3
- package/build-style/post-template/editor.css +15 -3
- package/build-style/post-template/style-rtl.css +15 -3
- package/build-style/post-template/style.css +15 -3
- package/build-style/post-terms/style-rtl.css +15 -3
- package/build-style/post-terms/style.css +15 -3
- package/build-style/post-title/style-rtl.css +15 -3
- package/build-style/post-title/style.css +15 -3
- package/build-style/preformatted/style-rtl.css +15 -3
- package/build-style/preformatted/style.css +15 -3
- package/build-style/pullquote/editor-rtl.css +15 -3
- package/build-style/pullquote/editor.css +15 -3
- package/build-style/pullquote/style-rtl.css +15 -3
- package/build-style/pullquote/style.css +15 -3
- package/build-style/pullquote/theme-rtl.css +15 -3
- package/build-style/pullquote/theme.css +15 -3
- package/build-style/query/editor-rtl.css +15 -3
- package/build-style/query/editor.css +15 -3
- package/build-style/query-pagination/editor-rtl.css +15 -3
- package/build-style/query-pagination/editor.css +15 -3
- package/build-style/query-pagination/style-rtl.css +15 -3
- package/build-style/query-pagination/style.css +15 -3
- package/build-style/query-pagination-numbers/editor-rtl.css +15 -3
- package/build-style/query-pagination-numbers/editor.css +15 -3
- package/build-style/query-title/style-rtl.css +15 -3
- package/build-style/query-title/style.css +15 -3
- package/build-style/quote/style-rtl.css +15 -3
- package/build-style/quote/style.css +15 -3
- package/build-style/quote/theme-rtl.css +15 -3
- package/build-style/quote/theme.css +15 -3
- package/build-style/read-more/style-rtl.css +15 -3
- package/build-style/read-more/style.css +15 -3
- package/build-style/reset-rtl.css +15 -3
- package/build-style/reset.css +15 -3
- package/build-style/rss/editor-rtl.css +15 -3
- package/build-style/rss/editor.css +15 -3
- package/build-style/rss/style-rtl.css +15 -3
- package/build-style/rss/style.css +15 -3
- package/build-style/search/editor-rtl.css +15 -3
- package/build-style/search/editor.css +15 -3
- package/build-style/search/style-rtl.css +15 -3
- package/build-style/search/style.css +15 -3
- package/build-style/search/theme-rtl.css +15 -3
- package/build-style/search/theme.css +15 -3
- package/build-style/separator/editor-rtl.css +15 -3
- package/build-style/separator/editor.css +15 -3
- package/build-style/separator/style-rtl.css +15 -3
- package/build-style/separator/style.css +15 -3
- package/build-style/separator/theme-rtl.css +15 -3
- package/build-style/separator/theme.css +15 -3
- package/build-style/shortcode/editor-rtl.css +16 -4
- package/build-style/shortcode/editor.css +16 -4
- package/build-style/site-logo/editor-rtl.css +15 -3
- package/build-style/site-logo/editor.css +15 -3
- package/build-style/site-logo/style-rtl.css +15 -3
- package/build-style/site-logo/style.css +15 -3
- package/build-style/site-tagline/editor-rtl.css +15 -3
- package/build-style/site-tagline/editor.css +15 -3
- package/build-style/site-title/editor-rtl.css +15 -3
- package/build-style/site-title/editor.css +15 -3
- package/build-style/site-title/style-rtl.css +15 -3
- package/build-style/site-title/style.css +15 -3
- package/build-style/social-link/editor-rtl.css +15 -3
- package/build-style/social-link/editor.css +15 -3
- package/build-style/social-links/editor-rtl.css +15 -3
- package/build-style/social-links/editor.css +15 -3
- package/build-style/social-links/style-rtl.css +15 -3
- package/build-style/social-links/style.css +15 -3
- package/build-style/spacer/editor-rtl.css +15 -3
- package/build-style/spacer/editor.css +15 -3
- package/build-style/spacer/style-rtl.css +15 -3
- package/build-style/spacer/style.css +15 -3
- package/build-style/style-rtl.css +36 -10
- package/build-style/style.css +36 -10
- package/build-style/table/editor-rtl.css +15 -11
- package/build-style/table/editor.css +15 -11
- package/build-style/table/style-rtl.css +21 -3
- package/build-style/table/style.css +21 -3
- package/build-style/table/theme-rtl.css +15 -9
- package/build-style/table/theme.css +15 -9
- package/build-style/tag-cloud/style-rtl.css +15 -3
- package/build-style/tag-cloud/style.css +15 -3
- package/build-style/template-part/editor-rtl.css +30 -4
- package/build-style/template-part/editor.css +30 -4
- package/build-style/template-part/theme-rtl.css +15 -3
- package/build-style/template-part/theme.css +15 -3
- package/build-style/text-columns/editor-rtl.css +15 -3
- package/build-style/text-columns/editor.css +15 -3
- package/build-style/text-columns/style-rtl.css +15 -3
- package/build-style/text-columns/style.css +15 -3
- package/build-style/theme-rtl.css +15 -9
- package/build-style/theme.css +15 -9
- package/build-style/verse/style-rtl.css +19 -4
- package/build-style/verse/style.css +19 -4
- package/build-style/video/editor-rtl.css +15 -3
- package/build-style/video/editor.css +15 -3
- package/build-style/video/style-rtl.css +17 -4
- package/build-style/video/style.css +17 -4
- package/build-style/video/theme-rtl.css +15 -3
- package/build-style/video/theme.css +15 -3
- package/package.json +32 -30
- package/src/audio/edit.native.js +1 -2
- package/src/audio/index.js +1 -0
- package/src/avatar/edit.js +1 -0
- package/src/avatar/user-control.js +1 -0
- package/src/block/block.json +1 -2
- package/src/block/edit.js +14 -3
- package/src/block/edit.native.js +24 -12
- package/src/block/editor.scss +17 -0
- package/src/block/index.php +1 -2
- package/src/block/test/edit.native.js +28 -32
- package/src/button/edit.native.js +1 -0
- package/src/buttons/test/edit.native.js +40 -51
- package/src/categories/edit.js +1 -1
- package/src/code/transforms.js +3 -1
- package/src/columns/edit.js +1 -0
- package/src/columns/edit.native.js +18 -26
- package/src/comment-author-avatar/edit.js +1 -0
- package/src/comments/index.php +0 -1
- package/src/cover/edit/inspector-controls.js +6 -4
- package/src/cover/edit.native.js +32 -19
- package/src/cover/test/edit.native.js +73 -126
- package/src/embed/embed-controls.native.js +1 -0
- package/src/embed/embed-preview.native.js +1 -2
- package/src/embed/test/index.native.js +237 -231
- package/src/file/inspector.js +1 -0
- package/src/file/test/__snapshots__/edit.native.js.snap +2 -6
- package/src/freeform/edit.js +48 -29
- package/src/freeform/modal.js +111 -0
- package/src/gallery/edit.js +32 -7
- package/src/gallery/gallery.js +3 -13
- package/src/gallery/gallery.native.js +1 -2
- package/src/gallery/shared.js +7 -11
- package/src/gallery/transforms.js +1 -6
- package/src/gallery/use-get-media.js +1 -1
- package/src/gallery/use-get-media.native.js +2 -1
- package/src/gallery/v1/edit.js +8 -7
- package/src/gallery/v1/gallery.native.js +1 -2
- package/src/gallery/v1/shared.js +7 -2
- package/src/group/block.json +3 -1
- package/src/group/edit.js +2 -6
- package/src/group/placeholder.js +6 -25
- package/src/group/test/__snapshots__/edit.native.js.snap +1 -1
- package/src/heading/block.json +1 -2
- package/src/heading/deprecated.js +209 -136
- package/src/heading/index.php +52 -0
- package/src/heading/test/__snapshots__/index.native.js.snap +7 -0
- package/src/heading/test/index.native.js +44 -0
- package/src/home-link/index.php +1 -1
- package/src/html/block.json +1 -1
- package/src/image/edit.js +7 -2
- package/src/image/edit.native.js +2 -1
- package/src/image/editor.scss +0 -11
- package/src/image/image.js +14 -8
- package/src/image/test/edit.native.js +14 -10
- package/src/index.js +2 -0
- package/src/latest-comments/edit.js +1 -0
- package/src/latest-posts/edit.js +2 -0
- package/src/latest-posts/test/__snapshots__/edit.native.js.snap +3 -0
- package/src/latest-posts/test/edit.native.js +49 -0
- package/src/list/test/edit.native.js +53 -45
- package/src/list/transforms.js +0 -11
- package/src/list/utils.js +6 -2
- package/src/list-item/index.js +2 -0
- package/src/list-item/transforms.js +17 -0
- package/src/list-item/utils.js +10 -1
- package/src/media-text/edit.js +6 -3
- package/src/missing/edit.native.js +13 -6
- package/src/missing/test/edit-integration.native.js +10 -12
- package/src/more/test/__snapshots__/edit.native.js.snap +7 -0
- package/src/more/test/edit.native.js +41 -0
- package/src/navigation/edit/are-blocks-dirty.js +51 -0
- package/src/navigation/edit/index.js +229 -298
- package/src/navigation/edit/menu-inspector-controls.js +119 -0
- package/src/navigation/edit/navigation-menu-selector.js +6 -7
- package/src/navigation/edit/test/are-blocks-dirty.js +121 -0
- package/src/navigation/edit/unsaved-inner-blocks.js +12 -7
- package/src/navigation/edit/utils.js +82 -0
- package/src/navigation/editor.scss +0 -7
- package/src/navigation/index.php +89 -10
- package/src/navigation/style.scss +0 -1
- package/src/navigation/view-modal.js +11 -1
- package/src/navigation-link/edit.js +62 -386
- package/src/navigation-link/index.php +64 -0
- package/src/navigation-link/link-ui.js +213 -0
- package/src/navigation-link/test/edit.js +23 -82
- package/src/navigation-link/transforms.js +14 -0
- package/src/navigation-link/update-attributes.js +99 -0
- package/src/navigation-submenu/edit.js +85 -276
- package/src/navigation-submenu/index.php +72 -0
- package/src/page-list/block.json +24 -2
- package/src/page-list/constants.js +8 -0
- package/src/page-list/convert-to-links-modal.js +19 -76
- package/src/page-list/convert-to-navigation-links.js +60 -0
- package/src/page-list/edit.js +187 -118
- package/src/page-list/editor.scss +4 -0
- package/src/page-list/index.js +8 -2
- package/src/page-list/index.php +18 -10
- package/src/page-list/test/convert-to-links-modal.js +28 -34
- package/src/page-list-item/block.json +51 -0
- package/src/page-list-item/edit.js +102 -0
- package/src/page-list-item/index.js +24 -0
- package/src/page-list-item/init.js +6 -0
- package/src/paragraph/index.js +0 -6
- package/src/post-author/edit.js +3 -2
- package/src/post-content/index.php +1 -2
- package/src/post-featured-image/index.php +7 -2
- package/src/post-featured-image/overlay.js +1 -1
- package/src/post-template/block.json +8 -0
- package/src/preformatted/transforms.js +4 -1
- package/src/query/block.json +0 -8
- package/src/query/deprecated.js +257 -86
- package/src/query/edit/index.js +1 -0
- package/src/query/edit/inspector-controls/index.js +50 -38
- package/src/query/edit/inspector-controls/taxonomy-controls.js +102 -38
- package/src/query/edit/query-content.js +2 -1
- package/src/query/edit/query-placeholder.js +14 -25
- package/src/query/utils.js +59 -1
- package/src/rss/edit.js +3 -0
- package/src/search/edit.js +2 -2
- package/src/search/edit.native.js +31 -27
- package/src/search/index.js +5 -1
- package/src/separator/test/__snapshots__/edit.native.js.snap +7 -0
- package/src/separator/test/edit.native.js +41 -0
- package/src/shortcode/test/edit.native.js +15 -18
- package/src/site-logo/edit.js +13 -5
- package/src/site-logo/index.js +1 -0
- package/src/site-title/index.js +1 -0
- package/src/social-link/edit.js +3 -3
- package/src/social-link/social-list.js +2 -7
- package/src/social-link/test/index.native.js +10 -16
- package/src/social-links/edit.js +0 -1
- package/src/social-links/test/edit.native.js +4 -3
- package/src/spacer/test/index.native.js +39 -36
- package/src/table/block.json +15 -0
- package/src/table/edit.js +2 -1
- package/src/table/editor.scss +0 -4
- package/src/table/index.js +1 -0
- package/src/table/save.js +5 -1
- package/src/table/state.js +22 -7
- package/src/table/style.scss +8 -0
- package/src/table/theme.scss +0 -8
- package/src/table/transforms.js +2 -1
- package/src/table-of-contents/edit.js +3 -3
- package/src/tag-cloud/edit.js +3 -2
- package/src/template-part/edit/advanced-controls.js +12 -0
- package/src/template-part/edit/import-controls.js +180 -0
- package/src/template-part/edit/index.js +1 -0
- package/src/template-part/edit/selection-modal.js +4 -3
- package/src/template-part/edit/utils/hooks.js +7 -3
- package/src/template-part/edit/utils/transformers.js +37 -0
- package/src/template-part/editor.scss +20 -2
- package/src/template-part/index.php +1 -2
- package/src/text-columns/edit.js +1 -0
- package/src/utils/transformation-categories.native.js +1 -0
- package/src/verse/style.scss +4 -1
- package/src/verse/test/__snapshots__/edit.native.js.snap +13 -0
- package/src/verse/test/edit.native.js +40 -33
- package/src/video/edit.js +1 -1
- package/src/video/edit.native.js +1 -2
- package/test/babel-plugin.js +35 -35
- package/tsconfig.tsbuildinfo +1 -1
- package/build/query/constants.js +0 -16
- package/build/query/constants.js.map +0 -1
- package/build-module/query/constants.js +0 -7
- package/build-module/query/constants.js.map +0 -1
- package/src/query/constants.js +0 -7
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import escapeHtml from 'escape-html';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
@@ -10,50 +9,49 @@ import escapeHtml from 'escape-html';
|
|
|
10
9
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
11
10
|
import {
|
|
12
11
|
PanelBody,
|
|
13
|
-
Popover,
|
|
14
12
|
TextControl,
|
|
15
13
|
TextareaControl,
|
|
16
14
|
ToolbarButton,
|
|
17
15
|
ToolbarGroup,
|
|
18
16
|
} from '@wordpress/components';
|
|
19
17
|
import { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';
|
|
20
|
-
import { __
|
|
18
|
+
import { __ } from '@wordpress/i18n';
|
|
21
19
|
import {
|
|
22
20
|
BlockControls,
|
|
23
21
|
InnerBlocks,
|
|
24
22
|
useInnerBlocksProps,
|
|
25
23
|
InspectorControls,
|
|
26
24
|
RichText,
|
|
27
|
-
__experimentalLinkControl as LinkControl,
|
|
28
25
|
useBlockProps,
|
|
29
26
|
store as blockEditorStore,
|
|
30
27
|
getColorClassName,
|
|
31
28
|
} from '@wordpress/block-editor';
|
|
32
|
-
import { isURL, prependHTTP
|
|
33
|
-
import {
|
|
34
|
-
Fragment,
|
|
35
|
-
useState,
|
|
36
|
-
useEffect,
|
|
37
|
-
useRef,
|
|
38
|
-
createInterpolateElement,
|
|
39
|
-
} from '@wordpress/element';
|
|
29
|
+
import { isURL, prependHTTP } from '@wordpress/url';
|
|
30
|
+
import { useState, useEffect, useRef } from '@wordpress/element';
|
|
40
31
|
import { placeCaretAtHorizontalEdge } from '@wordpress/dom';
|
|
41
32
|
import { link as linkIcon, removeSubmenu } from '@wordpress/icons';
|
|
42
|
-
import {
|
|
43
|
-
useResourcePermissions,
|
|
44
|
-
store as coreStore,
|
|
45
|
-
} from '@wordpress/core-data';
|
|
33
|
+
import { useResourcePermissions } from '@wordpress/core-data';
|
|
46
34
|
import { speak } from '@wordpress/a11y';
|
|
47
35
|
import { createBlock } from '@wordpress/blocks';
|
|
48
|
-
import { useMergeRefs } from '@wordpress/compose';
|
|
36
|
+
import { useMergeRefs, usePrevious } from '@wordpress/compose';
|
|
49
37
|
|
|
50
38
|
/**
|
|
51
39
|
* Internal dependencies
|
|
52
40
|
*/
|
|
53
41
|
import { ItemSubmenuIcon } from './icons';
|
|
54
42
|
import { name } from './block.json';
|
|
43
|
+
import { LinkUI } from '../navigation-link/link-ui';
|
|
44
|
+
import { updateAttributes } from '../navigation-link/update-attributes';
|
|
45
|
+
import {
|
|
46
|
+
getColors,
|
|
47
|
+
getNavigationChildBlockProps,
|
|
48
|
+
} from '../navigation/edit/utils';
|
|
55
49
|
|
|
56
|
-
const ALLOWED_BLOCKS = [
|
|
50
|
+
const ALLOWED_BLOCKS = [
|
|
51
|
+
'core/navigation-link',
|
|
52
|
+
'core/navigation-submenu',
|
|
53
|
+
'core/page-list',
|
|
54
|
+
];
|
|
57
55
|
|
|
58
56
|
const DEFAULT_BLOCK = {
|
|
59
57
|
name: 'core/navigation-link',
|
|
@@ -110,91 +108,6 @@ const useIsDraggingWithin = ( elementRef ) => {
|
|
|
110
108
|
return isDraggingWithin;
|
|
111
109
|
};
|
|
112
110
|
|
|
113
|
-
/**
|
|
114
|
-
* Given the Link block's type attribute, return the query params to give to
|
|
115
|
-
* /wp/v2/search.
|
|
116
|
-
*
|
|
117
|
-
* @param {string} type Link block's type attribute.
|
|
118
|
-
* @param {string} kind Link block's entity of kind (post-type|taxonomy)
|
|
119
|
-
* @return {{ type?: string, subtype?: string }} Search query params.
|
|
120
|
-
*/
|
|
121
|
-
function getSuggestionsQuery( type, kind ) {
|
|
122
|
-
switch ( type ) {
|
|
123
|
-
case 'post':
|
|
124
|
-
case 'page':
|
|
125
|
-
return { type: 'post', subtype: type };
|
|
126
|
-
case 'category':
|
|
127
|
-
return { type: 'term', subtype: 'category' };
|
|
128
|
-
case 'tag':
|
|
129
|
-
return { type: 'term', subtype: 'post_tag' };
|
|
130
|
-
case 'post_format':
|
|
131
|
-
return { type: 'post-format' };
|
|
132
|
-
default:
|
|
133
|
-
if ( kind === 'taxonomy' ) {
|
|
134
|
-
return { type: 'term', subtype: type };
|
|
135
|
-
}
|
|
136
|
-
if ( kind === 'post-type' ) {
|
|
137
|
-
return { type: 'post', subtype: type };
|
|
138
|
-
}
|
|
139
|
-
return {};
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Determine the colors for a menu.
|
|
145
|
-
*
|
|
146
|
-
* Order of priority is:
|
|
147
|
-
* 1: Overlay custom colors (if submenu)
|
|
148
|
-
* 2: Overlay theme colors (if submenu)
|
|
149
|
-
* 3: Custom colors
|
|
150
|
-
* 4: Theme colors
|
|
151
|
-
* 5: Global styles
|
|
152
|
-
*
|
|
153
|
-
* @param {Object} context
|
|
154
|
-
* @param {boolean} isSubMenu
|
|
155
|
-
*/
|
|
156
|
-
function getColors( context, isSubMenu ) {
|
|
157
|
-
const {
|
|
158
|
-
textColor,
|
|
159
|
-
customTextColor,
|
|
160
|
-
backgroundColor,
|
|
161
|
-
customBackgroundColor,
|
|
162
|
-
overlayTextColor,
|
|
163
|
-
customOverlayTextColor,
|
|
164
|
-
overlayBackgroundColor,
|
|
165
|
-
customOverlayBackgroundColor,
|
|
166
|
-
style,
|
|
167
|
-
} = context;
|
|
168
|
-
|
|
169
|
-
const colors = {};
|
|
170
|
-
|
|
171
|
-
if ( isSubMenu && !! customOverlayTextColor ) {
|
|
172
|
-
colors.customTextColor = customOverlayTextColor;
|
|
173
|
-
} else if ( isSubMenu && !! overlayTextColor ) {
|
|
174
|
-
colors.textColor = overlayTextColor;
|
|
175
|
-
} else if ( !! customTextColor ) {
|
|
176
|
-
colors.customTextColor = customTextColor;
|
|
177
|
-
} else if ( !! textColor ) {
|
|
178
|
-
colors.textColor = textColor;
|
|
179
|
-
} else if ( !! style?.color?.text ) {
|
|
180
|
-
colors.customTextColor = style.color.text;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
if ( isSubMenu && !! customOverlayBackgroundColor ) {
|
|
184
|
-
colors.customBackgroundColor = customOverlayBackgroundColor;
|
|
185
|
-
} else if ( isSubMenu && !! overlayBackgroundColor ) {
|
|
186
|
-
colors.backgroundColor = overlayBackgroundColor;
|
|
187
|
-
} else if ( !! customBackgroundColor ) {
|
|
188
|
-
colors.customBackgroundColor = customBackgroundColor;
|
|
189
|
-
} else if ( !! backgroundColor ) {
|
|
190
|
-
colors.backgroundColor = backgroundColor;
|
|
191
|
-
} else if ( !! style?.color?.background ) {
|
|
192
|
-
colors.customTextColor = style.color.background;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
return colors;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
111
|
/**
|
|
199
112
|
* @typedef {'post-type'|'custom'|'taxonomy'|'post-type-archive'} WPNavigationLinkKind
|
|
200
113
|
*/
|
|
@@ -214,64 +127,6 @@ function getColors( context, isSubMenu ) {
|
|
|
214
127
|
* @property {string} [title] Link title attribute.
|
|
215
128
|
*/
|
|
216
129
|
|
|
217
|
-
/**
|
|
218
|
-
* Link Control onChange handler that updates block attributes when a setting is changed.
|
|
219
|
-
*
|
|
220
|
-
* @param {Object} updatedValue New block attributes to update.
|
|
221
|
-
* @param {Function} setAttributes Block attribute update function.
|
|
222
|
-
* @param {WPNavigationLinkBlockAttributes} blockAttributes Current block attributes.
|
|
223
|
-
*
|
|
224
|
-
*/
|
|
225
|
-
export const updateNavigationLinkBlockAttributes = (
|
|
226
|
-
updatedValue = {},
|
|
227
|
-
setAttributes,
|
|
228
|
-
blockAttributes = {}
|
|
229
|
-
) => {
|
|
230
|
-
const {
|
|
231
|
-
label: originalLabel = '',
|
|
232
|
-
kind: originalKind = '',
|
|
233
|
-
type: originalType = '',
|
|
234
|
-
} = blockAttributes;
|
|
235
|
-
const {
|
|
236
|
-
title = '',
|
|
237
|
-
url = '',
|
|
238
|
-
opensInNewTab,
|
|
239
|
-
id,
|
|
240
|
-
kind: newKind = originalKind,
|
|
241
|
-
type: newType = originalType,
|
|
242
|
-
} = updatedValue;
|
|
243
|
-
|
|
244
|
-
const normalizedTitle = title.replace( /http(s?):\/\//gi, '' );
|
|
245
|
-
const normalizedURL = url.replace( /http(s?):\/\//gi, '' );
|
|
246
|
-
const escapeTitle =
|
|
247
|
-
title !== '' &&
|
|
248
|
-
normalizedTitle !== normalizedURL &&
|
|
249
|
-
originalLabel !== title;
|
|
250
|
-
const label = escapeTitle
|
|
251
|
-
? escapeHtml( title )
|
|
252
|
-
: originalLabel || escapeHtml( normalizedURL );
|
|
253
|
-
|
|
254
|
-
// In https://github.com/WordPress/gutenberg/pull/24670 we decided to use "tag" in favor of "post_tag"
|
|
255
|
-
const type = newType === 'post_tag' ? 'tag' : newType.replace( '-', '_' );
|
|
256
|
-
|
|
257
|
-
const isBuiltInType =
|
|
258
|
-
[ 'post', 'page', 'tag', 'category' ].indexOf( type ) > -1;
|
|
259
|
-
|
|
260
|
-
const isCustomLink =
|
|
261
|
-
( ! newKind && ! isBuiltInType ) || newKind === 'custom';
|
|
262
|
-
const kind = isCustomLink ? 'custom' : newKind;
|
|
263
|
-
|
|
264
|
-
setAttributes( {
|
|
265
|
-
// Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string.
|
|
266
|
-
...( url && { url: encodeURI( safeDecodeURI( url ) ) } ),
|
|
267
|
-
...( label && { label } ),
|
|
268
|
-
...( undefined !== opensInNewTab && { opensInNewTab } ),
|
|
269
|
-
...( id && Number.isInteger( id ) && { id } ),
|
|
270
|
-
...( kind && { kind } ),
|
|
271
|
-
...( type && type !== 'URL' && { type } ),
|
|
272
|
-
} );
|
|
273
|
-
};
|
|
274
|
-
|
|
275
130
|
export default function NavigationSubmenuEdit( {
|
|
276
131
|
attributes,
|
|
277
132
|
isSelected,
|
|
@@ -281,14 +136,9 @@ export default function NavigationSubmenuEdit( {
|
|
|
281
136
|
context,
|
|
282
137
|
clientId,
|
|
283
138
|
} ) {
|
|
284
|
-
const { label, type,
|
|
285
|
-
|
|
286
|
-
const link = {
|
|
287
|
-
url,
|
|
288
|
-
opensInNewTab,
|
|
289
|
-
};
|
|
139
|
+
const { label, type, url, description, rel, title } = attributes;
|
|
140
|
+
|
|
290
141
|
const { showSubmenuIcon, maxNestingLevel, openSubmenusOnClick } = context;
|
|
291
|
-
const { saveEntityRecord } = useDispatch( coreStore );
|
|
292
142
|
|
|
293
143
|
const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } =
|
|
294
144
|
useDispatch( blockEditorStore );
|
|
@@ -362,6 +212,8 @@ export default function NavigationSubmenuEdit( {
|
|
|
362
212
|
[ clientId ]
|
|
363
213
|
);
|
|
364
214
|
|
|
215
|
+
const prevHasChildren = usePrevious( hasChildren );
|
|
216
|
+
|
|
365
217
|
// Show the LinkControl on mount if the URL is empty
|
|
366
218
|
// ( When adding a new menu item)
|
|
367
219
|
// This can't be done in the useState call because it conflicts
|
|
@@ -431,23 +283,6 @@ export default function NavigationSubmenuEdit( {
|
|
|
431
283
|
userCanCreate = postsPermissions.canCreate;
|
|
432
284
|
}
|
|
433
285
|
|
|
434
|
-
async function handleCreate( pageTitle ) {
|
|
435
|
-
const postType = type || 'page';
|
|
436
|
-
|
|
437
|
-
const page = await saveEntityRecord( 'postType', postType, {
|
|
438
|
-
title: pageTitle,
|
|
439
|
-
status: 'draft',
|
|
440
|
-
} );
|
|
441
|
-
|
|
442
|
-
return {
|
|
443
|
-
id: page.id,
|
|
444
|
-
type: postType,
|
|
445
|
-
title: page.title.rendered,
|
|
446
|
-
url: page.link,
|
|
447
|
-
kind: 'post-type',
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
|
|
451
286
|
const {
|
|
452
287
|
textColor,
|
|
453
288
|
customTextColor,
|
|
@@ -491,48 +326,27 @@ export default function NavigationSubmenuEdit( {
|
|
|
491
326
|
)
|
|
492
327
|
: ALLOWED_BLOCKS;
|
|
493
328
|
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
},
|
|
516
|
-
{
|
|
517
|
-
allowedBlocks,
|
|
518
|
-
__experimentalDefaultBlock: DEFAULT_BLOCK,
|
|
519
|
-
__experimentalDirectInsert: true,
|
|
520
|
-
|
|
521
|
-
// Ensure block toolbar is not too far removed from item
|
|
522
|
-
// being edited.
|
|
523
|
-
// see: https://github.com/WordPress/gutenberg/pull/34615.
|
|
524
|
-
__experimentalCaptureToolbars: true,
|
|
525
|
-
|
|
526
|
-
renderAppender:
|
|
527
|
-
isSelected ||
|
|
528
|
-
( isImmediateParentOfSelectedBlock &&
|
|
529
|
-
! selectedBlockHasChildren ) ||
|
|
530
|
-
// Show the appender while dragging to allow inserting element between item and the appender.
|
|
531
|
-
hasChildren
|
|
532
|
-
? InnerBlocks.ButtonBlockAppender
|
|
533
|
-
: false,
|
|
534
|
-
}
|
|
535
|
-
);
|
|
329
|
+
const navigationChildBlockProps =
|
|
330
|
+
getNavigationChildBlockProps( innerBlocksColors );
|
|
331
|
+
const innerBlocksProps = useInnerBlocksProps( navigationChildBlockProps, {
|
|
332
|
+
allowedBlocks,
|
|
333
|
+
__experimentalDefaultBlock: DEFAULT_BLOCK,
|
|
334
|
+
__experimentalDirectInsert: true,
|
|
335
|
+
|
|
336
|
+
// Ensure block toolbar is not too far removed from item
|
|
337
|
+
// being edited.
|
|
338
|
+
// see: https://github.com/WordPress/gutenberg/pull/34615.
|
|
339
|
+
__experimentalCaptureToolbars: true,
|
|
340
|
+
|
|
341
|
+
renderAppender:
|
|
342
|
+
isSelected ||
|
|
343
|
+
( isImmediateParentOfSelectedBlock &&
|
|
344
|
+
! selectedBlockHasChildren ) ||
|
|
345
|
+
// Show the appender while dragging to allow inserting element between item and the appender.
|
|
346
|
+
hasChildren
|
|
347
|
+
? InnerBlocks.ButtonBlockAppender
|
|
348
|
+
: false,
|
|
349
|
+
} );
|
|
536
350
|
|
|
537
351
|
const ParentElement = openSubmenusOnClick ? 'button' : 'a';
|
|
538
352
|
|
|
@@ -541,11 +355,18 @@ export default function NavigationSubmenuEdit( {
|
|
|
541
355
|
replaceBlock( clientId, newLinkBlock );
|
|
542
356
|
}
|
|
543
357
|
|
|
358
|
+
useEffect( () => {
|
|
359
|
+
// If block becomes empty, transform to Navigation Link.
|
|
360
|
+
if ( ! hasChildren && prevHasChildren ) {
|
|
361
|
+
transformToLink();
|
|
362
|
+
}
|
|
363
|
+
}, [ hasChildren, prevHasChildren ] );
|
|
364
|
+
|
|
544
365
|
const canConvertToLink =
|
|
545
366
|
! selectedBlockHasChildren || onlyDescendantIsEmptyLink;
|
|
546
367
|
|
|
547
368
|
return (
|
|
548
|
-
|
|
369
|
+
<>
|
|
549
370
|
<BlockControls>
|
|
550
371
|
<ToolbarGroup>
|
|
551
372
|
{ ! openSubmenusOnClick && (
|
|
@@ -568,9 +389,27 @@ export default function NavigationSubmenuEdit( {
|
|
|
568
389
|
/>
|
|
569
390
|
</ToolbarGroup>
|
|
570
391
|
</BlockControls>
|
|
392
|
+
{ /* Warning, this duplicated in packages/block-library/src/navigation-link/edit.js */ }
|
|
571
393
|
<InspectorControls>
|
|
572
394
|
<PanelBody title={ __( 'Link settings' ) }>
|
|
395
|
+
<TextControl
|
|
396
|
+
value={ label || '' }
|
|
397
|
+
onChange={ ( labelValue ) => {
|
|
398
|
+
setAttributes( { label: labelValue } );
|
|
399
|
+
} }
|
|
400
|
+
label={ __( 'Label' ) }
|
|
401
|
+
autoComplete="off"
|
|
402
|
+
/>
|
|
403
|
+
<TextControl
|
|
404
|
+
value={ url || '' }
|
|
405
|
+
onChange={ ( urlValue ) => {
|
|
406
|
+
setAttributes( { url: urlValue } );
|
|
407
|
+
} }
|
|
408
|
+
label={ __( 'URL' ) }
|
|
409
|
+
autoComplete="off"
|
|
410
|
+
/>
|
|
573
411
|
<TextareaControl
|
|
412
|
+
__nextHasNoMarginBottom
|
|
574
413
|
value={ description || '' }
|
|
575
414
|
onChange={ ( descriptionValue ) => {
|
|
576
415
|
setAttributes( {
|
|
@@ -632,55 +471,25 @@ export default function NavigationSubmenuEdit( {
|
|
|
632
471
|
/>
|
|
633
472
|
}
|
|
634
473
|
{ ! openSubmenusOnClick && isLinkOpen && (
|
|
635
|
-
<
|
|
636
|
-
|
|
474
|
+
<LinkUI
|
|
475
|
+
className="wp-block-navigation-link__inline-link-input"
|
|
476
|
+
clientId={ clientId }
|
|
477
|
+
link={ attributes }
|
|
637
478
|
onClose={ () => setIsLinkOpen( false ) }
|
|
638
479
|
anchor={ popoverAnchor }
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
'Create draft post: <mark>%s</mark>'
|
|
653
|
-
);
|
|
654
|
-
} else {
|
|
655
|
-
/* translators: %s: search term. */
|
|
656
|
-
format = __(
|
|
657
|
-
'Create draft page: <mark>%s</mark>'
|
|
658
|
-
);
|
|
659
|
-
}
|
|
660
|
-
return createInterpolateElement(
|
|
661
|
-
sprintf( format, searchTerm ),
|
|
662
|
-
{ mark: <mark /> }
|
|
663
|
-
);
|
|
664
|
-
} }
|
|
665
|
-
noDirectEntry={ !! type }
|
|
666
|
-
noURLSuggestion={ !! type }
|
|
667
|
-
suggestionsQuery={ getSuggestionsQuery(
|
|
668
|
-
type,
|
|
669
|
-
kind
|
|
670
|
-
) }
|
|
671
|
-
onChange={ ( updatedValue ) =>
|
|
672
|
-
updateNavigationLinkBlockAttributes(
|
|
673
|
-
updatedValue,
|
|
674
|
-
setAttributes,
|
|
675
|
-
attributes
|
|
676
|
-
)
|
|
677
|
-
}
|
|
678
|
-
onRemove={ () => {
|
|
679
|
-
setAttributes( { url: '' } );
|
|
680
|
-
speak( __( 'Link removed.' ), 'assertive' );
|
|
681
|
-
} }
|
|
682
|
-
/>
|
|
683
|
-
</Popover>
|
|
480
|
+
hasCreateSuggestion={ userCanCreate }
|
|
481
|
+
onRemove={ () => {
|
|
482
|
+
setAttributes( { url: '' } );
|
|
483
|
+
speak( __( 'Link removed.' ), 'assertive' );
|
|
484
|
+
} }
|
|
485
|
+
onChange={ ( updatedValue ) => {
|
|
486
|
+
updateAttributes(
|
|
487
|
+
updatedValue,
|
|
488
|
+
setAttributes,
|
|
489
|
+
attributes
|
|
490
|
+
);
|
|
491
|
+
} }
|
|
492
|
+
/>
|
|
684
493
|
) }
|
|
685
494
|
</ParentElement>
|
|
686
495
|
{ ( showSubmenuIcon || openSubmenusOnClick ) && (
|
|
@@ -690,6 +499,6 @@ export default function NavigationSubmenuEdit( {
|
|
|
690
499
|
) }
|
|
691
500
|
<div { ...innerBlocksProps } />
|
|
692
501
|
</div>
|
|
693
|
-
|
|
502
|
+
</>
|
|
694
503
|
);
|
|
695
504
|
}
|
|
@@ -255,6 +255,14 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
|
|
|
255
255
|
$inner_blocks_html .= $inner_block->render();
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
+
if ( strpos( $inner_blocks_html, 'current-menu-item' ) ) {
|
|
259
|
+
$tag_processor = new WP_HTML_Tag_Processor( $html );
|
|
260
|
+
while ( $tag_processor->next_tag( array( 'class_name' => 'wp-block-navigation-item__content' ) ) ) {
|
|
261
|
+
$tag_processor->add_class( 'current-menu-ancestor' );
|
|
262
|
+
}
|
|
263
|
+
$html = $tag_processor->get_updated_html();
|
|
264
|
+
}
|
|
265
|
+
|
|
258
266
|
$html .= sprintf(
|
|
259
267
|
'<ul class="wp-block-navigation__submenu-container">%s</ul>',
|
|
260
268
|
$inner_blocks_html
|
|
@@ -281,3 +289,67 @@ function register_block_core_navigation_submenu() {
|
|
|
281
289
|
);
|
|
282
290
|
}
|
|
283
291
|
add_action( 'init', 'register_block_core_navigation_submenu' );
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Disables display of block inspector tabs for the Navigation Submenu block.
|
|
295
|
+
*
|
|
296
|
+
* This is only a temporary measure until we have a TabPanel and mechanism that
|
|
297
|
+
* will allow the Navigation Submenu to programmatically select a tab when
|
|
298
|
+
* edited via a specific context.
|
|
299
|
+
*
|
|
300
|
+
* See:
|
|
301
|
+
* - https://github.com/WordPress/gutenberg/issues/45951
|
|
302
|
+
* - https://github.com/WordPress/gutenberg/pull/46321
|
|
303
|
+
* - https://github.com/WordPress/gutenberg/pull/46271
|
|
304
|
+
*
|
|
305
|
+
* @param array $settings Default editor settings.
|
|
306
|
+
* @return array Filtered editor settings.
|
|
307
|
+
*/
|
|
308
|
+
function gutenberg_disable_tabs_for_navigation_submenu_block( $settings ) {
|
|
309
|
+
$current_tab_settings = _wp_array_get(
|
|
310
|
+
$settings,
|
|
311
|
+
array( '__experimentalBlockInspectorTabs' ),
|
|
312
|
+
array()
|
|
313
|
+
);
|
|
314
|
+
|
|
315
|
+
$settings['__experimentalBlockInspectorTabs'] = array_merge(
|
|
316
|
+
$current_tab_settings,
|
|
317
|
+
array( 'core/navigation-submenu' => false )
|
|
318
|
+
);
|
|
319
|
+
|
|
320
|
+
return $settings;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
add_filter( 'block_editor_settings_all', 'gutenberg_disable_tabs_for_navigation_submenu_block' );
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Enables animation of the block inspector for the Navigation Submenu block.
|
|
327
|
+
*
|
|
328
|
+
* See:
|
|
329
|
+
* - https://github.com/WordPress/gutenberg/pull/46342
|
|
330
|
+
* - https://github.com/WordPress/gutenberg/issues/45884
|
|
331
|
+
*
|
|
332
|
+
* @param array $settings Default editor settings.
|
|
333
|
+
* @return array Filtered editor settings.
|
|
334
|
+
*/
|
|
335
|
+
function gutenberg_enable_animation_for_navigation_submenu_inspector( $settings ) {
|
|
336
|
+
$current_animation_settings = _wp_array_get(
|
|
337
|
+
$settings,
|
|
338
|
+
array( '__experimentalBlockInspectorAnimation' ),
|
|
339
|
+
array()
|
|
340
|
+
);
|
|
341
|
+
|
|
342
|
+
$settings['__experimentalBlockInspectorAnimation'] = array_merge(
|
|
343
|
+
$current_animation_settings,
|
|
344
|
+
array(
|
|
345
|
+
'core/navigation-submenu' =>
|
|
346
|
+
array(
|
|
347
|
+
'enterDirection' => 'rightToLeft',
|
|
348
|
+
),
|
|
349
|
+
)
|
|
350
|
+
);
|
|
351
|
+
|
|
352
|
+
return $settings;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
add_filter( 'block_editor_settings_all', 'gutenberg_enable_animation_for_navigation_submenu_inspector' );
|
package/src/page-list/block.json
CHANGED
|
@@ -7,7 +7,16 @@
|
|
|
7
7
|
"description": "Display a list of all pages.",
|
|
8
8
|
"keywords": [ "menu", "navigation" ],
|
|
9
9
|
"textdomain": "default",
|
|
10
|
-
"attributes": {
|
|
10
|
+
"attributes": {
|
|
11
|
+
"parentPageID": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"default": 0
|
|
14
|
+
},
|
|
15
|
+
"isNested": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"default": false
|
|
18
|
+
}
|
|
19
|
+
},
|
|
11
20
|
"usesContext": [
|
|
12
21
|
"textColor",
|
|
13
22
|
"customTextColor",
|
|
@@ -25,7 +34,20 @@
|
|
|
25
34
|
],
|
|
26
35
|
"supports": {
|
|
27
36
|
"reusable": false,
|
|
28
|
-
"html": false
|
|
37
|
+
"html": false,
|
|
38
|
+
"typography": {
|
|
39
|
+
"fontSize": true,
|
|
40
|
+
"lineHeight": true,
|
|
41
|
+
"__experimentalFontFamily": true,
|
|
42
|
+
"__experimentalFontWeight": true,
|
|
43
|
+
"__experimentalFontStyle": true,
|
|
44
|
+
"__experimentalTextTransform": true,
|
|
45
|
+
"__experimentalTextDecoration": true,
|
|
46
|
+
"__experimentalLetterSpacing": true,
|
|
47
|
+
"__experimentalDefaultControls": {
|
|
48
|
+
"fontSize": true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
29
51
|
},
|
|
30
52
|
"editorStyle": "wp-block-page-list-editor",
|
|
31
53
|
"style": "wp-block-page-list"
|