@wordpress/block-library 9.36.1-next.738bb1424.0 → 9.36.2-next.8fd3f8831.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/accordion-heading/deprecated.cjs +120 -1
- package/build/accordion-heading/deprecated.cjs.map +2 -2
- package/build/accordion-heading/edit.cjs +9 -1
- package/build/accordion-heading/edit.cjs.map +3 -3
- package/build/accordion-heading/save.cjs +1 -0
- package/build/accordion-heading/save.cjs.map +2 -2
- package/build/accordion-item/block.json +3 -0
- package/build/accordion-item/edit.cjs +3 -37
- package/build/accordion-item/edit.cjs.map +2 -2
- package/build/accordion-panel/block.json +1 -4
- package/build/accordion-panel/edit.cjs +3 -2
- package/build/accordion-panel/edit.cjs.map +2 -2
- package/build/breadcrumbs/block.json +1 -2
- package/build/breadcrumbs/edit.cjs +2 -1
- package/build/breadcrumbs/edit.cjs.map +2 -2
- package/build/button/index.cjs +9 -1
- package/build/button/index.cjs.map +2 -2
- package/build/buttons/block.json +1 -0
- package/build/comment-author-name/block.json +1 -3
- package/build/comment-author-name/deprecated.cjs +57 -1
- package/build/comment-author-name/deprecated.cjs.map +3 -3
- package/build/comment-author-name/edit.cjs +9 -19
- package/build/comment-author-name/edit.cjs.map +3 -3
- package/build/freeform/edit.cjs +48 -174
- package/build/freeform/edit.cjs.map +2 -2
- package/build/freeform/modal.cjs +51 -67
- package/build/freeform/modal.cjs.map +2 -2
- package/build/index.cjs +2 -2
- package/build/index.cjs.map +2 -2
- package/build/list/block.json +2 -1
- package/build/query/edit/query-content.cjs +4 -3
- package/build/query/edit/query-content.cjs.map +2 -2
- package/build/query/edit/query-placeholder.cjs +4 -3
- package/build/query/edit/query-placeholder.cjs.map +2 -2
- package/build/query/edit/query-toolbar.cjs +19 -7
- package/build/query/edit/query-toolbar.cjs.map +3 -3
- package/build/social-links/block.json +2 -1
- package/build-module/accordion-heading/deprecated.js +122 -2
- package/build-module/accordion-heading/deprecated.js.map +2 -2
- package/build-module/accordion-heading/edit.js +11 -2
- package/build-module/accordion-heading/edit.js.map +2 -2
- package/build-module/accordion-heading/save.js +1 -0
- package/build-module/accordion-heading/save.js.map +2 -2
- package/build-module/accordion-item/block.json +3 -0
- package/build-module/accordion-item/edit.js +3 -37
- package/build-module/accordion-item/edit.js.map +2 -2
- package/build-module/accordion-panel/block.json +1 -4
- package/build-module/accordion-panel/edit.js +3 -2
- package/build-module/accordion-panel/edit.js.map +2 -2
- package/build-module/breadcrumbs/block.json +1 -2
- package/build-module/breadcrumbs/edit.js +2 -1
- package/build-module/breadcrumbs/edit.js.map +2 -2
- package/build-module/button/index.js +9 -1
- package/build-module/button/index.js.map +2 -2
- package/build-module/buttons/block.json +1 -0
- package/build-module/comment-author-name/block.json +1 -3
- package/build-module/comment-author-name/deprecated.js +57 -1
- package/build-module/comment-author-name/deprecated.js.map +2 -2
- package/build-module/comment-author-name/edit.js +10 -25
- package/build-module/comment-author-name/edit.js.map +2 -2
- package/build-module/freeform/edit.js +56 -176
- package/build-module/freeform/edit.js.map +2 -2
- package/build-module/freeform/modal.js +55 -78
- package/build-module/freeform/modal.js.map +2 -2
- package/build-module/index.js +2 -2
- package/build-module/index.js.map +2 -2
- package/build-module/list/block.json +2 -1
- package/build-module/query/edit/query-content.js +5 -5
- package/build-module/query/edit/query-content.js.map +2 -2
- package/build-module/query/edit/query-placeholder.js +4 -4
- package/build-module/query/edit/query-placeholder.js.map +2 -2
- package/build-module/query/edit/query-toolbar.js +22 -7
- package/build-module/query/edit/query-toolbar.js.map +2 -2
- package/build-module/social-links/block.json +2 -1
- package/build-style/audio/style-rtl.css +4 -0
- package/build-style/audio/style.css +4 -0
- package/build-style/audio/theme-rtl.css +4 -0
- package/build-style/audio/theme.css +4 -0
- package/build-style/columns/style-rtl.css +4 -0
- package/build-style/columns/style.css +4 -0
- package/build-style/common-rtl.css +4 -0
- package/build-style/common.css +4 -0
- package/build-style/editor-rtl.css +9 -324
- package/build-style/editor.css +9 -328
- package/build-style/embed/style-rtl.css +4 -0
- package/build-style/embed/style.css +4 -0
- package/build-style/embed/theme-rtl.css +4 -0
- package/build-style/embed/theme.css +4 -0
- package/build-style/freeform/editor-rtl.css +10 -330
- package/build-style/freeform/editor.css +10 -334
- package/build-style/gallery/editor-rtl.css +4 -0
- package/build-style/gallery/editor.css +4 -0
- package/build-style/gallery/style-rtl.css +4 -0
- package/build-style/gallery/style.css +4 -0
- package/build-style/gallery/theme-rtl.css +4 -0
- package/build-style/gallery/theme.css +4 -0
- package/build-style/html/editor-rtl.css +4 -0
- package/build-style/html/editor.css +4 -0
- package/build-style/image/editor-rtl.css +4 -0
- package/build-style/image/editor.css +4 -0
- package/build-style/image/style-rtl.css +4 -0
- package/build-style/image/style.css +4 -0
- package/build-style/image/theme-rtl.css +4 -0
- package/build-style/image/theme.css +4 -0
- package/build-style/latest-posts/style-rtl.css +4 -0
- package/build-style/latest-posts/style.css +4 -0
- package/build-style/navigation/editor-rtl.css +4 -0
- package/build-style/navigation/editor.css +4 -0
- package/build-style/navigation/style-rtl.css +4 -0
- package/build-style/navigation/style.css +4 -0
- package/build-style/navigation-submenu/editor-rtl.css +4 -0
- package/build-style/navigation-submenu/editor.css +4 -0
- package/build-style/page-list/editor-rtl.css +4 -0
- package/build-style/page-list/editor.css +4 -0
- package/build-style/paragraph/editor-rtl.css +5 -0
- package/build-style/paragraph/editor.css +5 -0
- package/build-style/post-template/style-rtl.css +4 -0
- package/build-style/post-template/style.css +4 -0
- package/build-style/query/editor-rtl.css +4 -0
- package/build-style/query/editor.css +4 -0
- package/build-style/rss/style-rtl.css +4 -0
- package/build-style/rss/style.css +4 -0
- package/build-style/shortcode/editor-rtl.css +4 -0
- package/build-style/shortcode/editor.css +4 -0
- package/build-style/style-rtl.css +4 -0
- package/build-style/style.css +4 -0
- package/build-style/table/editor-rtl.css +4 -0
- package/build-style/table/editor.css +4 -0
- package/build-style/table/theme-rtl.css +4 -0
- package/build-style/table/theme.css +4 -0
- package/build-style/template-part/editor-rtl.css +4 -0
- package/build-style/template-part/editor.css +4 -0
- package/build-style/theme-rtl.css +4 -0
- package/build-style/theme.css +4 -0
- package/build-style/video/style-rtl.css +4 -0
- package/build-style/video/style.css +4 -0
- package/build-style/video/theme-rtl.css +4 -0
- package/build-style/video/theme.css +4 -0
- package/package.json +37 -37
- package/src/accordion-heading/deprecated.js +122 -1
- package/src/accordion-heading/edit.js +11 -1
- package/src/accordion-heading/save.js +1 -0
- package/src/accordion-item/block.json +3 -0
- package/src/accordion-item/edit.js +4 -38
- package/src/accordion-panel/block.json +1 -4
- package/src/accordion-panel/edit.js +3 -4
- package/src/breadcrumbs/block.json +1 -2
- package/src/breadcrumbs/edit.js +2 -1
- package/src/breadcrumbs/index.php +23 -1
- package/src/button/index.js +12 -0
- package/src/button/test/get-experimental-label.js +50 -0
- package/src/buttons/block.json +1 -0
- package/src/comment-author-name/block.json +1 -3
- package/src/comment-author-name/deprecated.js +61 -1
- package/src/comment-author-name/edit.js +10 -34
- package/src/freeform/edit.js +60 -245
- package/src/freeform/editor.scss +1 -382
- package/src/freeform/modal.js +47 -80
- package/src/index.js +1 -1
- package/src/list/block.json +2 -1
- package/src/paragraph/editor.scss +8 -0
- package/src/post-date/index.php +4 -7
- package/src/query/edit/query-content.js +3 -3
- package/src/query/edit/query-placeholder.js +3 -3
- package/src/query/edit/query-toolbar.js +47 -31
- package/src/social-links/block.json +2 -1
- package/src/term-template/index.php +1 -1
|
@@ -7,50 +7,66 @@ import {
|
|
|
7
7
|
__experimentalDropdownContentWrapper as DropdownContentWrapper,
|
|
8
8
|
} from '@wordpress/components';
|
|
9
9
|
import { __ } from '@wordpress/i18n';
|
|
10
|
+
import { useSelect } from '@wordpress/data';
|
|
11
|
+
import {
|
|
12
|
+
BlockControls,
|
|
13
|
+
store as blockEditorStore,
|
|
14
|
+
} from '@wordpress/block-editor';
|
|
10
15
|
|
|
11
16
|
/**
|
|
12
17
|
* Internal dependencies
|
|
13
18
|
*/
|
|
14
19
|
import PatternSelection, { useBlockPatterns } from './pattern-selection';
|
|
20
|
+
import { unlock } from '../../lock-unlock';
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
clientId,
|
|
18
|
-
attributes,
|
|
19
|
-
hasInnerBlocks,
|
|
20
|
-
} ) {
|
|
22
|
+
function PatternPicker( { clientId, attributes, hasInnerBlocks } ) {
|
|
21
23
|
const hasPatterns = useBlockPatterns( clientId, attributes ).length;
|
|
22
24
|
if ( ! hasPatterns ) {
|
|
23
25
|
return null;
|
|
24
26
|
}
|
|
25
|
-
|
|
26
27
|
const buttonLabel = hasInnerBlocks
|
|
27
28
|
? __( 'Change design' )
|
|
28
29
|
: __( 'Choose pattern' );
|
|
29
|
-
|
|
30
30
|
return (
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
31
|
+
<BlockControls group="other">
|
|
32
|
+
<DropdownContentWrapper>
|
|
33
|
+
<Dropdown
|
|
34
|
+
contentClassName="block-editor-block-settings-menu__popover"
|
|
35
|
+
focusOnMount="firstElement"
|
|
36
|
+
expandOnMobile
|
|
37
|
+
renderToggle={ ( { isOpen, onToggle } ) => (
|
|
38
|
+
<ToolbarButton
|
|
39
|
+
aria-haspopup="true"
|
|
40
|
+
aria-expanded={ isOpen }
|
|
41
|
+
onClick={ onToggle }
|
|
42
|
+
>
|
|
43
|
+
{ buttonLabel }
|
|
44
|
+
</ToolbarButton>
|
|
45
|
+
) }
|
|
46
|
+
renderContent={ () => (
|
|
47
|
+
<PatternSelection
|
|
48
|
+
clientId={ clientId }
|
|
49
|
+
attributes={ attributes }
|
|
50
|
+
showSearch={ false }
|
|
51
|
+
showTitlesAsTooltip
|
|
52
|
+
/>
|
|
53
|
+
) }
|
|
54
|
+
/>
|
|
55
|
+
</DropdownContentWrapper>
|
|
56
|
+
</BlockControls>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default function QueryToolbar( props ) {
|
|
61
|
+
const isLocked = useSelect(
|
|
62
|
+
( select ) => {
|
|
63
|
+
const { isLockedBlock } = unlock( select( blockEditorStore ) );
|
|
64
|
+
return isLockedBlock( props.clientId );
|
|
65
|
+
},
|
|
66
|
+
[ props.clientId ]
|
|
55
67
|
);
|
|
68
|
+
if ( isLocked ) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
return <PatternPicker { ...props } />;
|
|
56
72
|
}
|
|
@@ -59,7 +59,7 @@ function render_block_core_term_template( $attributes, $content, $block ) {
|
|
|
59
59
|
$query_args['include'] = array_unique( array_map( 'intval', $query['include'] ) );
|
|
60
60
|
$query_args['orderby'] = 'include';
|
|
61
61
|
$query_args['order'] = 'asc';
|
|
62
|
-
} elseif ( empty( $query['showNested'] ) ) {
|
|
62
|
+
} elseif ( is_taxonomy_hierarchical( $query['taxonomy'] ) && empty( $query['showNested'] ) ) {
|
|
63
63
|
// We set parent only when inheriting from the taxonomy archive context or not
|
|
64
64
|
// showing nested terms, otherwise nested terms are not displayed.
|
|
65
65
|
$query_args['parent'] = 0;
|