@wordpress/block-library 8.2.0 → 8.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/babel-plugin.js +1 -1
- package/build/archives/index.js +1 -0
- package/build/archives/index.js.map +1 -1
- package/build/avatar/index.js +1 -0
- package/build/avatar/index.js.map +1 -1
- package/build/block/edit.js +1 -0
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.js +2 -1
- package/build/button/edit.js.map +1 -1
- package/build/button/index.js +1 -0
- package/build/button/index.js.map +1 -1
- package/build/buttons/edit.js +0 -2
- package/build/buttons/edit.js.map +1 -1
- package/build/calendar/index.js +1 -0
- package/build/calendar/index.js.map +1 -1
- package/build/categories/edit.js +3 -3
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +1 -0
- package/build/categories/index.js.map +1 -1
- package/build/column/edit.native.js +2 -1
- package/build/column/edit.native.js.map +1 -1
- package/build/columns/deprecated.js +1 -1
- package/build/columns/deprecated.js.map +1 -1
- package/build/comment-author-avatar/index.js +1 -0
- package/build/comment-author-avatar/index.js.map +1 -1
- package/build/comment-author-name/index.js +1 -0
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +1 -0
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +1 -0
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +1 -0
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +1 -0
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/index.js +1 -0
- package/build/comment-template/index.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +1 -1
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments/index.js +2 -1
- package/build/comments/index.js.map +1 -1
- package/build/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build/comments-pagination/edit.js +3 -14
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-pagination/index.js +1 -0
- package/build/comments-pagination/index.js.map +1 -1
- package/build/comments-pagination-next/index.js +1 -0
- package/build/comments-pagination-next/index.js.map +1 -1
- package/build/comments-pagination-numbers/index.js +1 -0
- package/build/comments-pagination-numbers/index.js.map +1 -1
- package/build/comments-pagination-previous/index.js +1 -0
- package/build/comments-pagination-previous/index.js.map +1 -1
- package/build/cover/deprecated.js +153 -30
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/index.js +4 -3
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +45 -4
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/edit.native.js +0 -4
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/index.js +4 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/save.js +3 -2
- package/build/cover/save.js.map +1 -1
- package/build/embed/variations.js +1 -1
- package/build/embed/variations.js.map +1 -1
- package/build/experiments.js +19 -0
- package/build/experiments.js.map +1 -0
- package/build/gallery/deprecated.js +6 -4
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +48 -7
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +8 -34
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/v1/edit.js +5 -5
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/group/deprecated.js +1 -1
- package/build/group/deprecated.js.map +1 -1
- package/build/group/edit.js +1 -2
- package/build/group/edit.js.map +1 -1
- package/build/heading/index.js +1 -7
- package/build/heading/index.js.map +1 -1
- package/build/home-link/index.js +1 -0
- package/build/home-link/index.js.map +1 -1
- package/build/image/edit.native.js +2 -2
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +12 -15
- package/build/image/image.js.map +1 -1
- package/build/latest-comments/index.js +1 -0
- package/build/latest-comments/index.js.map +1 -1
- package/build/latest-posts/deprecated.js +1 -0
- package/build/latest-posts/deprecated.js.map +1 -1
- package/build/latest-posts/index.js +1 -0
- package/build/latest-posts/index.js.map +1 -1
- package/build/list/ordered-list-settings.js +1 -0
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/loginout/index.js +1 -0
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/edit.js +2 -4
- package/build/media-text/edit.js.map +1 -1
- package/build/missing/edit.native.js +4 -4
- package/build/missing/edit.native.js.map +1 -1
- package/build/navigation/edit/deleted-navigation-warning.js +31 -0
- package/build/navigation/edit/deleted-navigation-warning.js.map +1 -0
- package/build/navigation/edit/index.js +19 -11
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +0 -5
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/manage-menus-button.js +9 -2
- package/build/navigation/edit/manage-menus-button.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +39 -48
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +0 -1
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/navigation-menu-name-control.js +1 -0
- package/build/navigation/edit/navigation-menu-name-control.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +11 -52
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +1 -0
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +1 -6
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/index.js +5 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +0 -2
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation-link/edit.js +17 -8
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +4 -0
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/index.js +13 -3
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/page-list/edit.js +153 -132
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +2 -11
- package/build/page-list/index.js.map +1 -1
- package/build/page-list/{convert-to-navigation-links.js → use-convert-to-navigation-links.js} +41 -9
- package/build/page-list/use-convert-to-navigation-links.js.map +1 -0
- package/build/page-list-item/edit.js +4 -2
- package/build/page-list-item/edit.js.map +1 -1
- package/build/page-list-item/index.js +1 -1
- package/build/page-list-item/index.js.map +1 -1
- package/build/paragraph/edit.js +1 -1
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/index.js +1 -7
- package/build/paragraph/index.js.map +1 -1
- package/build/post-author/index.js +1 -0
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/index.js +1 -0
- package/build/post-author-biography/index.js.map +1 -1
- package/build/post-author-name/index.js +1 -1
- package/build/post-comment/edit.js +1 -0
- package/build/post-comment/edit.js.map +1 -1
- package/build/post-comments-count/index.js +1 -0
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/index.js +1 -0
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +1 -0
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/edit.js +1 -20
- package/build/post-content/edit.js.map +1 -1
- package/build/post-content/index.js +1 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/index.js +1 -0
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +6 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +1 -0
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +2 -1
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +39 -22
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +1 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-featured-image/overlay.js +1 -1
- package/build/post-featured-image/overlay.js.map +1 -1
- package/build/post-navigation-link/edit.js +1 -0
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-navigation-link/index.js +1 -0
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/edit.js +6 -4
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +1 -0
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/edit.js +5 -4
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/index.js +1 -0
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +1 -0
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +1 -0
- package/build/post-title/index.js.map +1 -1
- package/build/query/deprecated.js +90 -1
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/index.js +2 -50
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +1 -0
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +2 -2
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/pattern-selection-modal.js +88 -0
- package/build/query/edit/pattern-selection-modal.js.map +1 -0
- package/build/query/edit/query-content.js +3 -24
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +2 -2
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/edit/query-toolbar.js +6 -11
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query/index.js +1 -0
- package/build/query/index.js.map +1 -1
- package/build/query/utils.js +25 -3
- package/build/query/utils.js.map +1 -1
- package/build/query-no-results/index.js +1 -0
- package/build/query-no-results/index.js.map +1 -1
- package/build/query-pagination/edit.js +3 -14
- package/build/query-pagination/edit.js.map +1 -1
- package/build/query-pagination/index.js +1 -0
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/build/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build/query-pagination-next/index.js +1 -0
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-numbers/index.js +1 -0
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +1 -0
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/index.js +1 -0
- package/build/query-title/index.js.map +1 -1
- package/build/read-more/index.js +1 -0
- package/build/read-more/index.js.map +1 -1
- package/build/rss/edit.js +5 -2
- package/build/rss/edit.js.map +1 -1
- package/build/rss/index.js +1 -0
- package/build/rss/index.js.map +1 -1
- package/build/search/index.js +1 -0
- package/build/search/index.js.map +1 -1
- package/build/site-logo/edit.js +9 -13
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +1 -0
- package/build/site-logo/index.js.map +1 -1
- package/build/site-tagline/index.js +1 -0
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/index.js +1 -0
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +3 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/index.js +1 -0
- package/build/social-link/index.js.map +1 -1
- package/build/social-links/edit.js +3 -14
- package/build/social-links/edit.js.map +1 -1
- package/build/table/edit.js +9 -5
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +15 -0
- package/build/table/index.js.map +1 -1
- package/build/table/save.js +4 -2
- package/build/table/save.js.map +1 -1
- package/build/table/state.js +1 -1
- package/build/table/state.js.map +1 -1
- package/build/table/transforms.js +47 -3
- package/build/table/transforms.js.map +1 -1
- package/build/table/utils.js +26 -0
- package/build/table/utils.js.map +1 -0
- package/build/tag-cloud/edit.js +3 -9
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/tag-cloud/index.js +1 -0
- package/build/tag-cloud/index.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +2 -1
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/index.js +0 -1
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +3 -3
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/title-modal.js +6 -5
- package/build/template-part/edit/title-modal.js.map +1 -1
- package/build/template-part/edit/utils/hooks.js +2 -2
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build/template-part/index.js +1 -0
- package/build/template-part/index.js.map +1 -1
- package/build/term-description/index.js +1 -0
- package/build/term-description/index.js.map +1 -1
- package/build/utils/init-block.js +1 -1
- package/build/utils/init-block.js.map +1 -1
- package/build/utils/init-block.native.js +1 -1
- package/build/utils/init-block.native.js.map +1 -1
- package/build/{template-part/edit/utils/search.js → utils/search-patterns.js} +3 -1
- package/build/utils/search-patterns.js.map +1 -0
- package/build/video/tracks-editor.js +17 -11
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/archives/index.js +1 -0
- package/build-module/archives/index.js.map +1 -1
- package/build-module/avatar/index.js +1 -0
- package/build-module/avatar/index.js.map +1 -1
- package/build-module/block/edit.js +1 -0
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.js +2 -1
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/index.js +1 -0
- package/build-module/button/index.js.map +1 -1
- package/build-module/buttons/edit.js +0 -2
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/calendar/index.js +1 -0
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/categories/edit.js +2 -2
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +1 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/column/edit.native.js +2 -1
- package/build-module/column/edit.native.js.map +1 -1
- package/build-module/columns/deprecated.js +1 -1
- package/build-module/columns/deprecated.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +1 -0
- package/build-module/comment-author-avatar/index.js.map +1 -1
- package/build-module/comment-author-name/index.js +1 -0
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +1 -0
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +1 -0
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +1 -0
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +1 -0
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/index.js +1 -0
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments/index.js +2 -1
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build-module/comments-pagination/edit.js +3 -14
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-pagination/index.js +1 -0
- package/build-module/comments-pagination/index.js.map +1 -1
- package/build-module/comments-pagination-next/index.js +1 -0
- package/build-module/comments-pagination-next/index.js.map +1 -1
- package/build-module/comments-pagination-numbers/index.js +1 -0
- package/build-module/comments-pagination-numbers/index.js.map +1 -1
- package/build-module/comments-pagination-previous/index.js +1 -0
- package/build-module/comments-pagination-previous/index.js.map +1 -1
- package/build-module/cover/deprecated.js +155 -31
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/index.js +4 -3
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +46 -5
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/edit.native.js +0 -4
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/index.js +4 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/save.js +3 -2
- package/build-module/cover/save.js.map +1 -1
- package/build-module/embed/variations.js +1 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/experiments.js +9 -0
- package/build-module/experiments.js.map +1 -0
- package/build-module/gallery/deprecated.js +6 -3
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +50 -10
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +9 -35
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/v1/edit.js +6 -6
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/group/deprecated.js +1 -1
- package/build-module/group/deprecated.js.map +1 -1
- package/build-module/group/edit.js +1 -2
- package/build-module/group/edit.js.map +1 -1
- package/build-module/heading/index.js +1 -6
- package/build-module/heading/index.js.map +1 -1
- package/build-module/home-link/index.js +1 -0
- package/build-module/home-link/index.js.map +1 -1
- package/build-module/image/edit.native.js +2 -2
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +14 -17
- package/build-module/image/image.js.map +1 -1
- package/build-module/latest-comments/index.js +1 -0
- package/build-module/latest-comments/index.js.map +1 -1
- package/build-module/latest-posts/deprecated.js +1 -0
- package/build-module/latest-posts/deprecated.js.map +1 -1
- package/build-module/latest-posts/index.js +1 -0
- package/build-module/latest-posts/index.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +1 -0
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/loginout/index.js +1 -0
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/media-text/edit.js +2 -3
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/missing/edit.native.js +4 -4
- package/build-module/missing/edit.native.js.map +1 -1
- package/build-module/navigation/edit/deleted-navigation-warning.js +21 -0
- package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -0
- package/build-module/navigation/edit/index.js +18 -11
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +0 -5
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/manage-menus-button.js +10 -3
- package/build-module/navigation/edit/manage-menus-button.js.map +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +38 -49
- package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +0 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-name-control.js +1 -0
- package/build-module/navigation/edit/navigation-menu-name-control.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +13 -54
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +1 -0
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +1 -6
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/index.js +5 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +0 -2
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation-link/edit.js +16 -7
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +4 -0
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/navigation-submenu/index.js +14 -4
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/page-list/edit.js +155 -132
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +3 -12
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/page-list/{convert-to-navigation-links.js → use-convert-to-navigation-links.js} +37 -7
- package/build-module/page-list/use-convert-to-navigation-links.js.map +1 -0
- package/build-module/page-list-item/edit.js +3 -2
- package/build-module/page-list-item/edit.js.map +1 -1
- package/build-module/page-list-item/index.js +1 -1
- package/build-module/page-list-item/index.js.map +1 -1
- package/build-module/paragraph/edit.js +1 -1
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/index.js +1 -6
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/post-author/index.js +1 -0
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/index.js +1 -0
- package/build-module/post-author-biography/index.js.map +1 -1
- package/build-module/post-author-name/index.js +1 -1
- package/build-module/post-comment/edit.js +1 -0
- package/build-module/post-comment/edit.js.map +1 -1
- package/build-module/post-comments-count/index.js +1 -0
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +1 -0
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +1 -0
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/edit.js +2 -20
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-content/index.js +1 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/index.js +1 -0
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +6 -1
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +1 -0
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +2 -1
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +39 -22
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +1 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-featured-image/overlay.js +1 -1
- package/build-module/post-featured-image/overlay.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +1 -0
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-navigation-link/index.js +1 -0
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/edit.js +6 -4
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +1 -0
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/edit.js +4 -3
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/index.js +1 -0
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +1 -0
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +1 -0
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/query/deprecated.js +87 -1
- package/build-module/query/deprecated.js.map +1 -1
- package/build-module/query/edit/index.js +4 -50
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +1 -0
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +2 -2
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/pattern-selection-modal.js +75 -0
- package/build-module/query/edit/pattern-selection-modal.js.map +1 -0
- package/build-module/query/edit/query-content.js +4 -25
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +2 -2
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +6 -10
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/index.js +1 -0
- package/build-module/query/index.js.map +1 -1
- package/build-module/query/utils.js +21 -2
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query-no-results/index.js +1 -0
- package/build-module/query-no-results/index.js.map +1 -1
- package/build-module/query-pagination/edit.js +3 -14
- package/build-module/query-pagination/edit.js.map +1 -1
- package/build-module/query-pagination/index.js +1 -0
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build-module/query-pagination-next/index.js +1 -0
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +1 -0
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +1 -0
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/index.js +1 -0
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/read-more/index.js +1 -0
- package/build-module/read-more/index.js.map +1 -1
- package/build-module/rss/edit.js +6 -3
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/rss/index.js +1 -0
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/index.js +1 -0
- package/build-module/search/index.js.map +1 -1
- package/build-module/site-logo/edit.js +10 -14
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +1 -0
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-tagline/index.js +1 -0
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/index.js +1 -0
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +3 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/index.js +1 -0
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/social-links/edit.js +3 -14
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/table/edit.js +9 -5
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +15 -0
- package/build-module/table/index.js.map +1 -1
- package/build-module/table/save.js +4 -2
- package/build-module/table/save.js.map +1 -1
- package/build-module/table/state.js +1 -1
- package/build-module/table/state.js.map +1 -1
- package/build-module/table/transforms.js +46 -3
- package/build-module/table/transforms.js.map +1 -1
- package/build-module/table/utils.js +19 -0
- package/build-module/table/utils.js.map +1 -0
- package/build-module/tag-cloud/edit.js +4 -9
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/tag-cloud/index.js +1 -0
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +2 -1
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +0 -1
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +1 -1
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/title-modal.js +7 -6
- package/build-module/template-part/edit/title-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/hooks.js +2 -2
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/template-part/index.js +1 -0
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/term-description/index.js +1 -0
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/utils/init-block.js +1 -1
- package/build-module/utils/init-block.js.map +1 -1
- package/build-module/utils/init-block.native.js +1 -1
- package/build-module/utils/init-block.native.js.map +1 -1
- package/build-module/{template-part/edit/utils/search.js → utils/search-patterns.js} +3 -5
- package/build-module/utils/search-patterns.js.map +1 -0
- package/build-module/video/tracks-editor.js +18 -12
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/common-rtl.css +14 -0
- package/build-style/common.css +14 -0
- package/build-style/editor-rtl.css +14 -67
- package/build-style/editor.css +14 -67
- package/build-style/post-excerpt/style-rtl.css +15 -0
- package/build-style/post-excerpt/style.css +15 -0
- package/build-style/query/editor-rtl.css +11 -14
- package/build-style/query/editor.css +11 -14
- package/build-style/rss/editor-rtl.css +3 -16
- package/build-style/rss/editor.css +3 -16
- package/build-style/style-rtl.css +29 -0
- package/build-style/style.css +29 -0
- package/build-style/table/editor-rtl.css +0 -3
- package/build-style/table/editor.css +0 -3
- package/build-style/video/editor-rtl.css +0 -34
- package/build-style/video/editor.css +0 -34
- package/package.json +30 -29
- package/src/archives/block.json +1 -0
- package/src/avatar/block.json +1 -0
- package/src/block/edit.js +1 -0
- package/src/button/block.json +1 -0
- package/src/button/edit.js +2 -1
- package/src/buttons/edit.js +2 -2
- package/src/calendar/block.json +1 -0
- package/src/calendar/index.php +4 -2
- package/src/categories/block.json +1 -0
- package/src/categories/edit.js +2 -2
- package/src/column/edit.native.js +6 -1
- package/src/columns/deprecated.js +1 -1
- package/src/comment-author-avatar/block.json +1 -0
- package/src/comment-author-name/block.json +1 -0
- package/src/comment-author-name/index.php +6 -3
- package/src/comment-content/block.json +1 -0
- package/src/comment-content/index.php +6 -3
- package/src/comment-date/block.json +1 -0
- package/src/comment-date/index.php +1 -1
- package/src/comment-edit-link/block.json +1 -0
- package/src/comment-edit-link/index.php +6 -3
- package/src/comment-reply-link/block.json +1 -0
- package/src/comment-reply-link/index.php +6 -3
- package/src/comment-template/block.json +1 -0
- package/src/comments/block.json +2 -1
- package/src/comments/edit/comments-inspector-controls.js +1 -1
- package/src/comments-pagination/block.json +1 -0
- package/src/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/src/comments-pagination/edit.js +1 -13
- package/src/comments-pagination/index.php +4 -1
- package/src/comments-pagination-next/block.json +1 -0
- package/src/comments-pagination-numbers/block.json +1 -0
- package/src/comments-pagination-previous/block.json +1 -0
- package/src/common.scss +19 -0
- package/src/cover/block.json +4 -0
- package/src/cover/deprecated.js +173 -6
- package/src/cover/edit/index.js +5 -4
- package/src/cover/edit/inspector-controls.js +45 -2
- package/src/cover/edit.native.js +0 -3
- package/src/cover/save.js +3 -2
- package/src/embed/variations.js +1 -1
- package/src/experiments.js +10 -0
- package/src/gallery/deprecated.js +2 -3
- package/src/gallery/edit.js +66 -5
- package/src/gallery/gallery.js +27 -44
- package/src/gallery/index.php +1 -1
- package/src/gallery/v1/edit.js +8 -9
- package/src/group/deprecated.js +3 -1
- package/src/group/edit.js +1 -2
- package/src/heading/index.js +1 -6
- package/src/home-link/block.json +1 -0
- package/src/image/edit.native.js +2 -3
- package/src/image/image.js +17 -22
- package/src/latest-comments/block.json +1 -0
- package/src/latest-posts/block.json +1 -0
- package/src/latest-posts/index.php +9 -10
- package/src/list/ordered-list-settings.js +1 -0
- package/src/loginout/block.json +1 -0
- package/src/media-text/edit.js +3 -7
- package/src/missing/edit.native.js +3 -4
- package/src/missing/test/edit.native.js +2 -2
- package/src/navigation/block.json +2 -0
- package/src/navigation/edit/deleted-navigation-warning.js +19 -0
- package/src/navigation/edit/index.js +22 -24
- package/src/navigation/edit/inner-blocks.js +0 -6
- package/src/navigation/edit/manage-menus-button.js +24 -13
- package/src/navigation/edit/menu-inspector-controls.js +51 -74
- package/src/navigation/edit/navigation-menu-delete-control.js +0 -1
- package/src/navigation/edit/navigation-menu-name-control.js +1 -0
- package/src/navigation/edit/navigation-menu-selector.js +12 -77
- package/src/navigation/edit/overlay-menu-preview.js +1 -0
- package/src/navigation/edit/placeholder/index.js +0 -6
- package/src/navigation/index.js +3 -0
- package/src/navigation/index.php +27 -9
- package/src/navigation/menu-items-to-blocks.js +0 -2
- package/src/navigation-link/edit.js +16 -7
- package/src/navigation-link/index.php +2 -34
- package/src/navigation-submenu/edit.js +4 -0
- package/src/navigation-submenu/index.js +8 -2
- package/src/navigation-submenu/index.php +2 -34
- package/src/page-list/block.json +1 -0
- package/src/page-list/edit.js +196 -161
- package/src/page-list/index.js +2 -8
- package/src/page-list/test/convert-to-links-modal.js +1 -1
- package/src/page-list/{convert-to-navigation-links.js → use-convert-to-navigation-links.js} +36 -6
- package/src/page-list-item/edit.js +3 -2
- package/src/page-list-item/index.js +1 -1
- package/src/paragraph/edit.js +1 -1
- package/src/paragraph/index.js +1 -6
- package/src/post-author/block.json +1 -0
- package/src/post-author/index.php +10 -4
- package/src/post-author-biography/block.json +1 -0
- package/src/post-author-name/block.json +1 -1
- package/src/post-author-name/index.php +9 -4
- package/src/post-comment/edit.js +1 -0
- package/src/post-comments-count/block.json +1 -0
- package/src/post-comments-form/block.json +1 -0
- package/src/post-comments-form/index.php +6 -4
- package/src/post-comments-link/block.json +1 -0
- package/src/post-comments-link/index.php +8 -2
- package/src/post-content/block.json +1 -0
- package/src/post-content/edit.js +2 -13
- package/src/post-date/block.json +1 -0
- package/src/post-date/index.php +10 -3
- package/src/post-excerpt/block.json +1 -0
- package/src/post-excerpt/edit.js +22 -12
- package/src/post-excerpt/index.php +6 -3
- package/src/post-excerpt/style.scss +18 -0
- package/src/post-featured-image/block.json +1 -0
- package/src/post-featured-image/dimension-controls.js +2 -1
- package/src/post-featured-image/edit.js +46 -27
- package/src/post-featured-image/index.php +19 -6
- package/src/post-featured-image/overlay.js +1 -1
- package/src/post-navigation-link/block.json +1 -0
- package/src/post-navigation-link/edit.js +1 -0
- package/src/post-template/block.json +1 -0
- package/src/post-template/edit.js +4 -3
- package/src/post-template/index.php +4 -1
- package/src/post-terms/block.json +1 -0
- package/src/post-terms/edit.js +4 -3
- package/src/post-terms/index.php +6 -3
- package/src/post-title/block.json +1 -0
- package/src/post-title/edit.js +1 -0
- package/src/post-title/index.php +10 -4
- package/src/preformatted/test/__snapshots__/edit.native.js.snap +0 -2
- package/src/query/block.json +1 -0
- package/src/query/deprecated.js +77 -1
- package/src/query/edit/index.js +4 -60
- package/src/query/edit/inspector-controls/index.js +1 -0
- package/src/query/edit/inspector-controls/taxonomy-controls.js +2 -2
- package/src/query/edit/pattern-selection-modal.js +86 -0
- package/src/query/edit/query-content.js +1 -12
- package/src/query/edit/query-placeholder.js +4 -8
- package/src/query/edit/query-toolbar.js +6 -16
- package/src/query/editor.scss +21 -19
- package/src/query/utils.js +22 -8
- package/src/query-no-results/block.json +1 -0
- package/src/query-no-results/index.php +3 -1
- package/src/query-pagination/block.json +1 -0
- package/src/query-pagination/edit.js +1 -13
- package/src/query-pagination/index.php +2 -0
- package/src/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/src/query-pagination-next/block.json +1 -0
- package/src/query-pagination-numbers/block.json +1 -0
- package/src/query-pagination-previous/block.json +1 -0
- package/src/query-title/block.json +1 -0
- package/src/read-more/block.json +1 -0
- package/src/rss/block.json +1 -0
- package/src/rss/edit.js +16 -12
- package/src/rss/editor.scss +4 -15
- package/src/search/block.json +1 -0
- package/src/search/index.php +2 -2
- package/src/site-logo/block.json +1 -0
- package/src/site-logo/edit.js +9 -16
- package/src/site-tagline/block.json +1 -0
- package/src/site-title/block.json +1 -0
- package/src/site-title/index.php +6 -3
- package/src/social-link/block.json +1 -0
- package/src/social-link/edit.js +3 -1
- package/src/social-links/edit.js +1 -14
- package/src/table/block.json +15 -0
- package/src/table/edit.js +38 -26
- package/src/table/editor.scss +0 -6
- package/src/table/save.js +9 -1
- package/src/table/state.js +1 -1
- package/src/table/test/utils.js +20 -0
- package/src/table/transforms.js +65 -2
- package/src/table/utils.js +18 -0
- package/src/tag-cloud/block.json +1 -0
- package/src/tag-cloud/edit.js +12 -15
- package/src/template-part/block.json +1 -0
- package/src/template-part/edit/advanced-controls.js +2 -1
- package/src/template-part/edit/index.js +0 -1
- package/src/template-part/edit/selection-modal.js +1 -1
- package/src/template-part/edit/title-modal.js +12 -15
- package/src/template-part/edit/utils/hooks.js +3 -8
- package/src/template-part/index.php +19 -7
- package/src/term-description/block.json +1 -0
- package/src/term-description/index.php +8 -4
- package/src/utils/init-block.js +1 -1
- package/src/utils/init-block.native.js +1 -1
- package/src/{template-part/edit/utils/search.js → utils/search-patterns.js} +2 -2
- package/src/utils/test/search-patterns.js +58 -0
- package/src/video/editor.scss +0 -35
- package/src/video/tracks-editor.js +65 -51
- package/tsconfig.tsbuildinfo +1 -1
- package/build/page-list/constants.js +0 -15
- package/build/page-list/constants.js.map +0 -1
- package/build/page-list/convert-to-links-modal.js +0 -83
- package/build/page-list/convert-to-links-modal.js.map +0 -1
- package/build/page-list/convert-to-navigation-links.js.map +0 -1
- package/build/template-part/edit/utils/search.js.map +0 -1
- package/build-module/page-list/constants.js +0 -6
- package/build-module/page-list/constants.js.map +0 -1
- package/build-module/page-list/convert-to-links-modal.js +0 -68
- package/build-module/page-list/convert-to-links-modal.js.map +0 -1
- package/build-module/page-list/convert-to-navigation-links.js.map +0 -1
- package/build-module/template-part/edit/utils/search.js.map +0 -1
- package/src/page-list/constants.js +0 -8
- package/src/page-list/convert-to-links-modal.js +0 -70
package/src/table/transforms.js
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { createBlock } from '@wordpress/blocks';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { normalizeRowColSpan } from './utils';
|
|
10
|
+
|
|
1
11
|
const tableContentPasteSchema = ( { phrasingContentSchema } ) => ( {
|
|
2
12
|
tr: {
|
|
3
13
|
allowEmpty: true,
|
|
@@ -5,12 +15,12 @@ const tableContentPasteSchema = ( { phrasingContentSchema } ) => ( {
|
|
|
5
15
|
th: {
|
|
6
16
|
allowEmpty: true,
|
|
7
17
|
children: phrasingContentSchema,
|
|
8
|
-
attributes: [ 'scope', 'colspan' ],
|
|
18
|
+
attributes: [ 'scope', 'colspan', 'rowspan' ],
|
|
9
19
|
},
|
|
10
20
|
td: {
|
|
11
21
|
allowEmpty: true,
|
|
12
22
|
children: phrasingContentSchema,
|
|
13
|
-
attributes: [ 'colspan' ],
|
|
23
|
+
attributes: [ 'colspan', 'rowspan' ],
|
|
14
24
|
},
|
|
15
25
|
},
|
|
16
26
|
},
|
|
@@ -41,6 +51,59 @@ const transforms = {
|
|
|
41
51
|
type: 'raw',
|
|
42
52
|
selector: 'table',
|
|
43
53
|
schema: tablePasteSchema,
|
|
54
|
+
transform: ( node ) => {
|
|
55
|
+
const attributes = Array.from( node.children ).reduce(
|
|
56
|
+
( sectionAcc, section ) => {
|
|
57
|
+
if ( ! section.children.length ) {
|
|
58
|
+
return sectionAcc;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const sectionName = section.nodeName
|
|
62
|
+
.toLowerCase()
|
|
63
|
+
.slice( 1 );
|
|
64
|
+
|
|
65
|
+
const sectionAttributes = Array.from(
|
|
66
|
+
section.children
|
|
67
|
+
).reduce( ( rowAcc, row ) => {
|
|
68
|
+
if ( ! row.children.length ) {
|
|
69
|
+
return rowAcc;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const rowAttributes = Array.from(
|
|
73
|
+
row.children
|
|
74
|
+
).reduce( ( colAcc, col ) => {
|
|
75
|
+
const rowspan = normalizeRowColSpan(
|
|
76
|
+
col.getAttribute( 'rowspan' )
|
|
77
|
+
);
|
|
78
|
+
const colspan = normalizeRowColSpan(
|
|
79
|
+
col.getAttribute( 'colspan' )
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
colAcc.push( {
|
|
83
|
+
tag: col.nodeName.toLowerCase(),
|
|
84
|
+
content: col.innerHTML,
|
|
85
|
+
rowspan,
|
|
86
|
+
colspan,
|
|
87
|
+
} );
|
|
88
|
+
|
|
89
|
+
return colAcc;
|
|
90
|
+
}, [] );
|
|
91
|
+
|
|
92
|
+
rowAcc.push( {
|
|
93
|
+
cells: rowAttributes,
|
|
94
|
+
} );
|
|
95
|
+
|
|
96
|
+
return rowAcc;
|
|
97
|
+
}, [] );
|
|
98
|
+
|
|
99
|
+
sectionAcc[ sectionName ] = sectionAttributes;
|
|
100
|
+
return sectionAcc;
|
|
101
|
+
},
|
|
102
|
+
{}
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
return createBlock( 'core/table', attributes );
|
|
106
|
+
},
|
|
44
107
|
},
|
|
45
108
|
],
|
|
46
109
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalize the rowspan/colspan value.
|
|
3
|
+
* Returns undefined if the parameter is not a positive number
|
|
4
|
+
* or the default value (1) for rowspan/colspan.
|
|
5
|
+
*
|
|
6
|
+
* @param {number|undefined} rowColSpan rowspan/colspan value.
|
|
7
|
+
*
|
|
8
|
+
* @return {string|undefined} normalized rowspan/colspan value.
|
|
9
|
+
*/
|
|
10
|
+
export function normalizeRowColSpan( rowColSpan ) {
|
|
11
|
+
const parsedValue = parseInt( rowColSpan, 10 );
|
|
12
|
+
if ( ! Number.isInteger( parsedValue ) ) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
return parsedValue < 0 || parsedValue === 1
|
|
16
|
+
? undefined
|
|
17
|
+
: parsedValue.toString();
|
|
18
|
+
}
|
package/src/tag-cloud/block.json
CHANGED
package/src/tag-cloud/edit.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { map } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -16,6 +11,7 @@ import {
|
|
|
16
11
|
__experimentalUnitControl as UnitControl,
|
|
17
12
|
__experimentalUseCustomUnits as useCustomUnits,
|
|
18
13
|
__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,
|
|
14
|
+
Disabled,
|
|
19
15
|
} from '@wordpress/components';
|
|
20
16
|
import { withSelect } from '@wordpress/data';
|
|
21
17
|
import { __ } from '@wordpress/i18n';
|
|
@@ -68,15 +64,14 @@ function TagCloudEdit( { attributes, setAttributes, taxonomies } ) {
|
|
|
68
64
|
value: '',
|
|
69
65
|
disabled: true,
|
|
70
66
|
};
|
|
71
|
-
const taxonomyOptions =
|
|
72
|
-
|
|
73
|
-
( item ) => {
|
|
67
|
+
const taxonomyOptions = ( taxonomies ?? [] )
|
|
68
|
+
.filter( ( tax ) => !! tax.show_cloud )
|
|
69
|
+
.map( ( item ) => {
|
|
74
70
|
return {
|
|
75
71
|
value: item.slug,
|
|
76
72
|
label: item.name,
|
|
77
73
|
};
|
|
78
|
-
}
|
|
79
|
-
);
|
|
74
|
+
} );
|
|
80
75
|
|
|
81
76
|
return [ selectOption, ...taxonomyOptions ];
|
|
82
77
|
};
|
|
@@ -169,11 +164,13 @@ function TagCloudEdit( { attributes, setAttributes, taxonomies } ) {
|
|
|
169
164
|
<>
|
|
170
165
|
{ inspectorControls }
|
|
171
166
|
<div { ...useBlockProps() }>
|
|
172
|
-
<
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
167
|
+
<Disabled>
|
|
168
|
+
<ServerSideRender
|
|
169
|
+
skipBlockSupportAttributes
|
|
170
|
+
block="core/tag-cloud"
|
|
171
|
+
attributes={ attributes }
|
|
172
|
+
/>
|
|
173
|
+
</Disabled>
|
|
177
174
|
</div>
|
|
178
175
|
</>
|
|
179
176
|
);
|
|
@@ -71,10 +71,11 @@ export function TemplatePartAdvancedControls( {
|
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
return (
|
|
74
|
-
<InspectorControls
|
|
74
|
+
<InspectorControls group="advanced">
|
|
75
75
|
{ isEntityAvailable && (
|
|
76
76
|
<>
|
|
77
77
|
<TextControl
|
|
78
|
+
__nextHasNoMarginBottom
|
|
78
79
|
label={ __( 'Title' ) }
|
|
79
80
|
value={ title }
|
|
80
81
|
onChange={ ( value ) => {
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
useCreateTemplatePartFromBlocks,
|
|
23
23
|
} from './utils/hooks';
|
|
24
24
|
import { createTemplatePartId } from './utils/create-template-part-id';
|
|
25
|
-
import { searchPatterns } from '
|
|
25
|
+
import { searchPatterns } from '../../utils/search-patterns';
|
|
26
26
|
|
|
27
27
|
export default function TemplatePartSelectionModal( {
|
|
28
28
|
setAttributes,
|
|
@@ -5,10 +5,10 @@ import { useState } from '@wordpress/element';
|
|
|
5
5
|
import { __, sprintf } from '@wordpress/i18n';
|
|
6
6
|
import {
|
|
7
7
|
TextControl,
|
|
8
|
-
Flex,
|
|
9
|
-
FlexItem,
|
|
10
8
|
Button,
|
|
11
9
|
Modal,
|
|
10
|
+
__experimentalHStack as HStack,
|
|
11
|
+
__experimentalVStack as VStack,
|
|
12
12
|
} from '@wordpress/components';
|
|
13
13
|
|
|
14
14
|
export default function TitleModal( { areaLabel, onClose, onSubmit } ) {
|
|
@@ -28,21 +28,18 @@ export default function TitleModal( { areaLabel, onClose, onSubmit } ) {
|
|
|
28
28
|
__( 'Name and create your new %s' ),
|
|
29
29
|
areaLabel.toLowerCase()
|
|
30
30
|
) }
|
|
31
|
-
closeLabel={ __( 'Cancel' ) }
|
|
32
31
|
overlayClassName="wp-block-template-part__placeholder-create-new__title-form"
|
|
33
32
|
onRequestClose={ onClose }
|
|
34
33
|
>
|
|
35
34
|
<form onSubmit={ submitForCreation }>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
justify="
|
|
44
|
-
>
|
|
45
|
-
<FlexItem>
|
|
35
|
+
<VStack spacing="5">
|
|
36
|
+
<TextControl
|
|
37
|
+
__nextHasNoMarginBottom
|
|
38
|
+
label={ __( 'Name' ) }
|
|
39
|
+
value={ title }
|
|
40
|
+
onChange={ setTitle }
|
|
41
|
+
/>
|
|
42
|
+
<HStack justify="right">
|
|
46
43
|
<Button
|
|
47
44
|
variant="primary"
|
|
48
45
|
type="submit"
|
|
@@ -51,8 +48,8 @@ export default function TitleModal( { areaLabel, onClose, onSubmit } ) {
|
|
|
51
48
|
>
|
|
52
49
|
{ __( 'Create' ) }
|
|
53
50
|
</Button>
|
|
54
|
-
</
|
|
55
|
-
</
|
|
51
|
+
</HStack>
|
|
52
|
+
</VStack>
|
|
56
53
|
</form>
|
|
57
54
|
</Modal>
|
|
58
55
|
);
|
|
@@ -83,15 +83,10 @@ export function useAlternativeBlockPatterns( area, clientId ) {
|
|
|
83
83
|
const blockNameWithArea = area
|
|
84
84
|
? `core/template-part/${ area }`
|
|
85
85
|
: 'core/template-part';
|
|
86
|
-
const {
|
|
87
|
-
|
|
88
|
-
__experimentalGetPatternsByBlockTypes,
|
|
89
|
-
} = select( blockEditorStore );
|
|
86
|
+
const { getBlockRootClientId, getPatternsByBlockTypes } =
|
|
87
|
+
select( blockEditorStore );
|
|
90
88
|
const rootClientId = getBlockRootClientId( clientId );
|
|
91
|
-
return
|
|
92
|
-
blockNameWithArea,
|
|
93
|
-
rootClientId
|
|
94
|
-
);
|
|
89
|
+
return getPatternsByBlockTypes( blockNameWithArea, rootClientId );
|
|
95
90
|
},
|
|
96
91
|
[ area, clientId ]
|
|
97
92
|
);
|
|
@@ -126,6 +126,21 @@ function render_block_core_template_part( $attributes ) {
|
|
|
126
126
|
'';
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
// Look up area definition.
|
|
130
|
+
$area_definition = null;
|
|
131
|
+
$defined_areas = get_allowed_block_template_part_areas();
|
|
132
|
+
foreach ( $defined_areas as $defined_area ) {
|
|
133
|
+
if ( $defined_area['area'] === $area ) {
|
|
134
|
+
$area_definition = $defined_area;
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// If $area is not allowed, set it back to the uncategorized default.
|
|
140
|
+
if ( ! $area_definition ) {
|
|
141
|
+
$area = WP_TEMPLATE_PART_AREA_UNCATEGORIZED;
|
|
142
|
+
}
|
|
143
|
+
|
|
129
144
|
// Run through the actions that are typically taken on the_content.
|
|
130
145
|
$seen_ids[ $template_part_id ] = true;
|
|
131
146
|
$content = do_blocks( $content );
|
|
@@ -133,7 +148,7 @@ function render_block_core_template_part( $attributes ) {
|
|
|
133
148
|
$content = wptexturize( $content );
|
|
134
149
|
$content = convert_smilies( $content );
|
|
135
150
|
$content = shortcode_unautop( $content );
|
|
136
|
-
$content = wp_filter_content_tags( $content );
|
|
151
|
+
$content = wp_filter_content_tags( $content, "template_part_{$area}" );
|
|
137
152
|
$content = do_shortcode( $content );
|
|
138
153
|
|
|
139
154
|
// Handle embeds for block template parts.
|
|
@@ -141,12 +156,9 @@ function render_block_core_template_part( $attributes ) {
|
|
|
141
156
|
$content = $wp_embed->autoembed( $content );
|
|
142
157
|
|
|
143
158
|
if ( empty( $attributes['tagName'] ) ) {
|
|
144
|
-
$
|
|
145
|
-
$
|
|
146
|
-
|
|
147
|
-
if ( $defined_area['area'] === $area && isset( $defined_area['area_tag'] ) ) {
|
|
148
|
-
$area_tag = $defined_area['area_tag'];
|
|
149
|
-
}
|
|
159
|
+
$area_tag = 'div';
|
|
160
|
+
if ( $area_definition && isset( $area_definition['area_tag'] ) ) {
|
|
161
|
+
$area_tag = $area_definition['area_tag'];
|
|
150
162
|
}
|
|
151
163
|
$html_tag = $area_tag;
|
|
152
164
|
} else {
|
|
@@ -23,10 +23,14 @@ function render_block_core_term_description( $attributes ) {
|
|
|
23
23
|
return '';
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
$
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
$classes = array();
|
|
27
|
+
if ( isset( $attributes['textAlign'] ) ) {
|
|
28
|
+
$classes[] = 'has-text-align-' . $attributes['textAlign'];
|
|
29
|
+
}
|
|
30
|
+
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
|
|
31
|
+
$classes[] = 'has-link-color';
|
|
32
|
+
}
|
|
33
|
+
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
|
|
30
34
|
|
|
31
35
|
return '<div ' . $wrapper_attributes . '>' . $term_description . '</div>';
|
|
32
36
|
}
|
package/src/utils/init-block.js
CHANGED
|
@@ -8,7 +8,7 @@ import { registerBlockType } from '@wordpress/blocks';
|
|
|
8
8
|
*
|
|
9
9
|
* @param {Object} block The block to be registered.
|
|
10
10
|
*
|
|
11
|
-
* @return {
|
|
11
|
+
* @return {WPBlockType | undefined} The block, if it has been successfully registered;
|
|
12
12
|
* otherwise `undefined`.
|
|
13
13
|
*/
|
|
14
14
|
export default function initBlock( block ) {
|
|
@@ -10,7 +10,7 @@ const ALLOWED_BLOCKS_GRADIENT_SUPPORT = [ 'core/button' ];
|
|
|
10
10
|
*
|
|
11
11
|
* @param {Object} block The block to be registered.
|
|
12
12
|
*
|
|
13
|
-
* @return {
|
|
13
|
+
* @return {WPBlockType | undefined} The block, if it has been successfully registered;
|
|
14
14
|
* otherwise `undefined`.
|
|
15
15
|
*/
|
|
16
16
|
export default function initBlock( block ) {
|
|
@@ -10,7 +10,7 @@ import removeAccents from 'remove-accents';
|
|
|
10
10
|
*
|
|
11
11
|
* @return {string} The normalized search input.
|
|
12
12
|
*/
|
|
13
|
-
function normalizeSearchInput( input = '' ) {
|
|
13
|
+
export function normalizeSearchInput( input = '' ) {
|
|
14
14
|
// Disregard diacritics.
|
|
15
15
|
input = removeAccents( input );
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ function normalizeSearchInput( input = '' ) {
|
|
|
27
27
|
* @param {string} searchValue Search term
|
|
28
28
|
* @return {number} A pattern search rank
|
|
29
29
|
*/
|
|
30
|
-
function getPatternSearchRank( pattern, searchValue ) {
|
|
30
|
+
export function getPatternSearchRank( pattern, searchValue ) {
|
|
31
31
|
const normalizedSearchValue = normalizeSearchInput( searchValue );
|
|
32
32
|
const normalizedTitle = normalizeSearchInput( pattern.title );
|
|
33
33
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
normalizeSearchInput,
|
|
6
|
+
getPatternSearchRank,
|
|
7
|
+
searchPatterns,
|
|
8
|
+
} from '../search-patterns';
|
|
9
|
+
|
|
10
|
+
describe( 'normalizeSearchInput', () => {
|
|
11
|
+
it( 'should remove accents', () => {
|
|
12
|
+
expect( normalizeSearchInput( 'café' ) ).toBe( 'cafe' );
|
|
13
|
+
} );
|
|
14
|
+
|
|
15
|
+
it( 'should trim and lowercase', () => {
|
|
16
|
+
expect( normalizeSearchInput( ' Foo ' ) ).toBe( 'foo' );
|
|
17
|
+
} );
|
|
18
|
+
} );
|
|
19
|
+
|
|
20
|
+
describe( 'getPatternSearchRank', () => {
|
|
21
|
+
it( 'should give a high rank to exact matches', () => {
|
|
22
|
+
const pattern = { title: 'Foo' };
|
|
23
|
+
expect( getPatternSearchRank( pattern, 'Foo' ) ).toBe( 30 );
|
|
24
|
+
} );
|
|
25
|
+
|
|
26
|
+
it( 'should give a high rank to prefix matches', () => {
|
|
27
|
+
const pattern = { title: 'Foo' };
|
|
28
|
+
expect( getPatternSearchRank( pattern, 'Fo' ) ).toBe( 20 );
|
|
29
|
+
} );
|
|
30
|
+
|
|
31
|
+
it( 'should give a low rank to no matches', () => {
|
|
32
|
+
const pattern = { title: 'Foo' };
|
|
33
|
+
expect( getPatternSearchRank( pattern, 'Bar' ) ).toBe( 0 );
|
|
34
|
+
} );
|
|
35
|
+
} );
|
|
36
|
+
|
|
37
|
+
describe( 'searchPatterns', () => {
|
|
38
|
+
it( 'should return all patterns if no search term is provided', () => {
|
|
39
|
+
const patterns = [ { title: 'Foo' }, { title: 'Bar' } ];
|
|
40
|
+
expect( searchPatterns( patterns, '' ) ).toEqual( patterns );
|
|
41
|
+
} );
|
|
42
|
+
|
|
43
|
+
it( 'should return an empty array if no patterns are provided', () => {
|
|
44
|
+
expect( searchPatterns( [], 'Foo' ) ).toEqual( [] );
|
|
45
|
+
} );
|
|
46
|
+
|
|
47
|
+
it( 'should return an empty array if no patterns match', () => {
|
|
48
|
+
const patterns = [ { title: 'Foo' }, { title: 'Bar' } ];
|
|
49
|
+
expect( searchPatterns( patterns, 'Baz' ) ).toEqual( [] );
|
|
50
|
+
} );
|
|
51
|
+
|
|
52
|
+
it( 'should return the matching patterns', () => {
|
|
53
|
+
const patterns = [ { title: 'Foo' }, { title: 'Bar' } ];
|
|
54
|
+
expect( searchPatterns( patterns, 'Foo' ) ).toEqual( [
|
|
55
|
+
patterns[ 0 ],
|
|
56
|
+
] );
|
|
57
|
+
} );
|
|
58
|
+
} );
|
package/src/video/editor.scss
CHANGED
|
@@ -71,36 +71,15 @@
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.block-library-video-tracks-editor__track-list-track {
|
|
74
|
-
display: flex;
|
|
75
|
-
place-content: space-between;
|
|
76
|
-
align-items: baseline;
|
|
77
74
|
padding-left: $grid-unit-15;
|
|
78
75
|
}
|
|
79
76
|
|
|
80
|
-
.block-library-video-tracks-editor__single-track-editor-label-language {
|
|
81
|
-
display: flex;
|
|
82
|
-
margin-top: $grid-unit-15;
|
|
83
|
-
& > .components-base-control {
|
|
84
|
-
width: 50%;
|
|
85
|
-
}
|
|
86
|
-
& > .components-base-control:first-child {
|
|
87
|
-
margin-right: $grid-unit-20;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
77
|
.block-library-video-tracks-editor__single-track-editor-kind-select {
|
|
92
78
|
max-width: 240px;
|
|
93
79
|
}
|
|
94
80
|
|
|
95
|
-
.block-library-video-tracks-editor__single-track-editor-buttons-container {
|
|
96
|
-
display: flex;
|
|
97
|
-
place-content: space-between;
|
|
98
|
-
margin-top: $grid-unit-40;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
81
|
.block-library-video-tracks-editor__single-track-editor-edit-track-label {
|
|
102
82
|
margin-top: $grid-unit-05;
|
|
103
|
-
margin-bottom: $grid-unit-15;
|
|
104
83
|
color: $gray-700;
|
|
105
84
|
text-transform: uppercase;
|
|
106
85
|
font-size: 11px;
|
|
@@ -126,17 +105,3 @@
|
|
|
126
105
|
padding: $grid-unit-15;
|
|
127
106
|
}
|
|
128
107
|
|
|
129
|
-
.block-library-video-tracks-editor__single-track-editor .components-base-control {
|
|
130
|
-
.components-base-control__label {
|
|
131
|
-
margin-bottom: $grid-unit-05;
|
|
132
|
-
}
|
|
133
|
-
.components-base-control__field {
|
|
134
|
-
margin-bottom: $grid-unit-15;
|
|
135
|
-
}
|
|
136
|
-
.components-text-control__input {
|
|
137
|
-
margin-left: 0;
|
|
138
|
-
}
|
|
139
|
-
.components-input-control__label {
|
|
140
|
-
margin-bottom: $grid-unit-05;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
@@ -13,6 +13,9 @@ import {
|
|
|
13
13
|
Button,
|
|
14
14
|
TextControl,
|
|
15
15
|
SelectControl,
|
|
16
|
+
__experimentalGrid as Grid,
|
|
17
|
+
__experimentalHStack as HStack,
|
|
18
|
+
__experimentalVStack as VStack,
|
|
16
19
|
} from '@wordpress/components';
|
|
17
20
|
import {
|
|
18
21
|
MediaUpload,
|
|
@@ -49,7 +52,7 @@ function TrackList( { tracks, onEditPress } ) {
|
|
|
49
52
|
} else {
|
|
50
53
|
content = tracks.map( ( track, index ) => {
|
|
51
54
|
return (
|
|
52
|
-
<
|
|
55
|
+
<HStack
|
|
53
56
|
key={ index }
|
|
54
57
|
className="block-library-video-tracks-editor__track-list-track"
|
|
55
58
|
>
|
|
@@ -65,7 +68,7 @@ function TrackList( { tracks, onEditPress } ) {
|
|
|
65
68
|
>
|
|
66
69
|
{ __( 'Edit' ) }
|
|
67
70
|
</Button>
|
|
68
|
-
</
|
|
71
|
+
</HStack>
|
|
69
72
|
);
|
|
70
73
|
} );
|
|
71
74
|
}
|
|
@@ -84,15 +87,19 @@ function SingleTrackEditor( { track, onChange, onClose, onRemove } ) {
|
|
|
84
87
|
const fileName = src.startsWith( 'blob:' ) ? '' : getFilename( src ) || '';
|
|
85
88
|
return (
|
|
86
89
|
<NavigableMenu>
|
|
87
|
-
<
|
|
90
|
+
<VStack
|
|
91
|
+
className="block-library-video-tracks-editor__single-track-editor"
|
|
92
|
+
spacing="4"
|
|
93
|
+
>
|
|
88
94
|
<span className="block-library-video-tracks-editor__single-track-editor-edit-track-label">
|
|
89
95
|
{ __( 'Edit track' ) }
|
|
90
96
|
</span>
|
|
91
97
|
<span>
|
|
92
98
|
{ __( 'File' ) }: <b>{ fileName }</b>
|
|
93
99
|
</span>
|
|
94
|
-
<
|
|
100
|
+
<Grid columns={ 2 } gap={ 4 }>
|
|
95
101
|
<TextControl
|
|
102
|
+
__nextHasNoMarginBottom
|
|
96
103
|
/* eslint-disable jsx-a11y/no-autofocus */
|
|
97
104
|
autoFocus
|
|
98
105
|
/* eslint-enable jsx-a11y/no-autofocus */
|
|
@@ -107,6 +114,7 @@ function SingleTrackEditor( { track, onChange, onClose, onRemove } ) {
|
|
|
107
114
|
help={ __( 'Title of track' ) }
|
|
108
115
|
/>
|
|
109
116
|
<TextControl
|
|
117
|
+
__nextHasNoMarginBottom
|
|
110
118
|
onChange={ ( newSrcLang ) =>
|
|
111
119
|
onChange( {
|
|
112
120
|
...track,
|
|
@@ -117,54 +125,60 @@ function SingleTrackEditor( { track, onChange, onClose, onRemove } ) {
|
|
|
117
125
|
value={ srcLang }
|
|
118
126
|
help={ __( 'Language tag (en, fr, etc.)' ) }
|
|
119
127
|
/>
|
|
120
|
-
</
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
onChange( {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
/>
|
|
134
|
-
<div className="block-library-video-tracks-editor__single-track-editor-buttons-container">
|
|
135
|
-
<Button
|
|
136
|
-
variant="secondary"
|
|
137
|
-
onClick={ () => {
|
|
138
|
-
const changes = {};
|
|
139
|
-
let hasChanges = false;
|
|
140
|
-
if ( label === '' ) {
|
|
141
|
-
changes.label = __( 'English' );
|
|
142
|
-
hasChanges = true;
|
|
143
|
-
}
|
|
144
|
-
if ( srcLang === '' ) {
|
|
145
|
-
changes.srcLang = 'en';
|
|
146
|
-
hasChanges = true;
|
|
147
|
-
}
|
|
148
|
-
if ( track.kind === undefined ) {
|
|
149
|
-
changes.kind = DEFAULT_KIND;
|
|
150
|
-
hasChanges = true;
|
|
151
|
-
}
|
|
152
|
-
if ( hasChanges ) {
|
|
153
|
-
onChange( {
|
|
154
|
-
...track,
|
|
155
|
-
...changes,
|
|
156
|
-
} );
|
|
157
|
-
}
|
|
158
|
-
onClose();
|
|
128
|
+
</Grid>
|
|
129
|
+
<VStack spacing="8">
|
|
130
|
+
<SelectControl
|
|
131
|
+
__nextHasNoMarginBottom
|
|
132
|
+
className="block-library-video-tracks-editor__single-track-editor-kind-select"
|
|
133
|
+
options={ KIND_OPTIONS }
|
|
134
|
+
value={ kind }
|
|
135
|
+
label={ __( 'Kind' ) }
|
|
136
|
+
onChange={ ( newKind ) => {
|
|
137
|
+
onChange( {
|
|
138
|
+
...track,
|
|
139
|
+
kind: newKind,
|
|
140
|
+
} );
|
|
159
141
|
} }
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
142
|
+
/>
|
|
143
|
+
<HStack className="block-library-video-tracks-editor__single-track-editor-buttons-container">
|
|
144
|
+
<Button
|
|
145
|
+
variant="secondary"
|
|
146
|
+
onClick={ () => {
|
|
147
|
+
const changes = {};
|
|
148
|
+
let hasChanges = false;
|
|
149
|
+
if ( label === '' ) {
|
|
150
|
+
changes.label = __( 'English' );
|
|
151
|
+
hasChanges = true;
|
|
152
|
+
}
|
|
153
|
+
if ( srcLang === '' ) {
|
|
154
|
+
changes.srcLang = 'en';
|
|
155
|
+
hasChanges = true;
|
|
156
|
+
}
|
|
157
|
+
if ( track.kind === undefined ) {
|
|
158
|
+
changes.kind = DEFAULT_KIND;
|
|
159
|
+
hasChanges = true;
|
|
160
|
+
}
|
|
161
|
+
if ( hasChanges ) {
|
|
162
|
+
onChange( {
|
|
163
|
+
...track,
|
|
164
|
+
...changes,
|
|
165
|
+
} );
|
|
166
|
+
}
|
|
167
|
+
onClose();
|
|
168
|
+
} }
|
|
169
|
+
>
|
|
170
|
+
{ __( 'Close' ) }
|
|
171
|
+
</Button>
|
|
172
|
+
<Button
|
|
173
|
+
isDestructive
|
|
174
|
+
variant="link"
|
|
175
|
+
onClick={ onRemove }
|
|
176
|
+
>
|
|
177
|
+
{ __( 'Remove track' ) }
|
|
178
|
+
</Button>
|
|
179
|
+
</HStack>
|
|
180
|
+
</VStack>
|
|
181
|
+
</VStack>
|
|
168
182
|
</NavigableMenu>
|
|
169
183
|
);
|
|
170
184
|
}
|