@angular/aria 22.0.0-next.4 → 22.0.0-next.6
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/fesm2022/_accordion-chunk.mjs +5 -5
- package/fesm2022/_accordion-chunk.mjs.map +1 -1
- package/fesm2022/_click-event-manager-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-chunk.mjs +5 -5
- package/fesm2022/_combobox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-listbox-chunk.mjs +1 -1
- package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-tree-chunk.mjs +6 -6
- package/fesm2022/_combobox-tree-chunk.mjs.map +1 -1
- package/fesm2022/_deferred-content-chunk.mjs.map +1 -1
- package/fesm2022/_element-chunk.mjs +6 -0
- package/fesm2022/_element-chunk.mjs.map +1 -0
- package/fesm2022/_expansion-chunk.mjs.map +1 -1
- package/fesm2022/_list-chunk.mjs.map +1 -1
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -1
- package/fesm2022/_list-typeahead-chunk.mjs.map +1 -1
- package/fesm2022/_menu-chunk.mjs.map +1 -1
- package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -1
- package/fesm2022/_signal-like-chunk.mjs.map +1 -1
- package/fesm2022/_tabs-chunk.mjs +1 -1
- package/fesm2022/_tabs-chunk.mjs.map +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
- package/fesm2022/_widget-chunk.mjs +12 -166
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion-testing.mjs +61 -0
- package/fesm2022/accordion-testing.mjs.map +1 -0
- package/fesm2022/accordion.mjs +208 -183
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +14 -85
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox-testing.mjs +55 -0
- package/fesm2022/listbox-testing.mjs.map +1 -0
- package/fesm2022/listbox.mjs +1 -1
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs +75 -0
- package/fesm2022/menu-testing.mjs.map +1 -0
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +2 -1
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs +57 -0
- package/fesm2022/tabs-testing.mjs.map +1 -0
- package/fesm2022/tabs.mjs +3 -5
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs +56 -0
- package/fesm2022/toolbar-testing.mjs.map +1 -0
- package/fesm2022/toolbar.mjs +8 -6
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs +88 -0
- package/fesm2022/tree-testing.mjs.map +1 -0
- package/fesm2022/tree.mjs +4 -6
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +26 -2
- package/resources/code-examples.db +0 -0
- package/types/_accordion-chunk.d.ts +10 -9
- package/types/_click-event-manager-chunk.d.ts +1 -1
- package/types/_combobox-chunk.d.ts +23 -23
- package/types/_element-chunk.d.ts +10 -0
- package/types/_expansion-chunk.d.ts +1 -1
- package/types/_grid-chunk.d.ts +11 -49
- package/types/_keyboard-event-manager-chunk.d.ts +2 -2
- package/types/_list-chunk.d.ts +19 -18
- package/types/_list-navigation-chunk.d.ts +6 -16
- package/types/_listbox-chunk.d.ts +27 -27
- package/types/_menu-chunk.d.ts +51 -51
- package/types/_pointer-event-manager-chunk.d.ts +1 -1
- package/types/_signal-like-chunk.d.ts +14 -0
- package/types/_tabs-chunk.d.ts +2 -1
- package/types/_toolbar-chunk.d.ts +1 -1
- package/types/_tree-chunk.d.ts +18 -17
- package/types/accordion-testing.d.ts +63 -0
- package/types/accordion.d.ts +69 -55
- package/types/combobox.d.ts +6 -5
- package/types/grid.d.ts +8 -14
- package/types/listbox-testing.d.ts +39 -0
- package/types/listbox.d.ts +19 -18
- package/types/menu-testing.d.ts +50 -0
- package/types/menu.d.ts +4 -3
- package/types/private.d.ts +46 -44
- package/types/tabs-testing.d.ts +57 -0
- package/types/tabs.d.ts +3 -5
- package/types/toolbar-testing.d.ts +72 -0
- package/types/toolbar.d.ts +3 -2
- package/types/tree-testing.d.ts +75 -0
- package/types/tree.d.ts +5 -6
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ContentContainerComponentHarness, HarnessPredicate, ComponentHarness } from '@angular/cdk/testing';
|
|
2
|
+
|
|
3
|
+
/** A set of criteria that can be used to filter a list of tree harness instances */
|
|
4
|
+
interface TreeHarnessFilters extends BaseHarnessFilters {
|
|
5
|
+
}
|
|
6
|
+
/** A set of criteria that can be used to filter a list of tree item harness instances. */
|
|
7
|
+
interface TreeItemHarnessFilters extends BaseHarnessFilters {
|
|
8
|
+
/** Only find instances whose text matches the given value. */
|
|
9
|
+
text?: string | RegExp;
|
|
10
|
+
/** Only find instances whose disabled state matches the given value. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Only find instances whose expansion state matches the given value. */
|
|
13
|
+
expanded?: boolean;
|
|
14
|
+
/** Only find instances whose selection state matches the given value. */
|
|
15
|
+
selected?: boolean;
|
|
16
|
+
/** Only find instances whose level matches the given value. */
|
|
17
|
+
level?: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Harness for interacting with an Aria tree item. */
|
|
21
|
+
declare class TreeItemHarness extends ContentContainerComponentHarness<string> {
|
|
22
|
+
static hostSelector: string;
|
|
23
|
+
/**
|
|
24
|
+
* Gets a `HarnessPredicate` that can be used to search for a tree item with specific attributes.
|
|
25
|
+
* @param options Options for narrowing the search
|
|
26
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
27
|
+
*/
|
|
28
|
+
static with(options?: TreeItemHarnessFilters): HarnessPredicate<TreeItemHarness>;
|
|
29
|
+
/** Whether the tree item is expanded. */
|
|
30
|
+
isExpanded(): Promise<boolean>;
|
|
31
|
+
/** Whether the tree item is disabled. */
|
|
32
|
+
isDisabled(): Promise<boolean>;
|
|
33
|
+
/** Whether the tree item is selected. */
|
|
34
|
+
isSelected(): Promise<boolean>;
|
|
35
|
+
/** Gets the level of the tree item. Note that this gets the aria-level and is 1 indexed. */
|
|
36
|
+
getLevel(): Promise<number>;
|
|
37
|
+
/** Gets the tree item's text. */
|
|
38
|
+
getText(): Promise<string>;
|
|
39
|
+
/** Clicks the tree item. */
|
|
40
|
+
click(): Promise<void>;
|
|
41
|
+
private _getHostAttribute;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface TextTree {
|
|
45
|
+
text?: string;
|
|
46
|
+
children?: TextTree[];
|
|
47
|
+
}
|
|
48
|
+
/** Harness for interacting with an Aria tree in tests. */
|
|
49
|
+
declare class TreeHarness extends ComponentHarness {
|
|
50
|
+
static hostSelector: string;
|
|
51
|
+
/**
|
|
52
|
+
* Gets a `HarnessPredicate` that can be used to search for a tree with specific attributes.
|
|
53
|
+
* @param options Options for narrowing the search
|
|
54
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
55
|
+
*/
|
|
56
|
+
static with(options?: TreeHarnessFilters): HarnessPredicate<TreeHarness>;
|
|
57
|
+
/** Gets all of the items in the tree. */
|
|
58
|
+
getItems(filter?: TreeItemHarnessFilters): Promise<TreeItemHarness[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Gets an object representation for the visible tree structure
|
|
61
|
+
* If an item is under an unexpanded item it will not be included.
|
|
62
|
+
*/
|
|
63
|
+
getTreeStructure(): Promise<TextTree>;
|
|
64
|
+
/**
|
|
65
|
+
* Recursively collect the structured text of the tree items.
|
|
66
|
+
* @param items A list of tree items
|
|
67
|
+
* @param level The level of items that are being accounted for during this iteration
|
|
68
|
+
* @param parentExpanded Whether the parent of the first item in param items is expanded
|
|
69
|
+
*/
|
|
70
|
+
private _getTreeStructure;
|
|
71
|
+
private _addChildToItem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { TreeHarness, TreeItemHarness };
|
|
75
|
+
export type { TextTree, TreeHarnessFilters, TreeItemHarnessFilters };
|
package/types/tree.d.ts
CHANGED
|
@@ -3,14 +3,17 @@ import * as _angular_core from '@angular/core';
|
|
|
3
3
|
import { OnInit, OnDestroy, Signal } from '@angular/core';
|
|
4
4
|
import { TreeItemPattern, TreePattern } from './_tree-chunk.js';
|
|
5
5
|
import { DeferredContent, DeferredContentAware } from './_deferred-content-chunk.js';
|
|
6
|
+
import { HasElement } from './_element-chunk.js';
|
|
6
7
|
import { ComboboxPopup } from './combobox.js';
|
|
7
8
|
export { Combobox as ɵɵCombobox, ComboboxDialog as ɵɵComboboxDialog, ComboboxInput as ɵɵComboboxInput, ComboboxPopupContainer as ɵɵComboboxPopupContainer } from './combobox.js';
|
|
8
|
-
import './
|
|
9
|
+
import './_signal-like-chunk.js';
|
|
9
10
|
import './_expansion-chunk.js';
|
|
11
|
+
import './_list-navigation-chunk.js';
|
|
10
12
|
import './_list-chunk.js';
|
|
11
13
|
import './_keyboard-event-manager-chunk.js';
|
|
12
|
-
import './
|
|
14
|
+
import './_click-event-manager-chunk.js';
|
|
13
15
|
import './_combobox-chunk.js';
|
|
16
|
+
import './_pointer-event-manager-chunk.js';
|
|
14
17
|
|
|
15
18
|
/**
|
|
16
19
|
* Group that contains children tree items.
|
|
@@ -55,10 +58,6 @@ declare class TreeItemGroup<V> implements OnInit, OnDestroy {
|
|
|
55
58
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeItemGroup<any>, "ng-template[ngTreeItemGroup]", ["ngTreeItemGroup"], { "ownedBy": { "alias": "ownedBy"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof DeferredContent; inputs: {}; outputs: {}; }]>;
|
|
56
59
|
}
|
|
57
60
|
|
|
58
|
-
interface HasElement {
|
|
59
|
-
element: HTMLElement;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
61
|
/**
|
|
63
62
|
* A selectable and expandable item in an `ngTree`.
|
|
64
63
|
*
|