@angular/material 21.0.0-next.6 → 21.0.0-next.9

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 (116) hide show
  1. package/fesm2022/_animation-chunk.mjs.map +1 -1
  2. package/fesm2022/_date-formats-chunk.mjs.map +1 -1
  3. package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
  4. package/fesm2022/_error-options-chunk.mjs.map +1 -1
  5. package/fesm2022/_error-state-chunk.mjs.map +1 -1
  6. package/fesm2022/_form-field-chunk.mjs.map +1 -1
  7. package/fesm2022/_icon-button-chunk.mjs.map +1 -1
  8. package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
  9. package/fesm2022/_input-harness-chunk.mjs.map +1 -1
  10. package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
  11. package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
  12. package/fesm2022/_line-chunk.mjs.map +1 -1
  13. package/fesm2022/_option-chunk.mjs.map +1 -1
  14. package/fesm2022/_option-harness-chunk.mjs.map +1 -1
  15. package/fesm2022/_option-module-chunk.mjs.map +1 -1
  16. package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
  17. package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
  18. package/fesm2022/_public-api-chunk.mjs.map +1 -1
  19. package/fesm2022/_ripple-chunk.mjs.map +1 -1
  20. package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
  21. package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
  22. package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
  23. package/fesm2022/_tooltip-chunk.mjs.map +1 -1
  24. package/fesm2022/autocomplete-testing.mjs.map +1 -1
  25. package/fesm2022/autocomplete.mjs.map +1 -1
  26. package/fesm2022/badge-testing.mjs.map +1 -1
  27. package/fesm2022/badge.mjs.map +1 -1
  28. package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
  29. package/fesm2022/bottom-sheet.mjs +5 -0
  30. package/fesm2022/bottom-sheet.mjs.map +1 -1
  31. package/fesm2022/button-testing.mjs.map +1 -1
  32. package/fesm2022/button-toggle-testing.mjs.map +1 -1
  33. package/fesm2022/button-toggle.mjs +2 -2
  34. package/fesm2022/button-toggle.mjs.map +1 -1
  35. package/fesm2022/button.mjs.map +1 -1
  36. package/fesm2022/card-testing.mjs.map +1 -1
  37. package/fesm2022/card.mjs.map +1 -1
  38. package/fesm2022/checkbox-testing.mjs.map +1 -1
  39. package/fesm2022/checkbox.mjs +2 -2
  40. package/fesm2022/checkbox.mjs.map +1 -1
  41. package/fesm2022/chips-testing.mjs +0 -6
  42. package/fesm2022/chips-testing.mjs.map +1 -1
  43. package/fesm2022/chips.mjs.map +1 -1
  44. package/fesm2022/core-testing.mjs.map +1 -1
  45. package/fesm2022/core.mjs +1 -1
  46. package/fesm2022/core.mjs.map +1 -1
  47. package/fesm2022/datepicker-testing.mjs.map +1 -1
  48. package/fesm2022/datepicker.mjs +71 -72
  49. package/fesm2022/datepicker.mjs.map +1 -1
  50. package/fesm2022/dialog-testing.mjs.map +1 -1
  51. package/fesm2022/dialog.mjs.map +1 -1
  52. package/fesm2022/divider-testing.mjs.map +1 -1
  53. package/fesm2022/divider.mjs.map +1 -1
  54. package/fesm2022/expansion-testing.mjs.map +1 -1
  55. package/fesm2022/expansion.mjs.map +1 -1
  56. package/fesm2022/form-field-testing-control.mjs.map +1 -1
  57. package/fesm2022/form-field-testing.mjs.map +1 -1
  58. package/fesm2022/form-field.mjs.map +1 -1
  59. package/fesm2022/grid-list-testing.mjs.map +1 -1
  60. package/fesm2022/grid-list.mjs.map +1 -1
  61. package/fesm2022/icon-testing.mjs.map +1 -1
  62. package/fesm2022/icon.mjs.map +1 -1
  63. package/fesm2022/input-testing.mjs.map +1 -1
  64. package/fesm2022/input.mjs.map +1 -1
  65. package/fesm2022/list-testing.mjs.map +1 -1
  66. package/fesm2022/list.mjs +2 -2
  67. package/fesm2022/list.mjs.map +1 -1
  68. package/fesm2022/material.mjs.map +1 -1
  69. package/fesm2022/menu-testing.mjs.map +1 -1
  70. package/fesm2022/menu.mjs +2 -2
  71. package/fesm2022/menu.mjs.map +1 -1
  72. package/fesm2022/paginator-testing.mjs.map +1 -1
  73. package/fesm2022/paginator.mjs.map +1 -1
  74. package/fesm2022/progress-bar-testing.mjs.map +1 -1
  75. package/fesm2022/progress-bar.mjs.map +1 -1
  76. package/fesm2022/progress-spinner-testing.mjs.map +1 -1
  77. package/fesm2022/progress-spinner.mjs.map +1 -1
  78. package/fesm2022/radio-testing.mjs.map +1 -1
  79. package/fesm2022/radio.mjs.map +1 -1
  80. package/fesm2022/select-testing.mjs.map +1 -1
  81. package/fesm2022/select.mjs.map +1 -1
  82. package/fesm2022/sidenav-testing.mjs.map +1 -1
  83. package/fesm2022/sidenav.mjs.map +1 -1
  84. package/fesm2022/slide-toggle-testing.mjs.map +1 -1
  85. package/fesm2022/slide-toggle.mjs.map +1 -1
  86. package/fesm2022/slider-testing.mjs.map +1 -1
  87. package/fesm2022/slider.mjs.map +1 -1
  88. package/fesm2022/snack-bar-testing.mjs.map +1 -1
  89. package/fesm2022/snack-bar.mjs +2 -2
  90. package/fesm2022/snack-bar.mjs.map +1 -1
  91. package/fesm2022/sort-testing.mjs.map +1 -1
  92. package/fesm2022/sort.mjs +2 -2
  93. package/fesm2022/sort.mjs.map +1 -1
  94. package/fesm2022/stepper-testing.mjs.map +1 -1
  95. package/fesm2022/stepper.mjs.map +1 -1
  96. package/fesm2022/table-testing.mjs +33 -1
  97. package/fesm2022/table-testing.mjs.map +1 -1
  98. package/fesm2022/table.mjs.map +1 -1
  99. package/fesm2022/tabs-testing.mjs.map +1 -1
  100. package/fesm2022/tabs.mjs.map +1 -1
  101. package/fesm2022/timepicker-testing.mjs.map +1 -1
  102. package/fesm2022/timepicker.mjs +17 -11
  103. package/fesm2022/timepicker.mjs.map +1 -1
  104. package/fesm2022/toolbar-testing.mjs.map +1 -1
  105. package/fesm2022/toolbar.mjs.map +1 -1
  106. package/fesm2022/tooltip-testing.mjs.map +1 -1
  107. package/fesm2022/tooltip.mjs.map +1 -1
  108. package/fesm2022/tree-testing.mjs.map +1 -1
  109. package/fesm2022/tree.mjs.map +1 -1
  110. package/package.json +3 -2
  111. package/schematics/ng-add/index.js +1 -1
  112. package/types/bottom-sheet.d.ts +6 -1
  113. package/types/datepicker.d.ts +34 -34
  114. package/types/sort.d.ts +1 -1
  115. package/types/table-testing.d.ts +27 -1
  116. package/types/timepicker.d.ts +147 -126
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnDestroy, Signal, ModelSignal, InputSignal, InputSignalWithTransform, ElementRef, InjectionToken, TemplateRef, OutputEmitterRef } from '@angular/core';
2
+ import { InjectionToken, Signal, ElementRef, OnDestroy, TemplateRef, InputSignalWithTransform, InputSignal, OutputEmitterRef, ModelSignal } from '@angular/core';
3
3
  import { MatOption } from './_option-chunk.js';
