@wordpress/block-library 6.0.25 → 6.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 +4 -0
- package/LICENSE.md +1 -1
- package/build/archives/index.js +1 -0
- package/build/archives/index.js.map +1 -1
- package/build/audio/edit.js +19 -4
- package/build/audio/edit.js.map +1 -1
- package/build/audio/index.js +1 -0
- package/build/audio/index.js.map +1 -1
- package/build/block/index.js +1 -0
- package/build/block/index.js.map +1 -1
- package/build/button/edit.native.js +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/button/index.js +5 -1
- package/build/button/index.js.map +1 -1
- package/build/buttons/edit.js +6 -0
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/edit.native.js +16 -6
- package/build/buttons/edit.native.js.map +1 -1
- package/build/buttons/index.js +1 -0
- package/build/buttons/index.js.map +1 -1
- package/build/buttons/transforms.js +1 -0
- package/build/buttons/transforms.js.map +1 -1
- package/build/calendar/index.js +1 -0
- package/build/calendar/index.js.map +1 -1
- package/build/categories/index.js +1 -0
- package/build/categories/index.js.map +1 -1
- package/build/code/index.js +6 -1
- package/build/code/index.js.map +1 -1
- package/build/column/index.js +1 -0
- package/build/column/index.js.map +1 -1
- package/build/columns/index.js +11 -0
- package/build/columns/index.js.map +1 -1
- package/build/comment-author-avatar/edit.js +5 -2
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/comment-author-avatar/index.js +7 -2
- package/build/comment-author-avatar/index.js.map +1 -1
- package/build/comment-author-name/index.js +1 -0
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +1 -0
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +1 -0
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +2 -1
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +1 -0
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/edit.js +117 -26
- package/build/comment-template/edit.js.map +1 -1
- package/build/comment-template/index.js +4 -2
- package/build/comment-template/index.js.map +1 -1
- package/build/comment-template/util.js +68 -0
- package/build/comment-template/util.js.map +1 -0
- package/build/comments-pagination/comments-pagination-arrow-controls.js +39 -0
- package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -0
- package/build/comments-pagination/edit.js +79 -0
- package/build/comments-pagination/edit.js.map +1 -0
- package/build/comments-pagination/index.js +71 -0
- package/build/comments-pagination/index.js.map +1 -0
- package/build/comments-pagination/save.js +18 -0
- package/build/comments-pagination/save.js.map +1 -0
- package/build/comments-pagination-next/edit.js +54 -0
- package/build/comments-pagination-next/edit.js.map +1 -0
- package/build/comments-pagination-next/index.js +66 -0
- package/build/comments-pagination-next/index.js.map +1 -0
- package/build/comments-pagination-numbers/edit.js +47 -0
- package/build/comments-pagination-numbers/edit.js.map +1 -0
- package/build/comments-pagination-numbers/index.js +46 -0
- package/build/comments-pagination-numbers/index.js.map +1 -0
- package/build/comments-pagination-previous/edit.js +54 -0
- package/build/comments-pagination-previous/edit.js.map +1 -0
- package/build/comments-pagination-previous/index.js +66 -0
- package/build/comments-pagination-previous/index.js.map +1 -0
- package/build/comments-query-loop/edit/comments-inspector-controls.js +102 -0
- package/build/comments-query-loop/edit/comments-inspector-controls.js.map +1 -0
- package/build/comments-query-loop/edit.js +23 -28
- package/build/comments-query-loop/edit.js.map +1 -1
- package/build/comments-query-loop/index.js +15 -7
- package/build/comments-query-loop/index.js.map +1 -1
- package/build/cover/edit.js +2 -1
- package/build/cover/edit.js.map +1 -1
- package/build/cover/edit.native.js +40 -32
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/index.js +1 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/overlay-color-settings.native.js +11 -1
- package/build/cover/overlay-color-settings.native.js.map +1 -1
- package/build/embed/deprecated.js +1 -0
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.native.js +23 -20
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-controls.native.js +69 -0
- package/build/embed/embed-controls.native.js.map +1 -0
- package/build/embed/embed-link-settings.native.js +101 -0
- package/build/embed/embed-link-settings.native.js.map +1 -0
- package/build/embed/embed-loading.js +1 -3
- package/build/embed/embed-loading.js.map +1 -1
- package/build/embed/embed-placeholder.native.js +9 -2
- package/build/embed/embed-placeholder.native.js.map +1 -1
- package/build/embed/index.js +1 -0
- package/build/embed/index.js.map +1 -1
- package/build/embed/transforms.js +1 -0
- package/build/embed/transforms.js.map +1 -1
- package/build/embed/util.js +1 -0
- package/build/embed/util.js.map +1 -1
- package/build/file/edit.native.js +5 -2
- package/build/file/edit.native.js.map +1 -1
- package/build/file/index.js +1 -0
- package/build/file/index.js.map +1 -1
- package/build/freeform/index.js +1 -0
- package/build/freeform/index.js.map +1 -1
- package/build/gallery/deprecated.js +4 -0
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +31 -12
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.native.js +1 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/index.js +1 -0
- package/build/gallery/index.js.map +1 -1
- package/build/group/index.js +19 -1
- package/build/group/index.js.map +1 -1
- package/build/heading/edit.js +2 -0
- package/build/heading/edit.js.map +1 -1
- package/build/heading/index.js +1 -0
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +1 -0
- package/build/heading/transforms.js.map +1 -1
- package/build/home-link/index.js +1 -0
- package/build/home-link/index.js.map +1 -1
- package/build/html/index.js +1 -0
- package/build/html/index.js.map +1 -1
- package/build/image/edit.js +56 -5
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +4 -4
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +15 -4
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +5 -1
- package/build/image/index.js.map +1 -1
- package/build/index.js +12 -2
- package/build/index.js.map +1 -1
- package/build/latest-comments/index.js +1 -0
- package/build/latest-comments/index.js.map +1 -1
- package/build/latest-posts/deprecated.js +1 -0
- package/build/latest-posts/deprecated.js.map +1 -1
- package/build/latest-posts/edit.js +1 -1
- package/build/latest-posts/edit.js.map +1 -1
- package/build/latest-posts/index.js +1 -0
- package/build/latest-posts/index.js.map +1 -1
- package/build/list/index.js +1 -0
- package/build/list/index.js.map +1 -1
- package/build/loginout/index.js +1 -0
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/index.js +1 -0
- package/build/media-text/index.js.map +1 -1
- package/build/missing/index.js +1 -0
- package/build/missing/index.js.map +1 -1
- package/build/more/index.js +1 -0
- package/build/more/index.js.map +1 -1
- package/build/navigation/edit/index.js +37 -9
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +3 -1
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/overlay-menu-icon.js +36 -0
- package/build/navigation/edit/overlay-menu-icon.js.map +1 -0
- package/build/navigation/edit/placeholder/index.js +11 -7
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +11 -22
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/index.js +10 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +4 -1
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation/use-navigation-entities.js +6 -3
- package/build/navigation/use-navigation-entities.js.map +1 -1
- package/build/navigation-area/edit.js +2 -1
- package/build/navigation-area/edit.js.map +1 -1
- package/build/navigation-area/index.js +2 -1
- package/build/navigation-area/index.js.map +1 -1
- package/build/navigation-link/edit.js +7 -0
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/index.js +1 -0
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-submenu/edit.js +4 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/index.js +1 -0
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/nextpage/index.js +1 -0
- package/build/nextpage/index.js.map +1 -1
- package/build/page-list/edit.js +37 -10
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +6 -1
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.js +12 -2
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/index.js +2 -1
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +2 -1
- package/build/paragraph/transforms.js.map +1 -1
- package/build/pattern/index.js +1 -0
- package/build/pattern/index.js.map +1 -1
- package/build/post-author/index.js +2 -1
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-name/edit.js +98 -0
- package/build/post-author-name/edit.js.map +1 -0
- package/build/post-author-name/index.js +70 -0
- package/build/post-author-name/index.js.map +1 -0
- package/build/post-comment/index.js +1 -0
- package/build/post-comment/index.js.map +1 -1
- package/build/post-comments/index.js +1 -0
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-count/index.js +1 -0
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/index.js +1 -0
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +1 -0
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/index.js +1 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/index.js +1 -0
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +2 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +4 -0
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-excerpt/transforms.js +27 -0
- package/build/post-excerpt/transforms.js.map +1 -0
- package/build/post-featured-image/dimension-controls.js +74 -32
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +52 -20
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +4 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/index.js +1 -0
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/edit.js +34 -7
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +2 -1
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/index.js +1 -0
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/index.js +1 -0
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/edit.native.js +3 -6
- package/build/preformatted/edit.native.js.map +1 -1
- package/build/preformatted/index.js +1 -0
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/index.js +8 -1
- package/build/pullquote/index.js.map +1 -1
- package/build/query/deprecated.js +96 -3
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/index.js +4 -4
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +102 -0
- package/build/query/edit/inspector-controls/author-control.js.map +1 -0
- package/build/query/edit/inspector-controls/index.js +166 -0
- package/build/query/edit/inspector-controls/index.js.map +1 -0
- package/build/query/edit/inspector-controls/order-control.js +55 -0
- package/build/query/edit/inspector-controls/order-control.js.map +1 -0
- package/build/query/edit/inspector-controls/taxonomy-controls.js +158 -0
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -0
- package/build/query/index.js +3 -3
- package/build/query/utils.js +49 -38
- package/build/query/utils.js.map +1 -1
- package/build/query/variations.js +0 -4
- package/build/query/variations.js.map +1 -1
- package/build/query-pagination/index.js +2 -1
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination-next/index.js +2 -1
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-numbers/index.js +2 -1
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +2 -1
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/index.js +1 -0
- package/build/query-title/index.js.map +1 -1
- package/build/quote/index.js +1 -0
- package/build/quote/index.js.map +1 -1
- package/build/rss/index.js +1 -0
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +5 -3
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +2 -2
- package/build/search/edit.native.js.map +1 -1
- package/build/search/index.js +8 -1
- package/build/search/index.js.map +1 -1
- package/build/separator/index.js +1 -0
- package/build/separator/index.js.map +1 -1
- package/build/shortcode/index.js +1 -0
- package/build/shortcode/index.js.map +1 -1
- package/build/site-logo/edit.js +0 -25
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +5 -1
- package/build/site-logo/index.js.map +1 -1
- package/build/site-logo/transforms.js +31 -0
- package/build/site-logo/transforms.js.map +1 -0
- package/build/site-tagline/index.js +2 -1
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/index.js +4 -0
- package/build/site-title/index.js.map +1 -1
- package/build/site-title/transforms.js +31 -0
- package/build/site-title/transforms.js.map +1 -0
- package/build/social-link/index.js +2 -1
- package/build/social-link/index.js.map +1 -1
- package/build/social-links/edit.js +29 -23
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/index.js +2 -1
- package/build/social-links/index.js.map +1 -1
- package/build/spacer/controls.js +111 -0
- package/build/spacer/controls.js.map +1 -0
- package/build/spacer/controls.native.js +95 -0
- package/build/spacer/controls.native.js.map +1 -0
- package/build/spacer/deprecated.js +53 -0
- package/build/spacer/deprecated.js.map +1 -0
- package/build/spacer/edit.js +117 -98
- package/build/spacer/edit.js.map +1 -1
- package/build/spacer/edit.native.js +76 -0
- package/build/spacer/edit.native.js.map +1 -0
- package/build/spacer/index.js +8 -4
- package/build/spacer/index.js.map +1 -1
- package/build/spacer/save.js +6 -3
- package/build/spacer/save.js.map +1 -1
- package/build/table/index.js +7 -1
- package/build/table/index.js.map +1 -1
- package/build/table-of-contents/index.js +1 -0
- package/build/table-of-contents/index.js.map +1 -1
- package/build/tag-cloud/index.js +1 -0
- package/build/tag-cloud/index.js.map +1 -1
- package/build/template-part/index.js +1 -0
- package/build/template-part/index.js.map +1 -1
- package/build/term-description/index.js +1 -0
- package/build/term-description/index.js.map +1 -1
- package/build/text-columns/index.js +1 -0
- package/build/text-columns/index.js.map +1 -1
- package/build/verse/index.js +1 -0
- package/build/verse/index.js.map +1 -1
- package/build/video/index.js +1 -0
- package/build/video/index.js.map +1 -1
- package/build-module/archives/index.js +1 -0
- package/build-module/archives/index.js.map +1 -1
- package/build-module/audio/edit.js +17 -5
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/index.js +1 -0
- package/build-module/audio/index.js.map +1 -1
- package/build-module/block/index.js +1 -0
- package/build-module/block/index.js.map +1 -1
- package/build-module/button/edit.native.js +1 -1
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/index.js +5 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/buttons/edit.js +6 -0
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/buttons/edit.native.js +17 -7
- package/build-module/buttons/edit.native.js.map +1 -1
- package/build-module/buttons/index.js +1 -0
- package/build-module/buttons/index.js.map +1 -1
- package/build-module/buttons/transforms.js +1 -0
- package/build-module/buttons/transforms.js.map +1 -1
- package/build-module/calendar/index.js +1 -0
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/categories/index.js +1 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/code/index.js +6 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/column/index.js +1 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/index.js +11 -0
- package/build-module/columns/index.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +6 -3
- package/build-module/comment-author-avatar/edit.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +7 -2
- package/build-module/comment-author-avatar/index.js.map +1 -1
- package/build-module/comment-author-name/index.js +1 -0
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +1 -0
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +1 -0
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +2 -1
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +1 -0
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/edit.js +116 -26
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/index.js +4 -2
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comment-template/util.js +59 -0
- package/build-module/comment-template/util.js.map +1 -0
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +30 -0
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -0
- package/build-module/comments-pagination/edit.js +66 -0
- package/build-module/comments-pagination/edit.js.map +1 -0
- package/build-module/comments-pagination/index.js +57 -0
- package/build-module/comments-pagination/index.js.map +1 -0
- package/build-module/comments-pagination/save.js +10 -0
- package/build-module/comments-pagination/save.js.map +1 -0
- package/build-module/comments-pagination-next/edit.js +41 -0
- package/build-module/comments-pagination-next/edit.js.map +1 -0
- package/build-module/comments-pagination-next/index.js +53 -0
- package/build-module/comments-pagination-next/index.js.map +1 -0
- package/build-module/comments-pagination-numbers/edit.js +40 -0
- package/build-module/comments-pagination-numbers/edit.js.map +1 -0
- package/build-module/comments-pagination-numbers/index.js +33 -0
- package/build-module/comments-pagination-numbers/index.js.map +1 -0
- package/build-module/comments-pagination-previous/edit.js +41 -0
- package/build-module/comments-pagination-previous/edit.js.map +1 -0
- package/build-module/comments-pagination-previous/index.js +53 -0
- package/build-module/comments-pagination-previous/index.js.map +1 -0
- package/build-module/comments-query-loop/edit/comments-inspector-controls.js +91 -0
- package/build-module/comments-query-loop/edit/comments-inspector-controls.js.map +1 -0
- package/build-module/comments-query-loop/edit.js +24 -28
- package/build-module/comments-query-loop/edit.js.map +1 -1
- package/build-module/comments-query-loop/index.js +15 -7
- package/build-module/comments-query-loop/index.js.map +1 -1
- package/build-module/cover/edit.js +2 -1
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/edit.native.js +41 -34
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/index.js +1 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/overlay-color-settings.native.js +11 -1
- package/build-module/cover/overlay-color-settings.native.js.map +1 -1
- package/build-module/embed/deprecated.js +1 -0
- package/build-module/embed/deprecated.js.map +1 -1
- package/build-module/embed/edit.native.js +24 -21
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-controls.native.js +54 -0
- package/build-module/embed/embed-controls.native.js.map +1 -0
- package/build-module/embed/embed-link-settings.native.js +90 -0
- package/build-module/embed/embed-link-settings.native.js.map +1 -0
- package/build-module/embed/embed-loading.js +1 -2
- package/build-module/embed/embed-loading.js.map +1 -1
- package/build-module/embed/embed-placeholder.native.js +9 -2
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/embed/index.js +1 -0
- package/build-module/embed/index.js.map +1 -1
- package/build-module/embed/transforms.js +1 -0
- package/build-module/embed/transforms.js.map +1 -1
- package/build-module/embed/util.js +1 -0
- package/build-module/embed/util.js.map +1 -1
- package/build-module/file/edit.native.js +4 -2
- package/build-module/file/edit.native.js.map +1 -1
- package/build-module/file/index.js +1 -0
- package/build-module/file/index.js.map +1 -1
- package/build-module/freeform/index.js +1 -0
- package/build-module/freeform/index.js.map +1 -1
- package/build-module/gallery/deprecated.js +4 -0
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +32 -13
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.native.js +1 -1
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/index.js +1 -0
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/group/index.js +19 -1
- package/build-module/group/index.js.map +1 -1
- package/build-module/heading/edit.js +3 -1
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/index.js +1 -0
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +1 -0
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/home-link/index.js +1 -0
- package/build-module/home-link/index.js.map +1 -1
- package/build-module/html/index.js +1 -0
- package/build-module/html/index.js.map +1 -1
- package/build-module/image/edit.js +52 -4
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +4 -4
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +16 -5
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +5 -1
- package/build-module/image/index.js.map +1 -1
- package/build-module/index.js +7 -2
- package/build-module/index.js.map +1 -1
- package/build-module/latest-comments/index.js +1 -0
- package/build-module/latest-comments/index.js.map +1 -1
- package/build-module/latest-posts/deprecated.js +1 -0
- package/build-module/latest-posts/deprecated.js.map +1 -1
- package/build-module/latest-posts/edit.js +1 -1
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/latest-posts/index.js +1 -0
- package/build-module/latest-posts/index.js.map +1 -1
- package/build-module/list/index.js +1 -0
- package/build-module/list/index.js.map +1 -1
- package/build-module/loginout/index.js +1 -0
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/media-text/index.js +1 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/missing/index.js +1 -0
- package/build-module/missing/index.js.map +1 -1
- package/build-module/more/index.js +1 -0
- package/build-module/more/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +36 -9
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +3 -1
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-icon.js +28 -0
- package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -0
- package/build-module/navigation/edit/placeholder/index.js +11 -7
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +10 -21
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/index.js +10 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +4 -1
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation/use-navigation-entities.js +6 -3
- package/build-module/navigation/use-navigation-entities.js.map +1 -1
- package/build-module/navigation-area/edit.js +2 -1
- package/build-module/navigation-area/edit.js.map +1 -1
- package/build-module/navigation-area/index.js +2 -1
- package/build-module/navigation-area/index.js.map +1 -1
- package/build-module/navigation-link/edit.js +7 -0
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/index.js +1 -0
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +4 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/navigation-submenu/index.js +1 -0
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/nextpage/index.js +1 -0
- package/build-module/nextpage/index.js.map +1 -1
- package/build-module/page-list/edit.js +38 -11
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +6 -1
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.js +13 -3
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/index.js +2 -1
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +2 -1
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/pattern/index.js +1 -0
- package/build-module/pattern/index.js.map +1 -1
- package/build-module/post-author/index.js +2 -1
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-name/edit.js +85 -0
- package/build-module/post-author-name/edit.js.map +1 -0
- package/build-module/post-author-name/index.js +61 -0
- package/build-module/post-author-name/index.js.map +1 -0
- package/build-module/post-comment/index.js +1 -0
- package/build-module/post-comment/index.js.map +1 -1
- package/build-module/post-comments/index.js +1 -0
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +1 -0
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +1 -0
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +1 -0
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/index.js +1 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/index.js +1 -0
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +2 -1
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +3 -0
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-excerpt/transforms.js +18 -0
- package/build-module/post-excerpt/transforms.js.map +1 -0
- package/build-module/post-featured-image/dimension-controls.js +76 -31
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +54 -22
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +4 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/index.js +1 -0
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/edit.js +34 -7
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +2 -1
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/index.js +1 -0
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/index.js +1 -0
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/edit.native.js +3 -3
- package/build-module/preformatted/edit.native.js.map +1 -1
- package/build-module/preformatted/index.js +1 -0
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/index.js +8 -1
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/query/deprecated.js +95 -4
- package/build-module/query/deprecated.js.map +1 -1
- package/build-module/query/edit/index.js +3 -3
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +89 -0
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/index.js +149 -0
- package/build-module/query/edit/inspector-controls/index.js.map +1 -0
- package/build-module/query/edit/inspector-controls/order-control.js +45 -0
- package/build-module/query/edit/inspector-controls/order-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +145 -0
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -0
- package/build-module/query/index.js +3 -3
- package/build-module/query/utils.js +43 -35
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query/variations.js +0 -4
- package/build-module/query/variations.js.map +1 -1
- package/build-module/query-pagination/index.js +2 -1
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination-next/index.js +2 -1
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +2 -1
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +2 -1
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/index.js +1 -0
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/index.js +1 -0
- package/build-module/quote/index.js.map +1 -1
- package/build-module/rss/index.js +1 -0
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +5 -3
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +2 -2
- 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/separator/index.js +1 -0
- package/build-module/separator/index.js.map +1 -1
- package/build-module/shortcode/index.js +1 -0
- package/build-module/shortcode/index.js.map +1 -1
- package/build-module/site-logo/edit.js +0 -25
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +4 -1
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-logo/transforms.js +22 -0
- package/build-module/site-logo/transforms.js.map +1 -0
- package/build-module/site-tagline/index.js +2 -1
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/index.js +3 -0
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/site-title/transforms.js +22 -0
- package/build-module/site-title/transforms.js.map +1 -0
- package/build-module/social-link/index.js +2 -1
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/social-links/edit.js +29 -23
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/index.js +2 -1
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/spacer/controls.js +101 -0
- package/build-module/spacer/controls.js.map +1 -0
- package/build-module/spacer/controls.native.js +82 -0
- package/build-module/spacer/controls.native.js.map +1 -0
- package/build-module/spacer/deprecated.js +44 -0
- package/build-module/spacer/deprecated.js.map +1 -0
- package/build-module/spacer/edit.js +114 -95
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/spacer/edit.native.js +61 -0
- package/build-module/spacer/edit.native.js.map +1 -0
- package/build-module/spacer/index.js +7 -4
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/spacer/save.js +6 -3
- package/build-module/spacer/save.js.map +1 -1
- package/build-module/table/index.js +7 -1
- package/build-module/table/index.js.map +1 -1
- package/build-module/table-of-contents/index.js +1 -0
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/tag-cloud/index.js +1 -0
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/template-part/index.js +1 -0
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/term-description/index.js +1 -0
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/text-columns/index.js +1 -0
- package/build-module/text-columns/index.js.map +1 -1
- package/build-module/verse/index.js +1 -0
- package/build-module/verse/index.js.map +1 -1
- package/build-module/video/index.js +1 -0
- package/build-module/video/index.js.map +1 -1
- package/build-style/audio/editor-rtl.css +11 -0
- package/build-style/audio/editor.css +11 -0
- package/build-style/code/theme-rtl.css +5 -3
- package/build-style/code/theme.css +5 -3
- package/build-style/columns/editor-rtl.css +0 -10
- package/build-style/columns/editor.css +0 -10
- package/build-style/columns/style-rtl.css +8 -21
- package/build-style/columns/style.css +8 -21
- package/build-style/comment-template/style-rtl.css +91 -0
- package/build-style/comment-template/style.css +91 -0
- package/build-style/{home-link/style.css → comments-pagination/editor-rtl.css} +18 -22
- package/build-style/comments-pagination/editor.css +102 -0
- package/build-style/{home-link → comments-pagination}/style-rtl.css +21 -21
- package/build-style/comments-pagination/style.css +106 -0
- package/build-style/comments-pagination-numbers/editor-rtl.css +85 -0
- package/build-style/comments-pagination-numbers/editor.css +86 -0
- package/build-style/comments-query-loop/editor-rtl.css +79 -0
- package/build-style/comments-query-loop/editor.css +79 -0
- package/build-style/common-rtl.css +19 -0
- package/build-style/common.css +19 -0
- package/build-style/cover/style-rtl.css +4 -0
- package/build-style/cover/style.css +4 -0
- package/build-style/editor-rtl.css +96 -58
- package/build-style/editor.css +99 -58
- package/build-style/embed/editor-rtl.css +0 -12
- package/build-style/embed/editor.css +0 -12
- package/build-style/gallery/editor-rtl.css +7 -18
- package/build-style/gallery/editor.css +7 -18
- package/build-style/gallery/style-rtl.css +3 -0
- package/build-style/gallery/style.css +3 -0
- package/build-style/group/theme-rtl.css +1 -1
- package/build-style/group/theme.css +1 -1
- package/build-style/latest-posts/editor-rtl.css +7 -0
- package/build-style/latest-posts/editor.css +7 -0
- package/build-style/latest-posts/style-rtl.css +0 -9
- package/build-style/latest-posts/style.css +0 -9
- package/build-style/navigation/editor-rtl.css +16 -2
- package/build-style/navigation/editor.css +16 -2
- package/build-style/navigation/style-rtl.css +18 -7
- package/build-style/navigation/style.css +18 -7
- package/build-style/page-list/editor-rtl.css +9 -5
- package/build-style/page-list/editor.css +9 -5
- package/build-style/post-comments/style-rtl.css +9 -4
- package/build-style/post-comments/style.css +9 -4
- package/build-style/post-featured-image/editor-rtl.css +0 -7
- package/build-style/post-featured-image/editor.css +0 -7
- package/build-style/post-featured-image/style-rtl.css +1 -1
- package/build-style/post-featured-image/style.css +1 -1
- package/build-style/post-template/style-rtl.css +4 -0
- package/build-style/post-template/style.css +4 -0
- package/build-style/post-title/style-rtl.css +3 -0
- package/build-style/post-title/style.css +3 -0
- package/build-style/pullquote/style-rtl.css +1 -0
- package/build-style/pullquote/style.css +1 -0
- package/build-style/query-pagination/editor-rtl.css +0 -4
- package/build-style/query-pagination/editor.css +0 -4
- package/build-style/social-links/editor-rtl.css +3 -0
- package/build-style/social-links/editor.css +3 -0
- package/build-style/social-links/style-rtl.css +1 -0
- package/build-style/social-links/style.css +1 -0
- package/build-style/spacer/editor-rtl.css +4 -0
- package/build-style/spacer/editor.css +4 -0
- package/build-style/style-rtl.css +141 -87
- package/build-style/style.css +143 -87
- package/build-style/table/style-rtl.css +1 -0
- package/build-style/table/style.css +1 -0
- package/build-style/tag-cloud/style-rtl.css +8 -0
- package/build-style/tag-cloud/style.css +8 -0
- package/build-style/theme-rtl.css +6 -4
- package/build-style/theme.css +6 -4
- package/package.json +30 -30
- package/src/archives/block.json +1 -0
- package/src/archives/index.php +5 -9
- package/src/audio/block.json +1 -0
- package/src/audio/edit.js +18 -2
- package/src/audio/editor.scss +14 -0
- package/src/audio/test/__snapshots__/edit.native.js.snap +22 -0
- package/src/audio/test/edit.native.js +24 -11
- package/src/block/block.json +1 -0
- package/src/block/index.php +7 -2
- package/src/block/test/edit.native.js +10 -12
- package/src/button/block.json +5 -1
- package/src/button/edit.native.js +1 -1
- package/src/buttons/block.json +2 -1
- package/src/buttons/edit.js +17 -0
- package/src/buttons/edit.native.js +17 -5
- package/src/buttons/test/__snapshots__/edit.native.js.snap +27 -0
- package/src/buttons/test/edit.native.js +75 -45
- package/src/calendar/block.json +1 -0
- package/src/calendar/index.php +35 -39
- package/src/categories/block.json +1 -0
- package/src/categories/index.php +1 -1
- package/src/code/block.json +6 -1
- package/src/code/theme.scss +6 -4
- package/src/column/block.json +1 -0
- package/src/columns/block.json +11 -0
- package/src/columns/editor.scss +0 -15
- package/src/columns/style.scss +15 -36
- package/src/comment-author-avatar/block.json +7 -2
- package/src/comment-author-avatar/edit.js +9 -2
- package/src/comment-author-avatar/index.php +25 -6
- package/src/comment-author-name/block.json +1 -0
- package/src/comment-content/block.json +1 -0
- package/src/comment-date/block.json +1 -0
- package/src/comment-date/index.php +2 -2
- package/src/comment-edit-link/block.json +1 -0
- package/src/comment-edit-link/index.js +1 -1
- package/src/comment-reply-link/block.json +1 -0
- package/src/comment-template/block.json +4 -2
- package/src/comment-template/edit.js +127 -42
- package/src/comment-template/index.php +46 -19
- package/src/comment-template/style.scss +17 -0
- package/src/comment-template/test/index.js +45 -0
- package/src/comment-template/util.js +56 -0
- package/src/comments-pagination/block.json +37 -0
- package/src/comments-pagination/comments-pagination-arrow-controls.js +44 -0
- package/src/comments-pagination/edit.js +83 -0
- package/src/comments-pagination/editor.scss +34 -0
- package/src/comments-pagination/index.js +20 -0
- package/src/comments-pagination/index.php +39 -0
- package/src/comments-pagination/save.js +8 -0
- package/src/comments-pagination/style.scss +38 -0
- package/src/comments-pagination-next/block.json +35 -0
- package/src/comments-pagination-next/edit.js +44 -0
- package/src/comments-pagination-next/index.js +18 -0
- package/src/comments-pagination-next/index.php +62 -0
- package/src/comments-pagination-numbers/block.json +15 -0
- package/src/comments-pagination-numbers/edit.js +22 -0
- package/src/comments-pagination-numbers/editor.scss +12 -0
- package/src/comments-pagination-numbers/index.js +18 -0
- package/src/comments-pagination-numbers/index.php +69 -0
- package/src/comments-pagination-previous/block.json +35 -0
- package/src/comments-pagination-previous/edit.js +44 -0
- package/src/comments-pagination-previous/index.js +18 -0
- package/src/comments-pagination-previous/index.php +52 -0
- package/src/comments-query-loop/block.json +15 -7
- package/src/comments-query-loop/edit/comments-inspector-controls.js +93 -0
- package/src/comments-query-loop/edit.js +22 -27
- package/src/comments-query-loop/editor.scss +3 -0
- package/src/common.scss +19 -0
- package/src/cover/block.json +1 -0
- package/src/cover/edit.js +1 -0
- package/src/cover/edit.native.js +35 -19
- package/src/cover/overlay-color-settings.native.js +10 -0
- package/src/cover/style.scss +4 -0
- package/src/cover/test/__snapshots__/edit.native.js.snap +33 -0
- package/src/cover/test/edit.native.js +280 -17
- package/src/editor.scss +3 -0
- package/src/embed/block.json +1 -0
- package/src/embed/edit.native.js +23 -18
- package/src/embed/editor.scss +0 -15
- package/src/embed/embed-controls.native.js +65 -0
- package/src/embed/embed-link-settings.native.js +100 -0
- package/src/embed/embed-loading.js +0 -2
- package/src/embed/embed-placeholder.native.js +8 -0
- package/src/embed/test/__snapshots__/index.native.js.snap +10 -0
- package/src/embed/test/index.native.js +236 -95
- package/src/file/block.json +1 -0
- package/src/file/edit.native.js +6 -2
- package/src/file/index.php +2 -2
- package/src/file/test/__snapshots__/edit.native.js.snap +18 -5
- package/src/file/test/edit.native.js +30 -12
- package/src/freeform/block.json +1 -0
- package/src/gallery/block.json +1 -0
- package/src/gallery/deprecated.js +4 -0
- package/src/gallery/edit.js +42 -11
- package/src/gallery/editor.scss +8 -22
- package/src/gallery/gallery.native.js +1 -1
- package/src/gallery/style.scss +4 -0
- package/src/gallery/test/use-get-new-images.js +93 -0
- package/src/group/block.json +19 -1
- package/src/group/theme.scss +4 -5
- package/src/heading/block.json +1 -0
- package/src/heading/edit.js +2 -1
- package/src/home-link/block.json +1 -0
- package/src/home-link/index.php +3 -3
- package/src/html/block.json +1 -0
- package/src/image/block.json +5 -1
- package/src/image/edit.js +44 -0
- package/src/image/edit.native.js +4 -4
- package/src/image/image.js +14 -3
- package/src/image/index.php +2 -2
- package/src/image/test/edit.native.js +27 -7
- package/src/index.js +10 -0
- package/src/latest-comments/block.json +1 -0
- package/src/latest-comments/index.php +5 -5
- package/src/latest-posts/block.json +1 -0
- package/src/latest-posts/edit.js +1 -1
- package/src/latest-posts/editor.scss +10 -0
- package/src/latest-posts/index.php +14 -12
- package/src/latest-posts/style.scss +0 -12
- package/src/list/block.json +1 -0
- package/src/list/test/edit.native.js +3 -3
- package/src/loginout/block.json +1 -0
- package/src/media-text/block.json +1 -0
- package/src/missing/block.json +1 -0
- package/src/missing/test/__snapshots__/edit.native.js.snap +5 -0
- package/src/missing/test/edit-integration.native.js +2 -2
- package/src/missing/test/edit.native.js +26 -30
- package/src/more/block.json +1 -0
- package/src/navigation/README.md +13 -0
- package/src/navigation/block.json +12 -10
- package/src/navigation/edit/index.js +71 -21
- package/src/navigation/edit/inner-blocks.js +3 -1
- package/src/navigation/edit/overlay-menu-icon.js +21 -0
- package/src/navigation/edit/placeholder/index.js +20 -9
- package/src/navigation/edit/responsive-wrapper.js +12 -13
- package/src/navigation/editor.scss +18 -3
- package/src/navigation/index.php +17 -10
- package/src/navigation/menu-items-to-blocks.js +2 -1
- package/src/navigation/style.scss +24 -7
- package/src/navigation/use-navigation-entities.js +3 -1
- package/src/navigation-area/block.json +3 -7
- package/src/navigation-area/edit.js +2 -1
- package/src/navigation-link/block.json +2 -3
- package/src/navigation-link/edit.js +5 -0
- package/src/navigation-link/index.php +3 -3
- package/src/navigation-submenu/block.json +2 -3
- package/src/navigation-submenu/edit.js +3 -1
- package/src/navigation-submenu/index.php +7 -7
- package/src/nextpage/block.json +1 -0
- package/src/page-list/block.json +4 -0
- package/src/page-list/edit.js +47 -9
- package/src/page-list/editor.scss +8 -5
- package/src/page-list/index.php +15 -10
- package/src/paragraph/block.json +2 -1
- package/src/paragraph/edit.js +12 -4
- package/src/paragraph/test/edit.native.js +4 -13
- package/src/pattern/block.json +1 -0
- package/src/post-author/block.json +2 -1
- package/src/post-author/index.php +1 -1
- package/src/post-author-name/block.json +43 -0
- package/src/post-author-name/edit.js +95 -0
- package/src/post-author-name/index.js +18 -0
- package/src/post-author-name/index.php +49 -0
- package/src/post-comment/block.json +1 -0
- package/src/post-comments/block.json +1 -0
- package/src/post-comments/style.scss +10 -4
- package/src/post-comments-count/block.json +1 -0
- package/src/post-comments-form/block.json +6 -1
- package/src/post-comments-link/block.json +1 -0
- package/src/post-comments-link/index.php +7 -7
- package/src/post-content/block.json +1 -0
- package/src/post-content/index.php +1 -1
- package/src/post-date/block.json +1 -0
- package/src/post-date/index.php +2 -2
- package/src/post-excerpt/block.json +1 -0
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-excerpt/index.js +2 -0
- package/src/post-excerpt/index.php +1 -1
- package/src/post-excerpt/transforms.js +23 -0
- package/src/post-featured-image/block.json +4 -0
- package/src/post-featured-image/dimension-controls.js +103 -51
- package/src/post-featured-image/edit.js +61 -22
- package/src/post-featured-image/editor.scss +0 -8
- package/src/post-featured-image/index.php +3 -2
- package/src/post-featured-image/style.scss +1 -1
- package/src/post-navigation-link/block.json +1 -0
- package/src/post-navigation-link/index.php +4 -4
- package/src/post-template/block.json +2 -1
- package/src/post-template/edit.js +27 -7
- package/src/post-template/index.php +2 -2
- package/src/post-template/style.scss +5 -0
- package/src/post-terms/block.json +1 -0
- package/src/post-terms/index.php +1 -1
- package/src/post-title/block.json +1 -0
- package/src/post-title/index.php +1 -1
- package/src/post-title/style.scss +6 -2
- package/src/preformatted/block.json +1 -0
- package/src/preformatted/edit.native.js +4 -4
- package/src/preformatted/test/__snapshots__/edit.native.js.snap +53 -14
- package/src/preformatted/test/edit.native.js +11 -10
- package/src/pullquote/block.json +8 -1
- package/src/pullquote/style.scss +1 -0
- package/src/query/block.json +3 -3
- package/src/query/deprecated.js +80 -3
- package/src/query/edit/index.js +3 -3
- package/src/query/edit/inspector-controls/author-control.js +78 -0
- package/src/query/edit/inspector-controls/index.js +163 -0
- package/src/query/edit/inspector-controls/order-control.js +41 -0
- package/src/query/edit/inspector-controls/taxonomy-controls.js +118 -0
- package/src/query/test/utils.js +6 -4
- package/src/query/utils.js +45 -35
- package/src/query/variations.js +0 -4
- package/src/query-pagination/block.json +2 -1
- package/src/query-pagination/editor.scss +0 -4
- package/src/query-pagination-next/block.json +2 -1
- package/src/query-pagination-next/index.php +2 -1
- package/src/query-pagination-numbers/block.json +2 -1
- package/src/query-pagination-previous/block.json +2 -1
- package/src/query-pagination-previous/index.php +2 -1
- package/src/query-title/block.json +1 -0
- package/src/quote/block.json +1 -0
- package/src/rss/block.json +1 -0
- package/src/search/block.json +8 -1
- package/src/search/edit.js +2 -1
- package/src/search/edit.native.js +2 -5
- package/src/search/index.php +21 -11
- package/src/search/test/__snapshots__/edit.native.js.snap +7 -15
- package/src/search/test/edit.native.js +32 -24
- package/src/separator/block.json +1 -0
- package/src/shortcode/block.json +1 -0
- package/src/site-logo/block.json +1 -0
- package/src/site-logo/edit.js +1 -32
- package/src/site-logo/index.js +2 -0
- package/src/site-logo/index.php +1 -1
- package/src/site-logo/transforms.js +21 -0
- package/src/site-tagline/block.json +2 -1
- package/src/site-tagline/index.php +1 -1
- package/src/site-title/block.json +1 -0
- package/src/site-title/index.js +2 -0
- package/src/site-title/index.php +4 -4
- package/src/site-title/transforms.js +21 -0
- package/src/social-link/block.json +2 -1
- package/src/social-link/index.php +3 -3
- package/src/social-links/block.json +3 -8
- package/src/social-links/edit.js +29 -26
- package/src/social-links/editor.scss +7 -0
- package/src/social-links/style.scss +3 -0
- package/src/spacer/block.json +4 -3
- package/src/spacer/controls.js +108 -0
- package/src/spacer/controls.native.js +82 -0
- package/src/spacer/deprecated.js +41 -0
- package/src/spacer/edit.js +133 -132
- package/src/spacer/edit.native.js +68 -0
- package/src/spacer/editor.scss +6 -0
- package/src/spacer/index.js +2 -0
- package/src/spacer/save.js +5 -2
- package/src/style.scss +3 -2
- package/src/table/block.json +7 -1
- package/src/table/style.scss +1 -0
- package/src/table-of-contents/block.json +1 -0
- package/src/table-of-contents/index.php +3 -3
- package/src/tag-cloud/block.json +1 -0
- package/src/tag-cloud/index.php +9 -0
- package/src/tag-cloud/style.scss +9 -0
- package/src/template-part/block.json +1 -0
- package/src/template-part/index.php +6 -6
- package/src/term-description/block.json +1 -0
- package/src/text-columns/block.json +1 -0
- package/src/verse/block.json +1 -0
- package/src/verse/test/edit.native.js +7 -10
- package/src/video/block.json +1 -0
- package/build/comments-query-loop/toolbar.js +0 -58
- package/build/comments-query-loop/toolbar.js.map +0 -1
- package/build/embed/embed-bottom-sheet.native.js +0 -85
- package/build/embed/embed-bottom-sheet.native.js.map +0 -1
- package/build/query/edit/query-inspector-controls.js +0 -275
- package/build/query/edit/query-inspector-controls.js.map +0 -1
- package/build-module/comments-query-loop/toolbar.js +0 -48
- package/build-module/comments-query-loop/toolbar.js.map +0 -1
- package/build-module/embed/embed-bottom-sheet.native.js +0 -74
- package/build-module/embed/embed-bottom-sheet.native.js.map +0 -1
- package/build-module/query/edit/query-inspector-controls.js +0 -261
- package/build-module/query/edit/query-inspector-controls.js.map +0 -1
- package/src/comments-query-loop/toolbar.js +0 -57
- package/src/embed/embed-bottom-sheet.native.js +0 -78
- package/src/home-link/style.scss +0 -51
- package/src/query/edit/query-inspector-controls.js +0 -281
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { debounce } from 'lodash';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import {
|
|
10
|
+
PanelBody,
|
|
11
|
+
TextControl,
|
|
12
|
+
SelectControl,
|
|
13
|
+
RangeControl,
|
|
14
|
+
ToggleControl,
|
|
15
|
+
Notice,
|
|
16
|
+
} from '@wordpress/components';
|
|
17
|
+
import { __ } from '@wordpress/i18n';
|
|
18
|
+
import { InspectorControls } from '@wordpress/block-editor';
|
|
19
|
+
import { useEffect, useState, useCallback } from '@wordpress/element';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Internal dependencies
|
|
23
|
+
*/
|
|
24
|
+
import OrderControl from './order-control';
|
|
25
|
+
import AuthorControl from './author-control';
|
|
26
|
+
import TaxonomyControls from './taxonomy-controls';
|
|
27
|
+
import { usePostTypes } from '../../utils';
|
|
28
|
+
|
|
29
|
+
const stickyOptions = [
|
|
30
|
+
{ label: __( 'Include' ), value: '' },
|
|
31
|
+
{ label: __( 'Exclude' ), value: 'exclude' },
|
|
32
|
+
{ label: __( 'Only' ), value: 'only' },
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
export default function QueryInspectorControls( {
|
|
36
|
+
attributes: { query, displayLayout },
|
|
37
|
+
setQuery,
|
|
38
|
+
setDisplayLayout,
|
|
39
|
+
} ) {
|
|
40
|
+
const {
|
|
41
|
+
order,
|
|
42
|
+
orderBy,
|
|
43
|
+
author: authorIds,
|
|
44
|
+
postType,
|
|
45
|
+
sticky,
|
|
46
|
+
inherit,
|
|
47
|
+
taxQuery,
|
|
48
|
+
} = query;
|
|
49
|
+
const [ showSticky, setShowSticky ] = useState( postType === 'post' );
|
|
50
|
+
const { postTypesTaxonomiesMap, postTypesSelectOptions } = usePostTypes();
|
|
51
|
+
useEffect( () => {
|
|
52
|
+
setShowSticky( postType === 'post' );
|
|
53
|
+
}, [ postType ] );
|
|
54
|
+
const onPostTypeChange = ( newValue ) => {
|
|
55
|
+
const updateQuery = { postType: newValue };
|
|
56
|
+
// We need to dynamically update the `taxQuery` property,
|
|
57
|
+
// by removing any not supported taxonomy from the query.
|
|
58
|
+
const supportedTaxonomies = postTypesTaxonomiesMap[ newValue ];
|
|
59
|
+
const updatedTaxQuery = Object.entries( taxQuery || {} ).reduce(
|
|
60
|
+
( accumulator, [ taxonomySlug, terms ] ) => {
|
|
61
|
+
if ( supportedTaxonomies.includes( taxonomySlug ) ) {
|
|
62
|
+
accumulator[ taxonomySlug ] = terms;
|
|
63
|
+
}
|
|
64
|
+
return accumulator;
|
|
65
|
+
},
|
|
66
|
+
{}
|
|
67
|
+
);
|
|
68
|
+
updateQuery.taxQuery = !! Object.keys( updatedTaxQuery ).length
|
|
69
|
+
? updatedTaxQuery
|
|
70
|
+
: undefined;
|
|
71
|
+
|
|
72
|
+
if ( newValue !== 'post' ) {
|
|
73
|
+
updateQuery.sticky = '';
|
|
74
|
+
}
|
|
75
|
+
setQuery( updateQuery );
|
|
76
|
+
};
|
|
77
|
+
const [ querySearch, setQuerySearch ] = useState( query.search );
|
|
78
|
+
const onChangeDebounced = useCallback(
|
|
79
|
+
debounce( () => {
|
|
80
|
+
if ( query.search !== querySearch ) {
|
|
81
|
+
setQuery( { search: querySearch } );
|
|
82
|
+
}
|
|
83
|
+
}, 250 ),
|
|
84
|
+
[ querySearch, query.search ]
|
|
85
|
+
);
|
|
86
|
+
useEffect( () => {
|
|
87
|
+
onChangeDebounced();
|
|
88
|
+
return onChangeDebounced.cancel;
|
|
89
|
+
}, [ querySearch, onChangeDebounced ] );
|
|
90
|
+
return (
|
|
91
|
+
<InspectorControls>
|
|
92
|
+
<PanelBody title={ __( 'Settings' ) }>
|
|
93
|
+
<ToggleControl
|
|
94
|
+
label={ __( 'Inherit query from template' ) }
|
|
95
|
+
help={ __(
|
|
96
|
+
'Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently.'
|
|
97
|
+
) }
|
|
98
|
+
checked={ !! inherit }
|
|
99
|
+
onChange={ ( value ) => setQuery( { inherit: !! value } ) }
|
|
100
|
+
/>
|
|
101
|
+
{ ! inherit && (
|
|
102
|
+
<SelectControl
|
|
103
|
+
options={ postTypesSelectOptions }
|
|
104
|
+
value={ postType }
|
|
105
|
+
label={ __( 'Post type' ) }
|
|
106
|
+
onChange={ onPostTypeChange }
|
|
107
|
+
help={ __(
|
|
108
|
+
'WordPress contains different types of content and they are divided into collections called "Post types". By default there are a few different ones such as blog posts and pages, but plugins could add more.'
|
|
109
|
+
) }
|
|
110
|
+
/>
|
|
111
|
+
) }
|
|
112
|
+
{ displayLayout?.type === 'flex' && (
|
|
113
|
+
<>
|
|
114
|
+
<RangeControl
|
|
115
|
+
label={ __( 'Columns' ) }
|
|
116
|
+
value={ displayLayout.columns }
|
|
117
|
+
onChange={ ( value ) =>
|
|
118
|
+
setDisplayLayout( { columns: value } )
|
|
119
|
+
}
|
|
120
|
+
min={ 2 }
|
|
121
|
+
max={ Math.max( 6, displayLayout.columns ) }
|
|
122
|
+
/>
|
|
123
|
+
{ displayLayout.columns > 6 && (
|
|
124
|
+
<Notice status="warning" isDismissible={ false }>
|
|
125
|
+
{ __(
|
|
126
|
+
'This column count exceeds the recommended amount and may cause visual breakage.'
|
|
127
|
+
) }
|
|
128
|
+
</Notice>
|
|
129
|
+
) }
|
|
130
|
+
</>
|
|
131
|
+
) }
|
|
132
|
+
{ ! inherit && (
|
|
133
|
+
<OrderControl
|
|
134
|
+
{ ...{ order, orderBy } }
|
|
135
|
+
onChange={ setQuery }
|
|
136
|
+
/>
|
|
137
|
+
) }
|
|
138
|
+
{ showSticky && (
|
|
139
|
+
<SelectControl
|
|
140
|
+
label={ __( 'Sticky posts' ) }
|
|
141
|
+
options={ stickyOptions }
|
|
142
|
+
value={ sticky }
|
|
143
|
+
onChange={ ( value ) => setQuery( { sticky: value } ) }
|
|
144
|
+
help={ __(
|
|
145
|
+
'Blog posts can be "stickied", a feature that places them at the top of the front page of posts, keeping it there until new sticky posts are published.'
|
|
146
|
+
) }
|
|
147
|
+
/>
|
|
148
|
+
) }
|
|
149
|
+
</PanelBody>
|
|
150
|
+
{ ! inherit && (
|
|
151
|
+
<PanelBody title={ __( 'Filters' ) }>
|
|
152
|
+
<TaxonomyControls onChange={ setQuery } query={ query } />
|
|
153
|
+
<AuthorControl value={ authorIds } onChange={ setQuery } />
|
|
154
|
+
<TextControl
|
|
155
|
+
label={ __( 'Keyword' ) }
|
|
156
|
+
value={ querySearch }
|
|
157
|
+
onChange={ setQuerySearch }
|
|
158
|
+
/>
|
|
159
|
+
</PanelBody>
|
|
160
|
+
) }
|
|
161
|
+
</InspectorControls>
|
|
162
|
+
);
|
|
163
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { SelectControl } from '@wordpress/components';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
|
|
7
|
+
const orderOptions = [
|
|
8
|
+
{
|
|
9
|
+
label: __( 'Newest to oldest' ),
|
|
10
|
+
value: 'date/desc',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: __( 'Oldest to newest' ),
|
|
14
|
+
value: 'date/asc',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
/* translators: label for ordering posts by title in ascending order */
|
|
18
|
+
label: __( 'A → Z' ),
|
|
19
|
+
value: 'title/asc',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
/* translators: label for ordering posts by title in descending order */
|
|
23
|
+
label: __( 'Z → A' ),
|
|
24
|
+
value: 'title/desc',
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
function OrderControl( { order, orderBy, onChange } ) {
|
|
28
|
+
return (
|
|
29
|
+
<SelectControl
|
|
30
|
+
label={ __( 'Order by' ) }
|
|
31
|
+
value={ `${ orderBy }/${ order }` }
|
|
32
|
+
options={ orderOptions }
|
|
33
|
+
onChange={ ( value ) => {
|
|
34
|
+
const [ newOrderBy, newOrder ] = value.split( '/' );
|
|
35
|
+
onChange( { order: newOrder, orderBy: newOrderBy } );
|
|
36
|
+
} }
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default OrderControl;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { FormTokenField } from '@wordpress/components';
|
|
5
|
+
import { useSelect } from '@wordpress/data';
|
|
6
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Internal dependencies
|
|
10
|
+
*/
|
|
11
|
+
import { getEntitiesInfo, useTaxonomies } from '../../utils';
|
|
12
|
+
import { MAX_FETCHED_TERMS } from '../../constants';
|
|
13
|
+
|
|
14
|
+
// Helper function to get the term id based on user input in terms `FormTokenField`.
|
|
15
|
+
const getTermIdByTermValue = ( termsMappedByName, termValue ) => {
|
|
16
|
+
// First we check for exact match by `term.id` or case sensitive `term.name` match.
|
|
17
|
+
const termId = termValue?.id || termsMappedByName[ termValue ]?.id;
|
|
18
|
+
if ( termId ) return termId;
|
|
19
|
+
/**
|
|
20
|
+
* Here we make an extra check for entered terms in a non case sensitive way,
|
|
21
|
+
* to match user expectations, due to `FormTokenField` behaviour that shows
|
|
22
|
+
* suggestions which are case insensitive.
|
|
23
|
+
*
|
|
24
|
+
* Although WP tries to discourage users to add terms with the same name (case insensitive),
|
|
25
|
+
* it's still possible if you manually change the name, as long as the terms have different slugs.
|
|
26
|
+
* In this edge case we always apply the first match from the terms list.
|
|
27
|
+
*/
|
|
28
|
+
const termValueLower = termValue.toLocaleLowerCase();
|
|
29
|
+
for ( const term in termsMappedByName ) {
|
|
30
|
+
if ( term.toLocaleLowerCase() === termValueLower ) {
|
|
31
|
+
return termsMappedByName[ term ].id;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
function TaxonomyControls( { onChange, query } ) {
|
|
37
|
+
const taxonomies = useTaxonomies( query.postType );
|
|
38
|
+
const taxonomiesInfo = useSelect(
|
|
39
|
+
( select ) => {
|
|
40
|
+
const { getEntityRecords } = select( coreStore );
|
|
41
|
+
const termsQuery = { per_page: MAX_FETCHED_TERMS };
|
|
42
|
+
const _taxonomiesInfo = taxonomies?.map( ( { slug, name } ) => {
|
|
43
|
+
const _terms = getEntityRecords( 'taxonomy', slug, termsQuery );
|
|
44
|
+
return {
|
|
45
|
+
slug,
|
|
46
|
+
name,
|
|
47
|
+
terms: getEntitiesInfo( _terms ),
|
|
48
|
+
};
|
|
49
|
+
} );
|
|
50
|
+
return _taxonomiesInfo;
|
|
51
|
+
},
|
|
52
|
+
[ taxonomies ]
|
|
53
|
+
);
|
|
54
|
+
const onTermsChange = ( taxonomySlug ) => ( newTermValues ) => {
|
|
55
|
+
const taxonomyInfo = taxonomiesInfo.find(
|
|
56
|
+
( { slug } ) => slug === taxonomySlug
|
|
57
|
+
);
|
|
58
|
+
if ( ! taxonomyInfo ) return;
|
|
59
|
+
const termIds = Array.from(
|
|
60
|
+
newTermValues.reduce( ( accumulator, termValue ) => {
|
|
61
|
+
const termId = getTermIdByTermValue(
|
|
62
|
+
taxonomyInfo.terms.mapByName,
|
|
63
|
+
termValue
|
|
64
|
+
);
|
|
65
|
+
if ( termId ) accumulator.add( termId );
|
|
66
|
+
return accumulator;
|
|
67
|
+
}, new Set() )
|
|
68
|
+
);
|
|
69
|
+
const newTaxQuery = {
|
|
70
|
+
...query.taxQuery,
|
|
71
|
+
[ taxonomySlug ]: termIds,
|
|
72
|
+
};
|
|
73
|
+
onChange( { taxQuery: newTaxQuery } );
|
|
74
|
+
};
|
|
75
|
+
// Returns only the existing term ids in proper format to be
|
|
76
|
+
// used in `FormTokenField`. This prevents the component from
|
|
77
|
+
// crashing in the editor, when non existing term ids were provided.
|
|
78
|
+
const getExistingTaxQueryValue = ( taxonomySlug ) => {
|
|
79
|
+
const taxonomyInfo = taxonomiesInfo.find(
|
|
80
|
+
( { slug } ) => slug === taxonomySlug
|
|
81
|
+
);
|
|
82
|
+
if ( ! taxonomyInfo ) return [];
|
|
83
|
+
return ( query.taxQuery?.[ taxonomySlug ] || [] ).reduce(
|
|
84
|
+
( accumulator, termId ) => {
|
|
85
|
+
const term = taxonomyInfo.terms.mapById[ termId ];
|
|
86
|
+
if ( term ) {
|
|
87
|
+
accumulator.push( {
|
|
88
|
+
id: termId,
|
|
89
|
+
value: term.name,
|
|
90
|
+
} );
|
|
91
|
+
}
|
|
92
|
+
return accumulator;
|
|
93
|
+
},
|
|
94
|
+
[]
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
return (
|
|
98
|
+
<>
|
|
99
|
+
{ !! taxonomiesInfo?.length &&
|
|
100
|
+
taxonomiesInfo.map( ( { slug, name, terms } ) => {
|
|
101
|
+
if ( ! terms?.names?.length ) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
return (
|
|
105
|
+
<FormTokenField
|
|
106
|
+
key={ slug }
|
|
107
|
+
label={ name }
|
|
108
|
+
value={ getExistingTaxQueryValue( slug ) }
|
|
109
|
+
suggestions={ terms.names }
|
|
110
|
+
onChange={ onTermsChange( slug ) }
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
|
+
} ) }
|
|
114
|
+
</>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export default TaxonomyControls;
|
package/src/query/test/utils.js
CHANGED
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { terms } from './fixtures';
|
|
5
|
-
import {
|
|
5
|
+
import { getEntitiesInfo } from '../utils';
|
|
6
6
|
|
|
7
7
|
describe( 'Query block utils', () => {
|
|
8
|
-
describe( '
|
|
8
|
+
describe( 'getEntitiesInfo', () => {
|
|
9
9
|
it( 'should return an empty object when no terms provided', () => {
|
|
10
|
-
expect(
|
|
10
|
+
expect( getEntitiesInfo() ).toEqual( {
|
|
11
|
+
terms: undefined,
|
|
12
|
+
} );
|
|
11
13
|
} );
|
|
12
14
|
it( 'should return proper terms info object', () => {
|
|
13
|
-
expect(
|
|
15
|
+
expect( getEntitiesInfo( terms ) ).toEqual(
|
|
14
16
|
expect.objectContaining( {
|
|
15
17
|
mapById: expect.objectContaining( {
|
|
16
18
|
4: expect.objectContaining( { name: 'nba' } ),
|
package/src/query/utils.js
CHANGED
|
@@ -6,53 +6,43 @@ import { useMemo } from '@wordpress/element';
|
|
|
6
6
|
import { store as coreStore } from '@wordpress/core-data';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @typedef {Object} WPTerm
|
|
14
|
-
* @property {number} id Unique identifier for the term.
|
|
15
|
-
* @property {number} count Number of published posts for the term.
|
|
16
|
-
* @property {string} description HTML description of the term.
|
|
17
|
-
* @property {string} link URL of the term.
|
|
18
|
-
* @property {string} name HTML title for the term.
|
|
19
|
-
* @property {string} slug An alphanumeric identifier for the term unique to its type.
|
|
20
|
-
* @property {string} taxonomy Type attribution for the term.
|
|
21
|
-
* @property {Object} meta Meta fields
|
|
22
|
-
* @property {number} [parent] The parent term ID.
|
|
9
|
+
* @typedef IHasNameAndId
|
|
10
|
+
* @property {string|number} id The entity's id.
|
|
11
|
+
* @property {string} name The entity's name.
|
|
23
12
|
*/
|
|
24
13
|
|
|
25
14
|
/**
|
|
26
15
|
* The object used in Query block that contains info and helper mappings
|
|
27
|
-
* from an array of
|
|
16
|
+
* from an array of IHasNameAndId objects.
|
|
28
17
|
*
|
|
29
|
-
* @typedef {Object}
|
|
30
|
-
* @property {
|
|
31
|
-
* @property {Object<string,
|
|
32
|
-
* @property {Object<string,
|
|
33
|
-
* @property {string[]}
|
|
18
|
+
* @typedef {Object} QueryEntitiesInfo
|
|
19
|
+
* @property {IHasNameAndId[]} entities The array of entities.
|
|
20
|
+
* @property {Object<string, IHasNameAndId>} mapById Object mapping with the id as key and the entity as value.
|
|
21
|
+
* @property {Object<string, IHasNameAndId>} mapByName Object mapping with the name as key and the entity as value.
|
|
22
|
+
* @property {string[]} names Array with the entities' names.
|
|
34
23
|
*/
|
|
35
24
|
|
|
36
25
|
/**
|
|
37
|
-
* Returns a helper object with mapping from
|
|
26
|
+
* Returns a helper object with mapping from Objects that implement
|
|
27
|
+
* the `IHasNameAndId` interface. The returned object is used for
|
|
28
|
+
* integration with `FormTokenField` component.
|
|
38
29
|
*
|
|
39
|
-
* @param {
|
|
40
|
-
* @return {
|
|
30
|
+
* @param {IHasNameAndId[]} entities The entities to extract of helper object.
|
|
31
|
+
* @return {QueryEntitiesInfo} The object with the entities information.
|
|
41
32
|
*/
|
|
42
|
-
export const
|
|
43
|
-
const mapping =
|
|
44
|
-
( accumulator,
|
|
33
|
+
export const getEntitiesInfo = ( entities ) => {
|
|
34
|
+
const mapping = entities?.reduce(
|
|
35
|
+
( accumulator, entity ) => {
|
|
45
36
|
const { mapById, mapByName, names } = accumulator;
|
|
46
|
-
mapById[
|
|
47
|
-
mapByName[
|
|
48
|
-
names.push(
|
|
37
|
+
mapById[ entity.id ] = entity;
|
|
38
|
+
mapByName[ entity.name ] = entity;
|
|
39
|
+
names.push( entity.name );
|
|
49
40
|
return accumulator;
|
|
50
41
|
},
|
|
51
42
|
{ mapById: {}, mapByName: {}, names: [] }
|
|
52
43
|
);
|
|
53
|
-
|
|
54
44
|
return {
|
|
55
|
-
|
|
45
|
+
entities,
|
|
56
46
|
...mapping,
|
|
57
47
|
};
|
|
58
48
|
};
|
|
@@ -65,16 +55,14 @@ export const getTermsInfo = ( terms ) => {
|
|
|
65
55
|
* @return {Object} The helper object related to post types.
|
|
66
56
|
*/
|
|
67
57
|
export const usePostTypes = () => {
|
|
68
|
-
const
|
|
58
|
+
const postTypes = useSelect( ( select ) => {
|
|
69
59
|
const { getPostTypes } = select( coreStore );
|
|
70
60
|
const excludedPostTypes = [ 'attachment' ];
|
|
71
61
|
const filteredPostTypes = getPostTypes( { per_page: -1 } )?.filter(
|
|
72
62
|
( { viewable, slug } ) =>
|
|
73
63
|
viewable && ! excludedPostTypes.includes( slug )
|
|
74
64
|
);
|
|
75
|
-
return
|
|
76
|
-
postTypes: filteredPostTypes,
|
|
77
|
-
};
|
|
65
|
+
return filteredPostTypes;
|
|
78
66
|
}, [] );
|
|
79
67
|
const postTypesTaxonomiesMap = useMemo( () => {
|
|
80
68
|
if ( ! postTypes?.length ) return;
|
|
@@ -94,6 +82,28 @@ export const usePostTypes = () => {
|
|
|
94
82
|
return { postTypesTaxonomiesMap, postTypesSelectOptions };
|
|
95
83
|
};
|
|
96
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Hook that returns the taxonomies associated with a specific post type.
|
|
87
|
+
*
|
|
88
|
+
* @param {string} postType The post type from which to retrieve the associated taxonomies.
|
|
89
|
+
* @return {Object[]} An array of the associated taxonomies.
|
|
90
|
+
*/
|
|
91
|
+
export const useTaxonomies = ( postType ) => {
|
|
92
|
+
const taxonomies = useSelect(
|
|
93
|
+
( select ) => {
|
|
94
|
+
const { getTaxonomies } = select( coreStore );
|
|
95
|
+
const filteredTaxonomies = getTaxonomies( {
|
|
96
|
+
type: postType,
|
|
97
|
+
per_page: -1,
|
|
98
|
+
context: 'view',
|
|
99
|
+
} );
|
|
100
|
+
return filteredTaxonomies;
|
|
101
|
+
},
|
|
102
|
+
[ postType ]
|
|
103
|
+
);
|
|
104
|
+
return taxonomies;
|
|
105
|
+
};
|
|
106
|
+
|
|
97
107
|
/**
|
|
98
108
|
* Recurses over a list of blocks and returns the first found
|
|
99
109
|
* Query Loop block's clientId.
|
package/src/query/variations.js
CHANGED
|
@@ -20,8 +20,6 @@ const QUERY_DEFAULT_ATTRIBUTES = {
|
|
|
20
20
|
pages: 0,
|
|
21
21
|
offset: 0,
|
|
22
22
|
postType: 'post',
|
|
23
|
-
categoryIds: [],
|
|
24
|
-
tagIds: [],
|
|
25
23
|
order: 'desc',
|
|
26
24
|
orderBy: 'date',
|
|
27
25
|
author: '',
|
|
@@ -46,8 +44,6 @@ const variations = [
|
|
|
46
44
|
pages: 1,
|
|
47
45
|
offset: 0,
|
|
48
46
|
postType: 'post',
|
|
49
|
-
categoryIds: [],
|
|
50
|
-
tagIds: [],
|
|
51
47
|
order: 'desc',
|
|
52
48
|
orderBy: 'date',
|
|
53
49
|
author: '',
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
2
3
|
"apiVersion": 2,
|
|
3
4
|
"name": "core/query-pagination",
|
|
4
5
|
"title": "Pagination",
|
|
5
|
-
"category": "
|
|
6
|
+
"category": "theme",
|
|
6
7
|
"parent": [ "core/query" ],
|
|
7
8
|
"description": "Displays a paginated navigation to next/previous set of posts, when applicable.",
|
|
8
9
|
"textdomain": "default",
|
|
@@ -14,10 +14,6 @@ $pagination-margin: 0.5em;
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.block-library-query-pagination-toolbar__popover .components-popover__content {
|
|
18
|
-
min-width: 230px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
17
|
.wp-block-query-pagination {
|
|
22
18
|
> .wp-block-query-pagination-next,
|
|
23
19
|
> .wp-block-query-pagination-previous,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
2
3
|
"apiVersion": 2,
|
|
3
4
|
"name": "core/query-pagination-next",
|
|
4
5
|
"title": "Next Page",
|
|
5
|
-
"category": "
|
|
6
|
+
"category": "theme",
|
|
6
7
|
"parent": [ "core/query-pagination" ],
|
|
7
8
|
"description": "Displays the next posts page link.",
|
|
8
9
|
"textdomain": "default",
|
|
@@ -23,6 +23,7 @@ function render_block_core_query_pagination_next( $attributes, $content, $block
|
|
|
23
23
|
$default_label = __( 'Next Page' );
|
|
24
24
|
$label = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
|
|
25
25
|
$pagination_arrow = get_query_pagination_arrow( $block, true );
|
|
26
|
+
|
|
26
27
|
if ( $pagination_arrow ) {
|
|
27
28
|
$label .= $pagination_arrow;
|
|
28
29
|
}
|
|
@@ -50,7 +51,7 @@ function render_block_core_query_pagination_next( $attributes, $content, $block
|
|
|
50
51
|
'<a href="%1$s" %2$s>%3$s</a>',
|
|
51
52
|
esc_url( add_query_arg( $page_key, $page + 1 ) ),
|
|
52
53
|
$wrapper_attributes,
|
|
53
|
-
$label
|
|
54
|
+
esc_html( $label )
|
|
54
55
|
);
|
|
55
56
|
}
|
|
56
57
|
wp_reset_postdata(); // Restore original Post Data.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
2
3
|
"apiVersion": 2,
|
|
3
4
|
"name": "core/query-pagination-numbers",
|
|
4
5
|
"title": "Page Numbers",
|
|
5
|
-
"category": "
|
|
6
|
+
"category": "theme",
|
|
6
7
|
"parent": [ "core/query-pagination" ],
|
|
7
8
|
"description": "Displays a list of page numbers for pagination",
|
|
8
9
|
"textdomain": "default",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
2
3
|
"apiVersion": 2,
|
|
3
4
|
"name": "core/query-pagination-previous",
|
|
4
5
|
"title": "Previous Page",
|
|
5
|
-
"category": "
|
|
6
|
+
"category": "theme",
|
|
6
7
|
"parent": [ "core/query-pagination" ],
|
|
7
8
|
"description": "Displays the previous posts page link.",
|
|
8
9
|
"textdomain": "default",
|
|
@@ -32,6 +32,7 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl
|
|
|
32
32
|
$filter_link_attributes = function() use ( $wrapper_attributes ) {
|
|
33
33
|
return $wrapper_attributes;
|
|
34
34
|
};
|
|
35
|
+
|
|
35
36
|
add_filter( 'previous_posts_link_attributes', $filter_link_attributes );
|
|
36
37
|
$content = get_previous_posts_link( $label );
|
|
37
38
|
remove_filter( 'previous_posts_link_attributes', $filter_link_attributes );
|
|
@@ -40,7 +41,7 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl
|
|
|
40
41
|
'<a href="%1$s" %2$s>%3$s</a>',
|
|
41
42
|
esc_url( add_query_arg( $page_key, $page - 1 ) ),
|
|
42
43
|
$wrapper_attributes,
|
|
43
|
-
$label
|
|
44
|
+
esc_html( $label )
|
|
44
45
|
);
|
|
45
46
|
}
|
|
46
47
|
return $content;
|
package/src/quote/block.json
CHANGED
package/src/rss/block.json
CHANGED
package/src/search/block.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
2
3
|
"apiVersion": 2,
|
|
3
4
|
"name": "core/search",
|
|
4
5
|
"title": "Search",
|
|
@@ -48,7 +49,13 @@
|
|
|
48
49
|
"__experimentalBorder": {
|
|
49
50
|
"color": true,
|
|
50
51
|
"radius": true,
|
|
51
|
-
"
|
|
52
|
+
"width": true,
|
|
53
|
+
"__experimentalSkipSerialization": true,
|
|
54
|
+
"__experimentalDefaultControls": {
|
|
55
|
+
"color": true,
|
|
56
|
+
"radius": true,
|
|
57
|
+
"width": true
|
|
58
|
+
}
|
|
52
59
|
},
|
|
53
60
|
"html": false
|
|
54
61
|
},
|
package/src/search/edit.js
CHANGED
|
@@ -103,6 +103,7 @@ export default function SearchEdit( {
|
|
|
103
103
|
}, [ insertedInNavigationBlock ] );
|
|
104
104
|
const borderRadius = style?.border?.radius;
|
|
105
105
|
const borderColor = style?.border?.color;
|
|
106
|
+
const borderWidth = style?.border?.width;
|
|
106
107
|
const borderProps = useBorderProps( attributes );
|
|
107
108
|
|
|
108
109
|
// Check for old deprecated numerical border radius. Done as a separate
|
|
@@ -128,7 +129,6 @@ export default function SearchEdit( {
|
|
|
128
129
|
const getBlockClassNames = () => {
|
|
129
130
|
return classnames(
|
|
130
131
|
className,
|
|
131
|
-
! isButtonPositionInside ? borderProps.className : undefined,
|
|
132
132
|
isButtonPositionInside
|
|
133
133
|
? 'wp-block-search__button-inside'
|
|
134
134
|
: undefined,
|
|
@@ -389,6 +389,7 @@ export default function SearchEdit( {
|
|
|
389
389
|
const getWrapperStyles = () => {
|
|
390
390
|
const styles = {
|
|
391
391
|
borderColor,
|
|
392
|
+
borderWidth: isButtonPositionInside ? borderWidth : undefined,
|
|
392
393
|
};
|
|
393
394
|
|
|
394
395
|
const isNonZeroBorderRadius = parseInt( borderRadius, 10 ) !== 0;
|
|
@@ -78,7 +78,7 @@ export default function SearchEdit( {
|
|
|
78
78
|
* properly creating accessibilityLabel text.
|
|
79
79
|
*/
|
|
80
80
|
useEffect( () => {
|
|
81
|
-
AccessibilityInfo.addEventListener(
|
|
81
|
+
const a11yInfoChangeSubscription = AccessibilityInfo.addEventListener(
|
|
82
82
|
'screenReaderChanged',
|
|
83
83
|
handleScreenReaderToggled
|
|
84
84
|
);
|
|
@@ -90,10 +90,7 @@ export default function SearchEdit( {
|
|
|
90
90
|
);
|
|
91
91
|
|
|
92
92
|
return () => {
|
|
93
|
-
|
|
94
|
-
'screenReaderChanged',
|
|
95
|
-
handleScreenReaderToggled
|
|
96
|
-
);
|
|
93
|
+
a11yInfoChangeSubscription.remove();
|
|
97
94
|
};
|
|
98
95
|
}, [] );
|
|
99
96
|
|