@angular/aria 22.0.0-next.3 → 22.0.0-next.5
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 +45 -0
- package/fesm2022/_click-event-manager-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-chunk.mjs +8 -8
- package/fesm2022/_combobox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-listbox-chunk.mjs +17 -7
- package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-tree-chunk.mjs +16 -6
- package/fesm2022/_combobox-tree-chunk.mjs.map +1 -1
- package/fesm2022/_deferred-content-chunk.mjs +6 -6
- package/fesm2022/_element-chunk.mjs +6 -0
- package/fesm2022/_element-chunk.mjs.map +1 -0
- 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 +33 -12
- 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 +15 -5
- package/fesm2022/_tabs-chunk.mjs.map +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs +13 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
- package/fesm2022/_widget-chunk.mjs +17 -169
- 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 +217 -192
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +15 -15
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +26 -97
- 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 +13 -20
- 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 +18 -22
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +2 -0
- 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 +22 -32
- 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 +20 -26
- 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 +16 -26
- 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 +27 -0
- 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 +13 -51
- 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 +37 -30
- package/types/_menu-chunk.d.ts +60 -56
- 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 +13 -6
- package/types/_toolbar-chunk.d.ts +6 -1
- package/types/_tree-chunk.d.ts +24 -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 +21 -22
- package/types/menu-testing.d.ts +50 -0
- package/types/menu.d.ts +4 -3
- package/types/private.d.ts +48 -45
- package/types/tabs-testing.d.ts +57 -0
- package/types/tabs.d.ts +4 -9
- package/types/toolbar-testing.d.ts +72 -0
- package/types/toolbar.d.ts +3 -5
- package/types/tree-testing.d.ts +75 -0
- package/types/tree.d.ts +5 -9
package/types/listbox.d.ts
CHANGED
|
@@ -3,11 +3,13 @@ import * as _angular_core from '@angular/core';
|
|
|
3
3
|
import { OptionPattern, ListboxPattern } from './_listbox-chunk.js';
|
|
4
4
|
import { ComboboxPopup } from './combobox.js';
|
|
5
5
|
export { Combobox as ɵɵCombobox, ComboboxDialog as ɵɵComboboxDialog, ComboboxInput as ɵɵComboboxInput, ComboboxPopupContainer as ɵɵComboboxPopupContainer } from './combobox.js';
|
|
6
|
-
import './
|
|
6
|
+
import './_signal-like-chunk.js';
|
|
7
7
|
import './_list-chunk.js';
|
|
8
|
+
import './_list-navigation-chunk.js';
|
|
8
9
|
import './_keyboard-event-manager-chunk.js';
|
|
9
|
-
import './
|
|
10
|
+
import './_click-event-manager-chunk.js';
|
|
10
11
|
import './_combobox-chunk.js';
|
|
12
|
+
import './_pointer-event-manager-chunk.js';
|
|
11
13
|
import './_deferred-content-chunk.js';
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -46,46 +48,43 @@ declare class Listbox<V> {
|
|
|
46
48
|
/** The Options nested inside of the Listbox. */
|
|
47
49
|
private readonly _options;
|
|
48
50
|
/** A signal wrapper for directionality. */
|
|
49
|
-
protected textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
|
|
51
|
+
protected readonly textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
|
|
50
52
|
/** The Option UIPatterns of the child Options. */
|
|
51
|
-
protected items: _angular_core.Signal<OptionPattern<V>[]>;
|
|
53
|
+
protected readonly items: _angular_core.Signal<OptionPattern<V>[]>;
|
|
52
54
|
/** Whether the list is vertically or horizontally oriented. */
|
|
53
|
-
orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
55
|
+
readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
54
56
|
/** Whether multiple items in the list can be selected at once. */
|
|
55
|
-
multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
57
|
+
readonly multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
56
58
|
/** Whether focus should wrap when navigating. */
|
|
57
|
-
wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
59
|
+
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
58
60
|
/**
|
|
59
61
|
* Whether to allow disabled items to receive focus. When `true`, disabled items are
|
|
60
62
|
* focusable but not interactive. When `false`, disabled items are skipped during navigation.
|
|
61
63
|
*/
|
|
62
|
-
softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
64
|
+
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
63
65
|
/**
|
|
64
66
|
* The focus strategy used by the list.
|
|
65
67
|
* - `roving`: Focus is moved to the active item using `tabindex`.
|
|
66
68
|
* - `activedescendant`: Focus remains on the listbox container, and `aria-activedescendant` is used to indicate the active item.
|
|
67
69
|
*/
|
|
68
|
-
focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
|
|
70
|
+
readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
|
|
69
71
|
/**
|
|
70
72
|
* The selection strategy used by the list.
|
|
71
73
|
* - `follow`: The focused item is automatically selected.
|
|
72
74
|
* - `explicit`: Items are selected explicitly by the user (e.g., via click or spacebar).
|
|
73
75
|
*/
|
|
74
|
-
selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
|
|
76
|
+
readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
|
|
75
77
|
/** The amount of time before the typeahead search is reset. */
|
|
76
|
-
typeaheadDelay: _angular_core.InputSignal<number>;
|
|
78
|
+
readonly typeaheadDelay: _angular_core.InputSignal<number>;
|
|
77
79
|
/** Whether the listbox is disabled. */
|
|
78
|
-
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
80
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
79
81
|
/** Whether the listbox is readonly. */
|
|
80
|
-
readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
82
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
81
83
|
/** The values of the currently selected items. */
|
|
82
|
-
value: _angular_core.ModelSignal<V[]>;
|
|
84
|
+
readonly value: _angular_core.ModelSignal<V[]>;
|
|
83
85
|
/** The Listbox UIPattern. */
|
|
84
86
|
readonly _pattern: ListboxPattern<V>;
|
|
85
|
-
/** Whether the listbox has received focus yet. */
|
|
86
|
-
private _hasFocused;
|
|
87
87
|
constructor();
|
|
88
|
-
_onFocus(): void;
|
|
89
88
|
scrollActiveItemIntoView(options?: ScrollIntoViewOptions): void;
|
|
90
89
|
/** Navigates to the first item in the listbox. */
|
|
91
90
|
gotoFirst(): void;
|
|
@@ -117,21 +116,21 @@ declare class Option<V> {
|
|
|
117
116
|
/** A reference to the host element. */
|
|
118
117
|
readonly element: HTMLElement;
|
|
119
118
|
/** Whether the option is currently active (focused). */
|
|
120
|
-
active: _angular_core.Signal<boolean>;
|
|
119
|
+
readonly active: _angular_core.Signal<boolean>;
|
|
121
120
|
/** The parent Listbox. */
|
|
122
121
|
private readonly _listbox;
|
|
123
122
|
/** A unique identifier for the option. */
|
|
124
123
|
readonly id: _angular_core.InputSignal<string>;
|
|
125
124
|
/** The text used by the typeahead search. */
|
|
126
|
-
protected searchTerm: _angular_core.Signal<string>;
|
|
125
|
+
protected readonly searchTerm: _angular_core.Signal<string>;
|
|
127
126
|
/** The parent Listbox UIPattern. */
|
|
128
127
|
private readonly _listboxPattern;
|
|
129
128
|
/** The value of the option. */
|
|
130
|
-
value: _angular_core.InputSignal<V>;
|
|
129
|
+
readonly value: _angular_core.InputSignal<V>;
|
|
131
130
|
/** Whether an item is disabled. */
|
|
132
|
-
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
131
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
133
132
|
/** The text used by the typeahead search. */
|
|
134
|
-
label: _angular_core.InputSignal<string | undefined>;
|
|
133
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
135
134
|
/** Whether the option is selected. */
|
|
136
135
|
readonly selected: _angular_core.Signal<boolean | undefined>;
|
|
137
136
|
/** The Option UIPattern. */
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate, TestElement } from '@angular/cdk/testing';
|
|
2
|
+
|
|
3
|
+
/** Filters for locating a `MenuHarness`. */
|
|
4
|
+
interface MenuHarnessFilters extends BaseHarnessFilters {
|
|
5
|
+
/** Only find instances whose trigger text matches the given value. */
|
|
6
|
+
triggerText?: string | RegExp;
|
|
7
|
+
}
|
|
8
|
+
/** Filters for locating a `MenuItemHarness`. */
|
|
9
|
+
interface MenuItemHarnessFilters extends BaseHarnessFilters {
|
|
10
|
+
/** Only find instances whose text matches the given value. */
|
|
11
|
+
text?: string | RegExp;
|
|
12
|
+
/** Only find instances whose disabled state matches the given value. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Only find instances whose expanded state matches the given value. */
|
|
15
|
+
expanded?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Harness for interacting with a standard ngMenuItem in tests. */
|
|
19
|
+
declare class MenuItemHarness extends ComponentHarness {
|
|
20
|
+
static hostSelector: string;
|
|
21
|
+
static with(options?: MenuItemHarnessFilters): HarnessPredicate<MenuItemHarness>;
|
|
22
|
+
/** Gets the text content of the menu item. */
|
|
23
|
+
getText(): Promise<string>;
|
|
24
|
+
/** Whether the menu item is disabled. */
|
|
25
|
+
isDisabled(): Promise<boolean>;
|
|
26
|
+
/** Whether the menu item is expanded (contains an open submenu). */
|
|
27
|
+
isExpanded(): Promise<boolean>;
|
|
28
|
+
/** Clicks the menu item to trigger its action or toggle its submenu. */
|
|
29
|
+
click(): Promise<void>;
|
|
30
|
+
/** Resolves the nested submenu panel associated with this menu item, if any exists. */
|
|
31
|
+
getSubmenu(): Promise<MenuHarness | null>;
|
|
32
|
+
}
|
|
33
|
+
/** Harness for interacting with a standard ngMenu or ngMenuBar in tests. */
|
|
34
|
+
declare class MenuHarness extends ComponentHarness {
|
|
35
|
+
static hostSelector: string;
|
|
36
|
+
static with(options?: MenuHarnessFilters): HarnessPredicate<MenuHarness>;
|
|
37
|
+
/** Resolves the trigger associated with this menu container via aria-controls inversion. */
|
|
38
|
+
_getTrigger(): Promise<TestElement | null>;
|
|
39
|
+
/** Checks whether the menu container is visible. */
|
|
40
|
+
isOpen(): Promise<boolean>;
|
|
41
|
+
/** Opens the menu if it is currently closed. */
|
|
42
|
+
open(): Promise<void>;
|
|
43
|
+
/** Closes the menu if it is currently open. */
|
|
44
|
+
close(): Promise<void>;
|
|
45
|
+
/** Queries all menu items inside this menu container. */
|
|
46
|
+
getItems(filters?: MenuItemHarnessFilters): Promise<MenuItemHarness[]>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { MenuHarness, MenuItemHarness };
|
|
50
|
+
export type { MenuHarnessFilters, MenuItemHarnessFilters };
|
package/types/menu.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import { Signal } from '@angular/core';
|
|
|
3
3
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
4
|
import { MenuBarPattern, MenuItemPattern, MenuPattern, MenuTriggerPattern } from './_menu-chunk.js';
|
|
5
5
|
import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
|
|
6
|
-
import { SignalLike } from './
|
|
6
|
+
import { SignalLike } from './_signal-like-chunk.js';
|
|
7
7
|
import './_keyboard-event-manager-chunk.js';
|
|
8
8
|
import './_list-chunk.js';
|
|
9
|
+
import './_list-navigation-chunk.js';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* A menu bar of menu items.
|
|
@@ -225,7 +226,7 @@ declare class MenuTrigger<V> {
|
|
|
225
226
|
/** The directionality (LTR / RTL) context for the application (or a subtree of it). */
|
|
226
227
|
readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
227
228
|
/** The menu associated with the trigger. */
|
|
228
|
-
menu: _angular_core.InputSignal<Menu<V> | undefined>;
|
|
229
|
+
readonly menu: _angular_core.InputSignal<Menu<V> | undefined>;
|
|
229
230
|
/** Whether the menu is expanded. */
|
|
230
231
|
readonly expanded: _angular_core.Signal<boolean>;
|
|
231
232
|
/** Whether the menu trigger has a popup. */
|
|
@@ -235,7 +236,7 @@ declare class MenuTrigger<V> {
|
|
|
235
236
|
/** Whether the menu trigger is soft disabled. */
|
|
236
237
|
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
237
238
|
/** The menu trigger ui pattern instance. */
|
|
238
|
-
_pattern: MenuTriggerPattern<V>;
|
|
239
|
+
readonly _pattern: MenuTriggerPattern<V>;
|
|
239
240
|
constructor();
|
|
240
241
|
/** Opens the menu focusing on the first menu item. */
|
|
241
242
|
open(): void;
|
package/types/private.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { ComboboxPattern, ComboboxListboxControls, ComboboxTreeControls } from '
|
|
|
2
2
|
export { ComboboxDialogPattern, ComboboxInputs } from './_combobox-chunk.js';
|
|
3
3
|
import { ListboxInputs, OptionPattern, ListboxPattern } from './_listbox-chunk.js';
|
|
4
4
|
export { OptionInputs } from './_listbox-chunk.js';
|
|
5
|
-
import { SignalLike } from './
|
|
6
|
-
export { WritableSignalLike, computed, convertGetterSetterToWritableSignalLike, linkedSignal, signal } from './
|
|
5
|
+
import { SignalLike } from './_signal-like-chunk.js';
|
|
6
|
+
export { WritableSignalLike, computed, convertGetterSetterToWritableSignalLike, linkedSignal, signal } from './_signal-like-chunk.js';
|
|
7
7
|
export { MenuBarInputs, MenuBarPattern, MenuInputs, MenuItemInputs, MenuItemPattern, MenuPattern, MenuTriggerInputs, MenuTriggerPattern } from './_menu-chunk.js';
|
|
8
8
|
export { TabInputs, TabListInputs, TabListPattern, TabPanelInputs, TabPanelPattern, TabPattern } from './_tabs-chunk.js';
|
|
9
9
|
export { ToolbarInputs, ToolbarPattern, ToolbarWidgetGroupInputs, ToolbarWidgetGroupPattern, ToolbarWidgetInputs, ToolbarWidgetPattern } from './_toolbar-chunk.js';
|
|
@@ -12,10 +12,13 @@ import { TreeInputs, TreeItemPattern, TreePattern } from './_tree-chunk.js';
|
|
|
12
12
|
export { TreeItemInputs } from './_tree-chunk.js';
|
|
13
13
|
export { GridCellInputs, GridCellPattern, GridCellWidgetInputs, GridCellWidgetPattern, GridInputs, GridPattern, GridRowInputs, GridRowPattern } from './_grid-chunk.js';
|
|
14
14
|
export { DeferredContent, DeferredContentAware } from './_deferred-content-chunk.js';
|
|
15
|
+
export { HasElement, sortDirectives } from './_element-chunk.js';
|
|
15
16
|
export { untracked } from '@angular/core/primitives/signals';
|
|
16
17
|
import './_keyboard-event-manager-chunk.js';
|
|
17
18
|
import './_pointer-event-manager-chunk.js';
|
|
18
19
|
import './_list-chunk.js';
|
|
20
|
+
import './_list-navigation-chunk.js';
|
|
21
|
+
import './_click-event-manager-chunk.js';
|
|
19
22
|
import './_expansion-chunk.js';
|
|
20
23
|
import '@angular/core';
|
|
21
24
|
|
|
@@ -26,13 +29,13 @@ type ComboboxListboxInputs<V> = ListboxInputs<V> & {
|
|
|
26
29
|
declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements ComboboxListboxControls<OptionPattern<V>, V> {
|
|
27
30
|
readonly inputs: ComboboxListboxInputs<V>;
|
|
28
31
|
/** A unique identifier for the popup. */
|
|
29
|
-
id: SignalLike<string>;
|
|
32
|
+
readonly id: SignalLike<string>;
|
|
30
33
|
/** The ARIA role for the listbox. */
|
|
31
|
-
role: SignalLike<"listbox">;
|
|
34
|
+
readonly role: SignalLike<"listbox">;
|
|
32
35
|
/** The id of the active (focused) item in the listbox. */
|
|
33
|
-
activeId: SignalLike<string | undefined>;
|
|
36
|
+
readonly activeId: SignalLike<string | undefined>;
|
|
34
37
|
/** The list of options in the listbox. */
|
|
35
|
-
items: SignalLike<OptionPattern<V>[]>;
|
|
38
|
+
readonly items: SignalLike<OptionPattern<V>[]>;
|
|
36
39
|
/** The tab index for the listbox. Always -1 because the combobox handles focus. */
|
|
37
40
|
tabIndex: SignalLike<-1 | 0>;
|
|
38
41
|
/** Whether multiple items in the list can be selected at once. */
|
|
@@ -41,37 +44,37 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
|
|
|
41
44
|
/** Noop. The combobox handles keydown events. */
|
|
42
45
|
onKeydown(_: KeyboardEvent): void;
|
|
43
46
|
/** Noop. The combobox handles pointerdown events. */
|
|
44
|
-
|
|
47
|
+
onClick(_: PointerEvent): void;
|
|
45
48
|
/** Noop. The combobox controls the open state. */
|
|
46
49
|
setDefaultState(): void;
|
|
47
50
|
/** Navigates to the specified item in the listbox. */
|
|
48
|
-
focus: (item: OptionPattern<V>, opts?: {
|
|
51
|
+
readonly focus: (item: OptionPattern<V>, opts?: {
|
|
49
52
|
focusElement?: boolean;
|
|
50
53
|
}) => void;
|
|
51
54
|
/** Navigates to the previous focusable item in the listbox. */
|
|
52
|
-
getActiveItem: () => OptionPattern<V> | undefined;
|
|
55
|
+
readonly getActiveItem: () => OptionPattern<V> | undefined;
|
|
53
56
|
/** Navigates to the next focusable item in the listbox. */
|
|
54
|
-
next: () => void;
|
|
57
|
+
readonly next: () => void;
|
|
55
58
|
/** Navigates to the previous focusable item in the listbox. */
|
|
56
|
-
prev: () => void;
|
|
59
|
+
readonly prev: () => void;
|
|
57
60
|
/** Navigates to the last focusable item in the listbox. */
|
|
58
|
-
last: () => void;
|
|
61
|
+
readonly last: () => void;
|
|
59
62
|
/** Navigates to the first focusable item in the listbox. */
|
|
60
|
-
first: () => void;
|
|
63
|
+
readonly first: () => void;
|
|
61
64
|
/** Unfocuses the currently focused item in the listbox. */
|
|
62
|
-
unfocus: () => void;
|
|
65
|
+
readonly unfocus: () => void;
|
|
63
66
|
/** Selects the specified item in the listbox. */
|
|
64
|
-
select: (item?: OptionPattern<V>) => void;
|
|
67
|
+
readonly select: (item?: OptionPattern<V>) => void;
|
|
65
68
|
/** Toggles the selection state of the given item in the listbox. */
|
|
66
|
-
toggle: (item?: OptionPattern<V>) => void;
|
|
69
|
+
readonly toggle: (item?: OptionPattern<V>) => void;
|
|
67
70
|
/** Clears the selection in the listbox. */
|
|
68
|
-
clearSelection: () => void;
|
|
71
|
+
readonly clearSelection: () => void;
|
|
69
72
|
/** Retrieves the OptionPattern associated with a pointer event. */
|
|
70
|
-
getItem: (e: PointerEvent) => OptionPattern<V> | undefined;
|
|
73
|
+
readonly getItem: (e: PointerEvent) => OptionPattern<V> | undefined;
|
|
71
74
|
/** Retrieves the currently selected items in the listbox. */
|
|
72
|
-
getSelectedItems: () => OptionPattern<V>[];
|
|
75
|
+
readonly getSelectedItems: () => OptionPattern<V>[];
|
|
73
76
|
/** Sets the value of the combobox listbox. */
|
|
74
|
-
setValue: (value: V | undefined) => void;
|
|
77
|
+
readonly setValue: (value: V | undefined) => void;
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
type ComboboxTreeInputs<V> = TreeInputs<V> & {
|
|
@@ -81,61 +84,61 @@ type ComboboxTreeInputs<V> = TreeInputs<V> & {
|
|
|
81
84
|
declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxTreeControls<TreeItemPattern<V>, V> {
|
|
82
85
|
readonly inputs: ComboboxTreeInputs<V>;
|
|
83
86
|
/** Toggles to expand or collapse a tree item. */
|
|
84
|
-
toggleExpansion: (item?: TreeItemPattern<V>) => void;
|
|
87
|
+
readonly toggleExpansion: (item?: TreeItemPattern<V>) => void;
|
|
85
88
|
/** Whether the currently focused item is collapsible. */
|
|
86
|
-
isItemCollapsible: () => boolean;
|
|
89
|
+
readonly isItemCollapsible: () => boolean;
|
|
87
90
|
/** The ARIA role for the tree. */
|
|
88
|
-
role: () => "tree";
|
|
89
|
-
activeId: SignalLike<string | undefined>;
|
|
91
|
+
readonly role: () => "tree";
|
|
92
|
+
readonly activeId: SignalLike<string | undefined>;
|
|
90
93
|
/** Returns the currently active (focused) item in the tree. */
|
|
91
|
-
getActiveItem: () => TreeItemPattern<V> | undefined;
|
|
94
|
+
readonly getActiveItem: () => TreeItemPattern<V> | undefined;
|
|
92
95
|
/** The list of items in the tree. */
|
|
93
96
|
items: SignalLike<TreeItemPattern<V>[]>;
|
|
94
97
|
/** The tab index for the tree. Always -1 because the combobox handles focus. */
|
|
95
|
-
tabIndex: SignalLike<-1 | 0>;
|
|
98
|
+
readonly tabIndex: SignalLike<-1 | 0>;
|
|
96
99
|
constructor(inputs: ComboboxTreeInputs<V>);
|
|
97
100
|
/** Noop. The combobox handles keydown events. */
|
|
98
101
|
onKeydown(_: KeyboardEvent): void;
|
|
99
|
-
/** Noop. The combobox handles
|
|
100
|
-
|
|
102
|
+
/** Noop. The combobox handles click events. */
|
|
103
|
+
onClick(_: PointerEvent): void;
|
|
101
104
|
/** Noop. The combobox controls the open state. */
|
|
102
105
|
setDefaultState(): void;
|
|
103
106
|
/** Navigates to the specified item in the tree. */
|
|
104
|
-
focus: (item: TreeItemPattern<V>) => void;
|
|
107
|
+
readonly focus: (item: TreeItemPattern<V>) => void;
|
|
105
108
|
/** Navigates to the next focusable item in the tree. */
|
|
106
|
-
next: () => void;
|
|
109
|
+
readonly next: () => void;
|
|
107
110
|
/** Navigates to the previous focusable item in the tree. */
|
|
108
|
-
prev: () => void;
|
|
111
|
+
readonly prev: () => void;
|
|
109
112
|
/** Navigates to the last focusable item in the tree. */
|
|
110
|
-
last: () => void;
|
|
113
|
+
readonly last: () => void;
|
|
111
114
|
/** Navigates to the first focusable item in the tree. */
|
|
112
|
-
first: () => void;
|
|
115
|
+
readonly first: () => void;
|
|
113
116
|
/** Unfocuses the currently focused item in the tree. */
|
|
114
|
-
unfocus: () => void;
|
|
117
|
+
readonly unfocus: () => void;
|
|
115
118
|
/** Selects the specified item in the tree or the current active item if not provided. */
|
|
116
|
-
select: (item?: TreeItemPattern<V>) => void;
|
|
119
|
+
readonly select: (item?: TreeItemPattern<V>) => void;
|
|
117
120
|
/** Toggles the selection state of the given item in the tree or the current active item if not provided. */
|
|
118
|
-
toggle: (item?: TreeItemPattern<V>) => void;
|
|
121
|
+
readonly toggle: (item?: TreeItemPattern<V>) => void;
|
|
119
122
|
/** Clears the selection in the tree. */
|
|
120
|
-
clearSelection: () => void;
|
|
123
|
+
readonly clearSelection: () => void;
|
|
121
124
|
/** Retrieves the TreeItemPattern associated with a pointer event. */
|
|
122
|
-
getItem: (e: PointerEvent) => TreeItemPattern<V> | undefined;
|
|
125
|
+
readonly getItem: (e: PointerEvent) => TreeItemPattern<V> | undefined;
|
|
123
126
|
/** Retrieves the currently selected items in the tree */
|
|
124
|
-
getSelectedItems: () => TreeItemPattern<V>[];
|
|
127
|
+
readonly getSelectedItems: () => TreeItemPattern<V>[];
|
|
125
128
|
/** Sets the value of the combobox tree. */
|
|
126
|
-
setValue: (value: V | undefined) => void;
|
|
129
|
+
readonly setValue: (value: V | undefined) => void;
|
|
127
130
|
/** Expands the currently focused item if it is expandable, or navigates to the first child. */
|
|
128
|
-
expandItem: () => void;
|
|
131
|
+
readonly expandItem: () => void;
|
|
129
132
|
/** Collapses the currently focused item if it is expandable, or navigates to the parent. */
|
|
130
|
-
collapseItem: () => void;
|
|
133
|
+
readonly collapseItem: () => void;
|
|
131
134
|
/** Whether the specified item or the currently active item is expandable. */
|
|
132
135
|
isItemExpandable(item?: TreeItemPattern<V> | undefined): boolean;
|
|
133
136
|
/** Expands all of the tree items. */
|
|
134
|
-
expandAll: () => void;
|
|
137
|
+
readonly expandAll: () => void;
|
|
135
138
|
/** Collapses all of the tree items. */
|
|
136
|
-
collapseAll: () => void;
|
|
139
|
+
readonly collapseAll: () => void;
|
|
137
140
|
/** Whether the currently active item is selectable. */
|
|
138
|
-
isItemSelectable: (item?: TreeItemPattern<V> | undefined) => boolean;
|
|
141
|
+
readonly isItemSelectable: (item?: TreeItemPattern<V> | undefined) => boolean;
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
export { ComboboxListboxControls, ComboboxListboxPattern, ComboboxPattern, ComboboxTreeControls, ComboboxTreePattern, ListboxInputs, ListboxPattern, OptionPattern, SignalLike, TreeInputs, TreeItemPattern, TreePattern };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ContentContainerComponentHarness, HarnessPredicate, HarnessLoader, ComponentHarness } from '@angular/cdk/testing';
|
|
2
|
+
|
|
3
|
+
/** A set of criteria that can be used to filter a list of `TabsHarness` instances. */
|
|
4
|
+
interface TabsHarnessFilters extends BaseHarnessFilters {
|
|
5
|
+
}
|
|
6
|
+
/** A set of criteria that can be used to filter a list of `TabHarness` instances. */
|
|
7
|
+
interface TabHarnessFilters extends BaseHarnessFilters {
|
|
8
|
+
/** Only find instances whose title matches the given value. */
|
|
9
|
+
title?: string | RegExp;
|
|
10
|
+
/** Only find instances that are selected. */
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
/** Only find instances that are disabled. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Harness for interacting with an Aria tab in tests. */
|
|
17
|
+
declare class TabHarness extends ContentContainerComponentHarness {
|
|
18
|
+
static hostSelector: string;
|
|
19
|
+
/**
|
|
20
|
+
* Gets a `HarnessPredicate` that can be used to search for a `TabHarness`
|
|
21
|
+
* that meets certain criteria.
|
|
22
|
+
* @param options Options for filtering which tab instances are considered a match.
|
|
23
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
24
|
+
*/
|
|
25
|
+
static with(options?: TabHarnessFilters): HarnessPredicate<TabHarness>;
|
|
26
|
+
/** Gets the tab's title text. */
|
|
27
|
+
getTitle(): Promise<string>;
|
|
28
|
+
/** Clicks the tab to select it. */
|
|
29
|
+
select(): Promise<void>;
|
|
30
|
+
/** Gets whether the tab is selected. */
|
|
31
|
+
isSelected(): Promise<boolean>;
|
|
32
|
+
/** Gets whether the tab is disabled. */
|
|
33
|
+
isDisabled(): Promise<boolean>;
|
|
34
|
+
/** Gets whether the tab is active. */
|
|
35
|
+
isActive(): Promise<boolean>;
|
|
36
|
+
protected getRootHarnessLoader(): Promise<HarnessLoader>;
|
|
37
|
+
}
|
|
38
|
+
/** Harness for interacting with an Aria tabs container in tests. */
|
|
39
|
+
declare class TabsHarness extends ComponentHarness {
|
|
40
|
+
static hostSelector: string;
|
|
41
|
+
/**
|
|
42
|
+
* Gets a `HarnessPredicate` that can be used to search for a `TabsHarness`
|
|
43
|
+
* that meets certain criteria.
|
|
44
|
+
* @param options Options for filtering which tabs instances are considered a match.
|
|
45
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
46
|
+
*/
|
|
47
|
+
static with(options?: TabsHarnessFilters): HarnessPredicate<TabsHarness>;
|
|
48
|
+
/** Gets all tabs inside the tabs container. */
|
|
49
|
+
getTabs(filters?: TabHarnessFilters): Promise<TabHarness[]>;
|
|
50
|
+
/** Gets the currently selected tab. */
|
|
51
|
+
getSelectedTab(): Promise<TabHarness | null>;
|
|
52
|
+
/** Selects a tab matching the given filters. */
|
|
53
|
+
selectTab(filters?: TabHarnessFilters): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { TabHarness, TabsHarness };
|
|
57
|
+
export type { TabHarnessFilters, TabsHarnessFilters };
|
package/types/tabs.d.ts
CHANGED
|
@@ -2,15 +2,13 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
4
|
import { TabPattern, TabListPattern, TabPanelPattern } from './_tabs-chunk.js';
|
|
5
|
+
import { HasElement } from './_element-chunk.js';
|
|
5
6
|
import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
|
|
6
7
|
import './_keyboard-event-manager-chunk.js';
|
|
7
|
-
import './
|
|
8
|
-
import './
|
|
8
|
+
import './_signal-like-chunk.js';
|
|
9
|
+
import './_click-event-manager-chunk.js';
|
|
9
10
|
import './_expansion-chunk.js';
|
|
10
|
-
|
|
11
|
-
interface HasElement {
|
|
12
|
-
element: HTMLElement;
|
|
13
|
-
}
|
|
11
|
+
import './_list-navigation-chunk.js';
|
|
14
12
|
|
|
15
13
|
/**
|
|
16
14
|
* A selectable tab in a TabList.
|
|
@@ -119,10 +117,7 @@ declare class TabList implements OnInit, OnDestroy {
|
|
|
119
117
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
120
118
|
/** The TabList UIPattern. */
|
|
121
119
|
readonly _pattern: TabListPattern;
|
|
122
|
-
/** Whether the tree has received focus yet. */
|
|
123
|
-
private _hasFocused;
|
|
124
120
|
constructor();
|
|
125
|
-
_onFocus(): void;
|
|
126
121
|
ngOnInit(): void;
|
|
127
122
|
ngOnDestroy(): void;
|
|
128
123
|
_register(child: Tab): void;
|
|
@@ -0,0 +1,72 @@
|
|
|
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 Aria toolbar instances. */
|
|
4
|
+
interface ToolbarHarnessFilters extends BaseHarnessFilters {
|
|
5
|
+
}
|
|
6
|
+
/** A set of criteria that can be used to filter a list of Aria toolbar widget group instances. */
|
|
7
|
+
interface ToolbarWidgetGroupHarnessFilters extends BaseHarnessFilters {
|
|
8
|
+
}
|
|
9
|
+
/** A set of criteria that can be used to filter a list of Aria toolbar widgets. */
|
|
10
|
+
interface ToolbarWidgetHarnessFilters extends BaseHarnessFilters {
|
|
11
|
+
/** Text that the widget should match. */
|
|
12
|
+
text?: string | RegExp;
|
|
13
|
+
/** Active state that the widget should match. */
|
|
14
|
+
active?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Harness for interacting with an Aria toolbar widget in tests. */
|
|
18
|
+
declare class ToolbarWidgetHarness extends ContentContainerComponentHarness<string> {
|
|
19
|
+
static hostSelector: string;
|
|
20
|
+
/**
|
|
21
|
+
* Gets a `HarnessPredicate` that can be used to search for a `ToolbarWidgetHarness`
|
|
22
|
+
* that meets certain criteria.
|
|
23
|
+
* @param options Options for filtering which dialog instances are considered a match.
|
|
24
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
25
|
+
*/
|
|
26
|
+
static with(options?: ToolbarWidgetHarnessFilters): HarnessPredicate<ToolbarWidgetHarness>;
|
|
27
|
+
/** Gets the widget's text. */
|
|
28
|
+
getText(): Promise<string>;
|
|
29
|
+
/** Clicks the widget. */
|
|
30
|
+
click(): Promise<void>;
|
|
31
|
+
/** Gets whether the widget is active. */
|
|
32
|
+
isActive(): Promise<boolean>;
|
|
33
|
+
/** Gets whether the widget is disabled. */
|
|
34
|
+
isDisabled(): Promise<boolean>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Harness for interacting with an Aria toolbar widget group in tests. */
|
|
38
|
+
declare class ToolbarWidgetGroupHarness extends ComponentHarness {
|
|
39
|
+
static hostSelector: string;
|
|
40
|
+
/**
|
|
41
|
+
* Gets a `HarnessPredicate` that can be used to search for a `ToolbarWidgetGroupHarness`
|
|
42
|
+
* that meets certain criteria.
|
|
43
|
+
* @param options Options for filtering which dialog instances are considered a match.
|
|
44
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
45
|
+
*/
|
|
46
|
+
static with(options?: ToolbarWidgetGroupHarnessFilters): HarnessPredicate<ToolbarWidgetGroupHarness>;
|
|
47
|
+
/** Gets all widgets in the group. */
|
|
48
|
+
getWidgets(filters?: ToolbarWidgetHarnessFilters): Promise<ToolbarWidgetHarness[]>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Harness for interacting with an Aria toolbar in tests. */
|
|
52
|
+
declare class ToolbarHarness extends ComponentHarness {
|
|
53
|
+
static hostSelector: string;
|
|
54
|
+
/**
|
|
55
|
+
* Gets a `HarnessPredicate` that can be used to search for a `ToolbarHarness`
|
|
56
|
+
* that meets certain criteria.
|
|
57
|
+
* @param options Options for filtering which dialog instances are considered a match.
|
|
58
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
59
|
+
*/
|
|
60
|
+
static with(options?: ToolbarHarnessFilters): HarnessPredicate<ToolbarHarness>;
|
|
61
|
+
/** Gets all widgets in the toolbar. */
|
|
62
|
+
getWidgets(filters?: ToolbarWidgetHarnessFilters): Promise<ToolbarWidgetHarness[]>;
|
|
63
|
+
/** Gets all widget groups in the toolbar. */
|
|
64
|
+
getWidgetGroups(filters?: ToolbarWidgetGroupHarnessFilters): Promise<ToolbarWidgetGroupHarness[]>;
|
|
65
|
+
/** Gets whether the toolbar is disabled. */
|
|
66
|
+
isDisabled(): Promise<boolean>;
|
|
67
|
+
/** Gets the orientation of the toolbar. */
|
|
68
|
+
getOrientation(): Promise<'vertical' | 'horizontal'>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { ToolbarHarness, ToolbarWidgetGroupHarness, ToolbarWidgetHarness };
|
|
72
|
+
export type { ToolbarHarnessFilters, ToolbarWidgetGroupHarnessFilters, ToolbarWidgetHarnessFilters };
|
package/types/toolbar.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
4
|
import { ToolbarWidgetGroupPattern, ToolbarWidgetPattern, ToolbarPattern } from './_toolbar-chunk.js';
|
|
5
|
-
import './
|
|
5
|
+
import './_signal-like-chunk.js';
|
|
6
6
|
import './_list-chunk.js';
|
|
7
|
+
import './_list-navigation-chunk.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* A directive that groups toolbar widgets, used for more complex widgets like radio groups
|
|
@@ -124,7 +125,7 @@ declare class Toolbar<V> {
|
|
|
124
125
|
* Whether to allow disabled items to receive focus. When `true`, disabled items are
|
|
125
126
|
* focusable but not interactive. When `false`, disabled items are skipped during navigation.
|
|
126
127
|
*/
|
|
127
|
-
softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
128
|
+
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
128
129
|
/** Whether the toolbar is disabled. */
|
|
129
130
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
130
131
|
/** Whether focus should wrap when navigating. */
|
|
@@ -133,10 +134,7 @@ declare class Toolbar<V> {
|
|
|
133
134
|
readonly value: _angular_core.ModelSignal<V[]>;
|
|
134
135
|
/** The toolbar UIPattern. */
|
|
135
136
|
readonly _pattern: ToolbarPattern<V>;
|
|
136
|
-
/** Whether the toolbar has received focus yet. */
|
|
137
|
-
private _hasBeenFocused;
|
|
138
137
|
constructor();
|
|
139
|
-
_onFocus(): void;
|
|
140
138
|
_register(widget: ToolbarWidget<V>): void;
|
|
141
139
|
_unregister(widget: ToolbarWidget<V>): void;
|
|
142
140
|
/** Finds the toolbar item associated with a given element. */
|
|
@@ -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 };
|