@angular/aria 22.0.0-next.7 → 22.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/fesm2022/_accordion-chunk.mjs +11 -1
  2. package/fesm2022/_accordion-chunk.mjs.map +1 -1
  3. package/fesm2022/_click-event-manager-chunk.mjs +1 -1
  4. package/fesm2022/_deferred-content-chunk.mjs +6 -6
  5. package/fesm2022/_list-chunk.mjs +4 -1
  6. package/fesm2022/_list-chunk.mjs.map +1 -1
  7. package/fesm2022/_list-navigation-chunk.mjs +1 -1
  8. package/fesm2022/_list-typeahead-chunk.mjs +1 -1
  9. package/fesm2022/_menu-chunk.mjs +10 -1
  10. package/fesm2022/_menu-chunk.mjs.map +1 -1
  11. package/fesm2022/{_combobox-listbox-chunk.mjs → _option-chunk.mjs} +13 -50
  12. package/fesm2022/_option-chunk.mjs.map +1 -0
  13. package/fesm2022/_tabs-chunk.mjs +1 -1
  14. package/fesm2022/_toolbar-widget-group-chunk.mjs +10 -1
  15. package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
  16. package/fesm2022/_transforms-chunk.mjs +8 -0
  17. package/fesm2022/_transforms-chunk.mjs.map +1 -0
  18. package/fesm2022/{_combobox-tree-chunk.mjs → _tree-chunk.mjs} +8 -48
  19. package/fesm2022/_tree-chunk.mjs.map +1 -0
  20. package/fesm2022/{_signal-like-chunk.mjs → _violations-chunk.mjs} +60 -2
  21. package/fesm2022/_violations-chunk.mjs.map +1 -0
  22. package/fesm2022/_widget-chunk.mjs +46 -15
  23. package/fesm2022/_widget-chunk.mjs.map +1 -1
  24. package/fesm2022/accordion.mjs +116 -89
  25. package/fesm2022/accordion.mjs.map +1 -1
  26. package/fesm2022/aria.mjs +1 -1
  27. package/fesm2022/aria.mjs.map +1 -1
  28. package/fesm2022/combobox-testing.mjs +79 -0
  29. package/fesm2022/combobox-testing.mjs.map +1 -0
  30. package/fesm2022/combobox.mjs +273 -307
  31. package/fesm2022/combobox.mjs.map +1 -1
  32. package/fesm2022/grid-testing.mjs +8 -0
  33. package/fesm2022/grid-testing.mjs.map +1 -1
  34. package/fesm2022/grid.mjs +75 -87
  35. package/fesm2022/grid.mjs.map +1 -1
  36. package/fesm2022/listbox-testing.mjs +4 -0
  37. package/fesm2022/listbox-testing.mjs.map +1 -1
  38. package/fesm2022/listbox.mjs +192 -215
  39. package/fesm2022/listbox.mjs.map +1 -1
  40. package/fesm2022/menu-testing.mjs +11 -0
  41. package/fesm2022/menu-testing.mjs.map +1 -1
  42. package/fesm2022/menu.mjs +60 -66
  43. package/fesm2022/menu.mjs.map +1 -1
  44. package/fesm2022/private.mjs +19 -13
  45. package/fesm2022/private.mjs.map +1 -1
  46. package/fesm2022/tabs.mjs +172 -115
  47. package/fesm2022/tabs.mjs.map +1 -1
  48. package/fesm2022/toolbar-testing.mjs +5 -1
  49. package/fesm2022/toolbar-testing.mjs.map +1 -1
  50. package/fesm2022/toolbar.mjs +41 -30
  51. package/fesm2022/toolbar.mjs.map +1 -1
  52. package/fesm2022/tree-testing.mjs +12 -0
  53. package/fesm2022/tree-testing.mjs.map +1 -1
  54. package/fesm2022/tree.mjs +126 -156
  55. package/fesm2022/tree.mjs.map +1 -1
  56. package/package.json +6 -6
  57. package/types/_accordion-chunk.d.ts +4 -2
  58. package/types/_collection-chunk.d.ts +42 -0
  59. package/types/_expansion-chunk.d.ts +1 -1
  60. package/types/_grid-chunk.d.ts +11 -3
  61. package/types/_keyboard-event-manager-chunk.d.ts +1 -1
  62. package/types/_list-chunk.d.ts +1 -1
  63. package/types/_list-navigation-chunk.d.ts +1 -1
  64. package/types/_listbox-chunk.d.ts +1 -1
  65. package/types/_menu-chunk.d.ts +3 -1
  66. package/types/_tabs-chunk.d.ts +1 -1
  67. package/types/_toolbar-chunk.d.ts +3 -1
  68. package/types/_tree-chunk.d.ts +1 -1
  69. package/types/accordion.d.ts +10 -18
  70. package/types/combobox-testing.d.ts +63 -0
  71. package/types/combobox.d.ts +96 -193
  72. package/types/grid-testing.d.ts +4 -0
  73. package/types/grid.d.ts +99 -103
  74. package/types/listbox-testing.d.ts +25 -0
  75. package/types/listbox.d.ts +53 -62
  76. package/types/menu-testing.d.ts +6 -0
  77. package/types/menu.d.ts +17 -23
  78. package/types/private.d.ts +26 -137
  79. package/types/tabs.d.ts +69 -80
  80. package/types/toolbar-testing.d.ts +4 -0
  81. package/types/toolbar.d.ts +6 -12
  82. package/types/tree-testing.d.ts +8 -0
  83. package/types/tree.d.ts +7 -20
  84. package/fesm2022/_combobox-chunk.mjs +0 -478
  85. package/fesm2022/_combobox-chunk.mjs.map +0 -1
  86. package/fesm2022/_combobox-listbox-chunk.mjs.map +0 -1
  87. package/fesm2022/_combobox-tree-chunk.mjs.map +0 -1
  88. package/fesm2022/_element-chunk.mjs +0 -6
  89. package/fesm2022/_element-chunk.mjs.map +0 -1
  90. package/fesm2022/_signal-like-chunk.mjs.map +0 -1
  91. package/fesm2022/simple-combobox.mjs +0 -443
  92. package/fesm2022/simple-combobox.mjs.map +0 -1
  93. package/types/_combobox-chunk.d.ts +0 -224
  94. package/types/_element-chunk.d.ts +0 -10
  95. package/types/_signal-like-chunk.d.ts +0 -14
  96. package/types/simple-combobox.d.ts +0 -124
