@wordpress/block-library 9.9.0 → 9.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +10 -5
- package/build/archives/index.js +6 -0
- package/build/archives/index.js.map +1 -1
- package/build/audio/edit.native.js +1 -1
- package/build/audio/edit.native.js.map +1 -1
- package/build/avatar/hooks.js +2 -3
- package/build/avatar/hooks.js.map +1 -1
- package/build/block/edit.js.map +1 -1
- package/build/block/edit.native.js +2 -2
- package/build/block/edit.native.js.map +1 -1
- package/build/block-keyboard-shortcuts/index.js.map +1 -1
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.js.map +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/button/get-updated-link-attributes.js +1 -1
- package/build/button/get-updated-link-attributes.js.map +1 -1
- package/build/button/save.js.map +1 -1
- package/build/buttons/deprecated.js.map +1 -1
- package/build/categories/edit.js +1 -1
- package/build/categories/edit.js.map +1 -1
- package/build/column/deprecated.js.map +1 -1
- package/build/column/edit.js +1 -1
- package/build/column/edit.js.map +1 -1
- package/build/column/edit.native.js.map +1 -1
- package/build/column/save.js.map +1 -1
- package/build/columns/deprecated.js.map +1 -1
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +1 -1
- package/build/columns/edit.native.js.map +1 -1
- package/build/columns/save.js.map +1 -1
- package/build/columns/transforms.js.map +1 -1
- package/build/columns/utils.js.map +1 -1
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-content/edit.js.map +1 -1
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/comment-reply-link/edit.js.map +1 -1
- package/build/comment-template/hooks.js.map +1 -1
- package/build/comments/edit/comments-legacy.js.map +1 -1
- package/build/comments/index.js +12 -0
- package/build/comments/index.js.map +1 -1
- package/build/comments-pagination-next/edit.js.map +1 -1
- package/build/comments-pagination-numbers/edit.js.map +1 -1
- package/build/comments-pagination-previous/edit.js.map +1 -1
- package/build/comments-title/edit.js +2 -2
- package/build/comments-title/edit.js.map +1 -1
- package/build/cover/constants.js +8 -0
- package/build/cover/constants.js.map +1 -0
- package/build/cover/controls.native.js.map +1 -1
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/index.js +24 -3
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +113 -31
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/index.js +3 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/save.js +3 -1
- package/build/cover/save.js.map +1 -1
- package/build/cover/shared.js.map +1 -1
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.js +16 -3
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-preview.js +5 -19
- package/build/embed/embed-preview.js.map +1 -1
- package/build/embed/embed-preview.native.js +1 -1
- package/build/embed/embed-preview.native.js.map +1 -1
- package/build/embed/save.js.map +1 -1
- package/build/embed/transforms.js.map +1 -1
- package/build/embed/variations.js +1 -1
- package/build/embed/variations.js.map +1 -1
- package/build/embed/wp-embed-preview.native.js.map +1 -1
- package/build/file/deprecated.js +3 -3
- package/build/file/deprecated.js.map +1 -1
- package/build/file/edit.js +1 -2
- package/build/file/edit.js.map +1 -1
- package/build/file/save.js.map +1 -1
- package/build/footnotes/edit.js.map +1 -1
- package/build/footnotes/format.js.map +1 -1
- package/build/form/edit.js.map +1 -1
- package/build/form-submission-notification/edit.js.map +1 -1
- package/build/form-submission-notification/save.js.map +1 -1
- package/build/freeform/edit.js.map +1 -1
- package/build/freeform/modal.js.map +1 -1
- package/build/gallery/constants.js +2 -1
- package/build/gallery/constants.js.map +1 -1
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +13 -4
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/gallery.native.js +1 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/utils.js +26 -5
- package/build/gallery/utils.js.map +1 -1
- package/build/group/placeholder.js.map +1 -1
- package/build/heading/deprecated.js.map +1 -1
- package/build/heading/edit.js.map +1 -1
- package/build/heading/edit.native.js.map +1 -1
- package/build/heading/index.js +2 -2
- package/build/heading/index.js.map +1 -1
- package/build/heading/save.js.map +1 -1
- package/build/heading/transforms.js.map +1 -1
- package/build/home-link/edit.js.map +1 -1
- package/build/html/edit.js +5 -1
- package/build/html/edit.js.map +1 -1
- package/build/html/preview.js +2 -2
- package/build/html/preview.js.map +1 -1
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +1 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +1 -1
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +3 -3
- package/build/image/image.js.map +1 -1
- package/build/image/save.js.map +1 -1
- package/build/image/view.js.map +1 -1
- package/build/index.native.js.map +1 -1
- package/build/latest-posts/edit.js +4 -9
- package/build/latest-posts/edit.js.map +1 -1
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/edit.native.js.map +1 -1
- package/build/media-text/image-fill.js.map +1 -1
- package/build/media-text/save.js.map +1 -1
- package/build/missing/edit.js +2 -2
- package/build/missing/edit.js.map +1 -1
- package/build/more/edit.js.map +1 -1
- package/build/more/save.js.map +1 -1
- package/build/navigation/edit/accessible-menu-description.js.map +1 -1
- package/build/navigation/edit/index.js +23 -2
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/leaf-more-menu.js +1 -1
- package/build/navigation/edit/leaf-more-menu.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +2 -2
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +2 -2
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
- package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
- package/build/navigation/edit/utils.js.map +1 -1
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/nextpage/edit.native.js +1 -1
- package/build/nextpage/edit.native.js.map +1 -1
- package/build/page-list-item/edit.js +1 -1
- package/build/page-list-item/edit.js.map +1 -1
- package/build/paragraph/deprecated.js.map +1 -1
- package/build/paragraph/edit.js +1 -1
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/save.js.map +1 -1
- package/build/pattern/recursion-detector.js +1 -0
- package/build/pattern/recursion-detector.js.map +1 -1
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author-biography/edit.js.map +1 -1
- package/build/post-author-name/edit.js.map +1 -1
- package/build/post-comments-count/edit.js.map +1 -1
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +1 -1
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-comments-link/edit.js +1 -1
- package/build/post-comments-link/edit.js.map +1 -1
- package/build/post-content/edit.js +29 -2
- package/build/post-content/edit.js.map +1 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +1 -1
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-time-to-read/edit.js +2 -2
- package/build/post-time-to-read/edit.js.map +1 -1
- package/build/post-title/edit.js.map +1 -1
- package/build/pullquote/deprecated.js.map +1 -1
- package/build/pullquote/edit.js.map +1 -1
- package/build/pullquote/save.js.map +1 -1
- package/build/pullquote/shared.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +1 -0
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +8 -11
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/order-control.js +2 -2
- package/build/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +1 -0
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +1 -0
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/pattern-selection-modal.js +1 -1
- package/build/query/edit/pattern-selection-modal.js.map +1 -1
- package/build/query/utils.js.map +1 -1
- package/build/query/view.js.map +1 -1
- package/build/query-pagination-next/edit.js.map +1 -1
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-pagination-previous/edit.js.map +1 -1
- package/build/query-title/edit.js +4 -4
- package/build/query-title/edit.js.map +1 -1
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/edit.js.map +1 -1
- package/build/quote/save.js.map +1 -1
- package/build/quote/transforms.js.map +1 -1
- package/build/search/edit.js +19 -14
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js.map +1 -1
- package/build/separator/transforms.js +12 -0
- package/build/separator/transforms.js.map +1 -1
- package/build/shortcode/edit.js.map +1 -1
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-title/edit.js.map +1 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/edit.native.js.map +1 -1
- package/build/social-links/deprecated.js.map +1 -1
- package/build/social-links/edit.js +0 -1
- package/build/social-links/edit.js.map +1 -1
- package/build/spacer/controls.native.js.map +1 -1
- package/build/spacer/deprecated.js.map +1 -1
- package/build/spacer/edit.js.map +1 -1
- package/build/spacer/index.js +2 -0
- package/build/spacer/index.js.map +1 -1
- package/build/spacer/transforms.js +27 -0
- package/build/spacer/transforms.js.map +1 -0
- package/build/table/deprecated.js.map +1 -1
- package/build/table/edit.js +0 -1
- package/build/table/edit.js.map +1 -1
- package/build/table/save.js.map +1 -1
- package/build/table-of-contents/edit.js +3 -8
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/table-of-contents/hooks.js.map +1 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +1 -1
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/import-controls.js +2 -1
- package/build/template-part/edit/import-controls.js.map +1 -1
- package/build/template-part/edit/index.js +2 -2
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +2 -2
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build/template-part/variations.js.map +1 -1
- package/build/term-description/edit.js.map +1 -1
- package/build/text-columns/edit.js.map +1 -1
- package/build/text-columns/save.js.map +1 -1
- package/build/verse/deprecated.js.map +1 -1
- package/build/verse/edit.js.map +1 -1
- package/build/verse/save.js.map +1 -1
- package/build/video/edit.js +1 -1
- package/build/video/edit.js.map +1 -1
- package/build/video/edit.native.js +1 -1
- package/build/video/edit.native.js.map +1 -1
- package/build/video/tracks-editor.js +2 -2
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/archives/edit.js +1 -3
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/archives/index.js +6 -0
- package/build-module/archives/index.js.map +1 -1
- package/build-module/audio/deprecated.js +1 -2
- package/build-module/audio/deprecated.js.map +1 -1
- package/build-module/audio/edit.js +1 -3
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/edit.native.js +2 -4
- package/build-module/audio/edit.native.js.map +1 -1
- package/build-module/audio/save.js +1 -2
- package/build-module/audio/save.js.map +1 -1
- package/build-module/avatar/edit.js +1 -3
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/avatar/hooks.js +2 -3
- package/build-module/avatar/hooks.js.map +1 -1
- package/build-module/block/edit-title.native.js +1 -2
- package/build-module/block/edit-title.native.js.map +1 -1
- package/build-module/block/edit.js +1 -3
- package/build-module/block/edit.js.map +1 -1
- package/build-module/block/edit.native.js +3 -4
- package/build-module/block/edit.native.js.map +1 -1
- package/build-module/block-keyboard-shortcuts/index.js.map +1 -1
- package/build-module/button/color-background.native.js +1 -2
- package/build-module/button/color-background.native.js.map +1 -1
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/edit.js +1 -3
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/edit.native.js +1 -3
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/get-updated-link-attributes.js +1 -1
- package/build-module/button/get-updated-link-attributes.js.map +1 -1
- package/build-module/button/save.js.map +1 -1
- package/build-module/buttons/deprecated.js.map +1 -1
- package/build-module/buttons/edit.native.js +1 -3
- package/build-module/buttons/edit.native.js.map +1 -1
- package/build-module/categories/edit.js +2 -4
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/column/deprecated.js.map +1 -1
- package/build-module/column/edit.js +2 -4
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/edit.native.js +1 -3
- package/build-module/column/edit.native.js.map +1 -1
- package/build-module/column/save.js.map +1 -1
- package/build-module/columns/deprecated.js.map +1 -1
- package/build-module/columns/edit.js +1 -3
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +2 -4
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/columns/save.js.map +1 -1
- package/build-module/columns/transforms.js.map +1 -1
- package/build-module/columns/utils.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +1 -3
- package/build-module/comment-author-avatar/edit.js.map +1 -1
- package/build-module/comment-author-name/edit.js +1 -3
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-content/edit.js +1 -3
- package/build-module/comment-content/edit.js.map +1 -1
- package/build-module/comment-date/edit.js +1 -3
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comment-edit-link/edit.js +1 -3
- package/build-module/comment-edit-link/edit.js.map +1 -1
- package/build-module/comment-reply-link/edit.js +1 -3
- package/build-module/comment-reply-link/edit.js.map +1 -1
- package/build-module/comment-template/edit.js +1 -2
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/hooks.js.map +1 -1
- package/build-module/comments/edit/comments-legacy.js +1 -3
- package/build-module/comments/edit/comments-legacy.js.map +1 -1
- package/build-module/comments/edit/index.js +1 -3
- package/build-module/comments/edit/index.js.map +1 -1
- package/build-module/comments/edit/placeholder.js +1 -2
- package/build-module/comments/edit/placeholder.js.map +1 -1
- package/build-module/comments/index.js +12 -0
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +1 -2
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build-module/comments-pagination/edit.js +1 -3
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-pagination-next/edit.js +1 -2
- package/build-module/comments-pagination-next/edit.js.map +1 -1
- package/build-module/comments-pagination-numbers/edit.js +1 -2
- package/build-module/comments-pagination-numbers/edit.js.map +1 -1
- package/build-module/comments-pagination-previous/edit.js +1 -2
- package/build-module/comments-pagination-previous/edit.js.map +1 -1
- package/build-module/comments-title/edit.js +3 -5
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/cover/constants.js +2 -0
- package/build-module/cover/constants.js.map +1 -0
- package/build-module/cover/controls.native.js +1 -3
- package/build-module/cover/controls.native.js.map +1 -1
- package/build-module/cover/deprecated.js +1 -2
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/block-controls.js +1 -3
- package/build-module/cover/edit/block-controls.js.map +1 -1
- package/build-module/cover/edit/index.js +25 -6
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +116 -36
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/edit.native.js +1 -3
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/index.js +3 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/save.js +4 -3
- package/build-module/cover/save.js.map +1 -1
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/details/edit.js +1 -3
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/save.js +1 -2
- package/build-module/details/save.js.map +1 -1
- package/build-module/embed/deprecated.js +1 -2
- package/build-module/embed/deprecated.js.map +1 -1
- package/build-module/embed/edit.js +17 -6
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/edit.native.js +1 -3
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-controls.js +1 -3
- package/build-module/embed/embed-controls.js.map +1 -1
- package/build-module/embed/embed-controls.native.js +1 -3
- package/build-module/embed/embed-controls.native.js.map +1 -1
- package/build-module/embed/embed-no-preview.native.js +1 -3
- package/build-module/embed/embed-no-preview.native.js.map +1 -1
- package/build-module/embed/embed-placeholder.js +1 -2
- package/build-module/embed/embed-placeholder.js.map +1 -1
- package/build-module/embed/embed-placeholder.native.js +1 -3
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/embed/embed-preview.js +6 -21
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/embed/embed-preview.native.js +2 -4
- package/build-module/embed/embed-preview.native.js.map +1 -1
- package/build-module/embed/icons.js +1 -2
- package/build-module/embed/icons.js.map +1 -1
- package/build-module/embed/save.js +1 -2
- package/build-module/embed/save.js.map +1 -1
- package/build-module/embed/transforms.js.map +1 -1
- package/build-module/embed/variations.js +1 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/embed/wp-embed-preview.native.js.map +1 -1
- package/build-module/file/deprecated.js +4 -6
- package/build-module/file/deprecated.js.map +1 -1
- package/build-module/file/edit.js +2 -5
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/edit.native.js +1 -2
- package/build-module/file/edit.native.js.map +1 -1
- package/build-module/file/inspector.js +1 -3
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/file/save.js +1 -3
- package/build-module/file/save.js.map +1 -1
- package/build-module/footnotes/edit.js +1 -2
- package/build-module/footnotes/edit.js.map +1 -1
- package/build-module/footnotes/format.js.map +1 -1
- package/build-module/form/edit.js +1 -3
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/deprecated.js +1 -2
- package/build-module/form-input/deprecated.js.map +1 -1
- package/build-module/form-input/edit.js +1 -3
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/form-input/save.js +1 -2
- package/build-module/form-input/save.js.map +1 -1
- package/build-module/form-submission-notification/edit.js.map +1 -1
- package/build-module/form-submission-notification/save.js.map +1 -1
- package/build-module/freeform/edit.js +1 -3
- package/build-module/freeform/edit.js.map +1 -1
- package/build-module/freeform/modal.js +1 -3
- package/build-module/freeform/modal.js.map +1 -1
- package/build-module/gallery/constants.js +1 -0
- package/build-module/gallery/constants.js.map +1 -1
- package/build-module/gallery/deprecated.js +1 -2
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +17 -10
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +1 -2
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/gallery.native.js +2 -3
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/gap-styles.js.map +1 -1
- package/build-module/gallery/save.js +1 -2
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/utils.js +27 -6
- package/build-module/gallery/utils.js.map +1 -1
- package/build-module/group/edit.js +1 -3
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/edit.native.js +1 -2
- package/build-module/group/edit.native.js.map +1 -1
- package/build-module/group/placeholder.js.map +1 -1
- package/build-module/heading/deprecated.js.map +1 -1
- package/build-module/heading/edit.js +1 -3
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/edit.native.js +1 -3
- package/build-module/heading/edit.native.js.map +1 -1
- package/build-module/heading/index.js +2 -2
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/save.js.map +1 -1
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/home-link/edit.js +1 -2
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/html/edit.js +7 -5
- package/build-module/html/edit.js.map +1 -1
- package/build-module/html/preview.js +3 -5
- package/build-module/html/preview.js.map +1 -1
- package/build-module/image/deprecated.js +1 -3
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.js +2 -4
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +2 -4
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +4 -6
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/save.js +1 -3
- package/build-module/image/save.js.map +1 -1
- package/build-module/image/view.js.map +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/latest-comments/edit.js +1 -2
- package/build-module/latest-comments/edit.js.map +1 -1
- package/build-module/latest-posts/edit.js +5 -12
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/latest-posts/edit.native.js +1 -3
- package/build-module/latest-posts/edit.native.js.map +1 -1
- package/build-module/list/edit.js +1 -3
- package/build-module/list/edit.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +1 -2
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/list-item/edit.js +1 -3
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/edit.native.js +1 -2
- package/build-module/list-item/edit.native.js.map +1 -1
- package/build-module/list-item/list-style-type.native.js +1 -2
- package/build-module/list-item/list-style-type.native.js.map +1 -1
- package/build-module/list-item/save.js +1 -2
- package/build-module/list-item/save.js.map +1 -1
- package/build-module/loginout/edit.js +1 -3
- package/build-module/loginout/edit.js.map +1 -1
- package/build-module/media-text/deprecated.js +1 -2
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/edit.js +1 -3
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/edit.native.js +1 -3
- package/build-module/media-text/edit.native.js.map +1 -1
- package/build-module/media-text/icon-retry.native.js +1 -2
- package/build-module/media-text/icon-retry.native.js.map +1 -1
- package/build-module/media-text/image-fill.js.map +1 -1
- package/build-module/media-text/media-container.js +1 -2
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/media-container.native.js +1 -3
- package/build-module/media-text/media-container.native.js.map +1 -1
- package/build-module/media-text/save.js +1 -2
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/missing/edit.js +3 -4
- package/build-module/missing/edit.js.map +1 -1
- package/build-module/missing/edit.native.js +1 -2
- package/build-module/missing/edit.native.js.map +1 -1
- package/build-module/more/edit.js +1 -3
- package/build-module/more/edit.js.map +1 -1
- package/build-module/more/save.js.map +1 -1
- package/build-module/navigation/edit/accessible-menu-description.js.map +1 -1
- package/build-module/navigation/edit/index.js +24 -5
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/leaf-more-menu.js +2 -4
- package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +3 -6
- package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -3
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +3 -5
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-icon.js +1 -2
- package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +1 -3
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +1 -3
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/placeholder/placeholder-preview.js +1 -2
- package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +1 -3
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -1
- package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
- package/build-module/navigation/edit/utils.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/edit.js +1 -3
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/link-ui.js +1 -2
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +1 -3
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/nextpage/edit.native.js +1 -1
- package/build-module/nextpage/edit.native.js.map +1 -1
- package/build-module/page-list/convert-to-links-modal.js +1 -2
- package/build-module/page-list/convert-to-links-modal.js.map +1 -1
- package/build-module/page-list/edit.js +1 -3
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list-item/edit.js +2 -4
- package/build-module/page-list-item/edit.js.map +1 -1
- package/build-module/paragraph/deprecated.js.map +1 -1
- package/build-module/paragraph/edit.js +2 -4
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/edit.native.js +1 -3
- package/build-module/paragraph/edit.native.js.map +1 -1
- package/build-module/paragraph/save.js.map +1 -1
- package/build-module/pattern/recursion-detector.js +1 -0
- package/build-module/pattern/recursion-detector.js.map +1 -1
- package/build-module/post-author/edit.js +1 -3
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-author-biography/edit.js +1 -3
- package/build-module/post-author-biography/edit.js.map +1 -1
- package/build-module/post-author-name/edit.js +1 -3
- package/build-module/post-author-name/edit.js.map +1 -1
- package/build-module/post-comment/edit.js +1 -2
- package/build-module/post-comment/edit.js.map +1 -1
- package/build-module/post-comments-count/edit.js +1 -3
- package/build-module/post-comments-count/edit.js.map +1 -1
- package/build-module/post-comments-form/edit.js +1 -3
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +2 -3
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-comments-link/edit.js +2 -4
- package/build-module/post-comments-link/edit.js.map +1 -1
- package/build-module/post-content/edit.js +32 -5
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-date/edit.js +1 -3
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -3
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +1 -3
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +2 -4
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/overlay-controls.js +1 -3
- package/build-module/post-featured-image/overlay-controls.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +1 -3
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-template/edit.js +1 -3
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +1 -3
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-time-to-read/edit.js +3 -5
- package/build-module/post-time-to-read/edit.js.map +1 -1
- package/build-module/post-title/edit.js +1 -3
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/pullquote/deprecated.js +1 -2
- package/build-module/pullquote/deprecated.js.map +1 -1
- package/build-module/pullquote/edit.js +1 -3
- package/build-module/pullquote/edit.js.map +1 -1
- package/build-module/pullquote/edit.native.js +1 -3
- package/build-module/pullquote/edit.native.js.map +1 -1
- package/build-module/pullquote/save.js +1 -2
- package/build-module/pullquote/save.js.map +1 -1
- package/build-module/pullquote/shared.js.map +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js +1 -2
- package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build-module/query/edit/index.js +1 -3
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +1 -0
- 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 -2
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +9 -14
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/order-control.js +2 -2
- package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +1 -0
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +1 -0
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/pattern-selection-modal.js +2 -3
- package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
- package/build-module/query/edit/query-content.js +1 -3
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +1 -2
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +1 -2
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query/view.js.map +1 -1
- package/build-module/query-pagination/edit.js +1 -3
- package/build-module/query-pagination/edit.js.map +1 -1
- package/build-module/query-pagination/query-pagination-arrow-controls.js +1 -2
- package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build-module/query-pagination-next/edit.js +1 -2
- package/build-module/query-pagination-next/edit.js.map +1 -1
- package/build-module/query-pagination-numbers/edit.js +1 -3
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-pagination-previous/edit.js +1 -2
- package/build-module/query-pagination-previous/edit.js.map +1 -1
- package/build-module/query-title/edit.js +6 -8
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/quote/deprecated.js +1 -2
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/edit.js +1 -3
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/quote/save.js +1 -2
- package/build-module/quote/save.js.map +1 -1
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/read-more/edit.js +1 -3
- package/build-module/read-more/edit.js.map +1 -1
- package/build-module/rss/edit.js +1 -3
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/search/edit.js +21 -18
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +1 -2
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/search/icons.js +1 -2
- package/build-module/search/icons.js.map +1 -1
- package/build-module/separator/edit.js +1 -2
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/separator/transforms.js +12 -0
- package/build-module/separator/transforms.js.map +1 -1
- package/build-module/shortcode/edit.js.map +1 -1
- package/build-module/shortcode/edit.native.js +1 -2
- package/build-module/shortcode/edit.native.js.map +1 -1
- package/build-module/site-logo/edit.js +1 -3
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-tagline/edit.js +1 -3
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-title/edit.js +1 -3
- package/build-module/site-title/edit.js.map +1 -1
- package/build-module/social-link/edit.js +1 -3
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/edit.native.js +1 -3
- package/build-module/social-link/edit.native.js.map +1 -1
- package/build-module/social-links/deprecated.js.map +1 -1
- package/build-module/social-links/edit.js +1 -4
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/spacer/controls.js +1 -3
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/spacer/controls.native.js +1 -2
- package/build-module/spacer/controls.native.js.map +1 -1
- package/build-module/spacer/deprecated.js.map +1 -1
- package/build-module/spacer/edit.js +1 -3
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/spacer/index.js +2 -0
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/spacer/transforms.js +20 -0
- package/build-module/spacer/transforms.js.map +1 -0
- package/build-module/table/deprecated.js +1 -2
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/edit.js +1 -4
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/save.js +1 -2
- package/build-module/table/save.js.map +1 -1
- package/build-module/table-of-contents/edit.js +4 -11
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/table-of-contents/hooks.js.map +1 -1
- package/build-module/table-of-contents/list.js +1 -3
- package/build-module/table-of-contents/list.js.map +1 -1
- package/build-module/tag-cloud/edit.js +1 -3
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +2 -4
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/import-controls.js +3 -3
- package/build-module/template-part/edit/import-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +3 -5
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/placeholder.js +1 -2
- package/build-module/template-part/edit/placeholder.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +3 -4
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/title-modal.js +1 -2
- package/build-module/template-part/edit/title-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/template-part/variations.js.map +1 -1
- package/build-module/term-description/edit.js +1 -3
- package/build-module/term-description/edit.js.map +1 -1
- package/build-module/text-columns/edit.js +1 -3
- package/build-module/text-columns/edit.js.map +1 -1
- package/build-module/text-columns/save.js.map +1 -1
- package/build-module/utils/caption.js +1 -3
- package/build-module/utils/caption.js.map +1 -1
- package/build-module/verse/deprecated.js.map +1 -1
- package/build-module/verse/edit.js +1 -3
- package/build-module/verse/edit.js.map +1 -1
- package/build-module/verse/save.js.map +1 -1
- package/build-module/video/deprecated.js +1 -2
- package/build-module/video/deprecated.js.map +1 -1
- package/build-module/video/edit-common-settings.js +1 -3
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.js +2 -4
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/edit.native.js +2 -3
- package/build-module/video/edit.native.js.map +1 -1
- package/build-module/video/icon-retry.native.js +1 -2
- package/build-module/video/icon-retry.native.js.map +1 -1
- package/build-module/video/save.js +1 -2
- package/build-module/video/save.js.map +1 -1
- package/build-module/video/tracks-editor.js +4 -6
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/archives/editor-rtl.css +5 -0
- package/build-style/archives/editor.css +5 -0
- package/build-style/button/style-rtl.css +3 -0
- package/build-style/button/style.css +3 -0
- package/build-style/code/style-rtl.css +2 -0
- package/build-style/code/style.css +4 -0
- package/build-style/comments/editor-rtl.css +4 -0
- package/build-style/comments/editor.css +4 -0
- package/build-style/comments/style-rtl.css +4 -0
- package/build-style/comments/style.css +4 -0
- package/build-style/common-rtl.css +0 -2
- package/build-style/common.css +0 -2
- package/build-style/cover/style-rtl.css +5 -0
- package/build-style/cover/style.css +5 -0
- package/build-style/editor-rtl.css +20 -0
- package/build-style/editor.css +20 -0
- package/build-style/group/editor-rtl.css +10 -0
- package/build-style/group/editor.css +10 -0
- package/build-style/image/style-rtl.css +2 -0
- package/build-style/image/style.css +2 -0
- package/build-style/navigation/editor-rtl.css +1 -0
- package/build-style/navigation/editor.css +1 -0
- package/build-style/post-content/style-rtl.css +2 -4
- package/build-style/post-content/style.css +2 -4
- package/build-style/style-rtl.css +18 -6
- package/build-style/style.css +20 -6
- package/package.json +37 -36
- package/src/archives/block.json +6 -0
- package/src/archives/editor.scss +8 -0
- package/src/avatar/hooks.js +2 -3
- package/src/avatar/index.php +4 -5
- package/src/button/get-updated-link-attributes.js +1 -1
- package/src/button/style.scss +3 -0
- package/src/button/test/get-updated-link-attributes.js +15 -0
- package/src/code/style.scss +5 -0
- package/src/comment-author-avatar/index.php +1 -1
- package/src/comments/block.json +21 -3
- package/src/comments/style.scss +4 -1
- package/src/common.scss +0 -3
- package/src/cover/block.json +3 -0
- package/src/cover/constants.js +1 -0
- package/src/cover/edit/index.js +20 -2
- package/src/cover/edit/inspector-controls.js +148 -44
- package/src/cover/index.php +38 -19
- package/src/cover/save.js +2 -0
- package/src/cover/style.scss +6 -0
- package/src/cover/test/edit.js +3 -5
- package/src/embed/edit.js +19 -2
- package/src/embed/embed-preview.js +2 -18
- package/src/file/edit.js +1 -2
- package/src/gallery/constants.js +1 -0
- package/src/gallery/edit.js +25 -2
- package/src/gallery/utils.js +23 -2
- package/src/group/editor.scss +12 -0
- package/src/html/edit.js +7 -1
- package/src/html/preview.js +3 -2
- package/src/image/index.php +1 -1
- package/src/image/style.scss +1 -0
- package/src/latest-posts/edit.js +3 -7
- package/src/latest-posts/index.php +1 -1
- package/src/navigation/edit/index.js +30 -3
- package/src/navigation/edit/menu-inspector-controls.js +2 -2
- package/src/navigation/edit/navigation-menu-selector.js +2 -2
- package/src/navigation/editor.scss +1 -0
- package/src/paragraph/edit.js +1 -1
- package/src/post-content/edit.js +30 -1
- package/src/post-content/style.scss +2 -4
- package/src/post-featured-image/edit.js +1 -1
- package/src/post-terms/index.php +7 -6
- package/src/post-time-to-read/edit.js +2 -2
- package/src/post-time-to-read/index.php +1 -1
- package/src/query/edit/inspector-controls/index.js +10 -16
- package/src/query/edit/inspector-controls/order-control.js +2 -2
- package/src/query/edit/pattern-selection-modal.js +1 -1
- package/src/query-title/edit.js +2 -2
- package/src/rss/index.php +1 -1
- package/src/search/edit.js +28 -25
- package/src/separator/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/separator/test/transforms.native.js +1 -1
- package/src/separator/transforms.js +11 -0
- package/src/social-links/edit.js +0 -1
- package/src/spacer/index.js +2 -0
- package/src/spacer/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/spacer/test/transforms.native.js +1 -1
- package/src/spacer/transforms.js +20 -0
- package/src/table/edit.js +0 -1
- package/src/table-of-contents/edit.js +2 -6
- package/src/template-part/edit/index.js +1 -1
- package/src/template-part/edit/selection-modal.js +1 -1
- package/src/video/tracks-editor.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_data","_coreData","_element","_compose","_utils","_jsxRuntime","EMPTY_ARRAY","BASE_QUERY","order","_fields","context","ParentControl","parents","postType","onChange","search","setSearch","useState","value","setValue","suggestions","setSuggestions","debouncedSearch","useDebounce","searchResults","searchHasResolved","useSelect","select","getEntityRecords","hasFinishedResolution","coreStore","selectorArgs","orderby","exclude","per_page","currentParents","length","include","useEffect","currentParentsInfo","getEntitiesInfo","mapToIHasNameAndId","sanitizedValue","reduce","accumulator","id","entity","mapById","push","name","entitiesInfo","useMemo","names","getIdByValue","entitiesMappedByName","onParentChange","newValue","ids","Array","from","mapByName","add","Set","jsx","FormTokenField","__next40pxDefaultSize","label","__","onInputChange","__experimentalShowHowTo","__nextHasNoMarginBottom","_default","exports","default"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/parent-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { FormTokenField } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { getEntitiesInfo, mapToIHasNameAndId } from '../../utils';\n\nconst EMPTY_ARRAY = [];\nconst BASE_QUERY = {\n\torder: 'asc',\n\t_fields: 'id,title',\n\tcontext: 'view',\n};\n\nfunction ParentControl( { parents, postType, onChange } ) {\n\tconst [ search, setSearch ] = useState( '' );\n\tconst [ value, setValue ] = useState( EMPTY_ARRAY );\n\tconst [ suggestions, setSuggestions ] = useState( EMPTY_ARRAY );\n\tconst debouncedSearch = useDebounce( setSearch, 250 );\n\tconst { searchResults, searchHasResolved } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! search ) {\n\t\t\t\treturn { searchResults: EMPTY_ARRAY, searchHasResolved: true };\n\t\t\t}\n\t\t\tconst { getEntityRecords, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst selectorArgs = [\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\t{\n\t\t\t\t\t...BASE_QUERY,\n\t\t\t\t\tsearch,\n\t\t\t\t\torderby: 'relevance',\n\t\t\t\t\texclude: parents,\n\t\t\t\t\tper_page: 20,\n\t\t\t\t},\n\t\t\t];\n\t\t\treturn {\n\t\t\t\tsearchResults: getEntityRecords( ...selectorArgs ),\n\t\t\t\tsearchHasResolved: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecords',\n\t\t\t\t\tselectorArgs\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ search, parents ]\n\t);\n\tconst currentParents = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! parents?.length ) {\n\t\t\t\treturn EMPTY_ARRAY;\n\t\t\t}\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\treturn getEntityRecords( 'postType', postType, {\n\t\t\t\t...BASE_QUERY,\n\t\t\t\tinclude: parents,\n\t\t\t\tper_page: parents.length,\n\t\t\t} );\n\t\t},\n\t\t[ parents ]\n\t);\n\t// Update the `value` state only after the selectors are resolved\n\t// to avoid emptying the input when we're changing parents.\n\tuseEffect( () => {\n\t\tif ( ! parents?.length ) {\n\t\t\tsetValue( EMPTY_ARRAY );\n\t\t}\n\t\tif ( ! currentParents?.length ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentParentsInfo = getEntitiesInfo(\n\t\t\tmapToIHasNameAndId( currentParents, 'title.rendered' )\n\t\t);\n\t\t// Returns only the existing entity ids. This prevents the component\n\t\t// from crashing in the editor, when non existing ids are provided.\n\t\tconst sanitizedValue = parents.reduce( ( accumulator, id ) => {\n\t\t\tconst entity = currentParentsInfo.mapById[ id ];\n\t\t\tif ( entity ) {\n\t\t\t\taccumulator.push( {\n\t\t\t\t\tid,\n\t\t\t\t\tvalue: entity.name,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t}, [] );\n\t\tsetValue( sanitizedValue );\n\t}, [ parents, currentParents ] );\n\n\tconst entitiesInfo = useMemo( () => {\n\t\tif ( ! searchResults?.length ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\t\treturn getEntitiesInfo(\n\t\t\tmapToIHasNameAndId( searchResults, 'title.rendered' )\n\t\t);\n\t}, [ searchResults ] );\n\t// Update suggestions only when the query has resolved.\n\tuseEffect( () => {\n\t\tif ( ! searchHasResolved ) {\n\t\t\treturn;\n\t\t}\n\t\tsetSuggestions( entitiesInfo.names );\n\t}, [ entitiesInfo.names, searchHasResolved ] );\n\n\tconst getIdByValue = ( entitiesMappedByName, entity ) => {\n\t\tconst id = entity?.id || entitiesMappedByName?.[ entity ]?.id;\n\t\tif ( id ) {\n\t\t\treturn id;\n\t\t}\n\t};\n\tconst onParentChange = ( newValue ) => {\n\t\tconst ids = Array.from(\n\t\t\tnewValue.reduce( ( accumulator, entity ) => {\n\t\t\t\t// Verify that new values point to existing entities.\n\t\t\t\tconst id = getIdByValue( entitiesInfo.mapByName, entity );\n\t\t\t\tif ( id ) {\n\t\t\t\t\taccumulator.add( id );\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t}, new Set() )\n\t\t);\n\t\tsetSuggestions( EMPTY_ARRAY );\n\t\tonChange( { parents: ids } );\n\t};\n\treturn (\n\t\t<FormTokenField\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Parents' ) }\n\t\t\tvalue={ value }\n\t\t\tonInputChange={ debouncedSearch }\n\t\t\tsuggestions={ suggestions }\n\t\t\tonChange={ onParentChange }\n\t\t\t__experimentalShowHowTo={ false }\n\t\t\t__nextHasNoMarginBottom\n\t\t/>\n\t);\n}\n\nexport default ParentControl;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_data","_coreData","_element","_compose","_utils","_jsxRuntime","EMPTY_ARRAY","BASE_QUERY","order","_fields","context","ParentControl","parents","postType","onChange","search","setSearch","useState","value","setValue","suggestions","setSuggestions","debouncedSearch","useDebounce","searchResults","searchHasResolved","useSelect","select","getEntityRecords","hasFinishedResolution","coreStore","selectorArgs","orderby","exclude","per_page","currentParents","length","include","useEffect","currentParentsInfo","getEntitiesInfo","mapToIHasNameAndId","sanitizedValue","reduce","accumulator","id","entity","mapById","push","name","entitiesInfo","useMemo","names","getIdByValue","entitiesMappedByName","onParentChange","newValue","ids","Array","from","mapByName","add","Set","jsx","FormTokenField","__next40pxDefaultSize","label","__","onInputChange","__experimentalShowHowTo","__nextHasNoMarginBottom","_default","exports","default"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/parent-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { FormTokenField } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { getEntitiesInfo, mapToIHasNameAndId } from '../../utils';\n\nconst EMPTY_ARRAY = [];\nconst BASE_QUERY = {\n\torder: 'asc',\n\t_fields: 'id,title',\n\tcontext: 'view',\n};\n\nfunction ParentControl( { parents, postType, onChange } ) {\n\tconst [ search, setSearch ] = useState( '' );\n\tconst [ value, setValue ] = useState( EMPTY_ARRAY );\n\tconst [ suggestions, setSuggestions ] = useState( EMPTY_ARRAY );\n\tconst debouncedSearch = useDebounce( setSearch, 250 );\n\tconst { searchResults, searchHasResolved } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! search ) {\n\t\t\t\treturn { searchResults: EMPTY_ARRAY, searchHasResolved: true };\n\t\t\t}\n\t\t\tconst { getEntityRecords, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst selectorArgs = [\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\t{\n\t\t\t\t\t...BASE_QUERY,\n\t\t\t\t\tsearch,\n\t\t\t\t\torderby: 'relevance',\n\t\t\t\t\texclude: parents,\n\t\t\t\t\tper_page: 20,\n\t\t\t\t},\n\t\t\t];\n\t\t\treturn {\n\t\t\t\tsearchResults: getEntityRecords( ...selectorArgs ),\n\t\t\t\tsearchHasResolved: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecords',\n\t\t\t\t\tselectorArgs\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ search, parents ]\n\t);\n\tconst currentParents = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! parents?.length ) {\n\t\t\t\treturn EMPTY_ARRAY;\n\t\t\t}\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\treturn getEntityRecords( 'postType', postType, {\n\t\t\t\t...BASE_QUERY,\n\t\t\t\tinclude: parents,\n\t\t\t\tper_page: parents.length,\n\t\t\t} );\n\t\t},\n\t\t[ parents ]\n\t);\n\t// Update the `value` state only after the selectors are resolved\n\t// to avoid emptying the input when we're changing parents.\n\tuseEffect( () => {\n\t\tif ( ! parents?.length ) {\n\t\t\tsetValue( EMPTY_ARRAY );\n\t\t}\n\t\tif ( ! currentParents?.length ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentParentsInfo = getEntitiesInfo(\n\t\t\tmapToIHasNameAndId( currentParents, 'title.rendered' )\n\t\t);\n\t\t// Returns only the existing entity ids. This prevents the component\n\t\t// from crashing in the editor, when non existing ids are provided.\n\t\tconst sanitizedValue = parents.reduce( ( accumulator, id ) => {\n\t\t\tconst entity = currentParentsInfo.mapById[ id ];\n\t\t\tif ( entity ) {\n\t\t\t\taccumulator.push( {\n\t\t\t\t\tid,\n\t\t\t\t\tvalue: entity.name,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t}, [] );\n\t\tsetValue( sanitizedValue );\n\t}, [ parents, currentParents ] );\n\n\tconst entitiesInfo = useMemo( () => {\n\t\tif ( ! searchResults?.length ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\t\treturn getEntitiesInfo(\n\t\t\tmapToIHasNameAndId( searchResults, 'title.rendered' )\n\t\t);\n\t}, [ searchResults ] );\n\t// Update suggestions only when the query has resolved.\n\tuseEffect( () => {\n\t\tif ( ! searchHasResolved ) {\n\t\t\treturn;\n\t\t}\n\t\tsetSuggestions( entitiesInfo.names );\n\t}, [ entitiesInfo.names, searchHasResolved ] );\n\n\tconst getIdByValue = ( entitiesMappedByName, entity ) => {\n\t\tconst id = entity?.id || entitiesMappedByName?.[ entity ]?.id;\n\t\tif ( id ) {\n\t\t\treturn id;\n\t\t}\n\t};\n\tconst onParentChange = ( newValue ) => {\n\t\tconst ids = Array.from(\n\t\t\tnewValue.reduce( ( accumulator, entity ) => {\n\t\t\t\t// Verify that new values point to existing entities.\n\t\t\t\tconst id = getIdByValue( entitiesInfo.mapByName, entity );\n\t\t\t\tif ( id ) {\n\t\t\t\t\taccumulator.add( id );\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t}, new Set() )\n\t\t);\n\t\tsetSuggestions( EMPTY_ARRAY );\n\t\tonChange( { parents: ids } );\n\t};\n\treturn (\n\t\t<FormTokenField\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Parents' ) }\n\t\t\tvalue={ value }\n\t\t\tonInputChange={ debouncedSearch }\n\t\t\tsuggestions={ suggestions }\n\t\t\tonChange={ onParentChange }\n\t\t\t__experimentalShowHowTo={ false }\n\t\t\t__nextHasNoMarginBottom\n\t\t/>\n\t);\n}\n\nexport default ParentControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AAAkE,IAAAO,WAAA,GAAAP,OAAA;AAblE;AACA;AACA;;AAQA;AACA;AACA;;AAGA,MAAMQ,WAAW,GAAG,EAAE;AACtB,MAAMC,UAAU,GAAG;EAClBC,KAAK,EAAE,KAAK;EACZC,OAAO,EAAE,UAAU;EACnBC,OAAO,EAAE;AACV,CAAC;AAED,SAASC,aAAaA,CAAE;EAAEC,OAAO;E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|
|
|
1
|
-
{"version":3,"names":["_components","require","_data","_coreData","_element","_compose","_htmlEntities","_utils","_jsxRuntime","EMPTY_ARRAY","BASE_QUERY","order","_fields","context","getTermIdByTermValue","terms","termValue","termId","id","find","term","name","termValueLower","toLocaleLowerCase","TaxonomyControls","onChange","query","postType","taxQuery","taxonomies","useTaxonomies","length","jsx","__experimentalVStack","spacing","children","map","taxonomy","termIds","slug","handleChange","newTermIds","TaxonomyItem","search","setSearch","useState","value","setValue","suggestions","setSuggestions","debouncedSearch","useDebounce","searchResults","searchHasResolved","useSelect","select","getEntityRecords","hasFinishedResolution","coreStore","selectorArgs","orderby","exclude","per_page","existingTerms","include","useEffect","sanitizedValue","reduce","accumulator","entity","push","result","onTermsChange","newTermValues","Set","add","Array","from","className","FormTokenField","label","onInputChange","displayTransform","decodeEntities","__experimentalShowHowTo","__nextHasNoMarginBottom","__next40pxDefaultSize"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/taxonomy-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tFormTokenField,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { useTaxonomies } from '../../utils';\n\nconst EMPTY_ARRAY = [];\nconst BASE_QUERY = {\n\torder: 'asc',\n\t_fields: 'id,name',\n\tcontext: 'view',\n};\n\n// Helper function to get the term id based on user input in terms `FormTokenField`.\nconst getTermIdByTermValue = ( terms, termValue ) => {\n\t// First we check for exact match by `term.id` or case sensitive `term.name` match.\n\tconst termId =\n\t\ttermValue?.id || terms?.find( ( term ) => term.name === termValue )?.id;\n\tif ( termId ) {\n\t\treturn termId;\n\t}\n\n\t/**\n\t * Here we make an extra check for entered terms in a non case sensitive way,\n\t * to match user expectations, due to `FormTokenField` behaviour that shows\n\t * suggestions which are case insensitive.\n\t *\n\t * Although WP tries to discourage users to add terms with the same name (case insensitive),\n\t * it's still possible if you manually change the name, as long as the terms have different slugs.\n\t * In this edge case we always apply the first match from the terms list.\n\t */\n\tconst termValueLower = termValue.toLocaleLowerCase();\n\treturn terms?.find(\n\t\t( term ) => term.name.toLocaleLowerCase() === termValueLower\n\t)?.id;\n};\n\nexport function TaxonomyControls( { onChange, query } ) {\n\tconst { postType, taxQuery } = query;\n\n\tconst taxonomies = useTaxonomies( postType );\n\tif ( ! taxonomies || taxonomies.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 4 }>\n\t\t\t{ taxonomies.map( ( taxonomy ) => {\n\t\t\t\tconst termIds = taxQuery?.[ taxonomy.slug ] || [];\n\t\t\t\tconst handleChange = ( newTermIds ) =>\n\t\t\t\t\tonChange( {\n\t\t\t\t\t\ttaxQuery: {\n\t\t\t\t\t\t\t...taxQuery,\n\t\t\t\t\t\t\t[ taxonomy.slug ]: newTermIds,\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\n\t\t\t\treturn (\n\t\t\t\t\t<TaxonomyItem\n\t\t\t\t\t\tkey={ taxonomy.slug }\n\t\t\t\t\t\ttaxonomy={ taxonomy }\n\t\t\t\t\t\ttermIds={ termIds }\n\t\t\t\t\t\tonChange={ handleChange }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n\n/**\n * Renders a `FormTokenField` for a given taxonomy.\n *\n * @param {Object} props The props for the component.\n * @param {Object} props.taxonomy The taxonomy object.\n * @param {number[]} props.termIds An array with the block's term ids for the given taxonomy.\n * @param {Function} props.onChange Callback `onChange` function.\n * @return {JSX.Element} The rendered component.\n */\nfunction TaxonomyItem( { taxonomy, termIds, onChange } ) {\n\tconst [ search, setSearch ] = useState( '' );\n\tconst [ value, setValue ] = useState( EMPTY_ARRAY );\n\tconst [ suggestions, setSuggestions ] = useState( EMPTY_ARRAY );\n\tconst debouncedSearch = useDebounce( setSearch, 250 );\n\tconst { searchResults, searchHasResolved } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! search ) {\n\t\t\t\treturn { searchResults: EMPTY_ARRAY, searchHasResolved: true };\n\t\t\t}\n\t\t\tconst { getEntityRecords, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst selectorArgs = [\n\t\t\t\t'taxonomy',\n\t\t\t\ttaxonomy.slug,\n\t\t\t\t{\n\t\t\t\t\t...BASE_QUERY,\n\t\t\t\t\tsearch,\n\t\t\t\t\torderby: 'name',\n\t\t\t\t\texclude: termIds,\n\t\t\t\t\tper_page: 20,\n\t\t\t\t},\n\t\t\t];\n\t\t\treturn {\n\t\t\t\tsearchResults: getEntityRecords( ...selectorArgs ),\n\t\t\t\tsearchHasResolved: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecords',\n\t\t\t\t\tselectorArgs\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ search, termIds ]\n\t);\n\t// `existingTerms` are the ones fetched from the API and their type is `{ id: number; name: string }`.\n\t// They are used to extract the terms' names to populate the `FormTokenField` properly\n\t// and to sanitize the provided `termIds`, by setting only the ones that exist.\n\tconst existingTerms = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! termIds?.length ) {\n\t\t\t\treturn EMPTY_ARRAY;\n\t\t\t}\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\treturn getEntityRecords( 'taxonomy', taxonomy.slug, {\n\t\t\t\t...BASE_QUERY,\n\t\t\t\tinclude: termIds,\n\t\t\t\tper_page: termIds.length,\n\t\t\t} );\n\t\t},\n\t\t[ termIds ]\n\t);\n\t// Update the `value` state only after the selectors are resolved\n\t// to avoid emptying the input when we're changing terms.\n\tuseEffect( () => {\n\t\tif ( ! termIds?.length ) {\n\t\t\tsetValue( EMPTY_ARRAY );\n\t\t}\n\t\tif ( ! existingTerms?.length ) {\n\t\t\treturn;\n\t\t}\n\t\t// Returns only the existing entity ids. This prevents the component\n\t\t// from crashing in the editor, when non existing ids are provided.\n\t\tconst sanitizedValue = termIds.reduce( ( accumulator, id ) => {\n\t\t\tconst entity = existingTerms.find( ( term ) => term.id === id );\n\t\t\tif ( entity ) {\n\t\t\t\taccumulator.push( {\n\t\t\t\t\tid,\n\t\t\t\t\tvalue: entity.name,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t}, [] );\n\t\tsetValue( sanitizedValue );\n\t}, [ termIds, existingTerms ] );\n\t// Update suggestions only when the query has resolved.\n\tuseEffect( () => {\n\t\tif ( ! searchHasResolved ) {\n\t\t\treturn;\n\t\t}\n\t\tsetSuggestions( searchResults.map( ( result ) => result.name ) );\n\t}, [ searchResults, searchHasResolved ] );\n\tconst onTermsChange = ( newTermValues ) => {\n\t\tconst newTermIds = new Set();\n\t\tfor ( const termValue of newTermValues ) {\n\t\t\tconst termId = getTermIdByTermValue( searchResults, termValue );\n\t\t\tif ( termId ) {\n\t\t\t\tnewTermIds.add( termId );\n\t\t\t}\n\t\t}\n\t\tsetSuggestions( EMPTY_ARRAY );\n\t\tonChange( Array.from( newTermIds ) );\n\t};\n\treturn (\n\t\t<div className=\"block-library-query-inspector__taxonomy-control\">\n\t\t\t<FormTokenField\n\t\t\t\tlabel={ taxonomy.name }\n\t\t\t\tvalue={ value }\n\t\t\t\tonInputChange={ debouncedSearch }\n\t\t\t\tsuggestions={ suggestions }\n\t\t\t\tdisplayTransform={ decodeEntities }\n\t\t\t\tonChange={ onTermsChange }\n\t\t\t\t__experimentalShowHowTo={ false }\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,Q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CAAC;AAER","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_components","require","_data","_coreData","_element","_compose","_htmlEntities","_utils","_jsxRuntime","EMPTY_ARRAY","BASE_QUERY","order","_fields","context","getTermIdByTermValue","terms","termValue","termId","id","find","term","name","termValueLower","toLocaleLowerCase","TaxonomyControls","onChange","query","postType","taxQuery","taxonomies","useTaxonomies","length","jsx","__experimentalVStack","spacing","children","map","taxonomy","termIds","slug","handleChange","newTermIds","TaxonomyItem","search","setSearch","useState","value","setValue","suggestions","setSuggestions","debouncedSearch","useDebounce","searchResults","searchHasResolved","useSelect","select","getEntityRecords","hasFinishedResolution","coreStore","selectorArgs","orderby","exclude","per_page","existingTerms","include","useEffect","sanitizedValue","reduce","accumulator","entity","push","result","onTermsChange","newTermValues","Set","add","Array","from","className","FormTokenField","label","onInputChange","displayTransform","decodeEntities","__experimentalShowHowTo","__nextHasNoMarginBottom","__next40pxDefaultSize"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/taxonomy-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tFormTokenField,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { useTaxonomies } from '../../utils';\n\nconst EMPTY_ARRAY = [];\nconst BASE_QUERY = {\n\torder: 'asc',\n\t_fields: 'id,name',\n\tcontext: 'view',\n};\n\n// Helper function to get the term id based on user input in terms `FormTokenField`.\nconst getTermIdByTermValue = ( terms, termValue ) => {\n\t// First we check for exact match by `term.id` or case sensitive `term.name` match.\n\tconst termId =\n\t\ttermValue?.id || terms?.find( ( term ) => term.name === termValue )?.id;\n\tif ( termId ) {\n\t\treturn termId;\n\t}\n\n\t/**\n\t * Here we make an extra check for entered terms in a non case sensitive way,\n\t * to match user expectations, due to `FormTokenField` behaviour that shows\n\t * suggestions which are case insensitive.\n\t *\n\t * Although WP tries to discourage users to add terms with the same name (case insensitive),\n\t * it's still possible if you manually change the name, as long as the terms have different slugs.\n\t * In this edge case we always apply the first match from the terms list.\n\t */\n\tconst termValueLower = termValue.toLocaleLowerCase();\n\treturn terms?.find(\n\t\t( term ) => term.name.toLocaleLowerCase() === termValueLower\n\t)?.id;\n};\n\nexport function TaxonomyControls( { onChange, query } ) {\n\tconst { postType, taxQuery } = query;\n\n\tconst taxonomies = useTaxonomies( postType );\n\tif ( ! taxonomies || taxonomies.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 4 }>\n\t\t\t{ taxonomies.map( ( taxonomy ) => {\n\t\t\t\tconst termIds = taxQuery?.[ taxonomy.slug ] || [];\n\t\t\t\tconst handleChange = ( newTermIds ) =>\n\t\t\t\t\tonChange( {\n\t\t\t\t\t\ttaxQuery: {\n\t\t\t\t\t\t\t...taxQuery,\n\t\t\t\t\t\t\t[ taxonomy.slug ]: newTermIds,\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\n\t\t\t\treturn (\n\t\t\t\t\t<TaxonomyItem\n\t\t\t\t\t\tkey={ taxonomy.slug }\n\t\t\t\t\t\ttaxonomy={ taxonomy }\n\t\t\t\t\t\ttermIds={ termIds }\n\t\t\t\t\t\tonChange={ handleChange }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n\n/**\n * Renders a `FormTokenField` for a given taxonomy.\n *\n * @param {Object} props The props for the component.\n * @param {Object} props.taxonomy The taxonomy object.\n * @param {number[]} props.termIds An array with the block's term ids for the given taxonomy.\n * @param {Function} props.onChange Callback `onChange` function.\n * @return {JSX.Element} The rendered component.\n */\nfunction TaxonomyItem( { taxonomy, termIds, onChange } ) {\n\tconst [ search, setSearch ] = useState( '' );\n\tconst [ value, setValue ] = useState( EMPTY_ARRAY );\n\tconst [ suggestions, setSuggestions ] = useState( EMPTY_ARRAY );\n\tconst debouncedSearch = useDebounce( setSearch, 250 );\n\tconst { searchResults, searchHasResolved } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! search ) {\n\t\t\t\treturn { searchResults: EMPTY_ARRAY, searchHasResolved: true };\n\t\t\t}\n\t\t\tconst { getEntityRecords, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst selectorArgs = [\n\t\t\t\t'taxonomy',\n\t\t\t\ttaxonomy.slug,\n\t\t\t\t{\n\t\t\t\t\t...BASE_QUERY,\n\t\t\t\t\tsearch,\n\t\t\t\t\torderby: 'name',\n\t\t\t\t\texclude: termIds,\n\t\t\t\t\tper_page: 20,\n\t\t\t\t},\n\t\t\t];\n\t\t\treturn {\n\t\t\t\tsearchResults: getEntityRecords( ...selectorArgs ),\n\t\t\t\tsearchHasResolved: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecords',\n\t\t\t\t\tselectorArgs\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ search, termIds ]\n\t);\n\t// `existingTerms` are the ones fetched from the API and their type is `{ id: number; name: string }`.\n\t// They are used to extract the terms' names to populate the `FormTokenField` properly\n\t// and to sanitize the provided `termIds`, by setting only the ones that exist.\n\tconst existingTerms = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! termIds?.length ) {\n\t\t\t\treturn EMPTY_ARRAY;\n\t\t\t}\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\treturn getEntityRecords( 'taxonomy', taxonomy.slug, {\n\t\t\t\t...BASE_QUERY,\n\t\t\t\tinclude: termIds,\n\t\t\t\tper_page: termIds.length,\n\t\t\t} );\n\t\t},\n\t\t[ termIds ]\n\t);\n\t// Update the `value` state only after the selectors are resolved\n\t// to avoid emptying the input when we're changing terms.\n\tuseEffect( () => {\n\t\tif ( ! termIds?.length ) {\n\t\t\tsetValue( EMPTY_ARRAY );\n\t\t}\n\t\tif ( ! existingTerms?.length ) {\n\t\t\treturn;\n\t\t}\n\t\t// Returns only the existing entity ids. This prevents the component\n\t\t// from crashing in the editor, when non existing ids are provided.\n\t\tconst sanitizedValue = termIds.reduce( ( accumulator, id ) => {\n\t\t\tconst entity = existingTerms.find( ( term ) => term.id === id );\n\t\t\tif ( entity ) {\n\t\t\t\taccumulator.push( {\n\t\t\t\t\tid,\n\t\t\t\t\tvalue: entity.name,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t}, [] );\n\t\tsetValue( sanitizedValue );\n\t}, [ termIds, existingTerms ] );\n\t// Update suggestions only when the query has resolved.\n\tuseEffect( () => {\n\t\tif ( ! searchHasResolved ) {\n\t\t\treturn;\n\t\t}\n\t\tsetSuggestions( searchResults.map( ( result ) => result.name ) );\n\t}, [ searchResults, searchHasResolved ] );\n\tconst onTermsChange = ( newTermValues ) => {\n\t\tconst newTermIds = new Set();\n\t\tfor ( const termValue of newTermValues ) {\n\t\t\tconst termId = getTermIdByTermValue( searchResults, termValue );\n\t\t\tif ( termId ) {\n\t\t\t\tnewTermIds.add( termId );\n\t\t\t}\n\t\t}\n\t\tsetSuggestions( EMPTY_ARRAY );\n\t\tonChange( Array.from( newTermIds ) );\n\t};\n\treturn (\n\t\t<div className=\"block-library-query-inspector__taxonomy-control\">\n\t\t\t<FormTokenField\n\t\t\t\tlabel={ taxonomy.name }\n\t\t\t\tvalue={ value }\n\t\t\t\tonInputChange={ debouncedSearch }\n\t\t\t\tsuggestions={ suggestions }\n\t\t\t\tdisplayTransform={ decodeEntities }\n\t\t\t\tonChange={ onTermsChange }\n\t\t\t\t__experimentalShowHowTo={ false }\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAA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AAA,CACrB;EAAC,CACE,CAAC;AAER","ignoreList":[]}
|
|
@@ -65,7 +65,7 @@ function PatternSelectionModal({
|
|
|
65
65
|
__nextHasNoMarginBottom: true,
|
|
66
66
|
onChange: setSearchValue,
|
|
67
67
|
value: searchValue,
|
|
68
|
-
label: (0, _i18n.__)('Search
|
|
68
|
+
label: (0, _i18n.__)('Search'),
|
|
69
69
|
placeholder: (0, _i18n.__)('Search')
|
|
70
70
|
})
|
|
71
71
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockContextProvider, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_data","_components","_compose","_blockEditor","_i18n","_utils","_searchPatterns","_jsxRuntime","PatternSelectionModal","clientId","attributes","setIsPatternSelectionModalOpen","searchValue","setSearchValue","useState","replaceBlock","selectBlock","useDispatch","blockEditorStore","onBlockPatternSelect","pattern","blocks","newBlocks","queryClientIds","getTransformedBlocksFromPattern","blockPreviewContext","useMemo","previewPostType","query","postType","blockNameForPatterns","useBlockNameForPatterns","blockPatterns","usePatterns","filteredBlockPatterns","searchPatterns","shownBlockPatterns","useAsyncList","jsx","Modal","overlayClassName","title","__","onRequestClose","isFullScreen","children","jsxs","className","SearchControl","__nextHasNoMarginBottom","onChange","value","label","placeholder","BlockContextProvider","__experimentalBlockPatternsList","shownPatterns","onClickPattern"],"sources":["@wordpress/block-library/src/query/edit/pattern-selection-modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useMemo } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { Modal, SearchControl } from '@wordpress/components';\nimport { useAsyncList } from '@wordpress/compose';\nimport {\n\tBlockContextProvider,\n\tstore as blockEditorStore,\n\t__experimentalBlockPatternsList as BlockPatternsList,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockNameForPatterns,\n\tgetTransformedBlocksFromPattern,\n\tusePatterns,\n} from '../utils';\nimport { searchPatterns } from '../../utils/search-patterns';\n\nexport default function PatternSelectionModal( {\n\tclientId,\n\tattributes,\n\tsetIsPatternSelectionModalOpen,\n} ) {\n\tconst [ searchValue, setSearchValue ] = useState( '' );\n\tconst { replaceBlock, selectBlock } = useDispatch( blockEditorStore );\n\tconst onBlockPatternSelect = ( pattern, blocks ) => {\n\t\tconst { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(\n\t\t\tblocks,\n\t\t\tattributes\n\t\t);\n\t\treplaceBlock( clientId, newBlocks );\n\t\tif ( queryClientIds[ 0 ] ) {\n\t\t\tselectBlock( queryClientIds[ 0 ] );\n\t\t}\n\t};\n\t// When we preview Query Loop blocks we should prefer the current\n\t// block's postType, which is passed through block context.\n\tconst blockPreviewContext = useMemo(\n\t\t() => ( {\n\t\t\tpreviewPostType: attributes.query.postType,\n\t\t} ),\n\t\t[ attributes.query.postType ]\n\t);\n\tconst blockNameForPatterns = useBlockNameForPatterns(\n\t\tclientId,\n\t\tattributes\n\t);\n\tconst blockPatterns = usePatterns( clientId, blockNameForPatterns );\n\tconst filteredBlockPatterns = useMemo( () => {\n\t\treturn searchPatterns( blockPatterns, searchValue );\n\t}, [ blockPatterns, searchValue ] );\n\tconst shownBlockPatterns = useAsyncList( filteredBlockPatterns );\n\n\treturn (\n\t\t<Modal\n\t\t\toverlayClassName=\"block-library-query-pattern__selection-modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tonRequestClose={ () => setIsPatternSelectionModalOpen( false ) }\n\t\t\tisFullScreen\n\t\t>\n\t\t\t<div className=\"block-library-query-pattern__selection-content\">\n\t\t\t\t<div className=\"block-library-query-pattern__selection-search\">\n\t\t\t\t\t<SearchControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tonChange={ setSearchValue }\n\t\t\t\t\t\tvalue={ searchValue }\n\t\t\t\t\t\tlabel={ __( 'Search
|
|
1
|
+
{"version":3,"names":["_element","require","_data","_components","_compose","_blockEditor","_i18n","_utils","_searchPatterns","_jsxRuntime","PatternSelectionModal","clientId","attributes","setIsPatternSelectionModalOpen","searchValue","setSearchValue","useState","replaceBlock","selectBlock","useDispatch","blockEditorStore","onBlockPatternSelect","pattern","blocks","newBlocks","queryClientIds","getTransformedBlocksFromPattern","blockPreviewContext","useMemo","previewPostType","query","postType","blockNameForPatterns","useBlockNameForPatterns","blockPatterns","usePatterns","filteredBlockPatterns","searchPatterns","shownBlockPatterns","useAsyncList","jsx","Modal","overlayClassName","title","__","onRequestClose","isFullScreen","children","jsxs","className","SearchControl","__nextHasNoMarginBottom","onChange","value","label","placeholder","BlockContextProvider","__experimentalBlockPatternsList","shownPatterns","onClickPattern"],"sources":["@wordpress/block-library/src/query/edit/pattern-selection-modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useMemo } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { Modal, SearchControl } from '@wordpress/components';\nimport { useAsyncList } from '@wordpress/compose';\nimport {\n\tBlockContextProvider,\n\tstore as blockEditorStore,\n\t__experimentalBlockPatternsList as BlockPatternsList,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockNameForPatterns,\n\tgetTransformedBlocksFromPattern,\n\tusePatterns,\n} from '../utils';\nimport { searchPatterns } from '../../utils/search-patterns';\n\nexport default function PatternSelectionModal( {\n\tclientId,\n\tattributes,\n\tsetIsPatternSelectionModalOpen,\n} ) {\n\tconst [ searchValue, setSearchValue ] = useState( '' );\n\tconst { replaceBlock, selectBlock } = useDispatch( blockEditorStore );\n\tconst onBlockPatternSelect = ( pattern, blocks ) => {\n\t\tconst { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(\n\t\t\tblocks,\n\t\t\tattributes\n\t\t);\n\t\treplaceBlock( clientId, newBlocks );\n\t\tif ( queryClientIds[ 0 ] ) {\n\t\t\tselectBlock( queryClientIds[ 0 ] );\n\t\t}\n\t};\n\t// When we preview Query Loop blocks we should prefer the current\n\t// block's postType, which is passed through block context.\n\tconst blockPreviewContext = useMemo(\n\t\t() => ( {\n\t\t\tpreviewPostType: attributes.query.postType,\n\t\t} ),\n\t\t[ attributes.query.postType ]\n\t);\n\tconst blockNameForPatterns = useBlockNameForPatterns(\n\t\tclientId,\n\t\tattributes\n\t);\n\tconst blockPatterns = usePatterns( clientId, blockNameForPatterns );\n\tconst filteredBlockPatterns = useMemo( () => {\n\t\treturn searchPatterns( blockPatterns, searchValue );\n\t}, [ blockPatterns, searchValue ] );\n\tconst shownBlockPatterns = useAsyncList( filteredBlockPatterns );\n\n\treturn (\n\t\t<Modal\n\t\t\toverlayClassName=\"block-library-query-pattern__selection-modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tonRequestClose={ () => setIsPatternSelectionModalOpen( false ) }\n\t\t\tisFullScreen\n\t\t>\n\t\t\t<div className=\"block-library-query-pattern__selection-content\">\n\t\t\t\t<div className=\"block-library-query-pattern__selection-search\">\n\t\t\t\t\t<SearchControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tonChange={ setSearchValue }\n\t\t\t\t\t\tvalue={ searchValue }\n\t\t\t\t\t\tlabel={ __( 'Search' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<BlockContextProvider value={ blockPreviewContext }>\n\t\t\t\t\t<BlockPatternsList\n\t\t\t\t\t\tblockPatterns={ filteredBlockPatterns }\n\t\t\t\t\t\tshownPatterns={ shownBlockPatterns }\n\t\t\t\t\t\tonClickPattern={ onBlockPatternSelect }\n\t\t\t\t\t/>\n\t\t\t\t</BlockContextProvider>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA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EpB,WAAY,CAAC;EACpD,CAAC,EAAE,CAAEoB,aAAa,EAAEpB,WAAW,CAAG,CAAC;EACnC,MAAMwB,kBAAkB,GAAG,IAAAC,qBAAY,EAAEH,qBAAsB,CAAC;EAEhE,oBACC,IAAA3B,WAAA,CAAA+B,GAAA,EAACrC,WAAA,CAAAsC,KAAK;IACLC,gBAAgB,EAAC,8CAA8C;IAC/DC,KAAK,EAAG,IAAAC,QAAE,EAAE,kBAAmB,CAAG;IAClCC,cAAc,EAAGA,CAAA,KAAMhC,8BAA8B,CAAE,KAAM,CAAG;IAChEiC,YAAY;IAAAC,QAAA,eAEZ,IAAAtC,WAAA,CAAAuC,IAAA;MAAKC,SAAS,EAAC,gDAAgD;MAAAF,QAAA,gBAC9D,IAAAtC,WAAA,CAAA+B,GAAA;QAAKS,SAAS,EAAC,+CAA+C;QAAAF,QAAA,eAC7D,IAAAtC,WAAA,CAAA+B,GAAA,EAACrC,WAAA,CAAA+C,aAAa;UACbC,uBAAuB;UACvBC,QAAQ,EAAGrC,cAAgB;UAC3BsC,KAAK,EAAGvC,WAAa;UACrBwC,KAAK,EAAG,IAAAV,QAAE,EAAE,QAAS,CAAG;UACxBW,WAAW,EAAG,IAAAX,QAAE,EAAE,QAAS;QAAG,CAC9B;MAAC,CACE,CAAC,eACN,IAAAnC,WAAA,CAAA+B,GAAA,EAACnC,YAAA,CAAAmD,oBAAoB;QAACH,KAAK,EAAG1B,mBAAqB;QAAAoB,QAAA,eAClD,IAAAtC,WAAA,CAAA+B,GAAA,EAACnC,YAAA,CAAAoD,+BAAiB;UACjBvB,aAAa,EAAGE,qBAAuB;UACvCsB,aAAa,EAAGpB,kBAAoB;UACpCqB,cAAc,EAAGtC;QAAsB,CACvC;MAAC,CACmB,CAAC;IAAA,CACnB;EAAC,CACA,CAAC;AAEV","ignoreList":[]}
|
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","postTypeFormatSupportMap","supports","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 * 3. A helper map with post format support 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\tconst postTypeFormatSupportMap = 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 ] =\n\t\t\t\ttype.supports?.[ 'post-formats' ] || false;\n\t\t\treturn accumulator;\n\t\t}, {} );\n\t}, [ postTypes ] );\n\treturn {\n\t\tpostTypesTaxonomiesMap,\n\t\tpostTypesSelectOptions,\n\t\tpostTypeFormatSupportMap,\n\t};\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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GACvBL,0BAA0B,IAC1BI,0CAA0C;MAC3C,IAAK,CAAEC,kBAAkB,EAAG;QAC3BzC,MAAM,CAAC0C,oBAAoB,GAAG,IAAI;MACnC,CAAC,MAAM,IAAKzB,SAAS,KAAK,mBAAmB,EAAG;QAC/CjB,MAAM,CAAC2C,mBAAmB,GAAG,IAAI;MAClC;IACD,CACD,CAAC;IACD3C,MAAM,CAAC4C,oBAAoB,GAC1B5C,MAAM,CAAC0C,oBAAoB,IAAI1C,MAAM,CAAC2C,mBAAmB;IAC1D,OAAO3C,MAAM;EACd,CAAC,EACD,CAAEW,QAAQ,CACX,CAAC;AACF,CAAC;AAAC/D,OAAA,CAAAoF,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","postTypeFormatSupportMap","supports","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 * 3. A helper map with post format support 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\tconst postTypeFormatSupportMap = 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 ] =\n\t\t\t\ttype.supports?.[ 'post-formats' ] || false;\n\t\t\treturn accumulator;\n\t\t}, {} );\n\t}, [ postTypes ] );\n\treturn {\n\t\tpostTypesTaxonomiesMap,\n\t\tpostTypesSelectOptions,\n\t\tpostTypeFormatSupportMap,\n\t};\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,IAAM;EAC9C,MAAMC,OAAO,GAAGD,QAAQ,EAAEE,MAAM,CAC/B,CAAEC,WAAW,EAAEC,MAAM,KAAM;IAC1B,MAAM;MAAEC,OAAO;MAAEC,SAAS;MAAEC;IAAM,CAAC,GAAGJ,WAAW;IACjDE,OAAO,CAAED,MAAM,CAACI,EAAE,CAAE,GAAGJ,MAAM;IAC7BE,SAAS,CAAEF,MAAM,CAACK,IAAI,CAAE,GAAGL,MAAM;IACjCG,KAAK,CAACG,IAAI,CAAEN,MAAM,CAACK,IAAK,CAAC;IACzB,OAAON,WAAW;EACnB,CAAC,EACD;IAAEE,OAAO,EAAE,CAAC,CAAC;IAAEC,SAAS,EAAE,CAAC,CAAC;IAAEC,KAAK,EAAE;EAAG,CACzC,CAAC;EACD,OAAO;IACNP,QAAQ;IACR,GAAGC;EACJ,CAAC;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARAU,OAAA,CAAAZ,eAAA,GAAAA,eAAA;AASO,MAAMa,sBAAsB,GAAGA,CAAEC,MAAM,EAAEC,IAAI,K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AAM,IAAM;IACb,MAAM;MAAEsE,yBAAyB;MAAEC;IAAa,CAAC,GAChDvE,MAAM,CAAE0D,kBAAiB,CAAC;IAC3B,MAAMrB,MAAM,GAAG,CAAC,CAAC;IACjBiC,yBAAyB,CAAEtB,QAAS,CAAC,CAACxD,OAAO,CAC1CgF,kBAAkB,IAAM;MACzB,MAAMlB,SAAS,GAAGiB,YAAY,CAAEC,kBAAmB,CAAC;MACpD;AACL;AACA;AACA;AACA;MACK,MAAMC,0BAA0B,GAAGC,MAAM,CAACC,EAAE,CAC3C,IAAAC,uBAAe,EAAEtB,SAAS,EAAE,eAAgB,CAAC,EAC7C,IACD,CAAC;MACD,MAAMuB,0CAA0C,GAC/C,IAAAD,uBAAe,EACdtB,SAAS,EACT,gCACD,CAAC;MACF,MAAMwB,kBAAkB,GACvBL,0BAA0B,IAC1BI,0CAA0C;MAC3C,IAAK,CAAEC,kBAAkB,EAAG;QAC3BzC,MAAM,CAAC0C,oBAAoB,GAAG,IAAI;MACnC,CAAC,MAAM,IAAKzB,SAAS,KAAK,mBAAmB,EAAG;QAC/CjB,MAAM,CAAC2C,mBAAmB,GAAG,IAAI;MAClC;IACD,CACD,CAAC;IACD3C,MAAM,CAAC4C,oBAAoB,GAC1B5C,MAAM,CAAC0C,oBAAoB,IAAI1C,MAAM,CAAC2C,mBAAmB;IAC1D,OAAO3C,MAAM;EACd,CAAC,EACD,CAAEW,QAAQ,CACX,CAAC;AACF,CAAC;AAAC/D,OAAA,CAAAoF,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
package/build/query/view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_interactivity","require","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","isValidLink","ref","window","HTMLAnchorElement","href","target","origin","location","isValidEvent","event","button","metaKey","ctrlKey","altKey","shiftKey","defaultPrevented","store","actions","navigate","ctx","getContext","getElement","queryRef","closest","preventDefault","Promise","resolve","then","url","firstAnchor","querySelector","focus","prefetch","callbacks","lock"],"sources":["@wordpress/block-library/src/query/view.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store, getContext, getElement } from '@wordpress/interactivity';\n\nconst isValidLink = ( ref ) =>\n\tref &&\n\tref instanceof window.HTMLAnchorElement &&\n\tref.href &&\n\t( ! ref.target || ref.target === '_self' ) &&\n\tref.origin === window.location.origin;\n\nconst isValidEvent = ( event ) =>\n\tevent.button === 0 && // Left clicks only.\n\t! event.metaKey && // Open in new tab (Mac).\n\t! event.ctrlKey && // Open in new tab (Windows).\n\t! event.altKey && // Download.\n\t! event.shiftKey &&\n\t! event.defaultPrevented;\n\nstore(\n\t'core/query',\n\t{\n\t\tactions: {\n\t\t\t*navigate( event ) {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tconst queryRef = ref.closest(\n\t\t\t\t\t'.wp-block-query[data-wp-router-region]'\n\t\t\t\t);\n\n\t\t\t\tif ( isValidLink( ref ) && isValidEvent( event ) ) {\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\tconst { actions } = yield import(\n\t\t\t\t\t\t'@wordpress/interactivity-router'\n\t\t\t\t\t);\n\t\t\t\t\tyield actions.navigate( ref.href );\n\t\t\t\t\tctx.url = ref.href;\n\n\t\t\t\t\t// Focus the first anchor of the Query block.\n\t\t\t\t\tconst firstAnchor = `.wp-block-post-template a[href]`;\n\t\t\t\t\tqueryRef.querySelector( firstAnchor )?.focus();\n\t\t\t\t}\n\t\t\t},\n\t\t\t*prefetch() {\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tif ( isValidLink( ref ) ) {\n\t\t\t\t\tconst { actions } = yield import(\n\t\t\t\t\t\t'@wordpress/interactivity-router'\n\t\t\t\t\t);\n\t\t\t\t\tyield actions.prefetch( ref.href );\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tcallbacks: {\n\t\t\t*prefetch() {\n\t\t\t\tconst { url } = getContext();\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tif ( url && isValidLink( ref ) ) {\n\t\t\t\t\tconst { actions } = yield import(\n\t\t\t\t\t\t'@wordpress/interactivity-router'\n\t\t\t\t\t);\n\t\t\t\t\tyield actions.prefetch( ref.href );\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n\t{ lock: true }\n);\n"],"mappings":";;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAAyE,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAe,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAd,CAAA,EAAAe,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,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AO,CAACC,QAAQ,CAAEjB,GAAG,CAACG,IAAK,CAAC;QAClCe,GAAG,CAACS,GAAG,GAAG3B,GAAG,CAACG,IAAI;;QAElB;QACA,MAAMyB,WAAW,
|
|
1
|
+
{"version":3,"names":["_interactivity","require","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","isValidLink","ref","window","HTMLAnchorElement","href","target","origin","location","isValidEvent","event","button","metaKey","ctrlKey","altKey","shiftKey","defaultPrevented","store","actions","navigate","ctx","getContext","getElement","queryRef","closest","preventDefault","Promise","resolve","then","url","firstAnchor","querySelector","focus","prefetch","callbacks","lock"],"sources":["@wordpress/block-library/src/query/view.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store, getContext, getElement } from '@wordpress/interactivity';\n\nconst isValidLink = ( ref ) =>\n\tref &&\n\tref instanceof window.HTMLAnchorElement &&\n\tref.href &&\n\t( ! ref.target || ref.target === '_self' ) &&\n\tref.origin === window.location.origin;\n\nconst isValidEvent = ( event ) =>\n\tevent.button === 0 && // Left clicks only.\n\t! event.metaKey && // Open in new tab (Mac).\n\t! event.ctrlKey && // Open in new tab (Windows).\n\t! event.altKey && // Download.\n\t! event.shiftKey &&\n\t! event.defaultPrevented;\n\nstore(\n\t'core/query',\n\t{\n\t\tactions: {\n\t\t\t*navigate( event ) {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tconst queryRef = ref.closest(\n\t\t\t\t\t'.wp-block-query[data-wp-router-region]'\n\t\t\t\t);\n\n\t\t\t\tif ( isValidLink( ref ) && isValidEvent( event ) ) {\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\tconst { actions } = yield import(\n\t\t\t\t\t\t'@wordpress/interactivity-router'\n\t\t\t\t\t);\n\t\t\t\t\tyield actions.navigate( ref.href );\n\t\t\t\t\tctx.url = ref.href;\n\n\t\t\t\t\t// Focus the first anchor of the Query block.\n\t\t\t\t\tconst firstAnchor = `.wp-block-post-template a[href]`;\n\t\t\t\t\tqueryRef.querySelector( firstAnchor )?.focus();\n\t\t\t\t}\n\t\t\t},\n\t\t\t*prefetch() {\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tif ( isValidLink( ref ) ) {\n\t\t\t\t\tconst { actions } = yield import(\n\t\t\t\t\t\t'@wordpress/interactivity-router'\n\t\t\t\t\t);\n\t\t\t\t\tyield actions.prefetch( ref.href );\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tcallbacks: {\n\t\t\t*prefetch() {\n\t\t\t\tconst { url } = getContext();\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tif ( url && isValidLink( ref ) ) {\n\t\t\t\t\tconst { actions } = yield import(\n\t\t\t\t\t\t'@wordpress/interactivity-router'\n\t\t\t\t\t);\n\t\t\t\t\tyield actions.prefetch( ref.href );\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n\t{ lock: true }\n);\n"],"mappings":";;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAAyE,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,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Q,OAAA,CAAAC,OAAA,GAAAC,IAAA,OAAA3C,uBAAA,CAAAN,OAAA,CACnB,iCAAiC,GACjC;QACD,MAAMuC,OAAO,CAACe,QAAQ,CAAE/B,GAAG,CAACG,IAAK,CAAC;MACnC;IACD;EACD;AACD,CAAC,EACD;EAAE8B,IAAI,EAAE;AAAK,CACd,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_blockEditor","_jsxRuntime","arrowMap","none","arrow","chevron","QueryPaginationNextEdit","attributes","label","setAttributes","context","paginationArrow","showLabel","displayArrow","jsxs","href","onClick","event","preventDefault","useBlockProps","children","jsx","PlainText","__experimentalVersion","tagName","__","placeholder","value","onChange","newLabel","className"],"sources":["@wordpress/block-library/src/query-pagination-next/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, PlainText } from '@wordpress/block-editor';\n\nconst arrowMap = {\n\tnone: '',\n\tarrow: '→',\n\tchevron: '»',\n};\n\nexport default function QueryPaginationNextEdit( {\n\tattributes: { label },\n\tsetAttributes,\n\tcontext: { paginationArrow, showLabel },\n} ) {\n\tconst displayArrow = arrowMap[ paginationArrow ];\n\treturn (\n\t\t<a\n\t\t\thref=\"#pagination-next-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t{ ...useBlockProps() }\n\t\t>\n\t\t\t{ showLabel && (\n\t\t\t\t<PlainText\n\t\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\taria-label={ __( 'Next page link' ) }\n\t\t\t\t\tplaceholder={ __( 'Next Page' ) }\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ displayArrow && (\n\t\t\t\t<span\n\t\t\t\t\tclassName={ `wp-block-query-pagination-next-arrow is-arrow-${ paginationArrow }` }\n\t\t\t\t\taria-hidden\n\t\t\t\t>\n\t\t\t\t\t{ displayArrow }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t</a>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAmE,IAAAE,WAAA,GAAAF,OAAA;AAJnE;AACA;AACA;;AAIA,MAAMG,QAAQ,GAAG;EAChBC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,GAAG;EACVC,OAAO,EAAE;AACV,CAAC;AAEc,SAASC,uBAAuBA,CAAE;EAChDC,UAAU,EAAE;IAAEC;EAAM,CAAC;EACrBC,aAAa;EACbC,OAAO,EAAE;IAAEC,eAAe;IAAEC;EAAU;AACvC,CAAC,EAAG;EACH,MAAMC,YAAY,GAAGX,QAAQ,CAAES,eAAe,CAAE;EAChD,oBACC,IAAAV,WAAA,CAAAa,IAAA;IACCC,IAAI,EAAC,8BAA8B;IACnCC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;IAAA,GAC1C,IAAAC,0BAAa,EAAC,CAAC;IAAAC,QAAA,GAElBR,SAAS,iBACV,IAAAX,WAAA,CAAAoB,GAAA,EAACrB,YAAA,CAAAsB,SAAS;MACTC,qBAAqB,EAAG,CAAG;MAC3BC,OAAO,EAAC,MAAM;MACd,cAAa,IAAAC,QAAE,EAAE,gBAAiB,CAAG;MACrCC,WAAW,EAAG,IAAAD,QAAE,EAAE,WAAY,CAAG;MACjCE,KAAK,EAAGnB,KAAO;MACfoB,QAAQ,EAAKC,QAAQ,IACpBpB,aAAa,CAAE;QAAED,KAAK,EAAEqB;MAAS,CAAE;IACnC,CACD,CACD,EACChB,YAAY,iBACb,IAAAZ,WAAA,CAAAoB,GAAA;MACCS,SAAS,
|
|
1
|
+
{"version":3,"names":["_i18n","require","_blockEditor","_jsxRuntime","arrowMap","none","arrow","chevron","QueryPaginationNextEdit","attributes","label","setAttributes","context","paginationArrow","showLabel","displayArrow","jsxs","href","onClick","event","preventDefault","useBlockProps","children","jsx","PlainText","__experimentalVersion","tagName","__","placeholder","value","onChange","newLabel","className"],"sources":["@wordpress/block-library/src/query-pagination-next/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, PlainText } from '@wordpress/block-editor';\n\nconst arrowMap = {\n\tnone: '',\n\tarrow: '→',\n\tchevron: '»',\n};\n\nexport default function QueryPaginationNextEdit( {\n\tattributes: { label },\n\tsetAttributes,\n\tcontext: { paginationArrow, showLabel },\n} ) {\n\tconst displayArrow = arrowMap[ paginationArrow ];\n\treturn (\n\t\t<a\n\t\t\thref=\"#pagination-next-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t{ ...useBlockProps() }\n\t\t>\n\t\t\t{ showLabel && (\n\t\t\t\t<PlainText\n\t\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\taria-label={ __( 'Next page link' ) }\n\t\t\t\t\tplaceholder={ __( 'Next Page' ) }\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ displayArrow && (\n\t\t\t\t<span\n\t\t\t\t\tclassName={ `wp-block-query-pagination-next-arrow is-arrow-${ paginationArrow }` }\n\t\t\t\t\taria-hidden\n\t\t\t\t>\n\t\t\t\t\t{ displayArrow }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t</a>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAmE,IAAAE,WAAA,GAAAF,OAAA;AAJnE;AACA;AACA;;AAIA,MAAMG,QAAQ,GAAG;EAChBC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,GAAG;EACVC,OAAO,EAAE;AACV,CAAC;AAEc,SAASC,uBAAuBA,CAAE;EAChDC,UAAU,EAAE;IAAEC;EAAM,CAAC;EACrBC,aAAa;EACbC,OAAO,EAAE;IAAEC,eAAe;IAAEC;EAAU;AACvC,CAAC,EAAG;EACH,MAAMC,YAAY,GAAGX,QAAQ,CAAES,eAAe,CAAE;EAChD,oBACC,IAAAV,WAAA,CAAAa,IAAA;IACCC,IAAI,EAAC,8BAA8B;IACnCC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;IAAA,GAC1C,IAAAC,0BAAa,EAAC,CAAC;IAAAC,QAAA,GAElBR,SAAS,iBACV,IAAAX,WAAA,CAAAoB,GAAA,EAACrB,YAAA,CAAAsB,SAAS;MACTC,qBAAqB,EAAG,CAAG;MAC3BC,OAAO,EAAC,MAAM;MACd,cAAa,IAAAC,QAAE,EAAE,gBAAiB,CAAG;MACrCC,WAAW,EAAG,IAAAD,QAAE,EAAE,WAAY,CAAG;MACjCE,KAAK,EAAGnB,KAAO;MACfoB,QAAQ,EAAKC,QAAQ,IACpBpB,aAAa,CAAE;QAAED,KAAK,EAAEqB;MAAS,CAAE;IACnC,CACD,CACD,EACChB,YAAY,iBACb,IAAAZ,WAAA,CAAAoB,GAAA;MACCS,SAAS,EAAG,iDAAkDnB,eAAe,EAAK;MAClF,mBAAW;MAAAS,QAAA,EAETP;IAAY,CACT,CACN;EAAA,CACC,CAAC;AAEN","ignoreList":[]}
|
|
@@ -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","__next40pxDefaultSize","__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__next40pxDefaultSize\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,
|
|
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","__next40pxDefaultSize","__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__next40pxDefaultSize\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"],"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AAC;AAEc,SAASI,0BAA0BA,CAAE;EACnDC,UAAU;EACVC;AACD,CAAC,EAAG;EACH,MAAM;IAAEP;EAAQ,CAAC,GAAGM,UAAU;EAC9B,MAAME,iBAAiB,GAAGT,wBAAwB,CACjDU,QAAQ,CAAET,OAAO,EAAE,EAAG,CACvB,CAAC;EACD,oBACC,IAAAT,WAAA,CAAAmB,IAAA,EAAAnB,WAAA,CAAAa,QAAA;IAAAN,QAAA,gBACC,IAAAP,WAAA,CAAAK,GAAA,EAACP,YAAA,CAAAsB,iBAAiB;MAAAb,QAAA,eACjB,IAAAP,WAAA,CAAAK,GAAA,EAACN,WAAA,CAAAsB,SAAS;QAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,UAAW,CAAG;QAAAhB,QAAA,eACpC,IAAAP,WAAA,CAAAK,GAAA,EAACN,WAAA,CAAAyB,YAAY;UACZC,qBAAqB;UACrBC,uBAAuB;UACvBC,KAAK,EAAG,IAAAJ,QAAE,EAAE,iBAAkB,CAAG;UACjCK,IAAI,EAAG,IAAAL,QAAE,EACR,2IACD,CAAG;UACHM,KAAK,EAAGpB,OAAS;UACjBqB,QAAQ,EAAKD,KAAK,IAAM;YACvBb,aAAa,CAAE;cACdP,OAAO,EAAES,QAAQ,CAAEW,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,IAAAjC,WAAA,CAAAK,GAAA;MAAA,GAAU,IAAA6B,0BAAa,EAAC,CAAC;MAAA3B,QAAA,EAAKU;IAAiB,CAAO,CAAC;EAAA,CACtD,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_blockEditor","_jsxRuntime","arrowMap","none","arrow","chevron","QueryPaginationPreviousEdit","attributes","label","setAttributes","context","paginationArrow","showLabel","displayArrow","jsxs","href","onClick","event","preventDefault","useBlockProps","children","jsx","className","PlainText","__experimentalVersion","tagName","__","placeholder","value","onChange","newLabel"],"sources":["@wordpress/block-library/src/query-pagination-previous/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, PlainText } from '@wordpress/block-editor';\n\nconst arrowMap = {\n\tnone: '',\n\tarrow: '←',\n\tchevron: '«',\n};\n\nexport default function QueryPaginationPreviousEdit( {\n\tattributes: { label },\n\tsetAttributes,\n\tcontext: { paginationArrow, showLabel },\n} ) {\n\tconst displayArrow = arrowMap[ paginationArrow ];\n\treturn (\n\t\t<a\n\t\t\thref=\"#pagination-previous-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t{ ...useBlockProps() }\n\t\t>\n\t\t\t{ displayArrow && (\n\t\t\t\t<span\n\t\t\t\t\tclassName={ `wp-block-query-pagination-previous-arrow is-arrow-${ paginationArrow }` }\n\t\t\t\t\taria-hidden\n\t\t\t\t>\n\t\t\t\t\t{ displayArrow }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t{ showLabel && (\n\t\t\t\t<PlainText\n\t\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\taria-label={ __( 'Previous page link' ) }\n\t\t\t\t\tplaceholder={ __( 'Previous Page' ) }\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</a>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAmE,IAAAE,WAAA,GAAAF,OAAA;AAJnE;AACA;AACA;;AAIA,MAAMG,QAAQ,GAAG;EAChBC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,GAAG;EACVC,OAAO,EAAE;AACV,CAAC;AAEc,SAASC,2BAA2BA,CAAE;EACpDC,UAAU,EAAE;IAAEC;EAAM,CAAC;EACrBC,aAAa;EACbC,OAAO,EAAE;IAAEC,eAAe;IAAEC;EAAU;AACvC,CAAC,EAAG;EACH,MAAMC,YAAY,GAAGX,QAAQ,CAAES,eAAe,CAAE;EAChD,oBACC,IAAAV,WAAA,CAAAa,IAAA;IACCC,IAAI,EAAC,kCAAkC;IACvCC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;IAAA,GAC1C,IAAAC,0BAAa,EAAC,CAAC;IAAAC,QAAA,GAElBP,YAAY,iBACb,IAAAZ,WAAA,CAAAoB,GAAA;MACCC,SAAS,
|
|
1
|
+
{"version":3,"names":["_i18n","require","_blockEditor","_jsxRuntime","arrowMap","none","arrow","chevron","QueryPaginationPreviousEdit","attributes","label","setAttributes","context","paginationArrow","showLabel","displayArrow","jsxs","href","onClick","event","preventDefault","useBlockProps","children","jsx","className","PlainText","__experimentalVersion","tagName","__","placeholder","value","onChange","newLabel"],"sources":["@wordpress/block-library/src/query-pagination-previous/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, PlainText } from '@wordpress/block-editor';\n\nconst arrowMap = {\n\tnone: '',\n\tarrow: '←',\n\tchevron: '«',\n};\n\nexport default function QueryPaginationPreviousEdit( {\n\tattributes: { label },\n\tsetAttributes,\n\tcontext: { paginationArrow, showLabel },\n} ) {\n\tconst displayArrow = arrowMap[ paginationArrow ];\n\treturn (\n\t\t<a\n\t\t\thref=\"#pagination-previous-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t{ ...useBlockProps() }\n\t\t>\n\t\t\t{ displayArrow && (\n\t\t\t\t<span\n\t\t\t\t\tclassName={ `wp-block-query-pagination-previous-arrow is-arrow-${ paginationArrow }` }\n\t\t\t\t\taria-hidden\n\t\t\t\t>\n\t\t\t\t\t{ displayArrow }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t{ showLabel && (\n\t\t\t\t<PlainText\n\t\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\taria-label={ __( 'Previous page link' ) }\n\t\t\t\t\tplaceholder={ __( 'Previous Page' ) }\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</a>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAmE,IAAAE,WAAA,GAAAF,OAAA;AAJnE;AACA;AACA;;AAIA,MAAMG,QAAQ,GAAG;EAChBC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,GAAG;EACVC,OAAO,EAAE;AACV,CAAC;AAEc,SAASC,2BAA2BA,CAAE;EACpDC,UAAU,EAAE;IAAEC;EAAM,CAAC;EACrBC,aAAa;EACbC,OAAO,EAAE;IAAEC,eAAe;IAAEC;EAAU;AACvC,CAAC,EAAG;EACH,MAAMC,YAAY,GAAGX,QAAQ,CAAES,eAAe,CAAE;EAChD,oBACC,IAAAV,WAAA,CAAAa,IAAA;IACCC,IAAI,EAAC,kCAAkC;IACvCC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;IAAA,GAC1C,IAAAC,0BAAa,EAAC,CAAC;IAAAC,QAAA,GAElBP,YAAY,iBACb,IAAAZ,WAAA,CAAAoB,GAAA;MACCC,SAAS,EAAG,qDAAsDX,eAAe,EAAK;MACtF,mBAAW;MAAAS,QAAA,EAETP;IAAY,CACT,CACN,EACCD,SAAS,iBACV,IAAAX,WAAA,CAAAoB,GAAA,EAACrB,YAAA,CAAAuB,SAAS;MACTC,qBAAqB,EAAG,CAAG;MAC3BC,OAAO,EAAC,MAAM;MACd,cAAa,IAAAC,QAAE,EAAE,oBAAqB,CAAG;MACzCC,WAAW,EAAG,IAAAD,QAAE,EAAE,eAAgB,CAAG;MACrCE,KAAK,EAAGpB,KAAO;MACfqB,QAAQ,EAAKC,QAAQ,IACpBrB,aAAa,CAAE;QAAED,KAAK,EAAEsB;MAAS,CAAE;IACnC,CACD,CACD;EAAA,CACC,CAAC;AAEN","ignoreList":[]}
|
|
@@ -59,16 +59,16 @@ function QueryTitleEdit({
|
|
|
59
59
|
if (archiveTypeLabel) {
|
|
60
60
|
if (showPrefix) {
|
|
61
61
|
if (archiveNameLabel) {
|
|
62
|
-
title = (0, _i18n.sprintf)(
|
|
63
|
-
(0, _i18n.
|
|
62
|
+
title = (0, _i18n.sprintf)(/* translators: 1: Archive type title e.g: "Category", 2: Label of the archive e.g: "Shoes" */
|
|
63
|
+
(0, _i18n._x)('%1$s: %2$s', 'archive label'), archiveTypeLabel, archiveNameLabel);
|
|
64
64
|
} else {
|
|
65
|
-
title = (0, _i18n.sprintf)(
|
|
65
|
+
title = (0, _i18n.sprintf)(/* translators: %s: Archive type title e.g: "Category", "Tag"... */
|
|
66
66
|
(0, _i18n.__)('%s: Name'), archiveTypeLabel);
|
|
67
67
|
}
|
|
68
68
|
} else if (archiveNameLabel) {
|
|
69
69
|
title = archiveNameLabel;
|
|
70
70
|
} else {
|
|
71
|
-
title = (0, _i18n.sprintf)(
|
|
71
|
+
title = (0, _i18n.sprintf)(/* translators: %s: Archive type title e.g: "Category", "Tag"... */
|
|
72
72
|
(0, _i18n.__)('%s name'), archiveTypeLabel);
|
|
73
73
|
}
|
|
74
74
|
} else {
|
|
@@ -1 +1 @@
|
|
|
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\
|
|
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","_x","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 { __, _x, 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_x( '%1$s: %2$s', 'archive label' ),\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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4B,QAAQ,EAAKS,SAAS,IAAM;UAC3BlC,aAAa,CAAE;YAAEH,SAAS,EAAEqC;UAAU,CAAE,CAAC;QAC1C;MAAG,CACH,CAAC;IAAA,CACY,CAAC,EACdpB,YAAY;EAAA,CACb,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blocks","_blockEditor","_jsxRuntime","migrateToQuoteV2","attributes","value","restAttributes","parseWithAttributeSchema","type","source","selector","query","content","map","createBlock","exports","TEXT_ALIGN_OPTIONS","migrateTextAlign","innerBlocks","align","rest","migratedAttributes","includes","textAlign","migrateLargeStyle","className","v4","multiline","default","role","citation","supports","anchor","html","__experimentalOnEnter","__experimentalOnMerge","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","fontAppearance","color","gradients","heading","link","background","text","isEligible","save","clsx","jsxs","useBlockProps","children","jsx","InnerBlocks","Content","RichText","isEmpty","tagName","migrate","v3","__experimentalSlashInserter","v2","style","v1","v0","isNaN","parseInt","_default"],"sources":["@wordpress/block-library/src/quote/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createBlock, parseWithAttributeSchema } from '@wordpress/blocks';\nimport { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport const migrateToQuoteV2 = ( attributes ) => {\n\tconst { value, ...restAttributes } = attributes;\n\n\treturn [\n\t\t{\n\t\t\t...restAttributes,\n\t\t},\n\t\tvalue\n\t\t\t? parseWithAttributeSchema( value, {\n\t\t\t\t\ttype: 'array',\n\t\t\t\t\tsource: 'query',\n\t\t\t\t\tselector: 'p',\n\t\t\t\t\tquery: {\n\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tsource: 'html',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t } ).map( ( { content } ) =>\n\t\t\t\t\tcreateBlock( 'core/paragraph', { content } )\n\t\t\t )\n\t\t\t: createBlock( 'core/paragraph' ),\n\t];\n};\n\nconst TEXT_ALIGN_OPTIONS = [ 'left', 'right', 'center' ];\n\n// Migrate existing text alignment settings to the renamed attribute.\nconst migrateTextAlign = ( attributes, innerBlocks ) => {\n\tconst { align, ...rest } = attributes;\n\t// Check if there are valid alignments stored in the old attribute\n\t// and assign them to the new attribute name.\n\tconst migratedAttributes = TEXT_ALIGN_OPTIONS.includes( align )\n\t\t? { ...rest, textAlign: align }\n\t\t: attributes;\n\n\treturn [ migratedAttributes, innerBlocks ];\n};\n\n// Migrate the v2 blocks with style === `2`;\nconst migrateLargeStyle = ( attributes, innerBlocks ) => {\n\treturn [\n\t\t{\n\t\t\t...attributes,\n\t\t\tclassName: attributes.className\n\t\t\t\t? attributes.className + ' is-style-large'\n\t\t\t\t: 'is-style-large',\n\t\t},\n\t\tinnerBlocks,\n\t];\n};\n\n// Version before the 'align' attribute was replaced with 'textAlign'.\nconst v4 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\tdefault: '',\n\t\t\trole: 'content',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t\trole: 'content',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\thtml: false,\n\t\t__experimentalOnEnter: true,\n\t\t__experimentalOnMerge: true,\n\t\ttypography: {\n\t\t\tfontSize: true,\n\t\t\tlineHeight: true,\n\t\t\t__experimentalFontFamily: true,\n\t\t\t__experimentalFontWeight: true,\n\t\t\t__experimentalFontStyle: true,\n\t\t\t__experimentalTextTransform: true,\n\t\t\t__experimentalTextDecoration: true,\n\t\t\t__experimentalLetterSpacing: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tfontSize: true,\n\t\t\t\tfontAppearance: true,\n\t\t\t},\n\t\t},\n\t\tcolor: {\n\t\t\tgradients: true,\n\t\t\theading: true,\n\t\t\tlink: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t},\n\t\t},\n\t},\n\tisEligible: ( { align } ) => TEXT_ALIGN_OPTIONS.includes( align ),\n\tsave( { attributes } ) {\n\t\tconst { align, citation } = attributes;\n\t\tconst className = clsx( {\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} );\n\t\treturn (\n\t\t\t<blockquote { ...useBlockProps.save( { className } ) }>\n\t\t\t\t<InnerBlocks.Content />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate: migrateTextAlign,\n};\n\nconst v3 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\tdefault: '',\n\t\t\trole: 'content',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t\trole: 'content',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\t__experimentalSlashInserter: true,\n\t\ttypography: {\n\t\t\tfontSize: true,\n\t\t\tlineHeight: true,\n\t\t\t__experimentalFontStyle: true,\n\t\t\t__experimentalFontWeight: true,\n\t\t\t__experimentalLetterSpacing: true,\n\t\t\t__experimentalTextTransform: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tfontSize: true,\n\t\t\t\tfontAppearance: true,\n\t\t\t},\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { align, value, citation } = attributes;\n\n\t\tconst className = clsx( {\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} );\n\n\t\treturn (\n\t\t\t<blockquote { ...useBlockProps.save( { className } ) }>\n\t\t\t\t<RichText.Content multiline value={ value } />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate( attributes ) {\n\t\treturn migrateTextAlign( ...migrateToQuoteV2( attributes ) );\n\t},\n};\n\nconst v2 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\tdefault: '',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tmigrate( attributes ) {\n\t\treturn migrateTextAlign( ...migrateToQuoteV2( attributes ) );\n\t},\n\tsave( { attributes } ) {\n\t\tconst { align, value, citation } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote style={ { textAlign: align ? align : null } }>\n\t\t\t\t<RichText.Content multiline value={ value } />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n};\n\nconst v1 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\tdefault: '',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tstyle: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 1,\n\t\t},\n\t},\n\n\tmigrate( attributes ) {\n\t\tif ( attributes.style === 2 ) {\n\t\t\tconst { style, ...restAttributes } = attributes;\n\t\t\treturn migrateTextAlign(\n\t\t\t\t...migrateLargeStyle( ...migrateToQuoteV2( restAttributes ) )\n\t\t\t);\n\t\t}\n\n\t\treturn migrateTextAlign( ...migrateToQuoteV2( attributes ) );\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst { align, value, citation, style } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote\n\t\t\t\tclassName={ style === 2 ? 'is-large' : '' }\n\t\t\t\tstyle={ { textAlign: align ? align : null } }\n\t\t\t>\n\t\t\t\t<RichText.Content multiline value={ value } />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n};\n\nconst v0 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\tdefault: '',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'footer',\n\t\t\tdefault: '',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tstyle: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 1,\n\t\t},\n\t},\n\n\tmigrate( attributes ) {\n\t\tif ( ! isNaN( parseInt( attributes.style ) ) ) {\n\t\t\tconst { style, ...restAttributes } = attributes;\n\t\t\treturn migrateTextAlign( ...migrateToQuoteV2( restAttributes ) );\n\t\t}\n\n\t\treturn migrateTextAlign( ...migrateToQuoteV2( attributes ) );\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst { align, value, citation, style } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote\n\t\t\t\tclassName={ `blocks-quote-style-${ style }` }\n\t\t\t\tstyle={ { textAlign: align ? align : null } }\n\t\t\t>\n\t\t\t\t<RichText.Content multiline value={ value } />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"footer\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n};\n\n/**\n * New deprecations need to be placed first\n * for them to have higher priority.\n *\n * Old deprecations may need to be updated as well.\n *\n * See block-deprecation.md\n */\nexport default [ v4, v3, v2, v1, v0 ];\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAA+E,IAAAG,WAAA,GAAAH,OAAA;AAT/E;AACA;AACA;;AAGA;AACA;AACA;;AAIO,MAAMI,gBAAgB,GAAKC,UAAU,IAAM;EACjD,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAe,CAAC,GAAGF,UAAU;EAE/C,OAAO,CACN;IACC,GAAGE;EACJ,CAAC,EACDD,KAAK,GACF,IAAAE,gCAAwB,EAAEF,KAAK,EAAE;IACjCG,IAAI,EAAE,OAAO;IACbC,MAAM,EAAE,OAAO;IACfC,QAAQ,EAAE,GAAG;IACbC,KAAK,EAAE;MACNC,OAAO,EAAE;QACRJ,IAAI,EAAE,QAAQ;QACdC,MAAM,EAAE;MACT;IACD;EACA,CAAE,CAAC,CAACI,GAAG,CAAE,CAAE;IAAED;EAAQ,CAAC,KACtB,IAAAE,mBAAW,EAAE,gBAAgB,EAAE;IAAEF;EAAQ,CAAE,CAC3C,CAAC,GACD,IAAAE,mBAAW,EAAE,gBAAiB,CAAC,CAClC;AACF,CAAC;AAACC,OAAA,CAAAZ,gBAAA,GAAAA,gBAAA;AAEF,MAAMa,kBAAkB,G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,CAAEC,UAAW,CAAE,CAAC;EAC7D,CAAC;EAEDkD,IAAIA,CAAE;IAAElD;EAAW,CAAC,EAAG;IACtB,MAAM;MAAEe,KAAK;MAAEd,KAAK;MAAEyB,QAAQ;MAAEuC;IAAM,CAAC,GAAGjE,UAAU;IAEpD,oBACC,IAAAF,WAAA,CAAAsD,IAAA;MACC/B,SAAS,EAAI,sBAAsB4C,KAAO,EAAG;MAC7CA,KAAK,EAAG;QAAE9C,SAAS,EAAEJ,KAAK,GAAGA,KAAK,GAAG;MAAK,CAAG;MAAAuC,QAAA,gBAE7C,IAAAxD,WAAA,CAAAyD,GAAA,EAAC1D,YAAA,CAAA6D,QAAQ,CAACD,OAAO;QAAClC,SAAS;QAACtB,KAAK,EAAGA;MAAO,CAAE,CAAC,EAC5C,CAAEyD,qBAAQ,CAACC,OAAO,CAAEjC,QAAS,CAAC,iBAC/B,IAAA5B,WAAA,CAAAyD,GAAA,EAAC1D,YAAA,CAAA6D,QAAQ,CAACD,OAAO;QAACG,OAAO,EAAC,QAAQ;QAAC3D,KAAK,EAAGyB;MAAU,CAAE,CACvD;IAAA,CACU,CAAC;EAEf;AACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IAAA4C,QAAA,GAAA3D,OAAA,CAAAa,OAAA,GAQe,CAAEF,EAAE,EAAEwC,EAAE,EAAEE,EAAE,EAAEE,EAAE,EAAEC,EAAE,CAAE","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blocks","_blockEditor","_jsxRuntime","migrateToQuoteV2","attributes","value","restAttributes","parseWithAttributeSchema","type","source","selector","query","content","map","createBlock","exports","TEXT_ALIGN_OPTIONS","migrateTextAlign","innerBlocks","align","rest","migratedAttributes","includes","textAlign","migrateLargeStyle","className","v4","multiline","default","role","citation","supports","anchor","html","__experimentalOnEnter","__experimentalOnMerge","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","fontAppearance","color","gradients","heading","link","background","text","isEligible","save","clsx","jsxs","useBlockProps","children","jsx","InnerBlocks","Content","RichText","isEmpty","tagName","migrate","v3","__experimentalSlashInserter","v2","style","v1","v0","isNaN","parseInt","_default"],"sources":["@wordpress/block-library/src/quote/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createBlock, parseWithAttributeSchema } from '@wordpress/blocks';\nimport { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport const migrateToQuoteV2 = ( attributes ) => {\n\tconst { value, ...restAttributes } = attributes;\n\n\treturn [\n\t\t{\n\t\t\t...restAttributes,\n\t\t},\n\t\tvalue\n\t\t\t? parseWithAttributeSchema( value, {\n\t\t\t\t\ttype: 'array',\n\t\t\t\t\tsource: 'query',\n\t\t\t\t\tselector: 'p',\n\t\t\t\t\tquery: {\n\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tsource: 'html',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t } ).map( ( { content } ) =>\n\t\t\t\t\tcreateBlock( 'core/paragraph', { content } )\n\t\t\t )\n\t\t\t: createBlock( 'core/paragraph' ),\n\t];\n};\n\nconst TEXT_ALIGN_OPTIONS = [ 'left', 'right', 'center' ];\n\n// Migrate existing text alignment settings to the renamed attribute.\nconst migrateTextAlign = ( attributes, innerBlocks ) => {\n\tconst { align, ...rest } = attributes;\n\t// Check if there are valid alignments stored in the old attribute\n\t// and assign them to the new attribute name.\n\tconst migratedAttributes = TEXT_ALIGN_OPTIONS.includes( align )\n\t\t? { ...rest, textAlign: align }\n\t\t: attributes;\n\n\treturn [ migratedAttributes, innerBlocks ];\n};\n\n// Migrate the v2 blocks with style === `2`;\nconst migrateLargeStyle = ( attributes, innerBlocks ) => {\n\treturn [\n\t\t{\n\t\t\t...attributes,\n\t\t\tclassName: attributes.className\n\t\t\t\t? attributes.className + ' is-style-large'\n\t\t\t\t: 'is-style-large',\n\t\t},\n\t\tinnerBlocks,\n\t];\n};\n\n// Version before the 'align' attribute was replaced with 'textAlign'.\nconst v4 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\tdefault: '',\n\t\t\trole: 'content',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t\trole: 'content',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\thtml: false,\n\t\t__experimentalOnEnter: true,\n\t\t__experimentalOnMerge: true,\n\t\ttypography: {\n\t\t\tfontSize: true,\n\t\t\tlineHeight: true,\n\t\t\t__experimentalFontFamily: true,\n\t\t\t__experimentalFontWeight: true,\n\t\t\t__experimentalFontStyle: true,\n\t\t\t__experimentalTextTransform: true,\n\t\t\t__experimentalTextDecoration: true,\n\t\t\t__experimentalLetterSpacing: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tfontSize: true,\n\t\t\t\tfontAppearance: true,\n\t\t\t},\n\t\t},\n\t\tcolor: {\n\t\t\tgradients: true,\n\t\t\theading: true,\n\t\t\tlink: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t},\n\t\t},\n\t},\n\tisEligible: ( { align } ) => TEXT_ALIGN_OPTIONS.includes( align ),\n\tsave( { attributes } ) {\n\t\tconst { align, citation } = attributes;\n\t\tconst className = clsx( {\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} );\n\t\treturn (\n\t\t\t<blockquote { ...useBlockProps.save( { className } ) }>\n\t\t\t\t<InnerBlocks.Content />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate: migrateTextAlign,\n};\n\nconst v3 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\tdefault: '',\n\t\t\trole: 'content',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t\trole: 'content',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\t__experimentalSlashInserter: true,\n\t\ttypography: {\n\t\t\tfontSize: true,\n\t\t\tlineHeight: true,\n\t\t\t__experimentalFontStyle: true,\n\t\t\t__experimentalFontWeight: true,\n\t\t\t__experimentalLetterSpacing: true,\n\t\t\t__experimentalTextTransform: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tfontSize: true,\n\t\t\t\tfontAppearance: true,\n\t\t\t},\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { align, value, citation } = attributes;\n\n\t\tconst className = clsx( {\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} );\n\n\t\treturn (\n\t\t\t<blockquote { ...useBlockProps.save( { className } ) }>\n\t\t\t\t<RichText.Content multiline value={ value } />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate( attributes ) {\n\t\treturn migrateTextAlign( ...migrateToQuoteV2( attributes ) );\n\t},\n};\n\nconst v2 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\tdefault: '',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tmigrate( attributes ) {\n\t\treturn migrateTextAlign( ...migrateToQuoteV2( attributes ) );\n\t},\n\tsave( { attributes } ) {\n\t\tconst { align, value, citation } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote style={ { textAlign: align ? align : null } }>\n\t\t\t\t<RichText.Content multiline value={ value } />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n};\n\nconst v1 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\tdefault: '',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tstyle: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 1,\n\t\t},\n\t},\n\n\tmigrate( attributes ) {\n\t\tif ( attributes.style === 2 ) {\n\t\t\tconst { style, ...restAttributes } = attributes;\n\t\t\treturn migrateTextAlign(\n\t\t\t\t...migrateLargeStyle( ...migrateToQuoteV2( restAttributes ) )\n\t\t\t);\n\t\t}\n\n\t\treturn migrateTextAlign( ...migrateToQuoteV2( attributes ) );\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst { align, value, citation, style } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote\n\t\t\t\tclassName={ style === 2 ? 'is-large' : '' }\n\t\t\t\tstyle={ { textAlign: align ? align : null } }\n\t\t\t>\n\t\t\t\t<RichText.Content multiline value={ value } />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n};\n\nconst v0 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\tdefault: '',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'footer',\n\t\t\tdefault: '',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tstyle: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 1,\n\t\t},\n\t},\n\n\tmigrate( attributes ) {\n\t\tif ( ! isNaN( parseInt( attributes.style ) ) ) {\n\t\t\tconst { style, ...restAttributes } = attributes;\n\t\t\treturn migrateTextAlign( ...migrateToQuoteV2( restAttributes ) );\n\t\t}\n\n\t\treturn migrateTextAlign( ...migrateToQuoteV2( attributes ) );\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst { align, value, citation, style } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote\n\t\t\t\tclassName={ `blocks-quote-style-${ style }` }\n\t\t\t\tstyle={ { textAlign: align ? align : null } }\n\t\t\t>\n\t\t\t\t<RichText.Content multiline value={ value } />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"footer\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n};\n\n/**\n * New deprecations need to be placed first\n * for them to have higher priority.\n *\n * Old deprecations may need to be updated as well.\n *\n * See block-deprecation.md\n */\nexport default [ v4, v3, v2, v1, v0 ];\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAA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