@wordpress/block-library 9.17.0 → 9.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/archives/index.js +9 -0
- package/build/archives/index.js.map +1 -1
- package/build/avatar/user-control.js +0 -1
- package/build/avatar/user-control.js.map +1 -1
- package/build/block/deprecated.js +0 -1
- package/build/block/deprecated.js.map +1 -1
- package/build/block/edit.js +0 -1
- package/build/block/edit.js.map +1 -1
- package/build/button/deprecated.js +0 -1
- package/build/button/deprecated.js.map +1 -1
- package/build/buttons/transforms.js +0 -1
- package/build/buttons/transforms.js.map +1 -1
- package/build/categories/edit.js +0 -1
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +9 -0
- package/build/categories/index.js.map +1 -1
- package/build/column/column-preview.native.js +0 -1
- package/build/column/column-preview.native.js.map +1 -1
- package/build/columns/columnCalculations.native.js +0 -1
- package/build/columns/columnCalculations.native.js.map +1 -1
- package/build/columns/deprecated.js +0 -1
- package/build/columns/deprecated.js.map +1 -1
- package/build/columns/edit.js +0 -1
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +0 -1
- package/build/columns/edit.native.js.map +1 -1
- package/build/columns/transforms.js +0 -1
- package/build/columns/transforms.js.map +1 -1
- package/build/columns/utils.js +0 -1
- package/build/columns/utils.js.map +1 -1
- package/build/comment-template/edit.js +0 -1
- package/build/comment-template/edit.js.map +1 -1
- package/build/comment-template/hooks.js +0 -1
- package/build/comment-template/hooks.js.map +1 -1
- package/build/comment-template/util.js +0 -1
- package/build/comment-template/util.js.map +1 -1
- package/build/details/transforms.js +0 -1
- package/build/details/transforms.js.map +1 -1
- package/build/embed/embed-placeholder.native.js +0 -1
- package/build/embed/embed-placeholder.native.js.map +1 -1
- package/build/embed/util.js +0 -1
- package/build/embed/util.js.map +1 -1
- package/build/embed/variations.js +0 -1
- package/build/embed/variations.js.map +1 -1
- package/build/embed/wp-embed-preview.js +0 -1
- package/build/embed/wp-embed-preview.js.map +1 -1
- package/build/file/transforms.js +0 -1
- package/build/file/transforms.js.map +1 -1
- package/build/footnotes/edit.js +0 -1
- package/build/footnotes/edit.js.map +1 -1
- package/build/freeform/modal.js +0 -1
- package/build/freeform/modal.js.map +1 -1
- package/build/gallery/deprecated.js +0 -1
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +0 -1
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/shared.js +0 -1
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/transforms.js +0 -1
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/use-get-media.js +0 -1
- package/build/gallery/use-get-media.js.map +1 -1
- package/build/gallery/use-get-media.native.js +0 -1
- package/build/gallery/use-get-media.native.js.map +1 -1
- package/build/gallery/use-get-new-images.js +0 -1
- package/build/gallery/use-get-new-images.js.map +1 -1
- package/build/gallery/use-image-sizes.js +0 -1
- package/build/gallery/use-image-sizes.js.map +1 -1
- package/build/group/placeholder.js +0 -1
- package/build/group/placeholder.js.map +1 -1
- package/build/group/transforms.js +0 -1
- package/build/group/transforms.js.map +1 -1
- package/build/heading/transforms.js +0 -1
- package/build/heading/transforms.js.map +1 -1
- package/build/html/preview.js +0 -1
- package/build/html/preview.js.map +1 -1
- package/build/image/edit.js +0 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +0 -1
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +0 -1
- package/build/image/image.js.map +1 -1
- package/build/image/transforms.js +0 -1
- package/build/image/transforms.js.map +1 -1
- package/build/image/utils.js +0 -1
- package/build/image/utils.js.map +1 -1
- package/build/index.native.js +0 -1
- package/build/index.native.js.map +1 -1
- package/build/latest-posts/edit.js +0 -1
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/transforms.js +0 -1
- package/build/list/transforms.js.map +1 -1
- package/build/list/utils.js +0 -1
- package/build/list/utils.js.map +1 -1
- package/build/list-item/hooks/use-indent-list-item.js +0 -1
- package/build/list-item/hooks/use-indent-list-item.js.map +1 -1
- package/build/list-item/transforms.js +0 -1
- package/build/list-item/transforms.js.map +1 -1
- package/build/media-text/edit.js +0 -1
- package/build/media-text/edit.js.map +1 -1
- package/build/more/save.js +0 -1
- package/build/more/save.js.map +1 -1
- package/build/navigation/deprecated.js +0 -1
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/index.js +0 -1
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/use-generate-default-navigation-title.js +0 -1
- package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +0 -1
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation/use-template-part-area-label.js +0 -1
- package/build/navigation/use-template-part-area-label.js.map +1 -1
- package/build/navigation/view.js +0 -1
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-link/hooks.js +0 -1
- package/build/navigation-link/hooks.js.map +1 -1
- package/build/page-list/edit.js +0 -1
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/use-convert-to-navigation-links.js +0 -1
- package/build/page-list/use-convert-to-navigation-links.js.map +1 -1
- package/build/pattern/edit.js +0 -1
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js +0 -1
- package/build/post-author/edit.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +2 -39
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +45 -3
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-navigation-link/edit.js +0 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-navigation-link/variations.js +0 -1
- package/build/post-navigation-link/variations.js.map +1 -1
- package/build/post-template/edit.js +14 -7
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +0 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/hooks.js +0 -1
- package/build/post-terms/hooks.js.map +1 -1
- package/build/pullquote/blockquote.native.js +0 -1
- package/build/pullquote/blockquote.native.js.map +1 -1
- package/build/pullquote/transforms.js +0 -1
- package/build/pullquote/transforms.js.map +1 -1
- package/build/query/deprecated.js +0 -1
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +0 -1
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/format-controls.js +0 -1
- package/build/query/edit/inspector-controls/format-controls.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +0 -1
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +0 -1
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/inspector-controls/sticky-control.js +3 -0
- package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +0 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/utils.js +0 -1
- package/build/query/utils.js.map +1 -1
- package/build/query-title/variations.js +0 -1
- package/build/query-title/variations.js.map +1 -1
- package/build/quote/deprecated.js +0 -1
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/transforms.js +0 -1
- package/build/quote/transforms.js.map +1 -1
- package/build/rss/edit.js +15 -1
- package/build/rss/edit.js.map +1 -1
- package/build/rss/index.js +14 -0
- package/build/rss/index.js.map +1 -1
- package/build/social-link/icons/discord.js +23 -0
- package/build/social-link/icons/discord.js.map +1 -0
- package/build/social-link/icons/index.js +11 -0
- package/build/social-link/icons/index.js.map +1 -1
- package/build/social-link/social-list.js +0 -1
- package/build/social-link/social-list.js.map +1 -1
- package/build/social-link/variations.js +7 -1
- package/build/social-link/variations.js.map +1 -1
- package/build/social-links/edit.js +0 -1
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/edit.native.js +0 -1
- package/build/social-links/edit.native.js.map +1 -1
- package/build/spacer/controls.js +0 -1
- package/build/spacer/controls.js.map +1 -1
- package/build/table/deprecated.js +0 -1
- 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 +0 -1
- package/build/table/save.js.map +1 -1
- package/build/table/state.js +0 -1
- package/build/table/state.js.map +1 -1
- package/build/table/transforms.js +0 -1
- package/build/table/transforms.js.map +1 -1
- package/build/table-of-contents/list.js +0 -1
- package/build/table-of-contents/list.js.map +1 -1
- package/build/table-of-contents/utils.js +0 -1
- package/build/table-of-contents/utils.js.map +1 -1
- package/build/tag-cloud/edit.js +0 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +0 -1
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/import-controls.js +0 -1
- package/build/template-part/edit/import-controls.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +0 -1
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/utils/hooks.js +0 -1
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build/template-part/edit/utils/transformers.js +0 -1
- package/build/template-part/edit/utils/transformers.js.map +1 -1
- package/build/template-part/variations.js +0 -1
- package/build/template-part/variations.js.map +1 -1
- package/build/text-columns/edit.js +0 -1
- package/build/text-columns/edit.js.map +1 -1
- package/build/text-columns/save.js +0 -1
- package/build/text-columns/save.js.map +1 -1
- package/build/text-columns/transforms.js +0 -1
- package/build/text-columns/transforms.js.map +1 -1
- package/build/utils/get-transformed-metadata.js +0 -1
- package/build/utils/get-transformed-metadata.js.map +1 -1
- package/build/utils/search-patterns.js +0 -1
- package/build/utils/search-patterns.js.map +1 -1
- package/build/utils/transformation-categories.native.js +0 -1
- package/build/utils/transformation-categories.native.js.map +1 -1
- package/build/video/tracks-editor.js +0 -1
- package/build/video/tracks-editor.js.map +1 -1
- package/build/video/tracks.js +0 -1
- package/build/video/tracks.js.map +1 -1
- package/build-module/archives/index.js +9 -0
- package/build-module/archives/index.js.map +1 -1
- package/build-module/avatar/user-control.js +0 -1
- package/build-module/avatar/user-control.js.map +1 -1
- package/build-module/block/deprecated.js +0 -1
- package/build-module/block/deprecated.js.map +1 -1
- package/build-module/block/edit.js +0 -1
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/deprecated.js +0 -1
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/buttons/transforms.js +0 -1
- package/build-module/buttons/transforms.js.map +1 -1
- package/build-module/categories/edit.js +0 -1
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +9 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/column/column-preview.native.js +0 -1
- package/build-module/column/column-preview.native.js.map +1 -1
- package/build-module/columns/columnCalculations.native.js +0 -1
- package/build-module/columns/columnCalculations.native.js.map +1 -1
- package/build-module/columns/deprecated.js +0 -1
- package/build-module/columns/deprecated.js.map +1 -1
- package/build-module/columns/edit.js +0 -1
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +0 -1
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/columns/transforms.js +0 -1
- package/build-module/columns/transforms.js.map +1 -1
- package/build-module/columns/utils.js +0 -1
- package/build-module/columns/utils.js.map +1 -1
- package/build-module/comment-template/edit.js +0 -1
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/hooks.js +0 -1
- package/build-module/comment-template/hooks.js.map +1 -1
- package/build-module/comment-template/util.js +0 -1
- package/build-module/comment-template/util.js.map +1 -1
- package/build-module/details/transforms.js +0 -1
- package/build-module/details/transforms.js.map +1 -1
- package/build-module/embed/embed-placeholder.native.js +0 -1
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/embed/util.js +0 -1
- package/build-module/embed/util.js.map +1 -1
- package/build-module/embed/variations.js +0 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/embed/wp-embed-preview.js +0 -1
- package/build-module/embed/wp-embed-preview.js.map +1 -1
- package/build-module/file/transforms.js +0 -1
- package/build-module/file/transforms.js.map +1 -1
- package/build-module/footnotes/edit.js +0 -1
- package/build-module/footnotes/edit.js.map +1 -1
- package/build-module/freeform/modal.js +0 -1
- package/build-module/freeform/modal.js.map +1 -1
- package/build-module/gallery/deprecated.js +0 -1
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +0 -1
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/shared.js +0 -1
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/transforms.js +0 -1
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/use-get-media.js +0 -1
- package/build-module/gallery/use-get-media.js.map +1 -1
- package/build-module/gallery/use-get-media.native.js +0 -1
- package/build-module/gallery/use-get-media.native.js.map +1 -1
- package/build-module/gallery/use-get-new-images.js +0 -1
- package/build-module/gallery/use-get-new-images.js.map +1 -1
- package/build-module/gallery/use-image-sizes.js +0 -1
- package/build-module/gallery/use-image-sizes.js.map +1 -1
- package/build-module/group/placeholder.js +0 -1
- package/build-module/group/placeholder.js.map +1 -1
- package/build-module/group/transforms.js +0 -1
- package/build-module/group/transforms.js.map +1 -1
- package/build-module/heading/transforms.js +0 -1
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/html/preview.js +0 -1
- package/build-module/html/preview.js.map +1 -1
- package/build-module/image/edit.js +0 -1
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +0 -1
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +0 -1
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/transforms.js +0 -1
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/image/utils.js +0 -1
- package/build-module/image/utils.js.map +1 -1
- package/build-module/index.native.js +0 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/latest-posts/edit.js +0 -1
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/transforms.js +0 -1
- package/build-module/list/transforms.js.map +1 -1
- package/build-module/list/utils.js +0 -1
- package/build-module/list/utils.js.map +1 -1
- package/build-module/list-item/hooks/use-indent-list-item.js +0 -1
- package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -1
- package/build-module/list-item/transforms.js +0 -1
- package/build-module/list-item/transforms.js.map +1 -1
- package/build-module/media-text/edit.js +0 -1
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/more/save.js +0 -1
- package/build-module/more/save.js.map +1 -1
- package/build-module/navigation/deprecated.js +0 -1
- package/build-module/navigation/deprecated.js.map +1 -1
- package/build-module/navigation/edit/index.js +0 -1
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/use-generate-default-navigation-title.js +0 -1
- package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +0 -1
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation/use-template-part-area-label.js +0 -1
- package/build-module/navigation/use-template-part-area-label.js.map +1 -1
- package/build-module/navigation/view.js +0 -1
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-link/hooks.js +0 -1
- package/build-module/navigation-link/hooks.js.map +1 -1
- package/build-module/page-list/edit.js +0 -1
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/use-convert-to-navigation-links.js +0 -1
- package/build-module/page-list/use-convert-to-navigation-links.js.map +1 -1
- package/build-module/pattern/edit.js +0 -1
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/post-author/edit.js +0 -1
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +3 -40
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +46 -4
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +0 -1
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-navigation-link/variations.js +0 -1
- package/build-module/post-navigation-link/variations.js.map +1 -1
- package/build-module/post-template/edit.js +14 -7
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +0 -1
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/hooks.js +0 -1
- package/build-module/post-terms/hooks.js.map +1 -1
- package/build-module/pullquote/blockquote.native.js +0 -1
- package/build-module/pullquote/blockquote.native.js.map +1 -1
- package/build-module/pullquote/transforms.js +0 -1
- package/build-module/pullquote/transforms.js.map +1 -1
- package/build-module/query/deprecated.js +0 -1
- package/build-module/query/deprecated.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +0 -1
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/format-controls.js +0 -1
- package/build-module/query/edit/inspector-controls/format-controls.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +0 -1
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +0 -1
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/sticky-control.js +3 -0
- package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +0 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/utils.js +0 -1
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query-title/variations.js +0 -1
- package/build-module/query-title/variations.js.map +1 -1
- package/build-module/quote/deprecated.js +0 -1
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/transforms.js +0 -1
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/rss/edit.js +15 -1
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/rss/index.js +14 -0
- package/build-module/rss/index.js.map +1 -1
- package/build-module/social-link/icons/discord.js +15 -0
- package/build-module/social-link/icons/discord.js.map +1 -0
- package/build-module/social-link/icons/index.js +1 -0
- package/build-module/social-link/icons/index.js.map +1 -1
- package/build-module/social-link/social-list.js +0 -1
- package/build-module/social-link/social-list.js.map +1 -1
- package/build-module/social-link/variations.js +8 -2
- package/build-module/social-link/variations.js.map +1 -1
- package/build-module/social-links/edit.js +0 -1
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/edit.native.js +0 -1
- package/build-module/social-links/edit.native.js.map +1 -1
- package/build-module/spacer/controls.js +0 -1
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/table/deprecated.js +0 -1
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/edit.js +0 -1
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/save.js +0 -1
- package/build-module/table/save.js.map +1 -1
- package/build-module/table/state.js +0 -1
- package/build-module/table/state.js.map +1 -1
- package/build-module/table/transforms.js +0 -1
- package/build-module/table/transforms.js.map +1 -1
- package/build-module/table-of-contents/list.js +0 -1
- package/build-module/table-of-contents/list.js.map +1 -1
- package/build-module/table-of-contents/utils.js +0 -1
- package/build-module/table-of-contents/utils.js.map +1 -1
- package/build-module/tag-cloud/edit.js +0 -1
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +0 -1
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/import-controls.js +0 -1
- package/build-module/template-part/edit/import-controls.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +0 -1
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/hooks.js +0 -1
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/template-part/edit/utils/transformers.js +0 -1
- package/build-module/template-part/edit/utils/transformers.js.map +1 -1
- package/build-module/template-part/variations.js +0 -1
- package/build-module/template-part/variations.js.map +1 -1
- package/build-module/text-columns/edit.js +0 -1
- package/build-module/text-columns/edit.js.map +1 -1
- package/build-module/text-columns/save.js +0 -1
- package/build-module/text-columns/save.js.map +1 -1
- package/build-module/text-columns/transforms.js +0 -1
- package/build-module/text-columns/transforms.js.map +1 -1
- package/build-module/utils/get-transformed-metadata.js +0 -1
- package/build-module/utils/get-transformed-metadata.js.map +1 -1
- package/build-module/utils/search-patterns.js +0 -1
- package/build-module/utils/search-patterns.js.map +1 -1
- package/build-module/utils/transformation-categories.native.js +0 -1
- package/build-module/utils/transformation-categories.native.js.map +1 -1
- package/build-module/video/tracks-editor.js +0 -1
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-module/video/tracks.js +0 -1
- package/build-module/video/tracks.js.map +1 -1
- package/build-style/editor-rtl.css +10 -7
- package/build-style/editor.css +10 -7
- package/build-style/navigation-link/editor-rtl.css +1 -1
- package/build-style/navigation-link/editor.css +1 -1
- package/build-style/rss/editor-rtl.css +6 -0
- package/build-style/rss/editor.css +6 -0
- package/build-style/rss/style-rtl.css +6 -8
- package/build-style/rss/style.css +6 -8
- package/build-style/social-links/editor-rtl.css +3 -6
- package/build-style/social-links/editor.css +3 -6
- package/build-style/social-links/style-rtl.css +7 -0
- package/build-style/social-links/style.css +7 -0
- package/build-style/style-rtl.css +13 -8
- package/build-style/style.css +13 -8
- package/package.json +35 -35
- package/src/archives/block.json +9 -0
- package/src/block/index.php +1 -18
- package/src/categories/block.json +9 -0
- package/src/navigation/index.php +11 -69
- package/src/navigation-link/editor.scss +1 -1
- package/src/post-content/index.php +0 -23
- package/src/post-featured-image/dimension-controls.js +2 -43
- package/src/post-featured-image/edit.js +39 -3
- package/src/post-template/edit.js +15 -6
- package/src/query/edit/inspector-controls/sticky-control.js +1 -0
- package/src/rss/block.json +14 -0
- package/src/rss/edit.js +14 -1
- package/src/rss/editor.scss +7 -0
- package/src/rss/style.scss +6 -8
- package/src/social-link/icons/discord.js +10 -0
- package/src/social-link/icons/index.js +1 -0
- package/src/social-link/index.php +4 -0
- package/src/social-link/socials-with-bg.scss +5 -0
- package/src/social-link/socials-without-bg.scss +4 -0
- package/src/social-link/variations.js +7 -0
- package/src/social-links/editor.scss +4 -1
|
@@ -19,6 +19,7 @@ var _dimensionControls = _interopRequireDefault(require("./dimension-controls"))
|
|
|
19
19
|
var _overlayControls = _interopRequireDefault(require("./overlay-controls"));
|
|
20
20
|
var _overlay = _interopRequireDefault(require("./overlay"));
|
|
21
21
|
var _hooks = require("../utils/hooks");
|
|
22
|
+
var _lockUnlock = require("../lock-unlock");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
/**
|
|
24
25
|
* External dependencies
|
|
@@ -33,8 +34,43 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
33
34
|
*/
|
|
34
35
|
|
|
35
36
|
const ALLOWED_MEDIA_TYPES = ['image'];
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
const {
|
|
38
|
+
ResolutionTool
|
|
39
|
+
} = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
|
|
40
|
+
const DEFAULT_MEDIA_SIZE_SLUG = 'full';
|
|
41
|
+
function FeaturedImageResolutionTool({
|
|
42
|
+
image,
|
|
43
|
+
value,
|
|
44
|
+
onChange
|
|
45
|
+
}) {
|
|
46
|
+
const {
|
|
47
|
+
imageSizes
|
|
48
|
+
} = (0, _data.useSelect)(select => {
|
|
49
|
+
const {
|
|
50
|
+
getSettings
|
|
51
|
+
} = select(_blockEditor.store);
|
|
52
|
+
return {
|
|
53
|
+
imageSizes: getSettings().imageSizes
|
|
54
|
+
};
|
|
55
|
+
}, []);
|
|
56
|
+
if (!imageSizes?.length) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const imageSizeOptions = imageSizes.filter(({
|
|
60
|
+
slug
|
|
61
|
+
}) => image?.media_details?.sizes?.[slug]?.source_url).map(({
|
|
62
|
+
name,
|
|
63
|
+
slug
|
|
64
|
+
}) => ({
|
|
65
|
+
value: slug,
|
|
66
|
+
label: name
|
|
67
|
+
}));
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ResolutionTool, {
|
|
69
|
+
value: value,
|
|
70
|
+
defaultValue: DEFAULT_MEDIA_SIZE_SLUG,
|
|
71
|
+
options: imageSizeOptions,
|
|
72
|
+
onChange: onChange
|
|
73
|
+
});
|
|
38
74
|
}
|
|
39
75
|
function PostFeaturedImageEdit({
|
|
40
76
|
clientId,
|
|
@@ -93,7 +129,7 @@ function PostFeaturedImageEdit({
|
|
|
93
129
|
postPermalink: getEditedEntityRecord('postType', postTypeSlug, postId)?.link
|
|
94
130
|
};
|
|
95
131
|
}, [featuredImage, postTypeSlug, postId]);
|
|
96
|
-
const mediaUrl =
|
|
132
|
+
const mediaUrl = media?.media_details?.sizes?.[sizeSlug]?.source_url || media?.source_url;
|
|
97
133
|
const blockProps = (0, _blockEditor.useBlockProps)({
|
|
98
134
|
style: {
|
|
99
135
|
width,
|
|
@@ -222,6 +258,12 @@ function PostFeaturedImageEdit({
|
|
|
222
258
|
rel: newRel
|
|
223
259
|
})
|
|
224
260
|
})
|
|
261
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(FeaturedImageResolutionTool, {
|
|
262
|
+
image: media,
|
|
263
|
+
value: sizeSlug,
|
|
264
|
+
onChange: nextSizeSlug => setAttributes({
|
|
265
|
+
sizeSlug: nextSizeSlug
|
|
266
|
+
})
|
|
225
267
|
})]
|
|
226
268
|
})
|
|
227
269
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blob","_coreData","_data","_components","_blockEditor","_element","_i18n","_icons","_notices","_dimensionControls","_overlayControls","_overlay","_hooks","_jsxRuntime","ALLOWED_MEDIA_TYPES","getMediaSourceUrlBySizeSlug","media","slug","media_details","sizes","source_url","PostFeaturedImageEdit","clientId","attributes","setAttributes","context","postId","postType","postTypeSlug","queryId","isDescendentOfQueryLoop","Number","isFinite","isLink","aspectRatio","height","width","scale","sizeSlug","rel","linkTarget","useFirstImageFromPost","temporaryURL","setTemporaryURL","useState","storedFeaturedImage","setFeaturedImage","useEntityProp","postContent","featuredImage","useMemo","imageOpener","exec","imageId","groups","attrs","JSON","parse","id","postPermalink","useSelect","select","getMedia","getPostType","getEditedEntityRecord","coreStore","link","mediaUrl","blockProps","useBlockProps","style","className","clsx","borderProps","useBorderProps","shadowProps","getShadowClassesAndStyles","blockEditingMode","useBlockEditingMode","placeholder","content","jsx","Placeholder","withIllustration","children","onSelectImage","value","url","isBlobURL","useEffect","createErrorNotice","useDispatch","noticesStore","onUploadError","message","type","dropdownMenuProps","useToolsPanelDropdownMenuProps","controls","jsxs","Fragment","InspectorControls","group","default","__experimentalToolsPanel","label","__","resetAll","__experimentalToolsPanelItem","labels","singular_name","sprintf","isShownByDefault","hasValue","onDeselect","ToggleControl","__nextHasNoMarginBottom","onChange","checked","TextControl","__next40pxDefaultSize","newRel","image","href","target","imageStyles","objectFit","MediaPlaceholder","onSelect","accept","allowedTypes","onError","mediaLibraryButton","open","Button","icon","upload","variant","showTooltip","tooltipPosition","onClick","src","alt","alt_text","Spinner","BlockControls","MediaReplaceFlow","mediaId","mediaURL","onReset"],"sources":["@wordpress/block-library/src/post-featured-image/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { isBlobURL } from '@wordpress/blob';\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tToggleControl,\n\tPlaceholder,\n\tButton,\n\tSpinner,\n\tTextControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport {\n\tInspectorControls,\n\tBlockControls,\n\tMediaPlaceholder,\n\tMediaReplaceFlow,\n\tuseBlockProps,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { useMemo, useEffect, useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { upload } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport DimensionControls from './dimension-controls';\nimport OverlayControls from './overlay-controls';\nimport Overlay from './overlay';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nconst ALLOWED_MEDIA_TYPES = [ 'image' ];\n\nfunction getMediaSourceUrlBySizeSlug( media, slug ) {\n\treturn (\n\t\tmedia?.media_details?.sizes?.[ slug ]?.source_url || media?.source_url\n\t);\n}\n\nexport default function PostFeaturedImageEdit( {\n\tclientId,\n\tattributes,\n\tsetAttributes,\n\tcontext: { postId, postType: postTypeSlug, queryId },\n} ) {\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst {\n\t\tisLink,\n\t\taspectRatio,\n\t\theight,\n\t\twidth,\n\t\tscale,\n\t\tsizeSlug,\n\t\trel,\n\t\tlinkTarget,\n\t\tuseFirstImageFromPost,\n\t} = attributes;\n\tconst [ temporaryURL, setTemporaryURL ] = useState();\n\n\tconst [ storedFeaturedImage, setFeaturedImage ] = useEntityProp(\n\t\t'postType',\n\t\tpostTypeSlug,\n\t\t'featured_media',\n\t\tpostId\n\t);\n\n\t// Fallback to post content if no featured image is set.\n\t// This is needed for the \"Use first image from post\" option.\n\tconst [ postContent ] = useEntityProp(\n\t\t'postType',\n\t\tpostTypeSlug,\n\t\t'content',\n\t\tpostId\n\t);\n\n\tconst featuredImage = useMemo( () => {\n\t\tif ( storedFeaturedImage ) {\n\t\t\treturn storedFeaturedImage;\n\t\t}\n\n\t\tif ( ! useFirstImageFromPost ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst imageOpener =\n\t\t\t/<!--\\s+wp:(?:core\\/)?image\\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\\s+\\/?-->).)*)?}\\s+)?-->/.exec(\n\t\t\t\tpostContent\n\t\t\t);\n\t\tconst imageId =\n\t\t\timageOpener?.groups?.attrs &&\n\t\t\tJSON.parse( imageOpener.groups.attrs )?.id;\n\t\treturn imageId;\n\t}, [ storedFeaturedImage, useFirstImageFromPost, postContent ] );\n\n\tconst { media, postType, postPermalink } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getMedia, getPostType, getEditedEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\treturn {\n\t\t\t\tmedia:\n\t\t\t\t\tfeaturedImage &&\n\t\t\t\t\tgetMedia( featuredImage, {\n\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t} ),\n\t\t\t\tpostType: postTypeSlug && getPostType( postTypeSlug ),\n\t\t\t\tpostPermalink: getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostTypeSlug,\n\t\t\t\t\tpostId\n\t\t\t\t)?.link,\n\t\t\t};\n\t\t},\n\t\t[ featuredImage, postTypeSlug, postId ]\n\t);\n\n\tconst mediaUrl = getMediaSourceUrlBySizeSlug( media, sizeSlug );\n\n\tconst blockProps = useBlockProps( {\n\t\tstyle: { width, height, aspectRatio },\n\t\tclassName: clsx( {\n\t\t\t'is-transient': temporaryURL,\n\t\t} ),\n\t} );\n\tconst borderProps = useBorderProps( attributes );\n\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst placeholder = ( content ) => {\n\t\treturn (\n\t\t\t<Placeholder\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'block-editor-media-placeholder',\n\t\t\t\t\tborderProps.className\n\t\t\t\t) }\n\t\t\t\twithIllustration\n\t\t\t\tstyle={ {\n\t\t\t\t\theight: !! aspectRatio && '100%',\n\t\t\t\t\twidth: !! aspectRatio && '100%',\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t...shadowProps.style,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ content }\n\t\t\t</Placeholder>\n\t\t);\n\t};\n\n\tconst onSelectImage = ( value ) => {\n\t\tif ( value?.id ) {\n\t\t\tsetFeaturedImage( value.id );\n\t\t}\n\n\t\tif ( value?.url && isBlobURL( value.url ) ) {\n\t\t\tsetTemporaryURL( value.url );\n\t\t}\n\t};\n\n\t// Reset temporary url when media is available.\n\tuseEffect( () => {\n\t\tif ( mediaUrl && temporaryURL ) {\n\t\t\tsetTemporaryURL();\n\t\t}\n\t}, [ mediaUrl, temporaryURL ] );\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t\tsetTemporaryURL();\n\t};\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst controls = blockEditingMode === 'default' && (\n\t\t<>\n\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t<OverlayControls\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<DimensionControls\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tmedia={ media }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tisLink: false,\n\t\t\t\t\t\t\tlinkTarget: '_self',\n\t\t\t\t\t\t\trel: '',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tpostType?.labels.singular_name\n\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"post\".\n\t\t\t\t\t\t\t\t\t\t__( 'Link to %s' ),\n\t\t\t\t\t\t\t\t\t\tpostType.labels.singular_name\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: __( 'Link to post' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! isLink }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tisLink: false,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\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={\n\t\t\t\t\t\t\t\tpostType?.labels.singular_name\n\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"post\".\n\t\t\t\t\t\t\t\t\t\t\t__( 'Link to %s' ),\n\t\t\t\t\t\t\t\t\t\t\tpostType.labels.singular_name\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: __( 'Link to post' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { isLink: ! isLink } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => '_self' !== linkTarget }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tlinkTarget: '_self',\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => !! rel }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\trel: '',\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\t\t\t\tvalue={ rel }\n\t\t\t\t\t\t\t\tonChange={ ( newRel ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { rel: newRel } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tlet image;\n\n\t/**\n\t * A Post Featured Image block should not have image replacement\n\t * or upload options in the following cases:\n\t * - Is placed in a Query Loop. This is a conscious decision to\n\t * prevent content editing of different posts in Query Loop, and\n\t * this could change in the future.\n\t * - Is in a context where it does not have a postId (for example\n\t * in a template or template part).\n\t */\n\tif ( ! featuredImage && ( isDescendentOfQueryLoop || ! postId ) ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ controls }\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t{ !! isLink ? (\n\t\t\t\t\t\t<a href={ postPermalink } target={ linkTarget }>\n\t\t\t\t\t\t\t{ placeholder() }\n\t\t\t\t\t\t</a>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tplaceholder()\n\t\t\t\t\t) }\n\t\t\t\t\t<Overlay\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst label = __( 'Add a featured image' );\n\tconst imageStyles = {\n\t\t...borderProps.style,\n\t\t...shadowProps.style,\n\t\theight: aspectRatio ? '100%' : height,\n\t\twidth: !! aspectRatio && '100%',\n\t\tobjectFit: !! ( height || aspectRatio ) && scale,\n\t};\n\n\t/**\n\t * When the post featured image block is placed in a context where:\n\t * - It has a postId (for example in a single post)\n\t * - It is not inside a query loop\n\t * - It has no image assigned yet\n\t * Then display the placeholder with the image upload option.\n\t */\n\tif ( ! featuredImage && ! temporaryURL ) {\n\t\timage = (\n\t\t\t<MediaPlaceholder\n\t\t\t\tonSelect={ onSelectImage }\n\t\t\t\taccept=\"image/*\"\n\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\tonError={ onUploadError }\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tmediaLibraryButton={ ( { open } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\ttooltipPosition=\"top center\"\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\topen();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t} else {\n\t\t// We have a Featured image so show a Placeholder if is loading.\n\t\timage =\n\t\t\t! media && ! temporaryURL ? (\n\t\t\t\tplaceholder()\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<img\n\t\t\t\t\t\tclassName={ borderProps.className }\n\t\t\t\t\t\tsrc={ temporaryURL || mediaUrl }\n\t\t\t\t\t\talt={\n\t\t\t\t\t\t\tmedia && media?.alt_text\n\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The image's alt text.\n\t\t\t\t\t\t\t\t\t\t__( 'Featured image: %s' ),\n\t\t\t\t\t\t\t\t\t\tmedia.alt_text\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: __( 'Featured image' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstyle={ imageStyles }\n\t\t\t\t\t/>\n\t\t\t\t\t{ temporaryURL && <Spinner /> }\n\t\t\t\t</>\n\t\t\t);\n\t}\n\n\t/**\n\t * When the post featured image block:\n\t * - Has an image assigned\n\t * - Is not inside a query loop\n\t * Then display the image and the image replacement option.\n\t */\n\treturn (\n\t\t<>\n\t\t\t{ ! temporaryURL && controls }\n\t\t\t{ !! media && ! isDescendentOfQueryLoop && (\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\t\tmediaId={ featuredImage }\n\t\t\t\t\t\tmediaURL={ mediaUrl }\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\t\tonSelect={ onSelectImage }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t\tonReset={ () => setFeaturedImage( 0 ) }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<figure { ...blockProps }>\n\t\t\t\t{ /* If the featured image is linked, wrap in an <a /> tag to trigger any inherited link element styles */ }\n\t\t\t\t{ !! isLink ? (\n\t\t\t\t\t<a href={ postPermalink } target={ linkTarget }>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t<Overlay\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t</figure>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AASA,IAAAK,YAAA,GAAAL,OAAA;AAUA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAKA,IAAAU,kBAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,gBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,QAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AAAgE,IAAAc,WAAA,GAAAd,OAAA;AAzChE;AACA;AACA;;AAGA;AACA;AACA;;AA4BA;AACA;AACA;;AAMA,MAAMe,mBAAmB,GAAG,CAAE,OAAO,CAAE;AAEvC,SAASC,2BAA2BA,CAAEC,KAAK,EAAEC,IAAI,EAAG;EACnD,OACCD,KAAK,EAAEE,aAAa,EAAEC,KAAK,GAAIF,IAAI,CAAE,EAAEG,UAAU,IAAIJ,KAAK,EAAEI,UAAU;AAExE;AAEe,SAASC,qBAAqBA,CAAE;EAC9CC,QAAQ;EACRC,UAAU;EACVC,aAA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ireDefault","require","_blob","_coreData","_data","_components","_blockEditor","_element","_i18n","_icons","_notices","_dimensionControls","_overlayControls","_overlay","_hooks","_lockUnlock","_jsxRuntime","ALLOWED_MEDIA_TYPES","ResolutionTool","unlock","blockEditorPrivateApis","DEFAULT_MEDIA_SIZE_SLUG","FeaturedImageResolutionTool","image","value","onChange","imageSizes","useSelect","select","getSettings","blockEditorStore","length","imageSizeOptions","filter","slug","media_details","sizes","source_url","map","name","label","jsx","defaultValue","options","PostFeaturedImageEdit","clientId","attributes","setAttributes","context","postId","postType","postTypeSlug","queryId","isDescendentOfQueryLoop","Number","isFinite","isLink","aspectRatio","height","width","scale","sizeSlug","rel","linkTarget","useFirstImageFromPost","temporaryURL","setTemporaryURL","useState","storedFeaturedImage","setFeaturedImage","useEntityProp","postContent","featuredImage","useMemo","imageOpener","exec","imageId","groups","attrs","JSON","parse","id","media","postPermalink","getMedia","getPostType","getEditedEntityRecord","coreStore","link","mediaUrl","blockProps","useBlockProps","style","className","clsx","borderProps","useBorderProps","shadowProps","getShadowClassesAndStyles","blockEditingMode","useBlockEditingMode","placeholder","content","Placeholder","withIllustration","children","onSelectImage","url","isBlobURL","useEffect","createErrorNotice","useDispatch","noticesStore","onUploadError","message","type","dropdownMenuProps","useToolsPanelDropdownMenuProps","controls","jsxs","Fragment","InspectorControls","group","default","__experimentalToolsPanel","__","resetAll","__experimentalToolsPanelItem","labels","singular_name","sprintf","isShownByDefault","hasValue","onDeselect","ToggleControl","__nextHasNoMarginBottom","checked","TextControl","__next40pxDefaultSize","newRel","nextSizeSlug","href","target","imageStyles","objectFit","MediaPlaceholder","onSelect","accept","allowedTypes","onError","mediaLibraryButton","open","Button","icon","upload","variant","showTooltip","tooltipPosition","onClick","src","alt","alt_text","Spinner","BlockControls","MediaReplaceFlow","mediaId","mediaURL","onReset"],"sources":["@wordpress/block-library/src/post-featured-image/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { isBlobURL } from '@wordpress/blob';\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tToggleControl,\n\tPlaceholder,\n\tButton,\n\tSpinner,\n\tTextControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport {\n\tInspectorControls,\n\tBlockControls,\n\tMediaPlaceholder,\n\tMediaReplaceFlow,\n\tuseBlockProps,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\tuseBlockEditingMode,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useMemo, useEffect, useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { upload } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport DimensionControls from './dimension-controls';\nimport OverlayControls from './overlay-controls';\nimport Overlay from './overlay';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\nimport { unlock } from '../lock-unlock';\n\nconst ALLOWED_MEDIA_TYPES = [ 'image' ];\nconst { ResolutionTool } = unlock( blockEditorPrivateApis );\nconst DEFAULT_MEDIA_SIZE_SLUG = 'full';\n\nfunction FeaturedImageResolutionTool( { image, value, onChange } ) {\n\tconst { imageSizes } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\timageSizes: getSettings().imageSizes,\n\t\t};\n\t}, [] );\n\n\tif ( ! imageSizes?.length ) {\n\t\treturn null;\n\t}\n\n\tconst imageSizeOptions = imageSizes\n\t\t.filter(\n\t\t\t( { slug } ) => image?.media_details?.sizes?.[ slug ]?.source_url\n\t\t)\n\t\t.map( ( { name, slug } ) => ( { value: slug, label: name } ) );\n\n\treturn (\n\t\t<ResolutionTool\n\t\t\tvalue={ value }\n\t\t\tdefaultValue={ DEFAULT_MEDIA_SIZE_SLUG }\n\t\t\toptions={ imageSizeOptions }\n\t\t\tonChange={ onChange }\n\t\t/>\n\t);\n}\n\nexport default function PostFeaturedImageEdit( {\n\tclientId,\n\tattributes,\n\tsetAttributes,\n\tcontext: { postId, postType: postTypeSlug, queryId },\n} ) {\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst {\n\t\tisLink,\n\t\taspectRatio,\n\t\theight,\n\t\twidth,\n\t\tscale,\n\t\tsizeSlug,\n\t\trel,\n\t\tlinkTarget,\n\t\tuseFirstImageFromPost,\n\t} = attributes;\n\tconst [ temporaryURL, setTemporaryURL ] = useState();\n\n\tconst [ storedFeaturedImage, setFeaturedImage ] = useEntityProp(\n\t\t'postType',\n\t\tpostTypeSlug,\n\t\t'featured_media',\n\t\tpostId\n\t);\n\n\t// Fallback to post content if no featured image is set.\n\t// This is needed for the \"Use first image from post\" option.\n\tconst [ postContent ] = useEntityProp(\n\t\t'postType',\n\t\tpostTypeSlug,\n\t\t'content',\n\t\tpostId\n\t);\n\n\tconst featuredImage = useMemo( () => {\n\t\tif ( storedFeaturedImage ) {\n\t\t\treturn storedFeaturedImage;\n\t\t}\n\n\t\tif ( ! useFirstImageFromPost ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst imageOpener =\n\t\t\t/<!--\\s+wp:(?:core\\/)?image\\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\\s+\\/?-->).)*)?}\\s+)?-->/.exec(\n\t\t\t\tpostContent\n\t\t\t);\n\t\tconst imageId =\n\t\t\timageOpener?.groups?.attrs &&\n\t\t\tJSON.parse( imageOpener.groups.attrs )?.id;\n\t\treturn imageId;\n\t}, [ storedFeaturedImage, useFirstImageFromPost, postContent ] );\n\n\tconst { media, postType, postPermalink } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getMedia, getPostType, getEditedEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\treturn {\n\t\t\t\tmedia:\n\t\t\t\t\tfeaturedImage &&\n\t\t\t\t\tgetMedia( featuredImage, {\n\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t} ),\n\t\t\t\tpostType: postTypeSlug && getPostType( postTypeSlug ),\n\t\t\t\tpostPermalink: getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostTypeSlug,\n\t\t\t\t\tpostId\n\t\t\t\t)?.link,\n\t\t\t};\n\t\t},\n\t\t[ featuredImage, postTypeSlug, postId ]\n\t);\n\n\tconst mediaUrl =\n\t\tmedia?.media_details?.sizes?.[ sizeSlug ]?.source_url ||\n\t\tmedia?.source_url;\n\n\tconst blockProps = useBlockProps( {\n\t\tstyle: { width, height, aspectRatio },\n\t\tclassName: clsx( {\n\t\t\t'is-transient': temporaryURL,\n\t\t} ),\n\t} );\n\tconst borderProps = useBorderProps( attributes );\n\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst placeholder = ( content ) => {\n\t\treturn (\n\t\t\t<Placeholder\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'block-editor-media-placeholder',\n\t\t\t\t\tborderProps.className\n\t\t\t\t) }\n\t\t\t\twithIllustration\n\t\t\t\tstyle={ {\n\t\t\t\t\theight: !! aspectRatio && '100%',\n\t\t\t\t\twidth: !! aspectRatio && '100%',\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t...shadowProps.style,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ content }\n\t\t\t</Placeholder>\n\t\t);\n\t};\n\n\tconst onSelectImage = ( value ) => {\n\t\tif ( value?.id ) {\n\t\t\tsetFeaturedImage( value.id );\n\t\t}\n\n\t\tif ( value?.url && isBlobURL( value.url ) ) {\n\t\t\tsetTemporaryURL( value.url );\n\t\t}\n\t};\n\n\t// Reset temporary url when media is available.\n\tuseEffect( () => {\n\t\tif ( mediaUrl && temporaryURL ) {\n\t\t\tsetTemporaryURL();\n\t\t}\n\t}, [ mediaUrl, temporaryURL ] );\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t\tsetTemporaryURL();\n\t};\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst controls = blockEditingMode === 'default' && (\n\t\t<>\n\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t<OverlayControls\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<DimensionControls\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tmedia={ media }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tisLink: false,\n\t\t\t\t\t\t\tlinkTarget: '_self',\n\t\t\t\t\t\t\trel: '',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tpostType?.labels.singular_name\n\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"post\".\n\t\t\t\t\t\t\t\t\t\t__( 'Link to %s' ),\n\t\t\t\t\t\t\t\t\t\tpostType.labels.singular_name\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: __( 'Link to post' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! isLink }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tisLink: false,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\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={\n\t\t\t\t\t\t\t\tpostType?.labels.singular_name\n\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"post\".\n\t\t\t\t\t\t\t\t\t\t\t__( 'Link to %s' ),\n\t\t\t\t\t\t\t\t\t\t\tpostType.labels.singular_name\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: __( 'Link to post' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { isLink: ! isLink } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => '_self' !== linkTarget }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tlinkTarget: '_self',\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => !! rel }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\trel: '',\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\t\t\t\tvalue={ rel }\n\t\t\t\t\t\t\t\tonChange={ ( newRel ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { rel: newRel } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t<FeaturedImageResolutionTool\n\t\t\t\t\t\timage={ media }\n\t\t\t\t\t\tvalue={ sizeSlug }\n\t\t\t\t\t\tonChange={ ( nextSizeSlug ) =>\n\t\t\t\t\t\t\tsetAttributes( { sizeSlug: nextSizeSlug } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tlet image;\n\n\t/**\n\t * A Post Featured Image block should not have image replacement\n\t * or upload options in the following cases:\n\t * - Is placed in a Query Loop. This is a conscious decision to\n\t * prevent content editing of different posts in Query Loop, and\n\t * this could change in the future.\n\t * - Is in a context where it does not have a postId (for example\n\t * in a template or template part).\n\t */\n\tif ( ! featuredImage && ( isDescendentOfQueryLoop || ! postId ) ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ controls }\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t{ !! isLink ? (\n\t\t\t\t\t\t<a href={ postPermalink } target={ linkTarget }>\n\t\t\t\t\t\t\t{ placeholder() }\n\t\t\t\t\t\t</a>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tplaceholder()\n\t\t\t\t\t) }\n\t\t\t\t\t<Overlay\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst label = __( 'Add a featured image' );\n\tconst imageStyles = {\n\t\t...borderProps.style,\n\t\t...shadowProps.style,\n\t\theight: aspectRatio ? '100%' : height,\n\t\twidth: !! aspectRatio && '100%',\n\t\tobjectFit: !! ( height || aspectRatio ) && scale,\n\t};\n\n\t/**\n\t * When the post featured image block is placed in a context where:\n\t * - It has a postId (for example in a single post)\n\t * - It is not inside a query loop\n\t * - It has no image assigned yet\n\t * Then display the placeholder with the image upload option.\n\t */\n\tif ( ! featuredImage && ! temporaryURL ) {\n\t\timage = (\n\t\t\t<MediaPlaceholder\n\t\t\t\tonSelect={ onSelectImage }\n\t\t\t\taccept=\"image/*\"\n\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\tonError={ onUploadError }\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tmediaLibraryButton={ ( { open } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\ttooltipPosition=\"top center\"\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\topen();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t} else {\n\t\t// We have a Featured image so show a Placeholder if is loading.\n\t\timage =\n\t\t\t! media && ! temporaryURL ? (\n\t\t\t\tplaceholder()\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<img\n\t\t\t\t\t\tclassName={ borderProps.className }\n\t\t\t\t\t\tsrc={ temporaryURL || mediaUrl }\n\t\t\t\t\t\talt={\n\t\t\t\t\t\t\tmedia && media?.alt_text\n\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The image's alt text.\n\t\t\t\t\t\t\t\t\t\t__( 'Featured image: %s' ),\n\t\t\t\t\t\t\t\t\t\tmedia.alt_text\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: __( 'Featured image' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstyle={ imageStyles }\n\t\t\t\t\t/>\n\t\t\t\t\t{ temporaryURL && <Spinner /> }\n\t\t\t\t</>\n\t\t\t);\n\t}\n\n\t/**\n\t * When the post featured image block:\n\t * - Has an image assigned\n\t * - Is not inside a query loop\n\t * Then display the image and the image replacement option.\n\t */\n\treturn (\n\t\t<>\n\t\t\t{ ! temporaryURL && controls }\n\t\t\t{ !! media && ! isDescendentOfQueryLoop && (\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\t\tmediaId={ featuredImage }\n\t\t\t\t\t\tmediaURL={ mediaUrl }\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\t\tonSelect={ onSelectImage }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t\tonReset={ () => setFeaturedImage( 0 ) }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<figure { ...blockProps }>\n\t\t\t\t{ /* If the featured image is linked, wrap in an <a /> tag to trigger any inherited link element styles */ }\n\t\t\t\t{ !! isLink ? (\n\t\t\t\t\t<a href={ postPermalink } target={ linkTarget }>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t<Overlay\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t</figure>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AASA,IAAAK,YAAA,GAAAL,OAAA;AAYA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAKA,IAAAU,kBAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,gBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,QAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AAAwC,IAAAe,WAAA,GAAAf,OAAA;AA5CxC;AACA;AACA;;AAGA;AACA;AACA;;AA8BA;AACA;AACA;;AAOA,MAAMgB,mBAAmB,GAAG,CAAE,OAAO,CAAE;AACvC,MAAM;EAAEC;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB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|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_blockEditor","_i18n","_data","_coreData","_jsxRuntime","PostNavigationLinkEdit","context","postType","attributes","type","label","showTitle","textAlign","linkLabel","arrow","taxonomy","setAttributes","isNext","placeholder","__","arrowMap","none","chevron","displayArrow","ariaLabel","blockProps","useBlockProps","className","clsx","taxonomies","useSelect","select","getTaxonomies","coreStore","filteredTaxonomies","per_page","getTaxonomyOptions","selectOption","value","taxonomyOptions","filter","visibility","publicly_queryable","map","item","slug","name","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","ToggleControl","__nextHasNoMarginBottom","help","checked","onChange","__experimentalToggleGroupControl","__next40pxDefaultSize","isBlock","__experimentalToggleGroupControlOption","_x","group","SelectControl","options","BlockControls","AlignmentToolbar","nextAlign","RichText","tagName","identifier","allowedFormats","newLabel","href","onClick","event","preventDefault"],"sources":["@wordpress/block-library/src/post-navigation-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tToggleControl,\n\tSelectControl,\n\tPanelBody,\n} from '@wordpress/components';\nimport {\n\tInspectorControls,\n\tRichText,\n\tBlockControls,\n\tAlignmentToolbar,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\nexport default function PostNavigationLinkEdit( {\n\tcontext: { postType },\n\tattributes: {\n\t\ttype,\n\t\tlabel,\n\t\tshowTitle,\n\t\ttextAlign,\n\t\tlinkLabel,\n\t\tarrow,\n\t\ttaxonomy,\n\t},\n\tsetAttributes,\n} ) {\n\tconst isNext = type === 'next';\n\tlet placeholder = isNext ? __( 'Next' ) : __( 'Previous' );\n\n\tconst arrowMap = {\n\t\tnone: '',\n\t\tarrow: isNext ? '→' : '←',\n\t\tchevron: isNext ? '»' : '«',\n\t};\n\n\tconst displayArrow = arrowMap[ arrow ];\n\n\tif ( showTitle ) {\n\t\tplaceholder = isNext\n\t\t\t? /* translators: Label before for next and previous post. There is a space after the colon. */\n\t\t\t __( 'Next: ' ) // eslint-disable-line @wordpress/i18n-no-flanking-whitespace\n\t\t\t: /* translators: Label before for next and previous post. There is a space after the colon. */\n\t\t\t __( 'Previous: ' ); // eslint-disable-line @wordpress/i18n-no-flanking-whitespace\n\t}\n\n\tconst ariaLabel = isNext ? __( 'Next post' ) : __( 'Previous post' );\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst taxonomies = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getTaxonomies } = select( coreStore );\n\t\t\tconst filteredTaxonomies = getTaxonomies( {\n\t\t\t\ttype: postType,\n\t\t\t\tper_page: -1,\n\t\t\t} );\n\t\t\treturn filteredTaxonomies;\n\t\t},\n\t\t[ postType ]\n\t);\n\tconst getTaxonomyOptions = () => {\n\t\tconst selectOption = {\n\t\t\tlabel: __( 'Unfiltered' ),\n\t\t\tvalue: '',\n\t\t};\n\t\tconst taxonomyOptions = ( taxonomies ?? [] )\n\t\t\t.filter( ( { visibility } ) => !! visibility?.publicly_queryable )\n\t\t\t.map( ( item ) => {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: item.slug,\n\t\t\t\t\tlabel: item.name,\n\t\t\t\t};\n\t\t\t} );\n\n\t\treturn [ selectOption, ...taxonomyOptions ];\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Display the title as a link' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'If you have entered a custom label, it will be prepended before the title.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tchecked={ !! showTitle }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowTitle: ! showTitle,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{ showTitle && (\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={ __(\n\t\t\t\t\t\t\t\t'Include the label as part of the link'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tchecked={ !! linkLabel }\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\tlinkLabel: ! linkLabel,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Arrow' ) }\n\t\t\t\t\t\tvalue={ arrow }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tsetAttributes( { arrow: value } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'A decorative arrow for the next and previous link.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"none\"\n\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t'None',\n\t\t\t\t\t\t\t\t'Arrow option for Next/Previous link'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"arrow\"\n\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t'Arrow',\n\t\t\t\t\t\t\t\t'Arrow option for Next/Previous link'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"chevron\"\n\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t'Chevron',\n\t\t\t\t\t\t\t\t'Arrow option for Next/Previous link'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Filter by taxonomy' ) }\n\t\t\t\t\tvalue={ taxonomy }\n\t\t\t\t\toptions={ getTaxonomyOptions() }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\ttaxonomy: value,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t'Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<BlockControls>\n\t\t\t\t<AlignmentToolbar\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<div { ...blockProps }>\n\t\t\t\t{ ! isNext && displayArrow && (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ `wp-block-post-navigation-link__arrow-previous is-arrow-${ arrow }` }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ displayArrow }\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t<RichText\n\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\tidentifier=\"label\"\n\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tallowedFormats={ [ 'core/bold', 'core/italic' ] }\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\t{ showTitle && (\n\t\t\t\t\t<a\n\t\t\t\t\t\thref=\"#post-navigation-pseudo-link\"\n\t\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'An example title' ) }\n\t\t\t\t\t</a>\n\t\t\t\t) }\n\t\t\t\t{ isNext && displayArrow && (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ `wp-block-post-navigation-link__arrow-next is-arrow-${ arrow }` }\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t{ displayArrow }\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAOA,IAAAE,YAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAA0D,IAAAM,WAAA,GAAAN,OAAA;AAxB1D;AACA;AACA;;AAGA;AACA;AACA;;AAmBe,SAASO,sBAAsBA,CAAE;EAC/CC,OAAO,EAAE;IAAEC;EAAS,CAAC;EACrBC,UAAU,EAAE;IACXC,IAAI;IACJC,KAAK;IACLC,SAAS;IACTC,SAAS;IACTC,SAAS;IACTC,KAAK;IACLC;EACD,CAAC;EACDC;AACD,CAAC,EAA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,IAAAnB,WAAA,CAAA8C,GAAA;QACCvB,SAAS,EAAG,sDAAuDb,KAAK,EAAK;QAC7E,mBAAW;QAAAmC,QAAA,EAET1B;MAAY,CACT,CACN;IAAA,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_blockEditor","_i18n","_data","_coreData","_jsxRuntime","PostNavigationLinkEdit","context","postType","attributes","type","label","showTitle","textAlign","linkLabel","arrow","taxonomy","setAttributes","isNext","placeholder","__","arrowMap","none","chevron","displayArrow","ariaLabel","blockProps","useBlockProps","className","clsx","taxonomies","useSelect","select","getTaxonomies","coreStore","filteredTaxonomies","per_page","getTaxonomyOptions","selectOption","value","taxonomyOptions","filter","visibility","publicly_queryable","map","item","slug","name","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","ToggleControl","__nextHasNoMarginBottom","help","checked","onChange","__experimentalToggleGroupControl","__next40pxDefaultSize","isBlock","__experimentalToggleGroupControlOption","_x","group","SelectControl","options","BlockControls","AlignmentToolbar","nextAlign","RichText","tagName","identifier","allowedFormats","newLabel","href","onClick","event","preventDefault"],"sources":["@wordpress/block-library/src/post-navigation-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tToggleControl,\n\tSelectControl,\n\tPanelBody,\n} from '@wordpress/components';\nimport {\n\tInspectorControls,\n\tRichText,\n\tBlockControls,\n\tAlignmentToolbar,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\nexport default function PostNavigationLinkEdit( {\n\tcontext: { postType },\n\tattributes: {\n\t\ttype,\n\t\tlabel,\n\t\tshowTitle,\n\t\ttextAlign,\n\t\tlinkLabel,\n\t\tarrow,\n\t\ttaxonomy,\n\t},\n\tsetAttributes,\n} ) {\n\tconst isNext = type === 'next';\n\tlet placeholder = isNext ? __( 'Next' ) : __( 'Previous' );\n\n\tconst arrowMap = {\n\t\tnone: '',\n\t\tarrow: isNext ? '→' : '←',\n\t\tchevron: isNext ? '»' : '«',\n\t};\n\n\tconst displayArrow = arrowMap[ arrow ];\n\n\tif ( showTitle ) {\n\t\tplaceholder = isNext\n\t\t\t? /* translators: Label before for next and previous post. There is a space after the colon. */\n\t\t\t __( 'Next: ' ) // eslint-disable-line @wordpress/i18n-no-flanking-whitespace\n\t\t\t: /* translators: Label before for next and previous post. There is a space after the colon. */\n\t\t\t __( 'Previous: ' ); // eslint-disable-line @wordpress/i18n-no-flanking-whitespace\n\t}\n\n\tconst ariaLabel = isNext ? __( 'Next post' ) : __( 'Previous post' );\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst taxonomies = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getTaxonomies } = select( coreStore );\n\t\t\tconst filteredTaxonomies = getTaxonomies( {\n\t\t\t\ttype: postType,\n\t\t\t\tper_page: -1,\n\t\t\t} );\n\t\t\treturn filteredTaxonomies;\n\t\t},\n\t\t[ postType ]\n\t);\n\tconst getTaxonomyOptions = () => {\n\t\tconst selectOption = {\n\t\t\tlabel: __( 'Unfiltered' ),\n\t\t\tvalue: '',\n\t\t};\n\t\tconst taxonomyOptions = ( taxonomies ?? [] )\n\t\t\t.filter( ( { visibility } ) => !! visibility?.publicly_queryable )\n\t\t\t.map( ( item ) => {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: item.slug,\n\t\t\t\t\tlabel: item.name,\n\t\t\t\t};\n\t\t\t} );\n\n\t\treturn [ selectOption, ...taxonomyOptions ];\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Display the title as a link' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'If you have entered a custom label, it will be prepended before the title.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tchecked={ !! showTitle }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowTitle: ! showTitle,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{ showTitle && (\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={ __(\n\t\t\t\t\t\t\t\t'Include the label as part of the link'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tchecked={ !! linkLabel }\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\tlinkLabel: ! linkLabel,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Arrow' ) }\n\t\t\t\t\t\tvalue={ arrow }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tsetAttributes( { arrow: value } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'A decorative arrow for the next and previous link.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"none\"\n\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t'None',\n\t\t\t\t\t\t\t\t'Arrow option for Next/Previous link'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"arrow\"\n\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t'Arrow',\n\t\t\t\t\t\t\t\t'Arrow option for Next/Previous link'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"chevron\"\n\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t'Chevron',\n\t\t\t\t\t\t\t\t'Arrow option for Next/Previous link'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Filter by taxonomy' ) }\n\t\t\t\t\tvalue={ taxonomy }\n\t\t\t\t\toptions={ getTaxonomyOptions() }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\ttaxonomy: value,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t'Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<BlockControls>\n\t\t\t\t<AlignmentToolbar\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<div { ...blockProps }>\n\t\t\t\t{ ! isNext && displayArrow && (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ `wp-block-post-navigation-link__arrow-previous is-arrow-${ arrow }` }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ displayArrow }\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t<RichText\n\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\tidentifier=\"label\"\n\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tallowedFormats={ [ 'core/bold', 'core/italic' ] }\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\t{ showTitle && (\n\t\t\t\t\t<a\n\t\t\t\t\t\thref=\"#post-navigation-pseudo-link\"\n\t\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'An example title' ) }\n\t\t\t\t\t</a>\n\t\t\t\t) }\n\t\t\t\t{ isNext && displayArrow && (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ `wp-block-post-navigation-link__arrow-next is-arrow-${ arrow }` }\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t{ displayArrow }\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAOA,IAAAE,YAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAA0D,IAAAM,WAAA,GAAAN,OAAA;AAxB1D;AACA;AACA;;AAGA;AACA;AACA;;AAmBe,SAASO,sBAAsBA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AAC,8BAA8B;QACnCC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;QAAA5B,QAAA,EAE7C,IAAA9B,QAAE,EAAE,kBAAmB;MAAC,CACxB,CACH,EACCF,MAAM,IAAIM,YAAY,iBACvB,IAAAnB,WAAA,CAAA8C,GAAA;QACCvB,SAAS,EAAG,sDAAuDb,KAAK,EAAK;QAC7E,mBAAW;QAAAmC,QAAA,EAET1B;MAAY,CACT,CACN;IAAA,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_icons","variations","isDefault","name","title","__","description","icon","next","attributes","type","scope","example","label","arrow","previous","forEach","variation","isActive","blockAttributes","variationAttributes","_default","exports","default"],"sources":["@wordpress/block-library/src/post-navigation-link/variations.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\n\nconst variations = [\n\t{\n\t\tisDefault: true,\n\t\tname: 'post-next',\n\t\ttitle: __( 'Next Post' ),\n\t\tdescription: __(\n\t\t\t'Displays the post link that follows the current post.'\n\t\t),\n\t\ticon: next,\n\t\tattributes: { type: 'next' },\n\t\tscope: [ 'inserter', 'transform' ],\n\t\texample: {\n\t\t\tattributes: {\n\t\t\t\tlabel: __( 'Next post' ),\n\t\t\t\tarrow: 'arrow',\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: 'post-previous',\n\t\ttitle: __( 'Previous Post' ),\n\t\tdescription: __(\n\t\t\t'Displays the post link that precedes the current post.'\n\t\t),\n\t\ticon: previous,\n\t\tattributes: { type: 'previous' },\n\t\tscope: [ 'inserter', 'transform' ],\n\t\texample: {\n\t\t\tattributes: {\n\t\t\t\tlabel: __( 'Previous post' ),\n\t\t\t\tarrow: 'arrow',\n\t\t\t},\n\t\t},\n\t},\n];\n\n/**\n * Add `isActive` function to all `post-navigation-link` variations, if not defined.\n * `isActive` function is used to find a variation match from a created\n * Block by providing its attributes.\n */\nvariations.forEach( ( variation ) => {\n\tif ( variation.isActive ) {\n\t\treturn;\n\t}\n\tvariation.isActive = ( blockAttributes, variationAttributes ) =>\n\t\tblockAttributes.type === variationAttributes.type;\n} );\n\nexport default variations;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_i18n","require","_icons","variations","isDefault","name","title","__","description","icon","next","attributes","type","scope","example","label","arrow","previous","forEach","variation","isActive","blockAttributes","variationAttributes","_default","exports","default"],"sources":["@wordpress/block-library/src/post-navigation-link/variations.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\n\nconst variations = [\n\t{\n\t\tisDefault: true,\n\t\tname: 'post-next',\n\t\ttitle: __( 'Next Post' ),\n\t\tdescription: __(\n\t\t\t'Displays the post link that follows the current post.'\n\t\t),\n\t\ticon: next,\n\t\tattributes: { type: 'next' },\n\t\tscope: [ 'inserter', 'transform' ],\n\t\texample: {\n\t\t\tattributes: {\n\t\t\t\tlabel: __( 'Next post' ),\n\t\t\t\tarrow: 'arrow',\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: 'post-previous',\n\t\ttitle: __( 'Previous Post' ),\n\t\tdescription: __(\n\t\t\t'Displays the post link that precedes the current post.'\n\t\t),\n\t\ticon: previous,\n\t\tattributes: { type: 'previous' },\n\t\tscope: [ 'inserter', 'transform' ],\n\t\texample: {\n\t\t\tattributes: {\n\t\t\t\tlabel: __( 'Previous post' ),\n\t\t\t\tarrow: 'arrow',\n\t\t\t},\n\t\t},\n\t},\n];\n\n/**\n * Add `isActive` function to all `post-navigation-link` variations, if not defined.\n * `isActive` function is used to find a variation match from a created\n * Block by providing its attributes.\n */\nvariations.forEach( ( variation ) => {\n\tif ( variation.isActive ) {\n\t\treturn;\n\t}\n\tvariation.isActive = ( blockAttributes, variationAttributes ) =>\n\t\tblockAttributes.type === variationAttributes.type;\n} );\n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,UAAU","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* wp:polyfill */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -176,18 +175,26 @@ function PostTemplateEdit({
|
|
|
176
175
|
query.format = format;
|
|
177
176
|
}
|
|
178
177
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
/*
|
|
179
|
+
* Handle cases where sticky is set to `exclude` or `only`.
|
|
180
|
+
* Which works as a `post__in/post__not_in` query for sticky posts.
|
|
181
|
+
*/
|
|
182
|
+
if (sticky && sticky !== 'ignore') {
|
|
183
183
|
query.sticky = sticky === 'only';
|
|
184
184
|
}
|
|
185
|
+
if (sticky === 'ignore') {
|
|
186
|
+
// Remove any leftover sticky query parameter.
|
|
187
|
+
delete query.sticky;
|
|
188
|
+
query.ignore_sticky = true;
|
|
189
|
+
}
|
|
190
|
+
|
|
185
191
|
// If `inherit` is truthy, adjust conditionally the query to create a better preview.
|
|
192
|
+
let currentPostType = postType;
|
|
186
193
|
if (inherit) {
|
|
187
194
|
// Change the post-type if needed.
|
|
188
195
|
if (templateSlug?.startsWith('archive-')) {
|
|
189
196
|
query.postType = templateSlug.replace('archive-', '');
|
|
190
|
-
|
|
197
|
+
currentPostType = query.postType;
|
|
191
198
|
} else if (templateCategory) {
|
|
192
199
|
query.categories = templateCategory[0]?.id;
|
|
193
200
|
} else if (templateTag) {
|
|
@@ -199,7 +206,7 @@ function PostTemplateEdit({
|
|
|
199
206
|
}
|
|
200
207
|
// When we preview Query Loop blocks we should prefer the current
|
|
201
208
|
// block's postType, which is passed through block context.
|
|
202
|
-
const usedPostType = previewPostType ||
|
|
209
|
+
const usedPostType = previewPostType || currentPostType;
|
|
203
210
|
return {
|
|
204
211
|
posts: getEntityRecords('postType', usedPostType, {
|
|
205
212
|
...query,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_data","_i18n","_blockEditor","_components","_coreData","_icons","_jsxRuntime","TEMPLATE","PostTemplateInnerBlocks","classList","innerBlocksProps","useInnerBlocksProps","className","clsx","template","__unstableDisableLayoutClassNames","jsx","PostTemplateBlockPreview","blocks","blockContextId","isHidden","setActiveBlockContextId","blockPreviewProps","useBlockPreview","props","handleOnClick","style","display","undefined","tabIndex","role","onClick","onKeyPress","MemoizedPostTemplateBlockPreview","memo","PostTemplateEdit","setAttributes","clientId","context","query","perPage","offset","postType","order","orderBy","author","search","exclude","sticky","inherit","taxQuery","parents","pages","format","restQueryArgs","templateSlug","previewPostType","attributes","layout","__unstableLayoutClassNames","type","layoutType","columnCount","activeBlockContextId","useState","posts","useSelect","select","getEntityRecords","getTaxonomies","coreStore","getBlocks","blockEditorStore","templateCategory","startsWith","per_page","_fields","slug","replace","templateTag","orderby","taxonomies","builtTaxQuery","Object","entries","reduce","accumulator","taxonomySlug","terms","taxonomy","find","rest_base","keys","length","assign","parent","categories","id","tags","usedPostType","blockContexts","useMemo","map","post","_post$class_list","postId","class_list","blockProps","useBlockProps","children","Spinner","jsxs","__","setDisplayLayout","newDisplayLayout","displayLayoutControls","icon","list","title","_x","isActive","grid","Fragment","BlockControls","ToolbarGroup","controls","blockContext","BlockContextProvider","value"],"sources":["@wordpress/block-library/src/post-template/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { memo, useMemo, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tBlockControls,\n\tBlockContextProvider,\n\t__experimentalUseBlockPreview as useBlockPreview,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { Spinner, ToolbarGroup } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { list, grid } from '@wordpress/icons';\n\nconst TEMPLATE = [\n\t[ 'core/post-title' ],\n\t[ 'core/post-date' ],\n\t[ 'core/post-excerpt' ],\n];\n\nfunction PostTemplateInnerBlocks( { classList } ) {\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{ className: clsx( 'wp-block-post', classList ) },\n\t\t{ template: TEMPLATE, __unstableDisableLayoutClassNames: true }\n\t);\n\treturn <li { ...innerBlocksProps } />;\n}\n\nfunction PostTemplateBlockPreview( {\n\tblocks,\n\tblockContextId,\n\tclassList,\n\tisHidden,\n\tsetActiveBlockContextId,\n} ) {\n\tconst blockPreviewProps = useBlockPreview( {\n\t\tblocks,\n\t\tprops: {\n\t\t\tclassName: clsx( 'wp-block-post', classList ),\n\t\t},\n\t} );\n\n\tconst handleOnClick = () => {\n\t\tsetActiveBlockContextId( blockContextId );\n\t};\n\n\tconst style = {\n\t\tdisplay: isHidden ? 'none' : undefined,\n\t};\n\n\treturn (\n\t\t<li\n\t\t\t{ ...blockPreviewProps }\n\t\t\ttabIndex={ 0 }\n\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n\t\t\trole=\"button\"\n\t\t\tonClick={ handleOnClick }\n\t\t\tonKeyPress={ handleOnClick }\n\t\t\tstyle={ style }\n\t\t/>\n\t);\n}\n\nconst MemoizedPostTemplateBlockPreview = memo( PostTemplateBlockPreview );\n\nexport default function PostTemplateEdit( {\n\tsetAttributes,\n\tclientId,\n\tcontext: {\n\t\tquery: {\n\t\t\tperPage,\n\t\t\toffset = 0,\n\t\t\tpostType,\n\t\t\torder,\n\t\t\torderBy,\n\t\t\tauthor,\n\t\t\tsearch,\n\t\t\texclude,\n\t\t\tsticky,\n\t\t\tinherit,\n\t\t\ttaxQuery,\n\t\t\tparents,\n\t\t\tpages,\n\t\t\tformat,\n\t\t\t// We gather extra query args to pass to the REST API call.\n\t\t\t// This way extenders of Query Loop can add their own query args,\n\t\t\t// and have accurate previews in the editor.\n\t\t\t// Noting though that these args should either be supported by the\n\t\t\t// REST API or be handled by custom REST filters like `rest_{$this->post_type}_query`.\n\t\t\t...restQueryArgs\n\t\t} = {},\n\t\ttemplateSlug,\n\t\tpreviewPostType,\n\t},\n\tattributes: { layout },\n\t__unstableLayoutClassNames,\n} ) {\n\tconst { type: layoutType, columnCount = 3 } = layout || {};\n\tconst [ activeBlockContextId, setActiveBlockContextId ] = useState();\n\tconst { posts, blocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords, getTaxonomies } = select( coreStore );\n\t\t\tconst { getBlocks } = select( blockEditorStore );\n\t\t\tconst templateCategory =\n\t\t\t\tinherit &&\n\t\t\t\ttemplateSlug?.startsWith( 'category-' ) &&\n\t\t\t\tgetEntityRecords( 'taxonomy', 'category', {\n\t\t\t\t\tcontext: 'view',\n\t\t\t\t\tper_page: 1,\n\t\t\t\t\t_fields: [ 'id' ],\n\t\t\t\t\tslug: templateSlug.replace( 'category-', '' ),\n\t\t\t\t} );\n\t\t\tconst templateTag =\n\t\t\t\tinherit &&\n\t\t\t\ttemplateSlug?.startsWith( 'tag-' ) &&\n\t\t\t\tgetEntityRecords( 'taxonomy', 'post_tag', {\n\t\t\t\t\tcontext: 'view',\n\t\t\t\t\tper_page: 1,\n\t\t\t\t\t_fields: [ 'id' ],\n\t\t\t\t\tslug: templateSlug.replace( 'tag-', '' ),\n\t\t\t\t} );\n\t\t\tconst query = {\n\t\t\t\toffset: offset || 0,\n\t\t\t\torder,\n\t\t\t\torderby: orderBy,\n\t\t\t};\n\t\t\t// There is no need to build the taxQuery if we inherit.\n\t\t\tif ( taxQuery && ! inherit ) {\n\t\t\t\tconst taxonomies = getTaxonomies( {\n\t\t\t\t\ttype: postType,\n\t\t\t\t\tper_page: -1,\n\t\t\t\t\tcontext: 'view',\n\t\t\t\t} );\n\t\t\t\t// We have to build the tax query for the REST API and use as\n\t\t\t\t// keys the taxonomies `rest_base` with the `term ids` as values.\n\t\t\t\tconst builtTaxQuery = Object.entries( taxQuery ).reduce(\n\t\t\t\t\t( accumulator, [ taxonomySlug, terms ] ) => {\n\t\t\t\t\t\tconst taxonomy = taxonomies?.find(\n\t\t\t\t\t\t\t( { slug } ) => slug === taxonomySlug\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( taxonomy?.rest_base ) {\n\t\t\t\t\t\t\taccumulator[ taxonomy?.rest_base ] = terms;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn accumulator;\n\t\t\t\t\t},\n\t\t\t\t\t{}\n\t\t\t\t);\n\t\t\t\tif ( !! Object.keys( builtTaxQuery ).length ) {\n\t\t\t\t\tObject.assign( query, builtTaxQuery );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( perPage ) {\n\t\t\t\tquery.per_page = perPage;\n\t\t\t}\n\t\t\tif ( author ) {\n\t\t\t\tquery.author = author;\n\t\t\t}\n\t\t\tif ( search ) {\n\t\t\t\tquery.search = search;\n\t\t\t}\n\t\t\tif ( exclude?.length ) {\n\t\t\t\tquery.exclude = exclude;\n\t\t\t}\n\t\t\tif ( parents?.length ) {\n\t\t\t\tquery.parent = parents;\n\t\t\t}\n\t\t\tif ( format?.length ) {\n\t\t\t\tquery.format = format;\n\t\t\t}\n\n\t\t\t// If sticky is not set, it will return all posts in the results.\n\t\t\t// If sticky is set to `only`, it will limit the results to sticky posts only.\n\t\t\t// If it is anything else, it will exclude sticky posts from results. For the record the value stored is `exclude`.\n\t\t\tif ( sticky ) {\n\t\t\t\tquery.sticky = sticky === 'only';\n\t\t\t}\n\t\t\t// If `inherit` is truthy, adjust conditionally the query to create a better preview.\n\t\t\tif ( inherit ) {\n\t\t\t\t// Change the post-type if needed.\n\t\t\t\tif ( templateSlug?.startsWith( 'archive-' ) ) {\n\t\t\t\t\tquery.postType = templateSlug.replace( 'archive-', '' );\n\t\t\t\t\tpostType = query.postType;\n\t\t\t\t} else if ( templateCategory ) {\n\t\t\t\t\tquery.categories = templateCategory[ 0 ]?.id;\n\t\t\t\t} else if ( templateTag ) {\n\t\t\t\t\tquery.tags = templateTag[ 0 ]?.id;\n\t\t\t\t} else if (\n\t\t\t\t\ttemplateSlug?.startsWith( 'taxonomy-post_format' )\n\t\t\t\t) {\n\t\t\t\t\t// Get the post format slug from the template slug by removing the prefix.\n\t\t\t\t\tquery.format = templateSlug.replace(\n\t\t\t\t\t\t'taxonomy-post_format-post-format-',\n\t\t\t\t\t\t''\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// When we preview Query Loop blocks we should prefer the current\n\t\t\t// block's postType, which is passed through block context.\n\t\t\tconst usedPostType = previewPostType || postType;\n\t\t\treturn {\n\t\t\t\tposts: getEntityRecords( 'postType', usedPostType, {\n\t\t\t\t\t...query,\n\t\t\t\t\t...restQueryArgs,\n\t\t\t\t} ),\n\t\t\t\tblocks: getBlocks( clientId ),\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tperPage,\n\t\t\toffset,\n\t\t\torder,\n\t\t\torderBy,\n\t\t\tclientId,\n\t\t\tauthor,\n\t\t\tsearch,\n\t\t\tpostType,\n\t\t\texclude,\n\t\t\tsticky,\n\t\t\tinherit,\n\t\t\ttemplateSlug,\n\t\t\ttaxQuery,\n\t\t\tparents,\n\t\t\tformat,\n\t\t\trestQueryArgs,\n\t\t\tpreviewPostType,\n\t\t]\n\t);\n\tconst blockContexts = useMemo(\n\t\t() =>\n\t\t\tposts?.map( ( post ) => ( {\n\t\t\t\tpostType: post.type,\n\t\t\t\tpostId: post.id,\n\t\t\t\tclassList: post.class_list ?? '',\n\t\t\t} ) ),\n\t\t[ posts ]\n\t);\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( __unstableLayoutClassNames, {\n\t\t\t[ `columns-${ columnCount }` ]:\n\t\t\t\tlayoutType === 'grid' && columnCount, // Ensure column count is flagged via classname for backwards compatibility.\n\t\t} ),\n\t} );\n\n\tif ( ! posts ) {\n\t\treturn (\n\t\t\t<p { ...blockProps }>\n\t\t\t\t<Spinner />\n\t\t\t</p>\n\t\t);\n\t}\n\n\tif ( ! posts.length ) {\n\t\treturn <p { ...blockProps }> { __( 'No results found.' ) }</p>;\n\t}\n\n\tconst setDisplayLayout = ( newDisplayLayout ) =>\n\t\tsetAttributes( {\n\t\t\tlayout: { ...layout, ...newDisplayLayout },\n\t\t} );\n\n\tconst displayLayoutControls = [\n\t\t{\n\t\t\ticon: list,\n\t\t\ttitle: _x( 'List view', 'Post template block display setting' ),\n\t\t\tonClick: () => setDisplayLayout( { type: 'default' } ),\n\t\t\tisActive: layoutType === 'default' || layoutType === 'constrained',\n\t\t},\n\t\t{\n\t\t\ticon: grid,\n\t\t\ttitle: _x( 'Grid view', 'Post template block display setting' ),\n\t\t\tonClick: () =>\n\t\t\t\tsetDisplayLayout( {\n\t\t\t\t\ttype: 'grid',\n\t\t\t\t\tcolumnCount,\n\t\t\t\t} ),\n\t\t\tisActive: layoutType === 'grid',\n\t\t},\n\t];\n\n\t// To avoid flicker when switching active block contexts, a preview is rendered\n\t// for each block context, but the preview for the active block context is hidden.\n\t// This ensures that when it is displayed again, the cached rendering of the\n\t// block preview is used, instead of having to re-render the preview from scratch.\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup controls={ displayLayoutControls } />\n\t\t\t</BlockControls>\n\n\t\t\t<ul { ...blockProps }>\n\t\t\t\t{ blockContexts &&\n\t\t\t\t\tblockContexts.map( ( blockContext ) => (\n\t\t\t\t\t\t<BlockContextProvider\n\t\t\t\t\t\t\tkey={ blockContext.postId }\n\t\t\t\t\t\t\tvalue={ blockContext }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ blockContext.postId ===\n\t\t\t\t\t\t\t( activeBlockContextId ||\n\t\t\t\t\t\t\t\tblockContexts[ 0 ]?.postId ) ? (\n\t\t\t\t\t\t\t\t<PostTemplateInnerBlocks\n\t\t\t\t\t\t\t\t\tclassList={ blockContext.classList }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : null }\n\t\t\t\t\t\t\t<MemoizedPostTemplateBlockPreview\n\t\t\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\t\t\tblockContextId={ blockContext.postId }\n\t\t\t\t\t\t\t\tclassList={ blockContext.classList }\n\t\t\t\t\t\t\t\tsetActiveBlockContextId={\n\t\t\t\t\t\t\t\t\tsetActiveBlockContextId\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisHidden={\n\t\t\t\t\t\t\t\t\tblockContext.postId ===\n\t\t\t\t\t\t\t\t\t( activeBlockContextId ||\n\t\t\t\t\t\t\t\t\t\tblockContexts[ 0 ]?.postId )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</BlockContextProvider>\n\t\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAQA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAA8C,IAAAQ,WAAA,GAAAR,OAAA;AArB9C;AACA;AACA;;AAGA;AACA;AACA;;AAgBA,MAAMS,QAAQ,GAAG,CAChB,CAAE,iBAAiB,CAAE,EACrB,CAAE,gBAAgB,CAAE,EACpB,CAAE,mBAAmB,CAAE,CACvB;AAED,SAASC,uBAAuBA,CAAE;EAAEC;AAAU,CAAC,EAAG;EACjD,MAAMC,gBAAgB,GAAG,IAAAC,gCAAmB,EAC3C;IAAEC,SAAS,EAAE,IAAAC,aAAI,EAAE,eAAe,EAAEJ,SAAU;EAAE,CAAC,EACjD;IAAEK,QAAQ,EAAEP,QAAQ;IAAEQ,iCAAiC,EAAE;EAAK,CAC/D,CAAC;EACD,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,EAAEK,MAAM;QAC3B,CACD,CAAC;MAAA,GAtBIqB,YAAY,CAACrB,MAuBE,CACrB;IAAC,CACD,CAAC;EAAA,CACJ,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_data","_i18n","_blockEditor","_components","_coreData","_icons","_jsxRuntime","TEMPLATE","PostTemplateInnerBlocks","classList","innerBlocksProps","useInnerBlocksProps","className","clsx","template","__unstableDisableLayoutClassNames","jsx","PostTemplateBlockPreview","blocks","blockContextId","isHidden","setActiveBlockContextId","blockPreviewProps","useBlockPreview","props","handleOnClick","style","display","undefined","tabIndex","role","onClick","onKeyPress","MemoizedPostTemplateBlockPreview","memo","PostTemplateEdit","setAttributes","clientId","context","query","perPage","offset","postType","order","orderBy","author","search","exclude","sticky","inherit","taxQuery","parents","pages","format","restQueryArgs","templateSlug","previewPostType","attributes","layout","__unstableLayoutClassNames","type","layoutType","columnCount","activeBlockContextId","useState","posts","useSelect","select","getEntityRecords","getTaxonomies","coreStore","getBlocks","blockEditorStore","templateCategory","startsWith","per_page","_fields","slug","replace","templateTag","orderby","taxonomies","builtTaxQuery","Object","entries","reduce","accumulator","taxonomySlug","terms","taxonomy","find","rest_base","keys","length","assign","parent","ignore_sticky","currentPostType","categories","id","tags","usedPostType","blockContexts","useMemo","map","post","_post$class_list","postId","class_list","blockProps","useBlockProps","children","Spinner","jsxs","__","setDisplayLayout","newDisplayLayout","displayLayoutControls","icon","list","title","_x","isActive","grid","Fragment","BlockControls","ToolbarGroup","controls","blockContext","BlockContextProvider","value"],"sources":["@wordpress/block-library/src/post-template/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { memo, useMemo, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tBlockControls,\n\tBlockContextProvider,\n\t__experimentalUseBlockPreview as useBlockPreview,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { Spinner, ToolbarGroup } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { list, grid } from '@wordpress/icons';\n\nconst TEMPLATE = [\n\t[ 'core/post-title' ],\n\t[ 'core/post-date' ],\n\t[ 'core/post-excerpt' ],\n];\n\nfunction PostTemplateInnerBlocks( { classList } ) {\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{ className: clsx( 'wp-block-post', classList ) },\n\t\t{ template: TEMPLATE, __unstableDisableLayoutClassNames: true }\n\t);\n\treturn <li { ...innerBlocksProps } />;\n}\n\nfunction PostTemplateBlockPreview( {\n\tblocks,\n\tblockContextId,\n\tclassList,\n\tisHidden,\n\tsetActiveBlockContextId,\n} ) {\n\tconst blockPreviewProps = useBlockPreview( {\n\t\tblocks,\n\t\tprops: {\n\t\t\tclassName: clsx( 'wp-block-post', classList ),\n\t\t},\n\t} );\n\n\tconst handleOnClick = () => {\n\t\tsetActiveBlockContextId( blockContextId );\n\t};\n\n\tconst style = {\n\t\tdisplay: isHidden ? 'none' : undefined,\n\t};\n\n\treturn (\n\t\t<li\n\t\t\t{ ...blockPreviewProps }\n\t\t\ttabIndex={ 0 }\n\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n\t\t\trole=\"button\"\n\t\t\tonClick={ handleOnClick }\n\t\t\tonKeyPress={ handleOnClick }\n\t\t\tstyle={ style }\n\t\t/>\n\t);\n}\n\nconst MemoizedPostTemplateBlockPreview = memo( PostTemplateBlockPreview );\n\nexport default function PostTemplateEdit( {\n\tsetAttributes,\n\tclientId,\n\tcontext: {\n\t\tquery: {\n\t\t\tperPage,\n\t\t\toffset = 0,\n\t\t\tpostType,\n\t\t\torder,\n\t\t\torderBy,\n\t\t\tauthor,\n\t\t\tsearch,\n\t\t\texclude,\n\t\t\tsticky,\n\t\t\tinherit,\n\t\t\ttaxQuery,\n\t\t\tparents,\n\t\t\tpages,\n\t\t\tformat,\n\t\t\t// We gather extra query args to pass to the REST API call.\n\t\t\t// This way extenders of Query Loop can add their own query args,\n\t\t\t// and have accurate previews in the editor.\n\t\t\t// Noting though that these args should either be supported by the\n\t\t\t// REST API or be handled by custom REST filters like `rest_{$this->post_type}_query`.\n\t\t\t...restQueryArgs\n\t\t} = {},\n\t\ttemplateSlug,\n\t\tpreviewPostType,\n\t},\n\tattributes: { layout },\n\t__unstableLayoutClassNames,\n} ) {\n\tconst { type: layoutType, columnCount = 3 } = layout || {};\n\tconst [ activeBlockContextId, setActiveBlockContextId ] = useState();\n\tconst { posts, blocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords, getTaxonomies } = select( coreStore );\n\t\t\tconst { getBlocks } = select( blockEditorStore );\n\t\t\tconst templateCategory =\n\t\t\t\tinherit &&\n\t\t\t\ttemplateSlug?.startsWith( 'category-' ) &&\n\t\t\t\tgetEntityRecords( 'taxonomy', 'category', {\n\t\t\t\t\tcontext: 'view',\n\t\t\t\t\tper_page: 1,\n\t\t\t\t\t_fields: [ 'id' ],\n\t\t\t\t\tslug: templateSlug.replace( 'category-', '' ),\n\t\t\t\t} );\n\t\t\tconst templateTag =\n\t\t\t\tinherit &&\n\t\t\t\ttemplateSlug?.startsWith( 'tag-' ) &&\n\t\t\t\tgetEntityRecords( 'taxonomy', 'post_tag', {\n\t\t\t\t\tcontext: 'view',\n\t\t\t\t\tper_page: 1,\n\t\t\t\t\t_fields: [ 'id' ],\n\t\t\t\t\tslug: templateSlug.replace( 'tag-', '' ),\n\t\t\t\t} );\n\t\t\tconst query = {\n\t\t\t\toffset: offset || 0,\n\t\t\t\torder,\n\t\t\t\torderby: orderBy,\n\t\t\t};\n\t\t\t// There is no need to build the taxQuery if we inherit.\n\t\t\tif ( taxQuery && ! inherit ) {\n\t\t\t\tconst taxonomies = getTaxonomies( {\n\t\t\t\t\ttype: postType,\n\t\t\t\t\tper_page: -1,\n\t\t\t\t\tcontext: 'view',\n\t\t\t\t} );\n\t\t\t\t// We have to build the tax query for the REST API and use as\n\t\t\t\t// keys the taxonomies `rest_base` with the `term ids` as values.\n\t\t\t\tconst builtTaxQuery = Object.entries( taxQuery ).reduce(\n\t\t\t\t\t( accumulator, [ taxonomySlug, terms ] ) => {\n\t\t\t\t\t\tconst taxonomy = taxonomies?.find(\n\t\t\t\t\t\t\t( { slug } ) => slug === taxonomySlug\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( taxonomy?.rest_base ) {\n\t\t\t\t\t\t\taccumulator[ taxonomy?.rest_base ] = terms;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn accumulator;\n\t\t\t\t\t},\n\t\t\t\t\t{}\n\t\t\t\t);\n\t\t\t\tif ( !! Object.keys( builtTaxQuery ).length ) {\n\t\t\t\t\tObject.assign( query, builtTaxQuery );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( perPage ) {\n\t\t\t\tquery.per_page = perPage;\n\t\t\t}\n\t\t\tif ( author ) {\n\t\t\t\tquery.author = author;\n\t\t\t}\n\t\t\tif ( search ) {\n\t\t\t\tquery.search = search;\n\t\t\t}\n\t\t\tif ( exclude?.length ) {\n\t\t\t\tquery.exclude = exclude;\n\t\t\t}\n\t\t\tif ( parents?.length ) {\n\t\t\t\tquery.parent = parents;\n\t\t\t}\n\t\t\tif ( format?.length ) {\n\t\t\t\tquery.format = format;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Handle cases where sticky is set to `exclude` or `only`.\n\t\t\t * Which works as a `post__in/post__not_in` query for sticky posts.\n\t\t\t */\n\t\t\tif ( sticky && sticky !== 'ignore' ) {\n\t\t\t\tquery.sticky = sticky === 'only';\n\t\t\t}\n\n\t\t\tif ( sticky === 'ignore' ) {\n\t\t\t\t// Remove any leftover sticky query parameter.\n\t\t\t\tdelete query.sticky;\n\t\t\t\tquery.ignore_sticky = true;\n\t\t\t}\n\n\t\t\t// If `inherit` is truthy, adjust conditionally the query to create a better preview.\n\t\t\tlet currentPostType = postType;\n\t\t\tif ( inherit ) {\n\t\t\t\t// Change the post-type if needed.\n\t\t\t\tif ( templateSlug?.startsWith( 'archive-' ) ) {\n\t\t\t\t\tquery.postType = templateSlug.replace( 'archive-', '' );\n\t\t\t\t\tcurrentPostType = query.postType;\n\t\t\t\t} else if ( templateCategory ) {\n\t\t\t\t\tquery.categories = templateCategory[ 0 ]?.id;\n\t\t\t\t} else if ( templateTag ) {\n\t\t\t\t\tquery.tags = templateTag[ 0 ]?.id;\n\t\t\t\t} else if (\n\t\t\t\t\ttemplateSlug?.startsWith( 'taxonomy-post_format' )\n\t\t\t\t) {\n\t\t\t\t\t// Get the post format slug from the template slug by removing the prefix.\n\t\t\t\t\tquery.format = templateSlug.replace(\n\t\t\t\t\t\t'taxonomy-post_format-post-format-',\n\t\t\t\t\t\t''\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// When we preview Query Loop blocks we should prefer the current\n\t\t\t// block's postType, which is passed through block context.\n\t\t\tconst usedPostType = previewPostType || currentPostType;\n\t\t\treturn {\n\t\t\t\tposts: getEntityRecords( 'postType', usedPostType, {\n\t\t\t\t\t...query,\n\t\t\t\t\t...restQueryArgs,\n\t\t\t\t} ),\n\t\t\t\tblocks: getBlocks( clientId ),\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tperPage,\n\t\t\toffset,\n\t\t\torder,\n\t\t\torderBy,\n\t\t\tclientId,\n\t\t\tauthor,\n\t\t\tsearch,\n\t\t\tpostType,\n\t\t\texclude,\n\t\t\tsticky,\n\t\t\tinherit,\n\t\t\ttemplateSlug,\n\t\t\ttaxQuery,\n\t\t\tparents,\n\t\t\tformat,\n\t\t\trestQueryArgs,\n\t\t\tpreviewPostType,\n\t\t]\n\t);\n\tconst blockContexts = useMemo(\n\t\t() =>\n\t\t\tposts?.map( ( post ) => ( {\n\t\t\t\tpostType: post.type,\n\t\t\t\tpostId: post.id,\n\t\t\t\tclassList: post.class_list ?? '',\n\t\t\t} ) ),\n\t\t[ posts ]\n\t);\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( __unstableLayoutClassNames, {\n\t\t\t[ `columns-${ columnCount }` ]:\n\t\t\t\tlayoutType === 'grid' && columnCount, // Ensure column count is flagged via classname for backwards compatibility.\n\t\t} ),\n\t} );\n\n\tif ( ! posts ) {\n\t\treturn (\n\t\t\t<p { ...blockProps }>\n\t\t\t\t<Spinner />\n\t\t\t</p>\n\t\t);\n\t}\n\n\tif ( ! posts.length ) {\n\t\treturn <p { ...blockProps }> { __( 'No results found.' ) }</p>;\n\t}\n\n\tconst setDisplayLayout = ( newDisplayLayout ) =>\n\t\tsetAttributes( {\n\t\t\tlayout: { ...layout, ...newDisplayLayout },\n\t\t} );\n\n\tconst displayLayoutControls = [\n\t\t{\n\t\t\ticon: list,\n\t\t\ttitle: _x( 'List view', 'Post template block display setting' ),\n\t\t\tonClick: () => setDisplayLayout( { type: 'default' } ),\n\t\t\tisActive: layoutType === 'default' || layoutType === 'constrained',\n\t\t},\n\t\t{\n\t\t\ticon: grid,\n\t\t\ttitle: _x( 'Grid view', 'Post template block display setting' ),\n\t\t\tonClick: () =>\n\t\t\t\tsetDisplayLayout( {\n\t\t\t\t\ttype: 'grid',\n\t\t\t\t\tcolumnCount,\n\t\t\t\t} ),\n\t\t\tisActive: layoutType === 'grid',\n\t\t},\n\t];\n\n\t// To avoid flicker when switching active block contexts, a preview is rendered\n\t// for each block context, but the preview for the active block context is hidden.\n\t// This ensures that when it is displayed again, the cached rendering of the\n\t// block preview is used, instead of having to re-render the preview from scratch.\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup controls={ displayLayoutControls } />\n\t\t\t</BlockControls>\n\n\t\t\t<ul { ...blockProps }>\n\t\t\t\t{ blockContexts &&\n\t\t\t\t\tblockContexts.map( ( blockContext ) => (\n\t\t\t\t\t\t<BlockContextProvider\n\t\t\t\t\t\t\tkey={ blockContext.postId }\n\t\t\t\t\t\t\tvalue={ blockContext }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ blockContext.postId ===\n\t\t\t\t\t\t\t( activeBlockContextId ||\n\t\t\t\t\t\t\t\tblockContexts[ 0 ]?.postId ) ? (\n\t\t\t\t\t\t\t\t<PostTemplateInnerBlocks\n\t\t\t\t\t\t\t\t\tclassList={ blockContext.classList }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : null }\n\t\t\t\t\t\t\t<MemoizedPostTemplateBlockPreview\n\t\t\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\t\t\tblockContextId={ blockContext.postId }\n\t\t\t\t\t\t\t\tclassList={ blockContext.classList }\n\t\t\t\t\t\t\t\tsetActiveBlockContextId={\n\t\t\t\t\t\t\t\t\tsetActiveBlockContextId\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisHidden={\n\t\t\t\t\t\t\t\t\tblockContext.postId ===\n\t\t\t\t\t\t\t\t\t( activeBlockContextId ||\n\t\t\t\t\t\t\t\t\t\tblockContexts[ 0 ]?.postId )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</BlockContextProvider>\n\t\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAQA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAA8C,IAAAQ,WAAA,GAAAR,OAAA;AArB9C;AACA;AACA;;AAGA;AACA;AACA;;AAgBA,MAAMS,QAAQ,GAAG,CAChB,CAAE,iBAAiB,CAAE,EACrB,CAAE,gBAAg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AAA,GAEpBiB,YAAY,CAACrB,MAAM,MACnB5C,oBAAoB,IACrBuC,aAAa,CAAE,CAAC,CAAE,EAAEK,MAAM,CAAE,gBAC5B,IAAArG,WAAA,CAAAU,GAAA,EAACR,uBAAuB;UACvBC,SAAS,EAAGuH,YAAY,CAACvH;QAAW,CACpC,CAAC,GACC,IAAI,eACR,IAAAH,WAAA,CAAAU,GAAA,EAACiB,gCAAgC;UAChCf,MAAM,EAAGA,MAAQ;UACjBC,cAAc,EAAG6G,YAAY,CAACrB,MAAQ;UACtClG,SAAS,EAAGuH,YAAY,CAACvH,SAAW;UACpCY,uBAAuB,EACtBA,uBACA;UACDD,QAAQ,EACP4G,YAAY,CAACrB,MAAM,MACjB5C,oBAAoB,IACrBuC,aAAa,CAAE,CAAC,CAAE,EAAEK,MAAM;QAC3B,CACD,CAAC;MAAA,GAtBIqB,YAAY,CAACrB,MAuBE,CACrB;IAAC,CACD,CAAC;EAAA,CACJ,CAAC;AAEL","ignoreList":[]}
|
package/build/post-terms/edit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_blocks","_components","_data","_htmlEntities","_i18n","_coreData","_usePostTerms","_jsxRuntime","ALLOWED_FORMATS","PostTermsEdit","attributes","clientId","context","isSelected","setAttributes","insertBlocksAfter","term","textAlign","separator","prefix","suffix","postId","postType","selectedTerm","useSelect","select","getTaxonomy","coreStore","taxonomy","visibility","publicly_queryable","postTerms","hasPostTerms","isLoading","usePostTerms","hasPost","blockInformation","useBlockDisplayInformation","blockProps","useBlockProps","className","clsx","jsxs","Fragment","children","jsx","BlockControls","AlignmentToolbar","value","onChange","nextAlign","InspectorControls","group","TextControl","__next40pxDefaultSize","__nextHasNoMarginBottom","autoComplete","label","__","nextValue","help","Spinner","RichText","identifier","allowedFormats","placeholder","tagName","title","map","postTerm","href","link","onClick","event","preventDefault","rel","decodeEntities","name","id","reduce","prev","curr","labels","no_terms","__unstableOnSplitAtEnd","createBlock","getDefaultBlockName"],"sources":["@wordpress/block-library/src/post-terms/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentToolbar,\n\tInspectorControls,\n\tBlockControls,\n\tuseBlockProps,\n\tuseBlockDisplayInformation,\n\tRichText,\n} from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { Spinner, TextControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport usePostTerms from './use-post-terms';\n\n// Allowed formats for the prefix and suffix fields.\nconst ALLOWED_FORMATS = [\n\t'core/bold',\n\t'core/image',\n\t'core/italic',\n\t'core/link',\n\t'core/strikethrough',\n\t'core/text-color',\n];\n\nexport default function PostTermsEdit( {\n\tattributes,\n\tclientId,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tinsertBlocksAfter,\n} ) {\n\tconst { term, textAlign, separator, prefix, suffix } = attributes;\n\tconst { postId, postType } = context;\n\n\tconst selectedTerm = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! term ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst { getTaxonomy } = select( coreStore );\n\t\t\tconst taxonomy = getTaxonomy( term );\n\t\t\treturn taxonomy?.visibility?.publicly_queryable ? taxonomy : {};\n\t\t},\n\t\t[ term ]\n\t);\n\tconst { postTerms, hasPostTerms, isLoading } = usePostTerms( {\n\t\tpostId,\n\t\tterm: selectedTerm,\n\t} );\n\tconst hasPost = postId && postType;\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t[ `taxonomy-${ term }` ]: term,\n\t\t} ),\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<AlignmentToolbar\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<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tlabel={ __( 'Separator' ) }\n\t\t\t\t\tvalue={ separator || '' }\n\t\t\t\t\tonChange={ ( nextValue ) => {\n\t\t\t\t\t\tsetAttributes( { separator: nextValue } );\n\t\t\t\t\t} }\n\t\t\t\t\thelp={ __( 'Enter character(s) used to separate terms.' ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ isLoading && hasPost && <Spinner /> }\n\t\t\t\t{ ! isLoading && ( isSelected || prefix ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"prefix\"\n\t\t\t\t\t\tallowedFormats={ ALLOWED_FORMATS }\n\t\t\t\t\t\tclassName=\"wp-block-post-terms__prefix\"\n\t\t\t\t\t\taria-label={ __( 'Prefix' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Prefix' ) + ' ' }\n\t\t\t\t\t\tvalue={ prefix }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { prefix: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( ! hasPost || ! term ) && (\n\t\t\t\t\t<span>{ blockInformation.title }</span>\n\t\t\t\t) }\n\t\t\t\t{ hasPost &&\n\t\t\t\t\t! isLoading &&\n\t\t\t\t\thasPostTerms &&\n\t\t\t\t\tpostTerms\n\t\t\t\t\t\t.map( ( postTerm ) => (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tkey={ postTerm.id }\n\t\t\t\t\t\t\t\thref={ postTerm.link }\n\t\t\t\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\t\t\t\trel=\"tag\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( postTerm.name ) }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t) )\n\t\t\t\t\t\t.reduce( ( prev, curr ) => (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ prev }\n\t\t\t\t\t\t\t\t<span className=\"wp-block-post-terms__separator\">\n\t\t\t\t\t\t\t\t\t{ separator || ' ' }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{ curr }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) ) }\n\t\t\t\t{ hasPost &&\n\t\t\t\t\t! isLoading &&\n\t\t\t\t\t! hasPostTerms &&\n\t\t\t\t\t( selectedTerm?.labels?.no_terms ||\n\t\t\t\t\t\t__( 'Term items not found.' ) ) }\n\t\t\t\t{ ! isLoading && ( isSelected || suffix ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"suffix\"\n\t\t\t\t\t\tallowedFormats={ ALLOWED_FORMATS }\n\t\t\t\t\t\tclassName=\"wp-block-post-terms__suffix\"\n\t\t\t\t\t\taria-label={ __( 'Suffix' ) }\n\t\t\t\t\t\tplaceholder={ ' ' + __( 'Suffix' ) }\n\t\t\t\t\t\tvalue={ suffix }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { suffix: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )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S,EAMb,CACF,CAAC,CACFC,MAAM,CAAE,CAAEC,IAAI,EAAEC,IAAI,kBACpB,IAAA1E,WAAA,CAAAmC,IAAA,EAAAnC,WAAA,CAAAoC,QAAA;QAAAC,QAAA,GACGoC,IAAI,eACN,IAAAzE,WAAA,CAAAsC,GAAA;UAAML,SAAS,EAAC,gCAAgC;UAAAI,QAAA,EAC7C1B,SAAS,IAAI;QAAG,CACb,CAAC,EACL+D,IAAI;MAAA,CACL,CACD,CAAC,EACH9C,OAAO,IACR,CAAEF,SAAS,IACX,CAAED,YAAY,KACZT,YAAY,EAAE2D,MAAM,EAAEC,QAAQ,IAC/B,IAAAzB,QAAE,EAAE,uBAAwB,CAAC,CAAE,EAC/B,CAAEzB,SAAS,KAAMpB,UAAU,IAAIO,MAAM,CAAE,iBACxC,IAAAb,WAAA,CAAAsC,GAAA,EAAC9C,YAAA,CAAA+D,QAAQ;QACRC,UAAU,EAAC,QAAQ;QACnBC,cAAc,EAAGxD,eAAiB;QAClCgC,SAAS,EAAC,6BAA6B;QACvC,cAAa,IAAAkB,QAAE,EAAE,QAAS,CAAG;QAC7BO,WAAW,EAAG,GAAG,GAAG,IAAAP,QAAE,EAAE,QAAS,CAAG;QACpCV,KAAK,EAAG5B,MAAQ;QAChB6B,QAAQ,EAAKD,KAAK,IACjBlC,aAAa,CAAE;UAAEM,MAAM,EAAE4B;QAAM,CAAE,CACjC;QACDkB,OAAO,EAAC,MAAM;QACdkB,sBAAsB,EAAGA,CAAA,KACxBrE,iBAAiB,CAChB,IAAAsE,mBAAW,EAAE,IAAAC,2BAAmB,EAAC,CAAE,CACpC;MACA,CACD,CACD;IAAA,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_blocks","_components","_data","_htmlEntities","_i18n","_coreData","_usePostTerms","_jsxRuntime","ALLOWED_FORMATS","PostTermsEdit","attributes","clientId","context","isSelected","setAttributes","insertBlocksAfter","term","textAlign","separator","prefix","suffix","postId","postType","selectedTerm","useSelect","select","getTaxonomy","coreStore","taxonomy","visibility","publicly_queryable","postTerms","hasPostTerms","isLoading","usePostTerms","hasPost","blockInformation","useBlockDisplayInformation","blockProps","useBlockProps","className","clsx","jsxs","Fragment","children","jsx","BlockControls","AlignmentToolbar","value","onChange","nextAlign","InspectorControls","group","TextControl","__next40pxDefaultSize","__nextHasNoMarginBottom","autoComplete","label","__","nextValue","help","Spinner","RichText","identifier","allowedFormats","placeholder","tagName","title","map","postTerm","href","link","onClick","event","preventDefault","rel","decodeEntities","name","id","reduce","prev","curr","labels","no_terms","__unstableOnSplitAtEnd","createBlock","getDefaultBlockName"],"sources":["@wordpress/block-library/src/post-terms/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentToolbar,\n\tInspectorControls,\n\tBlockControls,\n\tuseBlockProps,\n\tuseBlockDisplayInformation,\n\tRichText,\n} from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { Spinner, TextControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport usePostTerms from './use-post-terms';\n\n// Allowed formats for the prefix and suffix fields.\nconst ALLOWED_FORMATS = [\n\t'core/bold',\n\t'core/image',\n\t'core/italic',\n\t'core/link',\n\t'core/strikethrough',\n\t'core/text-color',\n];\n\nexport default function PostTermsEdit( {\n\tattributes,\n\tclientId,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tinsertBlocksAfter,\n} ) {\n\tconst { term, textAlign, separator, prefix, suffix } = attributes;\n\tconst { postId, postType } = context;\n\n\tconst selectedTerm = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! term ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst { getTaxonomy } = select( coreStore );\n\t\t\tconst taxonomy = getTaxonomy( term );\n\t\t\treturn taxonomy?.visibility?.publicly_queryable ? taxonomy : {};\n\t\t},\n\t\t[ term ]\n\t);\n\tconst { postTerms, hasPostTerms, isLoading } = usePostTerms( {\n\t\tpostId,\n\t\tterm: selectedTerm,\n\t} );\n\tconst hasPost = postId && postType;\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t[ `taxonomy-${ term }` ]: term,\n\t\t} ),\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<AlignmentToolbar\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<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tlabel={ __( 'Separator' ) }\n\t\t\t\t\tvalue={ separator || '' }\n\t\t\t\t\tonChange={ ( nextValue ) => {\n\t\t\t\t\t\tsetAttributes( { separator: nextValue } );\n\t\t\t\t\t} }\n\t\t\t\t\thelp={ __( 'Enter character(s) used to separate terms.' ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ isLoading && hasPost && <Spinner /> }\n\t\t\t\t{ ! isLoading && ( isSelected || prefix ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"prefix\"\n\t\t\t\t\t\tallowedFormats={ ALLOWED_FORMATS }\n\t\t\t\t\t\tclassName=\"wp-block-post-terms__prefix\"\n\t\t\t\t\t\taria-label={ __( 'Prefix' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Prefix' ) + ' ' }\n\t\t\t\t\t\tvalue={ prefix }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { prefix: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( ! hasPost || ! term ) && (\n\t\t\t\t\t<span>{ blockInformation.title }</span>\n\t\t\t\t) }\n\t\t\t\t{ hasPost &&\n\t\t\t\t\t! isLoading &&\n\t\t\t\t\thasPostTerms &&\n\t\t\t\t\tpostTerms\n\t\t\t\t\t\t.map( ( postTerm ) => (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tkey={ postTerm.id }\n\t\t\t\t\t\t\t\thref={ postTerm.link }\n\t\t\t\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\t\t\t\trel=\"tag\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( postTerm.name ) }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t) )\n\t\t\t\t\t\t.reduce( ( prev, curr ) => (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ prev }\n\t\t\t\t\t\t\t\t<span className=\"wp-block-post-terms__separator\">\n\t\t\t\t\t\t\t\t\t{ separator || ' ' }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{ curr }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) ) }\n\t\t\t\t{ hasPost &&\n\t\t\t\t\t! isLoading &&\n\t\t\t\t\t! hasPostTerms &&\n\t\t\t\t\t( selectedTerm?.labels?.no_terms ||\n\t\t\t\t\t\t__( 'Term items not found.' ) ) }\n\t\t\t\t{ ! isLoading && ( isSelected || suffix ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"suffix\"\n\t\t\t\t\t\tallowedFormats={ ALLOWED_FORMATS }\n\t\t\t\t\t\tclassName=\"wp-block-post-terms__suffix\"\n\t\t\t\t\t\taria-label={ __( 'Suffix' ) }\n\t\t\t\t\t\tplaceholder={ ' ' + __( 'Suffix' ) }\n\t\t\t\t\t\tvalue={ suffix }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { suffix: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAKA,IAAAQ,aAAA,GAAAT,sBAAA,CAAAC,OAAA;AAA4C,IAAAS,WAAA,GAAAT,OAAA;AA1B5C;AACA;AACA;;AAGA;AACA;AACA;;AAgBA;AACA;AACA;;AAGA;AACA,MAAMU,eAAe,GAAG,CACvB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,iBAAiB,CACjB;AAEc,SAASC,aAAaA,CAAE;EACtCC,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC,UAAU;EACVC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,IAAI;IAAEC,SAAS;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAA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UAAEM,MAAM,EAAE4B;QAAM,CAAE,CACjC;QACDkB,OAAO,EAAC,MAAM;QACdkB,sBAAsB,EAAGA,CAAA,KACxBrE,iBAAiB,CAChB,IAAAsE,mBAAW,EAAE,IAAAC,2BAAmB,EAAC,CAAE,CACpC;MACA,CACD,CACD;IAAA,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_icons","require","variationIconMap","category","postCategories","post_tag","postTerms","enhanceVariations","settings","name","variations","map","variation","_variationIconMap$var","icon"],"sources":["@wordpress/block-library/src/post-terms/hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postCategories, postTerms } from '@wordpress/icons';\n\nconst variationIconMap = {\n\tcategory: postCategories,\n\tpost_tag: postTerms,\n};\n\n// We add `icons` to categories and tags. The remaining ones use\n// the block's default icon.\nexport default function enhanceVariations( settings, name ) {\n\tif ( name !== 'core/post-terms' ) {\n\t\treturn settings;\n\t}\n\tconst variations = settings.variations.map( ( variation ) => ( {\n\t\t...variation,\n\t\t...{\n\t\t\ticon: variationIconMap[ variation.name ] ?? postCategories,\n\t\t},\n\t} ) );\n\treturn {\n\t\t...settings,\n\t\tvariations,\n\t};\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_icons","require","variationIconMap","category","postCategories","post_tag","postTerms","enhanceVariations","settings","name","variations","map","variation","_variationIconMap$var","icon"],"sources":["@wordpress/block-library/src/post-terms/hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postCategories, postTerms } from '@wordpress/icons';\n\nconst variationIconMap = {\n\tcategory: postCategories,\n\tpost_tag: postTerms,\n};\n\n// We add `icons` to categories and tags. The remaining ones use\n// the block's default icon.\nexport default function enhanceVariations( settings, name ) {\n\tif ( name !== 'core/post-terms' ) {\n\t\treturn settings;\n\t}\n\tconst variations = settings.variations.map( ( variation ) => ( {\n\t\t...variation,\n\t\t...{\n\t\t\ticon: variationIconMap[ variation.name ] ?? postCategories,\n\t\t},\n\t} ) );\n\treturn {\n\t\t...settings,\n\t\tvariations,\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAMC,gBAAgB,GAAG;EACxBC,QAAQ,EAAEC,qBAAc;EACxBC,QAAQ,EAAEC;AACX,CAAC;;AAED;AACA;AACe,SAASC,iBAAiBA,CAAEC,QAAQ,EAAEC,IAAI,EAAG;EAC3D,IAAKA,IAAI,KAAK,iBAAiB,EAAG;IACjC,OAAOD,QAAQ;EAChB;EACA,MAAME,UAAU,GAAGF,QAAQ,CAACE,UAAU,CAACC,GAAG,CAAIC,SAAS;IAAA,IAAAC,qBAAA;IAAA,OAAQ;MAC9D,GAAGD,SAAS;MACZ,GAAG;QACFE,IAAI,GAAAD,qBAAA,GAAEX,gBAAgB,CAAEU,SAAS,CAACH,IAAI,CAAE,cAAAI,qBAAA,cAAAA,qBAAA,GAAIT;MAC7C;IACD,CAAC;EAAA,CAAG,CAAC;EACL,OAAO;IACN,GAAGI,QAAQ;IACXE;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_element","_blockquote","_interopRequireDefault","_jsxRuntime","BlockQuote","props","citationStyle","styles","citation","quoteStyle","quote","textColor","color","placeholderColor","newChildren","Children","map","children","child","identifier","cloneElement","style","jsx","View","exports"],"sources":["@wordpress/block-library/src/pullquote/blockquote.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { Children, cloneElement } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport styles from './blockquote.scss';\n\nexport const BlockQuote = ( props ) => {\n\tconst citationStyle = { ...styles.citation };\n\tconst quoteStyle = { ...styles.quote };\n\n\tif ( props.textColor ) {\n\t\tquoteStyle.color = props.textColor;\n\t\tquoteStyle.placeholderColor = props.textColor;\n\t\tcitationStyle.color = props.textColor;\n\t\tcitationStyle.placeholderColor = props.textColor;\n\t}\n\n\tconst newChildren = Children.map( props.children, ( child ) => {\n\t\tif ( child && child.props.identifier === 'value' ) {\n\t\t\treturn cloneElement( child, {\n\t\t\t\tstyle: quoteStyle,\n\t\t\t} );\n\t\t}\n\t\tif ( child && child.props.identifier === 'citation' ) {\n\t\t\treturn cloneElement( child, {\n\t\t\t\tstyle: citationStyle,\n\t\t\t} );\n\t\t}\n\t\treturn child;\n\t} );\n\treturn <View>{ newChildren }</View>;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_element","_blockquote","_interopRequireDefault","_jsxRuntime","BlockQuote","props","citationStyle","styles","citation","quoteStyle","quote","textColor","color","placeholderColor","newChildren","Children","map","children","child","identifier","cloneElement","style","jsx","View","exports"],"sources":["@wordpress/block-library/src/pullquote/blockquote.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { Children, cloneElement } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport styles from './blockquote.scss';\n\nexport const BlockQuote = ( props ) => {\n\tconst citationStyle = { ...styles.citation };\n\tconst quoteStyle = { ...styles.quote };\n\n\tif ( props.textColor ) {\n\t\tquoteStyle.color = props.textColor;\n\t\tquoteStyle.placeholderColor = props.textColor;\n\t\tcitationStyle.color = props.textColor;\n\t\tcitationStyle.placeholderColor = props.textColor;\n\t}\n\n\tconst newChildren = Children.map( props.children, ( child ) => {\n\t\tif ( child && child.props.identifier === 'value' ) {\n\t\t\treturn cloneElement( child, {\n\t\t\t\tstyle: quoteStyle,\n\t\t\t} );\n\t\t}\n\t\tif ( child && child.props.identifier === 'citation' ) {\n\t\t\treturn cloneElement( child, {\n\t\t\t\tstyle: citationStyle,\n\t\t\t} );\n\t\t}\n\t\treturn child;\n\t} );\n\treturn <View>{ newChildren }</View>;\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OA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 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_richText","transforms","from","type","isMultiBlock","blocks","transform","attributes","createBlock","value","toHTMLString","join","map","content","create","html","anchor","to","citation","paragraphs","push","length","headingBlock","_default","exports","default"],"sources":["@wordpress/block-library/src/pullquote/transforms.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlock } from '@wordpress/blocks';\nimport { create, join, toHTMLString } from '@wordpress/rich-text';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tisMultiBlock: true,\n\t\t\tblocks: [ 'core/paragraph' ],\n\t\t\ttransform: ( attributes ) => {\n\t\t\t\treturn createBlock( 'core/pullquote', {\n\t\t\t\t\tvalue: toHTMLString( {\n\t\t\t\t\t\tvalue: join(\n\t\t\t\t\t\t\tattributes.map( ( { content } ) =>\n\t\t\t\t\t\t\t\tcreate( { html: content } )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'\\n'\n\t\t\t\t\t\t),\n\t\t\t\t\t} ),\n\t\t\t\t\tanchor: attributes.anchor,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/heading' ],\n\t\t\ttransform: ( { content, anchor } ) => {\n\t\t\t\treturn createBlock( 'core/pullquote', {\n\t\t\t\t\tvalue: content,\n\t\t\t\t\tanchor,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t],\n\tto: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/paragraph' ],\n\t\t\ttransform: ( { value, citation } ) => {\n\t\t\t\tconst paragraphs = [];\n\t\t\t\tif ( value ) {\n\t\t\t\t\tparagraphs.push(\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: value,\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif ( citation ) {\n\t\t\t\t\tparagraphs.push(\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif ( paragraphs.length === 0 ) {\n\t\t\t\t\treturn createBlock( 'core/paragraph', {\n\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn paragraphs;\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/heading' ],\n\t\t\ttransform: ( { value, citation } ) => {\n\t\t\t\t// If there is no pullquote content, use the citation as the\n\t\t\t\t// content of the resulting heading. A nonexistent citation\n\t\t\t\t// will result in an empty heading.\n\t\t\t\tif ( ! value ) {\n\t\t\t\t\treturn createBlock( 'core/heading', {\n\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tconst headingBlock = createBlock( 'core/heading', {\n\t\t\t\t\tcontent: value,\n\t\t\t\t} );\n\t\t\t\tif ( ! citation ) {\n\t\t\t\t\treturn headingBlock;\n\t\t\t\t}\n\t\t\t\treturn [\n\t\t\t\t\theadingBlock,\n\t\t\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t} ),\n\t\t\t\t];\n\t\t\t},\n\t\t},\n\t],\n};\n\nexport default transforms;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_blocks","require","_richText","transforms","from","type","isMultiBlock","blocks","transform","attributes","createBlock","value","toHTMLString","join","map","content","create","html","anchor","to","citation","paragraphs","push","length","headingBlock","_default","exports","default"],"sources":["@wordpress/block-library/src/pullquote/transforms.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlock } from '@wordpress/blocks';\nimport { create, join, toHTMLString } from '@wordpress/rich-text';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tisMultiBlock: true,\n\t\t\tblocks: [ 'core/paragraph' ],\n\t\t\ttransform: ( attributes ) => {\n\t\t\t\treturn createBlock( 'core/pullquote', {\n\t\t\t\t\tvalue: toHTMLString( {\n\t\t\t\t\t\tvalue: join(\n\t\t\t\t\t\t\tattributes.map( ( { content } ) =>\n\t\t\t\t\t\t\t\tcreate( { html: content } )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'\\n'\n\t\t\t\t\t\t),\n\t\t\t\t\t} ),\n\t\t\t\t\tanchor: attributes.anchor,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/heading' ],\n\t\t\ttransform: ( { content, anchor } ) => {\n\t\t\t\treturn createBlock( 'core/pullquote', {\n\t\t\t\t\tvalue: content,\n\t\t\t\t\tanchor,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t],\n\tto: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/paragraph' ],\n\t\t\ttransform: ( { value, citation } ) => {\n\t\t\t\tconst paragraphs = [];\n\t\t\t\tif ( value ) {\n\t\t\t\t\tparagraphs.push(\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: value,\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif ( citation ) {\n\t\t\t\t\tparagraphs.push(\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif ( paragraphs.length === 0 ) {\n\t\t\t\t\treturn createBlock( 'core/paragraph', {\n\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn paragraphs;\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/heading' ],\n\t\t\ttransform: ( { value, citation } ) => {\n\t\t\t\t// If there is no pullquote content, use the citation as the\n\t\t\t\t// content of the resulting heading. A nonexistent citation\n\t\t\t\t// will result in an empty heading.\n\t\t\t\tif ( ! value ) {\n\t\t\t\t\treturn createBlock( 'core/heading', {\n\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tconst headingBlock = createBlock( 'core/heading', {\n\t\t\t\t\tcontent: value,\n\t\t\t\t} );\n\t\t\t\tif ( ! citation ) {\n\t\t\t\t\treturn headingBlock;\n\t\t\t\t}\n\t\t\t\treturn [\n\t\t\t\t\theadingBlock,\n\t\t\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t} ),\n\t\t\t\t];\n\t\t\t},\n\t\t},\n\t],\n};\n\nexport default transforms;\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAME,UAAU,GAAG;EAClBC,IAAI,EAAE,CACL;IACCC,IAAI,EAAE,OAAO;IACbC,YAAY,EAAE,IAAI;IAClBC,MAAM,EAAE,CAAE,gBAAgB,CAAE;IAC5BC,SAAS,EAAIC,UAAU,IAAM;MAC5B,OAAO,IAAAC,mBAAW,EAAE,gBAAgB,EAAE;QACrCC,KAAK,EAAE,IAAAC,sBAAY,EAAE;UACpBD,KAAK,EAAE,IAAAE,cAAI,EACVJ,UAAU,CAACK,GAAG,CAAE,CAAE;YAAEC;UAAQ,CAAC,KAC5B,IAAAC,gBAAM,EAAE;YAAEC,IAAI,EAAEF;UAAQ,CAAE,CAC3B,CAAC,EACD,IACD;QACD,CAAE,CAAC;QACHG,MAAM,EAAET,UAAU,CAACS;MACpB,CAAE,CAAC;IACJ;EACD,CAAC,EACD;IACCb,IAAI,EAAE,OAAO;IACbE,MAAM,EAAE,CAAE,cAAc,CAAE;IAC1BC,SAAS,EAAEA,CAAE;MAAEO,OAAO;MAAEG;IAAO,CAAC,KAAM;MACrC,OAAO,IAA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