@angular/material 19.2.2 → 19.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/autocomplete/index.d.ts +83 -124
  2. package/autocomplete/testing/index.d.ts +5 -11
  3. package/badge/index.d.ts +17 -30
  4. package/badge/testing/index.d.ts +5 -8
  5. package/bottom-sheet/index.d.ts +88 -103
  6. package/bottom-sheet/testing/index.d.ts +4 -6
  7. package/button/index.d.ts +109 -148
  8. package/button/testing/index.d.ts +6 -10
  9. package/button-toggle/index.d.ts +116 -142
  10. package/button-toggle/testing/index.d.ts +34 -36
  11. package/card/index.d.ts +79 -117
  12. package/card/testing/index.d.ts +11 -15
  13. package/checkbox/index.d.ts +55 -85
  14. package/checkbox/testing/index.d.ts +6 -10
  15. package/chips/index.d.ts +592 -690
  16. package/chips/testing/index.d.ts +78 -93
  17. package/core/index.d.ts +565 -669
  18. package/core/testing/index.d.ts +28 -32
  19. package/datepicker/index.d.ts +1323 -1479
  20. package/datepicker/testing/index.d.ts +109 -119
  21. package/dialog/index.d.ts +194 -246
  22. package/dialog/testing/index.d.ts +17 -26
  23. package/divider/index.d.ts +4 -10
  24. package/divider/testing/index.d.ts +4 -6
  25. package/expansion/index.d.ts +137 -189
  26. package/expansion/testing/index.d.ts +25 -31
  27. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  28. package/fesm2022/autocomplete.mjs +26 -17
  29. package/fesm2022/autocomplete.mjs.map +1 -1
  30. package/fesm2022/badge/testing.mjs.map +1 -1
  31. package/fesm2022/badge.mjs +3 -7
  32. package/fesm2022/badge.mjs.map +1 -1
  33. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  34. package/fesm2022/bottom-sheet.mjs +0 -4
  35. package/fesm2022/bottom-sheet.mjs.map +1 -1
  36. package/fesm2022/button/testing.mjs.map +1 -1
  37. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  38. package/fesm2022/button-toggle.mjs +5 -4
  39. package/fesm2022/button-toggle.mjs.map +1 -1
  40. package/fesm2022/button.mjs +6 -6
  41. package/fesm2022/button.mjs.map +1 -1
  42. package/fesm2022/card/testing.mjs.map +1 -1
  43. package/fesm2022/card.mjs +0 -4
  44. package/fesm2022/card.mjs.map +1 -1
  45. package/fesm2022/checkbox/testing.mjs.map +1 -1
  46. package/fesm2022/checkbox.mjs +5 -5
  47. package/fesm2022/checkbox.mjs.map +1 -1
  48. package/fesm2022/chips/testing.mjs.map +1 -1
  49. package/fesm2022/chips.mjs +0 -4
  50. package/fesm2022/chips.mjs.map +1 -1
  51. package/fesm2022/core/testing.mjs.map +1 -1
  52. package/fesm2022/core.mjs +7 -7
  53. package/fesm2022/core.mjs.map +1 -1
  54. package/fesm2022/datepicker/testing.mjs.map +1 -1
  55. package/fesm2022/datepicker.mjs +42 -18
  56. package/fesm2022/datepicker.mjs.map +1 -1
  57. package/fesm2022/dialog/testing.mjs.map +1 -1
  58. package/fesm2022/dialog.mjs +4 -8
  59. package/fesm2022/dialog.mjs.map +1 -1
  60. package/fesm2022/divider/testing.mjs.map +1 -1
  61. package/fesm2022/divider.mjs +0 -4
  62. package/fesm2022/divider.mjs.map +1 -1
  63. package/fesm2022/expansion/testing.mjs.map +1 -1
  64. package/fesm2022/expansion.mjs +2 -6
  65. package/fesm2022/expansion.mjs.map +1 -1
  66. package/fesm2022/form-field/testing.mjs +0 -2
  67. package/fesm2022/form-field/testing.mjs.map +1 -1
  68. package/fesm2022/form-field.mjs +0 -4
  69. package/fesm2022/form-field.mjs.map +1 -1
  70. package/fesm2022/grid-list/testing.mjs.map +1 -1
  71. package/fesm2022/grid-list.mjs +0 -4
  72. package/fesm2022/grid-list.mjs.map +1 -1
  73. package/fesm2022/icon/testing.mjs +0 -4
  74. package/fesm2022/icon/testing.mjs.map +1 -1
  75. package/fesm2022/icon.mjs +15 -7
  76. package/fesm2022/icon.mjs.map +1 -1
  77. package/fesm2022/input/testing.mjs.map +1 -1
  78. package/fesm2022/input.mjs +0 -4
  79. package/fesm2022/input.mjs.map +1 -1
  80. package/fesm2022/list/testing.mjs +1 -1
  81. package/fesm2022/list/testing.mjs.map +1 -1
  82. package/fesm2022/list.mjs +2 -6
  83. package/fesm2022/list.mjs.map +1 -1
  84. package/fesm2022/menu/testing.mjs.map +1 -1
  85. package/fesm2022/menu.mjs +15 -7
  86. package/fesm2022/menu.mjs.map +1 -1
  87. package/fesm2022/paginator/testing.mjs.map +1 -1
  88. package/fesm2022/paginator.mjs +10 -6
  89. package/fesm2022/paginator.mjs.map +1 -1
  90. package/fesm2022/progress-bar/testing.mjs +0 -4
  91. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  92. package/fesm2022/progress-bar.mjs +5 -5
  93. package/fesm2022/progress-bar.mjs.map +1 -1
  94. package/fesm2022/progress-spinner/testing.mjs +0 -4
  95. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  96. package/fesm2022/progress-spinner.mjs +5 -5
  97. package/fesm2022/progress-spinner.mjs.map +1 -1
  98. package/fesm2022/radio/testing.mjs.map +1 -1
  99. package/fesm2022/radio.mjs +5 -4
  100. package/fesm2022/radio.mjs.map +1 -1
  101. package/fesm2022/select/testing.mjs.map +1 -1
  102. package/fesm2022/select.mjs +14 -10
  103. package/fesm2022/select.mjs.map +1 -1
  104. package/fesm2022/sidenav/testing.mjs +1 -1
  105. package/fesm2022/sidenav/testing.mjs.map +1 -1
  106. package/fesm2022/sidenav.mjs +9 -9
  107. package/fesm2022/sidenav.mjs.map +1 -1
  108. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  109. package/fesm2022/slide-toggle.mjs +0 -4
  110. package/fesm2022/slide-toggle.mjs.map +1 -1
  111. package/fesm2022/slider/testing.mjs.map +1 -1
  112. package/fesm2022/slider.mjs +0 -4
  113. package/fesm2022/slider.mjs.map +1 -1
  114. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  115. package/fesm2022/snack-bar.mjs +5 -5
  116. package/fesm2022/snack-bar.mjs.map +1 -1
  117. package/fesm2022/sort/testing.mjs.map +1 -1
  118. package/fesm2022/sort.mjs +10 -6
  119. package/fesm2022/sort.mjs.map +1 -1
  120. package/fesm2022/stepper/testing.mjs.map +1 -1
  121. package/fesm2022/stepper.mjs +10 -6
  122. package/fesm2022/stepper.mjs.map +1 -1
  123. package/fesm2022/table/testing.mjs.map +1 -1
  124. package/fesm2022/table.mjs +0 -4
  125. package/fesm2022/table.mjs.map +1 -1
  126. package/fesm2022/tabs/testing.mjs.map +1 -1
  127. package/fesm2022/tabs.mjs +8 -15
  128. package/fesm2022/tabs.mjs.map +1 -1
  129. package/fesm2022/timepicker/testing.mjs.map +1 -1
  130. package/fesm2022/timepicker.mjs +1 -5
  131. package/fesm2022/timepicker.mjs.map +1 -1
  132. package/fesm2022/toolbar/testing.mjs.map +1 -1
  133. package/fesm2022/toolbar.mjs +0 -4
  134. package/fesm2022/toolbar.mjs.map +1 -1
  135. package/fesm2022/tooltip/testing.mjs.map +1 -1
  136. package/fesm2022/tooltip.mjs +15 -7
  137. package/fesm2022/tooltip.mjs.map +1 -1
  138. package/fesm2022/tree/testing.mjs.map +1 -1
  139. package/fesm2022/tree.mjs +0 -4
  140. package/fesm2022/tree.mjs.map +1 -1
  141. package/form-field/index.d.ts +251 -318
  142. package/form-field/testing/control/index.d.ts +2 -2
  143. package/form-field/testing/index.d.ts +14 -21
  144. package/grid-list/index.d.ts +124 -150
  145. package/grid-list/testing/index.d.ts +39 -44
  146. package/icon/index.d.ts +87 -108
  147. package/icon/testing/index.d.ts +38 -43
  148. package/index.d.ts +2 -3
  149. package/input/index.d.ts +27 -61
  150. package/input/testing/index.d.ts +16 -19
  151. package/list/index.d.ts +158 -241
  152. package/list/testing/index.d.ts +157 -179
  153. package/menu/index.d.ts +180 -231
  154. package/menu/testing/index.d.ts +17 -23
  155. package/package.json +2 -2
  156. package/paginator/index.d.ts +84 -97
  157. package/paginator/testing/index.d.ts +10 -14
  158. package/progress-bar/index.d.ts +38 -58
  159. package/progress-bar/testing/index.d.ts +7 -10
  160. package/progress-spinner/index.d.ts +38 -51
  161. package/progress-spinner/testing/index.d.ts +7 -10
  162. package/radio/index.d.ts +145 -168
  163. package/radio/testing/index.d.ts +61 -67
  164. package/schematics/ng-add/index.js +1 -1
  165. package/schematics/ng-add/index.mjs +1 -1
  166. package/schematics/ng-generate/theme-color/index_bundled.js +2 -2
  167. package/schematics/ng-generate/theme-color/schema.json +10 -0
  168. package/schematics/ng-update/index_bundled.js +31 -31
  169. package/select/index.d.ts +77 -130
  170. package/select/testing/index.d.ts +10 -15
  171. package/sidenav/index.d.ts +47 -91
  172. package/sidenav/testing/index.d.ts +58 -63
  173. package/slide-toggle/index.d.ts +51 -84
  174. package/slide-toggle/testing/index.d.ts +17 -21
  175. package/slider/index.d.ts +277 -327
  176. package/slider/testing/index.d.ts +42 -47
  177. package/snack-bar/index.d.ts +147 -185
  178. package/snack-bar/testing/index.d.ts +7 -9
  179. package/sort/index.d.ts +94 -124
  180. package/sort/testing/index.d.ts +21 -24
  181. package/stepper/index.d.ts +108 -165
  182. package/stepper/testing/index.d.ts +43 -52
  183. package/table/index.d.ts +87 -153
  184. package/table/testing/index.d.ts +64 -78
  185. package/tabs/index.d.ts +306 -382
  186. package/tabs/testing/index.d.ts +67 -76
  187. package/timepicker/index.d.ts +123 -159
  188. package/timepicker/testing/index.d.ts +20 -26
  189. package/toolbar/index.d.ts +13 -25
  190. package/toolbar/testing/index.d.ts +13 -16
  191. package/tooltip/index.d.ts +88 -117
  192. package/tooltip/testing/index.d.ts +7 -10
  193. package/tree/index.d.ts +116 -163
  194. package/tree/testing/index.d.ts +52 -58