@@ -0,0 +1,42 @@
1
+ import { Signal } from '@angular/core';
2
+
3
+ type SignalLike<T> = () => T;
4
+ interface WritableSignalLike<T> extends SignalLike<T> {
5
+ set(value: T): void;
6
+ update(updateFn: (value: T) => T): void;
7
+ asReadonly(): SignalLike<T>;
8
+ }
9
+ /** Converts a getter setter style signal to a WritableSignalLike. */
10
+ declare function convertGetterSetterToWritableSignalLike<T>(getter: () => T, setter: (v: T) => void): WritableSignalLike<T>;
11
+ declare function computed<T>(computation: () => T): SignalLike<T>;
12
+ declare function signal<T>(initialValue: T): WritableSignalLike<T>;
13
+ declare function linkedSignal<T>(sourceFn: () => T): WritableSignalLike<T>;
14
+
15
+ interface HasElement {
16
+ element: HTMLElement;
17
+ }
18
+ /**
19
+ * Sort directives by their document order.
20
+ */
21
+ declare function sortDirectives(a: HasElement, b: HasElement): 1 | -1;
22
+
23
+ /**
24
+ * A collection that lazily sorts its items based on their DOM position.
25
+ * It uses manual registration and updates its order when items are added/removed
26
+ * or when structural DOM changes are detected via MutationObserver.
27
+ *
28
+ * TODO(ok7sai): replace Mutation Observer with internal API.
29
+ */
30
+ declare class SortedCollection<T extends HasElement> {
31
+ private readonly _items;
32
+ private readonly _version;
33
+ private _observer?;
34
+ readonly orderedItems: Signal<T[]>;
35
+ register(item: T): void;
36
+ unregister(item: T): void;
37
+ startObserving(element: HTMLElement): void;
38
+ stopObserving(): void;
39
+ }
40
+
41
+ export { SortedCollection, computed, convertGetterSetterToWritableSignalLike, linkedSignal, signal, sortDirectives };
42
+ export type { HasElement, SignalLike, WritableSignalLike };
@@ -1,4 +1,4 @@
1
- import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
1
+ import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
2
2
 
3
3
  /** Represents an item that can be expanded or collapsed. */