4
4
  import { MatOptionParentComponent } from './_option-parent-chunk.js';
5
5
  import { ScrollStrategy } from '@angular/cdk/overlay';
@@ -8,129 +8,6 @@ import * as i1 from '@angular/cdk/scrolling';
8
8
  import '@angular/cdk/a11y';
9
9
  import 'rxjs';
10
10
 
11
- /**
12
- * Input that can be used to enter time and connect to a `mat-timepicker`.
13
- */
14
- declare class MatTimepickerInput<D> implements ControlValueAccessor, Validator, OnDestroy {
15
- private _elementRef;
16
- private _dateAdapter;
17
- private _dateFormats;
18
- private _formField;
19
- private _onChange;
20
- private _onTouched;
21
- private _validatorOnChange;
22
- private _cleanupClick;
23
- private _accessorDisabled;
24
- private _localeSubscription;
25
- private _timepickerSubscription;
26
- private _validator;
27
- private _lastValueValid;
28
- private _lastValidDate;
29
- /** Value of the `aria-activedescendant` attribute. */
30
- protected readonly _ariaActiveDescendant: Signal<string | null>;
31
- /** Value of the `aria-expanded` attribute. */
32
- protected readonly _ariaExpanded: Signal<string>;
33
- /** Value of the `aria-controls` attribute. */
34
- protected readonly _ariaControls: Signal<string | null>;
35
- /** Current value of the input. */
36
- readonly value: ModelSignal<D | null>;
37
- /** Timepicker that the input is associated with. */
38
- readonly timepicker: InputSignal<MatTimepicker<D>>;
39
- /**
40
- * Minimum time that can be selected or typed in. Can be either
41
- * a date object (only time will be used) or a valid time string.
42
- */
43
- readonly min: InputSignalWithTransform<D | null, unknown>;
44
- /**
45
- * Maximum time that can be selected or typed in. Can be either
46
- * a date object (only time will be used) or a valid time string.
47
- */
48
- readonly max: InputSignalWithTransform<D | null, unknown>;
49
- /**
50
- * Whether to open the timepicker overlay when clicking on the input. Enabled by default.
51
- * Note that when disabling this option, you'll have to provide your own logic for opening
52
- * the overlay.
53
- */
54
- readonly openOnClick: InputSignalWithTransform<boolean, unknown>;
55
- /** Whether the input is disabled. */
56
- readonly disabled: Signal<boolean>;
57
- /**
58
- * Whether the input should be disabled through the template.
59
- * @docs-private
60
- */
61
- readonly disabledInput: InputSignalWithTransform<boolean, unknown>;
62
- constructor();
63
- /**
64
- * Implemented as a part of `ControlValueAccessor`.
65
- * @docs-private
66
- */
67
- writeValue(value: any): void;
68
- /**
69
- * Implemented as a part of `ControlValueAccessor`.
70
- * @docs-private
71
- */
72
- registerOnChange(fn: (value: any) => void): void;
73
- /**
74
- * Implemented as a part of `ControlValueAccessor`.
75
- * @docs-private
76
- */
77
- registerOnTouched(fn: () => void): void;
78
- /**
79
- * Implemented as a part of `ControlValueAccessor`.
80
- * @docs-private
81
- */
82
- setDisabledState(isDisabled: boolean): void;
83
- /**
84
- * Implemented as a part of `Validator`.
85
- * @docs-private
86
- */
87
- validate(control: AbstractControl): ValidationErrors | null;
88
- /**
89
- * Implemented as a part of `Validator`.
90
- * @docs-private
91
- */
92
- registerOnValidatorChange(fn: () => void): void;
93
- /** Gets the element to which the timepicker popup should be attached. */
94
- getOverlayOrigin(): ElementRef<HTMLElement>;
95
- /** Focuses the input. */
96
- focus(): void;
97
- ngOnDestroy(): void;
98
- /** Gets the ID of the input's label. */
99
- _getLabelId(): string | null;
100
- /** Handles clicks on the input or the containing form field. */
101
- private _handleClick;
102
- /** Handles the `input` event. */
103
- protected _handleInput(event: Event): void;
104
- /** Handles the `blur` event. */
105
- protected _handleBlur(): void;
106
- /** Handles the `keydown` event. */
107
- protected _handleKeydown(event: KeyboardEvent): void;
108
- /** Sets up the code that watches for changes in the value and adjusts the input. */
109
- private _respondToValueChanges;
110
- /** Sets up the logic that registers the input with the timepicker. */
111
- private _registerTimepicker;
112
- /** Sets up the logic that adjusts the input if the min/max changes. */
113
- private _respondToMinMaxChanges;
114
- /**
115
- * Assigns a value set by the user to the input's model.
116
- * @param selection Time selected by the user that should be assigned.
117
- * @param propagateToAccessor Whether the value should be propagated to the ControlValueAccessor.
118
- */
119
- private _assignUserSelection;
120
- /** Formats the current value and assigns it to the input. */
121
- private _formatValue;
122
- /** Checks whether a value is valid. */
123
- private _isValid;
124
- /** Transforms an arbitrary value into a value that can be assigned to a date-based input. */
125
- private _transformDateInput;
126
- /** Whether the input is currently focused. */
127
- private _hasFocus;
128
- /** Gets a function that can be used to validate the input. */
129
- private _getValidator;
130
- static ɵfac: i0.ɵɵFactoryDeclaration<MatTimepickerInput<any>, never>;
131
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatTimepickerInput<any>, "input[matTimepicker]", ["matTimepickerInput"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "timepicker": { "alias": "matTimepicker"; "required": true; "isSignal": true; }; "min": { "alias": "matTimepickerMin"; "required": false; "isSignal": true; }; "max": { "alias": "matTimepickerMax"; "required": false; "isSignal": true; }; "openOnClick": { "alias": "matTimepickerOpenOnClick"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
132
- }
133
-
134
11
  /**
135
12
  * Object that can be used to configure the default options for the timepicker component.
136
13
  */
@@ -161,6 +38,25 @@ interface MatTimepickerSelected<D> {
161
38
  }
162
39
  /** Injection token used to configure the behavior of the timepicker dropdown while scrolling. */
163
40
  declare const MAT_TIMEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
41
+ /** Represents an input that is connected to a `mat-timepicker`. */
42
+ interface MatTimepickerConnectedInput<D> {
43
+ /** Current value of the input. */
44
+ value: Signal<D | null>;
45
+ /** Minimum allowed time. */
46
+ min: Signal<D | null>;
47
+ /** Maximum allowed time. */
48
+ max: Signal<D | null>;
49
+ /** Whether the input is disabled. */
50
+ disabled: Signal<boolean>;
51
+ /** Focuses the input. */
52
+ focus(): void;
53
+ /** Gets the element to which to connect the timepicker overlay. */
54
+ getOverlayOrigin(): ElementRef<HTMLElement>;
55
+ /** Gets the ID of the input's label. */
56
+ getLabelId(): string | null;
57
+ /** Callback invoked when the timepicker assigns a value. */
58
+ timepickerValueAssigned(value: D | null): void;
59
+ }
164
60
  /**
165
61
  * Renders out a listbox that can be used to select a time of day.
166
62
  * Intended to be used together with `MatTimepickerInput`.
@@ -223,7 +119,7 @@ declare class MatTimepicker<D> implements OnDestroy, MatOptionParentComponent {
223
119
  /** Closes the timepicker. */
224
120
  close(): void;
225
121
  /** Registers an input with the timepicker. */
226
- registerInput(input: MatTimepickerInput<D>): void;
122
+ registerInput(input: MatTimepickerConnectedInput<D>): void;
227
123
  ngOnDestroy(): void;
228
124
  /** Selects a specific time value. */
229
125
  protected _selectValue(option: MatOption<D>): void;
@@ -254,6 +150,131 @@ declare class MatTimepicker<D> implements OnDestroy, MatOptionParentComponent {
254
150
  static ɵcmp: i0.ɵɵComponentDeclaration<MatTimepicker<any>, "mat-timepicker", ["matTimepicker"], { "interval": { "alias": "interval"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "disableRipple": { "alias": "disableRipple"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
255
151
  }
256
152
 
153
+ /**
154
+ * Input that can be used to enter time and connect to a `mat-timepicker`.
155
+ */
156
+ declare class MatTimepickerInput<D> implements MatTimepickerConnectedInput<D>, ControlValueAccessor, Validator, OnDestroy {
157
+ private _elementRef;
158
+ private _dateAdapter;
159
+ private _dateFormats;
160
+ private _formField;
161
+ private _onChange;
162
+ private _onTouched;
163
+ private _validatorOnChange;
164
+ private _cleanupClick;
165
+ private _accessorDisabled;
166
+ private _localeSubscription;
167
+ private _timepickerSubscription;
168
+ private _validator;
169
+ private _lastValueValid;
170
+ private _lastValidDate;
171
+ /** Value of the `aria-activedescendant` attribute. */
172
+ protected readonly _ariaActiveDescendant: Signal<string | null>;
173
+ /** Value of the `aria-expanded` attribute. */
174
+ protected readonly _ariaExpanded: Signal<string>;
175
+ /** Value of the `aria-controls` attribute. */
176
+ protected readonly _ariaControls: Signal<string | null>;
177
+ /** Current value of the input. */
178
+ readonly value: ModelSignal<D | null>;
179
+ /** Timepicker that the input is associated with. */
180
+ readonly timepicker: InputSignal<MatTimepicker<D>>;
181
+ /**
182
+ * Minimum time that can be selected or typed in. Can be either
183
+ * a date object (only time will be used) or a valid time string.
184
+ */
185
+ readonly min: InputSignalWithTransform<D | null, unknown>;
186
+ /**
187
+ * Maximum time that can be selected or typed in. Can be either
188
+ * a date object (only time will be used) or a valid time string.
189
+ */
190
+ readonly max: InputSignalWithTransform<D | null, unknown>;
191
+ /**
192
+ * Whether to open the timepicker overlay when clicking on the input. Enabled by default.
193
+ * Note that when disabling this option, you'll have to provide your own logic for opening
194
+ * the overlay.
195
+ */
196
+ readonly openOnClick: InputSignalWithTransform<boolean, unknown>;
197
+ /** Whether the input is disabled. */
198
+ readonly disabled: Signal<boolean>;
199
+ /**
200
+ * Whether the input should be disabled through the template.
201
+ * @docs-private
202
+ */
203
+ readonly disabledInput: InputSignalWithTransform<boolean, unknown>;
204
+ constructor();
205
+ /**
206
+ * Implemented as a part of `ControlValueAccessor`.
207
+ * @docs-private
208
+ */
209
+ writeValue(value: any): void;
210
+ /**
211
+ * Implemented as a part of `ControlValueAccessor`.
212
+ * @docs-private
213
+ */
214
+ registerOnChange(fn: (value: any) => void): void;
215
+ /**
216
+ * Implemented as a part of `ControlValueAccessor`.
217
+ * @docs-private
218
+ */
219
+ registerOnTouched(fn: () => void): void;
220
+ /**
221
+ * Implemented as a part of `ControlValueAccessor`.
222
+ * @docs-private
223
+ */
224
+ setDisabledState(isDisabled: boolean): void;
225
+ /**
226
+ * Implemented as a part of `Validator`.
227
+ * @docs-private
228
+ */
229
+ validate(control: AbstractControl): ValidationErrors | null;
230
+ /**
231
+ * Implemented as a part of `Validator`.
232
+ * @docs-private
233
+ */
234
+ registerOnValidatorChange(fn: () => void): void;
235
+ /** Gets the element to which the timepicker popup should be attached. */
236
+ getOverlayOrigin(): ElementRef<HTMLElement>;
237
+ /** Focuses the input. */
238
+ focus(): void;
239
+ ngOnDestroy(): void;
240
+ /** Gets the ID of the input's label. */
241
+ getLabelId(): string | null;
242
+ /** Handles clicks on the input or the containing form field. */
243
+ private _handleClick;
244
+ /** Handles the `input` event. */
245
+ protected _handleInput(event: Event): void;
246
+ /** Handles the `blur` event. */
247
+ protected _handleBlur(): void;
248
+ /** Handles the `keydown` event. */
249
+ protected _handleKeydown(event: KeyboardEvent): void;
250
+ /** Called by the timepicker to sync up the user-selected value. */
251
+ timepickerValueAssigned(value: D | null): void;
252
+ /** Sets up the code that watches for changes in the value and adjusts the input. */
253
+ private _respondToValueChanges;
254
+ /** Sets up the logic that registers the input with the timepicker. */
255
+ private _registerTimepicker;
256
+ /** Sets up the logic that adjusts the input if the min/max changes. */
257
+ private _respondToMinMaxChanges;
258
+ /**
259
+ * Assigns a value set by the user to the input's model.
260
+ * @param selection Time selected by the user that should be assigned.
261
+ * @param propagateToAccessor Whether the value should be propagated to the ControlValueAccessor.
262
+ */
263
+ private _assignUserSelection;
264
+ /** Formats the current value and assigns it to the input. */
265
+ private _formatValue;
266
+ /** Checks whether a value is valid. */
267
+ private _isValid;
268
+ /** Transforms an arbitrary value into a value that can be assigned to a date-based input. */
269
+ private _transformDateInput;
270
+ /** Whether the input is currently focused. */
271
+ private _hasFocus;
272
+ /** Gets a function that can be used to validate the input. */
273
+ private _getValidator;
274
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatTimepickerInput<any>, never>;
275
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatTimepickerInput<any>, "input[matTimepicker]", ["matTimepickerInput"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "timepicker": { "alias": "matTimepicker"; "required": true; "isSignal": true; }; "min": { "alias": "matTimepickerMin"; "required": false; "isSignal": true; }; "max": { "alias": "matTimepickerMax"; "required": false; "isSignal": true; }; "openOnClick": { "alias": "matTimepickerOpenOnClick"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
276
+ }
277
+
257
278
  /** Button that can be used to open a `mat-timepicker`. */
258
279
  declare class MatTimepickerToggle<D> {
259
280
  private _defaultConfig;
@@ -291,4 +312,4 @@ declare class MatTimepickerModule {
291
312
  }
292
313
 
293
314
  export { MAT_TIMEPICKER_CONFIG, MAT_TIMEPICKER_SCROLL_STRATEGY, MatTimepicker, MatTimepickerInput, MatTimepickerModule, MatTimepickerToggle };
294
- export type { MatTimepickerConfig, MatTimepickerOption, MatTimepickerSelected };
315
+ export type { MatTimepickerConfig, MatTimepickerConnectedInput, MatTimepickerOption, MatTimepickerSelected };