@wordpress/block-library 9.33.2-next.36001005c.0 → 9.33.3
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/build/accordion/block.json +1 -1
- package/build/accordion/edit.js +11 -9
- package/build/accordion/edit.js.map +2 -2
- package/build/accordion-heading/block.json +1 -1
- package/build/accordion-item/block.json +1 -1
- package/build/accordion-panel/block.json +1 -1
- package/build/buttons/transforms.js +1 -0
- package/build/buttons/transforms.js.map +2 -2
- package/build/code/transforms.js +2 -0
- package/build/code/transforms.js.map +2 -2
- package/build/freeform/block.json +5 -1
- package/build/home-link/block.json +2 -1
- package/build/image/view.js +4 -1
- package/build/image/view.js.map +2 -2
- package/build/math/deprecated.js +54 -0
- package/build/math/deprecated.js.map +7 -0
- package/build/math/edit.js +1 -0
- package/build/math/edit.js.map +2 -2
- package/build/math/index.js +3 -1
- package/build/math/index.js.map +3 -3
- package/build/math/save.js +2 -3
- package/build/math/save.js.map +2 -2
- package/build/missing/block.json +3 -0
- package/build/navigation/edit/menu-inspector-controls.js +1 -1
- package/build/navigation/edit/menu-inspector-controls.js.map +2 -2
- package/build/navigation/menu-items-to-blocks.js +8 -3
- package/build/navigation/menu-items-to-blocks.js.map +2 -2
- package/build/navigation/view.js +2 -2
- package/build/navigation/view.js.map +2 -2
- package/build/navigation-link/edit.js +1 -1
- package/build/navigation-link/edit.js.map +2 -2
- package/build/navigation-link/shared/controls.js +16 -36
- package/build/navigation-link/shared/controls.js.map +2 -2
- package/build/navigation-link/shared/use-entity-binding.js +1 -1
- package/build/navigation-link/shared/use-entity-binding.js.map +2 -2
- package/build/navigation-submenu/edit.js +1 -1
- package/build/navigation-submenu/edit.js.map +2 -2
- package/build/post-date/block.json +1 -1
- package/build/post-date/edit.js +11 -5
- package/build/post-date/edit.js.map +3 -3
- package/build/post-date/variations.js +4 -7
- package/build/post-date/variations.js.map +2 -2
- package/build/post-template/edit.js +13 -1
- package/build/post-template/edit.js.map +2 -2
- package/build/query/index.js +11 -1
- package/build/query/index.js.map +2 -2
- package/build/query/variations.js +16 -11
- package/build/query/variations.js.map +2 -2
- package/build/search/view.js +4 -4
- package/build/search/view.js.map +2 -2
- package/build/terms-query/edit/inspector-controls/index.js +1 -1
- package/build/terms-query/edit/inspector-controls/index.js.map +2 -2
- package/build/terms-query/edit/inspector-controls/inherit-control.js +2 -4
- package/build/terms-query/edit/inspector-controls/inherit-control.js.map +2 -2
- package/build/utils/get-transformed-attributes.js +1 -13
- package/build/utils/get-transformed-attributes.js.map +2 -2
- package/build-module/accordion/block.json +1 -1
- package/build-module/accordion/edit.js +11 -9
- package/build-module/accordion/edit.js.map +2 -2
- package/build-module/accordion-heading/block.json +1 -1
- package/build-module/accordion-item/block.json +1 -1
- package/build-module/accordion-panel/block.json +1 -1
- package/build-module/buttons/transforms.js +1 -0
- package/build-module/buttons/transforms.js.map +2 -2
- package/build-module/code/transforms.js +2 -0
- package/build-module/code/transforms.js.map +2 -2
- package/build-module/freeform/block.json +5 -1
- package/build-module/home-link/block.json +2 -1
- package/build-module/image/view.js +4 -1
- package/build-module/image/view.js.map +2 -2
- package/build-module/math/deprecated.js +34 -0
- package/build-module/math/deprecated.js.map +7 -0
- package/build-module/math/edit.js +1 -0
- package/build-module/math/edit.js.map +2 -2
- package/build-module/math/index.js +3 -1
- package/build-module/math/index.js.map +2 -2
- package/build-module/math/save.js +2 -3
- package/build-module/math/save.js.map +2 -2
- package/build-module/missing/block.json +3 -0
- package/build-module/navigation/edit/menu-inspector-controls.js +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js.map +2 -2
- package/build-module/navigation/menu-items-to-blocks.js +8 -3
- package/build-module/navigation/menu-items-to-blocks.js.map +2 -2
- package/build-module/navigation/view.js +2 -2
- package/build-module/navigation/view.js.map +2 -2
- package/build-module/navigation-link/edit.js +1 -1
- package/build-module/navigation-link/edit.js.map +2 -2
- package/build-module/navigation-link/shared/controls.js +17 -37
- package/build-module/navigation-link/shared/controls.js.map +2 -2
- package/build-module/navigation-link/shared/use-entity-binding.js +1 -1
- package/build-module/navigation-link/shared/use-entity-binding.js.map +2 -2
- package/build-module/navigation-submenu/edit.js +1 -1
- package/build-module/navigation-submenu/edit.js.map +2 -2
- package/build-module/post-date/block.json +1 -1
- package/build-module/post-date/edit.js +11 -5
- package/build-module/post-date/edit.js.map +2 -2
- package/build-module/post-date/variations.js +4 -7
- package/build-module/post-date/variations.js.map +2 -2
- package/build-module/post-template/edit.js +13 -1
- package/build-module/post-template/edit.js.map +2 -2
- package/build-module/query/index.js +11 -1
- package/build-module/query/index.js.map +2 -2
- package/build-module/query/variations.js +16 -11
- package/build-module/query/variations.js.map +2 -2
- package/build-module/search/view.js +4 -4
- package/build-module/search/view.js.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/index.js +1 -1
- package/build-module/terms-query/edit/inspector-controls/index.js.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/inherit-control.js +2 -4
- package/build-module/terms-query/edit/inspector-controls/inherit-control.js.map +2 -2
- package/build-module/utils/get-transformed-attributes.js +1 -13
- package/build-module/utils/get-transformed-attributes.js.map +2 -2
- package/build-style/editor-rtl.css +7 -2
- package/build-style/editor.css +8 -2
- package/build-style/math/editor-rtl.css +49 -0
- package/build-style/math/editor.css +50 -0
- package/build-style/math/style-rtl.css +4 -0
- package/build-style/math/style.css +4 -0
- package/build-style/navigation-link/editor-rtl.css +1 -1
- package/build-style/navigation-link/editor.css +1 -1
- package/build-style/style-rtl.css +5 -0
- package/build-style/style.css +5 -0
- package/build-style/video/editor-rtl.css +1 -1
- package/build-style/video/editor.css +1 -1
- package/package.json +37 -37
- package/src/accordion/block.json +1 -1
- package/src/accordion/edit.js +16 -16
- package/src/accordion-heading/block.json +1 -1
- package/src/accordion-item/block.json +1 -1
- package/src/accordion-panel/block.json +1 -1
- package/src/archives/index.php +53 -1
- package/src/buttons/transforms.js +1 -0
- package/src/categories/index.php +25 -7
- package/src/code/transforms.js +2 -0
- package/src/editor.scss +1 -0
- package/src/freeform/block.json +5 -1
- package/src/home-link/block.json +2 -1
- package/src/image/index.php +9 -9
- package/src/image/view.js +11 -1
- package/src/math/deprecated.js +44 -0
- package/src/math/edit.js +1 -0
- package/src/math/editor.scss +7 -0
- package/src/math/index.js +2 -0
- package/src/math/save.js +6 -5
- package/src/math/style.scss +4 -0
- package/src/missing/block.json +3 -0
- package/src/navigation/edit/menu-inspector-controls.js +1 -1
- package/src/navigation/index.php +7 -7
- package/src/navigation/menu-items-to-blocks.js +12 -2
- package/src/navigation/test/menu-items-to-blocks.js +144 -0
- package/src/navigation/view.js +2 -2
- package/src/navigation-link/edit.js +1 -1
- package/src/navigation-link/editor.scss +1 -1
- package/src/navigation-link/shared/controls.js +18 -58
- package/src/navigation-link/shared/test/controls.js +9 -14
- package/src/navigation-link/shared/use-entity-binding.js +1 -1
- package/src/navigation-submenu/edit.js +1 -1
- package/src/post-date/block.json +1 -1
- package/src/post-date/edit.js +15 -10
- package/src/post-date/variations.js +2 -5
- package/src/post-template/edit.js +13 -1
- package/src/query/index.js +10 -0
- package/src/query/variations.js +17 -11
- package/src/query-pagination-next/index.php +1 -1
- package/src/query-pagination-previous/index.php +1 -1
- package/src/search/index.php +2 -2
- package/src/search/view.js +4 -4
- package/src/style.scss +1 -0
- package/src/term-template/index.php +8 -2
- package/src/terms-query/edit/inspector-controls/index.js +2 -2
- package/src/terms-query/edit/inspector-controls/inherit-control.js +1 -3
- package/src/utils/get-transformed-attributes.js +5 -22
- package/src/video/editor.scss +1 -1
package/src/search/index.php
CHANGED
|
@@ -183,8 +183,8 @@ function render_block_core_search( $attributes ) {
|
|
|
183
183
|
data-wp-interactive="core/search"
|
|
184
184
|
' . $form_context . '
|
|
185
185
|
data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
|
|
186
|
-
data-wp-on
|
|
187
|
-
data-wp-on
|
|
186
|
+
data-wp-on--keydown="actions.handleSearchKeydown"
|
|
187
|
+
data-wp-on--focusout="actions.handleSearchFocusout"
|
|
188
188
|
';
|
|
189
189
|
}
|
|
190
190
|
|
package/src/search/view.js
CHANGED
|
@@ -49,15 +49,15 @@ const { actions } = store(
|
|
|
49
49
|
const ctx = getContext();
|
|
50
50
|
ctx.isSearchInputVisible = false;
|
|
51
51
|
},
|
|
52
|
-
handleSearchKeydown( event ) {
|
|
52
|
+
handleSearchKeydown: withSyncEvent( ( event ) => {
|
|
53
53
|
const { ref } = getElement();
|
|
54
54
|
// If Escape close the menu.
|
|
55
55
|
if ( event?.key === 'Escape' ) {
|
|
56
56
|
actions.closeSearchInput();
|
|
57
57
|
ref.querySelector( 'button' ).focus();
|
|
58
58
|
}
|
|
59
|
-
},
|
|
60
|
-
handleSearchFocusout( event ) {
|
|
59
|
+
} ),
|
|
60
|
+
handleSearchFocusout: withSyncEvent( ( event ) => {
|
|
61
61
|
const { ref } = getElement();
|
|
62
62
|
// If focus is outside search form, and in the document, close menu
|
|
63
63
|
// event.target === The element losing focus
|
|
@@ -70,7 +70,7 @@ const { actions } = store(
|
|
|
70
70
|
) {
|
|
71
71
|
actions.closeSearchInput();
|
|
72
72
|
}
|
|
73
|
-
},
|
|
73
|
+
} ),
|
|
74
74
|
},
|
|
75
75
|
},
|
|
76
76
|
{ lock: true }
|
package/src/style.scss
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
@use "./latest-posts/style.scss" as *;
|
|
33
33
|
@use "./list/style.scss" as *;
|
|
34
34
|
@use "./loginout/style.scss" as *;
|
|
35
|
+
@use "./math/style.scss" as *;
|
|
35
36
|
@use "./media-text/style.scss" as *;
|
|
36
37
|
@use "./navigation/style.scss" as *;
|
|
37
38
|
@use "./navigation-link/style.scss" as *;
|
|
@@ -38,10 +38,16 @@ function render_block_core_term_template( $attributes, $content, $block ) {
|
|
|
38
38
|
// Get the current term and taxonomy from the queried object.
|
|
39
39
|
$queried_object = get_queried_object();
|
|
40
40
|
|
|
41
|
-
// For hierarchical taxonomies, show
|
|
41
|
+
// For hierarchical taxonomies, show children of the current term.
|
|
42
42
|
// For non-hierarchical taxonomies, show all terms (don't set parent).
|
|
43
43
|
if ( is_taxonomy_hierarchical( $queried_object->taxonomy ) ) {
|
|
44
|
-
|
|
44
|
+
// If showNested is true, use child_of to include nested terms.
|
|
45
|
+
// Otherwise, use parent to show only direct children.
|
|
46
|
+
if ( ! empty( $query['showNested'] ) ) {
|
|
47
|
+
$query_args['child_of'] = $queried_object->term_id;
|
|
48
|
+
} else {
|
|
49
|
+
$query_args['parent'] = $queried_object->term_id;
|
|
50
|
+
}
|
|
45
51
|
}
|
|
46
52
|
$query_args['taxonomy'] = $queried_object->taxonomy;
|
|
47
53
|
} else {
|
|
@@ -55,8 +55,8 @@ export default function TermsQueryInspectorControls( {
|
|
|
55
55
|
templateSlug?.startsWith( 'taxonomy-' ) ||
|
|
56
56
|
templateSlug?.startsWith( 'category-' ) ||
|
|
57
57
|
templateSlug?.startsWith( 'tag-' );
|
|
58
|
-
//
|
|
59
|
-
const displayShowNestedControl = isTaxonomyHierarchical
|
|
58
|
+
// Display the showNested control if the taxonomy is hierarchical.
|
|
59
|
+
const displayShowNestedControl = isTaxonomyHierarchical;
|
|
60
60
|
const hasIncludeFilter = !! include?.length;
|
|
61
61
|
|
|
62
62
|
// Labels shared between ToolsPanelItem and its child control.
|
|
@@ -17,14 +17,12 @@ export default function InheritControl( { value, onChange, label } ) {
|
|
|
17
17
|
onChange={ ( newValue ) => {
|
|
18
18
|
onChange( {
|
|
19
19
|
inherit: newValue === 'default',
|
|
20
|
-
// When enabling inherit, hierarchical is not supported.
|
|
21
|
-
...( newValue === 'default' ? { showNested: false } : {} ),
|
|
22
20
|
} );
|
|
23
21
|
} }
|
|
24
22
|
help={
|
|
25
23
|
value
|
|
26
24
|
? __(
|
|
27
|
-
'Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows
|
|
25
|
+
'Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms.'
|
|
28
26
|
)
|
|
29
27
|
: __( 'Display terms based on specific criteria.' )
|
|
30
28
|
}
|
|
@@ -27,13 +27,8 @@ export function getTransformedAttributes(
|
|
|
27
27
|
|
|
28
28
|
const transformedAttributes = {};
|
|
29
29
|
|
|
30
|
-
// Handle attributes derived from block support.
|
|
31
|
-
|
|
32
|
-
hasBlockSupport( newBlockType, 'allowedBlocks' ) &&
|
|
33
|
-
attributes.allowedBlocks
|
|
34
|
-
) {
|
|
35
|
-
transformedAttributes.allowedBlocks = attributes.allowedBlocks;
|
|
36
|
-
}
|
|
30
|
+
// Handle attributes derived from block support. The custom class name and
|
|
31
|
+
// allowed blocks attribute is handled separately.
|
|
37
32
|
if ( hasBlockSupport( newBlockType, 'anchor' ) && attributes.anchor ) {
|
|
38
33
|
transformedAttributes.anchor = attributes.anchor;
|
|
39
34
|
}
|
|
@@ -43,31 +38,19 @@ export function getTransformedAttributes(
|
|
|
43
38
|
) {
|
|
44
39
|
transformedAttributes.ariaLabel = attributes.ariaLabel;
|
|
45
40
|
}
|
|
46
|
-
if (
|
|
47
|
-
hasBlockSupport( newBlockType, 'className' ) &&
|
|
48
|
-
attributes.className
|
|
49
|
-
) {
|
|
50
|
-
transformedAttributes.className = attributes.className;
|
|
51
|
-
}
|
|
52
41
|
|
|
53
42
|
// Handle metadata transformation.
|
|
54
43
|
if ( attributes.metadata ) {
|
|
55
44
|
// The metadata properties that should be preserved after the transform.
|
|
56
|
-
|
|
45
|
+
// The noteId, name, and blockVisibility properties are separately handled
|
|
46
|
+
// in the `core/metadata/addTransforms` hook.
|
|
47
|
+
const transformedMetadata = [];
|
|
57
48
|
|
|
58
49
|
// If there is a transform bindings callback, add the `id` and `bindings` properties.
|
|
59
50
|
if ( bindingsCallback ) {
|
|
60
51
|
transformedMetadata.push( 'id', 'bindings' );
|
|
61
52
|
}
|
|
62
53
|
|
|
63
|
-
// Handle metadata properties derived from block support.
|
|
64
|
-
if ( hasBlockSupport( newBlockType, 'renaming', true ) ) {
|
|
65
|
-
transformedMetadata.push( 'name' );
|
|
66
|
-
}
|
|
67
|
-
if ( hasBlockSupport( newBlockType, 'blockVisibility', true ) ) {
|
|
68
|
-
transformedMetadata.push( 'blockVisibility' );
|
|
69
|
-
}
|
|
70
|
-
|
|
71
54
|
// Only process metadata if there are supported properties.
|
|
72
55
|
if ( transformedMetadata.length > 0 ) {
|
|
73
56
|
const newMetadata = Object.entries( attributes.metadata ).reduce(
|