package/chips/index.d.ts CHANGED
@@ -1,137 +1,106 @@
1
- import { AfterContentInit } from '@angular/core';
2
- import { AfterViewInit } from '@angular/core';
3
- import { ChangeDetectorRef } from '@angular/core';
4
- import { ControlValueAccessor } from '@angular/forms';
5
- import { DoCheck } from '@angular/core';
6
- import { ElementRef } from '@angular/core';
7
- import { ErrorStateMatcher } from '@angular/material/core';
8
- import { EventEmitter } from '@angular/core';
9
- import { FocusKeyManager } from '@angular/cdk/a11y';
10
1
  import * as i0 from '@angular/core';
2
+ import { ElementRef, OnInit, AfterViewInit, AfterContentInit, DoCheck, OnDestroy, ChangeDetectorRef, NgZone, QueryList, EventEmitter, Injector, OnChanges, InjectionToken } from '@angular/core';
3
+ import { Subject, Observable } from 'rxjs';
4
+ import { FocusKeyManager } from '@angular/cdk/a11y';
5
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
11
6
  import * as i1 from '@angular/material/core';
12
- import { InjectionToken } from '@angular/core';
13
- import { Injector } from '@angular/core';
7
+ import { ErrorStateMatcher } from '@angular/material/core';
14
8
  import { MatFormFieldControl } from '@angular/material/form-field';
15
- import { NgControl } from '@angular/forms';
16
- import { NgZone } from '@angular/core';
17
- import { Observable } from 'rxjs';
18
- import { OnChanges } from '@angular/core';
19
- import { OnDestroy } from '@angular/core';
20
- import { OnInit } from '@angular/core';
21
- import { QueryList } from '@angular/core';
22
- import { Subject } from 'rxjs';
23
-
24
- declare namespace i10 {
25
- export {
26
- MatChipEditedEvent,
27
- MatChipRow
28
- }
29
- }
30
-
31
- declare namespace i11 {
32
- export {
33
- MatChipSet
34
- }
35
- }
36
-
37
- declare namespace i2 {
38
- export {
39
- MatChipAction
40
- }
41
- }
42
-
43
- declare namespace i3 {
44
- export {
45
- MatChipEvent,
46
- MatChip
47
- }
48
- }
49
-
50
- declare namespace i4 {
51
- export {
52
- MatChipAvatar,
53
- MatChipTrailingIcon,
54
- MatChipRemove
55
- }
56
- }
57
-
58
- declare namespace i5 {
59
- export {
60
- MatChipEditInput
61
- }
62
- }
63
-
64
- declare namespace i6 {
65
- export {
66
- MatChipGridChange,
67
- MatChipGrid
68
- }
69
- }
70
-
71
- declare namespace i7 {
72
- export {
73
- MatChipInputEvent,
74
- MatChipInput
75
- }
76
- }
77
-
78
- declare namespace i8 {
79
- export {
80
- MatChipListboxChange,
81
- MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR,
82
- MatChipListbox
83
- }
84
- }
85
-
86
- declare namespace i9 {
87
- export {
88
- MatChipSelectionChange,
89
- MatChipOption
90
- }
91
- }
92
-
93
- /**
94
- * Injection token used to avoid a circular dependency between the `MatChip` and `MatChipAction`.
95
- */
96
- export declare const MAT_CHIP: InjectionToken<unknown>;
97
-
98
- /**
99
- * Injection token that can be used to reference instances of `MatChipAvatar`. It serves as
100
- * alternative token to the actual `MatChipAvatar` class which could cause unnecessary
101
- * retention of the class and its directive metadata.
102
- */
103
- export declare const MAT_CHIP_AVATAR: InjectionToken<unknown>;
104
9
 
105
10
  /**
106
- * Provider Expression that allows mat-chip-listbox to register as a ControlValueAccessor.
107
- * This allows it to support [(ngModel)].
11
+ * Section within a chip.
108
12
  * @docs-private
109
13
  */
