@wordpress/block-library 9.23.0 → 9.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/button/edit.js +29 -17
- package/build/button/edit.js.map +1 -1
- package/build/code/index.js +2 -1
- package/build/code/index.js.map +1 -1
- package/build/columns/edit.js +18 -22
- package/build/columns/edit.js.map +1 -1
- package/build/comment-author-name/edit.js +41 -12
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-date/edit.js +41 -12
- package/build/comment-date/edit.js.map +1 -1
- package/build/comment-edit-link/edit.js +27 -7
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +1 -3
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments-pagination/edit.js +23 -9
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-title/edit.js +41 -12
- package/build/comments-title/edit.js.map +1 -1
- package/build/details/edit.js +27 -3
- package/build/details/edit.js.map +1 -1
- package/build/details/index.js +2 -1
- package/build/details/index.js.map +1 -1
- package/build/embed/edit.js +2 -4
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-controls.js +41 -22
- package/build/embed/embed-controls.js.map +1 -1
- package/build/file/inspector.js +73 -30
- package/build/file/inspector.js.map +1 -1
- package/build/form/edit.js +67 -37
- package/build/form/edit.js.map +1 -1
- package/build/form-input/edit.js +47 -18
- package/build/form-input/edit.js.map +1 -1
- package/build/html/index.js +2 -1
- package/build/html/index.js.map +1 -1
- package/build/image/constants.js +2 -1
- package/build/image/constants.js.map +1 -1
- package/build/image/edit.js +1 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +1 -4
- package/build/image/image.js.map +1 -1
- package/build/latest-posts/edit.js +154 -82
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/ordered-list-settings.js +131 -52
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/more/index.js +2 -1
- package/build/more/index.js.map +1 -1
- package/build/navigation/edit/index.js +93 -51
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +43 -27
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/navigation-link/index.js +3 -0
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-link/transforms.js +2 -0
- package/build/navigation-link/transforms.js.map +1 -1
- package/build/navigation-link/update-attributes.js +1 -0
- package/build/navigation-link/update-attributes.js.map +1 -1
- package/build/navigation-submenu/index.js +3 -0
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/post-comments-count/index.js +3 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-count/transforms.js +26 -0
- package/build/post-comments-count/transforms.js.map +1 -0
- package/build/post-comments-link/index.js +3 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-comments-link/transforms.js +26 -0
- package/build/post-comments-link/transforms.js.map +1 -0
- package/build/post-excerpt/edit.js +3 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +2 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +3 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-navigation-link/index.js +2 -1
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-navigation-link/variations.js +13 -13
- package/build/post-navigation-link/variations.js.map +1 -1
- package/build/post-template/edit.js +5 -3
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +3 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/index.js +4 -2
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +56 -18
- package/build/post-title/edit.js.map +1 -1
- package/build/preformatted/transforms.js +5 -1
- package/build/preformatted/transforms.js.map +1 -1
- package/build/query/edit/enhanced-pagination-modal.js +1 -1
- package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/read-more/index.js +2 -1
- package/build/read-more/index.js.map +1 -1
- package/build/rss/edit.js +120 -46
- package/build/rss/edit.js.map +1 -1
- package/build/rss/index.js +2 -1
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +76 -86
- package/build/search/edit.js.map +1 -1
- package/build/separator/edit.js +52 -20
- package/build/separator/edit.js.map +1 -1
- package/build/shortcode/index.js +2 -1
- package/build/shortcode/index.js.map +1 -1
- package/build/social-link/variations.js +53 -48
- package/build/social-link/variations.js.map +1 -1
- package/build/social-links/edit.js +35 -45
- package/build/social-links/edit.js.map +1 -1
- package/build/table/edit.js +3 -2
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +8 -4
- package/build/table/index.js.map +1 -1
- package/build/video/tracks-editor.js +40 -12
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/button/edit.js +30 -18
- package/build-module/button/edit.js.map +1 -1
- package/build-module/code/index.js +2 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/columns/edit.js +18 -22
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/comment-author-name/edit.js +42 -13
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-date/edit.js +42 -13
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comment-edit-link/edit.js +28 -8
- package/build-module/comment-edit-link/edit.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +1 -3
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments-pagination/edit.js +24 -10
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-title/edit.js +42 -13
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/details/edit.js +29 -5
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/index.js +2 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/embed/edit.js +2 -4
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/embed-controls.js +42 -23
- package/build-module/embed/embed-controls.js.map +1 -1
- package/build-module/file/inspector.js +74 -31
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/form/edit.js +68 -38
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/edit.js +48 -19
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/html/index.js +2 -1
- package/build-module/html/index.js.map +1 -1
- package/build-module/image/constants.js +1 -0
- package/build-module/image/constants.js.map +1 -1
- package/build-module/image/edit.js +2 -2
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +2 -5
- package/build-module/image/image.js.map +1 -1
- package/build-module/latest-posts/edit.js +155 -83
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +132 -53
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/more/index.js +2 -1
- package/build-module/more/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +94 -52
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +44 -28
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation-link/index.js +3 -0
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-link/transforms.js +2 -0
- package/build-module/navigation-link/transforms.js.map +1 -1
- package/build-module/navigation-link/update-attributes.js +1 -0
- package/build-module/navigation-link/update-attributes.js.map +1 -1
- package/build-module/navigation-submenu/index.js +3 -0
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +3 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-count/transforms.js +19 -0
- package/build-module/post-comments-count/transforms.js.map +1 -0
- package/build-module/post-comments-link/index.js +3 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-comments-link/transforms.js +19 -0
- package/build-module/post-comments-link/transforms.js.map +1 -0
- package/build-module/post-excerpt/edit.js +4 -2
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +2 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +4 -2
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-navigation-link/index.js +2 -1
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-navigation-link/variations.js +13 -13
- package/build-module/post-navigation-link/variations.js.map +1 -1
- package/build-module/post-template/edit.js +5 -3
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +4 -2
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/index.js +4 -2
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +57 -19
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/preformatted/transforms.js +5 -1
- package/build-module/preformatted/transforms.js.map +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/read-more/index.js +2 -1
- package/build-module/read-more/index.js.map +1 -1
- package/build-module/rss/edit.js +121 -47
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/rss/index.js +2 -1
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +78 -88
- package/build-module/search/edit.js.map +1 -1
- package/build-module/separator/edit.js +54 -22
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/shortcode/index.js +2 -1
- package/build-module/shortcode/index.js.map +1 -1
- package/build-module/social-link/variations.js +53 -48
- package/build-module/social-link/variations.js.map +1 -1
- package/build-module/social-links/edit.js +37 -47
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/table/edit.js +4 -3
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +8 -4
- package/build-module/table/index.js.map +1 -1
- package/build-module/video/tracks-editor.js +41 -13
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/archives/editor-rtl.css +47 -11
- package/build-style/archives/editor.css +47 -11
- package/build-style/archives/style-rtl.css +47 -11
- package/build-style/archives/style.css +47 -11
- package/build-style/audio/editor-rtl.css +47 -11
- package/build-style/audio/editor.css +47 -11
- package/build-style/audio/style-rtl.css +47 -11
- package/build-style/audio/style.css +47 -11
- package/build-style/audio/theme-rtl.css +47 -11
- package/build-style/audio/theme.css +47 -11
- package/build-style/avatar/editor-rtl.css +47 -11
- package/build-style/avatar/editor.css +47 -11
- package/build-style/avatar/style-rtl.css +47 -11
- package/build-style/avatar/style.css +47 -11
- package/build-style/button/editor-rtl.css +47 -11
- package/build-style/button/editor.css +47 -11
- package/build-style/button/style-rtl.css +47 -12
- package/build-style/button/style.css +47 -12
- package/build-style/buttons/editor-rtl.css +47 -11
- package/build-style/buttons/editor.css +47 -11
- package/build-style/buttons/style-rtl.css +50 -11
- package/build-style/buttons/style.css +50 -11
- package/build-style/calendar/style-rtl.css +47 -11
- package/build-style/calendar/style.css +47 -11
- package/build-style/categories/editor-rtl.css +47 -11
- package/build-style/categories/editor.css +47 -11
- package/build-style/categories/style-rtl.css +47 -11
- package/build-style/categories/style.css +47 -11
- package/build-style/classic-rtl.css +47 -11
- package/build-style/classic.css +47 -11
- package/build-style/code/editor-rtl.css +47 -11
- package/build-style/code/editor.css +47 -11
- package/build-style/code/style-rtl.css +47 -11
- package/build-style/code/style.css +47 -11
- package/build-style/code/theme-rtl.css +47 -11
- package/build-style/code/theme.css +47 -11
- package/build-style/columns/editor-rtl.css +47 -11
- package/build-style/columns/editor.css +47 -11
- package/build-style/columns/style-rtl.css +47 -11
- package/build-style/columns/style.css +47 -11
- package/build-style/comment-author-avatar/editor-rtl.css +47 -11
- package/build-style/comment-author-avatar/editor.css +47 -11
- package/build-style/comment-author-name/style-rtl.css +47 -11
- package/build-style/comment-author-name/style.css +47 -11
- package/build-style/comment-content/style-rtl.css +47 -11
- package/build-style/comment-content/style.css +47 -11
- package/build-style/comment-date/style-rtl.css +47 -11
- package/build-style/comment-date/style.css +47 -11
- package/build-style/comment-edit-link/style-rtl.css +47 -11
- package/build-style/comment-edit-link/style.css +47 -11
- package/build-style/comment-reply-link/style-rtl.css +47 -11
- package/build-style/comment-reply-link/style.css +47 -11
- package/build-style/comment-template/style-rtl.css +47 -11
- package/build-style/comment-template/style.css +47 -11
- package/build-style/comments/editor-rtl.css +47 -11
- package/build-style/comments/editor.css +47 -11
- package/build-style/comments/style-rtl.css +47 -11
- package/build-style/comments/style.css +47 -11
- package/build-style/comments-pagination/editor-rtl.css +47 -11
- package/build-style/comments-pagination/editor.css +47 -11
- package/build-style/comments-pagination/style-rtl.css +47 -11
- package/build-style/comments-pagination/style.css +47 -11
- package/build-style/comments-pagination-numbers/editor-rtl.css +47 -11
- package/build-style/comments-pagination-numbers/editor.css +47 -11
- package/build-style/comments-title/editor-rtl.css +47 -11
- package/build-style/comments-title/editor.css +47 -11
- package/build-style/common-rtl.css +130 -9
- package/build-style/common.css +130 -9
- package/build-style/cover/editor-rtl.css +47 -11
- package/build-style/cover/editor.css +47 -11
- package/build-style/cover/style-rtl.css +47 -11
- package/build-style/cover/style.css +47 -11
- package/build-style/details/editor-rtl.css +47 -11
- package/build-style/details/editor.css +47 -11
- package/build-style/details/style-rtl.css +47 -11
- package/build-style/details/style.css +47 -11
- package/build-style/editor-elements-rtl.css +47 -11
- package/build-style/editor-elements.css +47 -11
- package/build-style/editor-rtl.css +57 -15
- package/build-style/editor.css +57 -15
- package/build-style/elements-rtl.css +47 -11
- package/build-style/elements.css +47 -11
- package/build-style/embed/editor-rtl.css +47 -11
- package/build-style/embed/editor.css +47 -11
- package/build-style/embed/style-rtl.css +47 -11
- package/build-style/embed/style.css +47 -11
- package/build-style/embed/theme-rtl.css +47 -11
- package/build-style/embed/theme.css +47 -11
- package/build-style/file/editor-rtl.css +47 -11
- package/build-style/file/editor.css +47 -11
- package/build-style/file/style-rtl.css +47 -11
- package/build-style/file/style.css +47 -11
- package/build-style/footnotes/style-rtl.css +47 -11
- package/build-style/footnotes/style.css +47 -11
- package/build-style/form-input/editor-rtl.css +47 -11
- package/build-style/form-input/editor.css +47 -11
- package/build-style/form-input/style-rtl.css +47 -11
- package/build-style/form-input/style.css +47 -11
- package/build-style/form-submission-notification/editor-rtl.css +47 -11
- package/build-style/form-submission-notification/editor.css +47 -11
- package/build-style/form-submit-button/style-rtl.css +47 -11
- package/build-style/form-submit-button/style.css +47 -11
- package/build-style/freeform/editor-rtl.css +47 -11
- package/build-style/freeform/editor.css +47 -11
- package/build-style/gallery/editor-rtl.css +47 -11
- package/build-style/gallery/editor.css +47 -11
- package/build-style/gallery/style-rtl.css +48 -11
- package/build-style/gallery/style.css +48 -11
- package/build-style/gallery/theme-rtl.css +47 -11
- package/build-style/gallery/theme.css +47 -11
- package/build-style/group/editor-rtl.css +47 -11
- package/build-style/group/editor.css +47 -11
- package/build-style/group/style-rtl.css +47 -11
- package/build-style/group/style.css +47 -11
- package/build-style/group/theme-rtl.css +47 -11
- package/build-style/group/theme.css +47 -11
- package/build-style/heading/style-rtl.css +47 -11
- package/build-style/heading/style.css +47 -11
- package/build-style/html/editor-rtl.css +48 -11
- package/build-style/html/editor.css +48 -11
- package/build-style/image/editor-rtl.css +47 -11
- package/build-style/image/editor.css +47 -11
- package/build-style/image/style-rtl.css +47 -11
- package/build-style/image/style.css +47 -11
- package/build-style/image/theme-rtl.css +47 -11
- package/build-style/image/theme.css +47 -11
- package/build-style/latest-comments/style-rtl.css +47 -11
- package/build-style/latest-comments/style.css +47 -11
- package/build-style/latest-posts/editor-rtl.css +47 -11
- package/build-style/latest-posts/editor.css +47 -11
- package/build-style/latest-posts/style-rtl.css +47 -11
- package/build-style/latest-posts/style.css +47 -11
- package/build-style/list/style-rtl.css +47 -11
- package/build-style/list/style.css +47 -11
- package/build-style/loginout/style-rtl.css +47 -11
- package/build-style/loginout/style.css +47 -11
- package/build-style/media-text/editor-rtl.css +47 -11
- package/build-style/media-text/editor.css +47 -11
- package/build-style/media-text/style-rtl.css +47 -11
- package/build-style/media-text/style.css +47 -11
- package/build-style/more/editor-rtl.css +47 -11
- package/build-style/more/editor.css +47 -11
- package/build-style/navigation/editor-rtl.css +55 -14
- package/build-style/navigation/editor.css +55 -14
- package/build-style/navigation/style-rtl.css +47 -11
- package/build-style/navigation/style.css +47 -11
- package/build-style/navigation-link/editor-rtl.css +47 -11
- package/build-style/navigation-link/editor.css +47 -11
- package/build-style/navigation-link/style-rtl.css +47 -11
- package/build-style/navigation-link/style.css +47 -11
- package/build-style/navigation-submenu/editor-rtl.css +47 -11
- package/build-style/navigation-submenu/editor.css +47 -11
- package/build-style/nextpage/editor-rtl.css +47 -11
- package/build-style/nextpage/editor.css +47 -11
- package/build-style/page-list/editor-rtl.css +47 -11
- package/build-style/page-list/editor.css +47 -11
- package/build-style/page-list/style-rtl.css +47 -11
- package/build-style/page-list/style.css +47 -11
- package/build-style/paragraph/editor-rtl.css +47 -11
- package/build-style/paragraph/editor.css +47 -11
- package/build-style/paragraph/style-rtl.css +47 -11
- package/build-style/paragraph/style.css +47 -11
- package/build-style/post-author/editor-rtl.css +47 -11
- package/build-style/post-author/editor.css +47 -11
- package/build-style/post-author/style-rtl.css +47 -11
- package/build-style/post-author/style.css +47 -11
- package/build-style/post-author-biography/style-rtl.css +47 -11
- package/build-style/post-author-biography/style.css +47 -11
- package/build-style/post-author-name/style-rtl.css +47 -11
- package/build-style/post-author-name/style.css +47 -11
- package/build-style/post-comments-count/style-rtl.css +47 -11
- package/build-style/post-comments-count/style.css +47 -11
- package/build-style/post-comments-form/editor-rtl.css +47 -11
- package/build-style/post-comments-form/editor.css +47 -11
- package/build-style/post-comments-form/style-rtl.css +47 -14
- package/build-style/post-comments-form/style.css +47 -14
- package/build-style/post-comments-link/style-rtl.css +47 -11
- package/build-style/post-comments-link/style.css +47 -11
- package/build-style/post-content/style-rtl.css +47 -11
- package/build-style/post-content/style.css +47 -11
- package/build-style/post-date/style-rtl.css +47 -11
- package/build-style/post-date/style.css +47 -11
- package/build-style/post-excerpt/editor-rtl.css +47 -11
- package/build-style/post-excerpt/editor.css +47 -11
- package/build-style/post-excerpt/style-rtl.css +47 -11
- package/build-style/post-excerpt/style.css +47 -11
- package/build-style/post-featured-image/editor-rtl.css +47 -11
- package/build-style/post-featured-image/editor.css +47 -11
- package/build-style/post-featured-image/style-rtl.css +47 -11
- package/build-style/post-featured-image/style.css +47 -11
- package/build-style/post-navigation-link/style-rtl.css +47 -11
- package/build-style/post-navigation-link/style.css +47 -11
- package/build-style/post-template/style-rtl.css +47 -11
- package/build-style/post-template/style.css +47 -11
- package/build-style/post-terms/style-rtl.css +47 -11
- package/build-style/post-terms/style.css +47 -11
- package/build-style/post-time-to-read/style-rtl.css +47 -11
- package/build-style/post-time-to-read/style.css +47 -11
- package/build-style/post-title/style-rtl.css +47 -11
- package/build-style/post-title/style.css +47 -11
- package/build-style/preformatted/style-rtl.css +47 -11
- package/build-style/preformatted/style.css +47 -11
- package/build-style/pullquote/editor-rtl.css +48 -12
- package/build-style/pullquote/editor.css +48 -12
- package/build-style/pullquote/style-rtl.css +49 -14
- package/build-style/pullquote/style.css +49 -14
- package/build-style/pullquote/theme-rtl.css +49 -13
- package/build-style/pullquote/theme.css +49 -13
- package/build-style/query/editor-rtl.css +47 -11
- package/build-style/query/editor.css +47 -11
- package/build-style/query-pagination/editor-rtl.css +47 -11
- package/build-style/query-pagination/editor.css +47 -11
- package/build-style/query-pagination/style-rtl.css +47 -11
- package/build-style/query-pagination/style.css +47 -11
- package/build-style/query-pagination-numbers/editor-rtl.css +47 -11
- package/build-style/query-pagination-numbers/editor.css +47 -11
- package/build-style/query-title/style-rtl.css +47 -11
- package/build-style/query-title/style.css +47 -11
- package/build-style/query-total/style-rtl.css +47 -11
- package/build-style/query-total/style.css +47 -11
- package/build-style/quote/style-rtl.css +47 -11
- package/build-style/quote/style.css +47 -11
- package/build-style/quote/theme-rtl.css +47 -11
- package/build-style/quote/theme.css +47 -11
- package/build-style/read-more/style-rtl.css +47 -11
- package/build-style/read-more/style.css +47 -11
- package/build-style/reset-rtl.css +47 -11
- package/build-style/reset.css +47 -11
- package/build-style/rss/editor-rtl.css +47 -11
- package/build-style/rss/editor.css +47 -11
- package/build-style/rss/style-rtl.css +47 -11
- package/build-style/rss/style.css +47 -11
- package/build-style/search/editor-rtl.css +47 -11
- package/build-style/search/editor.css +47 -11
- package/build-style/search/style-rtl.css +47 -11
- package/build-style/search/style.css +47 -11
- package/build-style/search/theme-rtl.css +47 -11
- package/build-style/search/theme.css +47 -11
- package/build-style/separator/editor-rtl.css +47 -11
- package/build-style/separator/editor.css +47 -11
- package/build-style/separator/style-rtl.css +47 -11
- package/build-style/separator/style.css +47 -11
- package/build-style/separator/theme-rtl.css +47 -11
- package/build-style/separator/theme.css +47 -11
- package/build-style/shortcode/editor-rtl.css +47 -11
- package/build-style/shortcode/editor.css +47 -11
- package/build-style/site-logo/editor-rtl.css +47 -11
- package/build-style/site-logo/editor.css +47 -11
- package/build-style/site-logo/style-rtl.css +47 -11
- package/build-style/site-logo/style.css +47 -11
- package/build-style/site-tagline/editor-rtl.css +47 -11
- package/build-style/site-tagline/editor.css +47 -11
- package/build-style/site-tagline/style-rtl.css +47 -11
- package/build-style/site-tagline/style.css +47 -11
- package/build-style/site-title/editor-rtl.css +47 -11
- package/build-style/site-title/editor.css +47 -11
- package/build-style/site-title/style-rtl.css +47 -11
- package/build-style/site-title/style.css +47 -11
- package/build-style/social-link/editor-rtl.css +47 -11
- package/build-style/social-link/editor.css +47 -11
- package/build-style/social-links/editor-rtl.css +47 -11
- package/build-style/social-links/editor.css +47 -11
- package/build-style/social-links/style-rtl.css +47 -11
- package/build-style/social-links/style.css +47 -11
- package/build-style/spacer/editor-rtl.css +47 -11
- package/build-style/spacer/editor.css +47 -11
- package/build-style/spacer/style-rtl.css +47 -11
- package/build-style/spacer/style.css +47 -11
- package/build-style/style-rtl.css +53 -18
- package/build-style/style.css +53 -18
- package/build-style/table/editor-rtl.css +47 -11
- package/build-style/table/editor.css +47 -11
- package/build-style/table/style-rtl.css +47 -11
- package/build-style/table/style.css +47 -11
- package/build-style/table/theme-rtl.css +47 -11
- package/build-style/table/theme.css +47 -11
- package/build-style/table-of-contents/style-rtl.css +47 -11
- package/build-style/table-of-contents/style.css +47 -11
- package/build-style/tag-cloud/editor-rtl.css +47 -11
- package/build-style/tag-cloud/editor.css +47 -11
- package/build-style/tag-cloud/style-rtl.css +47 -11
- package/build-style/tag-cloud/style.css +47 -11
- package/build-style/template-part/editor-rtl.css +47 -11
- package/build-style/template-part/editor.css +47 -11
- package/build-style/template-part/theme-rtl.css +47 -11
- package/build-style/template-part/theme.css +47 -11
- package/build-style/term-description/style-rtl.css +47 -11
- package/build-style/term-description/style.css +47 -11
- package/build-style/text-columns/editor-rtl.css +47 -11
- package/build-style/text-columns/editor.css +47 -11
- package/build-style/text-columns/style-rtl.css +47 -11
- package/build-style/text-columns/style.css +47 -11
- package/build-style/theme-rtl.css +49 -13
- package/build-style/theme.css +49 -13
- package/build-style/verse/style-rtl.css +47 -11
- package/build-style/verse/style.css +47 -11
- package/build-style/video/editor-rtl.css +47 -11
- package/build-style/video/editor.css +47 -11
- package/build-style/video/style-rtl.css +47 -11
- package/build-style/video/style.css +47 -11
- package/build-style/video/theme-rtl.css +47 -11
- package/build-style/video/theme.css +47 -11
- package/package.json +35 -35
- package/src/button/edit.js +44 -29
- package/src/button/style.scss +0 -1
- package/src/buttons/style.scss +5 -0
- package/src/code/block.json +2 -1
- package/src/columns/edit.js +20 -31
- package/src/comment-author-name/edit.js +54 -13
- package/src/comment-date/edit.js +50 -15
- package/src/comment-edit-link/edit.js +39 -11
- package/src/comments/edit/comments-inspector-controls.js +0 -2
- package/src/comments-pagination/edit.js +29 -9
- package/src/comments-title/edit.js +53 -15
- package/src/details/block.json +2 -1
- package/src/details/edit.js +36 -4
- package/src/embed/edit.js +3 -5
- package/src/embed/embed-controls.js +55 -33
- package/src/file/inspector.js +99 -45
- package/src/form/edit.js +91 -46
- package/src/form-input/edit.js +56 -18
- package/src/gallery/style.scss +1 -0
- package/src/html/block.json +2 -1
- package/src/html/editor.scss +1 -0
- package/src/image/constants.js +1 -0
- package/src/image/edit.js +2 -1
- package/src/image/image.js +7 -5
- package/src/latest-posts/edit.js +206 -98
- package/src/list/ordered-list-settings.js +172 -62
- package/src/more/block.json +2 -1
- package/src/navigation/edit/index.js +127 -64
- package/src/navigation/edit/overlay-menu-preview.js +43 -26
- package/src/navigation/editor.scss +8 -4
- package/src/navigation-link/block.json +3 -0
- package/src/navigation-link/index.php +4 -0
- package/src/navigation-link/transforms.js +2 -1
- package/src/navigation-link/update-attributes.js +1 -0
- package/src/navigation-submenu/block.json +3 -0
- package/src/navigation-submenu/index.php +4 -0
- package/src/post-comments-count/index.js +2 -0
- package/src/post-comments-count/transforms.js +20 -0
- package/src/post-comments-form/style.scss +0 -5
- package/src/post-comments-link/index.js +2 -0
- package/src/post-comments-link/transforms.js +20 -0
- package/src/post-excerpt/block.json +2 -1
- package/src/post-excerpt/edit.js +13 -8
- package/src/post-navigation-link/block.json +2 -1
- package/src/post-navigation-link/edit.js +13 -8
- package/src/post-navigation-link/variations.js +13 -13
- package/src/post-template/edit.js +4 -3
- package/src/post-terms/block.json +4 -2
- package/src/post-terms/edit.js +13 -8
- package/src/post-title/edit.js +76 -24
- package/src/preformatted/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/preformatted/test/transforms.native.js +6 -1
- package/src/preformatted/transforms.js +7 -1
- package/src/pullquote/editor.scss +1 -1
- package/src/pullquote/style.scss +2 -3
- package/src/pullquote/theme.scss +2 -2
- package/src/query/edit/enhanced-pagination-modal.js +1 -5
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -13
- package/src/read-more/block.json +2 -1
- package/src/rss/block.json +2 -1
- package/src/rss/edit.js +141 -55
- package/src/search/edit.js +84 -99
- package/src/separator/edit.js +66 -21
- package/src/shortcode/block.json +2 -1
- package/src/site-title/index.php +1 -1
- package/src/social-link/index.php +49 -49
- package/src/social-link/variations.js +53 -48
- package/src/social-links/edit.js +39 -60
- package/src/table/block.json +8 -4
- package/src/table/edit.js +6 -2
- package/src/verse/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/verse/test/transforms.native.js +5 -1
- package/src/video/tracks-editor.js +57 -16
- package/build/search/icons.js +0 -121
- package/build/search/icons.js.map +0 -1
- package/build-module/search/icons.js +0 -114
- package/build-module/search/icons.js.map +0 -1
- package/src/search/icons.js +0 -89
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["details","icon","__","sprintf","initBlock","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","showContent","type","summary","source","selector","attribute","allowedBlocks","placeholder","supports","__experimentalOnEnter","align","anchor","color","gradients","link","__experimentalDefaultControls","background","text","__experimentalBorder","width","style","html","spacing","margin","padding","blockGap","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowEditing","interactivity","clientNavigation","editorStyle","edit","save","transforms","settings","example","innerBlocks","content","__experimentalLabel","context","customName","hasSummary","trim","length","init"],"sources":["@wordpress/block-library/src/details/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { details as icon } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tsummary: __( 'La Mancha' ),\n\t\t\tshowContent: true,\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t'In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tconst { summary } = attributes;\n\n\t\tconst customName = attributes?.metadata?.name;\n\t\tconst hasSummary = summary?.trim().length > 0;\n\n\t\t// In the list view, use the block's summary as the label.\n\t\t// If the summary is empty, fall back to the default label.\n\t\tif ( context === 'list-view' && ( customName || hasSummary ) ) {\n\t\t\treturn customName || summary;\n\t\t}\n\n\t\tif ( context === 'accessibility' ) {\n\t\t\treturn ! hasSummary\n\t\t\t\t? __( 'Details. Empty.' )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text; summary title. */\n\t\t\t\t\t\t__( 'Details. %s' ),\n\t\t\t\t\t\tsummary\n\t\t\t\t );\n\t\t}\n\t},\n\tsave,\n\tedit,\n\ttransforms,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,IAAI,QAAQ,kBAAkB;AAClD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,WAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAD,IAAA;MAAAE,MAAA;MAAAC,QAAA;IAAA;
|
|
1
|
+
{"version":3,"names":["details","icon","__","sprintf","initBlock","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","showContent","type","summary","source","selector","role","attribute","allowedBlocks","placeholder","supports","__experimentalOnEnter","align","anchor","color","gradients","link","__experimentalDefaultControls","background","text","__experimentalBorder","width","style","html","spacing","margin","padding","blockGap","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowEditing","interactivity","clientNavigation","editorStyle","edit","save","transforms","settings","example","innerBlocks","content","__experimentalLabel","context","customName","hasSummary","trim","length","init"],"sources":["@wordpress/block-library/src/details/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { details as icon } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tsummary: __( 'La Mancha' ),\n\t\t\tshowContent: true,\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t'In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tconst { summary } = attributes;\n\n\t\tconst customName = attributes?.metadata?.name;\n\t\tconst hasSummary = summary?.trim().length > 0;\n\n\t\t// In the list view, use the block's summary as the label.\n\t\t// If the summary is empty, fall back to the default label.\n\t\tif ( context === 'list-view' && ( customName || hasSummary ) ) {\n\t\t\treturn customName || summary;\n\t\t}\n\n\t\tif ( context === 'accessibility' ) {\n\t\t\treturn ! hasSummary\n\t\t\t\t? __( 'Details. Empty.' )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text; summary title. */\n\t\t\t\t\t\t__( 'Details. %s' ),\n\t\t\t\t\t\tsummary\n\t\t\t\t );\n\t\t}\n\t},\n\tsave,\n\tedit,\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=> {
|
|
|
99
99
|
* @return {Object} Merged attributes.
|
|
100
100
|
*/
|
|
101
101
|
const getMergedAttributes = () => getMergedAttributesWithPreview(attributes, preview, title, responsive);
|
|
102
|
-
|
|
102
|
+
function toggleResponsive(newAllowResponsive) {
|
|
103
103
|
const {
|
|
104
|
-
allowResponsive,
|
|
105
104
|
className
|
|
106
105
|
} = attributes;
|
|
107
106
|
const {
|
|
108
107
|
html
|
|
109
108
|
} = preview;
|
|
110
|
-
const newAllowResponsive = !allowResponsive;
|
|
111
109
|
setAttributes({
|
|
112
110
|
allowResponsive: newAllowResponsive,
|
|
113
111
|
className: getClassNames(html, className, responsive && newAllowResponsive)
|
|
114
112
|
});
|
|
115
|
-
}
|
|
113
|
+
}
|
|
116
114
|
useEffect(() => {
|
|
117
115
|
if (preview?.html || !cannotEmbed || !hasResolved) {
|
|
118
116
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createUpgradedEmbedBlock","getClassNames","removeAspectRatioClasses","fallback","getEmbedInfoByProvider","getMergedAttributesWithPreview","EmbedControls","embedContentIcon","EmbedLoading","EmbedPlaceholder","EmbedPreview","clsx","__","_x","sprintf","useState","useEffect","useDispatch","useSelect","useBlockProps","store","coreStore","View","getAuthority","Caption","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","EmbedEdit","props","attributes","providerNameSlug","previewable","responsive","url","attributesUrl","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","defaultEmbedInfo","title","icon","setURL","isEditingURL","setIsEditingURL","invalidateResolution","preview","fetching","themeSupportsResponsive","cannotEmbed","hasResolved","select","getEmbedPreview","isPreviewEmbedFallback","isRequestingEmbedPreview","getThemeSupports","hasFinishedResolution","embedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","data","status","validPreview","getMergedAttributes","toggleResponsive","allowResponsive","className","newAllowResponsive","newURL","replace","URL","host","toString","mergedAttributes","hasChanges","Object","keys","some","key","upgradedBlock","blockProps","children","label","showEmbedPlaceholder","onSubmit","event","preventDefault","blockClass","value","onChange","tryAgain","caption","classFromPreview","showEditButton","blockSupportsResponsive","switchBackToURLInput","onCaptionChange","showToolbarButton"],"sources":["@wordpress/block-library/src/embed/edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useBlockProps } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\nimport { Caption } from '../utils/caption';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: {\n\t\t\tproviderNameSlug,\n\t\t\tpreviewable,\n\t\t\tresponsive,\n\t\t\turl: attributesUrl,\n\t\t},\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst { icon, title } =\n\t\tgetEmbedInfoByProvider( providerNameSlug ) || defaultEmbedInfo;\n\n\tconst [ url, setURL ] = useState( attributesUrl );\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst {\n\t\tpreview,\n\t\tfetching,\n\t\tthemeSupportsResponsive,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEmbedPreview,\n\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\tisRequestingEmbedPreview,\n\t\t\t\tgetThemeSupports,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\t\t\tif ( ! attributesUrl ) {\n\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t}\n\n\t\t\tconst embedPreview = getEmbedPreview( attributesUrl );\n\t\t\tconst previewIsFallback = isPreviewEmbedFallback( attributesUrl );\n\n\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\tconst badEmbedProvider =\n\t\t\t\tembedPreview?.html === false &&\n\t\t\t\tembedPreview?.type === undefined;\n\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t// a valid JSON response with no HTML and `data.status` set to 404, rather\n\t\t\t// than generating a fallback response as other embeds do.\n\t\t\tconst wordpressCantEmbed = embedPreview?.data?.status === 404;\n\t\t\tconst validPreview =\n\t\t\t\t!! embedPreview && ! badEmbedProvider && ! wordpressCantEmbed;\n\t\t\treturn {\n\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\tfetching: isRequestingEmbedPreview( attributesUrl ),\n\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\thasResolved: hasFinishedResolution( 'getEmbedPreview', [\n\t\t\t\t\tattributesUrl,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ attributesUrl ]\n\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( preview?.html || ! cannotEmbed || ! hasResolved ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = attributesUrl.replace( /\\/$/, '' );\n\t\tsetURL( newURL );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [\n\t\tpreview?.html,\n\t\tattributesUrl,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t\tsetAttributes,\n\t] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tconst hasChanges = Object.keys( mergedAttributes ).some(\n\t\t\t\t( key ) => mergedAttributes[ key ] !== attributes[ key ]\n\t\t\t);\n\n\t\t\tif ( hasChanges ) {\n\t\t\t\tsetAttributes( mergedAttributes );\n\t\t\t}\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// translators: %s: type of embed e.g: \"YouTube\", \"Twitter\", etc. \"Embed\" is used when no specific type exists\n\tconst label = sprintf( __( '%s URL' ), title );\n\n\t// No preview, or we can't embed the current URL, or we've clicked the edit button.\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed || isEditingURL;\n\n\tif ( showEmbedPlaceholder ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\tif ( event ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\t\t\tattributes.className\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\tsetAttributes( { url, className: blockClass } );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ url }\n\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\tonChange={ ( value ) => setURL( value ) }\n\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [ url ] );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\tcaption,\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = clsx( classFromPreview, props.className );\n\n\treturn (\n\t\t<>\n\t\t\t<EmbedControls\n\t\t\t\tshowEditButton={ preview && ! cannotEmbed }\n\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\tswitchBackToURLInput={ () => setIsEditingURL( true ) }\n\t\t\t/>\n\t\t\t<figure\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ clsx( blockProps.className, className, {\n\t\t\t\t\t[ `is-type-${ type }` ]: type,\n\t\t\t\t\t[ `is-provider-${ providerNameSlug }` ]: providerNameSlug,\n\t\t\t\t\t[ `wp-block-embed-${ providerNameSlug }` ]:\n\t\t\t\t\t\tproviderNameSlug,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<EmbedPreview\n\t\t\t\t\tpreview={ preview }\n\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\turl={ url }\n\t\t\t\t\ttype={ type }\n\t\t\t\t\tcaption={ caption }\n\t\t\t\t\tonCaptionChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { caption: value } )\n\t\t\t\t\t}\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t\t<Caption\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tlabel={ __( 'Embed caption text' ) }\n\t\t\t\t\tshowToolbarButton={ isSelected }\n\t\t\t\t/>\n\t\t\t</figure>\n\t\t</>\n\t);\n};\n\nexport default EmbedEdit;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,wBAAwB,EACxBC,aAAa,EACbC,wBAAwB,EACxBC,QAAQ,EACRC,sBAAsB,EACtBC,8BAA8B,QACxB,QAAQ;AACf,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,gBAAgB,QAAQ,SAAS;AAC1C,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,YAAY,MAAM,iBAAiB;;AAE1C;AACA;AACA;AACA,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,OAAO,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAE3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jD,iBAAiB,EAAGA,iBAAmB;QACvCT,UAAU,EAAGA,UAAY;QACzBQ,aAAa,EAAGA;MAAe,CAC/B,CAAC,eACFf,IAAA,CAACF,OAAO;QACPS,UAAU,EAAGA,UAAY;QACzBQ,aAAa,EAAGA,aAAe;QAC/BF,UAAU,EAAGA,UAAY;QACzBG,iBAAiB,EAAGA,iBAAmB;QACvCiD,KAAK,EAAG/E,EAAE,CAAE,oBAAqB,CAAG;QACpC8F,iBAAiB,EAAGnE;MAAY,CAChC,CAAC;IAAA,CACK,CAAC;EAAA,CACR,CAAC;AAEL,CAAC;AAED,eAAeR,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createUpgradedEmbedBlock","getClassNames","removeAspectRatioClasses","fallback","getEmbedInfoByProvider","getMergedAttributesWithPreview","EmbedControls","embedContentIcon","EmbedLoading","EmbedPlaceholder","EmbedPreview","clsx","__","_x","sprintf","useState","useEffect","useDispatch","useSelect","useBlockProps","store","coreStore","View","getAuthority","Caption","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","EmbedEdit","props","attributes","providerNameSlug","previewable","responsive","url","attributesUrl","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","defaultEmbedInfo","title","icon","setURL","isEditingURL","setIsEditingURL","invalidateResolution","preview","fetching","themeSupportsResponsive","cannotEmbed","hasResolved","select","getEmbedPreview","isPreviewEmbedFallback","isRequestingEmbedPreview","getThemeSupports","hasFinishedResolution","embedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","data","status","validPreview","getMergedAttributes","toggleResponsive","newAllowResponsive","className","allowResponsive","newURL","replace","URL","host","toString","mergedAttributes","hasChanges","Object","keys","some","key","upgradedBlock","blockProps","children","label","showEmbedPlaceholder","onSubmit","event","preventDefault","blockClass","value","onChange","tryAgain","caption","classFromPreview","showEditButton","blockSupportsResponsive","switchBackToURLInput","onCaptionChange","showToolbarButton"],"sources":["@wordpress/block-library/src/embed/edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useBlockProps } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\nimport { Caption } from '../utils/caption';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: {\n\t\t\tproviderNameSlug,\n\t\t\tpreviewable,\n\t\t\tresponsive,\n\t\t\turl: attributesUrl,\n\t\t},\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst { icon, title } =\n\t\tgetEmbedInfoByProvider( providerNameSlug ) || defaultEmbedInfo;\n\n\tconst [ url, setURL ] = useState( attributesUrl );\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst {\n\t\tpreview,\n\t\tfetching,\n\t\tthemeSupportsResponsive,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEmbedPreview,\n\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\tisRequestingEmbedPreview,\n\t\t\t\tgetThemeSupports,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\t\t\tif ( ! attributesUrl ) {\n\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t}\n\n\t\t\tconst embedPreview = getEmbedPreview( attributesUrl );\n\t\t\tconst previewIsFallback = isPreviewEmbedFallback( attributesUrl );\n\n\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\tconst badEmbedProvider =\n\t\t\t\tembedPreview?.html === false &&\n\t\t\t\tembedPreview?.type === undefined;\n\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t// a valid JSON response with no HTML and `data.status` set to 404, rather\n\t\t\t// than generating a fallback response as other embeds do.\n\t\t\tconst wordpressCantEmbed = embedPreview?.data?.status === 404;\n\t\t\tconst validPreview =\n\t\t\t\t!! embedPreview && ! badEmbedProvider && ! wordpressCantEmbed;\n\t\t\treturn {\n\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\tfetching: isRequestingEmbedPreview( attributesUrl ),\n\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\thasResolved: hasFinishedResolution( 'getEmbedPreview', [\n\t\t\t\t\tattributesUrl,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ attributesUrl ]\n\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tfunction toggleResponsive( newAllowResponsive ) {\n\t\tconst { className } = attributes;\n\t\tconst { html } = preview;\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t}\n\n\tuseEffect( () => {\n\t\tif ( preview?.html || ! cannotEmbed || ! hasResolved ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = attributesUrl.replace( /\\/$/, '' );\n\t\tsetURL( newURL );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [\n\t\tpreview?.html,\n\t\tattributesUrl,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t\tsetAttributes,\n\t] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tconst hasChanges = Object.keys( mergedAttributes ).some(\n\t\t\t\t( key ) => mergedAttributes[ key ] !== attributes[ key ]\n\t\t\t);\n\n\t\t\tif ( hasChanges ) {\n\t\t\t\tsetAttributes( mergedAttributes );\n\t\t\t}\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// translators: %s: type of embed e.g: \"YouTube\", \"Twitter\", etc. \"Embed\" is used when no specific type exists\n\tconst label = sprintf( __( '%s URL' ), title );\n\n\t// No preview, or we can't embed the current URL, or we've clicked the edit button.\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed || isEditingURL;\n\n\tif ( showEmbedPlaceholder ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\tif ( event ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\t\t\tattributes.className\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\tsetAttributes( { url, className: blockClass } );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ url }\n\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\tonChange={ ( value ) => setURL( value ) }\n\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [ url ] );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\tcaption,\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = clsx( classFromPreview, props.className );\n\n\treturn (\n\t\t<>\n\t\t\t<EmbedControls\n\t\t\t\tshowEditButton={ preview && ! cannotEmbed }\n\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\tswitchBackToURLInput={ () => setIsEditingURL( true ) }\n\t\t\t/>\n\t\t\t<figure\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ clsx( blockProps.className, className, {\n\t\t\t\t\t[ `is-type-${ type }` ]: type,\n\t\t\t\t\t[ `is-provider-${ providerNameSlug }` ]: providerNameSlug,\n\t\t\t\t\t[ `wp-block-embed-${ providerNameSlug }` ]:\n\t\t\t\t\t\tproviderNameSlug,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<EmbedPreview\n\t\t\t\t\tpreview={ preview }\n\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\turl={ url }\n\t\t\t\t\ttype={ type }\n\t\t\t\t\tcaption={ caption }\n\t\t\t\t\tonCaptionChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { caption: value } )\n\t\t\t\t\t}\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t\t<Caption\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tlabel={ __( 'Embed caption text' ) }\n\t\t\t\t\tshowToolbarButton={ isSelected }\n\t\t\t\t/>\n\t\t\t</figure>\n\t\t</>\n\t);\n};\n\nexport default EmbedEdit;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,wBAAwB,EACxBC,aAAa,EACbC,wBAAwB,EACxBC,QAAQ,EACRC,sBAAsB,EACtBC,8BAA8B,QACxB,QAAQ;AACf,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,gBAAgB,QAAQ,SAAS;AAC1C,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,YAAY,MAAM,iBAAiB;;AAE1C;AACA;AACA;AACA,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,OAAO,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAE3C,MAAMC,SAAS,GAAKC,KAAK,IAAM;EAC9B,MAAM;IACLC,UAAU,EAAE;MACXC,gBAAgB;MAChBC,WAAW;MACXC,UAAU;MACVC,GAAG,EAAEC;IACN,CAAC;IACDL,UAAU;IACVM,UAAU;IACVC,SAAS;IACTC,aAAa;IACbC,i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,EAAE,CAAE,oBAAqB,CAAG;QACpC8F,iBAAiB,EAAGnE;MAAY,CAChC,CAAC;IAAA,CACK,CAAC;EAAA,CACR,CAAC;AAEL,CAAC;AAED,eAAeR,SAAS","ignoreList":[]}
|
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import { ToolbarButton,
|
|
5
|
+
import { ToolbarButton, ToggleControl, ToolbarGroup, __experimentalToolsPanel as ToolsPanel, __experimentalToolsPanelItem as ToolsPanelItem } from '@wordpress/components';
|
|
6
6
|
import { BlockControls, InspectorControls } from '@wordpress/block-editor';
|
|
7
7
|
import { edit } from '@wordpress/icons';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Internal dependencies
|
|
11
|
+
*/
|
|
12
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
8
13
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
14
|
function getResponsiveHelp(checked) {
|
|
10
15
|
return checked ? __('This embed will preserve its aspect ratio when the browser is resized.') : __('This embed may not preserve its aspect ratio when the browser is resized.');
|
|
@@ -16,29 +21,43 @@ const EmbedControls = ({
|
|
|
16
21
|
allowResponsive,
|
|
17
22
|
toggleResponsive,
|
|
18
23
|
switchBackToURLInput
|
|
19
|
-
}) =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
}) => {
|
|
25
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
26
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
27
|
+
children: [/*#__PURE__*/_jsx(BlockControls, {
|
|
28
|
+
children: /*#__PURE__*/_jsx(ToolbarGroup, {
|
|
29
|
+
children: showEditButton && /*#__PURE__*/_jsx(ToolbarButton, {
|
|
30
|
+
className: "components-toolbar__control",
|
|
31
|
+
label: __('Edit URL'),
|
|
32
|
+
icon: edit,
|
|
33
|
+
onClick: switchBackToURLInput
|
|
34
|
+
})
|
|
27
35
|
})
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
}), themeSupportsResponsive && blockSupportsResponsive && /*#__PURE__*/_jsx(InspectorControls, {
|
|
37
|
+
children: /*#__PURE__*/_jsx(ToolsPanel, {
|
|
38
|
+
label: __('Media settings'),
|
|
39
|
+
resetAll: () => {
|
|
40
|
+
toggleResponsive(true);
|
|
41
|
+
},
|
|
42
|
+
dropdownMenuProps: dropdownMenuProps,
|
|
43
|
+
children: /*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
44
|
+
label: __('Media settings'),
|
|
45
|
+
isShownByDefault: true,
|
|
46
|
+
hasValue: () => !allowResponsive,
|
|
47
|
+
onDeselect: () => {
|
|
48
|
+
toggleResponsive(!allowResponsive);
|
|
49
|
+
},
|
|
50
|
+
children: /*#__PURE__*/_jsx(ToggleControl, {
|
|
51
|
+
__nextHasNoMarginBottom: true,
|
|
52
|
+
label: __('Resize for smaller devices'),
|
|
53
|
+
checked: allowResponsive,
|
|
54
|
+
help: getResponsiveHelp,
|
|
55
|
+
onChange: toggleResponsive
|
|
56
|
+
})
|
|
57
|
+
})
|
|
39
58
|
})
|
|
40
|
-
})
|
|
41
|
-
})
|
|
42
|
-
}
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
43
62
|
export default EmbedControls;
|
|
44
63
|
//# sourceMappingURL=embed-controls.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","ToolbarButton","
|
|
1
|
+
{"version":3,"names":["__","ToolbarButton","ToggleControl","ToolbarGroup","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","BlockControls","InspectorControls","edit","useToolsPanelDropdownMenuProps","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","getResponsiveHelp","checked","EmbedControls","blockSupportsResponsive","showEditButton","themeSupportsResponsive","allowResponsive","toggleResponsive","switchBackToURLInput","dropdownMenuProps","children","className","label","icon","onClick","resetAll","isShownByDefault","hasValue","onDeselect","__nextHasNoMarginBottom","help","onChange"],"sources":["@wordpress/block-library/src/embed/embed-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tToolbarButton,\n\tToggleControl,\n\tToolbarGroup,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { BlockControls, InspectorControls } from '@wordpress/block-editor';\nimport { edit } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nfunction getResponsiveHelp( checked ) {\n\treturn checked\n\t\t? __(\n\t\t\t\t'This embed will preserve its aspect ratio when the browser is resized.'\n\t\t )\n\t\t: __(\n\t\t\t\t'This embed may not preserve its aspect ratio when the browser is resized.'\n\t\t );\n}\n\nconst EmbedControls = ( {\n\tblockSupportsResponsive,\n\tshowEditButton,\n\tthemeSupportsResponsive,\n\tallowResponsive,\n\ttoggleResponsive,\n\tswitchBackToURLInput,\n} ) => {\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t{ showEditButton && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tclassName=\"components-toolbar__control\"\n\t\t\t\t\t\t\tlabel={ __( 'Edit URL' ) }\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tonClick={ switchBackToURLInput }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarGroup>\n\t\t\t</BlockControls>\n\t\t\t{ themeSupportsResponsive && blockSupportsResponsive && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<ToolsPanel\n\t\t\t\t\t\tlabel={ __( 'Media settings' ) }\n\t\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\t\ttoggleResponsive( true );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Media settings' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => ! allowResponsive }\n\t\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\t\ttoggleResponsive( ! allowResponsive );\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={ __( 'Resize for smaller devices' ) }\n\t\t\t\t\t\t\t\tchecked={ allowResponsive }\n\t\t\t\t\t\t\t\thelp={ getResponsiveHelp }\n\t\t\t\t\t\t\t\tonChange={ toggleResponsive }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t</ToolsPanel>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default EmbedControls;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,aAAa,EACbC,aAAa,EACbC,YAAY,EACZC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,aAAa,EAAEC,iBAAiB,QAAQ,yBAAyB;AAC1E,SAASC,IAAI,QAAQ,kBAAkB;;AAEvC;AACA;AACA;AACA,SAASC,8BAA8B,QAAQ,gBAAgB;AAAC,SAAAC,GAAA,IAAAC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uBAAuB;YACvBP,KAAK,EAAG9B,EAAE,CAAE,4BAA6B,CAAG;YAC5CmB,OAAO,EAAGK,eAAiB;YAC3Bc,IAAI,EAAGpB,iBAAmB;YAC1BqB,QAAQ,EAAGd;UAAkB,CAC7B;QAAC,CACa;MAAC,CACN;IAAC,CACK,CACnB;EAAA,CACA,CAAC;AAEL,CAAC;AAED,eAAeL,aAAa","ignoreList":[]}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import {
|
|
5
|
+
import { RangeControl, SelectControl, ToggleControl, __experimentalToolsPanel as ToolsPanel, __experimentalToolsPanelItem as ToolsPanelItem } from '@wordpress/components';
|
|
6
6
|
import { InspectorControls } from '@wordpress/block-editor';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Internal dependencies
|
|
10
10
|
*/
|
|
11
11
|
import { MIN_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT } from './edit';
|
|
12
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
12
13
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
14
|
export default function FileBlockInspector({
|
|
14
15
|
hrefs,
|
|
@@ -27,6 +28,7 @@ export default function FileBlockInspector({
|
|
|
27
28
|
textLinkHref,
|
|
28
29
|
attachmentPage
|
|
29
30
|
} = hrefs;
|
|
31
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
30
32
|
let linkDestinationOptions = [{
|
|
31
33
|
value: href,
|
|
32
34
|
label: __('URL')
|
|
@@ -42,42 +44,83 @@ export default function FileBlockInspector({
|
|
|
42
44
|
}
|
|
43
45
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
44
46
|
children: /*#__PURE__*/_jsxs(InspectorControls, {
|
|
45
|
-
children: [href.endsWith('.pdf') && /*#__PURE__*/_jsxs(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
children: [href.endsWith('.pdf') && /*#__PURE__*/_jsxs(ToolsPanel, {
|
|
48
|
+
label: __('PDF settings'),
|
|
49
|
+
resetAll: () => {
|
|
50
|
+
changeDisplayPreview(true);
|
|
51
|
+
changePreviewHeight(600);
|
|
52
|
+
},
|
|
53
|
+
dropdownMenuProps: dropdownMenuProps,
|
|
54
|
+
children: [/*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
49
55
|
label: __('Show inline embed'),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
isShownByDefault: true,
|
|
57
|
+
hasValue: () => !displayPreview,
|
|
58
|
+
onDeselect: () => changeDisplayPreview(true),
|
|
59
|
+
children: /*#__PURE__*/_jsx(ToggleControl, {
|
|
60
|
+
__nextHasNoMarginBottom: true,
|
|
61
|
+
label: __('Show inline embed'),
|
|
62
|
+
help: displayPreview ? __("Note: Most phone and tablet browsers won't display embedded PDFs.") : null,
|
|
63
|
+
checked: !!displayPreview,
|
|
64
|
+
onChange: changeDisplayPreview
|
|
65
|
+
})
|
|
66
|
+
}), displayPreview && /*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
56
67
|
label: __('Height in pixels'),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
68
|
+
isShownByDefault: true,
|
|
69
|
+
hasValue: () => previewHeight !== 600,
|
|
70
|
+
onDeselect: () => changePreviewHeight(600),
|
|
71
|
+
children: /*#__PURE__*/_jsx(RangeControl, {
|
|
72
|
+
__nextHasNoMarginBottom: true,
|
|
73
|
+
__next40pxDefaultSize: true,
|
|
74
|
+
label: __('Height in pixels'),
|
|
75
|
+
min: MIN_PREVIEW_HEIGHT,
|
|
76
|
+
max: Math.max(MAX_PREVIEW_HEIGHT, previewHeight),
|
|
77
|
+
value: previewHeight,
|
|
78
|
+
onChange: changePreviewHeight
|
|
79
|
+
})
|
|
61
80
|
})]
|
|
62
|
-
}), /*#__PURE__*/_jsxs(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
81
|
+
}), /*#__PURE__*/_jsxs(ToolsPanel, {
|
|
82
|
+
label: __('Settings'),
|
|
83
|
+
resetAll: () => {
|
|
84
|
+
changeLinkDestinationOption(href);
|
|
85
|
+
changeOpenInNewWindow(false);
|
|
86
|
+
changeShowDownloadButton(true);
|
|
87
|
+
},
|
|
88
|
+
dropdownMenuProps: dropdownMenuProps,
|
|
89
|
+
children: [/*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
67
90
|
label: __('Link to'),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
91
|
+
isShownByDefault: true,
|
|
92
|
+
hasValue: () => textLinkHref !== href,
|
|
93
|
+
onDeselect: () => changeLinkDestinationOption(href),
|
|
94
|
+
children: /*#__PURE__*/_jsx(SelectControl, {
|
|
95
|
+
__next40pxDefaultSize: true,
|
|
96
|
+
__nextHasNoMarginBottom: true,
|
|
97
|
+
label: __('Link to'),
|
|
98
|
+
value: textLinkHref,
|
|
99
|
+
options: linkDestinationOptions,
|
|
100
|
+
onChange: changeLinkDestinationOption
|
|
101
|
+
})
|
|
102
|
+
}), /*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
73
103
|
label: __('Open in new tab'),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
104
|
+
isShownByDefault: true,
|
|
105
|
+
hasValue: () => !!openInNewWindow,
|
|
106
|
+
onDeselect: () => changeOpenInNewWindow(false),
|
|
107
|
+
children: /*#__PURE__*/_jsx(ToggleControl, {
|
|
108
|
+
__nextHasNoMarginBottom: true,
|
|
109
|
+
label: __('Open in new tab'),
|
|
110
|
+
checked: openInNewWindow,
|
|
111
|
+
onChange: changeOpenInNewWindow
|
|
112
|
+
})
|
|
113
|
+
}), /*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
78
114
|
label: __('Show download button'),
|
|
79
|
-
|
|
80
|
-
|
|
115
|
+
isShownByDefault: true,
|
|
116
|
+
hasValue: () => !showDownloadButton,
|
|
117
|
+
onDeselect: () => changeShowDownloadButton(true),
|
|
118
|
+
children: /*#__PURE__*/_jsx(ToggleControl, {
|
|
119
|
+
__nextHasNoMarginBottom: true,
|
|
120
|
+
label: __('Show download button'),
|
|
121
|
+
checked: showDownloadButton,
|
|
122
|
+
onChange: changeShowDownloadButton
|
|
123
|
+
})
|
|
81
124
|
})]
|
|
82
125
|
})]
|
|
83
126
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","
|
|
1
|
+
{"version":3,"names":["__","RangeControl","SelectControl","ToggleControl","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","InspectorControls","MIN_PREVIEW_HEIGHT","MAX_PREVIEW_HEIGHT","useToolsPanelDropdownMenuProps","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","FileBlockInspector","hrefs","openInNewWindow","showDownloadButton","changeLinkDestinationOption","changeOpenInNewWindow","changeShowDownloadButton","displayPreview","changeDisplayPreview","previewHeight","changePreviewHeight","href","textLinkHref","attachmentPage","dropdownMenuProps","linkDestinationOptions","value","label","children","endsWith","resetAll","isShownByDefault","hasValue","onDeselect","__nextHasNoMarginBottom","help","checked","onChange","__next40pxDefaultSize","min","max","Math","options"],"sources":["@wordpress/block-library/src/file/inspector.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tRangeControl,\n\tSelectControl,\n\tToggleControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { InspectorControls } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { MIN_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT } from './edit';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nexport default function FileBlockInspector( {\n\threfs,\n\topenInNewWindow,\n\tshowDownloadButton,\n\tchangeLinkDestinationOption,\n\tchangeOpenInNewWindow,\n\tchangeShowDownloadButton,\n\tdisplayPreview,\n\tchangeDisplayPreview,\n\tpreviewHeight,\n\tchangePreviewHeight,\n} ) {\n\tconst { href, textLinkHref, attachmentPage } = hrefs;\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tlet linkDestinationOptions = [ { value: href, label: __( 'URL' ) } ];\n\tif ( attachmentPage ) {\n\t\tlinkDestinationOptions = [\n\t\t\t{ value: href, label: __( 'Media file' ) },\n\t\t\t{ value: attachmentPage, label: __( 'Attachment page' ) },\n\t\t];\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ href.endsWith( '.pdf' ) && (\n\t\t\t\t\t<ToolsPanel\n\t\t\t\t\t\tlabel={ __( 'PDF settings' ) }\n\t\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\t\tchangeDisplayPreview( true );\n\t\t\t\t\t\t\tchangePreviewHeight( 600 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Show inline embed' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => ! displayPreview }\n\t\t\t\t\t\t\tonDeselect={ () => changeDisplayPreview( true ) }\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={ __( 'Show inline embed' ) }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tdisplayPreview\n\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\"Note: Most phone and tablet browsers won't display embedded PDFs.\"\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tchecked={ !! displayPreview }\n\t\t\t\t\t\t\t\tonChange={ changeDisplayPreview }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t{ displayPreview && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\tlabel={ __( 'Height in pixels' ) }\n\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\thasValue={ () => previewHeight !== 600 }\n\t\t\t\t\t\t\t\tonDeselect={ () => changePreviewHeight( 600 ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Height in pixels' ) }\n\t\t\t\t\t\t\t\t\tmin={ MIN_PREVIEW_HEIGHT }\n\t\t\t\t\t\t\t\t\tmax={ Math.max(\n\t\t\t\t\t\t\t\t\t\tMAX_PREVIEW_HEIGHT,\n\t\t\t\t\t\t\t\t\t\tpreviewHeight\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tvalue={ previewHeight }\n\t\t\t\t\t\t\t\t\tonChange={ changePreviewHeight }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToolsPanel>\n\t\t\t\t) }\n\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\tchangeLinkDestinationOption( href );\n\t\t\t\t\t\tchangeOpenInNewWindow( false );\n\t\t\t\t\t\tchangeShowDownloadButton( true );\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={ __( 'Link to' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => textLinkHref !== href }\n\t\t\t\t\t\tonDeselect={ () => changeLinkDestinationOption( href ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Link to' ) }\n\t\t\t\t\t\t\tvalue={ textLinkHref }\n\t\t\t\t\t\t\toptions={ linkDestinationOptions }\n\t\t\t\t\t\t\tonChange={ changeLinkDestinationOption }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! openInNewWindow }\n\t\t\t\t\t\tonDeselect={ () => changeOpenInNewWindow( false ) }\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={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\tchecked={ openInNewWindow }\n\t\t\t\t\t\t\tonChange={ changeOpenInNewWindow }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Show download button' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => ! showDownloadButton }\n\t\t\t\t\t\tonDeselect={ () => changeShowDownloadButton( true ) }\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={ __( 'Show download button' ) }\n\t\t\t\t\t\t\tchecked={ showDownloadButton }\n\t\t\t\t\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A,CAACN,cAAc;UACd4B,KAAK,EAAGnC,EAAE,CAAE,sBAAuB,CAAG;UACtCuC,gBAAgB;UAChBC,QAAQ,EAAGA,CAAA,KAAM,CAAEnB,kBAAoB;UACvCoB,UAAU,EAAGA,CAAA,KAAMjB,wBAAwB,CAAE,IAAK,CAAG;UAAAY,QAAA,eAErDvB,IAAA,CAACV,aAAa;YACbuC,uBAAuB;YACvBP,KAAK,EAAGnC,EAAE,CAAE,sBAAuB,CAAG;YACtC4C,OAAO,EAAGvB,kBAAoB;YAC9BwB,QAAQ,EAAGrB;UAA0B,CACrC;QAAC,CACa,CAAC;MAAA,CACN,CAAC;IAAA,CACK;EAAC,CACnB,CAAC;AAEL","ignoreList":[]}
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import { InnerBlocks, useBlockProps, useInnerBlocksProps, InspectorControls, store as blockEditorStore } from '@wordpress/block-editor';
|
|
6
|
-
import { TextControl,
|
|
6
|
+
import { SelectControl, TextControl, __experimentalToolsPanel as ToolsPanel, __experimentalToolsPanelItem as ToolsPanelItem } from '@wordpress/components';
|
|
7
7
|
import { useSelect } from '@wordpress/data';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
12
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
12
13
|
import { formSubmissionNotificationSuccess, formSubmissionNotificationError } from './utils.js';
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
15
|
const TEMPLATE = [formSubmissionNotificationSuccess, formSubmissionNotificationError, ['core/form-input', {
|
|
@@ -29,6 +30,15 @@ const Edit = ({
|
|
|
29
30
|
setAttributes,
|
|
30
31
|
clientId
|
|
31
32
|
}) => {
|
|
33
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
34
|
+
const resetAllSettings = () => {
|
|
35
|
+
setAttributes({
|
|
36
|
+
submissionMethod: 'email',
|
|
37
|
+
email: undefined,
|
|
38
|
+
action: undefined,
|
|
39
|
+
method: 'post'
|
|
40
|
+
});
|
|
41
|
+
};
|
|
32
42
|
const {
|
|
33
43
|
action,
|
|
34
44
|
method,
|
|
@@ -53,46 +63,66 @@ const Edit = ({
|
|
|
53
63
|
});
|
|
54
64
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
55
65
|
children: [/*#__PURE__*/_jsx(InspectorControls, {
|
|
56
|
-
children: /*#__PURE__*/_jsxs(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
children: /*#__PURE__*/_jsxs(ToolsPanel, {
|
|
67
|
+
dropdownMenuProps: dropdownMenuProps,
|
|
68
|
+
label: __('Settings'),
|
|
69
|
+
resetAll: resetAllSettings,
|
|
70
|
+
children: [/*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
71
|
+
hasValue: () => submissionMethod !== 'email',
|
|
61
72
|
label: __('Submissions method'),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
label: __('Send email'),
|
|
66
|
-
value: 'email'
|
|
67
|
-
}, {
|
|
68
|
-
label: __('- Custom -'),
|
|
69
|
-
value: 'custom'
|
|
70
|
-
}],
|
|
71
|
-
value: submissionMethod,
|
|
72
|
-
onChange: value => setAttributes({
|
|
73
|
-
submissionMethod: value
|
|
73
|
+
onDeselect: () => setAttributes({
|
|
74
|
+
submissionMethod: 'email'
|
|
74
75
|
}),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
isShownByDefault: true,
|
|
77
|
+
children: /*#__PURE__*/_jsx(SelectControl, {
|
|
78
|
+
__nextHasNoMarginBottom: true,
|
|
79
|
+
__next40pxDefaultSize: true,
|
|
80
|
+
label: __('Submissions method'),
|
|
81
|
+
options: [
|
|
82
|
+
// TODO: Allow plugins to add their own submission methods.
|
|
83
|
+
{
|
|
84
|
+
label: __('Send email'),
|
|
85
|
+
value: 'email'
|
|
86
|
+
}, {
|
|
87
|
+
label: __('- Custom -'),
|
|
88
|
+
value: 'custom'
|
|
89
|
+
}],
|
|
90
|
+
value: submissionMethod,
|
|
91
|
+
onChange: value => setAttributes({
|
|
92
|
+
submissionMethod: value
|
|
93
|
+
}),
|
|
94
|
+
help: submissionMethod === 'custom' ? __('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.') : __('Select the method to use for form submissions.')
|
|
95
|
+
})
|
|
96
|
+
}), submissionMethod === 'email' && /*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
97
|
+
hasValue: () => !!email,
|
|
80
98
|
label: __('Email for form submissions'),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
onDeselect: () => setAttributes({
|
|
100
|
+
email: undefined,
|
|
101
|
+
action: undefined,
|
|
102
|
+
method: 'post'
|
|
103
|
+
}),
|
|
104
|
+
isShownByDefault: true,
|
|
105
|
+
children: /*#__PURE__*/_jsx(TextControl, {
|
|
106
|
+
__nextHasNoMarginBottom: true,
|
|
107
|
+
__next40pxDefaultSize: true,
|
|
108
|
+
autoComplete: "off",
|
|
109
|
+
label: __('Email for form submissions'),
|
|
110
|
+
value: email || '',
|
|
111
|
+
required: true,
|
|
112
|
+
onChange: value => {
|
|
113
|
+
setAttributes({
|
|
114
|
+
email: value
|
|
115
|
+
});
|
|
116
|
+
setAttributes({
|
|
117
|
+
action: `mailto:${value}`
|
|
118
|
+
});
|
|
119
|
+
setAttributes({
|
|
120
|
+
method: 'post'
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
help: __('The email address where form submissions will be sent. Separate multiple email addresses with a comma.'),
|
|
124
|
+
type: "email"
|
|
125
|
+
})
|
|
96
126
|
})]
|
|
97
127
|
})
|
|
98
128
|
}), submissionMethod !== 'email' && /*#__PURE__*/_jsxs(InspectorControls, {
|