@wordpress/block-library 8.2.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/babel-plugin.js +1 -1
- package/build/archives/index.js +1 -0
- package/build/archives/index.js.map +1 -1
- package/build/avatar/index.js +1 -0
- package/build/avatar/index.js.map +1 -1
- package/build/block/edit.js +1 -0
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.js +2 -1
- package/build/button/edit.js.map +1 -1
- package/build/button/index.js +1 -0
- package/build/button/index.js.map +1 -1
- package/build/buttons/edit.js +0 -2
- package/build/buttons/edit.js.map +1 -1
- package/build/calendar/index.js +1 -0
- package/build/calendar/index.js.map +1 -1
- package/build/categories/edit.js +3 -3
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +1 -0
- package/build/categories/index.js.map +1 -1
- package/build/column/edit.native.js +2 -1
- package/build/column/edit.native.js.map +1 -1
- package/build/columns/deprecated.js +1 -1
- package/build/columns/deprecated.js.map +1 -1
- package/build/comment-author-avatar/index.js +1 -0
- 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 +1 -0
- 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/index.js +1 -0
- package/build/comment-template/index.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +1 -1
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments/index.js +2 -1
- package/build/comments/index.js.map +1 -1
- package/build/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build/comments-pagination/edit.js +3 -14
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-pagination/index.js +1 -0
- package/build/comments-pagination/index.js.map +1 -1
- package/build/comments-pagination-next/index.js +1 -0
- package/build/comments-pagination-next/index.js.map +1 -1
- package/build/comments-pagination-numbers/index.js +1 -0
- package/build/comments-pagination-numbers/index.js.map +1 -1
- package/build/comments-pagination-previous/index.js +1 -0
- package/build/comments-pagination-previous/index.js.map +1 -1
- package/build/cover/deprecated.js +153 -30
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/index.js +4 -3
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +45 -4
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/edit.native.js +0 -4
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/index.js +4 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/save.js +3 -2
- package/build/cover/save.js.map +1 -1
- package/build/embed/variations.js +1 -1
- package/build/embed/variations.js.map +1 -1
- package/build/experiments.js +19 -0
- package/build/experiments.js.map +1 -0
- package/build/gallery/deprecated.js +6 -4
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +48 -7
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +8 -34
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/v1/edit.js +5 -5
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/group/deprecated.js +1 -1
- package/build/group/deprecated.js.map +1 -1
- package/build/group/edit.js +1 -2
- package/build/group/edit.js.map +1 -1
- package/build/heading/index.js +1 -7
- package/build/heading/index.js.map +1 -1
- package/build/home-link/index.js +1 -0
- package/build/home-link/index.js.map +1 -1
- package/build/image/edit.native.js +2 -2
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +12 -15
- package/build/image/image.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/index.js +1 -0
- package/build/latest-posts/index.js.map +1 -1
- package/build/list/ordered-list-settings.js +1 -0
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/loginout/index.js +1 -0
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/edit.js +2 -4
- package/build/media-text/edit.js.map +1 -1
- package/build/missing/edit.native.js +4 -4
- package/build/missing/edit.native.js.map +1 -1
- package/build/navigation/edit/deleted-navigation-warning.js +31 -0
- package/build/navigation/edit/deleted-navigation-warning.js.map +1 -0
- package/build/navigation/edit/index.js +19 -11
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +0 -5
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/manage-menus-button.js +9 -2
- package/build/navigation/edit/manage-menus-button.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +29 -47
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +0 -1
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/navigation-menu-name-control.js +1 -0
- package/build/navigation/edit/navigation-menu-name-control.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +11 -52
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +1 -0
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +1 -6
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/index.js +5 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +0 -2
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation-link/edit.js +17 -8
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +4 -0
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/index.js +13 -3
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/page-list/edit.js +153 -132
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +2 -11
- package/build/page-list/index.js.map +1 -1
- package/build/page-list/{convert-to-navigation-links.js → use-convert-to-navigation-links.js} +41 -9
- package/build/page-list/use-convert-to-navigation-links.js.map +1 -0
- package/build/page-list-item/edit.js +4 -2
- package/build/page-list-item/edit.js.map +1 -1
- package/build/page-list-item/index.js +1 -1
- package/build/page-list-item/index.js.map +1 -1
- package/build/paragraph/edit.js +1 -1
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/index.js +1 -7
- package/build/paragraph/index.js.map +1 -1
- package/build/post-author/index.js +1 -0
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/index.js +1 -0
- package/build/post-author-biography/index.js.map +1 -1
- package/build/post-author-name/index.js +1 -1
- package/build/post-comment/edit.js +1 -0
- package/build/post-comment/edit.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/edit.js +1 -20
- package/build/post-content/edit.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 +6 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +1 -0
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +2 -1
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +39 -22
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +1 -0
- package/build/post-featured-image/index.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-navigation-link/edit.js +1 -0
- package/build/post-navigation-link/edit.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 +6 -4
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +1 -0
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/edit.js +5 -4
- package/build/post-terms/edit.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/edit.js +1 -0
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +1 -0
- package/build/post-title/index.js.map +1 -1
- package/build/query/deprecated.js +90 -1
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/index.js +2 -50
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +1 -0
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/pattern-selection-modal.js +88 -0
- package/build/query/edit/pattern-selection-modal.js.map +1 -0
- package/build/query/edit/query-content.js +3 -24
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +2 -2
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/edit/query-toolbar.js +6 -11
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query/index.js +1 -0
- package/build/query/index.js.map +1 -1
- package/build/query/utils.js +25 -3
- package/build/query/utils.js.map +1 -1
- package/build/query-no-results/index.js +1 -0
- package/build/query-no-results/index.js.map +1 -1
- package/build/query-pagination/edit.js +3 -14
- package/build/query-pagination/edit.js.map +1 -1
- package/build/query-pagination/index.js +1 -0
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/build/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build/query-pagination-next/index.js +1 -0
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-numbers/index.js +1 -0
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +1 -0
- 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/read-more/index.js +1 -0
- package/build/read-more/index.js.map +1 -1
- package/build/rss/edit.js +5 -2
- package/build/rss/edit.js.map +1 -1
- package/build/rss/index.js +1 -0
- package/build/rss/index.js.map +1 -1
- package/build/search/index.js +1 -0
- package/build/search/index.js.map +1 -1
- package/build/site-logo/edit.js +9 -13
- 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-tagline/index.js +1 -0
- package/build/site-tagline/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 +3 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/index.js +1 -0
- package/build/social-link/index.js.map +1 -1
- package/build/social-links/edit.js +3 -14
- package/build/social-links/edit.js.map +1 -1
- package/build/table/edit.js +9 -5
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +15 -0
- 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 +1 -1
- package/build/table/state.js.map +1 -1
- package/build/table/transforms.js +47 -3
- package/build/table/transforms.js.map +1 -1
- package/build/table/utils.js +26 -0
- package/build/table/utils.js.map +1 -0
- package/build/tag-cloud/edit.js +3 -9
- package/build/tag-cloud/edit.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/edit/advanced-controls.js +2 -1
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/index.js +0 -1
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +3 -3
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/title-modal.js +6 -5
- package/build/template-part/edit/title-modal.js.map +1 -1
- package/build/template-part/edit/utils/hooks.js +2 -2
- package/build/template-part/edit/utils/hooks.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/utils/init-block.js +1 -1
- package/build/utils/init-block.js.map +1 -1
- package/build/utils/init-block.native.js +1 -1
- package/build/utils/init-block.native.js.map +1 -1
- package/build/{template-part/edit/utils/search.js → utils/search-patterns.js} +3 -1
- package/build/utils/search-patterns.js.map +1 -0
- package/build/video/tracks-editor.js +17 -11
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/archives/index.js +1 -0
- package/build-module/archives/index.js.map +1 -1
- package/build-module/avatar/index.js +1 -0
- package/build-module/avatar/index.js.map +1 -1
- package/build-module/block/edit.js +1 -0
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.js +2 -1
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/index.js +1 -0
- package/build-module/button/index.js.map +1 -1
- package/build-module/buttons/edit.js +0 -2
- package/build-module/buttons/edit.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/edit.js +2 -2
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +1 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/column/edit.native.js +2 -1
- package/build-module/column/edit.native.js.map +1 -1
- package/build-module/columns/deprecated.js +1 -1
- package/build-module/columns/deprecated.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +1 -0
- 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 +1 -0
- 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/index.js +1 -0
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments/index.js +2 -1
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build-module/comments-pagination/edit.js +3 -14
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-pagination/index.js +1 -0
- package/build-module/comments-pagination/index.js.map +1 -1
- package/build-module/comments-pagination-next/index.js +1 -0
- package/build-module/comments-pagination-next/index.js.map +1 -1
- package/build-module/comments-pagination-numbers/index.js +1 -0
- package/build-module/comments-pagination-numbers/index.js.map +1 -1
- package/build-module/comments-pagination-previous/index.js +1 -0
- package/build-module/comments-pagination-previous/index.js.map +1 -1
- package/build-module/cover/deprecated.js +155 -31
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/index.js +4 -3
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +46 -5
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/edit.native.js +0 -4
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/index.js +4 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/save.js +3 -2
- package/build-module/cover/save.js.map +1 -1
- package/build-module/embed/variations.js +1 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/experiments.js +9 -0
- package/build-module/experiments.js.map +1 -0
- package/build-module/gallery/deprecated.js +6 -3
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +50 -10
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +9 -35
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/v1/edit.js +6 -6
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/group/deprecated.js +1 -1
- package/build-module/group/deprecated.js.map +1 -1
- package/build-module/group/edit.js +1 -2
- package/build-module/group/edit.js.map +1 -1
- package/build-module/heading/index.js +1 -6
- package/build-module/heading/index.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/image/edit.native.js +2 -2
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +14 -17
- package/build-module/image/image.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/index.js +1 -0
- package/build-module/latest-posts/index.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +1 -0
- package/build-module/list/ordered-list-settings.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/edit.js +2 -3
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/missing/edit.native.js +4 -4
- package/build-module/missing/edit.native.js.map +1 -1
- package/build-module/navigation/edit/deleted-navigation-warning.js +21 -0
- package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -0
- package/build-module/navigation/edit/index.js +18 -11
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +0 -5
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/manage-menus-button.js +10 -3
- package/build-module/navigation/edit/manage-menus-button.js.map +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +28 -47
- package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +0 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-name-control.js +1 -0
- package/build-module/navigation/edit/navigation-menu-name-control.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +13 -54
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +1 -0
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +1 -6
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/index.js +5 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +0 -2
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation-link/edit.js +16 -7
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +4 -0
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/navigation-submenu/index.js +14 -4
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/page-list/edit.js +155 -132
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +3 -12
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/page-list/{convert-to-navigation-links.js → use-convert-to-navigation-links.js} +37 -7
- package/build-module/page-list/use-convert-to-navigation-links.js.map +1 -0
- package/build-module/page-list-item/edit.js +3 -2
- package/build-module/page-list-item/edit.js.map +1 -1
- package/build-module/page-list-item/index.js +1 -1
- package/build-module/page-list-item/index.js.map +1 -1
- package/build-module/paragraph/edit.js +1 -1
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/index.js +1 -6
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/post-author/index.js +1 -0
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/index.js +1 -0
- package/build-module/post-author-biography/index.js.map +1 -1
- package/build-module/post-author-name/index.js +1 -1
- package/build-module/post-comment/edit.js +1 -0
- package/build-module/post-comment/edit.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/edit.js +2 -20
- package/build-module/post-content/edit.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 +6 -1
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +1 -0
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +2 -1
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +39 -22
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +1 -0
- package/build-module/post-featured-image/index.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-navigation-link/edit.js +1 -0
- package/build-module/post-navigation-link/edit.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 +6 -4
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +1 -0
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/edit.js +4 -3
- package/build-module/post-terms/edit.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/edit.js +1 -0
- package/build-module/post-title/edit.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/query/deprecated.js +87 -1
- package/build-module/query/deprecated.js.map +1 -1
- package/build-module/query/edit/index.js +4 -50
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +1 -0
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/pattern-selection-modal.js +75 -0
- package/build-module/query/edit/pattern-selection-modal.js.map +1 -0
- package/build-module/query/edit/query-content.js +4 -25
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +2 -2
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +6 -10
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/index.js +1 -0
- package/build-module/query/index.js.map +1 -1
- package/build-module/query/utils.js +21 -2
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query-no-results/index.js +1 -0
- package/build-module/query-no-results/index.js.map +1 -1
- package/build-module/query-pagination/edit.js +3 -14
- package/build-module/query-pagination/edit.js.map +1 -1
- package/build-module/query-pagination/index.js +1 -0
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build-module/query-pagination-next/index.js +1 -0
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +1 -0
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +1 -0
- 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/read-more/index.js +1 -0
- package/build-module/read-more/index.js.map +1 -1
- package/build-module/rss/edit.js +6 -3
- package/build-module/rss/edit.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/index.js +1 -0
- package/build-module/search/index.js.map +1 -1
- package/build-module/site-logo/edit.js +10 -14
- 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-tagline/index.js +1 -0
- package/build-module/site-tagline/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 +3 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/index.js +1 -0
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/social-links/edit.js +3 -14
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/table/edit.js +9 -5
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +15 -0
- 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 +1 -1
- package/build-module/table/state.js.map +1 -1
- package/build-module/table/transforms.js +46 -3
- package/build-module/table/transforms.js.map +1 -1
- package/build-module/table/utils.js +19 -0
- package/build-module/table/utils.js.map +1 -0
- package/build-module/tag-cloud/edit.js +4 -9
- package/build-module/tag-cloud/edit.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/edit/advanced-controls.js +2 -1
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +0 -1
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +1 -1
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/title-modal.js +7 -6
- package/build-module/template-part/edit/title-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/hooks.js +2 -2
- package/build-module/template-part/edit/utils/hooks.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/utils/init-block.js +1 -1
- package/build-module/utils/init-block.js.map +1 -1
- package/build-module/utils/init-block.native.js +1 -1
- package/build-module/utils/init-block.native.js.map +1 -1
- package/build-module/{template-part/edit/utils/search.js → utils/search-patterns.js} +3 -5
- package/build-module/utils/search-patterns.js.map +1 -0
- package/build-module/video/tracks-editor.js +18 -12
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/editor-rtl.css +14 -67
- package/build-style/editor.css +14 -67
- package/build-style/query/editor-rtl.css +11 -14
- package/build-style/query/editor.css +11 -14
- package/build-style/rss/editor-rtl.css +3 -16
- package/build-style/rss/editor.css +3 -16
- package/build-style/table/editor-rtl.css +0 -3
- package/build-style/table/editor.css +0 -3
- package/build-style/video/editor-rtl.css +0 -34
- package/build-style/video/editor.css +0 -34
- package/package.json +30 -29
- package/src/archives/block.json +1 -0
- package/src/avatar/block.json +1 -0
- package/src/block/edit.js +1 -0
- package/src/button/block.json +1 -0
- package/src/button/edit.js +2 -1
- package/src/buttons/edit.js +2 -2
- package/src/calendar/block.json +1 -0
- package/src/calendar/index.php +3 -1
- package/src/categories/block.json +1 -0
- package/src/categories/edit.js +2 -2
- package/src/column/edit.native.js +6 -1
- package/src/columns/deprecated.js +1 -1
- package/src/comment-author-avatar/block.json +1 -0
- package/src/comment-author-name/block.json +1 -0
- package/src/comment-author-name/index.php +6 -3
- package/src/comment-content/block.json +1 -0
- package/src/comment-content/index.php +6 -3
- package/src/comment-date/block.json +1 -0
- package/src/comment-date/index.php +1 -1
- package/src/comment-edit-link/block.json +1 -0
- package/src/comment-edit-link/index.php +6 -3
- package/src/comment-reply-link/block.json +1 -0
- package/src/comment-reply-link/index.php +6 -3
- package/src/comment-template/block.json +1 -0
- package/src/comments/block.json +2 -1
- package/src/comments/edit/comments-inspector-controls.js +1 -1
- package/src/comments-pagination/block.json +1 -0
- package/src/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/src/comments-pagination/edit.js +1 -13
- package/src/comments-pagination/index.php +4 -1
- package/src/comments-pagination-next/block.json +1 -0
- package/src/comments-pagination-numbers/block.json +1 -0
- package/src/comments-pagination-previous/block.json +1 -0
- package/src/cover/block.json +4 -0
- package/src/cover/deprecated.js +173 -6
- package/src/cover/edit/index.js +5 -4
- package/src/cover/edit/inspector-controls.js +45 -2
- package/src/cover/edit.native.js +0 -3
- package/src/cover/save.js +3 -2
- package/src/embed/variations.js +1 -1
- package/src/experiments.js +10 -0
- package/src/gallery/deprecated.js +2 -3
- package/src/gallery/edit.js +66 -5
- package/src/gallery/gallery.js +27 -44
- package/src/gallery/v1/edit.js +8 -9
- package/src/group/deprecated.js +3 -1
- package/src/group/edit.js +1 -2
- package/src/heading/index.js +1 -6
- package/src/home-link/block.json +1 -0
- package/src/image/edit.native.js +2 -3
- package/src/image/image.js +17 -22
- package/src/latest-comments/block.json +1 -0
- package/src/latest-posts/block.json +1 -0
- package/src/latest-posts/index.php +9 -10
- package/src/list/ordered-list-settings.js +1 -0
- package/src/loginout/block.json +1 -0
- package/src/media-text/edit.js +3 -7
- package/src/missing/edit.native.js +3 -4
- package/src/missing/test/edit.native.js +2 -2
- package/src/navigation/block.json +2 -0
- package/src/navigation/edit/deleted-navigation-warning.js +19 -0
- package/src/navigation/edit/index.js +22 -24
- package/src/navigation/edit/inner-blocks.js +0 -6
- package/src/navigation/edit/manage-menus-button.js +24 -13
- package/src/navigation/edit/menu-inspector-controls.js +38 -73
- package/src/navigation/edit/navigation-menu-delete-control.js +0 -1
- package/src/navigation/edit/navigation-menu-name-control.js +1 -0
- package/src/navigation/edit/navigation-menu-selector.js +12 -77
- package/src/navigation/edit/overlay-menu-preview.js +1 -0
- package/src/navigation/edit/placeholder/index.js +0 -6
- package/src/navigation/index.js +3 -0
- package/src/navigation/index.php +25 -7
- package/src/navigation/menu-items-to-blocks.js +0 -2
- package/src/navigation-link/edit.js +16 -7
- package/src/navigation-link/index.php +0 -32
- package/src/navigation-submenu/edit.js +4 -0
- package/src/navigation-submenu/index.js +8 -2
- package/src/navigation-submenu/index.php +0 -32
- package/src/page-list/block.json +1 -0
- package/src/page-list/edit.js +196 -161
- package/src/page-list/index.js +2 -8
- package/src/page-list/test/convert-to-links-modal.js +1 -1
- package/src/page-list/{convert-to-navigation-links.js → use-convert-to-navigation-links.js} +36 -6
- package/src/page-list-item/edit.js +3 -2
- package/src/page-list-item/index.js +1 -1
- package/src/paragraph/edit.js +1 -1
- package/src/paragraph/index.js +1 -6
- package/src/post-author/block.json +1 -0
- package/src/post-author/index.php +10 -4
- package/src/post-author-biography/block.json +1 -0
- package/src/post-author-name/block.json +1 -1
- package/src/post-author-name/index.php +9 -4
- package/src/post-comment/edit.js +1 -0
- package/src/post-comments-count/block.json +1 -0
- package/src/post-comments-form/block.json +1 -0
- package/src/post-comments-form/index.php +6 -4
- package/src/post-comments-link/block.json +1 -0
- package/src/post-comments-link/index.php +8 -2
- package/src/post-content/block.json +1 -0
- package/src/post-content/edit.js +2 -13
- package/src/post-date/block.json +1 -0
- package/src/post-date/index.php +10 -3
- package/src/post-excerpt/block.json +1 -0
- package/src/post-excerpt/edit.js +22 -12
- package/src/post-excerpt/index.php +6 -3
- package/src/post-featured-image/block.json +1 -0
- package/src/post-featured-image/dimension-controls.js +2 -1
- package/src/post-featured-image/edit.js +46 -27
- package/src/post-featured-image/index.php +19 -6
- package/src/post-featured-image/overlay.js +1 -1
- package/src/post-navigation-link/block.json +1 -0
- package/src/post-navigation-link/edit.js +1 -0
- package/src/post-template/block.json +1 -0
- package/src/post-template/edit.js +4 -3
- package/src/post-template/index.php +4 -1
- package/src/post-terms/block.json +1 -0
- package/src/post-terms/edit.js +4 -3
- package/src/post-terms/index.php +6 -3
- package/src/post-title/block.json +1 -0
- package/src/post-title/edit.js +1 -0
- package/src/post-title/index.php +10 -4
- package/src/preformatted/test/__snapshots__/edit.native.js.snap +0 -2
- package/src/query/block.json +1 -0
- package/src/query/deprecated.js +77 -1
- package/src/query/edit/index.js +4 -60
- package/src/query/edit/inspector-controls/index.js +1 -0
- package/src/query/edit/pattern-selection-modal.js +86 -0
- package/src/query/edit/query-content.js +1 -12
- package/src/query/edit/query-placeholder.js +4 -8
- package/src/query/edit/query-toolbar.js +6 -16
- package/src/query/editor.scss +21 -19
- package/src/query/utils.js +22 -8
- package/src/query-no-results/block.json +1 -0
- package/src/query-no-results/index.php +3 -1
- package/src/query-pagination/block.json +1 -0
- package/src/query-pagination/edit.js +1 -13
- package/src/query-pagination/index.php +2 -0
- package/src/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/src/query-pagination-next/block.json +1 -0
- package/src/query-pagination-numbers/block.json +1 -0
- package/src/query-pagination-previous/block.json +1 -0
- package/src/query-title/block.json +1 -0
- package/src/read-more/block.json +1 -0
- package/src/rss/block.json +1 -0
- package/src/rss/edit.js +16 -12
- package/src/rss/editor.scss +4 -15
- package/src/search/block.json +1 -0
- package/src/search/index.php +2 -2
- package/src/site-logo/block.json +1 -0
- package/src/site-logo/edit.js +9 -16
- package/src/site-tagline/block.json +1 -0
- package/src/site-title/block.json +1 -0
- package/src/site-title/index.php +6 -3
- package/src/social-link/block.json +1 -0
- package/src/social-link/edit.js +3 -1
- package/src/social-links/edit.js +1 -14
- package/src/table/block.json +15 -0
- package/src/table/edit.js +38 -26
- package/src/table/editor.scss +0 -6
- package/src/table/save.js +9 -1
- package/src/table/state.js +1 -1
- package/src/table/test/utils.js +20 -0
- package/src/table/transforms.js +65 -2
- package/src/table/utils.js +18 -0
- package/src/tag-cloud/block.json +1 -0
- package/src/tag-cloud/edit.js +12 -15
- package/src/template-part/block.json +1 -0
- package/src/template-part/edit/advanced-controls.js +2 -1
- package/src/template-part/edit/index.js +0 -1
- package/src/template-part/edit/selection-modal.js +1 -1
- package/src/template-part/edit/title-modal.js +12 -15
- package/src/template-part/edit/utils/hooks.js +3 -8
- package/src/template-part/index.php +19 -7
- package/src/term-description/block.json +1 -0
- package/src/term-description/index.php +8 -4
- package/src/utils/init-block.js +1 -1
- package/src/utils/init-block.native.js +1 -1
- package/src/{template-part/edit/utils/search.js → utils/search-patterns.js} +2 -2
- package/src/utils/test/search-patterns.js +58 -0
- package/src/video/editor.scss +0 -35
- package/src/video/tracks-editor.js +65 -51
- package/tsconfig.tsbuildinfo +1 -1
- package/build/page-list/constants.js +0 -15
- package/build/page-list/constants.js.map +0 -1
- package/build/page-list/convert-to-links-modal.js +0 -83
- package/build/page-list/convert-to-links-modal.js.map +0 -1
- package/build/page-list/convert-to-navigation-links.js.map +0 -1
- package/build/template-part/edit/utils/search.js.map +0 -1
- package/build-module/page-list/constants.js +0 -6
- package/build-module/page-list/constants.js.map +0 -1
- package/build-module/page-list/convert-to-links-modal.js +0 -68
- package/build-module/page-list/convert-to-links-modal.js.map +0 -1
- package/build-module/page-list/convert-to-navigation-links.js.map +0 -1
- package/build-module/template-part/edit/utils/search.js.map +0 -1
- package/src/page-list/constants.js +0 -8
- package/src/page-list/convert-to-links-modal.js +0 -70
package/src/query/deprecated.js
CHANGED
|
@@ -296,6 +296,82 @@ const v3 = {
|
|
|
296
296
|
},
|
|
297
297
|
};
|
|
298
298
|
|
|
299
|
-
const
|
|
299
|
+
const v4 = {
|
|
300
|
+
attributes: {
|
|
301
|
+
queryId: {
|
|
302
|
+
type: 'number',
|
|
303
|
+
},
|
|
304
|
+
query: {
|
|
305
|
+
type: 'object',
|
|
306
|
+
default: {
|
|
307
|
+
perPage: null,
|
|
308
|
+
pages: 0,
|
|
309
|
+
offset: 0,
|
|
310
|
+
postType: 'post',
|
|
311
|
+
order: 'desc',
|
|
312
|
+
orderBy: 'date',
|
|
313
|
+
author: '',
|
|
314
|
+
search: '',
|
|
315
|
+
exclude: [],
|
|
316
|
+
sticky: '',
|
|
317
|
+
inherit: true,
|
|
318
|
+
taxQuery: null,
|
|
319
|
+
parents: [],
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
tagName: {
|
|
323
|
+
type: 'string',
|
|
324
|
+
default: 'div',
|
|
325
|
+
},
|
|
326
|
+
displayLayout: {
|
|
327
|
+
type: 'object',
|
|
328
|
+
default: {
|
|
329
|
+
type: 'list',
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
namespace: {
|
|
333
|
+
type: 'string',
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
supports: {
|
|
337
|
+
align: [ 'wide', 'full' ],
|
|
338
|
+
html: false,
|
|
339
|
+
color: {
|
|
340
|
+
gradients: true,
|
|
341
|
+
link: true,
|
|
342
|
+
__experimentalDefaultControls: {
|
|
343
|
+
background: true,
|
|
344
|
+
text: true,
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
__experimentalLayout: true,
|
|
348
|
+
},
|
|
349
|
+
save( { attributes: { tagName: Tag = 'div' } } ) {
|
|
350
|
+
const blockProps = useBlockProps.save();
|
|
351
|
+
const innerBlocksProps = useInnerBlocksProps.save( blockProps );
|
|
352
|
+
return <Tag { ...innerBlocksProps } />;
|
|
353
|
+
},
|
|
354
|
+
isEligible: ( { layout } ) =>
|
|
355
|
+
! layout ||
|
|
356
|
+
layout.inherit ||
|
|
357
|
+
( layout.contentSize && layout.type !== 'constrained' ),
|
|
358
|
+
migrate: ( attributes ) => {
|
|
359
|
+
const { layout = null } = attributes;
|
|
360
|
+
if ( ! layout ) {
|
|
361
|
+
return attributes;
|
|
362
|
+
}
|
|
363
|
+
if ( layout.inherit || layout.contentSize ) {
|
|
364
|
+
return {
|
|
365
|
+
...attributes,
|
|
366
|
+
layout: {
|
|
367
|
+
...layout,
|
|
368
|
+
type: 'constrained',
|
|
369
|
+
},
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
const deprecated = [ v4, v3, v2, v1 ];
|
|
300
376
|
|
|
301
377
|
export default deprecated;
|
package/src/query/edit/index.js
CHANGED
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { useSelect
|
|
5
|
-
import { useState
|
|
6
|
-
import {
|
|
7
|
-
BlockContextProvider,
|
|
8
|
-
store as blockEditorStore,
|
|
9
|
-
__experimentalBlockPatternSetup as BlockPatternSetup,
|
|
10
|
-
} from '@wordpress/block-editor';
|
|
11
|
-
import { Modal } from '@wordpress/components';
|
|
12
|
-
import { __ } from '@wordpress/i18n';
|
|
4
|
+
import { useSelect } from '@wordpress/data';
|
|
5
|
+
import { useState } from '@wordpress/element';
|
|
6
|
+
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
13
7
|
|
|
14
8
|
/**
|
|
15
9
|
* Internal dependencies
|
|
16
10
|
*/
|
|
17
11
|
import QueryContent from './query-content';
|
|
18
12
|
import QueryPlaceholder from './query-placeholder';
|
|
19
|
-
import
|
|
20
|
-
useBlockNameForPatterns,
|
|
21
|
-
getTransformedBlocksFromPattern,
|
|
22
|
-
} from '../utils';
|
|
13
|
+
import PatternSelectionModal from './pattern-selection-modal';
|
|
23
14
|
|
|
24
15
|
const QueryEdit = ( props ) => {
|
|
25
16
|
const { clientId, attributes } = props;
|
|
@@ -52,51 +43,4 @@ const QueryEdit = ( props ) => {
|
|
|
52
43
|
);
|
|
53
44
|
};
|
|
54
45
|
|
|
55
|
-
function PatternSelectionModal( {
|
|
56
|
-
clientId,
|
|
57
|
-
attributes,
|
|
58
|
-
setIsPatternSelectionModalOpen,
|
|
59
|
-
} ) {
|
|
60
|
-
const { replaceBlock, selectBlock } = useDispatch( blockEditorStore );
|
|
61
|
-
const onBlockPatternSelect = ( blocks ) => {
|
|
62
|
-
const { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(
|
|
63
|
-
blocks,
|
|
64
|
-
attributes
|
|
65
|
-
);
|
|
66
|
-
replaceBlock( clientId, newBlocks );
|
|
67
|
-
if ( queryClientIds[ 0 ] ) {
|
|
68
|
-
selectBlock( queryClientIds[ 0 ] );
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
// When we preview Query Loop blocks we should prefer the current
|
|
72
|
-
// block's postType, which is passed through block context.
|
|
73
|
-
const blockPreviewContext = useMemo(
|
|
74
|
-
() => ( {
|
|
75
|
-
previewPostType: attributes.query.postType,
|
|
76
|
-
} ),
|
|
77
|
-
[ attributes.query.postType ]
|
|
78
|
-
);
|
|
79
|
-
const blockNameForPatterns = useBlockNameForPatterns(
|
|
80
|
-
clientId,
|
|
81
|
-
attributes
|
|
82
|
-
);
|
|
83
|
-
return (
|
|
84
|
-
<Modal
|
|
85
|
-
className="block-editor-query-pattern__selection-modal"
|
|
86
|
-
title={ __( 'Choose a pattern' ) }
|
|
87
|
-
closeLabel={ __( 'Cancel' ) }
|
|
88
|
-
onRequestClose={ () => setIsPatternSelectionModalOpen( false ) }
|
|
89
|
-
>
|
|
90
|
-
<BlockContextProvider value={ blockPreviewContext }>
|
|
91
|
-
<BlockPatternSetup
|
|
92
|
-
blockName={ blockNameForPatterns }
|
|
93
|
-
clientId={ clientId }
|
|
94
|
-
onBlockPatternSelect={ onBlockPatternSelect }
|
|
95
|
-
showTitles={ true }
|
|
96
|
-
/>
|
|
97
|
-
</BlockContextProvider>
|
|
98
|
-
</Modal>
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
46
|
export default QueryEdit;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useState, useMemo } from '@wordpress/element';
|
|
5
|
+
import { useDispatch } from '@wordpress/data';
|
|
6
|
+
import { Modal, SearchControl } from '@wordpress/components';
|
|
7
|
+
import { useAsyncList } from '@wordpress/compose';
|
|
8
|
+
import {
|
|
9
|
+
BlockContextProvider,
|
|
10
|
+
store as blockEditorStore,
|
|
11
|
+
__experimentalBlockPatternsList as BlockPatternsList,
|
|
12
|
+
} from '@wordpress/block-editor';
|
|
13
|
+
import { __ } from '@wordpress/i18n';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Internal dependencies
|
|
17
|
+
*/
|
|
18
|
+
import {
|
|
19
|
+
useBlockNameForPatterns,
|
|
20
|
+
getTransformedBlocksFromPattern,
|
|
21
|
+
usePatterns,
|
|
22
|
+
} from '../utils';
|
|
23
|
+
import { searchPatterns } from '../../utils/search-patterns';
|
|
24
|
+
|
|
25
|
+
export default function PatternSelectionModal( {
|
|
26
|
+
clientId,
|
|
27
|
+
attributes,
|
|
28
|
+
setIsPatternSelectionModalOpen,
|
|
29
|
+
} ) {
|
|
30
|
+
const [ searchValue, setSearchValue ] = useState( '' );
|
|
31
|
+
const { replaceBlock, selectBlock } = useDispatch( blockEditorStore );
|
|
32
|
+
const onBlockPatternSelect = ( pattern, blocks ) => {
|
|
33
|
+
const { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(
|
|
34
|
+
blocks,
|
|
35
|
+
attributes
|
|
36
|
+
);
|
|
37
|
+
replaceBlock( clientId, newBlocks );
|
|
38
|
+
if ( queryClientIds[ 0 ] ) {
|
|
39
|
+
selectBlock( queryClientIds[ 0 ] );
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
// When we preview Query Loop blocks we should prefer the current
|
|
43
|
+
// block's postType, which is passed through block context.
|
|
44
|
+
const blockPreviewContext = useMemo(
|
|
45
|
+
() => ( {
|
|
46
|
+
previewPostType: attributes.query.postType,
|
|
47
|
+
} ),
|
|
48
|
+
[ attributes.query.postType ]
|
|
49
|
+
);
|
|
50
|
+
const blockNameForPatterns = useBlockNameForPatterns(
|
|
51
|
+
clientId,
|
|
52
|
+
attributes
|
|
53
|
+
);
|
|
54
|
+
const blockPatterns = usePatterns( clientId, blockNameForPatterns );
|
|
55
|
+
const filteredBlockPatterns = useMemo( () => {
|
|
56
|
+
return searchPatterns( blockPatterns, searchValue );
|
|
57
|
+
}, [ blockPatterns, searchValue ] );
|
|
58
|
+
const shownBlockPatterns = useAsyncList( filteredBlockPatterns );
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<Modal
|
|
62
|
+
overlayClassName="block-library-query-pattern__selection-modal"
|
|
63
|
+
title={ __( 'Choose a pattern' ) }
|
|
64
|
+
onRequestClose={ () => setIsPatternSelectionModalOpen( false ) }
|
|
65
|
+
>
|
|
66
|
+
<div className="block-library-query-pattern__selection-content">
|
|
67
|
+
<div className="block-library-query-pattern__selection-search">
|
|
68
|
+
<SearchControl
|
|
69
|
+
__nextHasNoMarginBottom
|
|
70
|
+
onChange={ setSearchValue }
|
|
71
|
+
value={ searchValue }
|
|
72
|
+
label={ __( 'Search for patterns' ) }
|
|
73
|
+
placeholder={ __( 'Search' ) }
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
76
|
+
<BlockContextProvider value={ blockPreviewContext }>
|
|
77
|
+
<BlockPatternsList
|
|
78
|
+
blockPatterns={ filteredBlockPatterns }
|
|
79
|
+
shownPatterns={ shownBlockPatterns }
|
|
80
|
+
onClickPattern={ onBlockPatternSelect }
|
|
81
|
+
/>
|
|
82
|
+
</BlockContextProvider>
|
|
83
|
+
</div>
|
|
84
|
+
</Modal>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
BlockControls,
|
|
9
9
|
InspectorControls,
|
|
10
10
|
useBlockProps,
|
|
11
|
-
useSetting,
|
|
12
11
|
store as blockEditorStore,
|
|
13
12
|
useInnerBlocksProps,
|
|
14
13
|
} from '@wordpress/block-editor';
|
|
@@ -36,23 +35,13 @@ export default function QueryContent( {
|
|
|
36
35
|
query,
|
|
37
36
|
displayLayout,
|
|
38
37
|
tagName: TagName = 'div',
|
|
39
|
-
layout = {},
|
|
40
38
|
} = attributes;
|
|
41
39
|
const { __unstableMarkNextChangeAsNotPersistent } =
|
|
42
40
|
useDispatch( blockEditorStore );
|
|
43
41
|
const instanceId = useInstanceId( QueryContent );
|
|
44
|
-
const { themeSupportsLayout } = useSelect( ( select ) => {
|
|
45
|
-
const { getSettings } = select( blockEditorStore );
|
|
46
|
-
return { themeSupportsLayout: getSettings()?.supportsLayout };
|
|
47
|
-
}, [] );
|
|
48
|
-
const defaultLayout = useSetting( 'layout' ) || {};
|
|
49
|
-
const usedLayout = ! layout?.type
|
|
50
|
-
? { ...defaultLayout, ...layout, type: 'default' }
|
|
51
|
-
: { ...defaultLayout, ...layout };
|
|
52
42
|
const blockProps = useBlockProps();
|
|
53
43
|
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
54
44
|
template: TEMPLATE,
|
|
55
|
-
__experimentalLayout: themeSupportsLayout ? usedLayout : undefined,
|
|
56
45
|
} );
|
|
57
46
|
const { postsPerPage } = useSelect( ( select ) => {
|
|
58
47
|
const { getSettings } = select( blockEditorStore );
|
|
@@ -122,7 +111,7 @@ export default function QueryContent( {
|
|
|
122
111
|
openPatternSelectionModal={ openPatternSelectionModal }
|
|
123
112
|
/>
|
|
124
113
|
</BlockControls>
|
|
125
|
-
<InspectorControls
|
|
114
|
+
<InspectorControls group="advanced">
|
|
126
115
|
<SelectControl
|
|
127
116
|
__nextHasNoMarginBottom
|
|
128
117
|
label={ __( 'HTML element' ) }
|
|
@@ -34,19 +34,15 @@ export default function QueryPlaceholder( {
|
|
|
34
34
|
const { blockType, allVariations, hasPatterns } = useSelect(
|
|
35
35
|
( select ) => {
|
|
36
36
|
const { getBlockVariations, getBlockType } = select( blocksStore );
|
|
37
|
-
const {
|
|
38
|
-
|
|
39
|
-
__experimentalGetPatternsByBlockTypes,
|
|
40
|
-
} = select( blockEditorStore );
|
|
37
|
+
const { getBlockRootClientId, getPatternsByBlockTypes } =
|
|
38
|
+
select( blockEditorStore );
|
|
41
39
|
const rootClientId = getBlockRootClientId( clientId );
|
|
42
40
|
|
|
43
41
|
return {
|
|
44
42
|
blockType: getBlockType( name ),
|
|
45
43
|
allVariations: getBlockVariations( name ),
|
|
46
|
-
hasPatterns: !!
|
|
47
|
-
|
|
48
|
-
rootClientId
|
|
49
|
-
).length,
|
|
44
|
+
hasPatterns: !! getPatternsByBlockTypes( name, rootClientId )
|
|
45
|
+
.length,
|
|
50
46
|
};
|
|
51
47
|
},
|
|
52
48
|
[ name, clientId ]
|
|
@@ -11,8 +11,11 @@ import {
|
|
|
11
11
|
import { useInstanceId } from '@wordpress/compose';
|
|
12
12
|
import { __ } from '@wordpress/i18n';
|
|
13
13
|
import { settings, list, grid } from '@wordpress/icons';
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Internal dependencies
|
|
17
|
+
*/
|
|
18
|
+
import { usePatterns } from '../utils';
|
|
16
19
|
|
|
17
20
|
export default function QueryToolbar( {
|
|
18
21
|
attributes: { query, displayLayout },
|
|
@@ -22,20 +25,7 @@ export default function QueryToolbar( {
|
|
|
22
25
|
name,
|
|
23
26
|
clientId,
|
|
24
27
|
} ) {
|
|
25
|
-
const hasPatterns =
|
|
26
|
-
( select ) => {
|
|
27
|
-
const {
|
|
28
|
-
getBlockRootClientId,
|
|
29
|
-
__experimentalGetPatternsByBlockTypes,
|
|
30
|
-
} = select( blockEditorStore );
|
|
31
|
-
const rootClientId = getBlockRootClientId( clientId );
|
|
32
|
-
return !! __experimentalGetPatternsByBlockTypes(
|
|
33
|
-
name,
|
|
34
|
-
rootClientId
|
|
35
|
-
).length;
|
|
36
|
-
},
|
|
37
|
-
[ name, clientId ]
|
|
38
|
-
);
|
|
28
|
+
const hasPatterns = !! usePatterns( clientId, name ).length;
|
|
39
29
|
const maxPageInputId = useInstanceId(
|
|
40
30
|
QueryToolbar,
|
|
41
31
|
'blocks-query-pagination-max-page-input'
|
package/src/query/editor.scss
CHANGED
|
@@ -19,28 +19,30 @@
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.block-
|
|
23
|
-
padding: 0;
|
|
24
|
-
margin-bottom: $header-height; // $header-height to accommodate bottom toolbar
|
|
25
|
-
&::before {
|
|
26
|
-
margin-bottom: 0;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.block-editor-query-pattern__selection-modal {
|
|
22
|
+
.block-library-query-pattern__selection-modal {
|
|
31
23
|
// To keep modal dimensions consistent as subsections are navigated, width
|
|
32
24
|
// and height are used instead of max-(width/height).
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
.components-modal__frame {
|
|
26
|
+
@include break-small() {
|
|
27
|
+
width: calc(100% - #{$grid-unit-20 * 2});
|
|
28
|
+
height: calc(100% - #{$header-height * 2});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@include break-medium() {
|
|
32
|
+
width: $break-medium - $grid-unit-20 * 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@include break-large() {
|
|
36
|
+
height: 70%;
|
|
37
|
+
}
|
|
39
38
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
|
|
40
|
+
.block-library-query-pattern__selection-search {
|
|
41
|
+
background: $white;
|
|
42
|
+
position: sticky;
|
|
43
|
+
top: 0;
|
|
44
|
+
padding: $grid-unit-20 0;
|
|
45
|
+
z-index: z-index(".block-library-query-pattern__selection-search");
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
|
package/src/query/utils.js
CHANGED
|
@@ -247,15 +247,10 @@ export function useBlockNameForPatterns( clientId, attributes ) {
|
|
|
247
247
|
if ( ! activeVariationName ) {
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
|
-
const {
|
|
251
|
-
|
|
252
|
-
__experimentalGetPatternsByBlockTypes,
|
|
253
|
-
} = select( blockEditorStore );
|
|
250
|
+
const { getBlockRootClientId, getPatternsByBlockTypes } =
|
|
251
|
+
select( blockEditorStore );
|
|
254
252
|
const rootClientId = getBlockRootClientId( clientId );
|
|
255
|
-
return
|
|
256
|
-
blockName,
|
|
257
|
-
rootClientId
|
|
258
|
-
);
|
|
253
|
+
return getPatternsByBlockTypes( blockName, rootClientId );
|
|
259
254
|
},
|
|
260
255
|
[ clientId, activeVariationName ]
|
|
261
256
|
);
|
|
@@ -318,3 +313,22 @@ export function useScopedBlockVariations( attributes ) {
|
|
|
318
313
|
}, [ activeVariationName, blockVariations ] );
|
|
319
314
|
return variations;
|
|
320
315
|
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Hook that returns the block patterns for a specific block type.
|
|
319
|
+
*
|
|
320
|
+
* @param {string} clientId The block's client ID.
|
|
321
|
+
* @param {string} name The block type name.
|
|
322
|
+
* @return {Object[]} An array of valid block patterns.
|
|
323
|
+
*/
|
|
324
|
+
export const usePatterns = ( clientId, name ) => {
|
|
325
|
+
return useSelect(
|
|
326
|
+
( select ) => {
|
|
327
|
+
const { getBlockRootClientId, getPatternsByBlockTypes } =
|
|
328
|
+
select( blockEditorStore );
|
|
329
|
+
const rootClientId = getBlockRootClientId( clientId );
|
|
330
|
+
return getPatternsByBlockTypes( name, rootClientId );
|
|
331
|
+
},
|
|
332
|
+
[ name, clientId ]
|
|
333
|
+
);
|
|
334
|
+
};
|
|
@@ -40,9 +40,11 @@ function render_block_core_query_no_results( $attributes, $content, $block ) {
|
|
|
40
40
|
wp_reset_postdata();
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
$classes = ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) ? 'has-link-color' : '';
|
|
44
|
+
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
|
43
45
|
return sprintf(
|
|
44
46
|
'<div %1$s>%2$s</div>',
|
|
45
|
-
|
|
47
|
+
$wrapper_attributes,
|
|
46
48
|
$content
|
|
47
49
|
);
|
|
48
50
|
}
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
store as blockEditorStore,
|
|
10
10
|
} from '@wordpress/block-editor';
|
|
11
11
|
import { useSelect } from '@wordpress/data';
|
|
12
|
-
import { getBlockSupport } from '@wordpress/blocks';
|
|
13
12
|
import { PanelBody } from '@wordpress/components';
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -28,21 +27,11 @@ const ALLOWED_BLOCKS = [
|
|
|
28
27
|
'core/query-pagination-next',
|
|
29
28
|
];
|
|
30
29
|
|
|
31
|
-
const getDefaultBlockLayout = ( blockTypeOrName ) => {
|
|
32
|
-
const layoutBlockSupportConfig = getBlockSupport(
|
|
33
|
-
blockTypeOrName,
|
|
34
|
-
'__experimentalLayout'
|
|
35
|
-
);
|
|
36
|
-
return layoutBlockSupportConfig?.default;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
30
|
export default function QueryPaginationEdit( {
|
|
40
|
-
attributes: { paginationArrow
|
|
31
|
+
attributes: { paginationArrow },
|
|
41
32
|
setAttributes,
|
|
42
33
|
clientId,
|
|
43
|
-
name,
|
|
44
34
|
} ) {
|
|
45
|
-
const usedLayout = layout || getDefaultBlockLayout( name );
|
|
46
35
|
const hasNextPreviousBlocks = useSelect( ( select ) => {
|
|
47
36
|
const { getBlocks } = select( blockEditorStore );
|
|
48
37
|
const innerBlocks = getBlocks( clientId );
|
|
@@ -61,7 +50,6 @@ export default function QueryPaginationEdit( {
|
|
|
61
50
|
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
62
51
|
template: TEMPLATE,
|
|
63
52
|
allowedBlocks: ALLOWED_BLOCKS,
|
|
64
|
-
__experimentalLayout: usedLayout,
|
|
65
53
|
} );
|
|
66
54
|
return (
|
|
67
55
|
<>
|
|
@@ -18,9 +18,11 @@ function render_block_core_query_pagination( $attributes, $content ) {
|
|
|
18
18
|
return '';
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
$classes = ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) ? 'has-link-color' : '';
|
|
21
22
|
$wrapper_attributes = get_block_wrapper_attributes(
|
|
22
23
|
array(
|
|
23
24
|
'aria-label' => __( 'Pagination' ),
|
|
25
|
+
'class' => $classes,
|
|
24
26
|
)
|
|
25
27
|
);
|
|
26
28
|
|
package/src/read-more/block.json
CHANGED
package/src/rss/block.json
CHANGED
package/src/rss/edit.js
CHANGED
|
@@ -12,9 +12,10 @@ import {
|
|
|
12
12
|
PanelBody,
|
|
13
13
|
Placeholder,
|
|
14
14
|
RangeControl,
|
|
15
|
-
TextControl,
|
|
16
15
|
ToggleControl,
|
|
17
16
|
ToolbarGroup,
|
|
17
|
+
__experimentalHStack as HStack,
|
|
18
|
+
__experimentalInputControl as InputControl,
|
|
18
19
|
} from '@wordpress/components';
|
|
19
20
|
import { useState } from '@wordpress/element';
|
|
20
21
|
import { grid, list, edit, rss } from '@wordpress/icons';
|
|
@@ -66,17 +67,20 @@ export default function RSSEdit( { attributes, setAttributes } ) {
|
|
|
66
67
|
onSubmit={ onSubmitURL }
|
|
67
68
|
className="wp-block-rss__placeholder-form"
|
|
68
69
|
>
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
<HStack wrap>
|
|
71
|
+
<InputControl
|
|
72
|
+
__next36pxDefaultSize
|
|
73
|
+
placeholder={ __( 'Enter URL here…' ) }
|
|
74
|
+
value={ feedURL }
|
|
75
|
+
onChange={ ( value ) =>
|
|
76
|
+
setAttributes( { feedURL: value } )
|
|
77
|
+
}
|
|
78
|
+
className="wp-block-rss__placeholder-input"
|
|
79
|
+
/>
|
|
80
|
+
<Button variant="primary" type="submit">
|
|
81
|
+
{ __( 'Use URL' ) }
|
|
82
|
+
</Button>
|
|
83
|
+
</HStack>
|
|
80
84
|
</form>
|
|
81
85
|
</Placeholder>
|
|
82
86
|
</div>
|
package/src/rss/editor.scss
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.wp-block-rss__placeholder-form {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: stretch;
|
|
8
|
-
|
|
9
6
|
> * {
|
|
10
7
|
margin-bottom: $grid-unit-10;
|
|
11
8
|
}
|
|
@@ -15,18 +12,10 @@
|
|
|
15
12
|
margin-bottom: 0;
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
|
-
}
|
|
19
15
|
|
|
20
|
-
.wp-block-rss__placeholder-input {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
flex-grow: 1;
|
|
24
|
-
|
|
25
|
-
.components-base-control__field {
|
|
26
|
-
margin: 0;
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: stretch;
|
|
29
|
-
flex-grow: 1;
|
|
30
|
-
margin-right: $grid-unit-10;
|
|
16
|
+
.wp-block-rss__placeholder-input {
|
|
17
|
+
flex: 1;
|
|
18
|
+
min-width: 80%;
|
|
31
19
|
}
|
|
32
20
|
}
|
|
21
|
+
|