@wordpress/block-library 9.3.0 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/build/avatar/edit.js +1 -0
- package/build/avatar/edit.js.map +1 -1
- package/build/block/edit.js +38 -23
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.js +1 -1
- package/build/button/edit.js.map +1 -1
- package/build/buttons/index.js +26 -0
- package/build/buttons/index.js.map +1 -1
- package/build/categories/edit.js +20 -3
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +20 -0
- package/build/categories/index.js.map +1 -1
- package/build/column/edit.js +2 -2
- package/build/column/edit.js.map +1 -1
- package/build/column/index.js +2 -0
- package/build/column/index.js.map +1 -1
- package/build/columns/index.js +2 -2
- package/build/columns/index.js.map +1 -1
- package/build/comment-template/index.js +12 -0
- package/build/comment-template/index.js.map +1 -1
- package/build/comments-title/deprecated.js +3 -0
- package/build/comments-title/deprecated.js.map +1 -1
- package/build/comments-title/edit.js +3 -1
- package/build/comments-title/edit.js.map +1 -1
- package/build/comments-title/index.js +3 -0
- package/build/comments-title/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +2 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/details/edit.js +1 -0
- package/build/details/edit.js.map +1 -1
- package/build/embed/variations.js +39 -34
- package/build/embed/variations.js.map +1 -1
- package/build/footnotes/index.js +1 -1
- package/build/footnotes/index.js.map +1 -1
- package/build/form/edit.js +4 -4
- package/build/form/edit.js.map +1 -1
- package/build/form-input/edit.js +3 -0
- package/build/form-input/edit.js.map +1 -1
- package/build/gallery/edit.js +42 -8
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gap-styles.js +1 -9
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/gallery/index.js +10 -0
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/use-image-sizes.js +2 -2
- package/build/gallery/use-image-sizes.js.map +1 -1
- package/build/group/deprecated.js +2 -5
- package/build/group/deprecated.js.map +1 -1
- package/build/group/index.js +27 -30
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +51 -3
- package/build/group/variations.js.map +1 -1
- package/build/heading/edit.js +2 -0
- package/build/heading/edit.js.map +1 -1
- package/build/heading/index.js +17 -1
- package/build/heading/index.js.map +1 -1
- package/build/image/edit.js +1 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +24 -11
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +3 -0
- package/build/image/index.js.map +1 -1
- package/build/image/view.js +65 -49
- package/build/image/view.js.map +1 -1
- package/build/latest-comments/index.js +9 -0
- package/build/latest-comments/index.js.map +1 -1
- package/build/latest-posts/edit.js +1 -0
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/edit.js +3 -3
- package/build/list/edit.js.map +1 -1
- package/build/list/index.js +1 -1
- package/build/list/ordered-list-settings.js +19 -17
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/list-item/edit.js +2 -2
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/hooks/index.js +0 -7
- package/build/list-item/hooks/index.js.map +1 -1
- package/build/list-item/index.js +3 -2
- package/build/list-item/index.js.map +1 -1
- package/build/loginout/index.js +14 -1
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/index.js +12 -0
- package/build/media-text/index.js.map +1 -1
- package/build/navigation/edit/index.js +5 -4
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +5 -1
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/link-ui.js +13 -17
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/navigation-submenu/edit.js +0 -11
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +1 -0
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list-item/edit.js +4 -1
- package/build/page-list-item/edit.js.map +1 -1
- package/build/paragraph/index.js +6 -0
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +6 -0
- package/build/paragraph/transforms.js.map +1 -1
- package/build/post-author/index.js +8 -0
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/index.js +3 -0
- package/build/post-author-biography/index.js.map +1 -1
- package/build/post-author-name/index.js +3 -0
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-comments-form/index.js +12 -0
- package/build/post-comments-form/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 +15 -0
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -0
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +12 -0
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-featured-image/index.js +3 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +2 -0
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-terms/index.js +15 -0
- package/build/post-terms/index.js.map +1 -1
- package/build/post-time-to-read/index.js +6 -0
- package/build/post-time-to-read/index.js.map +1 -1
- package/build/post-title/edit.js +9 -3
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +15 -0
- package/build/post-title/index.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +3 -1
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +90 -12
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/offset-controls.js +37 -0
- package/build/query/edit/inspector-controls/offset-controls.js.map +1 -0
- package/build/query/edit/inspector-controls/order-control.js +1 -0
- package/build/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build/query/edit/inspector-controls/pages-control.js +36 -0
- package/build/query/edit/inspector-controls/pages-control.js.map +1 -0
- package/build/query/edit/inspector-controls/parent-control.js +2 -1
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/inspector-controls/per-page-control.js +40 -0
- package/build/query/edit/inspector-controls/per-page-control.js.map +1 -0
- package/build/query/edit/inspector-controls/sticky-control.js +2 -1
- package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +5 -2
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/query-content.js +11 -2
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +1 -14
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/edit/query-toolbar.js +3 -76
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query/utils.js +15 -6
- package/build/query/utils.js.map +1 -1
- package/build/query/variations.js +9 -55
- package/build/query/variations.js.map +1 -1
- package/build/query-pagination-numbers/edit.js +1 -0
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-title/edit.js +13 -19
- package/build/query-title/edit.js.map +1 -1
- package/build/query-title/index.js +3 -0
- package/build/query-title/index.js.map +1 -1
- package/build/query-title/use-archive-label.js +95 -0
- package/build/query-title/use-archive-label.js.map +1 -0
- package/build/quote/index.js +15 -1
- package/build/quote/index.js.map +1 -1
- package/build/search/index.js +3 -0
- package/build/search/index.js.map +1 -1
- package/build/site-logo/edit.js +19 -9
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-tagline/edit.js +8 -5
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/index.js +18 -2
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/edit.js +6 -3
- package/build/site-title/edit.js.map +1 -1
- package/build/site-title/index.js +16 -1
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +0 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/icons/soundcloud.js +1 -1
- package/build/social-link/icons/soundcloud.js.map +1 -1
- package/build/social-links/index.js +12 -0
- package/build/social-links/index.js.map +1 -1
- package/build/spacer/controls.js +8 -13
- package/build/spacer/controls.js.map +1 -1
- package/build/table-of-contents/index.js +14 -1
- package/build/table-of-contents/index.js.map +1 -1
- package/build/tag-cloud/edit.js +42 -33
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/tag-cloud/index.js +1 -1
- package/build/template-part/edit/index.js +8 -5
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +11 -4
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/placeholder.js +23 -3
- package/build/template-part/edit/placeholder.js.map +1 -1
- package/build/template-part/edit/title-modal.js +20 -8
- package/build/template-part/edit/title-modal.js.map +1 -1
- package/build/term-description/index.js +12 -0
- package/build/term-description/index.js.map +1 -1
- package/build/utils/hooks.js +5 -1
- package/build/utils/hooks.js.map +1 -1
- package/build-module/avatar/edit.js +1 -0
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/block/edit.js +38 -23
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.js +1 -1
- package/build-module/button/edit.js.map +1 -1
- package/build-module/buttons/index.js +26 -0
- package/build-module/buttons/index.js.map +1 -1
- package/build-module/categories/edit.js +21 -4
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +20 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/column/edit.js +2 -2
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/index.js +2 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/index.js +2 -2
- package/build-module/columns/index.js.map +1 -1
- package/build-module/comment-template/index.js +12 -0
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comments-title/deprecated.js +3 -0
- package/build-module/comments-title/deprecated.js.map +1 -1
- package/build-module/comments-title/edit.js +3 -1
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/comments-title/index.js +3 -0
- package/build-module/comments-title/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +2 -1
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/details/edit.js +1 -0
- package/build-module/details/edit.js.map +1 -1
- package/build-module/embed/variations.js +40 -35
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/footnotes/index.js +1 -1
- package/build-module/footnotes/index.js.map +1 -1
- package/build-module/form/edit.js +4 -4
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/edit.js +3 -0
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/gallery/edit.js +43 -9
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gap-styles.js +1 -9
- package/build-module/gallery/gap-styles.js.map +1 -1
- package/build-module/gallery/index.js +10 -0
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/use-image-sizes.js +2 -2
- package/build-module/gallery/use-image-sizes.js.map +1 -1
- package/build-module/group/deprecated.js +2 -5
- package/build-module/group/deprecated.js.map +1 -1
- package/build-module/group/index.js +27 -30
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +51 -3
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/edit.js +2 -0
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/index.js +17 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/image/edit.js +1 -1
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +25 -12
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +3 -0
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/view.js +65 -49
- package/build-module/image/view.js.map +1 -1
- package/build-module/latest-comments/index.js +9 -0
- package/build-module/latest-comments/index.js.map +1 -1
- package/build-module/latest-posts/edit.js +1 -0
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/edit.js +3 -3
- package/build-module/list/edit.js.map +1 -1
- package/build-module/list/index.js +1 -1
- package/build-module/list/ordered-list-settings.js +19 -17
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/list-item/edit.js +2 -2
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/hooks/index.js +0 -1
- package/build-module/list-item/hooks/index.js.map +1 -1
- package/build-module/list-item/index.js +3 -2
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/loginout/index.js +14 -1
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/media-text/index.js +12 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +5 -4
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +5 -1
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/link-ui.js +13 -17
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +0 -11
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +1 -0
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list-item/edit.js +4 -1
- package/build-module/page-list-item/edit.js.map +1 -1
- package/build-module/paragraph/index.js +6 -0
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +6 -0
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/post-author/index.js +8 -0
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/index.js +3 -0
- package/build-module/post-author-biography/index.js.map +1 -1
- package/build-module/post-author-name/index.js +3 -0
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +12 -0
- package/build-module/post-comments-form/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 +15 -0
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -0
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +12 -0
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-featured-image/index.js +3 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +2 -0
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-terms/index.js +15 -0
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-time-to-read/index.js +6 -0
- package/build-module/post-time-to-read/index.js.map +1 -1
- package/build-module/post-title/edit.js +9 -3
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +15 -0
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +3 -1
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +92 -14
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/offset-controls.js +29 -0
- package/build-module/query/edit/inspector-controls/offset-controls.js.map +1 -0
- package/build-module/query/edit/inspector-controls/order-control.js +1 -0
- package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/pages-control.js +28 -0
- package/build-module/query/edit/inspector-controls/pages-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/parent-control.js +2 -1
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/per-page-control.js +33 -0
- package/build-module/query/edit/inspector-controls/per-page-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/sticky-control.js +2 -1
- package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +6 -4
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/query-content.js +11 -2
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +1 -14
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +4 -78
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/utils.js +15 -6
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query/variations.js +4 -50
- package/build-module/query/variations.js.map +1 -1
- package/build-module/query-pagination-numbers/edit.js +1 -0
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-title/edit.js +14 -20
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-title/index.js +3 -0
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/query-title/use-archive-label.js +88 -0
- package/build-module/query-title/use-archive-label.js.map +1 -0
- package/build-module/quote/index.js +15 -1
- package/build-module/quote/index.js.map +1 -1
- package/build-module/search/index.js +3 -0
- package/build-module/search/index.js.map +1 -1
- package/build-module/site-logo/edit.js +19 -9
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-tagline/edit.js +8 -5
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +18 -2
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/edit.js +6 -3
- package/build-module/site-title/edit.js.map +1 -1
- package/build-module/site-title/index.js +16 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +0 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/icons/soundcloud.js +1 -1
- package/build-module/social-link/icons/soundcloud.js.map +1 -1
- package/build-module/social-links/index.js +12 -0
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/spacer/controls.js +9 -14
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/table-of-contents/index.js +14 -1
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/tag-cloud/edit.js +43 -34
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/tag-cloud/index.js +1 -1
- package/build-module/template-part/edit/index.js +8 -5
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +11 -4
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/edit/placeholder.js +23 -3
- package/build-module/template-part/edit/placeholder.js.map +1 -1
- package/build-module/template-part/edit/title-modal.js +20 -8
- package/build-module/template-part/edit/title-modal.js.map +1 -1
- package/build-module/term-description/index.js +12 -0
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/utils/hooks.js +5 -1
- package/build-module/utils/hooks.js.map +1 -1
- package/build-style/archives/editor-rtl.css +3 -0
- package/build-style/archives/editor.css +3 -0
- package/build-style/archives/style-rtl.css +3 -0
- package/build-style/archives/style.css +3 -0
- package/build-style/audio/editor-rtl.css +3 -0
- package/build-style/audio/editor.css +3 -0
- package/build-style/audio/style-rtl.css +3 -0
- package/build-style/audio/style.css +3 -0
- package/build-style/audio/theme-rtl.css +3 -0
- package/build-style/audio/theme.css +3 -0
- package/build-style/avatar/editor-rtl.css +3 -0
- package/build-style/avatar/editor.css +3 -0
- package/build-style/avatar/style-rtl.css +3 -0
- package/build-style/avatar/style.css +3 -0
- package/build-style/button/editor-rtl.css +3 -0
- package/build-style/button/editor.css +3 -0
- package/build-style/button/style-rtl.css +3 -0
- package/build-style/button/style.css +3 -0
- package/build-style/buttons/editor-rtl.css +3 -0
- package/build-style/buttons/editor.css +3 -0
- package/build-style/buttons/style-rtl.css +3 -0
- package/build-style/buttons/style.css +3 -0
- package/build-style/calendar/style-rtl.css +3 -0
- package/build-style/calendar/style.css +3 -0
- package/build-style/categories/editor-rtl.css +7 -0
- package/build-style/categories/editor.css +7 -0
- package/build-style/categories/style-rtl.css +7 -0
- package/build-style/categories/style.css +7 -0
- package/build-style/classic-rtl.css +3 -0
- package/build-style/classic.css +3 -0
- package/build-style/code/editor-rtl.css +3 -0
- package/build-style/code/editor.css +3 -0
- package/build-style/code/style-rtl.css +3 -0
- package/build-style/code/style.css +3 -0
- package/build-style/code/theme-rtl.css +3 -0
- package/build-style/code/theme.css +3 -0
- package/build-style/columns/editor-rtl.css +3 -0
- package/build-style/columns/editor.css +3 -0
- package/build-style/columns/style-rtl.css +3 -0
- package/build-style/columns/style.css +3 -0
- package/build-style/comment-author-avatar/editor-rtl.css +3 -0
- package/build-style/comment-author-avatar/editor.css +3 -0
- package/build-style/comment-content/style-rtl.css +3 -0
- package/build-style/comment-content/style.css +3 -0
- package/build-style/comment-template/style-rtl.css +3 -0
- package/build-style/comment-template/style.css +3 -0
- package/build-style/comments/editor-rtl.css +3 -0
- package/build-style/comments/editor.css +3 -0
- package/build-style/comments/style-rtl.css +3 -0
- package/build-style/comments/style.css +3 -0
- package/build-style/comments-pagination/editor-rtl.css +3 -0
- package/build-style/comments-pagination/editor.css +3 -0
- package/build-style/comments-pagination/style-rtl.css +3 -0
- package/build-style/comments-pagination/style.css +3 -0
- package/build-style/comments-pagination-numbers/editor-rtl.css +3 -0
- package/build-style/comments-pagination-numbers/editor.css +3 -0
- package/build-style/comments-title/editor-rtl.css +3 -0
- package/build-style/comments-title/editor.css +3 -0
- package/build-style/common-rtl.css +3 -0
- package/build-style/common.css +3 -0
- package/build-style/cover/editor-rtl.css +3 -0
- package/build-style/cover/editor.css +3 -0
- package/build-style/cover/style-rtl.css +3 -0
- package/build-style/cover/style.css +3 -0
- package/build-style/details/editor-rtl.css +3 -0
- package/build-style/details/editor.css +3 -0
- package/build-style/details/style-rtl.css +3 -0
- package/build-style/details/style.css +3 -0
- package/build-style/editor-elements-rtl.css +3 -0
- package/build-style/editor-elements.css +3 -0
- package/build-style/editor-rtl.css +29 -42
- package/build-style/editor.css +29 -42
- package/build-style/elements-rtl.css +3 -0
- package/build-style/elements.css +3 -0
- package/build-style/embed/editor-rtl.css +3 -0
- package/build-style/embed/editor.css +3 -0
- package/build-style/embed/style-rtl.css +3 -0
- package/build-style/embed/style.css +3 -0
- package/build-style/embed/theme-rtl.css +3 -0
- package/build-style/embed/theme.css +3 -0
- package/build-style/file/editor-rtl.css +3 -0
- package/build-style/file/editor.css +3 -0
- package/build-style/file/style-rtl.css +3 -0
- package/build-style/file/style.css +3 -0
- package/build-style/footnotes/style-rtl.css +3 -0
- package/build-style/footnotes/style.css +3 -0
- package/build-style/form-input/editor-rtl.css +3 -0
- package/build-style/form-input/editor.css +3 -0
- package/build-style/form-input/style-rtl.css +4 -0
- package/build-style/form-input/style.css +4 -0
- package/build-style/form-submission-notification/editor-rtl.css +3 -0
- package/build-style/form-submission-notification/editor.css +3 -0
- package/build-style/form-submit-button/style-rtl.css +3 -0
- package/build-style/form-submit-button/style.css +3 -0
- package/build-style/freeform/editor-rtl.css +3 -0
- package/build-style/freeform/editor.css +3 -0
- package/build-style/gallery/editor-rtl.css +3 -1
- package/build-style/gallery/editor.css +3 -1
- package/build-style/gallery/style-rtl.css +3 -0
- package/build-style/gallery/style.css +3 -0
- package/build-style/gallery/theme-rtl.css +3 -0
- package/build-style/gallery/theme.css +3 -0
- package/build-style/group/editor-rtl.css +3 -11
- package/build-style/group/editor.css +3 -11
- package/build-style/group/style-rtl.css +3 -0
- package/build-style/group/style.css +3 -0
- package/build-style/group/theme-rtl.css +3 -0
- package/build-style/group/theme.css +3 -0
- package/build-style/heading/style-rtl.css +3 -0
- package/build-style/heading/style.css +3 -0
- package/build-style/html/editor-rtl.css +3 -0
- package/build-style/html/editor.css +3 -0
- package/build-style/image/editor-rtl.css +19 -4
- package/build-style/image/editor.css +19 -4
- package/build-style/image/style-rtl.css +22 -0
- package/build-style/image/style.css +22 -0
- package/build-style/image/theme-rtl.css +3 -0
- package/build-style/image/theme.css +3 -0
- package/build-style/latest-comments/style-rtl.css +3 -0
- package/build-style/latest-comments/style.css +3 -0
- package/build-style/latest-posts/editor-rtl.css +3 -3
- package/build-style/latest-posts/editor.css +3 -3
- package/build-style/latest-posts/style-rtl.css +3 -0
- package/build-style/latest-posts/style.css +3 -0
- package/build-style/list/style-rtl.css +4 -1
- package/build-style/list/style.css +4 -1
- package/build-style/loginout/style-rtl.css +94 -0
- package/build-style/loginout/style.css +94 -0
- package/build-style/media-text/editor-rtl.css +3 -0
- package/build-style/media-text/editor.css +3 -0
- package/build-style/media-text/style-rtl.css +3 -0
- package/build-style/media-text/style.css +3 -0
- package/build-style/more/editor-rtl.css +3 -0
- package/build-style/more/editor.css +3 -0
- package/build-style/navigation/editor-rtl.css +3 -12
- package/build-style/navigation/editor.css +3 -12
- package/build-style/navigation/style-rtl.css +4 -4
- package/build-style/navigation/style.css +4 -4
- package/build-style/navigation-link/editor-rtl.css +3 -0
- package/build-style/navigation-link/editor.css +3 -0
- package/build-style/navigation-link/style-rtl.css +3 -0
- package/build-style/navigation-link/style.css +3 -0
- package/build-style/navigation-submenu/editor-rtl.css +3 -0
- package/build-style/navigation-submenu/editor.css +3 -0
- package/build-style/nextpage/editor-rtl.css +3 -0
- package/build-style/nextpage/editor.css +3 -0
- package/build-style/page-list/editor-rtl.css +3 -0
- package/build-style/page-list/editor.css +3 -0
- package/build-style/page-list/style-rtl.css +3 -0
- package/build-style/page-list/style.css +3 -0
- package/build-style/paragraph/editor-rtl.css +3 -0
- package/build-style/paragraph/editor.css +3 -0
- package/build-style/paragraph/style-rtl.css +3 -0
- package/build-style/paragraph/style.css +3 -0
- package/build-style/post-author/style-rtl.css +3 -0
- package/build-style/post-author/style.css +3 -0
- package/build-style/post-comments-form/editor-rtl.css +3 -0
- package/build-style/post-comments-form/editor.css +3 -0
- package/build-style/post-comments-form/style-rtl.css +4 -1
- package/build-style/post-comments-form/style.css +4 -1
- package/build-style/post-content/editor-rtl.css +3 -0
- package/build-style/post-content/editor.css +3 -0
- package/build-style/post-content/style-rtl.css +96 -0
- package/build-style/post-content/style.css +96 -0
- package/build-style/post-date/style-rtl.css +3 -0
- package/build-style/post-date/style.css +3 -0
- package/build-style/post-excerpt/editor-rtl.css +3 -0
- package/build-style/post-excerpt/editor.css +3 -0
- package/build-style/post-excerpt/style-rtl.css +4 -0
- package/build-style/post-excerpt/style.css +4 -0
- package/build-style/post-featured-image/editor-rtl.css +3 -0
- package/build-style/post-featured-image/editor.css +3 -0
- package/build-style/post-featured-image/style-rtl.css +3 -0
- package/build-style/post-featured-image/style.css +3 -0
- package/build-style/post-navigation-link/style-rtl.css +3 -0
- package/build-style/post-navigation-link/style.css +3 -0
- package/build-style/post-template/editor-rtl.css +3 -0
- package/build-style/post-template/editor.css +3 -0
- package/build-style/post-template/style-rtl.css +3 -0
- package/build-style/post-template/style.css +3 -0
- package/build-style/post-terms/style-rtl.css +3 -0
- package/build-style/post-terms/style.css +3 -0
- package/build-style/post-time-to-read/style-rtl.css +3 -0
- package/build-style/post-time-to-read/style.css +3 -0
- package/build-style/post-title/style-rtl.css +3 -0
- package/build-style/post-title/style.css +3 -0
- package/build-style/preformatted/style-rtl.css +3 -0
- package/build-style/preformatted/style.css +3 -0
- package/build-style/pullquote/editor-rtl.css +3 -0
- package/build-style/pullquote/editor.css +3 -0
- package/build-style/pullquote/style-rtl.css +3 -0
- package/build-style/pullquote/style.css +3 -0
- package/build-style/pullquote/theme-rtl.css +3 -0
- package/build-style/pullquote/theme.css +3 -0
- package/build-style/query/editor-rtl.css +3 -7
- package/build-style/query/editor.css +3 -7
- package/build-style/query-pagination/editor-rtl.css +3 -0
- package/build-style/query-pagination/editor.css +3 -0
- package/build-style/query-pagination/style-rtl.css +3 -0
- package/build-style/query-pagination/style.css +3 -0
- package/build-style/query-pagination-numbers/editor-rtl.css +3 -0
- package/build-style/query-pagination-numbers/editor.css +3 -0
- package/build-style/query-title/style-rtl.css +3 -0
- package/build-style/query-title/style.css +3 -0
- package/build-style/quote/style-rtl.css +3 -0
- package/build-style/quote/style.css +3 -0
- package/build-style/quote/theme-rtl.css +6 -3
- package/build-style/quote/theme.css +6 -3
- package/build-style/read-more/style-rtl.css +3 -0
- package/build-style/read-more/style.css +3 -0
- package/build-style/reset-rtl.css +3 -0
- package/build-style/reset.css +3 -0
- package/build-style/rss/editor-rtl.css +3 -0
- package/build-style/rss/editor.css +3 -0
- package/build-style/rss/style-rtl.css +3 -0
- package/build-style/rss/style.css +3 -0
- package/build-style/search/editor-rtl.css +4 -1
- package/build-style/search/editor.css +4 -1
- package/build-style/search/style-rtl.css +3 -0
- package/build-style/search/style.css +3 -0
- package/build-style/search/theme-rtl.css +3 -0
- package/build-style/search/theme.css +3 -0
- package/build-style/separator/editor-rtl.css +3 -0
- package/build-style/separator/editor.css +3 -0
- package/build-style/separator/style-rtl.css +3 -0
- package/build-style/separator/style.css +3 -0
- package/build-style/separator/theme-rtl.css +3 -0
- package/build-style/separator/theme.css +3 -0
- package/build-style/shortcode/editor-rtl.css +3 -0
- package/build-style/shortcode/editor.css +3 -0
- package/build-style/site-logo/editor-rtl.css +3 -0
- package/build-style/site-logo/editor.css +3 -0
- package/build-style/site-logo/style-rtl.css +3 -0
- package/build-style/site-logo/style.css +3 -0
- package/build-style/site-tagline/editor-rtl.css +3 -0
- package/build-style/site-tagline/editor.css +3 -0
- package/build-style/site-tagline/style-rtl.css +94 -0
- package/build-style/site-tagline/style.css +94 -0
- package/build-style/site-title/editor-rtl.css +3 -0
- package/build-style/site-title/editor.css +3 -0
- package/build-style/site-title/style-rtl.css +7 -1
- package/build-style/site-title/style.css +7 -1
- package/build-style/social-link/editor-rtl.css +3 -0
- package/build-style/social-link/editor.css +3 -0
- 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 +5 -2
- package/build-style/social-links/style.css +5 -2
- package/build-style/spacer/editor-rtl.css +3 -0
- package/build-style/spacer/editor.css +3 -0
- package/build-style/spacer/style-rtl.css +3 -0
- package/build-style/spacer/style.css +3 -0
- package/build-style/style-rtl.css +56 -9
- package/build-style/style.css +56 -9
- package/build-style/table/editor-rtl.css +3 -0
- package/build-style/table/editor.css +3 -0
- package/build-style/table/style-rtl.css +3 -0
- package/build-style/table/style.css +3 -0
- package/build-style/table/theme-rtl.css +3 -0
- package/build-style/table/theme.css +3 -0
- package/build-style/table-of-contents/style-rtl.css +94 -0
- package/build-style/table-of-contents/style.css +94 -0
- package/build-style/tag-cloud/editor-rtl.css +95 -0
- package/build-style/tag-cloud/editor.css +95 -0
- package/build-style/tag-cloud/style-rtl.css +3 -0
- package/build-style/tag-cloud/style.css +3 -0
- package/build-style/template-part/editor-rtl.css +3 -0
- package/build-style/template-part/editor.css +3 -0
- package/build-style/template-part/theme-rtl.css +3 -0
- package/build-style/template-part/theme.css +3 -0
- package/build-style/term-description/style-rtl.css +4 -0
- package/build-style/term-description/style.css +4 -0
- package/build-style/text-columns/editor-rtl.css +3 -0
- package/build-style/text-columns/editor.css +3 -0
- package/build-style/text-columns/style-rtl.css +3 -0
- package/build-style/text-columns/style.css +3 -0
- package/build-style/theme-rtl.css +6 -3
- package/build-style/theme.css +6 -3
- package/build-style/verse/style-rtl.css +3 -0
- package/build-style/verse/style.css +3 -0
- package/build-style/video/editor-rtl.css +3 -3
- package/build-style/video/editor.css +3 -3
- package/build-style/video/style-rtl.css +3 -0
- package/build-style/video/style.css +3 -0
- package/build-style/video/theme-rtl.css +3 -0
- package/build-style/video/theme.css +3 -0
- package/package.json +35 -35
- package/src/avatar/edit.js +1 -0
- package/src/block/edit.js +58 -27
- package/src/block/test/edit.native.js +6 -2
- package/src/button/edit.js +1 -1
- package/src/button/index.php +1 -14
- package/src/buttons/block.json +20 -0
- package/src/buttons/index.js +6 -0
- package/src/categories/block.json +20 -0
- package/src/categories/edit.js +32 -4
- package/src/categories/editor.scss +4 -0
- package/src/categories/index.php +4 -1
- package/src/categories/style.scss +4 -0
- package/src/column/block.json +2 -0
- package/src/column/edit.js +2 -2
- package/src/columns/index.js +1 -1
- package/src/comment-template/block.json +12 -0
- package/src/comments-title/block.json +3 -0
- package/src/comments-title/edit.js +8 -1
- package/src/cover/edit/inspector-controls.js +1 -0
- package/src/details/edit.js +1 -0
- package/src/editor.scss +1 -0
- package/src/embed/test/__snapshots__/index.native.js.snap +8 -8
- package/src/embed/test/index.js +1 -1
- package/src/embed/test/index.native.js +24 -23
- package/src/embed/variations.js +43 -35
- package/src/footnotes/index.js +1 -2
- package/src/form/edit.js +3 -2
- package/src/form-input/edit.js +3 -0
- package/src/form-input/style.scss +1 -0
- package/src/gallery/block.json +10 -0
- package/src/gallery/edit.js +75 -13
- package/src/gallery/editor.scss +0 -1
- package/src/gallery/gap-styles.js +1 -8
- package/src/gallery/test/__snapshots__/index.native.js.snap +1 -1
- package/src/gallery/test/index.native.js +5 -5
- package/src/gallery/use-image-sizes.js +2 -2
- package/src/group/deprecated.js +3 -7
- package/src/group/editor.scss +1 -1
- package/src/group/index.js +26 -29
- package/src/group/variations.js +56 -0
- package/src/heading/block.json +15 -0
- package/src/heading/edit.js +3 -1
- package/src/heading/index.js +1 -0
- package/src/image/block.json +3 -0
- package/src/image/edit.js +1 -1
- package/src/image/editor.scss +18 -1
- package/src/image/image.js +55 -35
- package/src/image/index.php +32 -15
- package/src/image/style.scss +22 -0
- package/src/image/test/edit.native.js +1 -0
- package/src/image/view.js +69 -49
- package/src/latest-comments/block.json +9 -0
- package/src/latest-posts/edit.js +1 -0
- package/src/latest-posts/editor.scss +0 -4
- package/src/list/block.json +1 -1
- package/src/list/edit.js +3 -3
- package/src/list/ordered-list-settings.js +20 -18
- package/src/list/style.scss +1 -1
- package/src/list/test/edit.native.js +1 -3
- package/src/list-item/block.json +3 -2
- package/src/list-item/edit.js +2 -2
- package/src/list-item/hooks/index.js +0 -1
- package/src/loginout/block.json +14 -1
- package/src/loginout/style.scss +4 -0
- package/src/media-text/block.json +12 -0
- package/src/media-text/style.native.scss +2 -0
- package/src/navigation/edit/index.js +5 -5
- package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/src/navigation/editor.scss +0 -1
- package/src/navigation/index.php +1 -1
- package/src/navigation/style.scss +4 -9
- package/src/navigation/test/use-navigation-menu.js +54 -15
- package/src/navigation/use-navigation-menu.js +5 -1
- package/src/navigation-link/link-ui.js +8 -14
- package/src/navigation-submenu/edit.js +1 -13
- package/src/page-list/edit.js +1 -0
- package/src/page-list-item/edit.js +4 -4
- package/src/paragraph/block.json +6 -0
- package/src/post-author/index.js +8 -0
- package/src/post-author-biography/block.json +3 -0
- package/src/post-author-name/block.json +3 -0
- package/src/post-comments-form/block.json +12 -0
- package/src/post-comments-form/style.scss +1 -1
- package/src/post-content/block.json +1 -0
- package/src/post-content/style.scss +5 -0
- package/src/post-date/block.json +15 -0
- package/src/post-excerpt/block.json +12 -0
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-excerpt/style.scss +3 -0
- package/src/post-featured-image/block.json +3 -0
- package/src/post-navigation-link/edit.js +2 -0
- package/src/post-terms/block.json +15 -0
- package/src/post-time-to-read/block.json +6 -0
- package/src/post-title/block.json +15 -0
- package/src/post-title/edit.js +9 -8
- package/src/query/edit/inspector-controls/author-control.js +2 -0
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
- package/src/query/edit/inspector-controls/index.js +123 -23
- package/src/query/edit/inspector-controls/offset-controls.js +31 -0
- package/src/query/edit/inspector-controls/order-control.js +1 -0
- package/src/query/edit/inspector-controls/pages-control.js +27 -0
- package/src/query/edit/inspector-controls/parent-control.js +1 -0
- package/src/query/edit/inspector-controls/per-page-control.js +33 -0
- package/src/query/edit/inspector-controls/sticky-control.js +2 -1
- package/src/query/edit/inspector-controls/taxonomy-controls.js +8 -3
- package/src/query/edit/query-content.js +17 -3
- package/src/query/edit/query-placeholder.js +1 -21
- package/src/query/edit/query-toolbar.js +1 -90
- package/src/query/editor.scss +0 -9
- package/src/query/utils.js +13 -5
- package/src/query/variations.js +4 -46
- package/src/query-pagination-numbers/edit.js +1 -0
- package/src/query-title/block.json +3 -0
- package/src/query-title/edit.js +19 -18
- package/src/query-title/use-archive-label.js +99 -0
- package/src/quote/block.json +15 -1
- package/src/quote/theme.scss +5 -3
- package/src/search/block.json +3 -0
- package/src/search/editor.scss +1 -1
- package/src/site-logo/edit.js +27 -10
- package/src/site-tagline/block.json +18 -2
- package/src/site-tagline/edit.js +7 -6
- package/src/site-tagline/style.scss +4 -0
- package/src/site-title/block.json +10 -0
- package/src/site-title/edit.js +6 -5
- package/src/site-title/index.js +6 -1
- package/src/site-title/style.scss +7 -2
- package/src/social-link/edit.js +0 -1
- package/src/social-link/icons/soundcloud.js +1 -1
- package/src/social-link/socials-with-bg.scss +1 -1
- package/src/social-link/socials-without-bg.scss +1 -1
- package/src/social-links/block.json +12 -0
- package/src/spacer/controls.js +10 -13
- package/src/style.scss +4 -0
- package/src/table-of-contents/block.json +14 -1
- package/src/table-of-contents/style.scss +4 -0
- package/src/tag-cloud/block.json +1 -1
- package/src/tag-cloud/edit.js +53 -35
- package/src/tag-cloud/editor.scss +9 -0
- package/src/template-part/edit/index.js +10 -5
- package/src/template-part/edit/inner-blocks.js +11 -6
- package/src/template-part/edit/placeholder.js +31 -6
- package/src/template-part/edit/title-modal.js +18 -4
- package/src/term-description/block.json +12 -0
- package/src/term-description/style.scss +2 -0
- package/src/utils/hooks.js +5 -1
- package/src/video/editor.scss +0 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/build/list-item/hooks/use-split.js +0 -39
- package/build/list-item/hooks/use-split.js.map +0 -1
- package/build-module/list-item/hooks/use-split.js +0 -32
- package/build-module/list-item/hooks/use-split.js.map +0 -1
- package/src/list-item/hooks/use-split.js +0 -33
package/build/query/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_element","_coreData","_blockEditor","_htmlEntities","_blocks","getEntitiesInfo","entities","mapping","reduce","accumulator","entity","mapById","mapByName","names","id","name","push","exports","getValueFromObjectPath","object","path","normalizedPath","split","value","forEach","fieldName","mapToIHasNameAndId","map","decodeEntities","usePostTypes","postTypes","useSelect","select","getPostTypes","coreStore","excludedPostTypes","filteredPostTypes","per_page","filter","viewable","slug","includes","postTypesTaxonomiesMap","useMemo","length","type","taxonomies","postTypesSelectOptions","labels","label","singular_name","useTaxonomies","postType","getTaxonomies","visibility","publicly_queryable","useIsPostTypeHierarchical","getPostType","hierarchical","useAllowedControls","attributes","blocksStore","getActiveBlockVariation","allowedControls","isControlAllowed","key","getTransformedBlocksFromPattern","blocks","queryBlockAttributes","query","inherit","clonedBlocks","block","cloneBlock","queryClientIds","blocksQueue","shift","clientId","innerBlocks","innerBlock","newBlocks","useBlockNameForPatterns","activeVariationName","blockName","hasActiveVariationPatterns","getBlockRootClientId","getPatternsByBlockTypes","blockEditorStore","rootClientId","activePatterns","useScopedBlockVariations","blockVariations","getBlockVariations","variations","isNotConnected","variation","namespace","connectedVariations","usePatterns","useUnsupportedBlocks","getClientIdsOfDescendants","getBlockName","descendantClientId","blockSupportsInteractivity","Object","is","getBlockSupport","blockSupportsInteractivityClientNavigation","blockInteractivity","hasBlocksFromPlugins","hasPostContentBlock","hasUnsupportedBlocks"],"sources":["@wordpress/block-library/src/query/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\tcloneBlock,\n\tgetBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\n\n/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */\n\n/**\n * @typedef IHasNameAndId\n * @property {string|number} id The entity's id.\n * @property {string} name The entity's name.\n */\n\n/**\n * The object used in Query block that contains info and helper mappings\n * from an array of IHasNameAndId objects.\n *\n * @typedef {Object} QueryEntitiesInfo\n * @property {IHasNameAndId[]} entities The array of entities.\n * @property {Object<string, IHasNameAndId>} mapById Object mapping with the id as key and the entity as value.\n * @property {Object<string, IHasNameAndId>} mapByName Object mapping with the name as key and the entity as value.\n * @property {string[]} names Array with the entities' names.\n */\n\n/**\n * Returns a helper object with mapping from Objects that implement\n * the `IHasNameAndId` interface. The returned object is used for\n * integration with `FormTokenField` component.\n *\n * @param {IHasNameAndId[]} entities The entities to extract of helper object.\n * @return {QueryEntitiesInfo} The object with the entities information.\n */\nexport const getEntitiesInfo = ( entities ) => {\n\tconst mapping = entities?.reduce(\n\t\t( accumulator, entity ) => {\n\t\t\tconst { mapById, mapByName, names } = accumulator;\n\t\t\tmapById[ entity.id ] = entity;\n\t\t\tmapByName[ entity.name ] = entity;\n\t\t\tnames.push( entity.name );\n\t\t\treturn accumulator;\n\t\t},\n\t\t{ mapById: {}, mapByName: {}, names: [] }\n\t);\n\treturn {\n\t\tentities,\n\t\t...mapping,\n\t};\n};\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as a string of properties, separated by dots,\n * for example: \"parent.child\".\n *\n * @param {Object} object Input object.\n * @param {string} path Path to the object property.\n * @return {*} Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = ( object, path ) => {\n\tconst normalizedPath = path.split( '.' );\n\tlet value = object;\n\tnormalizedPath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\n/**\n * Helper util to map records to add a `name` prop from a\n * provided path, in order to handle all entities in the same\n * fashion(implementing`IHasNameAndId` interface).\n *\n * @param {Object[]} entities The array of entities.\n * @param {string} path The path to map a `name` property from the entity.\n * @return {IHasNameAndId[]} An array of enitities that now implement the `IHasNameAndId` interface.\n */\nexport const mapToIHasNameAndId = ( entities, path ) => {\n\treturn ( entities || [] ).map( ( entity ) => ( {\n\t\t...entity,\n\t\tname: decodeEntities( getValueFromObjectPath( entity, path ) ),\n\t} ) );\n};\n\n/**\n * Returns a helper object that contains:\n * 1. An `options` object from the available post types, to be passed to a `SelectControl`.\n * 2. A helper map with available taxonomies per post type.\n *\n * @return {Object} The helper object related to post types.\n */\nexport const usePostTypes = () => {\n\tconst postTypes = useSelect( ( select ) => {\n\t\tconst { getPostTypes } = select( coreStore );\n\t\tconst excludedPostTypes = [ 'attachment' ];\n\t\tconst filteredPostTypes = getPostTypes( { per_page: -1 } )?.filter(\n\t\t\t( { viewable, slug } ) =>\n\t\t\t\tviewable && ! excludedPostTypes.includes( slug )\n\t\t);\n\t\treturn filteredPostTypes;\n\t}, [] );\n\tconst postTypesTaxonomiesMap = useMemo( () => {\n\t\tif ( ! postTypes?.length ) {\n\t\t\treturn;\n\t\t}\n\t\treturn postTypes.reduce( ( accumulator, type ) => {\n\t\t\taccumulator[ type.slug ] = type.taxonomies;\n\t\t\treturn accumulator;\n\t\t}, {} );\n\t}, [ postTypes ] );\n\tconst postTypesSelectOptions = useMemo(\n\t\t() =>\n\t\t\t( postTypes || [] ).map( ( { labels, slug } ) => ( {\n\t\t\t\tlabel: labels.singular_name,\n\t\t\t\tvalue: slug,\n\t\t\t} ) ),\n\t\t[ postTypes ]\n\t);\n\treturn { postTypesTaxonomiesMap, postTypesSelectOptions };\n};\n\n/**\n * Hook that returns the taxonomies associated with a specific post type.\n *\n * @param {string} postType The post type from which to retrieve the associated taxonomies.\n * @return {Object[]} An array of the associated taxonomies.\n */\nexport const useTaxonomies = ( postType ) => {\n\tconst taxonomies = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getTaxonomies } = select( coreStore );\n\t\t\treturn getTaxonomies( {\n\t\t\t\ttype: postType,\n\t\t\t\tper_page: -1,\n\t\t\t} );\n\t\t},\n\t\t[ postType ]\n\t);\n\treturn useMemo( () => {\n\t\treturn taxonomies?.filter(\n\t\t\t( { visibility } ) => !! visibility?.publicly_queryable\n\t\t);\n\t}, [ taxonomies ] );\n};\n\n/**\n * Hook that returns whether a specific post type is hierarchical.\n *\n * @param {string} postType The post type to check.\n * @return {boolean} Whether a specific post type is hierarchical.\n */\nexport function useIsPostTypeHierarchical( postType ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst type = select( coreStore ).getPostType( postType );\n\t\t\treturn type?.viewable && type?.hierarchical;\n\t\t},\n\t\t[ postType ]\n\t);\n}\n\n/**\n * Hook that returns the query properties' names defined by the active\n * block variation, to determine which block's filters to show.\n *\n * @param {Object} attributes Block attributes.\n * @return {string[]} An array of the query attributes.\n */\nexport function useAllowedControls( attributes ) {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( blocksStore ).getActiveBlockVariation(\n\t\t\t\t'core/query',\n\t\t\t\tattributes\n\t\t\t)?.allowedControls,\n\n\t\t[ attributes ]\n\t);\n}\nexport function isControlAllowed( allowedControls, key ) {\n\t// Every controls is allowed if the list is not defined.\n\tif ( ! allowedControls ) {\n\t\treturn true;\n\t}\n\treturn allowedControls.includes( key );\n}\n\n/**\n * Clones a pattern's blocks and then recurses over that list of blocks,\n * transforming them to retain some `query` attribute properties.\n * For now we retain the `postType` and `inherit` properties as they are\n * fundamental for the expected functionality of the block and don't affect\n * its design and presentation.\n *\n * Returns the cloned/transformed blocks and array of existing Query Loop\n * client ids for further manipulation, in order to avoid multiple recursions.\n *\n * @param {WPBlock[]} blocks The list of blocks to look through and transform(mutate).\n * @param {Record<string,*>} queryBlockAttributes The existing Query Loop's attributes.\n * @return {{ newBlocks: WPBlock[], queryClientIds: string[] }} An object with the cloned/transformed blocks and all the Query Loop clients from these blocks.\n */\nexport const getTransformedBlocksFromPattern = (\n\tblocks,\n\tqueryBlockAttributes\n) => {\n\tconst {\n\t\tquery: { postType, inherit },\n\t} = queryBlockAttributes;\n\tconst clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );\n\tconst queryClientIds = [];\n\tconst blocksQueue = [ ...clonedBlocks ];\n\twhile ( blocksQueue.length > 0 ) {\n\t\tconst block = blocksQueue.shift();\n\t\tif ( block.name === 'core/query' ) {\n\t\t\tblock.attributes.query = {\n\t\t\t\t...block.attributes.query,\n\t\t\t\tpostType,\n\t\t\t\tinherit,\n\t\t\t};\n\t\t\tqueryClientIds.push( block.clientId );\n\t\t}\n\t\tblock.innerBlocks?.forEach( ( innerBlock ) => {\n\t\t\tblocksQueue.push( innerBlock );\n\t\t} );\n\t}\n\treturn { newBlocks: clonedBlocks, queryClientIds };\n};\n\n/**\n * Helper hook that determines if there is an active variation of the block\n * and if there are available specific patterns for this variation.\n * If there are, these patterns are going to be the only ones suggested to\n * the user in setup and replace flow, without including the default ones\n * for Query Loop.\n *\n * If there are no such patterns, the default ones for Query Loop are going\n * to be suggested.\n *\n * @param {string} clientId The block's client ID.\n * @param {Object} attributes The block's attributes.\n * @return {string} The block name to be used in the patterns suggestions.\n */\nexport function useBlockNameForPatterns( clientId, attributes ) {\n\tconst activeVariationName = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blocksStore ).getActiveBlockVariation(\n\t\t\t\t'core/query',\n\t\t\t\tattributes\n\t\t\t)?.name,\n\t\t[ attributes ]\n\t);\n\tconst blockName = `core/query/${ activeVariationName }`;\n\tconst hasActiveVariationPatterns = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! activeVariationName ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst { getBlockRootClientId, getPatternsByBlockTypes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst activePatterns = getPatternsByBlockTypes(\n\t\t\t\tblockName,\n\t\t\t\trootClientId\n\t\t\t);\n\t\t\treturn activePatterns.length > 0;\n\t\t},\n\t\t[ clientId, activeVariationName, blockName ]\n\t);\n\treturn hasActiveVariationPatterns ? blockName : 'core/query';\n}\n\n/**\n * Helper hook that determines if there is an active variation of the block\n * and if there are available specific scoped `block` variations connected with\n * this variation.\n *\n * If there are, these variations are going to be the only ones suggested\n * to the user in setup flow when clicking to `start blank`, without including\n * the default ones for Query Loop.\n *\n * If there are no such scoped `block` variations, the default ones for Query\n * Loop are going to be suggested.\n *\n * The way we determine such variations is with the convention that they have the `namespace`\n * attribute defined as an array. This array should contain the names(`name` property) of any\n * variations they want to be connected to.\n * For example, if we have a `Query Loop` scoped `inserter` variation with the name `products`,\n * we can connect a scoped `block` variation by setting its `namespace` attribute to `['products']`.\n * If the user selects this variation, the `namespace` attribute will be overridden by the\n * main `inserter` variation.\n *\n * @param {Object} attributes The block's attributes.\n * @return {WPBlockVariation[]} The block variations to be suggested in setup flow, when clicking to `start blank`.\n */\nexport function useScopedBlockVariations( attributes ) {\n\tconst { activeVariationName, blockVariations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\t\t\treturn {\n\t\t\t\tactiveVariationName: getActiveBlockVariation(\n\t\t\t\t\t'core/query',\n\t\t\t\t\tattributes\n\t\t\t\t)?.name,\n\t\t\t\tblockVariations: getBlockVariations( 'core/query', 'block' ),\n\t\t\t};\n\t\t},\n\t\t[ attributes ]\n\t);\n\tconst variations = useMemo( () => {\n\t\t// Filter out the variations that have defined a `namespace` attribute,\n\t\t// which means they are 'connected' to specific variations of the block.\n\t\tconst isNotConnected = ( variation ) =>\n\t\t\t! variation.attributes?.namespace;\n\t\tif ( ! activeVariationName ) {\n\t\t\treturn blockVariations.filter( isNotConnected );\n\t\t}\n\t\tconst connectedVariations = blockVariations.filter( ( variation ) =>\n\t\t\tvariation.attributes?.namespace?.includes( activeVariationName )\n\t\t);\n\t\tif ( !! connectedVariations.length ) {\n\t\t\treturn connectedVariations;\n\t\t}\n\t\treturn blockVariations.filter( isNotConnected );\n\t}, [ activeVariationName, blockVariations ] );\n\treturn variations;\n}\n\n/**\n * Hook that returns the block patterns for a specific block type.\n *\n * @param {string} clientId The block's client ID.\n * @param {string} name The block type name.\n * @return {Object[]} An array of valid block patterns.\n */\nexport const usePatterns = ( clientId, name ) => {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, getPatternsByBlockTypes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\treturn getPatternsByBlockTypes( name, rootClientId );\n\t\t},\n\t\t[ name, clientId ]\n\t);\n};\n\n/**\n * The object returned by useUnsupportedBlocks with info about the type of\n * unsupported blocks present inside the Query block.\n *\n * @typedef {Object} UnsupportedBlocksInfo\n * @property {boolean} hasBlocksFromPlugins True if blocks from plugins are present.\n * @property {boolean} hasPostContentBlock True if a 'core/post-content' block is present.\n * @property {boolean} hasUnsupportedBlocks True if there are any unsupported blocks.\n */\n\n/**\n * Hook that returns an object with information about the unsupported blocks\n * present inside a Query Loop with the given `clientId`. The returned object\n * contains props that are true when a certain type of unsupported block is\n * present.\n *\n * @param {string} clientId The block's client ID.\n * @return {UnsupportedBlocksInfo} The object containing the information.\n */\nexport const useUnsupportedBlocks = ( clientId ) => {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getClientIdsOfDescendants, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst blocks = {};\n\t\t\tgetClientIdsOfDescendants( clientId ).forEach(\n\t\t\t\t( descendantClientId ) => {\n\t\t\t\t\tconst blockName = getBlockName( descendantClientId );\n\t\t\t\t\t/*\n\t\t\t\t\t * Client side navigation can be true in two states:\n\t\t\t\t\t * - supports.interactivity = true;\n\t\t\t\t\t * - supports.interactivity.clientNavigation = true;\n\t\t\t\t\t */\n\t\t\t\t\tconst blockSupportsInteractivity = Object.is(\n\t\t\t\t\t\tgetBlockSupport( blockName, 'interactivity' ),\n\t\t\t\t\t\ttrue\n\t\t\t\t\t);\n\t\t\t\t\tconst blockSupportsInteractivityClientNavigation =\n\t\t\t\t\t\tgetBlockSupport(\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\t'interactivity.clientNavigation'\n\t\t\t\t\t\t);\n\t\t\t\t\tconst blockInteractivity =\n\t\t\t\t\t\tblockSupportsInteractivity ||\n\t\t\t\t\t\tblockSupportsInteractivityClientNavigation;\n\t\t\t\t\tif ( ! blockInteractivity ) {\n\t\t\t\t\t\tblocks.hasBlocksFromPlugins = true;\n\t\t\t\t\t} else if ( blockName === 'core/post-content' ) {\n\t\t\t\t\t\tblocks.hasPostContentBlock = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\tblocks.hasUnsupportedBlocks =\n\t\t\t\tblocks.hasBlocksFromPlugins || blocks.hasPostContentBl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CAAC4C,oBAAoB,GAC1B5C,MAAM,CAAC0C,oBAAoB,IAAI1C,MAAM,CAAC2C,mBAAmB;IAC1D,OAAO3C,MAAM;EACd,CAAC,EACD,CAAEU,QAAQ,CACX,CAAC;AACF,CAAC;AAAC5D,OAAA,CAAAkF,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_data","require","_element","_coreData","_blockEditor","_htmlEntities","_blocks","getEntitiesInfo","entities","mapping","reduce","accumulator","entity","mapById","mapByName","names","id","name","push","exports","getValueFromObjectPath","object","path","normalizedPath","split","value","forEach","fieldName","mapToIHasNameAndId","map","decodeEntities","usePostTypes","postTypes","useSelect","select","getPostTypes","coreStore","excludedPostTypes","filteredPostTypes","per_page","filter","viewable","slug","includes","postTypesTaxonomiesMap","useMemo","length","type","taxonomies","postTypesSelectOptions","labels","label","singular_name","useTaxonomies","postType","getTaxonomies","getPostType","visibility","publicly_queryable","useIsPostTypeHierarchical","hierarchical","useAllowedControls","attributes","blocksStore","getActiveBlockVariation","allowedControls","isControlAllowed","key","getTransformedBlocksFromPattern","blocks","queryBlockAttributes","query","inherit","namespace","clonedBlocks","block","cloneBlock","queryClientIds","blocksQueue","shift","clientId","innerBlocks","innerBlock","newBlocks","useBlockNameForPatterns","activeVariationName","blockName","hasActiveVariationPatterns","getBlockRootClientId","getPatternsByBlockTypes","blockEditorStore","rootClientId","activePatterns","useScopedBlockVariations","blockVariations","getBlockVariations","variations","isNotConnected","variation","connectedVariations","usePatterns","useUnsupportedBlocks","getClientIdsOfDescendants","getBlockName","descendantClientId","blockSupportsInteractivity","Object","is","getBlockSupport","blockSupportsInteractivityClientNavigation","blockInteractivity","hasBlocksFromPlugins","hasPostContentBlock","hasUnsupportedBlocks"],"sources":["@wordpress/block-library/src/query/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\tcloneBlock,\n\tgetBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\n\n/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */\n\n/**\n * @typedef IHasNameAndId\n * @property {string|number} id The entity's id.\n * @property {string} name The entity's name.\n */\n\n/**\n * The object used in Query block that contains info and helper mappings\n * from an array of IHasNameAndId objects.\n *\n * @typedef {Object} QueryEntitiesInfo\n * @property {IHasNameAndId[]} entities The array of entities.\n * @property {Object<string, IHasNameAndId>} mapById Object mapping with the id as key and the entity as value.\n * @property {Object<string, IHasNameAndId>} mapByName Object mapping with the name as key and the entity as value.\n * @property {string[]} names Array with the entities' names.\n */\n\n/**\n * Returns a helper object with mapping from Objects that implement\n * the `IHasNameAndId` interface. The returned object is used for\n * integration with `FormTokenField` component.\n *\n * @param {IHasNameAndId[]} entities The entities to extract of helper object.\n * @return {QueryEntitiesInfo} The object with the entities information.\n */\nexport const getEntitiesInfo = ( entities ) => {\n\tconst mapping = entities?.reduce(\n\t\t( accumulator, entity ) => {\n\t\t\tconst { mapById, mapByName, names } = accumulator;\n\t\t\tmapById[ entity.id ] = entity;\n\t\t\tmapByName[ entity.name ] = entity;\n\t\t\tnames.push( entity.name );\n\t\t\treturn accumulator;\n\t\t},\n\t\t{ mapById: {}, mapByName: {}, names: [] }\n\t);\n\treturn {\n\t\tentities,\n\t\t...mapping,\n\t};\n};\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as a string of properties, separated by dots,\n * for example: \"parent.child\".\n *\n * @param {Object} object Input object.\n * @param {string} path Path to the object property.\n * @return {*} Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = ( object, path ) => {\n\tconst normalizedPath = path.split( '.' );\n\tlet value = object;\n\tnormalizedPath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\n/**\n * Helper util to map records to add a `name` prop from a\n * provided path, in order to handle all entities in the same\n * fashion(implementing`IHasNameAndId` interface).\n *\n * @param {Object[]} entities The array of entities.\n * @param {string} path The path to map a `name` property from the entity.\n * @return {IHasNameAndId[]} An array of enitities that now implement the `IHasNameAndId` interface.\n */\nexport const mapToIHasNameAndId = ( entities, path ) => {\n\treturn ( entities || [] ).map( ( entity ) => ( {\n\t\t...entity,\n\t\tname: decodeEntities( getValueFromObjectPath( entity, path ) ),\n\t} ) );\n};\n\n/**\n * Returns a helper object that contains:\n * 1. An `options` object from the available post types, to be passed to a `SelectControl`.\n * 2. A helper map with available taxonomies per post type.\n *\n * @return {Object} The helper object related to post types.\n */\nexport const usePostTypes = () => {\n\tconst postTypes = useSelect( ( select ) => {\n\t\tconst { getPostTypes } = select( coreStore );\n\t\tconst excludedPostTypes = [ 'attachment' ];\n\t\tconst filteredPostTypes = getPostTypes( { per_page: -1 } )?.filter(\n\t\t\t( { viewable, slug } ) =>\n\t\t\t\tviewable && ! excludedPostTypes.includes( slug )\n\t\t);\n\t\treturn filteredPostTypes;\n\t}, [] );\n\tconst postTypesTaxonomiesMap = useMemo( () => {\n\t\tif ( ! postTypes?.length ) {\n\t\t\treturn;\n\t\t}\n\t\treturn postTypes.reduce( ( accumulator, type ) => {\n\t\t\taccumulator[ type.slug ] = type.taxonomies;\n\t\t\treturn accumulator;\n\t\t}, {} );\n\t}, [ postTypes ] );\n\tconst postTypesSelectOptions = useMemo(\n\t\t() =>\n\t\t\t( postTypes || [] ).map( ( { labels, slug } ) => ( {\n\t\t\t\tlabel: labels.singular_name,\n\t\t\t\tvalue: slug,\n\t\t\t} ) ),\n\t\t[ postTypes ]\n\t);\n\treturn { postTypesTaxonomiesMap, postTypesSelectOptions };\n};\n\n/**\n * Hook that returns the taxonomies associated with a specific post type.\n *\n * @param {string} postType The post type from which to retrieve the associated taxonomies.\n * @return {Object[]} An array of the associated taxonomies.\n */\nexport const useTaxonomies = ( postType ) => {\n\tconst taxonomies = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getTaxonomies, getPostType } = select( coreStore );\n\t\t\t// Does the post type have taxonomies?\n\t\t\tif ( getPostType( postType )?.taxonomies?.length > 0 ) {\n\t\t\t\treturn getTaxonomies( {\n\t\t\t\t\ttype: postType,\n\t\t\t\t\tper_page: -1,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn [];\n\t\t},\n\t\t[ postType ]\n\t);\n\treturn useMemo( () => {\n\t\treturn taxonomies?.filter(\n\t\t\t( { visibility } ) => !! visibility?.publicly_queryable\n\t\t);\n\t}, [ taxonomies ] );\n};\n\n/**\n * Hook that returns whether a specific post type is hierarchical.\n *\n * @param {string} postType The post type to check.\n * @return {boolean} Whether a specific post type is hierarchical.\n */\nexport function useIsPostTypeHierarchical( postType ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst type = select( coreStore ).getPostType( postType );\n\t\t\treturn type?.viewable && type?.hierarchical;\n\t\t},\n\t\t[ postType ]\n\t);\n}\n\n/**\n * Hook that returns the query properties' names defined by the active\n * block variation, to determine which block's filters to show.\n *\n * @param {Object} attributes Block attributes.\n * @return {string[]} An array of the query attributes.\n */\nexport function useAllowedControls( attributes ) {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( blocksStore ).getActiveBlockVariation(\n\t\t\t\t'core/query',\n\t\t\t\tattributes\n\t\t\t)?.allowedControls,\n\n\t\t[ attributes ]\n\t);\n}\nexport function isControlAllowed( allowedControls, key ) {\n\t// Every controls is allowed if the list is not defined.\n\tif ( ! allowedControls ) {\n\t\treturn true;\n\t}\n\treturn allowedControls.includes( key );\n}\n\n/**\n * Clones a pattern's blocks and then recurses over that list of blocks,\n * transforming them to retain some `query` attribute properties.\n * For now we retain the `postType` and `inherit` properties as they are\n * fundamental for the expected functionality of the block and don't affect\n * its design and presentation.\n *\n * Returns the cloned/transformed blocks and array of existing Query Loop\n * client ids for further manipulation, in order to avoid multiple recursions.\n *\n * @param {WPBlock[]} blocks The list of blocks to look through and transform(mutate).\n * @param {Record<string,*>} queryBlockAttributes The existing Query Loop's attributes.\n * @return {{ newBlocks: WPBlock[], queryClientIds: string[] }} An object with the cloned/transformed blocks and all the Query Loop clients from these blocks.\n */\nexport const getTransformedBlocksFromPattern = (\n\tblocks,\n\tqueryBlockAttributes\n) => {\n\tconst {\n\t\tquery: { postType, inherit },\n\t\tnamespace,\n\t} = queryBlockAttributes;\n\tconst clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );\n\tconst queryClientIds = [];\n\tconst blocksQueue = [ ...clonedBlocks ];\n\twhile ( blocksQueue.length > 0 ) {\n\t\tconst block = blocksQueue.shift();\n\t\tif ( block.name === 'core/query' ) {\n\t\t\tblock.attributes.query = {\n\t\t\t\t...block.attributes.query,\n\t\t\t\tpostType,\n\t\t\t\tinherit,\n\t\t\t};\n\t\t\tif ( namespace ) {\n\t\t\t\tblock.attributes.namespace = namespace;\n\t\t\t}\n\t\t\tqueryClientIds.push( block.clientId );\n\t\t}\n\t\tblock.innerBlocks?.forEach( ( innerBlock ) => {\n\t\t\tblocksQueue.push( innerBlock );\n\t\t} );\n\t}\n\treturn { newBlocks: clonedBlocks, queryClientIds };\n};\n\n/**\n * Helper hook that determines if there is an active variation of the block\n * and if there are available specific patterns for this variation.\n * If there are, these patterns are going to be the only ones suggested to\n * the user in setup and replace flow, without including the default ones\n * for Query Loop.\n *\n * If there are no such patterns, the default ones for Query Loop are going\n * to be suggested.\n *\n * @param {string} clientId The block's client ID.\n * @param {Object} attributes The block's attributes.\n * @return {string} The block name to be used in the patterns suggestions.\n */\nexport function useBlockNameForPatterns( clientId, attributes ) {\n\tconst activeVariationName = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blocksStore ).getActiveBlockVariation(\n\t\t\t\t'core/query',\n\t\t\t\tattributes\n\t\t\t)?.name,\n\t\t[ attributes ]\n\t);\n\tconst blockName = `core/query/${ activeVariationName }`;\n\tconst hasActiveVariationPatterns = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! activeVariationName ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst { getBlockRootClientId, getPatternsByBlockTypes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst activePatterns = getPatternsByBlockTypes(\n\t\t\t\tblockName,\n\t\t\t\trootClientId\n\t\t\t);\n\t\t\treturn activePatterns.length > 0;\n\t\t},\n\t\t[ clientId, activeVariationName, blockName ]\n\t);\n\treturn hasActiveVariationPatterns ? blockName : 'core/query';\n}\n\n/**\n * Helper hook that determines if there is an active variation of the block\n * and if there are available specific scoped `block` variations connected with\n * this variation.\n *\n * If there are, these variations are going to be the only ones suggested\n * to the user in setup flow when clicking to `start blank`, without including\n * the default ones for Query Loop.\n *\n * If there are no such scoped `block` variations, the default ones for Query\n * Loop are going to be suggested.\n *\n * The way we determine such variations is with the convention that they have the `namespace`\n * attribute defined as an array. This array should contain the names(`name` property) of any\n * variations they want to be connected to.\n * For example, if we have a `Query Loop` scoped `inserter` variation with the name `products`,\n * we can connect a scoped `block` variation by setting its `namespace` attribute to `['products']`.\n * If the user selects this variation, the `namespace` attribute will be overridden by the\n * main `inserter` variation.\n *\n * @param {Object} attributes The block's attributes.\n * @return {WPBlockVariation[]} The block variations to be suggested in setup flow, when clicking to `start blank`.\n */\nexport function useScopedBlockVariations( attributes ) {\n\tconst { activeVariationName, blockVariations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\t\t\treturn {\n\t\t\t\tactiveVariationName: getActiveBlockVariation(\n\t\t\t\t\t'core/query',\n\t\t\t\t\tattributes\n\t\t\t\t)?.name,\n\t\t\t\tblockVariations: getBlockVariations( 'core/query', 'block' ),\n\t\t\t};\n\t\t},\n\t\t[ attributes ]\n\t);\n\tconst variations = useMemo( () => {\n\t\t// Filter out the variations that have defined a `namespace` attribute,\n\t\t// which means they are 'connected' to specific variations of the block.\n\t\tconst isNotConnected = ( variation ) =>\n\t\t\t! variation.attributes?.namespace;\n\t\tif ( ! activeVariationName ) {\n\t\t\treturn blockVariations.filter( isNotConnected );\n\t\t}\n\t\tconst connectedVariations = blockVariations.filter( ( variation ) =>\n\t\t\tvariation.attributes?.namespace?.includes( activeVariationName )\n\t\t);\n\t\tif ( !! connectedVariations.length ) {\n\t\t\treturn connectedVariations;\n\t\t}\n\t\treturn blockVariations.filter( isNotConnected );\n\t}, [ activeVariationName, blockVariations ] );\n\treturn variations;\n}\n\n/**\n * Hook that returns the block patterns for a specific block type.\n *\n * @param {string} clientId The block's client ID.\n * @param {string} name The block type name.\n * @return {Object[]} An array of valid block patterns.\n */\nexport const usePatterns = ( clientId, name ) => {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, getPatternsByBlockTypes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\treturn getPatternsByBlockTypes( name, rootClientId );\n\t\t},\n\t\t[ name, clientId ]\n\t);\n};\n\n/**\n * The object returned by useUnsupportedBlocks with info about the type of\n * unsupported blocks present inside the Query block.\n *\n * @typedef {Object} UnsupportedBlocksInfo\n * @property {boolean} hasBlocksFromPlugins True if blocks from plugins are present.\n * @property {boolean} hasPostContentBlock True if a 'core/post-content' block is present.\n * @property {boolean} hasUnsupportedBlocks True if there are any unsupported blocks.\n */\n\n/**\n * Hook that returns an object with information about the unsupported blocks\n * present inside a Query Loop with the given `clientId`. The returned object\n * contains props that are true when a certain type of unsupported block is\n * present.\n *\n * @param {string} clientId The block's client ID.\n * @return {UnsupportedBlocksInfo} The object containing the information.\n */\nexport const useUnsupportedBlocks = ( clientId ) => {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getClientIdsOfDescendants, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst blocks = {};\n\t\t\tgetClientIdsOfDescendants( clientId ).forEach(\n\t\t\t\t( descendantClientId ) => {\n\t\t\t\t\tconst blockName = getBlockName( descendantClientId );\n\t\t\t\t\t/*\n\t\t\t\t\t * Client side navigation can be true in two states:\n\t\t\t\t\t * - supports.interactivity = true;\n\t\t\t\t\t * - supports.interactivity.clientNavigation = true;\n\t\t\t\t\t */\n\t\t\t\t\tconst blockSupportsInteractivity = Object.is(\n\t\t\t\t\t\tgetBlockSupport( blockName, 'interactivity' ),\n\t\t\t\t\t\ttrue\n\t\t\t\t\t);\n\t\t\t\t\tconst blockSupportsInteractivityClientNavigation =\n\t\t\t\t\t\tgetBlockSupport(\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\t'interactivity.clientNavigation'\n\t\t\t\t\t\t);\n\t\t\t\t\tconst blockInteractivity =\n\t\t\t\t\t\tblockSupportsInteractivity ||\n\t\t\t\t\t\tblockSupportsInteractivityClientNavigation;\n\t\t\t\t\tif ( ! blockInteractivity ) {\n\t\t\t\t\t\tblocks.hasBlocksFromPlugins = true;\n\t\t\t\t\t} else if ( blockName === 'core/post-content' ) {\n\t\t\t\t\t\tblocks.hasPostContentBlock = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\tblocks.hasUnsupportedBlocks =\n\t\t\t\tblocks.hasBlocksFromPlugins || blocks.hasPostContentBlock;\n\t\t\treturn blocks;\n\t\t},\n\t\t[ clientId ]\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AARA;AACA;AACA;;AAYA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,eAAe,GAAKC,QAAQ,I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object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _i18n = require("@wordpress/i18n");
|
|
8
|
-
var _icons = require("
|
|
9
|
-
var _icons2 = require("./icons");
|
|
8
|
+
var _icons = require("./icons");
|
|
10
9
|
/**
|
|
11
10
|
* WordPress dependencies
|
|
12
11
|
*/
|
|
@@ -15,77 +14,32 @@ var _icons2 = require("./icons");
|
|
|
15
14
|
* Internal dependencies
|
|
16
15
|
*/
|
|
17
16
|
|
|
18
|
-
const QUERY_DEFAULT_ATTRIBUTES = {
|
|
19
|
-
query: {
|
|
20
|
-
perPage: 3,
|
|
21
|
-
pages: 0,
|
|
22
|
-
offset: 0,
|
|
23
|
-
postType: 'post',
|
|
24
|
-
order: 'desc',
|
|
25
|
-
orderBy: 'date',
|
|
26
|
-
author: '',
|
|
27
|
-
search: '',
|
|
28
|
-
exclude: [],
|
|
29
|
-
sticky: '',
|
|
30
|
-
inherit: false
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
17
|
const variations = [{
|
|
34
|
-
name: 'posts-list',
|
|
35
|
-
title: (0, _i18n.__)('Posts List'),
|
|
36
|
-
description: (0, _i18n.__)('Display a list of your most recent posts, excluding sticky posts.'),
|
|
37
|
-
icon: _icons.postList,
|
|
38
|
-
attributes: {
|
|
39
|
-
namespace: 'core/posts-list',
|
|
40
|
-
query: {
|
|
41
|
-
perPage: 4,
|
|
42
|
-
pages: 1,
|
|
43
|
-
offset: 0,
|
|
44
|
-
postType: 'post',
|
|
45
|
-
order: 'desc',
|
|
46
|
-
orderBy: 'date',
|
|
47
|
-
author: '',
|
|
48
|
-
search: '',
|
|
49
|
-
sticky: 'exclude',
|
|
50
|
-
inherit: false
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
scope: ['inserter'],
|
|
54
|
-
isActive: ['namespace', 'query.postType']
|
|
55
|
-
}, {
|
|
56
18
|
name: 'title-date',
|
|
57
19
|
title: (0, _i18n.__)('Title & Date'),
|
|
58
|
-
icon:
|
|
59
|
-
attributes: {
|
|
60
|
-
...QUERY_DEFAULT_ATTRIBUTES
|
|
61
|
-
},
|
|
20
|
+
icon: _icons.titleDate,
|
|
21
|
+
attributes: {},
|
|
62
22
|
innerBlocks: [['core/post-template', {}, [['core/post-title'], ['core/post-date']]], ['core/query-pagination'], ['core/query-no-results']],
|
|
63
23
|
scope: ['block']
|
|
64
24
|
}, {
|
|
65
25
|
name: 'title-excerpt',
|
|
66
26
|
title: (0, _i18n.__)('Title & Excerpt'),
|
|
67
|
-
icon:
|
|
68
|
-
attributes: {
|
|
69
|
-
...QUERY_DEFAULT_ATTRIBUTES
|
|
70
|
-
},
|
|
27
|
+
icon: _icons.titleExcerpt,
|
|
28
|
+
attributes: {},
|
|
71
29
|
innerBlocks: [['core/post-template', {}, [['core/post-title'], ['core/post-excerpt']]], ['core/query-pagination'], ['core/query-no-results']],
|
|
72
30
|
scope: ['block']
|
|
73
31
|
}, {
|
|
74
32
|
name: 'title-date-excerpt',
|
|
75
33
|
title: (0, _i18n.__)('Title, Date, & Excerpt'),
|
|
76
|
-
icon:
|
|
77
|
-
attributes: {
|
|
78
|
-
...QUERY_DEFAULT_ATTRIBUTES
|
|
79
|
-
},
|
|
34
|
+
icon: _icons.titleDateExcerpt,
|
|
35
|
+
attributes: {},
|
|
80
36
|
innerBlocks: [['core/post-template', {}, [['core/post-title'], ['core/post-date'], ['core/post-excerpt']]], ['core/query-pagination'], ['core/query-no-results']],
|
|
81
37
|
scope: ['block']
|
|
82
38
|
}, {
|
|
83
39
|
name: 'image-date-title',
|
|
84
40
|
title: (0, _i18n.__)('Image, Date, & Title'),
|
|
85
|
-
icon:
|
|
86
|
-
attributes: {
|
|
87
|
-
...QUERY_DEFAULT_ATTRIBUTES
|
|
88
|
-
},
|
|
41
|
+
icon: _icons.imageDateTitle,
|
|
42
|
+
attributes: {},
|
|
89
43
|
innerBlocks: [['core/post-template', {}, [['core/post-featured-image'], ['core/post-date'], ['core/post-title']]], ['core/query-pagination'], ['core/query-no-results']],
|
|
90
44
|
scope: ['block']
|
|
91
45
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_icons","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_icons","variations","name","title","__","icon","titleDate","attributes","innerBlocks","scope","titleExcerpt","titleDateExcerpt","imageDateTitle","_default","exports","default"],"sources":["@wordpress/block-library/src/query/variations.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\ttitleDate,\n\ttitleExcerpt,\n\ttitleDateExcerpt,\n\timageDateTitle,\n} from './icons';\n\nconst variations = [\n\t{\n\t\tname: 'title-date',\n\t\ttitle: __( 'Title & Date' ),\n\t\ticon: titleDate,\n\t\tattributes: {},\n\t\tinnerBlocks: [\n\t\t\t[\n\t\t\t\t'core/post-template',\n\t\t\t\t{},\n\t\t\t\t[ [ 'core/post-title' ], [ 'core/post-date' ] ],\n\t\t\t],\n\t\t\t[ 'core/query-pagination' ],\n\t\t\t[ 'core/query-no-results' ],\n\t\t],\n\t\tscope: [ 'block' ],\n\t},\n\t{\n\t\tname: 'title-excerpt',\n\t\ttitle: __( 'Title & Excerpt' ),\n\t\ticon: titleExcerpt,\n\t\tattributes: {},\n\t\tinnerBlocks: [\n\t\t\t[\n\t\t\t\t'core/post-template',\n\t\t\t\t{},\n\t\t\t\t[ [ 'core/post-title' ], [ 'core/post-excerpt' ] ],\n\t\t\t],\n\t\t\t[ 'core/query-pagination' ],\n\t\t\t[ 'core/query-no-results' ],\n\t\t],\n\t\tscope: [ 'block' ],\n\t},\n\t{\n\t\tname: 'title-date-excerpt',\n\t\ttitle: __( 'Title, Date, & Excerpt' ),\n\t\ticon: titleDateExcerpt,\n\t\tattributes: {},\n\t\tinnerBlocks: [\n\t\t\t[\n\t\t\t\t'core/post-template',\n\t\t\t\t{},\n\t\t\t\t[\n\t\t\t\t\t[ 'core/post-title' ],\n\t\t\t\t\t[ 'core/post-date' ],\n\t\t\t\t\t[ 'core/post-excerpt' ],\n\t\t\t\t],\n\t\t\t],\n\t\t\t[ 'core/query-pagination' ],\n\t\t\t[ 'core/query-no-results' ],\n\t\t],\n\t\tscope: [ 'block' ],\n\t},\n\t{\n\t\tname: 'image-date-title',\n\t\ttitle: __( 'Image, Date, & Title' ),\n\t\ticon: imageDateTitle,\n\t\tattributes: {},\n\t\tinnerBlocks: [\n\t\t\t[\n\t\t\t\t'core/post-template',\n\t\t\t\t{},\n\t\t\t\t[\n\t\t\t\t\t[ 'core/post-featured-image' ],\n\t\t\t\t\t[ 'core/post-date' ],\n\t\t\t\t\t[ 'core/post-title' ],\n\t\t\t\t],\n\t\t\t],\n\t\t\t[ 'core/query-pagination' ],\n\t\t\t[ 'core/query-no-results' ],\n\t\t],\n\t\tscope: [ 'block' ],\n\t},\n];\n\nexport default variations;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAQA,MAAME,UAAU,GAAG,CAClB;EACCC,IAAI,EAAE,YAAY;EAClBC,KAAK,EAAE,IAAAC,QAAE,EAAE,cAAe,CAAC;EAC3BC,IAAI,EAAEC,gBAAS;EACfC,UAAU,EAAE,CAAC,CAAC;EACdC,WAAW,EAAE,CACZ,CACC,oBAAoB,EACpB,CAAC,CAAC,EACF,CAAE,CAAE,iBAAiB,CAAE,EAAE,CAAE,gBAAgB,CAAE,CAAE,CAC/C,EACD,CAAE,uBAAuB,CAAE,EAC3B,CAAE,uBAAuB,CAAE,CAC3B;EACDC,KAAK,EAAE,CAAE,OAAO;AACjB,CAAC,EACD;EACCP,IAAI,EAAE,eAAe;EACrBC,KAAK,EAAE,IAAAC,QAAE,EAAE,iBAAkB,CAAC;EAC9BC,IAAI,EAAEK,mBAAY;EAClBH,UAAU,EAAE,CAAC,CAAC;EACdC,WAAW,EAAE,CACZ,CACC,oBAAoB,EACpB,CAAC,CAAC,EACF,CAAE,CAAE,iBAAiB,CAAE,EAAE,CAAE,mBAAmB,CAAE,CAAE,CAClD,EACD,CAAE,uBAAuB,CAAE,EAC3B,CAAE,uBAAuB,CAAE,CAC3B;EACDC,KAAK,EAAE,CAAE,OAAO;AACjB,CAAC,EACD;EACCP,IAAI,EAAE,oBAAoB;EAC1BC,KAAK,EAAE,IAAAC,QAAE,EAAE,wBAAyB,CAAC;EACrCC,IAAI,EAAEM,uBAAgB;EACtBJ,UAAU,EAAE,CAAC,CAAC;EACdC,WAAW,EAAE,CACZ,CACC,oBAAoB,EACpB,CAAC,CAAC,EACF,CACC,CAAE,iBAAiB,CAAE,EACrB,CAAE,gBAAgB,CAAE,EACpB,CAAE,mBAAmB,CAAE,CACvB,CACD,EACD,CAAE,uBAAuB,CAAE,EAC3B,CAAE,uBAAuB,CAAE,CAC3B;EACDC,KAAK,EAAE,CAAE,OAAO;AACjB,CAAC,EACD;EACCP,IAAI,EAAE,kBAAkB;EACxBC,KAAK,EAAE,IAAAC,QAAE,EAAE,sBAAuB,CAAC;EACnCC,IAAI,EAAEO,qBAAc;EACpBL,UAAU,EAAE,CAAC,CAAC;EACdC,WAAW,EAAE,CACZ,CACC,oBAAoB,EACpB,CAAC,CAAC,EACF,CACC,CAAE,0BAA0B,CAAE,EAC9B,CAAE,gBAAgB,CAAE,EACpB,CAAE,iBAAiB,CAAE,CACrB,CACD,EACD,CAAE,uBAAuB,CAAE,EAC3B,CAAE,uBAAuB,CAAE,CAC3B;EACDC,KAAK,EAAE,CAAE,OAAO;AACjB,CAAC,CACD;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEad,UAAU","ignoreList":[]}
|
|
@@ -54,6 +54,7 @@ function QueryPaginationNumbersEdit({
|
|
|
54
54
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
|
|
55
55
|
title: (0, _i18n.__)('Settings'),
|
|
56
56
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.RangeControl, {
|
|
57
|
+
__nextHasNoMarginBottom: true,
|
|
57
58
|
label: (0, _i18n.__)('Number of links'),
|
|
58
59
|
help: (0, _i18n.__)('Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible.'),
|
|
59
60
|
value: midSize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_blockEditor","_components","_jsxRuntime","createPaginationItem","content","Tag","extraClass","jsx","className","children","previewPaginationNumbers","midSize","paginationItems","i","push","Fragment","QueryPaginationNumbersEdit","attributes","setAttributes","paginationNumbers","parseInt","jsxs","InspectorControls","PanelBody","title","__","RangeControl","label","help","value","onChange","min","max","withInputField","useBlockProps"],"sources":["@wordpress/block-library/src/query-pagination-numbers/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\nimport { PanelBody, RangeControl } from '@wordpress/components';\n\nconst createPaginationItem = ( content, Tag = 'a', extraClass = '' ) => (\n\t<Tag key={ content } className={ `page-numbers ${ extraClass }` }>\n\t\t{ content }\n\t</Tag>\n);\n\nconst previewPaginationNumbers = ( midSize ) => {\n\tconst paginationItems = [];\n\n\t// First set of pagination items.\n\tfor ( let i = 1; i <= midSize; i++ ) {\n\t\tpaginationItems.push( createPaginationItem( i ) );\n\t}\n\n\t// Current pagination item.\n\tpaginationItems.push(\n\t\tcreatePaginationItem( midSize + 1, 'span', 'current' )\n\t);\n\n\t// Second set of pagination items.\n\tfor ( let i = 1; i <= midSize; i++ ) {\n\t\tpaginationItems.push( createPaginationItem( midSize + 1 + i ) );\n\t}\n\n\t// Dots.\n\tpaginationItems.push( createPaginationItem( '...', 'span', 'dots' ) );\n\n\t// Last pagination item.\n\tpaginationItems.push( createPaginationItem( midSize * 2 + 3 ) );\n\n\treturn <>{ paginationItems }</>;\n};\n\nexport default function QueryPaginationNumbersEdit( {\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst { midSize } = attributes;\n\tconst paginationNumbers = previewPaginationNumbers(\n\t\tparseInt( midSize, 10 )\n\t);\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Number of links' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ midSize }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tmidSize: parseInt( value, 10 ),\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tmax={ 5 }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...useBlockProps() }>{ paginationNumbers }</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAgE,IAAAG,WAAA,GAAAH,OAAA;AALhE;AACA;AACA;;AAKA,MAAMI,oBAAoB,GAAGA,CAAEC,OAAO,EAAEC,GAAG,GAAG,GAAG,EAAEC,UAAU,GAAG,EAAE,kBACjE,IAAAJ,WAAA,CAAAK,GAAA,EAACF,GAAG;EAAiBG,SAAS,EAAI,gBAAgBF,UAAY,EAAG;EAAAG,QAAA,EAC9DL;AAAO,GADCA,OAEN,CACL;AAED,MAAMM,wBAAwB,GAAKC,OAAO,IAAM;EAC/C,MAAMC,eAAe,GAAG,EAAE;;EAE1B;EACA,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,C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,EAACN,WAAA,CAAAyB,YAAY;UACZC,KAAK,EAAG,
|
|
1
|
+
{"version":3,"names":["_i18n","require","_blockEditor","_components","_jsxRuntime","createPaginationItem","content","Tag","extraClass","jsx","className","children","previewPaginationNumbers","midSize","paginationItems","i","push","Fragment","QueryPaginationNumbersEdit","attributes","setAttributes","paginationNumbers","parseInt","jsxs","InspectorControls","PanelBody","title","__","RangeControl","__nextHasNoMarginBottom","label","help","value","onChange","min","max","withInputField","useBlockProps"],"sources":["@wordpress/block-library/src/query-pagination-numbers/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\nimport { PanelBody, RangeControl } from '@wordpress/components';\n\nconst createPaginationItem = ( content, Tag = 'a', extraClass = '' ) => (\n\t<Tag key={ content } className={ `page-numbers ${ extraClass }` }>\n\t\t{ content }\n\t</Tag>\n);\n\nconst previewPaginationNumbers = ( midSize ) => {\n\tconst paginationItems = [];\n\n\t// First set of pagination items.\n\tfor ( let i = 1; i <= midSize; i++ ) {\n\t\tpaginationItems.push( createPaginationItem( i ) );\n\t}\n\n\t// Current pagination item.\n\tpaginationItems.push(\n\t\tcreatePaginationItem( midSize + 1, 'span', 'current' )\n\t);\n\n\t// Second set of pagination items.\n\tfor ( let i = 1; i <= midSize; i++ ) {\n\t\tpaginationItems.push( createPaginationItem( midSize + 1 + i ) );\n\t}\n\n\t// Dots.\n\tpaginationItems.push( createPaginationItem( '...', 'span', 'dots' ) );\n\n\t// Last pagination item.\n\tpaginationItems.push( createPaginationItem( midSize * 2 + 3 ) );\n\n\treturn <>{ paginationItems }</>;\n};\n\nexport default function QueryPaginationNumbersEdit( {\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst { midSize } = attributes;\n\tconst paginationNumbers = previewPaginationNumbers(\n\t\tparseInt( midSize, 10 )\n\t);\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Number of links' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ midSize }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tmidSize: parseInt( value, 10 ),\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tmax={ 5 }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...useBlockProps() }>{ paginationNumbers }</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAgE,IAAAG,WAAA,GAAAH,OAAA;AALhE;AACA;AACA;;AAKA,MAAMI,oBAAoB,GAAGA,CAAEC,OAAO,EAAEC,GAAG,GAAG,GAAG,EAAEC,UAAU,GAAG,EAAE,kBACjE,IAAAJ,WAAA,CAAAK,GAAA,EAACF,GAAG;EAAiBG,SAAS,EAAI,gBAAgBF,UAAY,EAAG;EAAAG,QAAA,EAC9DL;AAAO,GADCA,OAEN,CACL;AAED,MAAMM,wBAAwB,GAAKC,OAAO,IAAM;EAC/C,MAAMC,eAAe,GAAG,EAAE;;EAE1B;EACA,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIF,OAAO,EAAEE,CAAC,EAAE,EAAG;IACpCD,eAAe,CAACE,IAAI,CAAEX,oBAAoB,CAAEU,CAAE,CAAE,CAAC;EAClD;;EAEA;EACAD,eAAe,CAACE,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AAG;UACHK,KAAK,EAAGnB,OAAS;UACjBoB,QAAQ,EAAKD,KAAK,IAAM;YACvBZ,aAAa,CAAE;cACdP,OAAO,EAAES,QAAQ,CAAEU,KAAK,EAAE,EAAG;YAC9B,CAAE,CAAC;UACJ,CAAG;UACHE,GAAG,EAAG,CAAG;UACTC,GAAG,EAAG,CAAG;UACTC,cAAc,EAAG;QAAO,CACxB;MAAC,CACQ;IAAC,CACM,CAAC,eACpB,IAAAhC,WAAA,CAAAK,GAAA;MAAA,GAAU,IAAA4B,0BAAa,EAAC,CAAC;MAAA1B,QAAA,EAAKU;IAAiB,CAAO,CAAC;EAAA,CACtD,CAAC;AAEL","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
9
9
|
var _blockEditor = require("@wordpress/block-editor");
|
|
10
10
|
var _components = require("@wordpress/components");
|
|
11
11
|
var _i18n = require("@wordpress/i18n");
|
|
12
|
-
var
|
|
12
|
+
var _useArchiveLabel = require("./use-archive-label");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
/**
|
|
15
15
|
* External dependencies
|
|
@@ -19,11 +19,16 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
19
19
|
* WordPress dependencies
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Internal dependencies
|
|
24
|
+
*/
|
|
25
|
+
|
|
22
26
|
const SUPPORTED_TYPES = ['archive', 'search'];
|
|
23
27
|
function QueryTitleEdit({
|
|
24
28
|
attributes: {
|
|
25
29
|
type,
|
|
26
30
|
level,
|
|
31
|
+
levelOptions,
|
|
27
32
|
textAlign,
|
|
28
33
|
showPrefix,
|
|
29
34
|
showSearchTerm
|
|
@@ -31,21 +36,9 @@ function QueryTitleEdit({
|
|
|
31
36
|
setAttributes
|
|
32
37
|
}) {
|
|
33
38
|
const {
|
|
34
|
-
|
|
39
|
+
archiveTypeLabel,
|
|
35
40
|
archiveNameLabel
|
|
36
|
-
} = (0,
|
|
37
|
-
const {
|
|
38
|
-
getSettings
|
|
39
|
-
} = select(_blockEditor.store);
|
|
40
|
-
const {
|
|
41
|
-
__experimentalArchiveTitleNameLabel,
|
|
42
|
-
__experimentalArchiveTitleTypeLabel
|
|
43
|
-
} = getSettings();
|
|
44
|
-
return {
|
|
45
|
-
archiveTypeTitle: __experimentalArchiveTitleTypeLabel,
|
|
46
|
-
archiveNameLabel: __experimentalArchiveTitleNameLabel
|
|
47
|
-
};
|
|
48
|
-
});
|
|
41
|
+
} = (0, _useArchiveLabel.useArchiveLabel)();
|
|
49
42
|
const TagName = `h${level}`;
|
|
50
43
|
const blockProps = (0, _blockEditor.useBlockProps)({
|
|
51
44
|
className: (0, _clsx.default)('wp-block-query-title__placeholder', {
|
|
@@ -63,20 +56,20 @@ function QueryTitleEdit({
|
|
|
63
56
|
let titleElement;
|
|
64
57
|
if (type === 'archive') {
|
|
65
58
|
let title;
|
|
66
|
-
if (
|
|
59
|
+
if (archiveTypeLabel) {
|
|
67
60
|
if (showPrefix) {
|
|
68
61
|
if (archiveNameLabel) {
|
|
69
62
|
title = (0, _i18n.sprintf)( /* translators: 1: Archive type title e.g: "Category", 2: Label of the archive e.g: "Shoes" */
|
|
70
|
-
(0, _i18n.__)('%1$s: %2$s'),
|
|
63
|
+
(0, _i18n.__)('%1$s: %2$s'), archiveTypeLabel, archiveNameLabel);
|
|
71
64
|
} else {
|
|
72
65
|
title = (0, _i18n.sprintf)( /* translators: %s: Archive type title e.g: "Category", "Tag"... */
|
|
73
|
-
(0, _i18n.__)('%s: Name'),
|
|
66
|
+
(0, _i18n.__)('%s: Name'), archiveTypeLabel);
|
|
74
67
|
}
|
|
75
68
|
} else if (archiveNameLabel) {
|
|
76
69
|
title = archiveNameLabel;
|
|
77
70
|
} else {
|
|
78
71
|
title = (0, _i18n.sprintf)( /* translators: %s: Archive type title e.g: "Category", "Tag"... */
|
|
79
|
-
(0, _i18n.__)('%s name'),
|
|
72
|
+
(0, _i18n.__)('%s name'), archiveTypeLabel);
|
|
80
73
|
}
|
|
81
74
|
} else {
|
|
82
75
|
title = showPrefix ? (0, _i18n.__)('Archive type: Name') : (0, _i18n.__)('Archive title');
|
|
@@ -125,6 +118,7 @@ function QueryTitleEdit({
|
|
|
125
118
|
group: "block",
|
|
126
119
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.HeadingLevelDropdown, {
|
|
127
120
|
value: level,
|
|
121
|
+
options: levelOptions,
|
|
128
122
|
onChange: newLevel => setAttributes({
|
|
129
123
|
level: newLevel
|
|
130
124
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_i18n","
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_i18n","_useArchiveLabel","_jsxRuntime","SUPPORTED_TYPES","QueryTitleEdit","attributes","type","level","levelOptions","textAlign","showPrefix","showSearchTerm","setAttributes","archiveTypeLabel","archiveNameLabel","useArchiveLabel","TagName","blockProps","useBlockProps","className","clsx","includes","jsx","children","Warning","__","titleElement","title","sprintf","jsxs","Fragment","InspectorControls","PanelBody","ToggleControl","__nextHasNoMarginBottom","label","onChange","checked","BlockControls","group","HeadingLevelDropdown","value","options","newLevel","AlignmentControl","nextAlign"],"sources":["@wordpress/block-library/src/query-title/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n\tWarning,\n\tHeadingLevelDropdown,\n} from '@wordpress/block-editor';\nimport { ToggleControl, PanelBody } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useArchiveLabel } from './use-archive-label';\n\nconst SUPPORTED_TYPES = [ 'archive', 'search' ];\n\nexport default function QueryTitleEdit( {\n\tattributes: {\n\t\ttype,\n\t\tlevel,\n\t\tlevelOptions,\n\t\ttextAlign,\n\t\tshowPrefix,\n\t\tshowSearchTerm,\n\t},\n\tsetAttributes,\n} ) {\n\tconst { archiveTypeLabel, archiveNameLabel } = useArchiveLabel();\n\n\tconst TagName = `h${ level }`;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( 'wp-block-query-title__placeholder', {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tif ( ! SUPPORTED_TYPES.includes( type ) ) {\n\t\treturn (\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<Warning>{ __( 'Provided type is not supported.' ) }</Warning>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tlet titleElement;\n\tif ( type === 'archive' ) {\n\t\tlet title;\n\t\tif ( archiveTypeLabel ) {\n\t\t\tif ( showPrefix ) {\n\t\t\t\tif ( archiveNameLabel ) {\n\t\t\t\t\ttitle = sprintf(\n\t\t\t\t\t\t/* translators: 1: Archive type title e.g: \"Category\", 2: Label of the archive e.g: \"Shoes\" */\n\t\t\t\t\t\t__( '%1$s: %2$s' ),\n\t\t\t\t\t\tarchiveTypeLabel,\n\t\t\t\t\t\tarchiveNameLabel\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\ttitle = sprintf(\n\t\t\t\t\t\t/* translators: %s: Archive type title e.g: \"Category\", \"Tag\"... */\n\t\t\t\t\t\t__( '%s: Name' ),\n\t\t\t\t\t\tarchiveTypeLabel\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else if ( archiveNameLabel ) {\n\t\t\t\ttitle = archiveNameLabel;\n\t\t\t} else {\n\t\t\t\ttitle = sprintf(\n\t\t\t\t\t/* translators: %s: Archive type title e.g: \"Category\", \"Tag\"... */\n\t\t\t\t\t__( '%s name' ),\n\t\t\t\t\tarchiveTypeLabel\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\ttitle = showPrefix\n\t\t\t\t? __( 'Archive type: Name' )\n\t\t\t\t: __( 'Archive title' );\n\t\t}\n\n\t\ttitleElement = (\n\t\t\t<>\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Show archive type in title' ) }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { showPrefix: ! showPrefix } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tchecked={ showPrefix }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t\t<TagName { ...blockProps }>{ title }</TagName>\n\t\t\t</>\n\t\t);\n\t}\n\n\tif ( type === 'search' ) {\n\t\ttitleElement = (\n\t\t\t<>\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Show search term in title' ) }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tshowSearchTerm: ! showSearchTerm,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tchecked={ showSearchTerm }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\n\t\t\t\t<TagName { ...blockProps }>\n\t\t\t\t\t{ showSearchTerm\n\t\t\t\t\t\t? __( 'Search results for: “search term”' )\n\t\t\t\t\t\t: __( 'Search results' ) }\n\t\t\t\t</TagName>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<HeadingLevelDropdown\n\t\t\t\t\tvalue={ level }\n\t\t\t\t\toptions={ levelOptions }\n\t\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t{ titleElement }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,gBAAA,GAAAJ,OAAA;AAAsD,IAAAK,WAAA,GAAAL,OAAA;AAtBtD;AACA;AACA;;AAGA;AACA;AACA;;AAYA;AACA;AACA;;AAGA,MAAMM,eAAe,GAAG,CAAE,SAAS,EAAE,QAAQ,CAAE;AAEhC,SAASC,cAAcA,CAAE;EACvCC,UAAU,EAAE;IACXC,IAAI;IACJC,KAAK;IACLC,YAAY;IACZC,SAAS;IACTC,UAAU;IACVC;EACD,CAAC;EACDC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,gBAAgB;IAAEC;EAAiB,CAAC,GAAG,IAAAC,gCAAe,EAAC,CAAC;EAEhE,MAAMC,OAAO,GAAI,IAAIT,KAAO,EAAC;EAC7B,MAAMU,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE,mCAAmC,EAAE;MACrD,CAAG,kBAAkBX,SAAW,EAAC,GAAIA;IACtC,CAAE;EACH,CAAE,CAAC;EAEH,IAAK,CAAEN,eAAe,CAACkB,QAAQ,CAAEf,IAAK,CAAC,EAAG;IACzC,oBACC,IAAAJ,WAAA,CAAAoB,GAAA;MAAA,GAAUL,UAAU;MAA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B,WAAA,CAAA2B,IAAA,EAAC/B,YAAA,CAAAwC,aAAa;MAACC,KAAK,EAAC,OAAO;MAAAhB,QAAA,gBAC3B,IAAArB,WAAA,CAAAoB,GAAA,EAACxB,YAAA,CAAA0C,oBAAoB;QACpBC,KAAK,EAAGlC,KAAO;QACfmC,OAAO,EAAGlC,YAAc;QACxB4B,QAAQ,EAAKO,QAAQ,IACpB/B,aAAa,CAAE;UAAEL,KAAK,EAAEoC;QAAS,CAAE;MACnC,CACD,CAAC,eACF,IAAAzC,WAAA,CAAAoB,GAAA,EAACxB,YAAA,CAAA8C,gBAAgB;QAChBH,KAAK,EAAGhC,SAAW;QACnB2B,QAAQ,EAAKS,SAAS,IAAM;UAC3BjC,aAAa,CAAE;YAAEH,SAAS,EAAEoC;UAAU,CAAE,CAAC;QAC1C;MAAG,CACH,CAAC;IAAA,CACY,CAAC,EACdnB,YAAY;EAAA,CACb,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_variations","_deprecated","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","type","textAlign","level","showPrefix","showSearchTerm","supports","align","html","color","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontStyle","__experimentalFontWeight","__experimentalLetterSpacing","__experimentalTextTransform","__experimentalTextDecoration","interactivity","clientNavigation","style","settings","icon","edit","variations","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/query-title/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { title as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport variations from './variations';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tvariations,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AAZA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAM,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,IAAA;MAAAA,IAAA;IAAA;IAAAC,SAAA;MAAAD,IAAA;IAAA;IAAAE,KAAA;MAAAF,IAAA;MAAA;IAAA;IAAAG,
|
|
1
|
+
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_variations","_deprecated","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","type","textAlign","level","levelOptions","showPrefix","showSearchTerm","supports","align","html","color","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontStyle","__experimentalFontWeight","__experimentalLetterSpacing","__experimentalTextTransform","__experimentalTextDecoration","interactivity","clientNavigation","style","settings","icon","edit","variations","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/query-title/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { title as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport variations from './variations';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tvariations,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAA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A;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEzC,IAAI;EAAEJ,QAAQ;EAAEuC;AAAS,CAAE,CAAC;AAACtC,OAAA,CAAA2C,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useArchiveLabel = useArchiveLabel;
|
|
7
|
+
var _coreData = require("@wordpress/core-data");
|
|
8
|
+
var _data = require("@wordpress/data");
|
|
9
|
+
/**
|
|
10
|
+
* WordPress dependencies
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
function useArchiveLabel() {
|
|
14
|
+
const templateSlug = (0, _data.useSelect)(select => {
|
|
15
|
+
// @wordpress/block-library should not depend on @wordpress/editor.
|
|
16
|
+
// Blocks can be loaded into a *non-post* block editor, so to avoid
|
|
17
|
+
// declaring @wordpress/editor as a dependency, we must access its
|
|
18
|
+
// store by string.
|
|
19
|
+
// The solution here is to split WP specific blocks from generic blocks.
|
|
20
|
+
// eslint-disable-next-line @wordpress/data-no-store-string-literals
|
|
21
|
+
const {
|
|
22
|
+
getCurrentPostId,
|
|
23
|
+
getCurrentPostType,
|
|
24
|
+
getCurrentTemplateId
|
|
25
|
+
} = select('core/editor');
|
|
26
|
+
const currentPostType = getCurrentPostType();
|
|
27
|
+
const templateId = getCurrentTemplateId() || (currentPostType === 'wp_template' ? getCurrentPostId() : null);
|
|
28
|
+
return templateId ? select(_coreData.store).getEditedEntityRecord('postType', 'wp_template', templateId)?.slug : null;
|
|
29
|
+
}, []);
|
|
30
|
+
const taxonomyMatches = templateSlug?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);
|
|
31
|
+
let taxonomy;
|
|
32
|
+
let term;
|
|
33
|
+
let isAuthor = false;
|
|
34
|
+
let authorSlug;
|
|
35
|
+
if (taxonomyMatches) {
|
|
36
|
+
// If is for a all taxonomies of a type
|
|
37
|
+
if (taxonomyMatches[1]) {
|
|
38
|
+
taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
|
|
39
|
+
}
|
|
40
|
+
// If is for a all taxonomies of a type
|
|
41
|
+
else if (taxonomyMatches[3]) {
|
|
42
|
+
taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
|
|
43
|
+
term = taxonomyMatches[7];
|
|
44
|
+
}
|
|
45
|
+
taxonomy = taxonomy === 'tag' ? 'post_tag' : taxonomy;
|
|
46
|
+
|
|
47
|
+
//getTaxonomy( 'category' );
|
|
48
|
+
//wp.data.select('core').getEntityRecords( 'taxonomy', 'category', {slug: 'newcat'} );
|
|
49
|
+
} else {
|
|
50
|
+
const authorMatches = templateSlug?.match(/^(author)$|^author-(.+)$/);
|
|
51
|
+
if (authorMatches) {
|
|
52
|
+
isAuthor = true;
|
|
53
|
+
if (authorMatches[2]) {
|
|
54
|
+
authorSlug = authorMatches[2];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return (0, _data.useSelect)(select => {
|
|
59
|
+
const {
|
|
60
|
+
getEntityRecords,
|
|
61
|
+
getTaxonomy,
|
|
62
|
+
getAuthors
|
|
63
|
+
} = select(_coreData.store);
|
|
64
|
+
let archiveTypeLabel;
|
|
65
|
+
let archiveNameLabel;
|
|
66
|
+
if (taxonomy) {
|
|
67
|
+
archiveTypeLabel = getTaxonomy(taxonomy)?.labels?.singular_name;
|
|
68
|
+
}
|
|
69
|
+
if (term) {
|
|
70
|
+
const records = getEntityRecords('taxonomy', taxonomy, {
|
|
71
|
+
slug: term,
|
|
72
|
+
per_page: 1
|
|
73
|
+
});
|
|
74
|
+
if (records && records[0]) {
|
|
75
|
+
archiveNameLabel = records[0].name;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (isAuthor) {
|
|
79
|
+
archiveTypeLabel = 'Author';
|
|
80
|
+
if (authorSlug) {
|
|
81
|
+
const authorRecords = getAuthors({
|
|
82
|
+
slug: authorSlug
|
|
83
|
+
});
|
|
84
|
+
if (authorRecords && authorRecords[0]) {
|
|
85
|
+
archiveNameLabel = authorRecords[0].name;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
archiveTypeLabel,
|
|
91
|
+
archiveNameLabel
|
|
92
|
+
};
|
|
93
|
+
}, [authorSlug, isAuthor, taxonomy, term]);
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=use-archive-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_coreData","require","_data","useArchiveLabel","templateSlug","useSelect","select","getCurrentPostId","getCurrentPostType","getCurrentTemplateId","currentPostType","templateId","coreStore","getEditedEntityRecord","slug","taxonomyMatches","match","taxonomy","term","isAuthor","authorSlug","authorMatches","getEntityRecords","getTaxonomy","getAuthors","archiveTypeLabel","archiveNameLabel","labels","singular_name","records","per_page","name","authorRecords"],"sources":["@wordpress/block-library/src/query-title/use-archive-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nexport function useArchiveLabel() {\n\tconst templateSlug = useSelect( ( select ) => {\n\t\t// @wordpress/block-library should not depend on @wordpress/editor.\n\t\t// Blocks can be loaded into a *non-post* block editor, so to avoid\n\t\t// declaring @wordpress/editor as a dependency, we must access its\n\t\t// store by string.\n\t\t// The solution here is to split WP specific blocks from generic blocks.\n\t\t// eslint-disable-next-line @wordpress/data-no-store-string-literals\n\t\tconst { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } =\n\t\t\tselect( 'core/editor' );\n\t\tconst currentPostType = getCurrentPostType();\n\t\tconst templateId =\n\t\t\tgetCurrentTemplateId() ||\n\t\t\t( currentPostType === 'wp_template' ? getCurrentPostId() : null );\n\n\t\treturn templateId\n\t\t\t? select( coreStore ).getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\ttemplateId\n\t\t\t )?.slug\n\t\t\t: null;\n\t}, [] );\n\tconst taxonomyMatches = templateSlug?.match(\n\t\t/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/\n\t);\n\tlet taxonomy;\n\tlet term;\n\tlet isAuthor = false;\n\tlet authorSlug;\n\tif ( taxonomyMatches ) {\n\t\t// If is for a all taxonomies of a type\n\t\tif ( taxonomyMatches[ 1 ] ) {\n\t\t\ttaxonomy = taxonomyMatches[ 2 ]\n\t\t\t\t? taxonomyMatches[ 2 ]\n\t\t\t\t: taxonomyMatches[ 1 ];\n\t\t}\n\t\t// If is for a all taxonomies of a type\n\t\telse if ( taxonomyMatches[ 3 ] ) {\n\t\t\ttaxonomy = taxonomyMatches[ 6 ]\n\t\t\t\t? taxonomyMatches[ 6 ]\n\t\t\t\t: taxonomyMatches[ 4 ];\n\t\t\tterm = taxonomyMatches[ 7 ];\n\t\t}\n\t\ttaxonomy = taxonomy === 'tag' ? 'post_tag' : taxonomy;\n\n\t\t//getTaxonomy( 'category' );\n\t\t//wp.data.select('core').getEntityRecords( 'taxonomy', 'category', {slug: 'newcat'} );\n\t} else {\n\t\tconst authorMatches = templateSlug?.match( /^(author)$|^author-(.+)$/ );\n\t\tif ( authorMatches ) {\n\t\t\tisAuthor = true;\n\t\t\tif ( authorMatches[ 2 ] ) {\n\t\t\t\tauthorSlug = authorMatches[ 2 ];\n\t\t\t}\n\t\t}\n\t}\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords, getTaxonomy, getAuthors } =\n\t\t\t\tselect( coreStore );\n\t\t\tlet archiveTypeLabel;\n\t\t\tlet archiveNameLabel;\n\t\t\tif ( taxonomy ) {\n\t\t\t\tarchiveTypeLabel =\n\t\t\t\t\tgetTaxonomy( taxonomy )?.labels?.singular_name;\n\t\t\t}\n\t\t\tif ( term ) {\n\t\t\t\tconst records = getEntityRecords( 'taxonomy', taxonomy, {\n\t\t\t\t\tslug: term,\n\t\t\t\t\tper_page: 1,\n\t\t\t\t} );\n\t\t\t\tif ( records && records[ 0 ] ) {\n\t\t\t\t\tarchiveNameLabel = records[ 0 ].name;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isAuthor ) {\n\t\t\t\tarchiveTypeLabel = 'Author';\n\t\t\t\tif ( authorSlug ) {\n\t\t\t\t\tconst authorRecords = getAuthors( { slug: authorSlug } );\n\t\t\t\t\tif ( authorRecords && authorRecords[ 0 ] ) {\n\t\t\t\t\t\tarchiveNameLabel = authorRecords[ 0 ].name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tarchiveTypeLabel,\n\t\t\t\tarchiveNameLabel,\n\t\t\t};\n\t\t},\n\t\t[ authorSlug, isAuthor, taxonomy, term ]\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIO,SAASE,eAAeA,CAAA,EAAG;EACjC,MAAMC,YAAY,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC7C;IACA;IACA;IACA;IACA;IACA;IACA,MAAM;MAAEC,gBAAgB;MAAEC,kBAAkB;MAAEC;IAAqB,CAAC,GACnEH,MAAM,CAAE,aAAc,CAAC;IACxB,MAAMI,eAAe,GAAGF,kBAAkB,CAAC,CAAC;IAC5C,MAAMG,UAAU,GACfF,oBAAoB,CAAC,CAAC,KACpBC,eAAe,KAAK,aAAa,GAAGH,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAE;IAElE,OAAOI,UAAU,GACdL,MAAM,CAAEM,eAAU,CAAC,CAACC,qBAAqB,CACzC,UAAU,EACV,aAAa,EACbF,UACA,CAAC,EAAEG,IAAI,GACP,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O,GAAGP,gBAAgB,CAAE,UAAU,EAAEL,QAAQ,EAAE;QACvDH,IAAI,EAAEI,IAAI;QACVY,QAAQ,EAAE;MACX,CAAE,CAAC;MACH,IAAKD,OAAO,IAAIA,OAAO,CAAE,CAAC,CAAE,EAAG;QAC9BH,gBAAgB,GAAGG,OAAO,CAAE,CAAC,CAAE,CAACE,IAAI;MACrC;IACD;IACA,IAAKZ,QAAQ,EAAG;MACfM,gBAAgB,GAAG,QAAQ;MAC3B,IAAKL,UAAU,EAAG;QACjB,MAAMY,aAAa,GAAGR,UAAU,CAAE;UAAEV,IAAI,EAAEM;QAAW,CAAE,CAAC;QACxD,IAAKY,aAAa,IAAIA,aAAa,CAAE,CAAC,CAAE,EAAG;UAC1CN,gBAAgB,GAAGM,aAAa,CAAE,CAAC,CAAE,CAACD,IAAI;QAC3C;MACD;IACD;IACA,OAAO;MACNN,gBAAgB;MAChBC;IACD,CAAC;EACF,CAAC,EACD,CAAEN,UAAU,EAAED,QAAQ,EAAEF,QAAQ,EAAEC,IAAI,CACvC,CAAC;AACF","ignoreList":[]}
|
package/build/quote/index.js
CHANGED
|
@@ -56,6 +56,18 @@ const metadata = exports.metadata = {
|
|
|
56
56
|
backgroundImage: true
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
+
__experimentalBorder: {
|
|
60
|
+
color: true,
|
|
61
|
+
radius: true,
|
|
62
|
+
style: true,
|
|
63
|
+
width: true,
|
|
64
|
+
__experimentalDefaultControls: {
|
|
65
|
+
color: true,
|
|
66
|
+
radius: true,
|
|
67
|
+
style: true,
|
|
68
|
+
width: true
|
|
69
|
+
}
|
|
70
|
+
},
|
|
59
71
|
dimensions: {
|
|
60
72
|
minHeight: true,
|
|
61
73
|
__experimentalDefaultControls: {
|
|
@@ -90,7 +102,9 @@ const metadata = exports.metadata = {
|
|
|
90
102
|
allowEditing: false
|
|
91
103
|
},
|
|
92
104
|
spacing: {
|
|
93
|
-
blockGap: true
|
|
105
|
+
blockGap: true,
|
|
106
|
+
padding: true,
|
|
107
|
+
margin: true
|
|
94
108
|
},
|
|
95
109
|
interactivity: {
|
|
96
110
|
clientNavigation: true
|
package/build/quote/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","metadata","exports","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","value","type","source","selector","multiline","__experimentalRole","citation","textAlign","supports","anchor","html","background","backgroundImage","backgroundSize","__experimentalDefaultControls","dimensions","minHeight","__experimentalOnEnter","__experimentalOnMerge","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","metadata","exports","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","value","type","source","selector","multiline","__experimentalRole","citation","textAlign","supports","anchor","html","background","backgroundImage","backgroundSize","__experimentalDefaultControls","__experimentalBorder","color","radius","style","width","dimensions","minHeight","__experimentalOnEnter","__experimentalOnMerge","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","gradients","heading","link","text","layout","allowEditing","spacing","blockGap","padding","margin","interactivity","clientNavigation","styles","label","isDefault","editorStyle","settings","icon","example","innerBlocks","content","__","transforms","edit","save","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/quote/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { quote as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcitation: 'Julio Cortázar',\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __( 'In quoting others, we cite ourselves.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AAEA,IAAAM,KAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,WAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAdA;AACA;AACA;AAIA;AACA;AACA;AAFA,MAAAQ,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,KAAA;MAAAC,IAAA;MAAAC,MAAA;MAAAC,QAAA;MAAAC,SAAA;MAAA;MAAAC,kBAAA;IAAA;IAAAC,QAAA;MAAAL,IAAA;MAAAC,MAAA;MAAAC,QAAA;MAAAE,kBAAA;IAAA;IAAAE,SAAA;MAAAN,IAAA;IAAA;EAAA;EAAAO,QAAA;IAAAC,MAAA;IAAAC,IAAA;IAAAC,UAAA;MAAAC,eAAA;MAAAC,cAAA;MAAAC,6BAAA;QAAAF,eAAA;MAAA;IAAA;IAAAG,oBAAA;MAAAC,KAAA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAL,6BAAA;QAAAE,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