@angular/aria 22.0.0-next.7 → 22.0.0-next.8
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 +1 -1
- package/fesm2022/_click-event-manager-chunk.mjs +1 -1
- package/fesm2022/{_signal-like-chunk.mjs → _collection-chunk.mjs} +51 -2
- package/fesm2022/_collection-chunk.mjs.map +1 -0
- package/fesm2022/_deferred-content-chunk.mjs +6 -6
- package/fesm2022/_list-chunk.mjs +4 -1
- package/fesm2022/_list-chunk.mjs.map +1 -1
- package/fesm2022/_list-navigation-chunk.mjs +1 -1
- package/fesm2022/_list-typeahead-chunk.mjs +1 -1
- package/fesm2022/_menu-chunk.mjs +1 -1
- package/fesm2022/{_combobox-listbox-chunk.mjs → _option-chunk.mjs} +3 -50
- package/fesm2022/_option-chunk.mjs.map +1 -0
- package/fesm2022/_tabs-chunk.mjs +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs +1 -1
- package/fesm2022/_transforms-chunk.mjs +8 -0
- package/fesm2022/_transforms-chunk.mjs.map +1 -0
- package/fesm2022/{_combobox-tree-chunk.mjs → _tree-chunk.mjs} +3 -48
- package/fesm2022/_tree-chunk.mjs.map +1 -0
- package/fesm2022/_widget-chunk.mjs +36 -15
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +28 -55
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox-testing.mjs +79 -0
- package/fesm2022/combobox-testing.mjs.map +1 -0
- package/fesm2022/combobox.mjs +273 -307
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid-testing.mjs +8 -0
- package/fesm2022/grid-testing.mjs.map +1 -1
- package/fesm2022/grid.mjs +68 -87
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox-testing.mjs +4 -0
- package/fesm2022/listbox-testing.mjs.map +1 -1
- package/fesm2022/listbox.mjs +184 -205
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs +11 -0
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +42 -66
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +19 -13
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +78 -84
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs +5 -1
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +21 -31
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs +12 -0
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +118 -146
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +6 -6
- package/types/_accordion-chunk.d.ts +2 -2
- package/types/_collection-chunk.d.ts +42 -0
- package/types/_expansion-chunk.d.ts +1 -1
- package/types/_grid-chunk.d.ts +9 -3
- package/types/_keyboard-event-manager-chunk.d.ts +1 -1
- package/types/_list-chunk.d.ts +1 -1
- package/types/_list-navigation-chunk.d.ts +1 -1
- package/types/_listbox-chunk.d.ts +1 -1
- package/types/_menu-chunk.d.ts +1 -1
- package/types/_tabs-chunk.d.ts +1 -1
- package/types/_toolbar-chunk.d.ts +1 -1
- package/types/_tree-chunk.d.ts +1 -1
- package/types/accordion.d.ts +7 -13
- package/types/combobox-testing.d.ts +63 -0
- package/types/combobox.d.ts +96 -193
- package/types/grid-testing.d.ts +4 -0
- package/types/grid.d.ts +101 -97
- package/types/listbox-testing.d.ts +25 -0
- package/types/listbox.d.ts +55 -60
- package/types/menu-testing.d.ts +6 -0
- package/types/menu.d.ts +17 -13
- package/types/private.d.ts +24 -138
- package/types/tabs.d.ts +69 -72
- package/types/toolbar-testing.d.ts +4 -0
- package/types/toolbar.d.ts +5 -6
- package/types/tree-testing.d.ts +8 -0
- package/types/tree.d.ts +7 -14
- package/fesm2022/_combobox-chunk.mjs +0 -478
- package/fesm2022/_combobox-chunk.mjs.map +0 -1
- package/fesm2022/_combobox-listbox-chunk.mjs.map +0 -1
- package/fesm2022/_combobox-tree-chunk.mjs.map +0 -1
- package/fesm2022/_element-chunk.mjs +0 -6
- package/fesm2022/_element-chunk.mjs.map +0 -1
- package/fesm2022/_signal-like-chunk.mjs.map +0 -1
- package/fesm2022/simple-combobox.mjs +0 -443
- package/fesm2022/simple-combobox.mjs.map +0 -1
- package/types/_combobox-chunk.d.ts +0 -224
- package/types/_element-chunk.d.ts +0 -10
- package/types/_signal-like-chunk.d.ts +0 -14
- package/types/simple-combobox.d.ts +0 -124
package/types/_grid-chunk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignalLike, WritableSignalLike } from './
|
|
1
|
+
import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
|
|
2
2
|
import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
|
|
3
3
|
import { ClickEventManager } from './_click-event-manager-chunk.js';
|
|
4
4
|
import { ElementRef } from '@angular/core';
|
|
@@ -352,6 +352,10 @@ interface GridCellWidgetInputs {
|
|
|
352
352
|
widgetType: SignalLike<'simple' | 'complex' | 'editable'>;
|
|
353
353
|
/** The element that will receive focus when the widget is activated. */
|
|
354
354
|
focusTarget: SignalLike<ElementResolver<HTMLElement>>;
|
|
355
|
+
/** Callback hook used to notify parents or directives upon interaction. */
|
|
356
|
+
onActivate?: (event: KeyboardEvent | FocusEvent | undefined) => void;
|
|
357
|
+
/** Callback hook used to notify parents or directives upon exit. */
|
|
358
|
+
onDeactivate?: (event: KeyboardEvent | FocusEvent | undefined) => void;
|
|
355
359
|
}
|
|
356
360
|
/** The UI pattern for a widget inside a grid cell. */
|
|
357
361
|
declare class GridCellWidgetPattern {
|
|
@@ -383,6 +387,10 @@ declare class GridCellWidgetPattern {
|
|
|
383
387
|
onFocusOut(event: FocusEvent): void;
|
|
384
388
|
/** Focuses the widget's host element. */
|
|
385
389
|
focus(): void;
|
|
390
|
+
/** Side-effect executed whenever the widget activates. Runs in the write phase. */
|
|
391
|
+
activationEffect(): void;
|
|
392
|
+
/** Side-effect executed whenever the widget deactivates. Runs in the write phase. */
|
|
393
|
+
deactivationEffect(): void;
|
|
386
394
|
/** Activates the widget. */
|
|
387
395
|
activate(event?: KeyboardEvent | FocusEvent): void;
|
|
388
396
|
/** Deactivates the widget and restores focus to the widget's host element. */
|
|
@@ -403,8 +411,6 @@ interface GridCellInputs extends GridCell {
|
|
|
403
411
|
colIndex: SignalLike<number | undefined>;
|
|
404
412
|
/** A function that returns the cell widget associated with a given element. */
|
|
405
413
|
getWidget: (e: Element | null) => GridCellWidgetPattern | undefined;
|
|
406
|
-
/** Callback when the cell is activated via Enter/Space. */
|
|
407
|
-
onActivate?: (event: KeyboardEvent) => void;
|
|
408
414
|
}
|
|
409
415
|
/** The UI pattern for a grid cell. */
|
|
410
416
|
declare class GridCellPattern implements GridCell {
|
package/types/_list-chunk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignalLike, WritableSignalLike } from './
|
|
1
|
+
import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
|
|
2
2
|
import { ListFocusItem, ListFocusInputs, ListFocus, ListNavigationItem, ListNavigationInputs, ListNavigation } from './_list-navigation-chunk.js';
|
|
3
3
|
|
|
4
4
|
/** Represents an item in a collection, such as a listbox option, that can be selected. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignalLike, WritableSignalLike } from './
|
|
1
|
+
import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
|
|
2
2
|
|
|
3
3
|
/** Represents an item in a collection, such as a listbox option, than may receive focus. */
|
|
4
4
|
interface ListFocusItem {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignalLike, WritableSignalLike } from './
|
|
1
|
+
import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
|
|
2
2
|
import { ListInputs, List, ListItem } from './_list-chunk.js';
|
|
3
3
|
import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
|
|
4
4
|
import { ClickEventManager } from './_click-event-manager-chunk.js';
|
package/types/_menu-chunk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignalLike, WritableSignalLike } from './
|
|
1
|
+
import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
|
|
2
2
|
import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
|
|
3
3
|
import { ListInputs, ListItem, List } from './_list-chunk.js';
|
|
4
4
|
|
package/types/_tabs-chunk.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
|
|
2
2
|
import { ClickEventManager } from './_click-event-manager-chunk.js';
|
|
3
3
|
import { ExpansionItem, ListExpansionInputs, ListExpansion } from './_expansion-chunk.js';
|
|
4
|
-
import { SignalLike, WritableSignalLike } from './
|
|
4
|
+
import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
|
|
5
5
|
import { ListNavigationItem, ListNavigationInputs, ListFocus, ListNavigation } from './_list-navigation-chunk.js';
|
|
6
6
|
|
|
7
7
|
/** The required inputs to tabs. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignalLike, WritableSignalLike } from './
|
|
1
|
+
import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
|
|
2
2
|
import { ListItem, ListInputs, List } from './_list-chunk.js';
|
|
3
3
|
|
|
4
4
|
/** Represents the required inputs for a toolbar widget group. */
|
package/types/_tree-chunk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignalLike, WritableSignalLike } from './
|
|
1
|
+
import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
|
|
2
2
|
import { ExpansionItem, ListExpansionInputs, ListExpansion } from './_expansion-chunk.js';
|
|
3
3
|
import { ListNavigationItem, ListFocusItem, ListFocusInputs, ListNavigationInputs, ListNavigation, ListFocus } from './_list-navigation-chunk.js';
|
|
4
4
|
import { ListTypeaheadItem, ListSelectionItem, ListSelectionInputs, ListTypeaheadInputs, ListSelection, ListTypeahead, NavOptions } from './_list-chunk.js';
|
package/types/accordion.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { OnInit, OnDestroy } from '@angular/core';
|
|
|
3
3
|
import { AccordionTriggerPattern, AccordionGroupPattern } from './_accordion-chunk.js';
|
|
4
4
|
import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
|
|
5
5
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
6
|
+
import { SortedCollection } from './_collection-chunk.js';
|
|
6
7
|
import './_keyboard-event-manager-chunk.js';
|
|
7
|
-
import './_signal-like-chunk.js';
|
|
8
8
|
import './_click-event-manager-chunk.js';
|
|
9
9
|
import './_expansion-chunk.js';
|
|
10
10
|
import './_list-navigation-chunk.js';
|
|
@@ -91,8 +91,6 @@ declare class AccordionTrigger implements OnInit, OnDestroy {
|
|
|
91
91
|
readonly panelId: _angular_core.Signal<string>;
|
|
92
92
|
/** Whether the trigger is disabled. */
|
|
93
93
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
94
|
-
/** The index of the trigger within the accordion group. */
|
|
95
|
-
readonly index: _angular_core.InputSignal<number | undefined>;
|
|
96
94
|
/** Whether the corresponding panel is expanded. */
|
|
97
95
|
readonly expanded: _angular_core.ModelSignal<boolean>;
|
|
98
96
|
/** Whether the trigger is active. */
|
|
@@ -108,7 +106,7 @@ declare class AccordionTrigger implements OnInit, OnDestroy {
|
|
|
108
106
|
/** Toggles the expansion state of this item. */
|
|
109
107
|
toggle(): void;
|
|
110
108
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionTrigger, never>;
|
|
111
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionTrigger, "[ngAccordionTrigger]", ["ngAccordionTrigger"], { "panel": { "alias": "panel"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "
|
|
109
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionTrigger, "[ngAccordionTrigger]", ["ngAccordionTrigger"], { "panel": { "alias": "panel"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, never, true, never>;
|
|
112
110
|
}
|
|
113
111
|
|
|
114
112
|
/**
|
|
@@ -147,15 +145,13 @@ declare class AccordionTrigger implements OnInit, OnDestroy {
|
|
|
147
145
|
* @developerPreview 21.0
|
|
148
146
|
* @see [Accordion](guide/aria/accordion)
|
|
149
147
|
*/
|
|
150
|
-
declare class AccordionGroup {
|
|
148
|
+
declare class AccordionGroup implements OnDestroy {
|
|
151
149
|
/** A reference to the group element. */
|
|
152
150
|
private readonly _elementRef;
|
|
153
151
|
/** A reference to the group element. */
|
|
154
152
|
readonly element: HTMLElement;
|
|
155
|
-
/** The
|
|
156
|
-
|
|
157
|
-
/** The AccordionTriggers nested inside this group. */
|
|
158
|
-
private readonly _sortedTriggers;
|
|
153
|
+
/** The collection of AccordionTriggers. */
|
|
154
|
+
readonly _collection: SortedCollection<AccordionTrigger>;
|
|
159
155
|
/** The corresponding patterns for the accordion triggers. */
|
|
160
156
|
private readonly _triggerPatterns;
|
|
161
157
|
/** The text direction (ltr or rtl). */
|
|
@@ -173,14 +169,12 @@ declare class AccordionGroup {
|
|
|
173
169
|
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
174
170
|
/** The UI pattern instance for this accordion group. */
|
|
175
171
|
readonly _pattern: AccordionGroupPattern;
|
|
172
|
+
constructor();
|
|
173
|
+
ngOnDestroy(): void;
|
|
176
174
|
/** Expands all accordion panels if multi-expandable. */
|
|
177
175
|
expandAll(): void;
|
|
178
176
|
/** Collapses all accordion panels. */
|
|
179
177
|
collapseAll(): void;
|
|
180
|
-
/** Internal method to register each trigger as we can not use contentChildren. */
|
|
181
|
-
_registerTrigger(trigger: AccordionTrigger): void;
|
|
182
|
-
/** Internal method to unregister each trigger as we can not use contentChildren. */
|
|
183
|
-
_unregisterTrigger(trigger: AccordionTrigger): void;
|
|
184
178
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionGroup, never>;
|
|
185
179
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionGroup, "[ngAccordionGroup]", ["ngAccordionGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "multiExpandable": { "alias": "multiExpandable"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
186
180
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ContentContainerComponentHarness, HarnessPredicate, ComponentHarness, ComponentHarnessConstructor, HarnessLoader } from '@angular/cdk/testing';
|
|
2
|
+
|
|
3
|
+
/** A set of criteria that can be used to filter a list of `ComboboxHarness` instances. */
|
|
4
|
+
interface ComboboxHarnessFilters extends BaseHarnessFilters {
|
|
5
|
+
/** Only find instances whose placeholder matches the given value. */
|
|
6
|
+
placeholder?: string | RegExp;
|
|
7
|
+
/** Only find instances whose value matches the given value. */
|
|
8
|
+
value?: string | RegExp;
|
|
9
|
+
/** Only find instances with the given disabled state. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Harness for interacting with a standard `ngCombobox` input element in tests. */
|
|
14
|
+
declare class ComboboxHarness extends ContentContainerComponentHarness {
|
|
15
|
+
static hostSelector: string;
|
|
16
|
+
/**
|
|
17
|
+
* Gets a `HarnessPredicate` that can be used to search for a combobox with specific attributes.
|
|
18
|
+
* @param options Options for filtering which combobox instances are considered a match.
|
|
19
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
20
|
+
*/
|
|
21
|
+
static with(options?: ComboboxHarnessFilters): HarnessPredicate<ComboboxHarness>;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the component harness for the active widget contained inside the popup.
|
|
24
|
+
* Use this when you need to access the harness of the widget itself (e.g., `ListboxHarness`),
|
|
25
|
+
* rather than querying items within it.
|
|
26
|
+
* @param type The harness type to locate. Must implement standard static `.with()` method.
|
|
27
|
+
*/
|
|
28
|
+
getPopupWidget<T extends ComponentHarness>(type: ComponentHarnessConstructor<T> & {
|
|
29
|
+
with: (options?: {
|
|
30
|
+
selector?: string;
|
|
31
|
+
}) => HarnessPredicate<T>;
|
|
32
|
+
}): Promise<T>;
|
|
33
|
+
/**
|
|
34
|
+
* Gets a harness loader scoped to the content inside the popup container.
|
|
35
|
+
* Note that lookups performed by this loader will only find descendants of the popup container.
|
|
36
|
+
*/
|
|
37
|
+
getPopupLoader(): Promise<HarnessLoader>;
|
|
38
|
+
/** Overrides root loader to automatically resolve queries nested inside the associated popup. */
|
|
39
|
+
protected getRootHarnessLoader(): Promise<HarnessLoader>;
|
|
40
|
+
/** Whether the combobox is expanded (popup is open). */
|
|
41
|
+
isOpen(): Promise<boolean>;
|
|
42
|
+
/** Whether the combobox is disabled. */
|
|
43
|
+
isDisabled(): Promise<boolean>;
|
|
44
|
+
/** Gets the current value string of the combobox input. */
|
|
45
|
+
getValue(): Promise<string>;
|
|
46
|
+
/** Sets the value of the combobox input. */
|
|
47
|
+
setValue(value: string): Promise<void>;
|
|
48
|
+
/** Gets the placeholder text of the combobox. */
|
|
49
|
+
getPlaceholder(): Promise<string | null>;
|
|
50
|
+
/** Opens the combobox popup if it is currently closed. */
|
|
51
|
+
open(): Promise<void>;
|
|
52
|
+
/** Closes the combobox popup if it is currently open. */
|
|
53
|
+
close(): Promise<void>;
|
|
54
|
+
/** Focuses the combobox. */
|
|
55
|
+
focus(): Promise<void>;
|
|
56
|
+
/** Blurs the combobox. */
|
|
57
|
+
blur(): Promise<void>;
|
|
58
|
+
/** Whether the combobox has focus. */
|
|
59
|
+
isFocused(): Promise<boolean>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { ComboboxHarness };
|
|
63
|
+
export type { ComboboxHarnessFilters };
|
package/types/combobox.d.ts
CHANGED
|
@@ -1,225 +1,128 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { DeferredContentAware,
|
|
5
|
-
|
|
6
|
-
import './_signal-like-chunk.js';
|
|
7
|
-
import './_list-chunk.js';
|
|
8
|
-
import './_list-navigation-chunk.js';
|
|
2
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/aria/private';
|
|
4
|
+
import { ComboboxPopupPattern, DeferredContentAware, ComboboxPattern } from '@angular/aria/private';
|
|
5
|
+
export { DeferredContent as ɵɵDeferredContent, DeferredContentAware as ɵɵDeferredContentAware } from './_deferred-content-chunk.js';
|
|
9
6
|
|
|
10
7
|
/**
|
|
11
|
-
* Identifies an element as a
|
|
8
|
+
* Identifies an element as a widget within a combobox popup.
|
|
12
9
|
*
|
|
13
|
-
* This directive
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* exposing the popup's control pattern to the parent combobox.
|
|
17
|
-
*
|
|
18
|
-
* @developerPreview 21.0
|
|
19
|
-
*
|
|
20
|
-
* @see [Combobox](guide/aria/combobox)
|
|
21
|
-
* @see [Select](guide/aria/select)
|
|
22
|
-
* @see [Multiselect](guide/aria/multiselect)
|
|
23
|
-
* @see [Autocomplete](guide/aria/autocomplete)
|
|
24
|
-
*/
|
|
25
|
-
declare class ComboboxPopup<V> {
|
|
26
|
-
/** The combobox that the popup belongs to. */
|
|
27
|
-
readonly combobox: Combobox<V> | null;
|
|
28
|
-
/** The popup controls exposed to the combobox. */
|
|
29
|
-
readonly _controls: _angular_core.WritableSignal<ComboboxListboxControls<any, V> | ComboboxTreeControls<any, V> | ComboboxDialogPattern | undefined>;
|
|
30
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxPopup<any>, never>;
|
|
31
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxPopup<any>, "[ngComboboxPopup]", ["ngComboboxPopup"], {}, {}, never, never, true, never>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The container element that wraps a combobox input and popup, and orchestrates its behavior.
|
|
36
|
-
*
|
|
37
|
-
* The `ngCombobox` directive is the main entry point for creating a combobox and customizing its
|
|
38
|
-
* behavior. It coordinates the interactions between the `ngComboboxInput` and the popup, which
|
|
39
|
-
* is defined by a `ng-template` with the `ngComboboxPopupContainer` directive. If using the
|
|
40
|
-
* `CdkOverlay`, the `cdkConnectedOverlay` directive takes the place of `ngComboboxPopupContainer`.
|
|
41
|
-
*
|
|
42
|
-
* ```html
|
|
43
|
-
* <div ngCombobox filterMode="highlight">
|
|
44
|
-
* <input
|
|
45
|
-
* ngComboboxInput
|
|
46
|
-
* placeholder="Search for a state..."
|
|
47
|
-
* [(value)]="searchString"
|
|
48
|
-
* />
|
|
49
|
-
*
|
|
50
|
-
* <ng-template ngComboboxPopupContainer>
|
|
51
|
-
* <div ngListbox [(value)]="selectedValue">
|
|
52
|
-
* @for (option of filteredOptions(); track option) {
|
|
53
|
-
* <div ngOption [value]="option" [label]="option">
|
|
54
|
-
* <span>{{option}}</span>
|
|
55
|
-
* </div>
|
|
56
|
-
* }
|
|
57
|
-
* </div>
|
|
58
|
-
* </ng-template>
|
|
59
|
-
* </div>
|
|
60
|
-
* ```
|
|
61
|
-
*
|
|
62
|
-
* @developerPreview 21.0
|
|
63
|
-
*
|
|
64
|
-
* @see [Combobox](guide/aria/combobox)
|
|
65
|
-
* @see [Select](guide/aria/select)
|
|
66
|
-
* @see [Multiselect](guide/aria/multiselect)
|
|
67
|
-
* @see [Autocomplete](guide/aria/autocomplete)
|
|
10
|
+
* This directive should be applied to the element that contains the options or content
|
|
11
|
+
* of the popup. It handles the communication of ID and active descendant information
|
|
12
|
+
* to the combobox.
|
|
68
13
|
*/
|
|
69
|
-
declare class
|
|
70
|
-
/**
|
|
71
|
-
protected readonly textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
|
|
72
|
-
/** The element that the combobox is attached to. */
|
|
14
|
+
declare class ComboboxWidget implements OnInit, OnDestroy {
|
|
15
|
+
/** The element that the popup widget is attached to. */
|
|
73
16
|
private readonly _elementRef;
|
|
74
|
-
|
|
17
|
+
private readonly _popup;
|
|
18
|
+
/** A reference to the popup widget element. */
|
|
75
19
|
readonly element: HTMLElement;
|
|
76
|
-
/** The
|
|
77
|
-
|
|
78
|
-
/** The
|
|
79
|
-
readonly
|
|
80
|
-
|
|
81
|
-
* The filter mode for the combobox.
|
|
82
|
-
* - `manual`: The consumer is responsible for filtering the options.
|
|
83
|
-
* - `auto-select`: The combobox automatically selects the first matching option.
|
|
84
|
-
* - `highlight`: The combobox highlights matching text in the options without changing selection.
|
|
85
|
-
*/
|
|
86
|
-
readonly filterMode: _angular_core.InputSignal<"manual" | "auto-select" | "highlight">;
|
|
87
|
-
/** Whether the combobox is disabled. */
|
|
88
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
89
|
-
/** Whether the combobox is read-only. */
|
|
90
|
-
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
91
|
-
/** The value of the first matching item in the popup. */
|
|
92
|
-
readonly firstMatch: _angular_core.InputSignal<V | undefined>;
|
|
93
|
-
/** Whether the combobox is expanded. */
|
|
94
|
-
readonly expanded: _angular_core.Signal<boolean>;
|
|
95
|
-
/** Whether the combobox popup should always be expanded, regardless of user interaction. */
|
|
96
|
-
readonly alwaysExpanded: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
97
|
-
/** Input element connected to the combobox, if any. */
|
|
98
|
-
readonly inputElement: _angular_core.Signal<HTMLInputElement | undefined>;
|
|
99
|
-
/** The combobox ui pattern. */
|
|
100
|
-
readonly _pattern: ComboboxPattern<any, V>;
|
|
20
|
+
/** The ID of the popup widget. */
|
|
21
|
+
readonly popupId: _angular_core.WritableSignal<string | undefined>;
|
|
22
|
+
/** The ID of the active descendant in the widget. */
|
|
23
|
+
readonly activeDescendant: _angular_core.InputSignal<string | undefined>;
|
|
24
|
+
private _observer;
|
|
101
25
|
constructor();
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
26
|
+
ngOnInit(): void;
|
|
27
|
+
ngOnDestroy(): void;
|
|
28
|
+
/** Handles focus in events for the widget. */
|
|
29
|
+
onFocusin(): void;
|
|
30
|
+
/** Handles focus out events for the widget. */
|
|
31
|
+
onFocusout(event: FocusEvent): void;
|
|
32
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxWidget, never>;
|
|
33
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxWidget, "[ngComboboxWidget]", ["ngComboboxWidget"], { "activeDescendant": { "alias": "activeDescendant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
108
34
|
}
|
|
109
35
|
|
|
110
36
|
/**
|
|
111
|
-
*
|
|
112
|
-
* a
|
|
113
|
-
*
|
|
37
|
+
* A structural directive that marks the `ng-template` to be used as the popup
|
|
38
|
+
* for a combobox. This content is conditionally rendered.
|
|
39
|
+
*
|
|
40
|
+
* The content of the popup can be any element with the `ngComboboxWidget` directive.
|
|
114
41
|
*
|
|
115
42
|
* ```html
|
|
116
|
-
* <ng-template
|
|
117
|
-
* <
|
|
118
|
-
* <!-- ...
|
|
119
|
-
* </
|
|
43
|
+
* <ng-template ngComboboxPopup>
|
|
44
|
+
* <div ngComboboxWidget>
|
|
45
|
+
* <!-- ... options ... -->
|
|
46
|
+
* </div>
|
|
120
47
|
* </ng-template>
|
|
121
48
|
* ```
|
|
122
|
-
*
|
|
123
|
-
* @developerPreview 21.0
|
|
124
|
-
*
|
|
125
|
-
* @see [Combobox](guide/aria/combobox)
|
|
126
|
-
* @see [Select](guide/aria/select)
|
|
127
|
-
* @see [Multiselect](guide/aria/multiselect)
|
|
128
|
-
* @see [Autocomplete](guide/aria/autocomplete)
|
|
129
49
|
*/
|
|
130
|
-
declare class
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
readonly
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
50
|
+
declare class ComboboxPopup implements OnInit, OnDestroy {
|
|
51
|
+
private readonly _deferredContent;
|
|
52
|
+
/** The combobox that the popup belongs to. */
|
|
53
|
+
readonly combobox: _angular_core.InputSignal<Combobox>;
|
|
54
|
+
/** The widget contained within the popup. */
|
|
55
|
+
readonly _widget: _angular_core.WritableSignal<ComboboxWidget | undefined>;
|
|
56
|
+
/** The element that serves as the control target for the popup. */
|
|
57
|
+
readonly controlTarget: _angular_core.Signal<HTMLElement | undefined>;
|
|
58
|
+
/** The ID of the popup. */
|
|
59
|
+
readonly popupId: _angular_core.Signal<string | undefined>;
|
|
60
|
+
/** The ID of the active descendant in the popup. */
|
|
61
|
+
readonly activeDescendant: _angular_core.Signal<string | undefined>;
|
|
62
|
+
/** The type of the popup (e.g., listbox, tree, grid, dialog). */
|
|
63
|
+
readonly popupType: _angular_core.InputSignal<"listbox" | "tree" | "grid" | "dialog">;
|
|
64
|
+
/** The popup pattern. */
|
|
65
|
+
readonly _pattern: ComboboxPopupPattern;
|
|
66
|
+
ngOnInit(): void;
|
|
67
|
+
ngOnDestroy(): void;
|
|
68
|
+
/** Registers a widget with the popup. */
|
|
69
|
+
_registerWidget(widget: ComboboxWidget): void;
|
|
70
|
+
/** Unregisters the widget from the popup. */
|
|
71
|
+
_unregisterWidget(): void;
|
|
72
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxPopup, never>;
|
|
73
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxPopup, "ng-template[ngComboboxPopup]", ["ngComboboxPopup"], { "combobox": { "alias": "combobox"; "required": true; "isSignal": true; }; "popupType": { "alias": "popupType"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.DeferredContent; inputs: {}; outputs: {}; }]>;
|
|
146
74
|
}
|
|
147
75
|
|
|
148
76
|
/**
|
|
149
|
-
*
|
|
150
|
-
* current value and handling user input for filtering and selection.
|
|
77
|
+
* The container element that wraps a combobox input and popup, and orchestrates its behavior.
|
|
151
78
|
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* popup and navigating through the options.
|
|
79
|
+
* The `ngCombobox` directive is the main entry point for creating a combobox and customizing its
|
|
80
|
+
* behavior. It coordinates the interactions between the input and the popup.
|
|
155
81
|
*
|
|
156
82
|
* ```html
|
|
157
|
-
* <
|
|
158
|
-
* ngComboboxInput
|
|
159
|
-
* placeholder="Search..."
|
|
160
|
-
* [(value)]="searchString"
|
|
161
|
-
* />
|
|
162
|
-
* ```
|
|
163
|
-
*
|
|
164
|
-
* @developerPreview 21.0
|
|
83
|
+
* <div ngCombobox [(expanded)]="expanded">
|
|
84
|
+
* <input ngComboboxInput />
|
|
165
85
|
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
86
|
+
* <ng-template ngComboboxPopup>
|
|
87
|
+
* <div ngComboboxWidget>
|
|
88
|
+
* <!-- ... options ... -->
|
|
89
|
+
* </div>
|
|
90
|
+
* </ng-template>
|
|
91
|
+
* </div>
|
|
92
|
+
* ```
|
|
170
93
|
*/
|
|
171
|
-
declare class
|
|
94
|
+
declare class Combobox extends DeferredContentAware implements OnInit {
|
|
95
|
+
private readonly _renderer;
|
|
172
96
|
/** The element that the combobox is attached to. */
|
|
173
97
|
private readonly _elementRef;
|
|
174
98
|
/** A reference to the input element. */
|
|
175
99
|
readonly element: HTMLElement;
|
|
176
|
-
/** The
|
|
177
|
-
readonly
|
|
178
|
-
/**
|
|
100
|
+
/** The popup associated with the combobox. */
|
|
101
|
+
readonly _popup: _angular_core.WritableSignal<ComboboxPopup | undefined>;
|
|
102
|
+
/** Whether the combobox is disabled. */
|
|
103
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
104
|
+
/** Whether the combobox is soft disabled (remains focusable). */
|
|
105
|
+
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
106
|
+
/** Whether the combobox should always remain expanded. */
|
|
107
|
+
readonly alwaysExpanded: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
108
|
+
/** The tabindex of the combobox. */
|
|
109
|
+
readonly tabIndex: _angular_core.InputSignalWithTransform<number | undefined, string | number | undefined>;
|
|
110
|
+
/** Whether the combobox is expanded. */
|
|
111
|
+
readonly expanded: _angular_core.ModelSignal<boolean>;
|
|
112
|
+
/** The value of the combobox input. */
|
|
179
113
|
readonly value: _angular_core.ModelSignal<string>;
|
|
114
|
+
/** An inline suggestion to be displayed in the input. */
|
|
115
|
+
readonly inlineSuggestion: _angular_core.InputSignal<string | undefined>;
|
|
116
|
+
/** The combobox ui pattern. */
|
|
117
|
+
readonly _pattern: ComboboxPattern;
|
|
180
118
|
constructor();
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
*
|
|
189
|
-
* The content of the popup can be a `ngListbox`, `ngTree`, or `role="dialog"`, allowing for
|
|
190
|
-
* flexible and complex combobox implementations. The consumer is responsible for
|
|
191
|
-
* implementing the filtering logic based on the `ngComboboxInput`'s value.
|
|
192
|
-
*
|
|
193
|
-
* ```html
|
|
194
|
-
* <ng-template ngComboboxPopupContainer>
|
|
195
|
-
* <div ngListbox [(value)]="selectedValue">
|
|
196
|
-
* <!-- ... options ... -->
|
|
197
|
-
* </div>
|
|
198
|
-
* </ng-template>
|
|
199
|
-
* ```
|
|
200
|
-
*
|
|
201
|
-
* When using CdkOverlay, this directive can be replaced by `cdkConnectedOverlay`.
|
|
202
|
-
*
|
|
203
|
-
* ```html
|
|
204
|
-
* <ng-template
|
|
205
|
-
* [cdkConnectedOverlay]="{origin: inputElement, usePopover: 'inline' matchWidth: true}"
|
|
206
|
-
* [cdkConnectedOverlayOpen]="combobox.expanded()">
|
|
207
|
-
* <div ngListbox [(value)]="selectedValue">
|
|
208
|
-
* <!-- ... options ... -->
|
|
209
|
-
* </div>
|
|
210
|
-
* </ng-template>
|
|
211
|
-
* ```
|
|
212
|
-
*
|
|
213
|
-
* @developerPreview 21.0
|
|
214
|
-
*
|
|
215
|
-
* @see [Combobox](guide/aria/combobox)
|
|
216
|
-
* @see [Select](guide/aria/select)
|
|
217
|
-
* @see [Multiselect](guide/aria/multiselect)
|
|
218
|
-
* @see [Autocomplete](guide/aria/autocomplete)
|
|
219
|
-
*/
|
|
220
|
-
declare class ComboboxPopupContainer {
|
|
221
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxPopupContainer, never>;
|
|
222
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxPopupContainer, "ng-template[ngComboboxPopupContainer]", ["ngComboboxPopupContainer"], {}, {}, never, never, true, [{ directive: typeof DeferredContent; inputs: {}; outputs: {}; }]>;
|
|
119
|
+
ngOnInit(): void;
|
|
120
|
+
/** Registers a popup with the combobox. */
|
|
121
|
+
_registerPopup(popup: ComboboxPopup): void;
|
|
122
|
+
/** Unregisters the popup from the combobox. */
|
|
123
|
+
_unregisterPopup(): void;
|
|
124
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Combobox, never>;
|
|
125
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Combobox, "[ngCombobox]", ["ngCombobox"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "alwaysExpanded": { "alias": "alwaysExpanded"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "inlineSuggestion": { "alias": "inlineSuggestion"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; "value": "valueChange"; }, never, never, true, never>;
|
|
223
126
|
}
|
|
224
127
|
|
|
225
|
-
export { Combobox,
|
|
128
|
+
export { Combobox, ComboboxPopup, ComboboxWidget };
|
package/types/grid-testing.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ declare class GridCellHarness extends ContentContainerComponentHarness {
|
|
|
39
39
|
focus(): Promise<void>;
|
|
40
40
|
/** Blurs the cell. */
|
|
41
41
|
blur(): Promise<void>;
|
|
42
|
+
/** Whether the cell is active. */
|
|
43
|
+
isActive(): Promise<boolean>;
|
|
44
|
+
/** Whether the cell is focused. */
|
|
45
|
+
isFocused(): Promise<boolean>;
|
|
42
46
|
}
|
|
43
47
|
/** Harness for interacting with a standard ngGridRow in tests. */
|
|
44
48
|
declare class GridRowHarness extends ComponentHarness {
|