110
- export declare const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any;
111
-
112
- /**
113
- * Injection token that can be used to reference instances of `MatChipRemove`. It serves as
114
- * alternative token to the actual `MatChipRemove` class which could cause unnecessary
115
- * retention of the class and its directive metadata.
116
- */
117
- export declare const MAT_CHIP_REMOVE: InjectionToken<unknown>;
14
+ declare class MatChipAction {
15
+ _elementRef: ElementRef<HTMLElement>;
16
+ protected _parentChip: {
17
+ _handlePrimaryActionInteraction(): void;
18
+ remove(): void;
19
+ disabled: boolean;
20
+ _isEditing?: boolean;
21
+ };
22
+ /** Whether the action is interactive. */
23
+ isInteractive: boolean;
24
+ /** Whether this is the primary action in the chip. */
25
+ _isPrimary: boolean;
26
+ /** Whether the action is disabled. */
27
+ get disabled(): boolean;
28
+ set disabled(value: boolean);
29
+ private _disabled;
30
+ /** Tab index of the action. */
31
+ tabIndex: number;
32
+ /**
33
+ * Private API to allow focusing this chip when it is disabled.
34
+ */
35
+ private _allowFocusWhenDisabled;
36
+ /**
37
+ * Determine the value of the disabled attribute for this chip action.
38
+ */
39
+ protected _getDisabledAttribute(): string | null;
40
+ /**
41
+ * Determine the value of the tabindex attribute for this chip action.
42
+ */
43
+ protected _getTabindex(): string | null;
44
+ constructor(...args: unknown[]);
45
+ focus(): void;
46
+ _handleClick(event: MouseEvent): void;
47
+ _handleKeydown(event: KeyboardEvent): void;
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAction, never>;
49
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAction, "[matChipAction]", never, { "isInteractive": { "alias": "isInteractive"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "_allowFocusWhenDisabled": { "alias": "_allowFocusWhenDisabled"; "required": false; }; }, {}, never, never, true, never>;
50
+ static ngAcceptInputType_disabled: unknown;
51
+ static ngAcceptInputType_tabIndex: unknown;
52
+ }
118
53
 
54
+ /** Avatar image within a chip. */
55
+ declare class MatChipAvatar {
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAvatar, never>;
57
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAvatar, "mat-chip-avatar, [matChipAvatar]", never, {}, {}, never, never, true, never>;
58
+ }
59
+ /** Non-interactive trailing icon in a chip. */
60
+ declare class MatChipTrailingIcon extends MatChipAction {
61
+ /**
62
+ * MDC considers all trailing actions as a remove icon,
63
+ * but we support non-interactive trailing icons.
64
+ */
65
+ isInteractive: boolean;
66
+ _isPrimary: boolean;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipTrailingIcon, never>;
68
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipTrailingIcon, "mat-chip-trailing-icon, [matChipTrailingIcon]", never, {}, {}, never, never, true, never>;
69
+ }
119
70
  /**
120
- * Injection token that can be used to reference instances of `MatChipTrailingIcon`. It serves as
121
- * alternative token to the actual `MatChipTrailingIcon` class which could cause unnecessary
122
- * retention of the class and its directive metadata.
71
+ * Directive to remove the parent chip when the trailing icon is clicked or
72
+ * when the ENTER key is pressed on it.
73
+ *
74
+ * Recommended for use with the Material Design "cancel" icon
75
+ * available at https://material.io/icons/#ic_cancel.
76
+ *
77
+ * Example:
78
+ *
79
+ * ```
80
+ * <mat-chip>
81
+ * <mat-icon matChipRemove>cancel</mat-icon>
82
+ * </mat-chip>
83
+ * ```
123
84
  */
124
- export declare const MAT_CHIP_TRAILING_ICON: InjectionToken<unknown>;
125
-
126
- /** Injection token to be used to override the default options for the chips module. */
127
- export declare const MAT_CHIPS_DEFAULT_OPTIONS: InjectionToken<MatChipsDefaultOptions>;
85
+ declare class MatChipRemove extends MatChipAction {
86
+ _isPrimary: boolean;
87
+ _handleClick(event: MouseEvent): void;
88
+ _handleKeydown(event: KeyboardEvent): void;
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRemove, never>;
90
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipRemove, "[matChipRemove]", never, {}, {}, never, never, true, never>;
91
+ }
128
92
 
93
+ /** Represents an event fired on an individual `mat-chip`. */
94
+ interface MatChipEvent {
95
+ /** The chip the event was fired on. */
96
+ chip: MatChip;
97
+ }
129
98
  /**
130
99
  * Material design styled Chip base component. Used inside the MatChipSet component.
131
100
  *
132
101
  * Extended by MatChipOption and MatChipRow for different interaction patterns.
133
102
  */
134
- export declare class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoCheck, OnDestroy {
103
+ declare class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoCheck, OnDestroy {
135
104
  _changeDetectorRef: ChangeDetectorRef;
136
105
  _elementRef: ElementRef<HTMLElement>;
137
106
  protected _ngZone: NgZone;
@@ -257,67 +226,92 @@ export declare class MatChip implements OnInit, AfterViewInit, AfterContentInit,
257
226
  static ngAcceptInputType_disabled: unknown;
258
227
  }
259
228
 
229
+ /** Event object emitted by MatChipOption when selected or deselected. */
230
+ declare class MatChipSelectionChange {
231
+ /** Reference to the chip that emitted the event. */
232
+ source: MatChipOption;
233
+ /** Whether the chip that emitted the event is selected. */
234
+ selected: boolean;
235
+ /** Whether the selection change was a result of a user interaction. */
236
+ isUserInput: boolean;
237
+ constructor(
238
+ /** Reference to the chip that emitted the event. */
239
+ source: MatChipOption,
240
+ /** Whether the chip that emitted the event is selected. */
241
+ selected: boolean,
242
+ /** Whether the selection change was a result of a user interaction. */
243
+ isUserInput?: boolean);
244
+ }
260
245
  /**
261
- * Section within a chip.
262
- * @docs-private
246
+ * An extension of the MatChip component that supports chip selection. Used with MatChipListbox.
247
+ *
248
+ * Unlike other chips, the user can focus on disabled chip options inside a MatChipListbox. The
249
+ * user cannot click disabled chips.
263
250
  */
264
- declare class MatChipAction {
265
- _elementRef: ElementRef<HTMLElement>;
266
- protected _parentChip: {
267
- _handlePrimaryActionInteraction(): void;
268
- remove(): void;
269
- disabled: boolean;
270
- _isEditing?: boolean;
271
- };
272
- /** Whether the action is interactive. */
273
- isInteractive: boolean;
274
- /** Whether this is the primary action in the chip. */
275
- _isPrimary: boolean;
276
- /** Whether the action is disabled. */
277
- get disabled(): boolean;
278
- set disabled(value: boolean);
279
- private _disabled;
280
- /** Tab index of the action. */
281
- tabIndex: number;
282
- /**
283
- * Private API to allow focusing this chip when it is disabled.
284
- */
285
- private _allowFocusWhenDisabled;
251
+ declare class MatChipOption extends MatChip implements OnInit {
252
+ /** Default chip options. */
253
+ private _defaultOptions;
254
+ /** Whether the chip list is selectable. */
255
+ chipListSelectable: boolean;
256
+ /** Whether the chip list is in multi-selection mode. */
257
+ _chipListMultiple: boolean;
258
+ /** Whether the chip list hides single-selection indicator. */
259
+ _chipListHideSingleSelectionIndicator: boolean;
286
260
  /**
287
- * Determine the value of the disabled attribute for this chip action.
261
+ * Whether or not the chip is selectable.
262
+ *
263
+ * When a chip is not selectable, changes to its selected state are always
264
+ * ignored. By default an option chip is selectable, and it becomes
265
+ * non-selectable if its parent chip list is not selectable.
288
266
  */
289
- protected _getDisabledAttribute(): string | null;
267
+ get selectable(): boolean;
268
+ set selectable(value: boolean);
269
+ protected _selectable: boolean;
270
+ /** Whether the chip is selected. */
271
+ get selected(): boolean;
272
+ set selected(value: boolean);
273
+ private _selected;
290
274
  /**
291
- * Determine the value of the tabindex attribute for this chip action.
275
+ * The ARIA selected applied to the chip. Conforms to WAI ARIA best practices for listbox
276
+ * interaction patterns.
277
+ *
278
+ * From [WAI ARIA Listbox authoring practices guide](
279
+ * https://www.w3.org/WAI/ARIA/apg/patterns/listbox/):
280
+ * "If any options are selected, each selected option has either aria-selected or aria-checked
281
+ * set to true. All options that are selectable but not selected have either aria-selected or
282
+ * aria-checked set to false."
283
+ *
284
+ * Set `aria-selected="false"` on not-selected listbox options that are selectable to fix
285
+ * VoiceOver reading every option as "selected" (#25736).
292
286
  */
293
- protected _getTabindex(): string | null;
294
- constructor(...args: unknown[]);
295
- focus(): void;
296
- _handleClick(event: MouseEvent): void;
297
- _handleKeydown(event: KeyboardEvent): void;
298
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAction, never>;
299
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAction, "[matChipAction]", never, { "isInteractive": { "alias": "isInteractive"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "_allowFocusWhenDisabled": { "alias": "_allowFocusWhenDisabled"; "required": false; }; }, {}, never, never, true, never>;
300
- static ngAcceptInputType_disabled: unknown;
301
- static ngAcceptInputType_tabIndex: unknown;
302
- }
303
-
304
- /** Avatar image within a chip. */
305
- export declare class MatChipAvatar {
306
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAvatar, never>;
307
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAvatar, "mat-chip-avatar, [matChipAvatar]", never, {}, {}, never, never, true, never>;
308
- }
309
-
310
- /** Represents an event fired on an individual `mat-chip` when it is edited. */
311
- export declare interface MatChipEditedEvent extends MatChipEvent {
312
- /** The final edit value. */
313
- value: string;
287
+ get ariaSelected(): string | null;
288
+ /** The unstyled chip selector for this component. */
289
+ protected basicChipAttrName: string;
290
+ /** Emitted when the chip is selected or deselected. */
291
+ readonly selectionChange: EventEmitter<MatChipSelectionChange>;
292
+ ngOnInit(): void;
293
+ /** Selects the chip. */
294
+ select(): void;
295
+ /** Deselects the chip. */
296
+ deselect(): void;
297
+ /** Selects this chip and emits userInputSelection event */
298
+ selectViaInteraction(): void;
299
+ /** Toggles the current selected state of this chip. */
300
+ toggleSelected(isUserInput?: boolean): boolean;
301
+ _handlePrimaryActionInteraction(): void;
302
+ _hasLeadingGraphic(): boolean;
303
+ _setSelectedState(isSelected: boolean, isUserInput: boolean, emitEvent: boolean): void;
304
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipOption, never>;
305
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatChipOption, "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", never, { "selectable": { "alias": "selectable"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
306
+ static ngAcceptInputType_selectable: unknown;
307
+ static ngAcceptInputType_selected: unknown;
314
308
  }
315
309
 
316
310
  /**
317
311
  * A directive that makes a span editable and exposes functions to modify and retrieve the
318
312
  * element's contents.
319
313
  */
320
- export declare class MatChipEditInput {
314
+ declare class MatChipEditInput {
321
315
  private readonly _elementRef;
322
316
  private readonly _document;
323
317
  constructor(...args: unknown[]);
@@ -330,130 +324,225 @@ export declare class MatChipEditInput {
330
324
  static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipEditInput, "span[matChipEditInput]", never, {}, {}, never, never, true, never>;
331
325
  }
332
326
 
333
- /** Represents an event fired on an individual `mat-chip`. */
334
- export declare interface MatChipEvent {
335
- /** The chip the event was fired on. */
336
- chip: MatChip;
327
+ /** Represents an event fired on an individual `mat-chip` when it is edited. */
328
+ interface MatChipEditedEvent extends MatChipEvent {
329
+ /** The final edit value. */
330
+ value: string;
337
331
  }
338
-
339
332
  /**
340
- * An extension of the MatChipSet component used with MatChipRow chips and
333
+ * An extension of the MatChip component used with MatChipGrid and
341
334
  * the matChipInputFor directive.
342
335
  */
343
- export declare class MatChipGrid extends MatChipSet implements AfterContentInit, AfterViewInit, ControlValueAccessor, DoCheck, MatFormFieldControl<any>, OnDestroy {
344
- ngControl: NgControl;
336
+ declare class MatChipRow extends MatChip implements AfterViewInit {
337
+ protected basicChipAttrName: string;
345
338
  /**
346
- * Implemented as part of MatFormFieldControl.
347
- * @docs-private
348
- */
349
- readonly controlType: string;
350
- /** The chip input to add more chips */
351
- protected _chipInput: MatChipTextControl;
352
- protected _defaultRole: string;
353
- private _errorStateTracker;
354
- /**
355
- * List of element ids to propagate to the chipInput's aria-describedby attribute.
356
- */
357
- private _ariaDescribedbyIds;
358
- /**
359
- * Function when touched. Set as part of ControlValueAccessor implementation.
360
- * @docs-private
361
- */
362
- _onTouched: () => void;
363
- /**
364
- * Function when changed. Set as part of ControlValueAccessor implementation.
365
- * @docs-private
339
+ * The editing action has to be triggered in a timeout. While we're waiting on it, a blur
340
+ * event might occur which will interrupt the editing. This flag is used to avoid interruptions
341
+ * while the editing action is being initialized.
366
342
  */
367
- _onChange: (value: any) => void;
343
+ private _editStartPending;
344
+ editable: boolean;
345
+ /** Emitted when the chip is edited. */
346
+ readonly edited: EventEmitter<MatChipEditedEvent>;
347
+ /** The default chip edit input that is used if none is projected into this chip row. */
348
+ defaultEditInput?: MatChipEditInput;
349
+ /** The projected chip edit input. */
350
+ contentEditInput?: MatChipEditInput;
351
+ _isEditing: boolean;
352
+ constructor(...args: unknown[]);
353
+ _hasTrailingIcon(): boolean;
354
+ /** Sends focus to the first gridcell when the user clicks anywhere inside the chip. */
355
+ _handleFocus(): void;
356
+ _handleKeydown(event: KeyboardEvent): void;
357
+ _handleDoubleclick(event: MouseEvent): void;
358
+ private _startEditing;
359
+ private _onEditFinish;
360
+ _isRippleDisabled(): boolean;
368
361
  /**
369
- * Implemented as part of MatFormFieldControl.
370
- * @docs-private
362
+ * Gets the projected chip edit input, or the default input if none is projected in. One of these
363
+ * two values is guaranteed to be defined.
371
364
  */
365
+ private _getEditInput;
366
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRow, never>;
367
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", never, { "editable": { "alias": "editable"; "required": false; }; }, { "edited": "edited"; }, ["contentEditInput"], ["mat-chip-avatar, [matChipAvatar]", "[matChipEditInput]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
368
+ }
369
+
370
+ /**
371
+ * Basic container component for the MatChip component.
372
+ *
373
+ * Extended by MatChipListbox and MatChipGrid for different interaction patterns.
374
+ */
375
+ declare class MatChipSet implements AfterViewInit, OnDestroy {
376
+ protected _elementRef: ElementRef<HTMLElement>;
377
+ protected _changeDetectorRef: ChangeDetectorRef;
378
+ private _dir;
379
+ /** Index of the last destroyed chip that had focus. */
380
+ private _lastDestroyedFocusedChipIndex;
381
+ /** Used to manage focus within the chip list. */
382
+ protected _keyManager: FocusKeyManager<MatChipAction>;
383
+ /** Subject that emits when the component has been destroyed. */
384
+ protected _destroyed: Subject<void>;
385
+ /** Role to use if it hasn't been overwritten by the user. */
386
+ protected _defaultRole: string;
387
+ /** Combined stream of all of the child chips' focus events. */
388
+ get chipFocusChanges(): Observable<MatChipEvent>;
389
+ /** Combined stream of all of the child chips' destroy events. */
390
+ get chipDestroyedChanges(): Observable<MatChipEvent>;
391
+ /** Combined stream of all of the child chips' remove events. */
392
+ get chipRemovedChanges(): Observable<MatChipEvent>;
393
+ /** Whether the chip set is disabled. */
372
394
  get disabled(): boolean;
373
395
  set disabled(value: boolean);
396
+ protected _disabled: boolean;
397
+ /** Whether the chip list contains chips or not. */
398
+ get empty(): boolean;
399
+ /** The ARIA role applied to the chip set. */
400
+ get role(): string | null;
401
+ /** Tabindex of the chip set. */
402
+ tabIndex: number;
403
+ set role(value: string | null);
404
+ private _explicitRole;
405
+ /** Whether any of the chips inside of this chip-set has focus. */
406
+ get focused(): boolean;
407
+ /** The chips that are part of this chip set. */
408
+ _chips: QueryList<MatChip>;
409
+ /** Flat list of all the actions contained within the chips. */
410
+ _chipActions: QueryList<MatChipAction>;
411
+ constructor(...args: unknown[]);
412
+ ngAfterViewInit(): void;
413
+ ngOnDestroy(): void;
414
+ /** Checks whether any of the chips is focused. */
415
+ protected _hasFocusedChip(): boolean;
416
+ /** Syncs the chip-set's state with the individual chips. */
417
+ protected _syncChipsState(): void;
418
+ /** Dummy method for subclasses to override. Base chip set cannot be focused. */
419
+ focus(): void;
420
+ /** Handles keyboard events on the chip set. */
421
+ _handleKeydown(event: KeyboardEvent): void;
374
422
  /**
375
- * Implemented as part of MatFormFieldControl.
376
- * @docs-private
423
+ * Utility to ensure all indexes are valid.
424
+ *
425
+ * @param index The index to be checked.
426
+ * @returns True if the index is valid for our list of chips.
377
427
  */
378
- get id(): string;
428
+ protected _isValidIndex(index: number): boolean;
379
429
  /**
380
- * Implemented as part of MatFormFieldControl.
381
- * @docs-private
430
+ * Removes the `tabindex` from the chip set and resets it back afterwards, allowing the
431
+ * user to tab out of it. This prevents the set from capturing focus and redirecting
432
+ * it back to the first chip, creating a focus trap, if it user tries to tab away.
382
433
  */
383
- get empty(): boolean;
434
+ protected _allowFocusEscape(): void;
384
435
  /**
385
- * Implemented as part of MatFormFieldControl.
386
- * @docs-private
436
+ * Gets a stream of events from all the chips within the set.
437
+ * The stream will automatically incorporate any newly-added chips.
387
438
  */
388
- get placeholder(): string;
389
- set placeholder(value: string);
390
- protected _placeholder: string;
391
- /** Whether any chips or the matChipInput inside of this chip-grid has focus. */
392
- get focused(): boolean;
439
+ protected _getChipStream<T, C extends MatChip = MatChip>(mappingFunction: (chip: C) => Observable<T>): Observable<T>;
440
+ /** Checks whether an event comes from inside a chip element. */
441
+ protected _originatesFromChip(event: Event): boolean;
442
+ /** Sets up the chip set's focus management logic. */
443
+ private _setUpFocusManagement;
393
444
  /**
394
- * Implemented as part of MatFormFieldControl.
395
- * @docs-private
445
+ * Determines if key manager should avoid putting a given chip action in the tab index. Skip
446
+ * non-interactive and disabled actions since the user can't do anything with them.
396
447
  */
397
- get required(): boolean;
398
- set required(value: boolean);
399
- protected _required: boolean | undefined;
448
+ protected _skipPredicate(action: MatChipAction): boolean;
449
+ /** Listens to changes in the chip set and syncs up the state of the individual chips. */
450
+ private _trackChipSetChanges;
451
+ /** Starts tracking the destroyed chips in order to capture the focused one. */
452
+ private _trackDestroyedFocusedChip;
400
453
  /**
401
- * Implemented as part of MatFormFieldControl.
402
- * @docs-private
454
+ * Finds the next appropriate chip to move focus to,
455
+ * if the currently-focused chip is destroyed.
403
456
  */
404
- get shouldLabelFloat(): boolean;
457
+ private _redirectDestroyedChipFocus;
458
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipSet, never>;
459
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatChipSet, "mat-chip-set", never, { "disabled": { "alias": "disabled"; "required": false; }; "role": { "alias": "role"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, ["_chips"], ["*"], true, never>;
460
+ static ngAcceptInputType_disabled: unknown;
461
+ static ngAcceptInputType_tabIndex: unknown;
462
+ }
463
+
464
+ /** Change event object that is emitted when the chip listbox value has changed. */
465
+ declare class MatChipListboxChange {
466
+ /** Chip listbox that emitted the event. */
467
+ source: MatChipListbox;
468
+ /** Value of the chip listbox when the event was emitted. */
469
+ value: any;
470
+ constructor(
471
+ /** Chip listbox that emitted the event. */
472
+ source: MatChipListbox,
473
+ /** Value of the chip listbox when the event was emitted. */
474
+ value: any);
475
+ }
476
+ /**
477
+ * Provider Expression that allows mat-chip-listbox to register as a ControlValueAccessor.
478
+ * This allows it to support [(ngModel)].
479
+ * @docs-private
480
+ */
481
+ declare const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any;
482
+ /**
483
+ * An extension of the MatChipSet component that supports chip selection.
484
+ * Used with MatChipOption chips.
485
+ */
486
+ declare class MatChipListbox extends MatChipSet implements AfterContentInit, OnDestroy, ControlValueAccessor {
405
487
  /**
406
- * Implemented as part of MatFormFieldControl.
488
+ * Function when touched. Set as part of ControlValueAccessor implementation.
407
489
  * @docs-private
408
490
  */
409
- get value(): any;
410
- set value(value: any);
411
- protected _value: any[];
412
- /** An object used to control when error messages are shown. */
413
- get errorStateMatcher(): ErrorStateMatcher;
414
- set errorStateMatcher(value: ErrorStateMatcher);
415
- /** Combined stream of all of the child chips' blur events. */
416
- get chipBlurChanges(): Observable<MatChipEvent>;
417
- /** Emits when the chip grid value has been changed by the user. */
418
- readonly change: EventEmitter<MatChipGridChange>;
491
+ _onTouched: () => void;
419
492
  /**
420
- * Emits whenever the raw value of the chip-grid changes. This is here primarily
421
- * to facilitate the two-way binding for the `value` input.
493
+ * Function when changed. Set as part of ControlValueAccessor implementation.
422
494
  * @docs-private
423
495
  */
424
- readonly valueChange: EventEmitter<any>;
425
- _chips: QueryList<MatChipRow>;
496
+ _onChange: (value: any) => void;
497
+ protected _defaultRole: string;
498
+ /** Default chip options. */
499
+ private _defaultOptions;
500
+ /** Whether the user should be allowed to select multiple chips. */
501
+ get multiple(): boolean;
502
+ set multiple(value: boolean);
503
+ private _multiple;
504
+ /** The array of selected chips inside the chip listbox. */
505
+ get selected(): MatChipOption[] | MatChipOption;
506
+ /** Orientation of the chip list. */
507
+ ariaOrientation: 'horizontal' | 'vertical';
426
508
  /**
427
- * Emits whenever the component state changes and should cause the parent
428
- * form-field to update. Implemented as part of `MatFormFieldControl`.
429
- * @docs-private
509
+ * Whether or not this chip listbox is selectable.
510
+ *
511
+ * When a chip listbox is not selectable, the selected states for all
512
+ * the chips inside the chip listbox are always ignored.
430
513
  */
431
- readonly stateChanges: Subject<void>;
432
- /** Whether the chip grid is in an error state. */
433
- get errorState(): boolean;
434
- set errorState(value: boolean);
435
- constructor(...args: unknown[]);
436
- ngAfterContentInit(): void;
437
- ngAfterViewInit(): void;
438
- ngDoCheck(): void;
439
- ngOnDestroy(): void;
440
- /** Associates an HTML input element with this chip grid. */
441
- registerInput(inputElement: MatChipTextControl): void;
514
+ get selectable(): boolean;
515
+ set selectable(value: boolean);
516
+ protected _selectable: boolean;
442
517
  /**
443
- * Implemented as part of MatFormFieldControl.
444
- * @docs-private
518
+ * A function to compare the option values with the selected values. The first argument
519
+ * is a value from an option. The second is a value from the selection. A boolean
520
+ * should be returned.
445
521
  */
446
- onContainerClick(event: MouseEvent): void;
522
+ compareWith: (o1: any, o2: any) => boolean;
523
+ /** Whether this chip listbox is required. */
524
+ required: boolean;
525
+ /** Whether checkmark indicator for single-selection options is hidden. */
526
+ get hideSingleSelectionIndicator(): boolean;
527
+ set hideSingleSelectionIndicator(value: boolean);
528
+ private _hideSingleSelectionIndicator;
529
+ /** Combined stream of all of the child chips' selection change events. */
530
+ get chipSelectionChanges(): Observable<MatChipSelectionChange>;
531
+ /** Combined stream of all of the child chips' blur events. */
532
+ get chipBlurChanges(): Observable<MatChipEvent>;
533
+ /** The value of the listbox, which is the combined value of the selected chips. */
534
+ get value(): any;
535
+ set value(value: any);
536
+ protected _value: any;
537
+ /** Event emitted when the selected chip listbox value has been changed by the user. */
538
+ readonly change: EventEmitter<MatChipListboxChange>;
539
+ _chips: QueryList<MatChipOption>;
540
+ ngAfterContentInit(): void;
447
541
  /**
448
- * Focuses the first chip in this chip grid, or the associated input when there
449
- * are no eligible chips.
542
+ * Focuses the first selected chip in this chip listbox, or the first non-disabled chip when there
543
+ * are no selected chips.
450
544
  */
451
545
  focus(): void;
452
- /**
453
- * Implemented as part of MatFormFieldControl.
454
- * @docs-private
455
- */
456
- setDescribedByIds(ids: string[]): void;
457
546
  /**
458
547
  * Implemented as part of ControlValueAccessor.
459
548
  * @docs-private
@@ -474,8 +563,210 @@ export declare class MatChipGrid extends MatChipSet implements AfterContentInit,
474
563
  * @docs-private
475
564
  */
476
565
  setDisabledState(isDisabled: boolean): void;
477
- /** Refreshes the error state of the chip grid. */
478
- updateErrorState(): void;
566
+ /** Selects all chips with value. */
567
+ _setSelectionByValue(value: any, isUserInput?: boolean): void;
568
+ /** When blurred, marks the field as touched when focus moved outside the chip listbox. */
569
+ _blur(): void;
570
+ _keydown(event: KeyboardEvent): void;
571
+ /** Marks the field as touched */
572
+ private _markAsTouched;
573
+ /** Emits change event to set the model value. */
574
+ private _propagateChanges;
575
+ /**
576
+ * Deselects every chip in the listbox.
577
+ * @param skip Chip that should not be deselected.
578
+ */
579
+ private _clearSelection;
580
+ /**
581
+ * Finds and selects the chip based on its value.
582
+ * @returns Chip that has the corresponding value.
583
+ */
584
+ private _selectValue;
585
+ /** Syncs the chip-listbox selection state with the individual chips. */
586
+ private _syncListboxProperties;
587
+ /** Returns the first selected chip in this listbox, or undefined if no chips are selected. */
588
+ private _getFirstSelectedChip;
589
+ /**
590
+ * Determines if key manager should avoid putting a given chip action in the tab index. Skip
591
+ * non-interactive actions since the user can't do anything with them.
592
+ */
593
+ protected _skipPredicate(action: MatChipAction): boolean;
594
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipListbox, never>;
595
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatChipListbox, "mat-chip-listbox", never, { "multiple": { "alias": "multiple"; "required": false; }; "ariaOrientation": { "alias": "aria-orientation"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "change": "change"; }, ["_chips"], ["*"], true, never>;
596
+ static ngAcceptInputType_multiple: unknown;
597
+ static ngAcceptInputType_selectable: unknown;
598
+ static ngAcceptInputType_required: unknown;
599
+ static ngAcceptInputType_hideSingleSelectionIndicator: unknown;
600
+ }
601
+
602
+ /** Interface for a text control that is used to drive interaction with a mat-chip-list. */
603
+ interface MatChipTextControl {
604
+ /** Unique identifier for the text control. */
605
+ id: string;
606
+ /** The text control's placeholder text. */
607
+ placeholder: string;
608
+ /** Whether the text control has browser focus. */
609
+ focused: boolean;
610
+ /** Whether the text control is empty. */
611
+ empty: boolean;
612
+ /** Focuses the text control. */
613
+ focus(): void;
614
+ /** Sets the list of ids the input is described by. */
615
+ setDescribedByIds(ids: string[]): void;
616
+ }
617
+
618
+ /** Change event object that is emitted when the chip grid value has changed. */
619
+ declare class MatChipGridChange {
620
+ /** Chip grid that emitted the event. */
621
+ source: MatChipGrid;
622
+ /** Value of the chip grid when the event was emitted. */
623
+ value: any;
624
+ constructor(
625
+ /** Chip grid that emitted the event. */
626
+ source: MatChipGrid,
627
+ /** Value of the chip grid when the event was emitted. */
628
+ value: any);
629
+ }
630
+ /**
631
+ * An extension of the MatChipSet component used with MatChipRow chips and
632
+ * the matChipInputFor directive.
633
+ */
634
+ declare class MatChipGrid extends MatChipSet implements AfterContentInit, AfterViewInit, ControlValueAccessor, DoCheck, MatFormFieldControl<any>, OnDestroy {
635
+ ngControl: NgControl;
636
+ /**
637
+ * Implemented as part of MatFormFieldControl.
638
+ * @docs-private
639
+ */
640
+ readonly controlType: string;
641
+ /** The chip input to add more chips */
642
+ protected _chipInput: MatChipTextControl;
643
+ protected _defaultRole: string;
644
+ private _errorStateTracker;
645
+ /**
646
+ * List of element ids to propagate to the chipInput's aria-describedby attribute.
647
+ */
648
+ private _ariaDescribedbyIds;
649
+ /**
650
+ * Function when touched. Set as part of ControlValueAccessor implementation.
651
+ * @docs-private
652
+ */
653
+ _onTouched: () => void;
654
+ /**
655
+ * Function when changed. Set as part of ControlValueAccessor implementation.
656
+ * @docs-private
657
+ */
658
+ _onChange: (value: any) => void;
659
+ /**
660
+ * Implemented as part of MatFormFieldControl.
661
+ * @docs-private
662
+ */
663
+ get disabled(): boolean;
664
+ set disabled(value: boolean);
665
+ /**
666
+ * Implemented as part of MatFormFieldControl.
667
+ * @docs-private
668
+ */
669
+ get id(): string;
670
+ /**
671
+ * Implemented as part of MatFormFieldControl.
672
+ * @docs-private
673
+ */
674
+ get empty(): boolean;
675
+ /**
676
+ * Implemented as part of MatFormFieldControl.
677
+ * @docs-private
678
+ */
679
+ get placeholder(): string;
680
+ set placeholder(value: string);
681
+ protected _placeholder: string;
682
+ /** Whether any chips or the matChipInput inside of this chip-grid has focus. */
683
+ get focused(): boolean;
684
+ /**
685
+ * Implemented as part of MatFormFieldControl.
686
+ * @docs-private
687
+ */
688
+ get required(): boolean;
689
+ set required(value: boolean);
690
+ protected _required: boolean | undefined;
691
+ /**
692
+ * Implemented as part of MatFormFieldControl.
693
+ * @docs-private
694
+ */
695
+ get shouldLabelFloat(): boolean;
696
+ /**
697
+ * Implemented as part of MatFormFieldControl.
698
+ * @docs-private
699
+ */
700
+ get value(): any;
701
+ set value(value: any);
702
+ protected _value: any[];
703
+ /** An object used to control when error messages are shown. */
704
+ get errorStateMatcher(): ErrorStateMatcher;
705
+ set errorStateMatcher(value: ErrorStateMatcher);
706
+ /** Combined stream of all of the child chips' blur events. */
707
+ get chipBlurChanges(): Observable<MatChipEvent>;
708
+ /** Emits when the chip grid value has been changed by the user. */
709
+ readonly change: EventEmitter<MatChipGridChange>;
710
+ /**
711
+ * Emits whenever the raw value of the chip-grid changes. This is here primarily
712
+ * to facilitate the two-way binding for the `value` input.
713
+ * @docs-private
714
+ */
715
+ readonly valueChange: EventEmitter<any>;
716
+ _chips: QueryList<MatChipRow>;
717
+ /**
718
+ * Emits whenever the component state changes and should cause the parent
719
+ * form-field to update. Implemented as part of `MatFormFieldControl`.
720
+ * @docs-private
721
+ */
722
+ readonly stateChanges: Subject<void>;
723
+ /** Whether the chip grid is in an error state. */
724
+ get errorState(): boolean;
725
+ set errorState(value: boolean);
726
+ constructor(...args: unknown[]);
727
+ ngAfterContentInit(): void;
728
+ ngAfterViewInit(): void;
729
+ ngDoCheck(): void;
730
+ ngOnDestroy(): void;
731
+ /** Associates an HTML input element with this chip grid. */
732
+ registerInput(inputElement: MatChipTextControl): void;
733
+ /**
734
+ * Implemented as part of MatFormFieldControl.
735
+ * @docs-private
736
+ */
737
+ onContainerClick(event: MouseEvent): void;
738
+ /**
739
+ * Focuses the first chip in this chip grid, or the associated input when there
740
+ * are no eligible chips.
741
+ */
742
+ focus(): void;
743
+ /**
744
+ * Implemented as part of MatFormFieldControl.
745
+ * @docs-private
746
+ */
747
+ setDescribedByIds(ids: string[]): void;
748
+ /**
749
+ * Implemented as part of ControlValueAccessor.
750
+ * @docs-private
751
+ */
752
+ writeValue(value: any): void;
753
+ /**
754
+ * Implemented as part of ControlValueAccessor.
755
+ * @docs-private
756
+ */
757
+ registerOnChange(fn: (value: any) => void): void;
758
+ /**
759
+ * Implemented as part of ControlValueAccessor.
760
+ * @docs-private
761
+ */
762
+ registerOnTouched(fn: () => void): void;
763
+ /**
764
+ * Implemented as part of ControlValueAccessor.
765
+ * @docs-private
766
+ */
767
+ setDisabledState(isDisabled: boolean): void;
768
+ /** Refreshes the error state of the chip grid. */
769
+ updateErrorState(): void;
479
770
  /** When blurred, mark the field as touched when focus moved outside the chip grid. */
480
771
  _blur(): void;
481
772
  /**
@@ -497,24 +788,24 @@ export declare class MatChipGrid extends MatChipSet implements AfterContentInit,
497
788
  static ngAcceptInputType_required: unknown;
498
789
  }
499
790
 
500
- /** Change event object that is emitted when the chip grid value has changed. */
501
- export declare class MatChipGridChange {
502
- /** Chip grid that emitted the event. */
503
- source: MatChipGrid;
504
- /** Value of the chip grid when the event was emitted. */
505
- value: any;
506
- constructor(
507
- /** Chip grid that emitted the event. */
508
- source: MatChipGrid,
509
- /** Value of the chip grid when the event was emitted. */
510
- value: any);
791
+ /** Represents an input event on a `matChipInput`. */
792
+ interface MatChipInputEvent {
793
+ /**
794
+ * The native `<input>` element that the event is being fired for.
795
+ * @deprecated Use `MatChipInputEvent#chipInput.inputElement` instead.
796
+ * @breaking-change 13.0.0 This property will be removed.
797
+ */
798
+ input: HTMLInputElement;
799
+ /** The value of the input. */
800
+ value: string;
801
+ /** Reference to the chip input that emitted the event. */
802
+ chipInput: MatChipInput;
511
803
  }
512
-
513
804
  /**
514
805
  * Directive that adds chip-specific behaviors to an input element inside `<mat-form-field>`.
515
806
  * May be placed inside or outside of a `<mat-chip-grid>`.
516
807
  */
517
- export declare class MatChipInput implements MatChipTextControl, OnChanges, OnDestroy {
808
+ declare class MatChipInput implements MatChipTextControl, OnChanges, OnDestroy {
518
809
  protected _elementRef: ElementRef<HTMLInputElement>;
519
810
  /** Whether the control is focused. */
520
811
  focused: boolean;
@@ -570,431 +861,42 @@ export declare class MatChipInput implements MatChipTextControl, OnChanges, OnDe
570
861
  static ngAcceptInputType_disabled: unknown;
571
862
  }
572
863
 
573
- /** Represents an input event on a `matChipInput`. */
574
- export declare interface MatChipInputEvent {
575
- /**
576
- * The native `<input>` element that the event is being fired for.
577
- * @deprecated Use `MatChipInputEvent#chipInput.inputElement` instead.
578
- * @breaking-change 13.0.0 This property will be removed.
579
- */
580
- input: HTMLInputElement;
581
- /** The value of the input. */
582
- value: string;
583
- /** Reference to the chip input that emitted the event. */
584
- chipInput: MatChipInput;
864
+ declare class MatChipsModule {
865
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipsModule, never>;
866
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatChipsModule, never, [typeof i1.MatCommonModule, typeof i1.MatRippleModule, typeof MatChipAction, typeof MatChip, typeof MatChipAvatar, typeof MatChipEditInput, typeof MatChipGrid, typeof MatChipInput, typeof MatChipListbox, typeof MatChipOption, typeof MatChipRemove, typeof MatChipRow, typeof MatChipSet, typeof MatChipTrailingIcon], [typeof i1.MatCommonModule, typeof MatChip, typeof MatChipAvatar, typeof MatChipEditInput, typeof MatChipGrid, typeof MatChipInput, typeof MatChipListbox, typeof MatChipOption, typeof MatChipRemove, typeof MatChipRow, typeof MatChipSet, typeof MatChipTrailingIcon]>;
867
+ static ɵinj: i0.ɵɵInjectorDeclaration<MatChipsModule>;
585
868
  }
586
869
 
870
+ /** Default options, for the chips module, that can be overridden. */
871
+ interface MatChipsDefaultOptions {
872
+ /** The list of key codes that will trigger a chipEnd event. */
873
+ separatorKeyCodes: readonly number[] | ReadonlySet<number>;
874
+ /** Whether icon indicators should be hidden for single-selection. */
875
+ hideSingleSelectionIndicator?: boolean;
876
+ }
877
+ /** Injection token to be used to override the default options for the chips module. */
878
+ declare const MAT_CHIPS_DEFAULT_OPTIONS: InjectionToken<MatChipsDefaultOptions>;
587
879
  /**
588
- * An extension of the MatChipSet component that supports chip selection.
589
- * Used with MatChipOption chips.
880
+ * Injection token that can be used to reference instances of `MatChipAvatar`. It serves as
881
+ * alternative token to the actual `MatChipAvatar` class which could cause unnecessary
882
+ * retention of the class and its directive metadata.
590
883
  */
591
- export declare class MatChipListbox extends MatChipSet implements AfterContentInit, OnDestroy, ControlValueAccessor {
592
- /**
593
- * Function when touched. Set as part of ControlValueAccessor implementation.
594
- * @docs-private
595
- */
596
- _onTouched: () => void;
597
- /**
598
- * Function when changed. Set as part of ControlValueAccessor implementation.
599
- * @docs-private
600
- */
601
- _onChange: (value: any) => void;
602
- protected _defaultRole: string;
603
- /** Default chip options. */
604
- private _defaultOptions;
605
- /** Whether the user should be allowed to select multiple chips. */
606
- get multiple(): boolean;
607
- set multiple(value: boolean);
608
- private _multiple;
609
- /** The array of selected chips inside the chip listbox. */
610
- get selected(): MatChipOption[] | MatChipOption;
611
- /** Orientation of the chip list. */
612
- ariaOrientation: 'horizontal' | 'vertical';
613
- /**
614
- * Whether or not this chip listbox is selectable.
615
- *
616
- * When a chip listbox is not selectable, the selected states for all
617
- * the chips inside the chip listbox are always ignored.
618
- */
619
- get selectable(): boolean;
620
- set selectable(value: boolean);
621
- protected _selectable: boolean;
622
- /**
623
- * A function to compare the option values with the selected values. The first argument
624
- * is a value from an option. The second is a value from the selection. A boolean
625
- * should be returned.
626
- */
627
- compareWith: (o1: any, o2: any) => boolean;
628
- /** Whether this chip listbox is required. */
629
- required: boolean;
630
- /** Whether checkmark indicator for single-selection options is hidden. */
631
- get hideSingleSelectionIndicator(): boolean;
632
- set hideSingleSelectionIndicator(value: boolean);
633
- private _hideSingleSelectionIndicator;
634
- /** Combined stream of all of the child chips' selection change events. */
635
- get chipSelectionChanges(): Observable<MatChipSelectionChange>;
636
- /** Combined stream of all of the child chips' blur events. */
637
- get chipBlurChanges(): Observable<MatChipEvent>;
638
- /** The value of the listbox, which is the combined value of the selected chips. */
639
- get value(): any;
640
- set value(value: any);
641
- protected _value: any;
642
- /** Event emitted when the selected chip listbox value has been changed by the user. */
643
- readonly change: EventEmitter<MatChipListboxChange>;
644
- _chips: QueryList<MatChipOption>;
645
- ngAfterContentInit(): void;
646
- /**
647
- * Focuses the first selected chip in this chip listbox, or the first non-disabled chip when there
648
- * are no selected chips.
649
- */
650
- focus(): void;
651
- /**
652
- * Implemented as part of ControlValueAccessor.
653
- * @docs-private
654
- */
655
- writeValue(value: any): void;
656
- /**
657
- * Implemented as part of ControlValueAccessor.
658
- * @docs-private
659
- */
660
- registerOnChange(fn: (value: any) => void): void;
661
- /**
662
- * Implemented as part of ControlValueAccessor.
663
- * @docs-private
664
- */
665
- registerOnTouched(fn: () => void): void;
666
- /**
667
- * Implemented as part of ControlValueAccessor.
668
- * @docs-private
669
- */
670
- setDisabledState(isDisabled: boolean): void;
671
- /** Selects all chips with value. */
672
- _setSelectionByValue(value: any, isUserInput?: boolean): void;
673
- /** When blurred, marks the field as touched when focus moved outside the chip listbox. */
674
- _blur(): void;
675
- _keydown(event: KeyboardEvent): void;
676
- /** Marks the field as touched */
677
- private _markAsTouched;
678
- /** Emits change event to set the model value. */
679
- private _propagateChanges;
680
- /**
681
- * Deselects every chip in the listbox.
682
- * @param skip Chip that should not be deselected.
683
- */
684
- private _clearSelection;
685
- /**
686
- * Finds and selects the chip based on its value.
687
- * @returns Chip that has the corresponding value.
688
- */
689
- private _selectValue;
690
- /** Syncs the chip-listbox selection state with the individual chips. */
691
- private _syncListboxProperties;
692
- /** Returns the first selected chip in this listbox, or undefined if no chips are selected. */
693
- private _getFirstSelectedChip;
694
- /**
695
- * Determines if key manager should avoid putting a given chip action in the tab index. Skip
696
- * non-interactive actions since the user can't do anything with them.
697
- */
698
- protected _skipPredicate(action: MatChipAction): boolean;
699
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipListbox, never>;
700
- static ɵcmp: i0.ɵɵComponentDeclaration<MatChipListbox, "mat-chip-listbox", never, { "multiple": { "alias": "multiple"; "required": false; }; "ariaOrientation": { "alias": "aria-orientation"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "change": "change"; }, ["_chips"], ["*"], true, never>;
701
- static ngAcceptInputType_multiple: unknown;
702
- static ngAcceptInputType_selectable: unknown;
703
- static ngAcceptInputType_required: unknown;
704
- static ngAcceptInputType_hideSingleSelectionIndicator: unknown;
705
- }
706
-
707
- /** Change event object that is emitted when the chip listbox value has changed. */
708
- export declare class MatChipListboxChange {
709
- /** Chip listbox that emitted the event. */
710
- source: MatChipListbox;
711
- /** Value of the chip listbox when the event was emitted. */
712
- value: any;
713
- constructor(
714
- /** Chip listbox that emitted the event. */
715
- source: MatChipListbox,
716
- /** Value of the chip listbox when the event was emitted. */
717
- value: any);
718
- }
719
-
884
+ declare const MAT_CHIP_AVATAR: InjectionToken<unknown>;
720
885
  /**
721
- * An extension of the MatChip component that supports chip selection. Used with MatChipListbox.
722
- *
723
- * Unlike other chips, the user can focus on disabled chip options inside a MatChipListbox. The
724
- * user cannot click disabled chips.
725
- */
726
- export declare class MatChipOption extends MatChip implements OnInit {
727
- /** Default chip options. */
728
- private _defaultOptions;
729
- /** Whether the chip list is selectable. */
730
- chipListSelectable: boolean;
731
- /** Whether the chip list is in multi-selection mode. */
732
- _chipListMultiple: boolean;
733
- /** Whether the chip list hides single-selection indicator. */
734
- _chipListHideSingleSelectionIndicator: boolean;
735
- /**
736
- * Whether or not the chip is selectable.
737
- *
738
- * When a chip is not selectable, changes to its selected state are always
739
- * ignored. By default an option chip is selectable, and it becomes
740
- * non-selectable if its parent chip list is not selectable.
741
- */
742
- get selectable(): boolean;
743
- set selectable(value: boolean);
744
- protected _selectable: boolean;
745
- /** Whether the chip is selected. */
746
- get selected(): boolean;
747
- set selected(value: boolean);
748
- private _selected;
749
- /**
750
- * The ARIA selected applied to the chip. Conforms to WAI ARIA best practices for listbox
751
- * interaction patterns.
752
- *
753
- * From [WAI ARIA Listbox authoring practices guide](
754
- * https://www.w3.org/WAI/ARIA/apg/patterns/listbox/):
755
- * "If any options are selected, each selected option has either aria-selected or aria-checked
756
- * set to true. All options that are selectable but not selected have either aria-selected or
757
- * aria-checked set to false."
758
- *
759
- * Set `aria-selected="false"` on not-selected listbox options that are selectable to fix
760
- * VoiceOver reading every option as "selected" (#25736).
761
- */
762
- get ariaSelected(): string | null;
763
- /** The unstyled chip selector for this component. */
764
- protected basicChipAttrName: string;
765
- /** Emitted when the chip is selected or deselected. */
766
- readonly selectionChange: EventEmitter<MatChipSelectionChange>;
767
- ngOnInit(): void;
768
- /** Selects the chip. */
769
- select(): void;
770
- /** Deselects the chip. */
771
- deselect(): void;
772
- /** Selects this chip and emits userInputSelection event */
773
- selectViaInteraction(): void;
774
- /** Toggles the current selected state of this chip. */
775
- toggleSelected(isUserInput?: boolean): boolean;
776
- _handlePrimaryActionInteraction(): void;
777
- _hasLeadingGraphic(): boolean;
778
- _setSelectedState(isSelected: boolean, isUserInput: boolean, emitEvent: boolean): void;
779
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipOption, never>;
780
- static ɵcmp: i0.ɵɵComponentDeclaration<MatChipOption, "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", never, { "selectable": { "alias": "selectable"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
781
- static ngAcceptInputType_selectable: unknown;
782
- static ngAcceptInputType_selected: unknown;
783
- }
784
-
785
- /**
786
- * Directive to remove the parent chip when the trailing icon is clicked or
787
- * when the ENTER key is pressed on it.
788
- *
789
- * Recommended for use with the Material Design "cancel" icon
790
- * available at https://material.io/icons/#ic_cancel.
791
- *
792
- * Example:
793
- *
794
- * ```
795
- * <mat-chip>
796
- * <mat-icon matChipRemove>cancel</mat-icon>
797
- * </mat-chip>
798
- * ```
886
+ * Injection token that can be used to reference instances of `MatChipTrailingIcon`. It serves as
887
+ * alternative token to the actual `MatChipTrailingIcon` class which could cause unnecessary
888
+ * retention of the class and its directive metadata.
799
889
  */
800
- export declare class MatChipRemove extends MatChipAction {
801
- _isPrimary: boolean;
802
- _handleClick(event: MouseEvent): void;
803
- _handleKeydown(event: KeyboardEvent): void;
804
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRemove, never>;
805
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipRemove, "[matChipRemove]", never, {}, {}, never, never, true, never>;
806
- }
807
-
890
+ declare const MAT_CHIP_TRAILING_ICON: InjectionToken<unknown>;
808
891
  /**
809
- * An extension of the MatChip component used with MatChipGrid and
810
- * the matChipInputFor directive.
892
+ * Injection token that can be used to reference instances of `MatChipRemove`. It serves as
893
+ * alternative token to the actual `MatChipRemove` class which could cause unnecessary
894
+ * retention of the class and its directive metadata.
811
895
  */
812
- export declare class MatChipRow extends MatChip implements AfterViewInit {
813
- protected basicChipAttrName: string;
814
- /**
815
- * The editing action has to be triggered in a timeout. While we're waiting on it, a blur
816
- * event might occur which will interrupt the editing. This flag is used to avoid interruptions
817
- * while the editing action is being initialized.
818
- */
819
- private _editStartPending;
820
- editable: boolean;
821
- /** Emitted when the chip is edited. */
822
- readonly edited: EventEmitter<MatChipEditedEvent>;
823
- /** The default chip edit input that is used if none is projected into this chip row. */
824
- defaultEditInput?: MatChipEditInput;
825
- /** The projected chip edit input. */
826
- contentEditInput?: MatChipEditInput;
827
- _isEditing: boolean;
828
- constructor(...args: unknown[]);
829
- _hasTrailingIcon(): boolean;
830
- /** Sends focus to the first gridcell when the user clicks anywhere inside the chip. */
831
- _handleFocus(): void;
832
- _handleKeydown(event: KeyboardEvent): void;
833
- _handleDoubleclick(event: MouseEvent): void;
834
- private _startEditing;
835
- private _onEditFinish;
836
- _isRippleDisabled(): boolean;
837
- /**
838
- * Gets the projected chip edit input, or the default input if none is projected in. One of these
839
- * two values is guaranteed to be defined.
840
- */
841
- private _getEditInput;
842
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRow, never>;
843
- static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", never, { "editable": { "alias": "editable"; "required": false; }; }, { "edited": "edited"; }, ["contentEditInput"], ["mat-chip-avatar, [matChipAvatar]", "[matChipEditInput]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
844
- }
845
-
846
- /** Default options, for the chips module, that can be overridden. */
847
- export declare interface MatChipsDefaultOptions {
848
- /** The list of key codes that will trigger a chipEnd event. */
849
- separatorKeyCodes: readonly number[] | ReadonlySet<number>;
850
- /** Whether icon indicators should be hidden for single-selection. */
851
- hideSingleSelectionIndicator?: boolean;
852
- }
853
-
854
- /** Event object emitted by MatChipOption when selected or deselected. */
855
- export declare class MatChipSelectionChange {
856
- /** Reference to the chip that emitted the event. */
857
- source: MatChipOption;
858
- /** Whether the chip that emitted the event is selected. */
859
- selected: boolean;
860
- /** Whether the selection change was a result of a user interaction. */
861
- isUserInput: boolean;
862
- constructor(
863
- /** Reference to the chip that emitted the event. */
864
- source: MatChipOption,
865
- /** Whether the chip that emitted the event is selected. */
866
- selected: boolean,
867
- /** Whether the selection change was a result of a user interaction. */
868
- isUserInput?: boolean);
869
- }
870
-
896
+ declare const MAT_CHIP_REMOVE: InjectionToken<unknown>;
871
897
  /**
872
- * Basic container component for the MatChip component.
873
- *
874
- * Extended by MatChipListbox and MatChipGrid for different interaction patterns.
898
+ * Injection token used to avoid a circular dependency between the `MatChip` and `MatChipAction`.
875
899
  */
876
- export declare class MatChipSet implements AfterViewInit, OnDestroy {
877
- protected _elementRef: ElementRef<HTMLElement>;
878
- protected _changeDetectorRef: ChangeDetectorRef;
879
- private _dir;
880
- /** Index of the last destroyed chip that had focus. */
881
- private _lastDestroyedFocusedChipIndex;
882
- /** Used to manage focus within the chip list. */
883
- protected _keyManager: FocusKeyManager<MatChipAction>;
884
- /** Subject that emits when the component has been destroyed. */
885
- protected _destroyed: Subject<void>;
886
- /** Role to use if it hasn't been overwritten by the user. */
887
- protected _defaultRole: string;
888
- /** Combined stream of all of the child chips' focus events. */
889
- get chipFocusChanges(): Observable<MatChipEvent>;
890
- /** Combined stream of all of the child chips' destroy events. */
891
- get chipDestroyedChanges(): Observable<MatChipEvent>;
892
- /** Combined stream of all of the child chips' remove events. */
893
- get chipRemovedChanges(): Observable<MatChipEvent>;
894
- /** Whether the chip set is disabled. */
895
- get disabled(): boolean;
896
- set disabled(value: boolean);
897
- protected _disabled: boolean;
898
- /** Whether the chip list contains chips or not. */
899
- get empty(): boolean;
900
- /** The ARIA role applied to the chip set. */
901
- get role(): string | null;
902
- /** Tabindex of the chip set. */
903
- tabIndex: number;
904
- set role(value: string | null);
905
- private _explicitRole;
906
- /** Whether any of the chips inside of this chip-set has focus. */
907
- get focused(): boolean;
908
- /** The chips that are part of this chip set. */
909
- _chips: QueryList<MatChip>;
910
- /** Flat list of all the actions contained within the chips. */
911
- _chipActions: QueryList<MatChipAction>;
912
- constructor(...args: unknown[]);
913
- ngAfterViewInit(): void;
914
- ngOnDestroy(): void;
915
- /** Checks whether any of the chips is focused. */
916
- protected _hasFocusedChip(): boolean;
917
- /** Syncs the chip-set's state with the individual chips. */
918
- protected _syncChipsState(): void;
919
- /** Dummy method for subclasses to override. Base chip set cannot be focused. */
920
- focus(): void;
921
- /** Handles keyboard events on the chip set. */
922
- _handleKeydown(event: KeyboardEvent): void;
923
- /**
924
- * Utility to ensure all indexes are valid.
925
- *
926
- * @param index The index to be checked.
927
- * @returns True if the index is valid for our list of chips.
928
- */
929
- protected _isValidIndex(index: number): boolean;
930
- /**
931
- * Removes the `tabindex` from the chip set and resets it back afterwards, allowing the
932
- * user to tab out of it. This prevents the set from capturing focus and redirecting
933
- * it back to the first chip, creating a focus trap, if it user tries to tab away.
934
- */
935
- protected _allowFocusEscape(): void;
936
- /**
937
- * Gets a stream of events from all the chips within the set.
938
- * The stream will automatically incorporate any newly-added chips.
939
- */
940
- protected _getChipStream<T, C extends MatChip = MatChip>(mappingFunction: (chip: C) => Observable<T>): Observable<T>;
941
- /** Checks whether an event comes from inside a chip element. */
942
- protected _originatesFromChip(event: Event): boolean;
943
- /** Sets up the chip set's focus management logic. */
944
- private _setUpFocusManagement;
945
- /**
946
- * Determines if key manager should avoid putting a given chip action in the tab index. Skip
947
- * non-interactive and disabled actions since the user can't do anything with them.
948
- */
949
- protected _skipPredicate(action: MatChipAction): boolean;
950
- /** Listens to changes in the chip set and syncs up the state of the individual chips. */
951
- private _trackChipSetChanges;
952
- /** Starts tracking the destroyed chips in order to capture the focused one. */
953
- private _trackDestroyedFocusedChip;
954
- /**
955
- * Finds the next appropriate chip to move focus to,
956
- * if the currently-focused chip is destroyed.
957
- */
958
- private _redirectDestroyedChipFocus;
959
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipSet, never>;
960
- static ɵcmp: i0.ɵɵComponentDeclaration<MatChipSet, "mat-chip-set", never, { "disabled": { "alias": "disabled"; "required": false; }; "role": { "alias": "role"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, ["_chips"], ["*"], true, never>;
961
- static ngAcceptInputType_disabled: unknown;
962
- static ngAcceptInputType_tabIndex: unknown;
963
- }
964
-
965
- export declare class MatChipsModule {
966
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipsModule, never>;
967
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatChipsModule, never, [typeof i1.MatCommonModule, typeof i1.MatRippleModule, typeof i2.MatChipAction, typeof i3.MatChip, typeof i4.MatChipAvatar, typeof i5.MatChipEditInput, typeof i6.MatChipGrid, typeof i7.MatChipInput, typeof i8.MatChipListbox, typeof i9.MatChipOption, typeof i4.MatChipRemove, typeof i10.MatChipRow, typeof i11.MatChipSet, typeof i4.MatChipTrailingIcon], [typeof i1.MatCommonModule, typeof i3.MatChip, typeof i4.MatChipAvatar, typeof i5.MatChipEditInput, typeof i6.MatChipGrid, typeof i7.MatChipInput, typeof i8.MatChipListbox, typeof i9.MatChipOption, typeof i4.MatChipRemove, typeof i10.MatChipRow, typeof i11.MatChipSet, typeof i4.MatChipTrailingIcon]>;
968
- static ɵinj: i0.ɵɵInjectorDeclaration<MatChipsModule>;
969
- }
970
-
971
-
972
- /** Interface for a text control that is used to drive interaction with a mat-chip-list. */
973
- export declare interface MatChipTextControl {
974
- /** Unique identifier for the text control. */
975
- id: string;
976
- /** The text control's placeholder text. */
977
- placeholder: string;
978
- /** Whether the text control has browser focus. */
979
- focused: boolean;
980
- /** Whether the text control is empty. */
981
- empty: boolean;
982
- /** Focuses the text control. */
983
- focus(): void;
984
- /** Sets the list of ids the input is described by. */
985
- setDescribedByIds(ids: string[]): void;
986
- }
987
-
988
- /** Non-interactive trailing icon in a chip. */
989
- export declare class MatChipTrailingIcon extends MatChipAction {
990
- /**
991
- * MDC considers all trailing actions as a remove icon,
992
- * but we support non-interactive trailing icons.
993
- */
994
- isInteractive: boolean;
995
- _isPrimary: boolean;
996
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipTrailingIcon, never>;
997
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipTrailingIcon, "mat-chip-trailing-icon, [matChipTrailingIcon]", never, {}, {}, never, never, true, never>;
998
- }
900
+ declare const MAT_CHIP: InjectionToken<unknown>;
999
901
 
1000
- export { }
902
+ export { MAT_CHIP, MAT_CHIPS_DEFAULT_OPTIONS, MAT_CHIP_AVATAR, MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR, MAT_CHIP_REMOVE, MAT_CHIP_TRAILING_ICON, MatChip, MatChipAvatar, MatChipEditInput, type MatChipEditedEvent, type MatChipEvent, MatChipGrid, MatChipGridChange, MatChipInput, type MatChipInputEvent, MatChipListbox, MatChipListboxChange, MatChipOption, MatChipRemove, MatChipRow, MatChipSelectionChange, MatChipSet, type MatChipTextControl, MatChipTrailingIcon, type MatChipsDefaultOptions, MatChipsModule };