4
4
  interface ExpansionItem {
@@ -1,4 +1,4 @@
1
- import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
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 {
@@ -532,6 +538,8 @@ declare class GridPattern {
532
538
  /** Whether the grid state is stale and needs to be reconciled. */
533
539
  private readonly _stateStale;
534
540
  constructor(inputs: GridInputs);
541
+ /** Returns a set of violations */
542
+ validate(): string[];
535
543
  /** Handles keydown events on the grid. */
536
544
  onKeydown(event: KeyboardEvent): void;
537
545
  /** Handles click events on the grid. */
@@ -1,4 +1,4 @@
1
- import { SignalLike } from './_signal-like-chunk.js';
1
+ import { SignalLike } from './_collection-chunk.js';
2
2
 
3
3
  /**
4
4
  * Options that are applicable to all event handlers.
@@ -1,4 +1,4 @@
1
- import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
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 './_signal-like-chunk.js';
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 './_signal-like-chunk.js';
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';
@@ -1,4 +1,4 @@
1
- import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
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
 
@@ -84,6 +84,8 @@ declare class MenuPattern<V> {
84
84
  /** Handles keyboard events for the menu. */
85
85
  readonly keydownManager: SignalLike<KeyboardEventManager<KeyboardEvent>>;
86
86
  constructor(inputs: MenuInputs<V>);
87
+ /** Returns a set of violations */
88
+ validate(): string[];
87
89
  /** Sets the default state for the menu. */
88
90
  setDefaultState(): void;
89
91
  /** Sets the default active state of the menu before receiving interaction for the first time. */
@@ -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 './_signal-like-chunk.js';
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 './_signal-like-chunk.js';
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. */
@@ -106,6 +106,8 @@ declare class ToolbarPattern<V> {
106
106
  private _goto;
107
107
  select(): void;
108
108
  constructor(inputs: ToolbarInputs<V>);
109
+ /** Returns a set of violations */
110
+ validate(): string[];
109
111
  /** Handles keydown events for the toolbar. */
110
112
  onKeydown(event: KeyboardEvent): void;
111
113
  onPointerdown(event: PointerEvent): void;
@@ -1,4 +1,4 @@
1
- import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
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';
@@ -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';
@@ -27,7 +27,6 @@ import './_list-navigation-chunk.js';
27
27
  * </div>
28
28
  * ```
29
29
  *
30
- * @developerPreview 21.0
31
30
  * @see [Accordion](guide/aria/accordion)
32
31
  */
33
32
  declare class AccordionPanel {
@@ -37,6 +36,7 @@ declare class AccordionPanel {
37
36
  readonly element: HTMLElement;
38
37
  /** The DeferredContentAware host directive. */
39
38
  private readonly _deferredContentAware;
39
+ private readonly _accordionContent;
40
40
  /** A global unique identifier for the panel. */
41
41
  readonly id: _angular_core.InputSignal<string>;
42
42
  /** Whether the accordion panel is visible. True if the associated trigger is expanded. */
@@ -55,7 +55,7 @@ declare class AccordionPanel {
55
55
  /** Toggles the expansion state of this item. */
56
56
  toggle(): void;
57
57
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionPanel, never>;
58
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionPanel, "[ngAccordionPanel]", ["ngAccordionPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
58
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionPanel, "[ngAccordionPanel]", ["ngAccordionPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, ["_accordionContent"], never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
59
59
  }
60
60
 
61
61
  /**
@@ -73,7 +73,6 @@ declare class AccordionPanel {
73
73
  * </button>
74
74
  * ```
75
75
  *
76
- * @developerPreview 21.0
77
76
  * @see [Accordion](guide/aria/accordion)
78
77
  */
79
78
  declare class AccordionTrigger implements OnInit, OnDestroy {
@@ -91,14 +90,13 @@ declare class AccordionTrigger implements OnInit, OnDestroy {
91
90
  readonly panelId: _angular_core.Signal<string>;
92
91
  /** Whether the trigger is disabled. */
93
92
  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
93
  /** Whether the corresponding panel is expanded. */
97
94
  readonly expanded: _angular_core.ModelSignal<boolean>;
98
95
  /** Whether the trigger is active. */
99
96
  readonly active: _angular_core.Signal<boolean>;
100
97
  /** The UI pattern instance for this trigger. */
101
98
  _pattern: AccordionTriggerPattern;
99
+ constructor();
102
100
  ngOnInit(): void;
103
101
  ngOnDestroy(): void;
104
102
  /** Expands this item. */
@@ -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; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, never, true, never>;
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
  /**
@@ -144,18 +142,15 @@ declare class AccordionTrigger implements OnInit, OnDestroy {
144
142
  * </div>
145
143
  * ```
146
144
  *
147
- * @developerPreview 21.0
148
145
  * @see [Accordion](guide/aria/accordion)
149
146
  */
150
- declare class AccordionGroup {
147
+ declare class AccordionGroup implements OnDestroy {
151
148
  /** A reference to the group element. */
152
149
  private readonly _elementRef;
153
150
  /** A reference to the group element. */
154
151
  readonly element: HTMLElement;
155
- /** The AccordionTriggers nested inside this group. */
156
- private readonly _triggers;
157
- /** The AccordionTriggers nested inside this group. */
158
- private readonly _sortedTriggers;
152
+ /** The collection of AccordionTriggers. */
153
+ readonly _collection: SortedCollection<AccordionTrigger>;
159
154
  /** The corresponding patterns for the accordion triggers. */
160
155
  private readonly _triggerPatterns;
161
156
  /** The text direction (ltr or rtl). */
@@ -173,14 +168,12 @@ declare class AccordionGroup {
173
168
  readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
174
169
  /** The UI pattern instance for this accordion group. */
175
170
  readonly _pattern: AccordionGroupPattern;
171
+ constructor();
172
+ ngOnDestroy(): void;
176
173
  /** Expands all accordion panels if multi-expandable. */
177
174
  expandAll(): void;
178
175
  /** Collapses all accordion panels. */
179
176
  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
177
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionGroup, never>;
185
178
  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
179
  }
@@ -201,7 +194,6 @@ declare class AccordionGroup {
201
194
  * </div>
202
195
  * ```
203
196
  *
204
- * @developerPreview 21.0
205
197
  * @see [Accordion](guide/aria/accordion)
206
198
  */
207
199
  declare class AccordionContent {
@@ -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 };