@ngx-mce/datetime-picker 22.2.9-next.1 → 22.2.10-next.1

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.
@@ -1,190 +1,273 @@
1
- import * as _angular_core from '@angular/core';
2
- import { OnDestroy, AfterViewChecked, AfterContentInit, OnChanges, ChangeDetectorRef, SimpleChanges, AfterViewInit, ElementRef, InjectionToken, OnInit, DoCheck, Injector, EventEmitter, FactoryProvider, TemplateRef, InputSignal, Provider } from '@angular/core';
3
- import { ComponentType, Portal, TemplatePortal } from '@angular/cdk/portal';
4
- import { Observable, Subject } from 'rxjs';
5
- import * as _angular_material_core from '@angular/material/core';
6
- import { DateAdapter, ErrorStateMatcher, ThemePalette } from '@angular/material/core';
7
- import { FocusOrigin } from '@angular/cdk/a11y';
8
- import { BooleanInput } from '@angular/cdk/coercion';
9
- import * as _angular_forms from '@angular/forms';
10
- import { ControlValueAccessor, Validator, ValidatorFn, AbstractControl, ValidationErrors, NgControl, NgForm, FormGroupDirective, ControlContainer, FormControl } from '@angular/forms';
11
- import { MatFormFieldControl } from '@angular/material/form-field';
12
- import { Directionality } from '@angular/cdk/bidi';
13
- import { ScrollStrategy, Overlay } from '@angular/cdk/overlay';
14
- import { MatButton } from '@angular/material/button';
15
- import { MatCalendarView, MatCalendar } from '@angular/material/datepicker';
16
- import { MatDialogRef } from '@angular/material/dialog';
17
-
1
+ import { ComponentType, Portal, TemplatePortal } from "@angular/cdk/portal";
2
+ import * as i0 from "@angular/core";
3
+ import { AfterContentInit, AfterViewChecked, AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, FactoryProvider, InjectionToken, Injector, InputSignal, OnChanges, OnDestroy, OnInit, Provider, SimpleChanges, TemplateRef } from "@angular/core";
4
+ import { Observable, Subject } from "rxjs";
5
+ import { DateAdapter, ErrorStateMatcher, ThemePalette } from "@angular/material/core";
6
+ import { FocusOrigin } from "@angular/cdk/a11y";
7
+ import { BooleanInput } from "@angular/cdk/coercion";
8
+ import { AbstractControl, ControlContainer, ControlValueAccessor, FormControl, FormGroupDirective, NgControl, NgForm, ValidationErrors, Validator, ValidatorFn } from "@angular/forms";
9
+ import { MatFormFieldControl } from "@angular/material/form-field";
10
+ import { Directionality } from "@angular/cdk/bidi";
11
+ import { Overlay, ScrollStrategy } from "@angular/cdk/overlay";
12
+ import { MatButton } from "@angular/material/button";
13
+ import { MatCalendar, MatCalendarView } from "@angular/material/datepicker";
14
+ import { MatDialogRef } from "@angular/material/dialog";
18
15
  /** Extra CSS classes that can be associated with a calendar cell. */
19
- type NgxMatCalendarCellCssClasses = string | string[] | Set<string> | Record<string, any>;
16
+ export type NgxMatCalendarCellCssClasses = string | string[] | Set<string> | Record<string, any>;
20
17
  /** Function that can generate the extra classes that should be added to a calendar cell. */
21
- type NgxMatCalendarCellClassFunction<D> = (date: D, view: 'month' | 'year' | 'multi-year') => NgxMatCalendarCellCssClasses;
18
+ export type NgxMatCalendarCellClassFunction<D> = (date: D, view: 'month' | 'year' | 'multi-year') => NgxMatCalendarCellCssClasses;
22
19
  /**
23
20
  * An internal class that represents the data corresponding to a single calendar cell.
24
21
  * @docs-private
25
22
  */
26
- declare class NgxMatCalendarCell<D = any> {
27
- value: number;
28
- displayValue: string;
29
- ariaLabel: string;
30
- enabled: boolean;
31
- cssClasses: NgxMatCalendarCellCssClasses;
32
- compareValue: number;
33
- rawValue?: D | undefined;
34
- constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, cssClasses?: NgxMatCalendarCellCssClasses, compareValue?: number, rawValue?: D | undefined);
23
+ export declare class NgxMatCalendarCell<D = any> {
24
+ value: number;
25
+ displayValue: string;
26
+ ariaLabel: string;
27
+ enabled: boolean;
28
+ cssClasses: NgxMatCalendarCellCssClasses;
29
+ compareValue: number;
30
+ rawValue?: D | undefined;
31
+ constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, cssClasses?: NgxMatCalendarCellCssClasses, compareValue?: number, rawValue?: D | undefined);
35
32
  }
36
33
  /** Event emitted when a date inside the calendar is triggered as a result of a user action. */
37
- interface NgxMatCalendarUserEvent<D> {
38
- value: D;
39
- event: Event | null;
34
+ export interface NgxMatCalendarUserEvent<D> {
35
+ value: D;
36
+ event: Event | null;
40
37
  }
41
- declare class NgxMatCalendarBody<D = any> implements OnDestroy, AfterViewChecked {
42
- private _platform;
43
- /**
44
- * Used to skip the next focus event when rendering the preview range.
45
- * We need a flag like this, because some browsers fire focus events asynchronously.
46
- */
47
- private _skipNextFocus;
48
- /**
49
- * Used to focus the active cell after change detection has run.
50
- */
51
- private _focusActiveCellAfterViewChecked;
52
- /** The label for the table. (e.g. "Jan 2017"). */
53
- label: _angular_core.InputSignal<string | undefined>;
54
- /** The cells to display in the table. */
55
- rows: _angular_core.InputSignal<NgxMatCalendarCell<any>[][] | null | undefined>;
56
- /** The value in the table that corresponds to today. */
57
- todayValue: _angular_core.InputSignal<number | undefined>;
58
- /** Start value of the selected date range. */
59
- startValue: _angular_core.InputSignal<number | undefined>;
60
- /** End value of the selected date range. */
61
- endValue: _angular_core.InputSignal<number | undefined>;
62
- /** The minimum number of free cells needed to fit the label in the first row. */
63
- labelMinRequiredCells: _angular_core.InputSignal<number | undefined>;
64
- /** The number of columns in the table. */
65
- numCols: _angular_core.InputSignal<number>;
66
- /** The cell number of the active cell in the table. */
67
- activeCell: _angular_core.InputSignal<number>;
68
- ngAfterViewChecked(): void;
69
- /** Whether a range is being selected. */
70
- isRange: _angular_core.InputSignal<boolean>;
71
- /**
72
- * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be
73
- * maintained even as the table resizes.
74
- */
75
- cellAspectRatio: _angular_core.InputSignal<number>;
76
- /** Start of the comparison range. */
77
- comparisonStart: _angular_core.InputSignal<number | null | undefined>;
78
- /** End of the comparison range. */
79
- comparisonEnd: _angular_core.InputSignal<number | null | undefined>;
80
- /** Start of the preview range. */
81
- previewStart: _angular_core.InputSignal<number | null>;
82
- /** End of the preview range. */
83
- previewEnd: _angular_core.InputSignal<number | null>;
84
- /** ARIA Accessible name of the `<input matStartDate/>` */
85
- startDateAccessibleName: _angular_core.InputSignal<string | null | undefined>;
86
- /** ARIA Accessible name of the `<input matEndDate/>` */
87
- endDateAccessibleName: _angular_core.InputSignal<string | null | undefined>;
88
- /** Emits when a new value is selected. */
89
- readonly selectedValueChange: _angular_core.OutputEmitterRef<NgxMatCalendarUserEvent<number>>;
90
- /** Emits when the preview has changed as a result of a user action. */
91
- readonly previewChange: _angular_core.OutputEmitterRef<NgxMatCalendarUserEvent<NgxMatCalendarCell<any> | null>>;
92
- readonly activeDateChange: _angular_core.OutputEmitterRef<NgxMatCalendarUserEvent<number>>;
93
- /** Emits the date at the possible start of a drag event. */
94
- readonly dragStarted: _angular_core.OutputEmitterRef<NgxMatCalendarUserEvent<D>>;
95
- /** Emits the date at the conclusion of a drag, or null if mouse was not released on a date. */
96
- readonly dragEnded: _angular_core.OutputEmitterRef<NgxMatCalendarUserEvent<D | null>>;
97
- /** The number of blank cells to put at the beginning for the first row. */
98
- _firstRowOffset: _angular_core.Signal<number>;
99
- /** Padding for the individual date cells. */
100
- _cellPadding: _angular_core.Signal<string>;
101
- /** Width of an individual cell. */
102
- _cellWidth: _angular_core.Signal<string>;
103
- private _didDragSinceMouseDown;
104
- private _elementRef;
105
- private _ngZone;
106
- constructor();
107
- /** Called when a cell is clicked. */
108
- _cellClicked(cell: NgxMatCalendarCell, event: MouseEvent): void;
109
- _emitActiveDateChange(cell: NgxMatCalendarCell, event: FocusEvent): void;
110
- /** Returns whether a cell should be marked as selected. */
111
- _isSelected(value: number): boolean;
112
- ngOnDestroy(): void;
113
- /** Returns whether a cell is active. */
114
- _isActiveCell(rowIndex: number, colIndex: number): boolean;
115
- _focusActiveCell(movePreview?: boolean): void;
116
- /** Focuses the active cell after change detection has run and the microtask queue is empty. */
117
- _scheduleFocusActiveCellAfterViewChecked(): void;
118
- /** Gets whether a value is the start of the main range. */
119
- _isRangeStart(value: number): boolean;
120
- /** Gets whether a value is the end of the main range. */
121
- _isRangeEnd(value: number): boolean;
122
- /** Gets whether a value is within the currently-selected range. */
123
- _isInRange(value: number): boolean;
124
- /** Gets whether a value is the start of the comparison range. */
125
- _isComparisonStart(value: number): boolean;
126
- /** Whether the cell is a start bridge cell between the main and comparison ranges. */
127
- _isComparisonBridgeStart(value: number, rowIndex: number, colIndex: number): boolean;
128
- /** Whether the cell is an end bridge cell between the main and comparison ranges. */
129
- _isComparisonBridgeEnd(value: number, rowIndex: number, colIndex: number): boolean;
130
- /** Gets whether a value is the end of the comparison range. */
131
- _isComparisonEnd(value: number): boolean;
132
- /** Gets whether a value is within the current comparison range. */
133
- _isInComparisonRange(value: number): boolean;
134
- _isComparisonIdentical(value: number): boolean;
135
- /** Gets whether a value is the start of the preview range. */
136
- _isPreviewStart(value: number): boolean;
137
- /** Gets whether a value is the end of the preview range. */
138
- _isPreviewEnd(value: number): boolean;
139
- /** Gets whether a value is inside the preview range. */
140
- _isInPreview(value: number): boolean;
141
- /** Gets ids of aria descriptions for the start and end of a date range. */
142
- _getDescribedby(value: number): string | null;
143
- /**
144
- * Event handler for when the user enters an element
145
- * inside the calendar body (e.g. by hovering in or focus).
146
- */
147
- private _enterHandler;
148
- private _touchmoveHandler;
149
- /**
150
- * Event handler for when the user's pointer leaves an element
151
- * inside the calendar body (e.g. by hovering out or blurring).
152
- */
153
- private _leaveHandler;
154
- /**
155
- * Triggered on mousedown or touchstart on a date cell.
156
- * Respsonsible for starting a drag sequence.
157
- */
158
- private _mousedownHandler;
159
- /** Triggered on mouseup anywhere. Respsonsible for ending a drag sequence. */
160
- private _mouseupHandler;
161
- /** Triggered on touchend anywhere. Respsonsible for ending a drag sequence. */
162
- private _touchendHandler;
163
- /** Finds the MatCalendarCell that corresponds to a DOM node. */
164
- private _getCellFromElement;
165
- private _id;
166
- _startDateLabelId: string;
167
- _endDateLabelId: string;
168
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatCalendarBody<any>, never>;
169
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatCalendarBody<any>, "[ngx-mat-calendar-body]", ["matCalendarBody"], { "label": { "alias": "label"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "todayValue": { "alias": "todayValue"; "required": false; "isSignal": true; }; "startValue": { "alias": "startValue"; "required": false; "isSignal": true; }; "endValue": { "alias": "endValue"; "required": false; "isSignal": true; }; "labelMinRequiredCells": { "alias": "labelMinRequiredCells"; "required": false; "isSignal": true; }; "numCols": { "alias": "numCols"; "required": false; "isSignal": true; }; "activeCell": { "alias": "activeCell"; "required": false; "isSignal": true; }; "isRange": { "alias": "isRange"; "required": false; "isSignal": true; }; "cellAspectRatio": { "alias": "cellAspectRatio"; "required": false; "isSignal": true; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; "isSignal": true; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; "isSignal": true; }; "previewStart": { "alias": "previewStart"; "required": false; "isSignal": true; }; "previewEnd": { "alias": "previewEnd"; "required": false; "isSignal": true; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; "isSignal": true; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; "isSignal": true; }; }, { "selectedValueChange": "selectedValueChange"; "previewChange": "previewChange"; "activeDateChange": "activeDateChange"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; }, never, never, true, never>;
38
+ export declare class NgxMatCalendarBody<D = any> implements OnDestroy, AfterViewChecked {
39
+ private _platform;
40
+ /**
41
+ * Used to skip the next focus event when rendering the preview range.
42
+ * We need a flag like this, because some browsers fire focus events asynchronously.
43
+ */
44
+ private _skipNextFocus;
45
+ /**
46
+ * Used to focus the active cell after change detection has run.
47
+ */
48
+ private _focusActiveCellAfterViewChecked;
49
+ /** The label for the table. (e.g. "Jan 2017"). */
50
+ label: import("@angular/core").InputSignal<string | undefined>;
51
+ /** The cells to display in the table. */
52
+ rows: import("@angular/core").InputSignal<NgxMatCalendarCell<any>[][] | null | undefined>;
53
+ /** The value in the table that corresponds to today. */
54
+ todayValue: import("@angular/core").InputSignal<number | undefined>;
55
+ /** Start value of the selected date range. */
56
+ startValue: import("@angular/core").InputSignal<number | undefined>;
57
+ /** End value of the selected date range. */
58
+ endValue: import("@angular/core").InputSignal<number | undefined>;
59
+ /** The minimum number of free cells needed to fit the label in the first row. */
60
+ labelMinRequiredCells: import("@angular/core").InputSignal<number | undefined>;
61
+ /** The number of columns in the table. */
62
+ numCols: import("@angular/core").InputSignal<number>;
63
+ /** The cell number of the active cell in the table. */
64
+ activeCell: import("@angular/core").InputSignal<number>;
65
+ ngAfterViewChecked(): void;
66
+ /** Whether a range is being selected. */
67
+ isRange: import("@angular/core").InputSignal<boolean>;
68
+ /**
69
+ * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be
70
+ * maintained even as the table resizes.
71
+ */
72
+ cellAspectRatio: import("@angular/core").InputSignal<number>;
73
+ /** Start of the comparison range. */
74
+ comparisonStart: import("@angular/core").InputSignal<number | null | undefined>;
75
+ /** End of the comparison range. */
76
+ comparisonEnd: import("@angular/core").InputSignal<number | null | undefined>;
77
+ /** Start of the preview range. */
78
+ previewStart: import("@angular/core").InputSignal<number | null>;
79
+ /** End of the preview range. */
80
+ previewEnd: import("@angular/core").InputSignal<number | null>;
81
+ /** ARIA Accessible name of the `<input matStartDate/>` */
82
+ startDateAccessibleName: import("@angular/core").InputSignal<string | null | undefined>;
83
+ /** ARIA Accessible name of the `<input matEndDate/>` */
84
+ endDateAccessibleName: import("@angular/core").InputSignal<string | null | undefined>;
85
+ /** Emits when a new value is selected. */
86
+ readonly selectedValueChange: import("@angular/core").OutputEmitterRef<NgxMatCalendarUserEvent<number>>;
87
+ /** Emits when the preview has changed as a result of a user action. */
88
+ readonly previewChange: import("@angular/core").OutputEmitterRef<NgxMatCalendarUserEvent<NgxMatCalendarCell<any> | null>>;
89
+ readonly activeDateChange: import("@angular/core").OutputEmitterRef<NgxMatCalendarUserEvent<number>>;
90
+ /** Emits the date at the possible start of a drag event. */
91
+ readonly dragStarted: import("@angular/core").OutputEmitterRef<NgxMatCalendarUserEvent<D>>;
92
+ /** Emits the date at the conclusion of a drag, or null if mouse was not released on a date. */
93
+ readonly dragEnded: import("@angular/core").OutputEmitterRef<NgxMatCalendarUserEvent<D | null>>;
94
+ /** The number of blank cells to put at the beginning for the first row. */
95
+ _firstRowOffset: import("@angular/core").Signal<number>;
96
+ /** Padding for the individual date cells. */
97
+ _cellPadding: import("@angular/core").Signal<string>;
98
+ /** Width of an individual cell. */
99
+ _cellWidth: import("@angular/core").Signal<string>;
100
+ private _didDragSinceMouseDown;
101
+ private _elementRef;
102
+ private _ngZone;
103
+ constructor();
104
+ /** Called when a cell is clicked. */
105
+ _cellClicked(cell: NgxMatCalendarCell, event: MouseEvent): void;
106
+ _emitActiveDateChange(cell: NgxMatCalendarCell, event: FocusEvent): void;
107
+ /** Returns whether a cell should be marked as selected. */
108
+ _isSelected(value: number): boolean;
109
+ ngOnDestroy(): void;
110
+ /** Returns whether a cell is active. */
111
+ _isActiveCell(rowIndex: number, colIndex: number): boolean;
112
+ _focusActiveCell(movePreview?: boolean): void;
113
+ /** Focuses the active cell after change detection has run and the microtask queue is empty. */
114
+ _scheduleFocusActiveCellAfterViewChecked(): void;
115
+ /** Gets whether a value is the start of the main range. */
116
+ _isRangeStart(value: number): boolean;
117
+ /** Gets whether a value is the end of the main range. */
118
+ _isRangeEnd(value: number): boolean;
119
+ /** Gets whether a value is within the currently-selected range. */
120
+ _isInRange(value: number): boolean;
121
+ /** Gets whether a value is the start of the comparison range. */
122
+ _isComparisonStart(value: number): boolean;
123
+ /** Whether the cell is a start bridge cell between the main and comparison ranges. */
124
+ _isComparisonBridgeStart(value: number, rowIndex: number, colIndex: number): boolean;
125
+ /** Whether the cell is an end bridge cell between the main and comparison ranges. */
126
+ _isComparisonBridgeEnd(value: number, rowIndex: number, colIndex: number): boolean;
127
+ /** Gets whether a value is the end of the comparison range. */
128
+ _isComparisonEnd(value: number): boolean;
129
+ /** Gets whether a value is within the current comparison range. */
130
+ _isInComparisonRange(value: number): boolean;
131
+ _isComparisonIdentical(value: number): boolean;
132
+ /** Gets whether a value is the start of the preview range. */
133
+ _isPreviewStart(value: number): boolean;
134
+ /** Gets whether a value is the end of the preview range. */
135
+ _isPreviewEnd(value: number): boolean;
136
+ /** Gets whether a value is inside the preview range. */
137
+ _isInPreview(value: number): boolean;
138
+ /** Gets ids of aria descriptions for the start and end of a date range. */
139
+ _getDescribedby(value: number): string | null;
140
+ /**
141
+ * Event handler for when the user enters an element
142
+ * inside the calendar body (e.g. by hovering in or focus).
143
+ */
144
+ private _enterHandler;
145
+ private _touchmoveHandler;
146
+ /**
147
+ * Event handler for when the user's pointer leaves an element
148
+ * inside the calendar body (e.g. by hovering out or blurring).
149
+ */
150
+ private _leaveHandler;
151
+ /**
152
+ * Triggered on mousedown or touchstart on a date cell.
153
+ * Respsonsible for starting a drag sequence.
154
+ */
155
+ private _mousedownHandler;
156
+ /** Triggered on mouseup anywhere. Respsonsible for ending a drag sequence. */
157
+ private _mouseupHandler;
158
+ /** Triggered on touchend anywhere. Respsonsible for ending a drag sequence. */
159
+ private _touchendHandler;
160
+ /** Finds the MatCalendarCell that corresponds to a DOM node. */
161
+ private _getCellFromElement;
162
+ private _id;
163
+ _startDateLabelId: string;
164
+ _endDateLabelId: string;
165
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatCalendarBody<any>, never>;
166
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatCalendarBody<any>, "[ngx-mat-calendar-body]", ["matCalendarBody"], {
167
+ "label": {
168
+ "alias": "label";
169
+ "required": false;
170
+ "isSignal": true;
171
+ };
172
+ "rows": {
173
+ "alias": "rows";
174
+ "required": false;
175
+ "isSignal": true;
176
+ };
177
+ "todayValue": {
178
+ "alias": "todayValue";
179
+ "required": false;
180
+ "isSignal": true;
181
+ };
182
+ "startValue": {
183
+ "alias": "startValue";
184
+ "required": false;
185
+ "isSignal": true;
186
+ };
187
+ "endValue": {
188
+ "alias": "endValue";
189
+ "required": false;
190
+ "isSignal": true;
191
+ };
192
+ "labelMinRequiredCells": {
193
+ "alias": "labelMinRequiredCells";
194
+ "required": false;
195
+ "isSignal": true;
196
+ };
197
+ "numCols": {
198
+ "alias": "numCols";
199
+ "required": false;
200
+ "isSignal": true;
201
+ };
202
+ "activeCell": {
203
+ "alias": "activeCell";
204
+ "required": false;
205
+ "isSignal": true;
206
+ };
207
+ "isRange": {
208
+ "alias": "isRange";
209
+ "required": false;
210
+ "isSignal": true;
211
+ };
212
+ "cellAspectRatio": {
213
+ "alias": "cellAspectRatio";
214
+ "required": false;
215
+ "isSignal": true;
216
+ };
217
+ "comparisonStart": {
218
+ "alias": "comparisonStart";
219
+ "required": false;
220
+ "isSignal": true;
221
+ };
222
+ "comparisonEnd": {
223
+ "alias": "comparisonEnd";
224
+ "required": false;
225
+ "isSignal": true;
226
+ };
227
+ "previewStart": {
228
+ "alias": "previewStart";
229
+ "required": false;
230
+ "isSignal": true;
231
+ };
232
+ "previewEnd": {
233
+ "alias": "previewEnd";
234
+ "required": false;
235
+ "isSignal": true;
236
+ };
237
+ "startDateAccessibleName": {
238
+ "alias": "startDateAccessibleName";
239
+ "required": false;
240
+ "isSignal": true;
241
+ };
242
+ "endDateAccessibleName": {
243
+ "alias": "endDateAccessibleName";
244
+ "required": false;
245
+ "isSignal": true;
246
+ };
247
+ }, {
248
+ "selectedValueChange": "selectedValueChange";
249
+ "previewChange": "previewChange";
250
+ "activeDateChange": "activeDateChange";
251
+ "dragStarted": "dragStarted";
252
+ "dragEnded": "dragEnded";
253
+ }, never, never, true, never>;
170
254
  }
171
-
172
255
  /** A class representing a range of dates. */
173
256
  declare class NgxDateRange<D> {
174
- /** The start date of the range. */
175
- readonly start: D | null;
176
- /** The end date of the range. */
177
- readonly end: D | null;
178
- /**
179
- * Ensures that objects with a `start` and `end` property can't be assigned to a variable that
180
- * expects a `DateRange`
181
- */
182
- private _disableStructuralEquivalency;
183
- constructor(
184
- /** The start date of the range. */
185
- start: D | null,
186
- /** The end date of the range. */
187
- end: D | null);
257
+ /** The start date of the range. */
258
+ readonly start: D | null;
259
+ /** The end date of the range. */
260
+ readonly end: D | null;
261
+ /**
262
+ * Ensures that objects with a `start` and `end` property can't be assigned to a variable that
263
+ * expects a `DateRange`
264
+ */
265
+ private _disableStructuralEquivalency;
266
+ constructor(
267
+ /** The start date of the range. */
268
+ start: D | null,
269
+ /** The end date of the range. */
270
+ end: D | null);
188
271
  }
189
272
  /**
190
273
  * Conditionally picks the date type, if a DateRange is passed in.
@@ -196,845 +279,1133 @@ type NgxExtractDateTypeFromSelection<T> = T extends NgxDateRange<infer D> ? D :
196
279
  * @docs-private
197
280
  */
198
281
  interface NgxDateSelectionModelChange<S> {
199
- /** New value for the selection. */
200
- selection: S | null;
201
- /** Object that triggered the change. */
202
- source: unknown;
203
- /** Previous value */
204
- oldValue?: S | null;
282
+ /** New value for the selection. */
283
+ selection: S | null;
284
+ /** Object that triggered the change. */
285
+ source: unknown;
286
+ /** Previous value */
287
+ oldValue?: S | null;
205
288
  }
206
289
  /**
207
290
  * A selection model containing a date selection.
208
291
  * @docs-private
209
292
  */
210
293
  declare abstract class NgxMatDateSelectionModel<S, D = NgxExtractDateTypeFromSelection<S>> implements OnDestroy {
211
- protected _adapter: DateAdapter<D>;
212
- readonly selection: S;
213
- private readonly _selectionChanged;
214
- /** Emits when the selection has changed. */
215
- selectionChanged: Observable<NgxDateSelectionModelChange<S>>;
216
- /** The current selection. */
217
- protected constructor(_adapter: DateAdapter<D>, selection: S);
218
- /**
219
- * Updates the current selection in the model.
220
- * @param value New selection that should be assigned.
221
- * @param source Object that triggered the selection change.
222
- */
223
- updateSelection(value: S | null, source: unknown): void;
224
- ngOnDestroy(): void;
225
- protected _isValidDateInstance(date: D): boolean;
226
- /** Adds a date to the current selection. */
227
- abstract add(date: D | null): void;
228
- /** Checks whether the current selection is valid. */
229
- abstract isValid(): boolean;
230
- /** Checks whether the current selection is complete. */
231
- abstract isComplete(): boolean;
232
- /** Clones the selection model. */
233
- abstract clone(): NgxMatDateSelectionModel<S, D>;
234
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDateSelectionModel<any, any>, never>;
235
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<any>;
294
+ protected _adapter: DateAdapter<D>;
295
+ readonly selection: S;
296
+ private readonly _selectionChanged;
297
+ /** Emits when the selection has changed. */
298
+ selectionChanged: Observable<NgxDateSelectionModelChange<S>>;
299
+ /** The current selection. */
300
+ protected constructor(_adapter: DateAdapter<D>, selection: S);
301
+ /**
302
+ * Updates the current selection in the model.
303
+ * @param value New selection that should be assigned.
304
+ * @param source Object that triggered the selection change.
305
+ */
306
+ updateSelection(value: S | null, source: unknown): void;
307
+ ngOnDestroy(): void;
308
+ protected _isValidDateInstance(date: D): boolean;
309
+ /** Adds a date to the current selection. */
310
+ abstract add(date: D | null): void;
311
+ /** Checks whether the current selection is valid. */
312
+ abstract isValid(): boolean;
313
+ /** Checks whether the current selection is complete. */
314
+ abstract isComplete(): boolean;
315
+ /** Clones the selection model. */
316
+ abstract clone(): NgxMatDateSelectionModel<S, D>;
317
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDateSelectionModel<any, any>, never>;
318
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
319
+ }
320
+ /**
321
+ * A selection model that contains a single date.
322
+ * @docs-private
323
+ */
324
+ declare class NgxMatSingleDateSelectionModel<D> extends NgxMatDateSelectionModel<D | null, D> {
325
+ constructor(adapter: DateAdapter<D>);
326
+ /**
327
+ * Adds a date to the current selection. In the case of a single date selection, the added date
328
+ * simply overwrites the previous selection
329
+ */
330
+ add(date: D | null): void;
331
+ /** Checks whether the current selection is valid. */
332
+ isValid(): boolean;
333
+ /**
334
+ * Checks whether the current selection is complete. In the case of a single date selection, this
335
+ * is true if the current selection is not null.
336
+ */
337
+ isComplete(): boolean;
338
+ /** Clones the selection model. */
339
+ clone(): NgxMatSingleDateSelectionModel<D>;
340
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatSingleDateSelectionModel<any>, never>;
341
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
236
342
  }
237
-
343
+ /**
344
+ * A selection model that contains a date range.
345
+ * @docs-private
346
+ */
347
+ declare class NgxMatRangeDateSelectionModel<D> extends NgxMatDateSelectionModel<NgxDateRange<D>, D> {
348
+ constructor(adapter: DateAdapter<D>);
349
+ /**
350
+ * Adds a date to the current selection. In the case of a date range selection, the added date
351
+ * fills in the next `null` value in the range. If both the start and the end already have a date,
352
+ * the selection is reset so that the given date is the new `start` and the `end` is null.
353
+ */
354
+ add(date: D | null): void;
355
+ /** Checks whether the current selection is valid. */
356
+ isValid(): boolean;
357
+ /**
358
+ * Checks whether the current selection is complete. In the case of a date range selection, this
359
+ * is true if the current selection has a non-null `start` and `end`.
360
+ */
361
+ isComplete(): boolean;
362
+ /** Clones the selection model. */
363
+ clone(): NgxMatRangeDateSelectionModel<D>;
364
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatRangeDateSelectionModel<any>, never>;
365
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
366
+ }
367
+ /** @docs-private */
368
+ declare function NGX_MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent: NgxMatSingleDateSelectionModel<unknown> | null, dateAdapter: DateAdapter<unknown>): NgxMatSingleDateSelectionModel<unknown>;
369
+ /**
370
+ * Used to provide a single selection model to a component.
371
+ * @docs-private
372
+ */
373
+ declare const NGX_MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider;
374
+ /** @docs-private */
375
+ declare function NGX_MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(parent: NgxMatSingleDateSelectionModel<unknown>, dateAdapter: DateAdapter<unknown>): NgxMatSingleDateSelectionModel<unknown>;
376
+ /**
377
+ * Used to provide a range selection model to a component.
378
+ * @docs-private
379
+ */
380
+ declare const NGX_MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider;
238
381
  /** Datepicker data that requires internationalization. */
239
382
  declare class NgxMatDatepickerIntl {
240
- /**
241
- * Stream that emits whenever the labels here are changed. Use this to notify
242
- * components if the labels have changed after initialization.
243
- */
244
- readonly changes: Subject<void>;
245
- /** A label for the calendar popup (used by screen readers). */
246
- calendarLabel: string;
247
- /** A label for the button used to open the calendar popup (used by screen readers). */
248
- openCalendarLabel: string;
249
- /** Label for the button used to close the calendar popup. */
250
- closeCalendarLabel: string;
251
- /** A label for the previous month button (used by screen readers). */
252
- prevMonthLabel: string;
253
- /** A label for the next month button (used by screen readers). */
254
- nextMonthLabel: string;
255
- /** A label for the previous year button (used by screen readers). */
256
- prevYearLabel: string;
257
- /** A label for the next year button (used by screen readers). */
258
- nextYearLabel: string;
259
- /** A label for the previous multi-year button (used by screen readers). */
260
- prevMultiYearLabel: string;
261
- /** A label for the next multi-year button (used by screen readers). */
262
- nextMultiYearLabel: string;
263
- /** A label for the 'switch to month view' button (used by screen readers). */
264
- switchToMonthViewLabel: string;
265
- /** A label for the 'switch to year view' button (used by screen readers). */
266
- switchToMultiYearViewLabel: string;
267
- /**
268
- * A label for the first date of a range of dates (used by screen readers).
269
- * @deprecated Provide your own internationalization string.
270
- * @breaking-change 17.0.0
271
- */
272
- startDateLabel: string;
273
- /**
274
- * A label for the last date of a range of dates (used by screen readers).
275
- * @deprecated Provide your own internationalization string.
276
- * @breaking-change 17.0.0
277
- */
278
- endDateLabel: string;
279
- /** Formats a range of years (used for visuals). */
280
- formatYearRange(start: string, end: string): string;
281
- /** Formats a label for a range of years (used by screen readers). */
282
- formatYearRangeLabel(start: string, end: string): string;
283
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerIntl, never>;
284
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<any>;
383
+ /**
384
+ * Stream that emits whenever the labels here are changed. Use this to notify
385
+ * components if the labels have changed after initialization.
386
+ */
387
+ readonly changes: Subject<void>;
388
+ /** A label for the calendar popup (used by screen readers). */
389
+ calendarLabel: string;
390
+ /** A label for the button used to open the calendar popup (used by screen readers). */
391
+ openCalendarLabel: string;
392
+ /** Label for the button used to close the calendar popup. */
393
+ closeCalendarLabel: string;
394
+ /** A label for the previous month button (used by screen readers). */
395
+ prevMonthLabel: string;
396
+ /** A label for the next month button (used by screen readers). */
397
+ nextMonthLabel: string;
398
+ /** A label for the previous year button (used by screen readers). */
399
+ prevYearLabel: string;
400
+ /** A label for the next year button (used by screen readers). */
401
+ nextYearLabel: string;
402
+ /** A label for the previous multi-year button (used by screen readers). */
403
+ prevMultiYearLabel: string;
404
+ /** A label for the next multi-year button (used by screen readers). */
405
+ nextMultiYearLabel: string;
406
+ /** A label for the 'switch to month view' button (used by screen readers). */
407
+ switchToMonthViewLabel: string;
408
+ /** A label for the 'switch to year view' button (used by screen readers). */
409
+ switchToMultiYearViewLabel: string;
410
+ /**
411
+ * A label for the first date of a range of dates (used by screen readers).
412
+ * @deprecated Provide your own internationalization string.
413
+ * @breaking-change 17.0.0
414
+ */
415
+ startDateLabel: string;
416
+ /**
417
+ * A label for the last date of a range of dates (used by screen readers).
418
+ * @deprecated Provide your own internationalization string.
419
+ * @breaking-change 17.0.0
420
+ */
421
+ endDateLabel: string;
422
+ /** Formats a range of years (used for visuals). */
423
+ formatYearRange(start: string, end: string): string;
424
+ /** Formats a label for a range of years (used by screen readers). */
425
+ formatYearRangeLabel(start: string, end: string): string;
426
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerIntl, never>;
427
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
285
428
  }
286
-
287
429
  /**
288
430
  * An internal component used to display a single month in the datepicker.
289
431
  * @docs-private
290
432
  */
291
- declare class NgxMatMonthView<D> implements AfterContentInit, OnChanges, OnDestroy {
292
- private _rerenderSubscription;
293
- /** Flag used to filter out space/enter keyup events that originated outside of the view. */
294
- private _selectionKeyPressed;
295
- /**
296
- * The date to display in this month view (everything other than the month and year is ignored).
297
- */
298
- get activeDate(): D;
299
- set activeDate(value: D);
300
- private _activeDate;
301
- /** The currently selected date. */
302
- get selected(): NgxDateRange<D> | D | null;
303
- set selected(value: NgxDateRange<D> | D | null);
304
- private _selected;
305
- /** The minimum selectable date. */
306
- get minDate(): D | null;
307
- set minDate(value: D | null);
308
- private _minDate;
309
- /** The maximum selectable date. */
310
- get maxDate(): D | null;
311
- set maxDate(value: D | null);
312
- private _maxDate;
313
- /** Function used to filter which dates are selectable. */
314
- dateFilter: _angular_core.InputSignal<((date: D) => boolean) | undefined>;
315
- /** Function that can be used to add custom CSS classes to dates. */
316
- dateClass: _angular_core.InputSignal<NgxMatCalendarCellClassFunction<D> | undefined>;
317
- /** Start of the comparison range. */
318
- comparisonStart: _angular_core.InputSignal<D | null | undefined>;
319
- /** End of the comparison range. */
320
- comparisonEnd: _angular_core.InputSignal<D | null | undefined>;
321
- /** ARIA Accessible name of the `<input matStartDate/>` */
322
- startDateAccessibleName: _angular_core.InputSignal<string | null | undefined>;
323
- /** ARIA Accessible name of the `<input matEndDate/>` */
324
- endDateAccessibleName: _angular_core.InputSignal<string | null | undefined>;
325
- /** Origin of active drag, or null when dragging is not active. */
326
- activeDrag: _angular_core.InputSignal<NgxMatCalendarUserEvent<D> | null>;
327
- /** Emits when a new date is selected. */
328
- readonly selectedChange: _angular_core.OutputEmitterRef<D | null>;
329
- /** Emits when any date is selected. */
330
- readonly _userSelection: _angular_core.OutputEmitterRef<NgxMatCalendarUserEvent<D | null>>;
331
- /** Emits when the user initiates a date range drag via mouse or touch. */
332
- readonly dragStarted: _angular_core.OutputEmitterRef<NgxMatCalendarUserEvent<D>>;
333
- /**
334
- * Emits when the user completes or cancels a date range drag.
335
- * Emits null when the drag was canceled or the newly selected date range if completed.
336
- */
337
- readonly dragEnded: _angular_core.OutputEmitterRef<NgxMatCalendarUserEvent<NgxDateRange<D> | null>>;
338
- /** Emits when any date is activated. */
339
- readonly activeDateChange: _angular_core.OutputEmitterRef<D>;
340
- /** The body of calendar table */
341
- _matCalendarBody: _angular_core.Signal<NgxMatCalendarBody<any> | undefined>;
342
- /** The label for this month (e.g. "January 2017"). */
343
- _monthLabel: string;
344
- /** Grid of calendar cells representing the dates of the month. */
345
- _weeks: NgxMatCalendarCell[][] | null;
346
- /** The number of blank cells in the first row before the 1st of the month. */
347
- _firstWeekOffset: number;
348
- /** Start value of the currently-shown date range. */
349
- _rangeStart: number | null;
350
- /** End value of the currently-shown date range. */
351
- _rangeEnd: number | null;
352
- /** Start value of the currently-shown comparison date range. */
353
- _comparisonRangeStart: number | null;
354
- /** End value of the currently-shown comparison date range. */
355
- _comparisonRangeEnd: number | null;
356
- /** Start of the preview range. */
357
- _previewStart: number | null;
358
- /** End of the preview range. */
359
- _previewEnd: number | null;
360
- /** Whether the user is currently selecting a range of dates. */
361
- _isRange: boolean;
362
- /** The date of the month that today falls on. Null if today is in another month. */
363
- _todayDate: number | null;
364
- /** The names of the weekdays. */
365
- _weekdays: {
366
- long: string;
367
- narrow: string;
368
- }[] | null;
369
- readonly _changeDetectorRef: ChangeDetectorRef;
370
- private _dateFormats;
371
- _dateAdapter: DateAdapter<any, any> | null;
372
- private _dir;
373
- private _rangeStrategy;
374
- constructor();
375
- ngAfterContentInit(): void;
376
- ngOnChanges(changes: SimpleChanges): void;
377
- ngOnDestroy(): void;
378
- /** Handles when a new date is selected. */
379
- _dateSelected(event: NgxMatCalendarUserEvent<number>): void;
380
- /**
381
- * Takes the index of a calendar body cell wrapped in in an event as argument. For the date that
382
- * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
383
- * that date.
384
- *
385
- * This function is used to match each component's model of the active date with the calendar
386
- * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
387
- * parent's value asynchronously via the `activeDateChange` event. The child component receives an
388
- * updated value asynchronously via the `activeCell` Input.
389
- */
390
- _updateActiveDate(event: NgxMatCalendarUserEvent<number>): void;
391
- /** Handles keydown events on the calendar body when calendar is in month view. */
392
- _handleCalendarBodyKeydown(event: KeyboardEvent): void;
393
- /** Handles keyup events on the calendar body when calendar is in month view. */
394
- _handleCalendarBodyKeyup(event: KeyboardEvent): void;
395
- /** Initializes this month view. */
396
- _init(): void;
397
- /** Focuses the active cell after the microtask queue is empty. */
398
- _focusActiveCell(movePreview?: boolean): void;
399
- /** Focuses the active cell after change detection has run and the microtask queue is empty. */
400
- _focusActiveCellAfterViewChecked(): void;
401
- /** Called when the user has activated a new cell and the preview needs to be updated. */
402
- _previewChanged({ event, value: cell }: NgxMatCalendarUserEvent<NgxMatCalendarCell<D> | null>): void;
403
- /**
404
- * Called when the user has ended a drag. If the drag/drop was successful,
405
- * computes and emits the new range selection.
406
- */
407
- protected _dragEnded(event: NgxMatCalendarUserEvent<D | null>): void;
408
- /**
409
- * Takes a day of the month and returns a new date in the same month and year as the currently
410
- * active date. The returned date will have the same day of the month as the argument date.
411
- */
412
- private _getDateFromDayOfMonth;
413
- /** Initializes the weekdays. */
414
- private _initWeekdays;
415
- /** Creates MatCalendarCells for the dates in this month. */
416
- private _createWeekCells;
417
- /** Date filter for the month */
418
- private _shouldEnableDate;
419
- /**
420
- * Gets the date in this month that the given Date falls on.
421
- * Returns null if the given Date is in another month.
422
- */
423
- private _getDateInCurrentMonth;
424
- /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */
425
- private _hasSameMonthAndYear;
426
- /** Gets the value that will be used to one cell to another. */
427
- private _getCellCompareValue;
428
- /** Determines whether the user has the RTL layout direction. */
429
- private _isRtl;
430
- /** Sets the current range based on a model value. */
431
- private _setRanges;
432
- /** Gets whether a date can be selected in the month view. */
433
- private _canSelect;
434
- /** Clears out preview state. */
435
- private _clearPreview;
436
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatMonthView<any>, never>;
437
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatMonthView<any>, "ngx-mat-month-view", ["ngxMatMonthView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; "isSignal": true; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; "isSignal": true; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; "isSignal": true; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; "isSignal": true; }; "activeDrag": { "alias": "activeDrag"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "_userSelection": "_userSelection"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
433
+ export declare class NgxMatMonthView<D> implements AfterContentInit, OnChanges, OnDestroy {
434
+ private _rerenderSubscription;
435
+ /** Flag used to filter out space/enter keyup events that originated outside of the view. */
436
+ private _selectionKeyPressed;
437
+ /**
438
+ * The date to display in this month view (everything other than the month and year is ignored).
439
+ */
440
+ get activeDate(): D;
441
+ set activeDate(value: D);
442
+ private _activeDate;
443
+ /** The currently selected date. */
444
+ get selected(): NgxDateRange<D> | D | null;
445
+ set selected(value: NgxDateRange<D> | D | null);
446
+ private _selected;
447
+ /** The minimum selectable date. */
448
+ get minDate(): D | null;
449
+ set minDate(value: D | null);
450
+ private _minDate;
451
+ /** The maximum selectable date. */
452
+ get maxDate(): D | null;
453
+ set maxDate(value: D | null);
454
+ private _maxDate;
455
+ /** Function used to filter which dates are selectable. */
456
+ dateFilter: import("@angular/core").InputSignal<((date: D) => boolean) | undefined>;
457
+ /** Function that can be used to add custom CSS classes to dates. */
458
+ dateClass: import("@angular/core").InputSignal<NgxMatCalendarCellClassFunction<D> | undefined>;
459
+ /** Start of the comparison range. */
460
+ comparisonStart: import("@angular/core").InputSignal<D | null | undefined>;
461
+ /** End of the comparison range. */
462
+ comparisonEnd: import("@angular/core").InputSignal<D | null | undefined>;
463
+ /** ARIA Accessible name of the `<input matStartDate/>` */
464
+ startDateAccessibleName: import("@angular/core").InputSignal<string | null | undefined>;
465
+ /** ARIA Accessible name of the `<input matEndDate/>` */
466
+ endDateAccessibleName: import("@angular/core").InputSignal<string | null | undefined>;
467
+ /** Origin of active drag, or null when dragging is not active. */
468
+ activeDrag: import("@angular/core").InputSignal<NgxMatCalendarUserEvent<D> | null>;
469
+ /** Emits when a new date is selected. */
470
+ readonly selectedChange: import("@angular/core").OutputEmitterRef<D | null>;
471
+ /** Emits when any date is selected. */
472
+ readonly _userSelection: import("@angular/core").OutputEmitterRef<NgxMatCalendarUserEvent<D | null>>;
473
+ /** Emits when the user initiates a date range drag via mouse or touch. */
474
+ readonly dragStarted: import("@angular/core").OutputEmitterRef<NgxMatCalendarUserEvent<D>>;
475
+ /**
476
+ * Emits when the user completes or cancels a date range drag.
477
+ * Emits null when the drag was canceled or the newly selected date range if completed.
478
+ */
479
+ readonly dragEnded: import("@angular/core").OutputEmitterRef<NgxMatCalendarUserEvent<NgxDateRange<D> | null>>;
480
+ /** Emits when any date is activated. */
481
+ readonly activeDateChange: import("@angular/core").OutputEmitterRef<D>;
482
+ /** The body of calendar table */
483
+ _matCalendarBody: import("@angular/core").Signal<NgxMatCalendarBody<any> | undefined>;
484
+ /** The label for this month (e.g. "January 2017"). */
485
+ _monthLabel: string;
486
+ /** Grid of calendar cells representing the dates of the month. */
487
+ _weeks: NgxMatCalendarCell[][] | null;
488
+ /** The number of blank cells in the first row before the 1st of the month. */
489
+ _firstWeekOffset: number;
490
+ /** Start value of the currently-shown date range. */
491
+ _rangeStart: number | null;
492
+ /** End value of the currently-shown date range. */
493
+ _rangeEnd: number | null;
494
+ /** Start value of the currently-shown comparison date range. */
495
+ _comparisonRangeStart: number | null;
496
+ /** End value of the currently-shown comparison date range. */
497
+ _comparisonRangeEnd: number | null;
498
+ /** Start of the preview range. */
499
+ _previewStart: number | null;
500
+ /** End of the preview range. */
501
+ _previewEnd: number | null;
502
+ /** Whether the user is currently selecting a range of dates. */
503
+ _isRange: boolean;
504
+ /** The date of the month that today falls on. Null if today is in another month. */
505
+ _todayDate: number | null;
506
+ /** The names of the weekdays. */
507
+ _weekdays: {
508
+ long: string;
509
+ narrow: string;
510
+ }[] | null;
511
+ readonly _changeDetectorRef: ChangeDetectorRef;
512
+ private _dateFormats;
513
+ _dateAdapter: DateAdapter<any, any> | null;
514
+ private _dir;
515
+ private _rangeStrategy;
516
+ constructor();
517
+ ngAfterContentInit(): void;
518
+ ngOnChanges(changes: SimpleChanges): void;
519
+ ngOnDestroy(): void;
520
+ /** Handles when a new date is selected. */
521
+ _dateSelected(event: NgxMatCalendarUserEvent<number>): void;
522
+ /**
523
+ * Takes the index of a calendar body cell wrapped in in an event as argument. For the date that
524
+ * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
525
+ * that date.
526
+ *
527
+ * This function is used to match each component's model of the active date with the calendar
528
+ * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
529
+ * parent's value asynchronously via the `activeDateChange` event. The child component receives an
530
+ * updated value asynchronously via the `activeCell` Input.
531
+ */
532
+ _updateActiveDate(event: NgxMatCalendarUserEvent<number>): void;
533
+ /** Handles keydown events on the calendar body when calendar is in month view. */
534
+ _handleCalendarBodyKeydown(event: KeyboardEvent): void;
535
+ /** Handles keyup events on the calendar body when calendar is in month view. */
536
+ _handleCalendarBodyKeyup(event: KeyboardEvent): void;
537
+ /** Initializes this month view. */
538
+ _init(): void;
539
+ /** Focuses the active cell after the microtask queue is empty. */
540
+ _focusActiveCell(movePreview?: boolean): void;
541
+ /** Focuses the active cell after change detection has run and the microtask queue is empty. */
542
+ _focusActiveCellAfterViewChecked(): void;
543
+ /** Called when the user has activated a new cell and the preview needs to be updated. */
544
+ _previewChanged({ event, value: cell }: NgxMatCalendarUserEvent<NgxMatCalendarCell<D> | null>): void;
545
+ /**
546
+ * Called when the user has ended a drag. If the drag/drop was successful,
547
+ * computes and emits the new range selection.
548
+ */
549
+ protected _dragEnded(event: NgxMatCalendarUserEvent<D | null>): void;
550
+ /**
551
+ * Takes a day of the month and returns a new date in the same month and year as the currently
552
+ * active date. The returned date will have the same day of the month as the argument date.
553
+ */
554
+ private _getDateFromDayOfMonth;
555
+ /** Initializes the weekdays. */
556
+ private _initWeekdays;
557
+ /** Creates MatCalendarCells for the dates in this month. */
558
+ private _createWeekCells;
559
+ /** Date filter for the month */
560
+ private _shouldEnableDate;
561
+ /**
562
+ * Gets the date in this month that the given Date falls on.
563
+ * Returns null if the given Date is in another month.
564
+ */
565
+ private _getDateInCurrentMonth;
566
+ /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */
567
+ private _hasSameMonthAndYear;
568
+ /** Gets the value that will be used to one cell to another. */
569
+ private _getCellCompareValue;
570
+ /** Determines whether the user has the RTL layout direction. */
571
+ private _isRtl;
572
+ /** Sets the current range based on a model value. */
573
+ private _setRanges;
574
+ /** Gets whether a date can be selected in the month view. */
575
+ private _canSelect;
576
+ /** Clears out preview state. */
577
+ private _clearPreview;
578
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatMonthView<any>, never>;
579
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatMonthView<any>, "ngx-mat-month-view", ["ngxMatMonthView"], {
580
+ "activeDate": {
581
+ "alias": "activeDate";
582
+ "required": false;
583
+ };
584
+ "selected": {
585
+ "alias": "selected";
586
+ "required": false;
587
+ };
588
+ "minDate": {
589
+ "alias": "minDate";
590
+ "required": false;
591
+ };
592
+ "maxDate": {
593
+ "alias": "maxDate";
594
+ "required": false;
595
+ };
596
+ "dateFilter": {
597
+ "alias": "dateFilter";
598
+ "required": false;
599
+ "isSignal": true;
600
+ };
601
+ "dateClass": {
602
+ "alias": "dateClass";
603
+ "required": false;
604
+ "isSignal": true;
605
+ };
606
+ "comparisonStart": {
607
+ "alias": "comparisonStart";
608
+ "required": false;
609
+ "isSignal": true;
610
+ };
611
+ "comparisonEnd": {
612
+ "alias": "comparisonEnd";
613
+ "required": false;
614
+ "isSignal": true;
615
+ };
616
+ "startDateAccessibleName": {
617
+ "alias": "startDateAccessibleName";
618
+ "required": false;
619
+ "isSignal": true;
620
+ };
621
+ "endDateAccessibleName": {
622
+ "alias": "endDateAccessibleName";
623
+ "required": false;
624
+ "isSignal": true;
625
+ };
626
+ "activeDrag": {
627
+ "alias": "activeDrag";
628
+ "required": false;
629
+ "isSignal": true;
630
+ };
631
+ }, {
632
+ "selectedChange": "selectedChange";
633
+ "_userSelection": "_userSelection";
634
+ "dragStarted": "dragStarted";
635
+ "dragEnded": "dragEnded";
636
+ "activeDateChange": "activeDateChange";
637
+ }, never, never, true, never>;
438
638
  }
439
-
440
- declare const yearsPerPage = 24;
441
- declare const yearsPerRow = 4;
639
+ export declare const yearsPerPage = 24;
640
+ export declare const yearsPerRow = 4;
442
641
  /**
443
642
  * An internal component used to display a year selector in the datepicker.
444
643
  * @docs-private
445
644
  */
446
- declare class NgxMatMultiYearView<D> implements AfterContentInit, OnDestroy {
447
- private _rerenderSubscription;
448
- /** Flag used to filter out space/enter keyup events that originated outside of the view. */
449
- private _selectionKeyPressed;
450
- /** The date to display in this multi-year view (everything other than the year is ignored). */
451
- get activeDate(): D;
452
- set activeDate(value: D);
453
- private _activeDate;
454
- /** The currently selected date. */
455
- get selected(): NgxDateRange<D> | D | null;
456
- set selected(value: NgxDateRange<D> | D | null);
457
- private _selected;
458
- /** The minimum selectable date. */
459
- get minDate(): D | null;
460
- set minDate(value: D | null);
461
- private _minDate;
462
- /** The maximum selectable date. */
463
- get maxDate(): D | null;
464
- set maxDate(value: D | null);
465
- private _maxDate;
466
- /** A function used to filter which dates are selectable. */
467
- dateFilter: _angular_core.InputSignal<((date: D) => boolean) | undefined>;
468
- /** Function that can be used to add custom CSS classes to date cells. */
469
- dateClass: _angular_core.InputSignal<NgxMatCalendarCellClassFunction<D> | undefined>;
470
- /** Emits when a new year is selected. */
471
- readonly selectedChange: _angular_core.OutputEmitterRef<D>;
472
- /** Emits the selected year. This doesn't imply a change on the selected date */
473
- readonly yearSelected: _angular_core.OutputEmitterRef<D>;
474
- /** Emits when any date is activated. */
475
- readonly activeDateChange: _angular_core.OutputEmitterRef<D>;
476
- /** The body of calendar table */
477
- _matCalendarBody: _angular_core.Signal<NgxMatCalendarBody<any> | undefined>;
478
- /** Grid of calendar cells representing the currently displayed years. */
479
- _years: NgxMatCalendarCell[][] | null;
480
- /** The year that today falls on. */
481
- _todayYear: number;
482
- /** The year of the selected date. Null if the selected date is null. */
483
- _selectedYear: number | null;
484
- private _changeDetectorRef;
485
- _dateAdapter: DateAdapter<any, any> | null;
486
- private _dir;
487
- constructor();
488
- ngAfterContentInit(): void;
489
- ngOnDestroy(): void;
490
- /** Initializes this multi-year view. */
491
- _init(): void;
492
- /** Handles when a new year is selected. */
493
- _yearSelected(event: NgxMatCalendarUserEvent<number>): void;
494
- /**
495
- * Takes the index of a calendar body cell wrapped in in an event as argument. For the date that
496
- * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
497
- * that date.
498
- *
499
- * This function is used to match each component's model of the active date with the calendar
500
- * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
501
- * parent's value asynchronously via the `activeDateChange` event. The child component receives an
502
- * updated value asynchronously via the `activeCell` Input.
503
- */
504
- _updateActiveDate(event: NgxMatCalendarUserEvent<number>): void;
505
- /** Handles keydown events on the calendar body when calendar is in multi-year view. */
506
- _handleCalendarBodyKeydown(event: KeyboardEvent): void;
507
- /** Handles keyup events on the calendar body when calendar is in multi-year view. */
508
- _handleCalendarBodyKeyup(event: KeyboardEvent): void;
509
- _getActiveCell(): number;
510
- /** Focuses the active cell after the microtask queue is empty. */
511
- _focusActiveCell(): void;
512
- /** Focuses the active cell after change detection has run and the microtask queue is empty. */
513
- _focusActiveCellAfterViewChecked(): void;
514
- /**
515
- * Takes a year and returns a new date on the same day and month as the currently active date
516
- * The returned date will have the same year as the argument date.
517
- */
518
- private _getDateFromYear;
519
- /** Creates an MatCalendarCell for the given year. */
520
- private _createCellForYear;
521
- /** Whether the given year is enabled. */
522
- private _shouldEnableYear;
523
- /** Determines whether the user has the RTL layout direction. */
524
- private _isRtl;
525
- /** Sets the currently-highlighted year based on a model value. */
526
- private _setSelectedYear;
527
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatMultiYearView<any>, never>;
528
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatMultiYearView<any>, "ngx-mat-multi-year-view", ["ngxMatMultiYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
645
+ export declare class NgxMatMultiYearView<D> implements AfterContentInit, OnDestroy {
646
+ private _rerenderSubscription;
647
+ /** Flag used to filter out space/enter keyup events that originated outside of the view. */
648
+ private _selectionKeyPressed;
649
+ /** The date to display in this multi-year view (everything other than the year is ignored). */
650
+ get activeDate(): D;
651
+ set activeDate(value: D);
652
+ private _activeDate;
653
+ /** The currently selected date. */
654
+ get selected(): NgxDateRange<D> | D | null;
655
+ set selected(value: NgxDateRange<D> | D | null);
656
+ private _selected;
657
+ /** The minimum selectable date. */
658
+ get minDate(): D | null;
659
+ set minDate(value: D | null);
660
+ private _minDate;
661
+ /** The maximum selectable date. */
662
+ get maxDate(): D | null;
663
+ set maxDate(value: D | null);
664
+ private _maxDate;
665
+ /** A function used to filter which dates are selectable. */
666
+ dateFilter: import("@angular/core").InputSignal<((date: D) => boolean) | undefined>;
667
+ /** Function that can be used to add custom CSS classes to date cells. */
668
+ dateClass: import("@angular/core").InputSignal<NgxMatCalendarCellClassFunction<D> | undefined>;
669
+ /** Emits when a new year is selected. */
670
+ readonly selectedChange: import("@angular/core").OutputEmitterRef<D>;
671
+ /** Emits the selected year. This doesn't imply a change on the selected date */
672
+ readonly yearSelected: import("@angular/core").OutputEmitterRef<D>;
673
+ /** Emits when any date is activated. */
674
+ readonly activeDateChange: import("@angular/core").OutputEmitterRef<D>;
675
+ /** The body of calendar table */
676
+ _matCalendarBody: import("@angular/core").Signal<NgxMatCalendarBody<any> | undefined>;
677
+ /** Grid of calendar cells representing the currently displayed years. */
678
+ _years: NgxMatCalendarCell[][] | null;
679
+ /** The year that today falls on. */
680
+ _todayYear: number;
681
+ /** The year of the selected date. Null if the selected date is null. */
682
+ _selectedYear: number | null;
683
+ private _changeDetectorRef;
684
+ _dateAdapter: DateAdapter<any, any> | null;
685
+ private _dir;
686
+ constructor();
687
+ ngAfterContentInit(): void;
688
+ ngOnDestroy(): void;
689
+ /** Initializes this multi-year view. */
690
+ _init(): void;
691
+ /** Handles when a new year is selected. */
692
+ _yearSelected(event: NgxMatCalendarUserEvent<number>): void;
693
+ /**
694
+ * Takes the index of a calendar body cell wrapped in in an event as argument. For the date that
695
+ * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
696
+ * that date.
697
+ *
698
+ * This function is used to match each component's model of the active date with the calendar
699
+ * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
700
+ * parent's value asynchronously via the `activeDateChange` event. The child component receives an
701
+ * updated value asynchronously via the `activeCell` Input.
702
+ */
703
+ _updateActiveDate(event: NgxMatCalendarUserEvent<number>): void;
704
+ /** Handles keydown events on the calendar body when calendar is in multi-year view. */
705
+ _handleCalendarBodyKeydown(event: KeyboardEvent): void;
706
+ /** Handles keyup events on the calendar body when calendar is in multi-year view. */
707
+ _handleCalendarBodyKeyup(event: KeyboardEvent): void;
708
+ _getActiveCell(): number;
709
+ /** Focuses the active cell after the microtask queue is empty. */
710
+ _focusActiveCell(): void;
711
+ /** Focuses the active cell after change detection has run and the microtask queue is empty. */
712
+ _focusActiveCellAfterViewChecked(): void;
713
+ /**
714
+ * Takes a year and returns a new date on the same day and month as the currently active date
715
+ * The returned date will have the same year as the argument date.
716
+ */
717
+ private _getDateFromYear;
718
+ /** Creates an MatCalendarCell for the given year. */
719
+ private _createCellForYear;
720
+ /** Whether the given year is enabled. */
721
+ private _shouldEnableYear;
722
+ /** Determines whether the user has the RTL layout direction. */
723
+ private _isRtl;
724
+ /** Sets the currently-highlighted year based on a model value. */
725
+ private _setSelectedYear;
726
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatMultiYearView<any>, never>;
727
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatMultiYearView<any>, "ngx-mat-multi-year-view", ["ngxMatMultiYearView"], {
728
+ "activeDate": {
729
+ "alias": "activeDate";
730
+ "required": false;
731
+ };
732
+ "selected": {
733
+ "alias": "selected";
734
+ "required": false;
735
+ };
736
+ "minDate": {
737
+ "alias": "minDate";
738
+ "required": false;
739
+ };
740
+ "maxDate": {
741
+ "alias": "maxDate";
742
+ "required": false;
743
+ };
744
+ "dateFilter": {
745
+ "alias": "dateFilter";
746
+ "required": false;
747
+ "isSignal": true;
748
+ };
749
+ "dateClass": {
750
+ "alias": "dateClass";
751
+ "required": false;
752
+ "isSignal": true;
753
+ };
754
+ }, {
755
+ "selectedChange": "selectedChange";
756
+ "yearSelected": "yearSelected";
757
+ "activeDateChange": "activeDateChange";
758
+ }, never, never, true, never>;
529
759
  }
530
- declare function isSameMultiYearView<D>(dateAdapter: DateAdapter<D>, date1: D, date2: D, minDate: D | null, maxDate: D | null): boolean;
760
+ export declare function isSameMultiYearView<D>(dateAdapter: DateAdapter<D>, date1: D, date2: D, minDate: D | null, maxDate: D | null): boolean;
531
761
  /**
532
762
  * When the multi-year view is first opened, the active year will be in view.
533
763
  * So we compute how many years are between the active year and the *slot* where our
534
764
  * "startingYear" will render when paged into view.
535
765
  */
536
- declare function getActiveOffset<D>(dateAdapter: DateAdapter<D> | null, activeDate: D, minDate: D | null, maxDate: D | null): number;
537
-
766
+ export declare function getActiveOffset<D>(dateAdapter: DateAdapter<D> | null, activeDate: D, minDate: D | null, maxDate: D | null): number;
538
767
  /**
539
768
  * An internal component used to display a single year in the datepicker.
540
769
  * @docs-private
541
770
  */
542
- declare class NgxMatYearView<D> implements AfterContentInit, OnDestroy {
543
- private _rerenderSubscription;
544
- /** Flag used to filter out space/enter keyup events that originated outside of the view. */
545
- private _selectionKeyPressed;
546
- /** The date to display in this year view (everything other than the year is ignored). */
547
- get activeDate(): D;
548
- set activeDate(value: D);
549
- private _activeDate;
550
- /** The currently selected date. */
551
- get selected(): NgxDateRange<D> | D | null;
552
- set selected(value: NgxDateRange<D> | D | null);
553
- private _selected;
554
- /** The minimum selectable date. */
555
- get minDate(): D | null;
556
- set minDate(value: D | null);
557
- private _minDate;
558
- /** The maximum selectable date. */
559
- get maxDate(): D | null;
560
- set maxDate(value: D | null);
561
- private _maxDate;
562
- /** A function used to filter which dates are selectable. */
563
- dateFilter: _angular_core.InputSignal<((date: D) => boolean) | undefined>;
564
- /** Function that can be used to add custom CSS classes to date cells. */
565
- dateClass: _angular_core.InputSignal<NgxMatCalendarCellClassFunction<D> | undefined>;
566
- /** Emits when a new month is selected. */
567
- readonly selectedChange: _angular_core.OutputEmitterRef<D>;
568
- /** Emits the selected month. This doesn't imply a change on the selected date */
569
- readonly monthSelected: _angular_core.OutputEmitterRef<D>;
570
- /** Emits when any date is activated. */
571
- readonly activeDateChange: _angular_core.OutputEmitterRef<D>;
572
- /** The body of calendar table */
573
- _matCalendarBody: _angular_core.Signal<NgxMatCalendarBody<any> | undefined>;
574
- /** Grid of calendar cells representing the months of the year. */
575
- _months: NgxMatCalendarCell[][] | null;
576
- /** The label for this year (e.g. "2017"). */
577
- _yearLabel: string;
578
- /** The month in this year that today falls on. Null if today is in a different year. */
579
- _todayMonth: number | null;
580
- /**
581
- * The month in this year that the selected Date falls on.
582
- * Null if the selected Date is in a different year.
583
- */
584
- _selectedMonth: number | null;
585
- readonly _changeDetectorRef: ChangeDetectorRef;
586
- private _dateFormats;
587
- _dateAdapter: DateAdapter<any, any> | null;
588
- private _dir;
589
- constructor();
590
- ngAfterContentInit(): void;
591
- ngOnDestroy(): void;
592
- /** Handles when a new month is selected. */
593
- _monthSelected(event: NgxMatCalendarUserEvent<number>): void;
594
- /**
595
- * Takes the index of a calendar body cell wrapped in in an event as argument. For the date that
596
- * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
597
- * that date.
598
- *
599
- * This function is used to match each component's model of the active date with the calendar
600
- * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
601
- * parent's value asynchronously via the `activeDateChange` event. The child component receives an
602
- * updated value asynchronously via the `activeCell` Input.
603
- */
604
- _updateActiveDate(event: NgxMatCalendarUserEvent<number>): void;
605
- /** Handles keydown events on the calendar body when calendar is in year view. */
606
- _handleCalendarBodyKeydown(event: KeyboardEvent): void;
607
- /** Handles keyup events on the calendar body when calendar is in year view. */
608
- _handleCalendarBodyKeyup(event: KeyboardEvent): void;
609
- /** Initializes this year view. */
610
- _init(): void;
611
- /** Focuses the active cell after the microtask queue is empty. */
612
- _focusActiveCell(): void;
613
- /** Schedules the matCalendarBody to focus the active cell after change detection has run */
614
- _focusActiveCellAfterViewChecked(): void;
615
- /**
616
- * Gets the month in this year that the given Date falls on.
617
- * Returns null if the given Date is in another year.
618
- */
619
- private _getMonthInCurrentYear;
620
- /**
621
- * Takes a month and returns a new date in the same day and year as the currently active date.
622
- * The returned date will have the same month as the argument date.
623
- */
624
- private _getDateFromMonth;
625
- /** Creates an MatCalendarCell for the given month. */
626
- private _createCellForMonth;
627
- /** Whether the given month is enabled. */
628
- private _shouldEnableMonth;
629
- /**
630
- * Tests whether the combination month/year is after this.maxDate, considering
631
- * just the month and year of this.maxDate
632
- */
633
- private _isYearAndMonthAfterMaxDate;
634
- /**
635
- * Tests whether the combination month/year is before this.minDate, considering
636
- * just the month and year of this.minDate
637
- */
638
- private _isYearAndMonthBeforeMinDate;
639
- /** Determines whether the user has the RTL layout direction. */
640
- private _isRtl;
641
- /** Sets the currently-selected month based on a model value. */
642
- private _setSelectedMonth;
643
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatYearView<any>, never>;
644
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatYearView<any>, "ngx-mat-year-view", ["ngxMatYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "monthSelected": "monthSelected"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
771
+ export declare class NgxMatYearView<D> implements AfterContentInit, OnDestroy {
772
+ private _rerenderSubscription;
773
+ /** Flag used to filter out space/enter keyup events that originated outside of the view. */
774
+ private _selectionKeyPressed;
775
+ /** The date to display in this year view (everything other than the year is ignored). */
776
+ get activeDate(): D;
777
+ set activeDate(value: D);
778
+ private _activeDate;
779
+ /** The currently selected date. */
780
+ get selected(): NgxDateRange<D> | D | null;
781
+ set selected(value: NgxDateRange<D> | D | null);
782
+ private _selected;
783
+ /** The minimum selectable date. */
784
+ get minDate(): D | null;
785
+ set minDate(value: D | null);
786
+ private _minDate;
787
+ /** The maximum selectable date. */
788
+ get maxDate(): D | null;
789
+ set maxDate(value: D | null);
790
+ private _maxDate;
791
+ /** A function used to filter which dates are selectable. */
792
+ dateFilter: import("@angular/core").InputSignal<((date: D) => boolean) | undefined>;
793
+ /** Function that can be used to add custom CSS classes to date cells. */
794
+ dateClass: import("@angular/core").InputSignal<NgxMatCalendarCellClassFunction<D> | undefined>;
795
+ /** Emits when a new month is selected. */
796
+ readonly selectedChange: import("@angular/core").OutputEmitterRef<D>;
797
+ /** Emits the selected month. This doesn't imply a change on the selected date */
798
+ readonly monthSelected: import("@angular/core").OutputEmitterRef<D>;
799
+ /** Emits when any date is activated. */
800
+ readonly activeDateChange: import("@angular/core").OutputEmitterRef<D>;
801
+ /** The body of calendar table */
802
+ _matCalendarBody: import("@angular/core").Signal<NgxMatCalendarBody<any> | undefined>;
803
+ /** Grid of calendar cells representing the months of the year. */
804
+ _months: NgxMatCalendarCell[][] | null;
805
+ /** The label for this year (e.g. "2017"). */
806
+ _yearLabel: string;
807
+ /** The month in this year that today falls on. Null if today is in a different year. */
808
+ _todayMonth: number | null;
809
+ /**
810
+ * The month in this year that the selected Date falls on.
811
+ * Null if the selected Date is in a different year.
812
+ */
813
+ _selectedMonth: number | null;
814
+ readonly _changeDetectorRef: ChangeDetectorRef;
815
+ private _dateFormats;
816
+ _dateAdapter: DateAdapter<any, any> | null;
817
+ private _dir;
818
+ constructor();
819
+ ngAfterContentInit(): void;
820
+ ngOnDestroy(): void;
821
+ /** Handles when a new month is selected. */
822
+ _monthSelected(event: NgxMatCalendarUserEvent<number>): void;
823
+ /**
824
+ * Takes the index of a calendar body cell wrapped in in an event as argument. For the date that
825
+ * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
826
+ * that date.
827
+ *
828
+ * This function is used to match each component's model of the active date with the calendar
829
+ * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
830
+ * parent's value asynchronously via the `activeDateChange` event. The child component receives an
831
+ * updated value asynchronously via the `activeCell` Input.
832
+ */
833
+ _updateActiveDate(event: NgxMatCalendarUserEvent<number>): void;
834
+ /** Handles keydown events on the calendar body when calendar is in year view. */
835
+ _handleCalendarBodyKeydown(event: KeyboardEvent): void;
836
+ /** Handles keyup events on the calendar body when calendar is in year view. */
837
+ _handleCalendarBodyKeyup(event: KeyboardEvent): void;
838
+ /** Initializes this year view. */
839
+ _init(): void;
840
+ /** Focuses the active cell after the microtask queue is empty. */
841
+ _focusActiveCell(): void;
842
+ /** Schedules the matCalendarBody to focus the active cell after change detection has run */
843
+ _focusActiveCellAfterViewChecked(): void;
844
+ /**
845
+ * Gets the month in this year that the given Date falls on.
846
+ * Returns null if the given Date is in another year.
847
+ */
848
+ private _getMonthInCurrentYear;
849
+ /**
850
+ * Takes a month and returns a new date in the same day and year as the currently active date.
851
+ * The returned date will have the same month as the argument date.
852
+ */
853
+ private _getDateFromMonth;
854
+ /** Creates an MatCalendarCell for the given month. */
855
+ private _createCellForMonth;
856
+ /** Whether the given month is enabled. */
857
+ private _shouldEnableMonth;
858
+ /**
859
+ * Tests whether the combination month/year is after this.maxDate, considering
860
+ * just the month and year of this.maxDate
861
+ */
862
+ private _isYearAndMonthAfterMaxDate;
863
+ /**
864
+ * Tests whether the combination month/year is before this.minDate, considering
865
+ * just the month and year of this.minDate
866
+ */
867
+ private _isYearAndMonthBeforeMinDate;
868
+ /** Determines whether the user has the RTL layout direction. */
869
+ private _isRtl;
870
+ /** Sets the currently-selected month based on a model value. */
871
+ private _setSelectedMonth;
872
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatYearView<any>, never>;
873
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatYearView<any>, "ngx-mat-year-view", ["ngxMatYearView"], {
874
+ "activeDate": {
875
+ "alias": "activeDate";
876
+ "required": false;
877
+ };
878
+ "selected": {
879
+ "alias": "selected";
880
+ "required": false;
881
+ };
882
+ "minDate": {
883
+ "alias": "minDate";
884
+ "required": false;
885
+ };
886
+ "maxDate": {
887
+ "alias": "maxDate";
888
+ "required": false;
889
+ };
890
+ "dateFilter": {
891
+ "alias": "dateFilter";
892
+ "required": false;
893
+ "isSignal": true;
894
+ };
895
+ "dateClass": {
896
+ "alias": "dateClass";
897
+ "required": false;
898
+ "isSignal": true;
899
+ };
900
+ }, {
901
+ "selectedChange": "selectedChange";
902
+ "monthSelected": "monthSelected";
903
+ "activeDateChange": "activeDateChange";
904
+ }, never, never, true, never>;
645
905
  }
646
-
647
906
  /**
648
907
  * Possible views for the calendar.
649
908
  * @docs-private
650
909
  */
651
- type NgxMatCalendarView = 'month' | 'year' | 'multi-year';
910
+ export type NgxMatCalendarView = 'month' | 'year' | 'multi-year';
652
911
  /** Default header for MatCalendar */
653
- declare class NgxMatCalendarHeader<D> {
654
- private _intl;
655
- calendar: NgxMatCalendar<D>;
656
- private _dateAdapter;
657
- private _dateFormats;
658
- changeDetectorRef: ChangeDetectorRef;
659
- constructor();
660
- /** The display text for the current calendar view. */
661
- get periodButtonText(): string;
662
- /** The aria description for the current calendar view. */
663
- get periodButtonDescription(): string;
664
- /** The `aria-label` for changing the calendar view. */
665
- get periodButtonLabel(): string;
666
- /** The label for the previous button. */
667
- get prevButtonLabel(): string;
668
- /** The label for the next button. */
669
- get nextButtonLabel(): string;
670
- /** Handles user clicks on the period label. */
671
- currentPeriodClicked(): void;
672
- /** Handles user clicks on the previous button. */
673
- previousClicked(): void;
674
- /** Handles user clicks on the next button. */
675
- nextClicked(): void;
676
- /** Whether the previous period button is enabled. */
677
- previousEnabled(): boolean;
678
- /** Whether the next period button is enabled. */
679
- nextEnabled(): boolean;
680
- /** Whether the two dates represent the same view in the current view mode (month or year). */
681
- private _isSameView;
682
- /**
683
- * Format two individual labels for the minimum year and maximum year available in the multi-year
684
- * calendar view. Returns an array of two strings where the first string is the formatted label
685
- * for the minimum year, and the second string is the formatted label for the maximum year.
686
- */
687
- private _formatMinAndMaxYearLabels;
688
- private _id;
689
- _periodButtonLabelId: string;
690
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatCalendarHeader<any>, never>;
691
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatCalendarHeader<any>, "ngx-mat-calendar-header", ["ngxMatCalendarHeader"], {}, {}, never, ["*"], true, never>;
912
+ export declare class NgxMatCalendarHeader<D> {
913
+ private _intl;
914
+ calendar: NgxMatCalendar<D>;
915
+ private _dateAdapter;
916
+ private _dateFormats;
917
+ changeDetectorRef: ChangeDetectorRef;
918
+ constructor();
919
+ /** The display text for the current calendar view. */
920
+ get periodButtonText(): string;
921
+ /** The aria description for the current calendar view. */
922
+ get periodButtonDescription(): string;
923
+ /** The `aria-label` for changing the calendar view. */
924
+ get periodButtonLabel(): string;
925
+ /** The label for the previous button. */
926
+ get prevButtonLabel(): string;
927
+ /** The label for the next button. */
928
+ get nextButtonLabel(): string;
929
+ /** Handles user clicks on the period label. */
930
+ currentPeriodClicked(): void;
931
+ /** Handles user clicks on the previous button. */
932
+ previousClicked(): void;
933
+ /** Handles user clicks on the next button. */
934
+ nextClicked(): void;
935
+ /** Whether the previous period button is enabled. */
936
+ previousEnabled(): boolean;
937
+ /** Whether the next period button is enabled. */
938
+ nextEnabled(): boolean;
939
+ /** Whether the two dates represent the same view in the current view mode (month or year). */
940
+ private _isSameView;
941
+ /**
942
+ * Format two individual labels for the minimum year and maximum year available in the multi-year
943
+ * calendar view. Returns an array of two strings where the first string is the formatted label
944
+ * for the minimum year, and the second string is the formatted label for the maximum year.
945
+ */
946
+ private _formatMinAndMaxYearLabels;
947
+ private _id;
948
+ _periodButtonLabelId: string;
949
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatCalendarHeader<any>, never>;
950
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatCalendarHeader<any>, "ngx-mat-calendar-header", ["ngxMatCalendarHeader"], {}, {}, never, ["*"], true, never>;
692
951
  }
693
952
  /** A calendar that is used as part of the datepicker. */
694
- declare class NgxMatCalendar<D> implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges {
695
- /** An input indicating the type of the header component, if set. */
696
- headerComponent: _angular_core.InputSignal<ComponentType<any> | undefined>;
697
- /** A portal containing the header component type for this calendar. */
698
- _calendarHeaderPortal: Portal<any> | null;
699
- private _intlChanges;
700
- /**
701
- * Used for scheduling that focus should be moved to the active cell on the next tick.
702
- * We need to schedule it, rather than do it immediately, because we have to wait
703
- * for Angular to re-evaluate the view children.
704
- */
705
- private readonly _moveFocusOnNextTick;
706
- /** A date representing the period (month or year) to start the calendar in. */
707
- get startAt(): D | null;
708
- set startAt(value: D | null);
709
- private _startAt;
710
- /** Whether the calendar should be started in month or year view. */
711
- readonly startView: _angular_core.InputSignal<NgxMatCalendarView>;
712
- /** The currently selected date. */
713
- get selected(): NgxDateRange<D> | D | null;
714
- set selected(value: NgxDateRange<D> | D | null);
715
- private _selected;
716
- /** The minimum selectable date. */
717
- get minDate(): D | null;
718
- set minDate(value: D | null);
719
- private _minDate;
720
- /** The maximum selectable date. */
721
- get maxDate(): D | null;
722
- set maxDate(value: D | null);
723
- private _maxDate;
724
- /** Function used to filter which dates are selectable. */
725
- readonly dateFilter: _angular_core.InputSignal<((date: D) => boolean) | undefined>;
726
- /** Function that can be used to add custom CSS classes to dates. */
727
- readonly dateClass: _angular_core.InputSignal<NgxMatCalendarCellClassFunction<D> | undefined>;
728
- /** Start of the comparison range. */
729
- readonly comparisonStart: _angular_core.InputSignal<D | null | undefined>;
730
- /** End of the comparison range. */
731
- readonly comparisonEnd: _angular_core.InputSignal<D | null | undefined>;
732
- /** ARIA Accessible name of the `<input matStartDate/>` */
733
- readonly startDateAccessibleName: _angular_core.InputSignal<string | null | undefined>;
734
- /** ARIA Accessible name of the `<input matEndDate/>` */
735
- readonly endDateAccessibleName: _angular_core.InputSignal<string | null | undefined>;
736
- readonly currentView: _angular_core.WritableSignal<NgxMatCalendarView>;
737
- /** Emits when the currently selected date changes. */
738
- readonly selectedChange: _angular_core.OutputEmitterRef<D | null>;
739
- /**
740
- * Emits the year chosen in multiyear view.
741
- * This doesn't imply a change on the selected date.
742
- */
743
- readonly yearSelected: _angular_core.OutputEmitterRef<D>;
744
- /**
745
- * Emits the month chosen in year view.
746
- * This doesn't imply a change on the selected date.
747
- */
748
- readonly monthSelected: _angular_core.OutputEmitterRef<D>;
749
- /**
750
- * Emits when the current view changes.
751
- */
752
- readonly viewChanged: _angular_core.OutputRef<NgxMatCalendarView>;
753
- /** Emits when any date is selected. */
754
- readonly _userSelection: _angular_core.OutputEmitterRef<NgxMatCalendarUserEvent<D | null>>;
755
- /** Emits a new date range value when the user completes a drag drop operation. */
756
- readonly _userDragDrop: _angular_core.OutputEmitterRef<NgxMatCalendarUserEvent<NgxDateRange<D>>>;
757
- /** Reference to the current month view component. */
758
- readonly monthView: _angular_core.Signal<NgxMatMonthView<D> | undefined>;
759
- /** Reference to the current year view component. */
760
- readonly yearView: _angular_core.Signal<NgxMatYearView<D> | undefined>;
761
- /** Reference to the current multi-year view component. */
762
- readonly multiYearView: _angular_core.Signal<NgxMatMultiYearView<D> | undefined>;
763
- /**
764
- * The current active date. This determines which time period is shown and which date is
765
- * highlighted when using keyboard navigation.
766
- */
767
- get activeDate(): D;
768
- set activeDate(value: D);
769
- private _clampedActiveDate;
770
- /** Origin of active drag, or null when dragging is not active. */
771
- protected _activeDrag: NgxMatCalendarUserEvent<D> | null;
772
- /**
773
- * Emits whenever there is a state change that the header may need to respond to.
774
- */
775
- readonly stateChanges: Subject<void>;
776
- _intl: NgxMatDatepickerIntl;
777
- private _dateAdapter;
778
- private _dateFormats;
779
- private _changeDetectorRef;
780
- constructor();
781
- ngAfterContentInit(): void;
782
- ngAfterViewChecked(): void;
783
- ngOnDestroy(): void;
784
- ngOnChanges(changes: SimpleChanges): void;
785
- /** Focuses the active date. */
786
- focusActiveCell(): void;
787
- /** Updates today's date after an update of the active date */
788
- updateTodaysDate(): void;
789
- /** Handles date selection in the month view. */
790
- _dateSelected(event: NgxMatCalendarUserEvent<D | null>): void;
791
- /** Handles year selection in the multiyear view. */
792
- _yearSelectedInMultiYearView(normalizedYear: D): void;
793
- /** Handles month selection in the year view. */
794
- _monthSelectedInYearView(normalizedMonth: D): void;
795
- /** Handles year/month selection in the multi-year/year views. */
796
- _goToDateInView(date: D, view: NgxMatCalendarView): void;
797
- /** Called when the user starts dragging to change a date range. */
798
- _dragStarted(event: NgxMatCalendarUserEvent<D>): void;
799
- /**
800
- * Called when a drag completes. It may end in cancelation or in the selection
801
- * of a new range.
802
- */
803
- _dragEnded(event: NgxMatCalendarUserEvent<NgxDateRange<D> | null>): void;
804
- /** Returns the component instance that corresponds to the current calendar view. */
805
- private _getCurrentViewComponent;
806
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatCalendar<any>, never>;
807
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatCalendar<any>, "ngx-mat-calendar", ["ngxMatCalendar"], { "headerComponent": { "alias": "headerComponent"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; "isSignal": true; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; "isSignal": true; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; "isSignal": true; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "_userSelection": "_userSelection"; "_userDragDrop": "_userDragDrop"; }, never, never, true, never>;
953
+ export declare class NgxMatCalendar<D> implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges {
954
+ /** An input indicating the type of the header component, if set. */
955
+ headerComponent: import("@angular/core").InputSignal<ComponentType<any> | undefined>;
956
+ /** A portal containing the header component type for this calendar. */
957
+ _calendarHeaderPortal: Portal<any> | null;
958
+ private _intlChanges;
959
+ /**
960
+ * Used for scheduling that focus should be moved to the active cell on the next tick.
961
+ * We need to schedule it, rather than do it immediately, because we have to wait
962
+ * for Angular to re-evaluate the view children.
963
+ */
964
+ private readonly _moveFocusOnNextTick;
965
+ /** A date representing the period (month or year) to start the calendar in. */
966
+ get startAt(): D | null;
967
+ set startAt(value: D | null);
968
+ private _startAt;
969
+ /** Whether the calendar should be started in month or year view. */
970
+ readonly startView: import("@angular/core").InputSignal<NgxMatCalendarView>;
971
+ /** The currently selected date. */
972
+ get selected(): NgxDateRange<D> | D | null;
973
+ set selected(value: NgxDateRange<D> | D | null);
974
+ private _selected;
975
+ /** The minimum selectable date. */
976
+ get minDate(): D | null;
977
+ set minDate(value: D | null);
978
+ private _minDate;
979
+ /** The maximum selectable date. */
980
+ get maxDate(): D | null;
981
+ set maxDate(value: D | null);
982
+ private _maxDate;
983
+ /** Function used to filter which dates are selectable. */
984
+ readonly dateFilter: import("@angular/core").InputSignal<((date: D) => boolean) | undefined>;
985
+ /** Function that can be used to add custom CSS classes to dates. */
986
+ readonly dateClass: import("@angular/core").InputSignal<NgxMatCalendarCellClassFunction<D> | undefined>;
987
+ /** Start of the comparison range. */
988
+ readonly comparisonStart: import("@angular/core").InputSignal<D | null | undefined>;
989
+ /** End of the comparison range. */
990
+ readonly comparisonEnd: import("@angular/core").InputSignal<D | null | undefined>;
991
+ /** ARIA Accessible name of the `<input matStartDate/>` */
992
+ readonly startDateAccessibleName: import("@angular/core").InputSignal<string | null | undefined>;
993
+ /** ARIA Accessible name of the `<input matEndDate/>` */
994
+ readonly endDateAccessibleName: import("@angular/core").InputSignal<string | null | undefined>;
995
+ readonly currentView: import("@angular/core").WritableSignal<NgxMatCalendarView>;
996
+ /** Emits when the currently selected date changes. */
997
+ readonly selectedChange: import("@angular/core").OutputEmitterRef<D | null>;
998
+ /**
999
+ * Emits the year chosen in multiyear view.
1000
+ * This doesn't imply a change on the selected date.
1001
+ */
1002
+ readonly yearSelected: import("@angular/core").OutputEmitterRef<D>;
1003
+ /**
1004
+ * Emits the month chosen in year view.
1005
+ * This doesn't imply a change on the selected date.
1006
+ */
1007
+ readonly monthSelected: import("@angular/core").OutputEmitterRef<D>;
1008
+ /**
1009
+ * Emits when the current view changes.
1010
+ */
1011
+ readonly viewChanged: import("@angular/core").OutputRef<NgxMatCalendarView>;
1012
+ /** Emits when any date is selected. */
1013
+ readonly _userSelection: import("@angular/core").OutputEmitterRef<NgxMatCalendarUserEvent<D | null>>;
1014
+ /** Emits a new date range value when the user completes a drag drop operation. */
1015
+ readonly _userDragDrop: import("@angular/core").OutputEmitterRef<NgxMatCalendarUserEvent<NgxDateRange<D>>>;
1016
+ /** Reference to the current month view component. */
1017
+ readonly monthView: import("@angular/core").Signal<NgxMatMonthView<D> | undefined>;
1018
+ /** Reference to the current year view component. */
1019
+ readonly yearView: import("@angular/core").Signal<NgxMatYearView<D> | undefined>;
1020
+ /** Reference to the current multi-year view component. */
1021
+ readonly multiYearView: import("@angular/core").Signal<NgxMatMultiYearView<D> | undefined>;
1022
+ /**
1023
+ * The current active date. This determines which time period is shown and which date is
1024
+ * highlighted when using keyboard navigation.
1025
+ */
1026
+ get activeDate(): D;
1027
+ set activeDate(value: D);
1028
+ private _clampedActiveDate;
1029
+ /** Origin of active drag, or null when dragging is not active. */
1030
+ protected _activeDrag: NgxMatCalendarUserEvent<D> | null;
1031
+ /**
1032
+ * Emits whenever there is a state change that the header may need to respond to.
1033
+ */
1034
+ readonly stateChanges: Subject<void>;
1035
+ _intl: NgxMatDatepickerIntl;
1036
+ private _dateAdapter;
1037
+ private _dateFormats;
1038
+ private _changeDetectorRef;
1039
+ constructor();
1040
+ ngAfterContentInit(): void;
1041
+ ngAfterViewChecked(): void;
1042
+ ngOnDestroy(): void;
1043
+ ngOnChanges(changes: SimpleChanges): void;
1044
+ /** Focuses the active date. */
1045
+ focusActiveCell(): void;
1046
+ /** Updates today's date after an update of the active date */
1047
+ updateTodaysDate(): void;
1048
+ /** Handles date selection in the month view. */
1049
+ _dateSelected(event: NgxMatCalendarUserEvent<D | null>): void;
1050
+ /** Handles year selection in the multiyear view. */
1051
+ _yearSelectedInMultiYearView(normalizedYear: D): void;
1052
+ /** Handles month selection in the year view. */
1053
+ _monthSelectedInYearView(normalizedMonth: D): void;
1054
+ /** Handles year/month selection in the multi-year/year views. */
1055
+ _goToDateInView(date: D, view: NgxMatCalendarView): void;
1056
+ /** Called when the user starts dragging to change a date range. */
1057
+ _dragStarted(event: NgxMatCalendarUserEvent<D>): void;
1058
+ /**
1059
+ * Called when a drag completes. It may end in cancelation or in the selection
1060
+ * of a new range.
1061
+ */
1062
+ _dragEnded(event: NgxMatCalendarUserEvent<NgxDateRange<D> | null>): void;
1063
+ /** Returns the component instance that corresponds to the current calendar view. */
1064
+ private _getCurrentViewComponent;
1065
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatCalendar<any>, never>;
1066
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatCalendar<any>, "ngx-mat-calendar", ["ngxMatCalendar"], {
1067
+ "headerComponent": {
1068
+ "alias": "headerComponent";
1069
+ "required": false;
1070
+ "isSignal": true;
1071
+ };
1072
+ "startAt": {
1073
+ "alias": "startAt";
1074
+ "required": false;
1075
+ };
1076
+ "startView": {
1077
+ "alias": "startView";
1078
+ "required": false;
1079
+ "isSignal": true;
1080
+ };
1081
+ "selected": {
1082
+ "alias": "selected";
1083
+ "required": false;
1084
+ };
1085
+ "minDate": {
1086
+ "alias": "minDate";
1087
+ "required": false;
1088
+ };
1089
+ "maxDate": {
1090
+ "alias": "maxDate";
1091
+ "required": false;
1092
+ };
1093
+ "dateFilter": {
1094
+ "alias": "dateFilter";
1095
+ "required": false;
1096
+ "isSignal": true;
1097
+ };
1098
+ "dateClass": {
1099
+ "alias": "dateClass";
1100
+ "required": false;
1101
+ "isSignal": true;
1102
+ };
1103
+ "comparisonStart": {
1104
+ "alias": "comparisonStart";
1105
+ "required": false;
1106
+ "isSignal": true;
1107
+ };
1108
+ "comparisonEnd": {
1109
+ "alias": "comparisonEnd";
1110
+ "required": false;
1111
+ "isSignal": true;
1112
+ };
1113
+ "startDateAccessibleName": {
1114
+ "alias": "startDateAccessibleName";
1115
+ "required": false;
1116
+ "isSignal": true;
1117
+ };
1118
+ "endDateAccessibleName": {
1119
+ "alias": "endDateAccessibleName";
1120
+ "required": false;
1121
+ "isSignal": true;
1122
+ };
1123
+ }, {
1124
+ "selectedChange": "selectedChange";
1125
+ "yearSelected": "yearSelected";
1126
+ "monthSelected": "monthSelected";
1127
+ "viewChanged": "viewChanged";
1128
+ "_userSelection": "_userSelection";
1129
+ "_userDragDrop": "_userDragDrop";
1130
+ }, never, never, true, never>;
808
1131
  }
809
-
810
1132
  /**
811
1133
  * An event used for datepicker input and change events. We don't always have access to a native
812
1134
  * input or change event because the event may have been triggered by the user clicking on the
813
1135
  * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.
814
1136
  */
815
- declare class NgxMatDatepickerInputEvent<D, S = unknown> {
816
- /** Reference to the datepicker input component that emitted the event. */
817
- target: NgxMatDatepickerInputBase<S, D>;
818
- /** Reference to the native input element associated with the datepicker input. */
819
- targetElement: HTMLElement;
820
- /** The new value for the target datepicker input. */
821
- value: D | null;
822
- constructor(
823
- /** Reference to the datepicker input component that emitted the event. */
824
- target: NgxMatDatepickerInputBase<S, D>,
825
- /** Reference to the native input element associated with the datepicker input. */
826
- targetElement: HTMLElement);
1137
+ export declare class NgxMatDatepickerInputEvent<D, S = unknown> {
1138
+ /** Reference to the datepicker input component that emitted the event. */
1139
+ target: NgxMatDatepickerInputBase<S, D>;
1140
+ /** Reference to the native input element associated with the datepicker input. */
1141
+ targetElement: HTMLElement;
1142
+ /** The new value for the target datepicker input. */
1143
+ value: D | null;
1144
+ constructor(
1145
+ /** Reference to the datepicker input component that emitted the event. */
1146
+ target: NgxMatDatepickerInputBase<S, D>,
1147
+ /** Reference to the native input element associated with the datepicker input. */
1148
+ targetElement: HTMLElement);
827
1149
  }
828
1150
  /** Function that can be used to filter out dates from a calendar. */
829
1151
  type NgxDateFilterFn<D> = (date: D | null) => boolean;
1152
+ /**
1153
+ * Partial representation of `MatFormField` that is used for backwards-compatibility
1154
+ * between the legacy and non-legacy variants.
1155
+ */
1156
+ interface _NgxMatFormFieldPartial {
1157
+ getConnectedOverlayOrigin(): ElementRef;
1158
+ getLabelId(): string | null;
1159
+ color: ThemePalette;
1160
+ _elementRef: ElementRef;
1161
+ _shouldLabelFloat(): boolean;
1162
+ _hasFloatingLabel(): boolean;
1163
+ _labelId: string;
1164
+ }
830
1165
  /** Base class for datepicker inputs. */
831
1166
  declare abstract class NgxMatDatepickerInputBase<S, D = NgxExtractDateTypeFromSelection<S>> implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy, Validator {
832
- /** Whether the component has been initialized. */
833
- private _isInitialized;
834
- /** The value of the input. */
835
- get value(): D | null;
836
- set value(value: D | null);
837
- protected _model: NgxMatDateSelectionModel<S, D> | undefined;
838
- /** Whether the datepicker-input is disabled. */
839
- get disabled(): boolean;
840
- set disabled(value: BooleanInput);
841
- private _disabled;
842
- /** Emits when a `change` event is fired on this `<input>`. */
843
- readonly dateChange: _angular_core.OutputEmitterRef<NgxMatDatepickerInputEvent<D, S>>;
844
- /** Emits when an `input` event is fired on this `<input>`. */
845
- readonly dateInput: _angular_core.OutputEmitterRef<NgxMatDatepickerInputEvent<D, S>>;
846
- /** Emits when the internal state has changed */
847
- readonly stateChanges: Subject<void>;
848
- _onTouched: () => void;
849
- _validatorOnChange: () => void;
850
- private _cvaOnChange;
851
- private _valueChangesSubscription;
852
- private _localeSubscription;
853
- /**
854
- * Since the value is kept on the model which is assigned in an Input,
855
- * we might get a value before we have a model. This property keeps track
856
- * of the value until we have somewhere to assign it.
857
- */
858
- private _pendingValue;
859
- /** The form control validator for whether the input parses. */
860
- private _parseValidator;
861
- /** The form control validator for the date filter. */
862
- private _filterValidator;
863
- /** The form control validator for the min date. */
864
- private _minValidator;
865
- /** The form control validator for the max date. */
866
- private _maxValidator;
867
- /** Gets the base validator functions. */
868
- protected _getValidators(): ValidatorFn[];
869
- /** Gets the minimum date for the input. Used for validation. */
870
- abstract _getMinDate(): D | null;
871
- /** Gets the maximum date for the input. Used for validation. */
872
- abstract _getMaxDate(): D | null;
873
- /** Gets the date filter function. Used for validation. */
874
- protected abstract _getDateFilter(): NgxDateFilterFn<D> | undefined;
875
- /** Registers a date selection model with the input. */
876
- _registerModel(model: NgxMatDateSelectionModel<S, D>): void;
877
- /** Opens the popup associated with the input. */
878
- protected abstract _openPopup(): void;
879
- /** Assigns a value to the input's model. */
880
- protected abstract _assignValueToModel(model: D | null): void;
881
- /** Converts a value from the model into a native value for the input. */
882
- protected abstract _getValueFromModel(modelValue: S | null): D | null;
883
- /** Combined form control validator for this input. */
884
- protected abstract _validator: ValidatorFn | null;
885
- /** Predicate that determines whether the input should handle a particular change event. */
886
- protected abstract _shouldHandleChangeEvent(event: NgxDateSelectionModelChange<S>): boolean;
887
- /** Whether the last value set on the input was valid. */
888
- protected _lastValueValid: boolean;
889
- protected _elementRef: ElementRef<any>;
890
- _dateAdapter: DateAdapter<D> | null;
891
- protected _dateFormats: _angular_material_core.MatDateFormats | null;
892
- constructor();
893
- ngAfterViewInit(): void;
894
- ngOnChanges(changes: SimpleChanges): void;
895
- ngOnDestroy(): void;
896
- /** @docs-private */
897
- registerOnValidatorChange(fn: () => void): void;
898
- /** @docs-private */
899
- validate(c: AbstractControl): ValidationErrors | null;
900
- writeValue(value: D): void;
901
- registerOnChange(fn: (value: D | null) => void): void;
902
- registerOnTouched(fn: () => void): void;
903
- setDisabledState(isDisabled: boolean): void;
904
- _onKeydown(event: KeyboardEvent): void;
905
- _onInput(event: Event): void;
906
- _onChange(): void;
907
- /** Handles blur events on the input. */
908
- _onBlur(): void;
909
- /** Formats a value and sets it on the input element. */
910
- protected _formatValue(value: D | null): void;
911
- /** Assigns a value to the model. */
912
- private _assignValue;
913
- /** Whether a value is considered valid. */
914
- private _isValidValue;
915
- /**
916
- * Checks whether a parent control is disabled. This is in place so that it can be overridden
917
- * by inputs extending this one which can be placed inside of a group that can be disabled.
918
- */
919
- protected _parentDisabled(): boolean;
920
- /** Programmatically assigns a value to the input. */
921
- protected _assignValueProgrammatically(value: D | null): void;
922
- /** Gets whether a value matches the current date filter. */
923
- _matchesFilter(value: D | null): boolean;
924
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerInputBase<any, any>, never>;
925
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatDatepickerInputBase<any, any>, never, never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
1167
+ /** Whether the component has been initialized. */
1168
+ private _isInitialized;
1169
+ /** The value of the input. */
1170
+ get value(): D | null;
1171
+ set value(value: D | null);
1172
+ protected _model: NgxMatDateSelectionModel<S, D> | undefined;
1173
+ /** Whether the datepicker-input is disabled. */
1174
+ get disabled(): boolean;
1175
+ set disabled(value: BooleanInput);
1176
+ private _disabled;
1177
+ /** Emits when a `change` event is fired on this `<input>`. */
1178
+ readonly dateChange: import("@angular/core").OutputEmitterRef<NgxMatDatepickerInputEvent<D, S>>;
1179
+ /** Emits when an `input` event is fired on this `<input>`. */
1180
+ readonly dateInput: import("@angular/core").OutputEmitterRef<NgxMatDatepickerInputEvent<D, S>>;
1181
+ /** Emits when the internal state has changed */
1182
+ readonly stateChanges: Subject<void>;
1183
+ _onTouched: () => void;
1184
+ _validatorOnChange: () => void;
1185
+ private _cvaOnChange;
1186
+ private _valueChangesSubscription;
1187
+ private _localeSubscription;
1188
+ /**
1189
+ * Since the value is kept on the model which is assigned in an Input,
1190
+ * we might get a value before we have a model. This property keeps track
1191
+ * of the value until we have somewhere to assign it.
1192
+ */
1193
+ private _pendingValue;
1194
+ /** The form control validator for whether the input parses. */
1195
+ private _parseValidator;
1196
+ /** The form control validator for the date filter. */
1197
+ private _filterValidator;
1198
+ /** The form control validator for the min date. */
1199
+ private _minValidator;
1200
+ /** The form control validator for the max date. */
1201
+ private _maxValidator;
1202
+ /** Gets the base validator functions. */
1203
+ protected _getValidators(): ValidatorFn[];
1204
+ /** Gets the minimum date for the input. Used for validation. */
1205
+ abstract _getMinDate(): D | null;
1206
+ /** Gets the maximum date for the input. Used for validation. */
1207
+ abstract _getMaxDate(): D | null;
1208
+ /** Gets the date filter function. Used for validation. */
1209
+ protected abstract _getDateFilter(): NgxDateFilterFn<D> | undefined;
1210
+ /** Registers a date selection model with the input. */
1211
+ _registerModel(model: NgxMatDateSelectionModel<S, D>): void;
1212
+ /** Opens the popup associated with the input. */
1213
+ protected abstract _openPopup(): void;
1214
+ /** Assigns a value to the input's model. */
1215
+ protected abstract _assignValueToModel(model: D | null): void;
1216
+ /** Converts a value from the model into a native value for the input. */
1217
+ protected abstract _getValueFromModel(modelValue: S | null): D | null;
1218
+ /** Combined form control validator for this input. */
1219
+ protected abstract _validator: ValidatorFn | null;
1220
+ /** Predicate that determines whether the input should handle a particular change event. */
1221
+ protected abstract _shouldHandleChangeEvent(event: NgxDateSelectionModelChange<S>): boolean;
1222
+ /** Whether the last value set on the input was valid. */
1223
+ protected _lastValueValid: boolean;
1224
+ protected _elementRef: ElementRef<any>;
1225
+ _dateAdapter: DateAdapter<D> | null;
1226
+ protected _dateFormats: import("@angular/material/core").MatDateFormats | null;
1227
+ constructor();
1228
+ ngAfterViewInit(): void;
1229
+ ngOnChanges(changes: SimpleChanges): void;
1230
+ ngOnDestroy(): void;
1231
+ /** @docs-private */
1232
+ registerOnValidatorChange(fn: () => void): void;
1233
+ /** @docs-private */
1234
+ validate(c: AbstractControl): ValidationErrors | null;
1235
+ writeValue(value: D): void;
1236
+ registerOnChange(fn: (value: D | null) => void): void;
1237
+ registerOnTouched(fn: () => void): void;
1238
+ setDisabledState(isDisabled: boolean): void;
1239
+ _onKeydown(event: KeyboardEvent): void;
1240
+ _onInput(event: Event): void;
1241
+ _onChange(): void;
1242
+ /** Handles blur events on the input. */
1243
+ _onBlur(): void;
1244
+ /** Formats a value and sets it on the input element. */
1245
+ protected _formatValue(value: D | null): void;
1246
+ /** Assigns a value to the model. */
1247
+ private _assignValue;
1248
+ /** Whether a value is considered valid. */
1249
+ private _isValidValue;
1250
+ /**
1251
+ * Checks whether a parent control is disabled. This is in place so that it can be overridden
1252
+ * by inputs extending this one which can be placed inside of a group that can be disabled.
1253
+ */
1254
+ protected _parentDisabled(): boolean;
1255
+ /** Programmatically assigns a value to the input. */
1256
+ protected _assignValueProgrammatically(value: D | null): void;
1257
+ /** Gets whether a value matches the current date filter. */
1258
+ _matchesFilter(value: D | null): boolean;
1259
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerInputBase<any, any>, never>;
1260
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatDatepickerInputBase<any, any>, never, never, {
1261
+ "value": {
1262
+ "alias": "value";
1263
+ "required": false;
1264
+ };
1265
+ "disabled": {
1266
+ "alias": "disabled";
1267
+ "required": false;
1268
+ };
1269
+ }, {
1270
+ "dateChange": "dateChange";
1271
+ "dateInput": "dateInput";
1272
+ }, never, never, true, never>;
926
1273
  }
927
-
1274
+ /**
1275
+ * Checks whether the `SimpleChanges` object from an `ngOnChanges`
1276
+ * callback has any changes, accounting for date objects.
1277
+ */
1278
+ declare function dateInputsHaveChanged(changes: SimpleChanges, adapter: DateAdapter<unknown>): boolean;
928
1279
  /** Parent component that should be wrapped around `MatStartDate` and `MatEndDate`. */
929
- interface NgxMatDateRangeInputParent<D> {
1280
+ export interface NgxMatDateRangeInputParent<D> {
1281
+ id: string;
1282
+ min: D | null;
1283
+ max: D | null;
1284
+ dateFilter: NgxDateFilterFn<D>;
1285
+ rangePicker: {
1286
+ opened: boolean;
930
1287
  id: string;
931
- min: D | null;
932
- max: D | null;
933
- dateFilter: NgxDateFilterFn<D>;
934
- rangePicker: {
935
- opened: boolean;
936
- id: string;
937
- };
938
- _startInput: NgxMatDateRangeInputPartBase<D>;
939
- _endInput: NgxMatDateRangeInputPartBase<D>;
940
- _groupDisabled: boolean;
941
- _handleChildValueChange(): void;
942
- _openDatepicker(): void;
1288
+ };
1289
+ _startInput: NgxMatDateRangeInputPartBase<D>;
1290
+ _endInput: NgxMatDateRangeInputPartBase<D>;
1291
+ _groupDisabled: boolean;
1292
+ _handleChildValueChange(): void;
1293
+ _openDatepicker(): void;
943
1294
  }
944
1295
  /**
945
1296
  * Used to provide the date range input wrapper component
946
1297
  * to the parts without circular dependencies.
947
1298
  */
948
- declare const NGX_MAT_DATE_RANGE_INPUT_PARENT: InjectionToken<NgxMatDateRangeInputParent<any>>;
1299
+ export declare const NGX_MAT_DATE_RANGE_INPUT_PARENT: InjectionToken<NgxMatDateRangeInputParent<any>>;
949
1300
  /**
950
1301
  * Base class for the individual inputs that can be projected inside a `mat-date-range-input`.
951
1302
  */
952
1303
  declare abstract class NgxMatDateRangeInputPartBase<D> extends NgxMatDatepickerInputBase<NgxDateRange<D>> implements OnInit, DoCheck {
953
- errorStateMatcher: ErrorStateMatcher | null;
954
- /**
955
- * Form control bound to this input part.
956
- * @docs-private
957
- */
958
- ngControl: NgControl | null;
959
- errorState: boolean;
960
- protected abstract _validator: ValidatorFn | null;
961
- protected abstract _assignValueToModel(value: D | null): void;
962
- protected abstract _getValueFromModel(modelValue: NgxDateRange<D>): D | null;
963
- protected readonly _dir: Directionality | null;
964
- _elementRef: ElementRef<any>;
965
- _rangeInput: NgxMatDateRangeInputParent<any>;
966
- _defaultErrorStateMatcher: ErrorStateMatcher;
967
- protected _injector: Injector;
968
- _parentForm: NgForm | null;
969
- _parentFormGroup: FormGroupDirective | null;
970
- ngOnInit(): void;
971
- ngDoCheck(): void;
972
- updateErrorState(): void;
973
- /** Gets whether the input is empty. */
974
- isEmpty(): boolean;
975
- /** Gets the placeholder of the input. */
976
- _getPlaceholder(): any;
977
- /** Focuses the input. */
978
- focus(): void;
979
- /** Gets the value that should be used when mirroring the input's size. */
980
- getMirrorValue(): string;
981
- /** Handles `input` events on the input element. */
982
- _onInput(event: Event): void;
983
- /** Opens the datepicker associated with the input. */
984
- protected _openPopup(): void;
985
- /** Gets the minimum date from the range input. */
986
- _getMinDate(): any;
987
- /** Gets the maximum date from the range input. */
988
- _getMaxDate(): any;
989
- /** Gets the date filter function from the range input. */
990
- protected _getDateFilter(): NgxDateFilterFn<any>;
991
- protected _parentDisabled(): boolean;
992
- protected _shouldHandleChangeEvent({ source, }: NgxDateSelectionModelChange<NgxDateRange<D>>): boolean;
993
- protected _assignValueProgrammatically(value: D | null): void;
994
- /** return the ARIA accessible name of the input element */
995
- _getAccessibleName(): string;
996
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDateRangeInputPartBase<any>, never>;
997
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatDateRangeInputPartBase<any>, never, never, { "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; }, {}, never, never, true, never>;
1304
+ errorStateMatcher: ErrorStateMatcher | null;
1305
+ /**
1306
+ * Form control bound to this input part.
1307
+ * @docs-private
1308
+ */
1309
+ ngControl: NgControl | null;
1310
+ errorState: boolean;
1311
+ protected abstract _validator: ValidatorFn | null;
1312
+ protected abstract _assignValueToModel(value: D | null): void;
1313
+ protected abstract _getValueFromModel(modelValue: NgxDateRange<D>): D | null;
1314
+ protected readonly _dir: Directionality | null;
1315
+ _elementRef: ElementRef<any>;
1316
+ _rangeInput: NgxMatDateRangeInputParent<any>;
1317
+ _defaultErrorStateMatcher: ErrorStateMatcher;
1318
+ protected _injector: Injector;
1319
+ _parentForm: NgForm | null;
1320
+ _parentFormGroup: FormGroupDirective | null;
1321
+ ngOnInit(): void;
1322
+ ngDoCheck(): void;
1323
+ updateErrorState(): void;
1324
+ /** Gets whether the input is empty. */
1325
+ isEmpty(): boolean;
1326
+ /** Gets the placeholder of the input. */
1327
+ _getPlaceholder(): any;
1328
+ /** Focuses the input. */
1329
+ focus(): void;
1330
+ /** Gets the value that should be used when mirroring the input's size. */
1331
+ getMirrorValue(): string;
1332
+ /** Handles `input` events on the input element. */
1333
+ _onInput(event: Event): void;
1334
+ /** Opens the datepicker associated with the input. */
1335
+ protected _openPopup(): void;
1336
+ /** Gets the minimum date from the range input. */
1337
+ _getMinDate(): any;
1338
+ /** Gets the maximum date from the range input. */
1339
+ _getMaxDate(): any;
1340
+ /** Gets the date filter function from the range input. */
1341
+ protected _getDateFilter(): NgxDateFilterFn<any>;
1342
+ protected _parentDisabled(): boolean;
1343
+ protected _shouldHandleChangeEvent({ source }: NgxDateSelectionModelChange<NgxDateRange<D>>): boolean;
1344
+ protected _assignValueProgrammatically(value: D | null): void;
1345
+ /** return the ARIA accessible name of the input element */
1346
+ _getAccessibleName(): string;
1347
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDateRangeInputPartBase<any>, never>;
1348
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatDateRangeInputPartBase<any>, never, never, {
1349
+ "errorStateMatcher": {
1350
+ "alias": "errorStateMatcher";
1351
+ "required": false;
1352
+ };
1353
+ }, {}, never, never, true, never>;
998
1354
  }
999
1355
  /** Input for entering the start date in a `mat-date-range-input`. */
1000
- declare class NgxMatStartDate<D> extends NgxMatDateRangeInputPartBase<D> {
1001
- /** Validator that checks that the start date isn't after the end date. */
1002
- private _startValidator;
1003
- protected _validator: ValidatorFn | null;
1004
- protected _getValueFromModel(modelValue: NgxDateRange<D> | null): D | null;
1005
- protected _shouldHandleChangeEvent(change: NgxDateSelectionModelChange<NgxDateRange<D>>): boolean;
1006
- protected _assignValueToModel(value: D | null): void;
1007
- protected _formatValue(value: D | null): void;
1008
- _onKeydown(event: KeyboardEvent): void;
1009
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatStartDate<any>, never>;
1010
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatStartDate<any>, "input[ngxMatStartDate]", never, { "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; }, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
1356
+ export declare class NgxMatStartDate<D> extends NgxMatDateRangeInputPartBase<D> {
1357
+ /** Validator that checks that the start date isn't after the end date. */
1358
+ private _startValidator;
1359
+ protected _validator: ValidatorFn | null;
1360
+ protected _getValueFromModel(modelValue: NgxDateRange<D> | null): D | null;
1361
+ protected _shouldHandleChangeEvent(change: NgxDateSelectionModelChange<NgxDateRange<D>>): boolean;
1362
+ protected _assignValueToModel(value: D | null): void;
1363
+ protected _formatValue(value: D | null): void;
1364
+ _onKeydown(event: KeyboardEvent): void;
1365
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatStartDate<any>, never>;
1366
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatStartDate<any>, "input[ngxMatStartDate]", never, {
1367
+ "errorStateMatcher": {
1368
+ "alias": "errorStateMatcher";
1369
+ "required": false;
1370
+ };
1371
+ }, {
1372
+ "dateChange": "dateChange";
1373
+ "dateInput": "dateInput";
1374
+ }, never, never, true, never>;
1011
1375
  }
1012
1376
  /** Input for entering the end date in a `mat-date-range-input`. */
1013
- declare class NgxMatEndDate<D> extends NgxMatDateRangeInputPartBase<D> {
1014
- /** Validator that checks that the end date isn't before the start date. */
1015
- private _endValidator;
1016
- protected _validator: ValidatorFn | null;
1017
- protected _getValueFromModel(modelValue: NgxDateRange<D> | null): D | null;
1018
- protected _shouldHandleChangeEvent(change: NgxDateSelectionModelChange<NgxDateRange<D>>): boolean;
1019
- protected _assignValueToModel(value: D | null): void;
1020
- _onKeydown(event: KeyboardEvent): void;
1021
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatEndDate<any>, never>;
1022
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatEndDate<any>, "input[ngxMatEndDate]", never, { "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; }, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
1377
+ export declare class NgxMatEndDate<D> extends NgxMatDateRangeInputPartBase<D> {
1378
+ /** Validator that checks that the end date isn't before the start date. */
1379
+ private _endValidator;
1380
+ protected _validator: ValidatorFn | null;
1381
+ protected _getValueFromModel(modelValue: NgxDateRange<D> | null): D | null;
1382
+ protected _shouldHandleChangeEvent(change: NgxDateSelectionModelChange<NgxDateRange<D>>): boolean;
1383
+ protected _assignValueToModel(value: D | null): void;
1384
+ _onKeydown(event: KeyboardEvent): void;
1385
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEndDate<any>, never>;
1386
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatEndDate<any>, "input[ngxMatEndDate]", never, {
1387
+ "errorStateMatcher": {
1388
+ "alias": "errorStateMatcher";
1389
+ "required": false;
1390
+ };
1391
+ }, {
1392
+ "dateChange": "dateChange";
1393
+ "dateInput": "dateInput";
1394
+ }, never, never, true, never>;
1023
1395
  }
1024
-
1025
1396
  /** Injection token that determines the scroll handling while the calendar is open. */
1026
- declare const NGX_MAT_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
1397
+ export declare const NGX_MAT_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
1027
1398
  /** @docs-private */
1028
- declare function NGX_MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
1399
+ export declare function NGX_MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
1029
1400
  /** Possible positions for the datepicker dropdown along the X axis. */
1030
- type NgxDatepickerDropdownPositionX = 'start' | 'end';
1401
+ export type NgxDatepickerDropdownPositionX = 'start' | 'end';
1031
1402
  /** Possible positions for the datepicker dropdown along the Y axis. */
1032
- type NgxDatepickerDropdownPositionY = 'above' | 'below';
1403
+ export type NgxDatepickerDropdownPositionY = 'above' | 'below';
1033
1404
  /** @docs-private */
1034
- declare const NGX_MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
1035
- provide: InjectionToken<() => ScrollStrategy>;
1036
- deps: (typeof Overlay)[];
1037
- useFactory: typeof NGX_MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY;
1405
+ export declare const NGX_MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
1406
+ provide: InjectionToken<() => ScrollStrategy>;
1407
+ deps: (typeof Overlay)[];
1408
+ useFactory: typeof NGX_MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY;
1038
1409
  };
1039
1410
  /**
1040
1411
  * Component used as the content for the datepicker overlay. We use this instead of using
@@ -1043,888 +1414,1230 @@ declare const NGX_MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
1043
1414
  * future. (e.g. confirmation buttons).
1044
1415
  * @docs-private
1045
1416
  */
1046
- declare class NgxMatDatepickerContent<S, D = NgxExtractDateTypeFromSelection<S>> implements OnInit, AfterViewInit, OnDestroy {
1047
- private _subscriptions;
1048
- private _model;
1049
- /** Reference to the internal calendar component. */
1050
- _calendar: _angular_core.Signal<NgxMatCalendar<D>>;
1051
- /** Reference to the datepicker that created the overlay. */
1052
- datepicker: NgxMatDatepickerBase<any, S, D> | null;
1053
- /** Start of the comparison range. */
1054
- comparisonStart: D | null;
1055
- /** End of the comparison range. */
1056
- comparisonEnd: D | null;
1057
- /** ARIA Accessible name of the `<input matStartDate/>` */
1058
- startDateAccessibleName: string | null;
1059
- /** ARIA Accessible name of the `<input matEndDate/>` */
1060
- endDateAccessibleName: string | null;
1061
- /** Whether the datepicker is above or below the input. */
1062
- _isAbove: boolean;
1063
- /** Current state of the animation. */
1064
- _isLeaving: boolean;
1065
- _panelEnterClass: 'enter-dropdown' | 'enter-dialog' | null;
1066
- /** Emits when an animation has finished. */
1067
- readonly _animationDone: Subject<void>;
1068
- /** Whether there is an in-progress animation. */
1069
- _isAnimating: boolean;
1070
- /** Text for the close button. */
1071
- _closeButtonText: string;
1072
- /** Whether the close button currently has focus. */
1073
- _closeButtonFocused: boolean;
1074
- /** Portal with projected action buttons. */
1075
- _actionsPortal: TemplatePortal | null;
1076
- /** Id of the label for the `role="dialog"` element. */
1077
- _dialogLabelId: string | null;
1078
- color: ThemePalette;
1079
- get isPrimary(): boolean;
1080
- get isAccent(): boolean;
1081
- get isWarn(): boolean;
1082
- get isEnterDropdown(): boolean;
1083
- get isEnterDialog(): boolean;
1084
- get isLeavingClass(): boolean;
1085
- get isViewMonth(): boolean;
1086
- _modelTime: D | null;
1087
- private _changeDetectorRef;
1088
- private _globalModel;
1089
- private _dateAdapter;
1090
- private _rangeSelectionStrategy;
1091
- private _intl;
1092
- constructor();
1093
- ngOnInit(): void;
1094
- ngAfterViewInit(): void;
1095
- ngOnDestroy(): void;
1096
- onTimeChanged(selectedDateWithTime: D | null): void;
1097
- _handleUserSelection(event: NgxMatCalendarUserEvent<D | null>): void;
1098
- private _updateUserSelectionWithCalendarUserEvent;
1099
- _handleUserDragDrop(event: NgxMatCalendarUserEvent<NgxDateRange<D>>): void;
1100
- _startExitAnimation(): void;
1101
- _onAnimationEnd(event: AnimationEvent): void;
1102
- _getSelected(): D | NgxDateRange<D> | null;
1103
- /** Applies the current pending selection to the global model. */
1104
- _applyPendingSelection(): void;
1105
- _clearSelection(): void;
1106
- /**
1107
- * Assigns a new portal containing the datepicker actions.
1108
- * @param portal Portal with the actions to be assigned.
1109
- * @param forceRerender Whether a re-render of the portal should be triggered. This isn't
1110
- * necessary if the portal is assigned during initialization, but it may be required if it's
1111
- * added at a later point.
1112
- */
1113
- _assignActions(portal: TemplatePortal<any> | null, forceRerender: boolean): void;
1114
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerContent<any, any>, never>;
1115
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatDatepickerContent<any, any>, "ngx-mat-datepicker-content", ["ngxMatDatepickerContent"], { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
1417
+ export declare class NgxMatDatepickerContent<S, D = NgxExtractDateTypeFromSelection<S>> implements OnInit, AfterViewInit, OnDestroy {
1418
+ private _subscriptions;
1419
+ private _model;
1420
+ /** Reference to the internal calendar component. */
1421
+ _calendar: import("@angular/core").Signal<NgxMatCalendar<D>>;
1422
+ /** Reference to the datepicker that created the overlay. */
1423
+ datepicker: NgxMatDatepickerBase<any, S, D> | null;
1424
+ /** Start of the comparison range. */
1425
+ comparisonStart: D | null;
1426
+ /** End of the comparison range. */
1427
+ comparisonEnd: D | null;
1428
+ /** ARIA Accessible name of the `<input matStartDate/>` */
1429
+ startDateAccessibleName: string | null;
1430
+ /** ARIA Accessible name of the `<input matEndDate/>` */
1431
+ endDateAccessibleName: string | null;
1432
+ /** Whether the datepicker is above or below the input. */
1433
+ _isAbove: boolean;
1434
+ /** Current state of the animation. */
1435
+ _isLeaving: boolean;
1436
+ _panelEnterClass: 'enter-dropdown' | 'enter-dialog' | null;
1437
+ /** Emits when an animation has finished. */
1438
+ readonly _animationDone: Subject<void>;
1439
+ /** Whether there is an in-progress animation. */
1440
+ _isAnimating: boolean;
1441
+ /** Text for the close button. */
1442
+ _closeButtonText: string;
1443
+ /** Whether the close button currently has focus. */
1444
+ _closeButtonFocused: boolean;
1445
+ /** Portal with projected action buttons. */
1446
+ _actionsPortal: TemplatePortal | null;
1447
+ /** Id of the label for the `role="dialog"` element. */
1448
+ _dialogLabelId: string | null;
1449
+ color: ThemePalette;
1450
+ get isPrimary(): boolean;
1451
+ get isAccent(): boolean;
1452
+ get isWarn(): boolean;
1453
+ get isEnterDropdown(): boolean;
1454
+ get isEnterDialog(): boolean;
1455
+ get isLeavingClass(): boolean;
1456
+ get isViewMonth(): boolean;
1457
+ _modelTime: D | null;
1458
+ private _changeDetectorRef;
1459
+ private _globalModel;
1460
+ private _dateAdapter;
1461
+ private _rangeSelectionStrategy;
1462
+ private _intl;
1463
+ constructor();
1464
+ ngOnInit(): void;
1465
+ ngAfterViewInit(): void;
1466
+ ngOnDestroy(): void;
1467
+ onTimeChanged(selectedDateWithTime: D | null): void;
1468
+ _handleUserSelection(event: NgxMatCalendarUserEvent<D | null>): void;
1469
+ private _updateUserSelectionWithCalendarUserEvent;
1470
+ _handleUserDragDrop(event: NgxMatCalendarUserEvent<NgxDateRange<D>>): void;
1471
+ _startExitAnimation(): void;
1472
+ _onAnimationEnd(event: AnimationEvent): void;
1473
+ _getSelected(): D | NgxDateRange<D> | null;
1474
+ /** Applies the current pending selection to the global model. */
1475
+ _applyPendingSelection(): void;
1476
+ _clearSelection(): void;
1477
+ /**
1478
+ * Assigns a new portal containing the datepicker actions.
1479
+ * @param portal Portal with the actions to be assigned.
1480
+ * @param forceRerender Whether a re-render of the portal should be triggered. This isn't
1481
+ * necessary if the portal is assigned during initialization, but it may be required if it's
1482
+ * added at a later point.
1483
+ */
1484
+ _assignActions(portal: TemplatePortal<any> | null, forceRerender: boolean): void;
1485
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerContent<any, any>, never>;
1486
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatDatepickerContent<any, any>, "ngx-mat-datepicker-content", ["ngxMatDatepickerContent"], {
1487
+ "color": {
1488
+ "alias": "color";
1489
+ "required": false;
1490
+ };
1491
+ }, {}, never, never, true, never>;
1116
1492
  }
1117
1493
  /** Form control that can be associated with a datepicker. */
1118
- interface NgxMatDatepickerControl<D> {
1119
- getStartValue(): D | null;
1120
- getThemePalette(): ThemePalette;
1121
- min: D | null;
1122
- max: D | null;
1123
- disabled: boolean;
1124
- dateFilter: NgxDateFilterFn<D>;
1125
- getConnectedOverlayOrigin(): ElementRef;
1126
- getOverlayLabelId(): string | null;
1127
- stateChanges: Observable<void>;
1494
+ export interface NgxMatDatepickerControl<D> {
1495
+ getStartValue(): D | null;
1496
+ getThemePalette(): ThemePalette;
1497
+ min: D | null;
1498
+ max: D | null;
1499
+ disabled: boolean;
1500
+ dateFilter: NgxDateFilterFn<D>;
1501
+ getConnectedOverlayOrigin(): ElementRef;
1502
+ getOverlayLabelId(): string | null;
1503
+ stateChanges: Observable<void>;
1128
1504
  }
1129
1505
  /** A datepicker that can be attached to a {@link NgxMatDatepickerControl}. */
1130
- interface NgxMatDatepickerPanel<C extends NgxMatDatepickerControl<D>, S, D = NgxExtractDateTypeFromSelection<S>> {
1131
- /** Stream that emits whenever the date picker is closed. */
1132
- closedStream: EventEmitter<void>;
1133
- /** Color palette to use on the datepicker's calendar. */
1134
- color: ThemePalette;
1135
- /** The input element the datepicker is associated with. */
1136
- datepickerInput: C;
1137
- /** Whether the datepicker pop-up should be disabled. */
1138
- disabled: boolean;
1139
- /** The id for the datepicker's calendar. */
1140
- id: string;
1141
- /** Whether the datepicker is open. */
1142
- opened: boolean;
1143
- /** Stream that emits whenever the date picker is opened. */
1144
- openedStream: EventEmitter<void>;
1145
- /** Emits when the datepicker's state changes. */
1146
- stateChanges: Subject<void>;
1147
- /** Opens the datepicker. */
1148
- open(): void;
1149
- /** Register an input with the datepicker. */
1150
- registerInput(input: C): NgxMatDateSelectionModel<S, D>;
1506
+ export interface NgxMatDatepickerPanel<C extends NgxMatDatepickerControl<D>, S, D = NgxExtractDateTypeFromSelection<S>> {
1507
+ /** Stream that emits whenever the date picker is closed. */
1508
+ closedStream: EventEmitter<void>;
1509
+ /** Color palette to use on the datepicker's calendar. */
1510
+ color: ThemePalette;
1511
+ /** The input element the datepicker is associated with. */
1512
+ datepickerInput: C;
1513
+ /** Whether the datepicker pop-up should be disabled. */
1514
+ disabled: boolean;
1515
+ /** The id for the datepicker's calendar. */
1516
+ id: string;
1517
+ /** Whether the datepicker is open. */
1518
+ opened: boolean;
1519
+ /** Stream that emits whenever the date picker is opened. */
1520
+ openedStream: EventEmitter<void>;
1521
+ /** Emits when the datepicker's state changes. */
1522
+ stateChanges: Subject<void>;
1523
+ /** Opens the datepicker. */
1524
+ open(): void;
1525
+ /** Register an input with the datepicker. */
1526
+ registerInput(input: C): NgxMatDateSelectionModel<S, D>;
1151
1527
  }
1152
1528
  /** Base class for a datepicker. */
1153
- declare abstract class NgxMatDatepickerBase<C extends NgxMatDatepickerControl<D>, S, D = NgxExtractDateTypeFromSelection<S>> implements NgxMatDatepickerPanel<C, S, D>, OnDestroy, OnChanges {
1154
- private _inputStateChanges;
1155
- private _document;
1156
- /** An input indicating the type of the custom header component for the calendar, if set. */
1157
- calendarHeaderComponent: _angular_core.InputSignal<ComponentType<any> | undefined>;
1158
- /** The date to open the calendar to initially. */
1159
- get startAt(): D | null;
1160
- set startAt(value: D | null);
1161
- private _startAt;
1162
- /** The view that the calendar should start in. */
1163
- startView: _angular_core.InputSignal<"month" | "year" | "multi-year">;
1164
- /** Color palette to use on the datepicker's calendar. */
1165
- get color(): ThemePalette;
1166
- set color(value: ThemePalette);
1167
- _color: ThemePalette;
1168
- /**
1169
- * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather
1170
- * than a dropdown and elements have more padding to allow for bigger touch targets.
1171
- */
1172
- get touchUi(): boolean;
1173
- set touchUi(value: BooleanInput);
1174
- private _touchUi;
1175
- get hideTime(): boolean;
1176
- set hideTime(value: boolean);
1177
- _hideTime: boolean;
1178
- /** Whether the datepicker pop-up should be disabled. */
1179
- get disabled(): boolean;
1180
- set disabled(value: BooleanInput);
1181
- _disabled: boolean;
1182
- /** Preferred position of the datepicker in the X axis. */
1183
- readonly xPosition: _angular_core.InputSignal<NgxDatepickerDropdownPositionX>;
1184
- /** Preferred position of the datepicker in the Y axis. */
1185
- readonly yPosition: _angular_core.InputSignal<NgxDatepickerDropdownPositionY>;
1186
- /**
1187
- * Whether to restore focus to the previously-focused element when the calendar is closed.
1188
- * Note that automatic focus restoration is an accessibility feature and it is recommended that
1189
- * you provide your own equivalent, if you decide to turn it off.
1190
- */
1191
- get restoreFocus(): boolean;
1192
- set restoreFocus(value: BooleanInput);
1193
- private _restoreFocus;
1194
- /**
1195
- * Emits selected year in multiyear view.
1196
- * This doesn't imply a change on the selected date.
1197
- */
1198
- readonly yearSelected: _angular_core.OutputEmitterRef<D>;
1199
- /**
1200
- * Emits selected month in year view.
1201
- * This doesn't imply a change on the selected date.
1202
- */
1203
- readonly monthSelected: _angular_core.OutputEmitterRef<D>;
1204
- /**
1205
- * Emits when the current view changes.
1206
- */
1207
- readonly viewChanged: _angular_core.OutputEmitterRef<NgxMatCalendarView>;
1208
- /** Function that can be used to add custom CSS classes to dates. */
1209
- readonly dateClass: _angular_core.InputSignal<NgxMatCalendarCellClassFunction<D> | undefined>;
1210
- /** Emits when the datepicker has been opened. */
1211
- readonly openedStream: EventEmitter<void>;
1212
- /** Emits when the datepicker has been closed. */
1213
- readonly closedStream: EventEmitter<void>;
1214
- /**
1215
- * Classes to be passed to the date picker panel.
1216
- * Supports string and string array values, similar to `ngClass`.
1217
- */
1218
- get panelClass(): string | string[] | null;
1219
- set panelClass(value: string | string[]);
1220
- private _panelClass;
1221
- /** Whether the calendar is open. */
1222
- get opened(): boolean;
1223
- set opened(value: BooleanInput);
1224
- private _opened;
1225
- /** Whether the timepicker'spinners is shown. */
1226
- get showSpinners(): boolean;
1227
- set showSpinners(value: boolean);
1228
- _showSpinners: boolean;
1229
- /** Whether the second part is disabled. */
1230
- get showSeconds(): boolean;
1231
- set showSeconds(value: boolean);
1232
- _showSeconds: boolean;
1233
- /** Step hour */
1234
- get stepHour(): number;
1235
- set stepHour(value: number);
1236
- _stepHour: number;
1237
- /** Step minute */
1238
- get stepMinute(): number;
1239
- set stepMinute(value: number);
1240
- _stepMinute: number;
1241
- /** Step second */
1242
- get stepSecond(): number;
1243
- set stepSecond(value: number);
1244
- _stepSecond: number;
1245
- /** Enable meridian */
1246
- get enableMeridian(): boolean;
1247
- set enableMeridian(value: boolean);
1248
- _enableMeridian: boolean;
1249
- /** disable minute */
1250
- get disableMinute(): boolean;
1251
- set disableMinute(value: boolean);
1252
- _disableMinute: boolean;
1253
- /** Step second */
1254
- get defaultTime(): number[] | null;
1255
- set defaultTime(value: number[]);
1256
- _defaultTime: number[] | null;
1257
- /** The id for the datepicker calendar. */
1258
- id: string;
1259
- /** The minimum selectable date. */
1260
- _getMinDate(): D | null;
1261
- /** The maximum selectable date. */
1262
- _getMaxDate(): D | null;
1263
- _getDateFilter(): NgxDateFilterFn<D>;
1264
- /** A reference to the overlay into which we've rendered the calendar. */
1265
- private _overlayRef;
1266
- /** Reference to the component instance rendered in the overlay. */
1267
- private _componentRef;
1268
- /** The element that was focused before the datepicker was opened. */
1269
- private _focusedElementBeforeOpen;
1270
- /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
1271
- private _backdropHarnessClass;
1272
- /** Currently-registered actions portal. */
1273
- private _actionsPortal;
1274
- /** The input element this datepicker is associated with. */
1275
- datepickerInput: C;
1276
- /** Emits when the datepicker's state changes. */
1277
- readonly stateChanges: Subject<void>;
1278
- private _overlay;
1279
- private _ngZone;
1280
- private _viewContainerRef;
1281
- private _scrollStrategy;
1282
- private _dateAdapter;
1283
- private _dir;
1284
- private _model;
1285
- constructor();
1286
- ngOnChanges(changes: SimpleChanges): void;
1287
- ngOnDestroy(): void;
1288
- /** Selects the given date */
1289
- select(date: D): void;
1290
- /** Emits the selected year in multiyear view */
1291
- _selectYear(normalizedYear: D): void;
1292
- /** Emits selected month in year view */
1293
- _selectMonth(normalizedMonth: D): void;
1294
- /** Emits changed view */
1295
- _viewChanged(view: NgxMatCalendarView): void;
1296
- /**
1297
- * Register an input with this datepicker.
1298
- * @param input The datepicker input to register with this datepicker.
1299
- * @returns Selection model that the input should hook itself up to.
1300
- */
1301
- registerInput(input: C): NgxMatDateSelectionModel<S, D>;
1302
- /**
1303
- * Registers a portal containing action buttons with the datepicker.
1304
- * @param portal Portal to be registered.
1305
- */
1306
- registerActions(portal: TemplatePortal): void;
1307
- /**
1308
- * Removes a portal containing action buttons from the datepicker.
1309
- * @param portal Portal to be removed.
1310
- */
1311
- removeActions(portal: TemplatePortal): void;
1312
- /** Open the calendar. */
1313
- open(): void;
1314
- /** Close the calendar. */
1315
- close(): void;
1316
- /** Applies the current pending selection on the overlay to the model. */
1317
- _applyPendingSelection(): void;
1318
- _clearSelection(): void;
1319
- /** Forwards relevant values from the datepicker to the datepicker content inside the overlay. */
1320
- protected _forwardContentValues(instance: NgxMatDatepickerContent<S, D>): void;
1321
- /** Opens the overlay with the calendar. */
1322
- private _openOverlay;
1323
- /** Destroys the current overlay. */
1324
- private _destroyOverlay;
1325
- /** Gets a position strategy that will open the calendar as a dropdown. */
1326
- private _getDialogStrategy;
1327
- /** Gets a position strategy that will open the calendar as a dropdown. */
1328
- private _getDropdownStrategy;
1329
- /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */
1330
- private _setConnectedPositions;
1331
- /** Gets an observable that will emit when the overlay is supposed to be closed. */
1332
- private _getCloseStream;
1333
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerBase<any, any, any>, never>;
1334
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatDatepickerBase<any, any, any>, never, never, { "calendarHeaderComponent": { "alias": "calendarHeaderComponent"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "hideTime": { "alias": "hideTime"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; "isSignal": true; }; "yPosition": { "alias": "yPosition"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "showSpinners": { "alias": "showSpinners"; "required": false; }; "showSeconds": { "alias": "showSeconds"; "required": false; }; "stepHour": { "alias": "stepHour"; "required": false; }; "stepMinute": { "alias": "stepMinute"; "required": false; }; "stepSecond": { "alias": "stepSecond"; "required": false; }; "enableMeridian": { "alias": "enableMeridian"; "required": false; }; "disableMinute": { "alias": "disableMinute"; "required": false; }; "defaultTime": { "alias": "defaultTime"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, true, never>;
1529
+ export declare abstract class NgxMatDatepickerBase<C extends NgxMatDatepickerControl<D>, S, D = NgxExtractDateTypeFromSelection<S>> implements NgxMatDatepickerPanel<C, S, D>, OnDestroy, OnChanges {
1530
+ private _inputStateChanges;
1531
+ private _document;
1532
+ /** An input indicating the type of the custom header component for the calendar, if set. */
1533
+ calendarHeaderComponent: import("@angular/core").InputSignal<ComponentType<any> | undefined>;
1534
+ /** The date to open the calendar to initially. */
1535
+ get startAt(): D | null;
1536
+ set startAt(value: D | null);
1537
+ private _startAt;
1538
+ /** The view that the calendar should start in. */
1539
+ startView: import("@angular/core").InputSignal<"month" | "year" | "multi-year">;
1540
+ /** Color palette to use on the datepicker's calendar. */
1541
+ get color(): ThemePalette;
1542
+ set color(value: ThemePalette);
1543
+ _color: ThemePalette;
1544
+ /**
1545
+ * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather
1546
+ * than a dropdown and elements have more padding to allow for bigger touch targets.
1547
+ */
1548
+ get touchUi(): boolean;
1549
+ set touchUi(value: BooleanInput);
1550
+ private _touchUi;
1551
+ get hideTime(): boolean;
1552
+ set hideTime(value: boolean);
1553
+ _hideTime: boolean;
1554
+ /** Whether the datepicker pop-up should be disabled. */
1555
+ get disabled(): boolean;
1556
+ set disabled(value: BooleanInput);
1557
+ _disabled: boolean;
1558
+ /** Preferred position of the datepicker in the X axis. */
1559
+ readonly xPosition: import("@angular/core").InputSignal<NgxDatepickerDropdownPositionX>;
1560
+ /** Preferred position of the datepicker in the Y axis. */
1561
+ readonly yPosition: import("@angular/core").InputSignal<NgxDatepickerDropdownPositionY>;
1562
+ /**
1563
+ * Whether to restore focus to the previously-focused element when the calendar is closed.
1564
+ * Note that automatic focus restoration is an accessibility feature and it is recommended that
1565
+ * you provide your own equivalent, if you decide to turn it off.
1566
+ */
1567
+ get restoreFocus(): boolean;
1568
+ set restoreFocus(value: BooleanInput);
1569
+ private _restoreFocus;
1570
+ /**
1571
+ * Emits selected year in multiyear view.
1572
+ * This doesn't imply a change on the selected date.
1573
+ */
1574
+ readonly yearSelected: import("@angular/core").OutputEmitterRef<D>;
1575
+ /**
1576
+ * Emits selected month in year view.
1577
+ * This doesn't imply a change on the selected date.
1578
+ */
1579
+ readonly monthSelected: import("@angular/core").OutputEmitterRef<D>;
1580
+ /**
1581
+ * Emits when the current view changes.
1582
+ */
1583
+ readonly viewChanged: import("@angular/core").OutputEmitterRef<NgxMatCalendarView>;
1584
+ /** Function that can be used to add custom CSS classes to dates. */
1585
+ readonly dateClass: import("@angular/core").InputSignal<NgxMatCalendarCellClassFunction<D> | undefined>;
1586
+ /** Emits when the datepicker has been opened. */
1587
+ readonly openedStream: EventEmitter<void>;
1588
+ /** Emits when the datepicker has been closed. */
1589
+ readonly closedStream: EventEmitter<void>;
1590
+ /**
1591
+ * Classes to be passed to the date picker panel.
1592
+ * Supports string and string array values, similar to `ngClass`.
1593
+ */
1594
+ get panelClass(): string | string[] | null;
1595
+ set panelClass(value: string | string[]);
1596
+ private _panelClass;
1597
+ /** Whether the calendar is open. */
1598
+ get opened(): boolean;
1599
+ set opened(value: BooleanInput);
1600
+ private _opened;
1601
+ /** Whether the timepicker'spinners is shown. */
1602
+ get showSpinners(): boolean;
1603
+ set showSpinners(value: boolean);
1604
+ _showSpinners: boolean;
1605
+ /** Whether the second part is disabled. */
1606
+ get showSeconds(): boolean;
1607
+ set showSeconds(value: boolean);
1608
+ _showSeconds: boolean;
1609
+ /** Step hour */
1610
+ get stepHour(): number;
1611
+ set stepHour(value: number);
1612
+ _stepHour: number;
1613
+ /** Step minute */
1614
+ get stepMinute(): number;
1615
+ set stepMinute(value: number);
1616
+ _stepMinute: number;
1617
+ /** Step second */
1618
+ get stepSecond(): number;
1619
+ set stepSecond(value: number);
1620
+ _stepSecond: number;
1621
+ /** Enable meridian */
1622
+ get enableMeridian(): boolean;
1623
+ set enableMeridian(value: boolean);
1624
+ _enableMeridian: boolean;
1625
+ /** disable minute */
1626
+ get disableMinute(): boolean;
1627
+ set disableMinute(value: boolean);
1628
+ _disableMinute: boolean;
1629
+ /** Step second */
1630
+ get defaultTime(): number[] | null;
1631
+ set defaultTime(value: number[]);
1632
+ _defaultTime: number[] | null;
1633
+ /** The id for the datepicker calendar. */
1634
+ id: string;
1635
+ /** The minimum selectable date. */
1636
+ _getMinDate(): D | null;
1637
+ /** The maximum selectable date. */
1638
+ _getMaxDate(): D | null;
1639
+ _getDateFilter(): NgxDateFilterFn<D>;
1640
+ /** A reference to the overlay into which we've rendered the calendar. */
1641
+ private _overlayRef;
1642
+ /** Reference to the component instance rendered in the overlay. */
1643
+ private _componentRef;
1644
+ /** The element that was focused before the datepicker was opened. */
1645
+ private _focusedElementBeforeOpen;
1646
+ /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
1647
+ private _backdropHarnessClass;
1648
+ /** Currently-registered actions portal. */
1649
+ private _actionsPortal;
1650
+ /** The input element this datepicker is associated with. */
1651
+ datepickerInput: C;
1652
+ /** Emits when the datepicker's state changes. */
1653
+ readonly stateChanges: Subject<void>;
1654
+ private _overlay;
1655
+ private _ngZone;
1656
+ private _viewContainerRef;
1657
+ private _scrollStrategy;
1658
+ private _dateAdapter;
1659
+ private _dir;
1660
+ private _model;
1661
+ constructor();
1662
+ ngOnChanges(changes: SimpleChanges): void;
1663
+ ngOnDestroy(): void;
1664
+ /** Selects the given date */
1665
+ select(date: D): void;
1666
+ /** Emits the selected year in multiyear view */
1667
+ _selectYear(normalizedYear: D): void;
1668
+ /** Emits selected month in year view */
1669
+ _selectMonth(normalizedMonth: D): void;
1670
+ /** Emits changed view */
1671
+ _viewChanged(view: NgxMatCalendarView): void;
1672
+ /**
1673
+ * Register an input with this datepicker.
1674
+ * @param input The datepicker input to register with this datepicker.
1675
+ * @returns Selection model that the input should hook itself up to.
1676
+ */
1677
+ registerInput(input: C): NgxMatDateSelectionModel<S, D>;
1678
+ /**
1679
+ * Registers a portal containing action buttons with the datepicker.
1680
+ * @param portal Portal to be registered.
1681
+ */
1682
+ registerActions(portal: TemplatePortal): void;
1683
+ /**
1684
+ * Removes a portal containing action buttons from the datepicker.
1685
+ * @param portal Portal to be removed.
1686
+ */
1687
+ removeActions(portal: TemplatePortal): void;
1688
+ /** Open the calendar. */
1689
+ open(): void;
1690
+ /** Close the calendar. */
1691
+ close(): void;
1692
+ /** Applies the current pending selection on the overlay to the model. */
1693
+ _applyPendingSelection(): void;
1694
+ _clearSelection(): void;
1695
+ /** Forwards relevant values from the datepicker to the datepicker content inside the overlay. */
1696
+ protected _forwardContentValues(instance: NgxMatDatepickerContent<S, D>): void;
1697
+ /** Opens the overlay with the calendar. */
1698
+ private _openOverlay;
1699
+ /** Destroys the current overlay. */
1700
+ private _destroyOverlay;
1701
+ /** Gets a position strategy that will open the calendar as a dropdown. */
1702
+ private _getDialogStrategy;
1703
+ /** Gets a position strategy that will open the calendar as a dropdown. */
1704
+ private _getDropdownStrategy;
1705
+ /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */
1706
+ private _setConnectedPositions;
1707
+ /** Gets an observable that will emit when the overlay is supposed to be closed. */
1708
+ private _getCloseStream;
1709
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerBase<any, any, any>, never>;
1710
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatDatepickerBase<any, any, any>, never, never, {
1711
+ "calendarHeaderComponent": {
1712
+ "alias": "calendarHeaderComponent";
1713
+ "required": false;
1714
+ "isSignal": true;
1715
+ };
1716
+ "startAt": {
1717
+ "alias": "startAt";
1718
+ "required": false;
1719
+ };
1720
+ "startView": {
1721
+ "alias": "startView";
1722
+ "required": false;
1723
+ "isSignal": true;
1724
+ };
1725
+ "color": {
1726
+ "alias": "color";
1727
+ "required": false;
1728
+ };
1729
+ "touchUi": {
1730
+ "alias": "touchUi";
1731
+ "required": false;
1732
+ };
1733
+ "hideTime": {
1734
+ "alias": "hideTime";
1735
+ "required": false;
1736
+ };
1737
+ "disabled": {
1738
+ "alias": "disabled";
1739
+ "required": false;
1740
+ };
1741
+ "xPosition": {
1742
+ "alias": "xPosition";
1743
+ "required": false;
1744
+ "isSignal": true;
1745
+ };
1746
+ "yPosition": {
1747
+ "alias": "yPosition";
1748
+ "required": false;
1749
+ "isSignal": true;
1750
+ };
1751
+ "restoreFocus": {
1752
+ "alias": "restoreFocus";
1753
+ "required": false;
1754
+ };
1755
+ "dateClass": {
1756
+ "alias": "dateClass";
1757
+ "required": false;
1758
+ "isSignal": true;
1759
+ };
1760
+ "panelClass": {
1761
+ "alias": "panelClass";
1762
+ "required": false;
1763
+ };
1764
+ "opened": {
1765
+ "alias": "opened";
1766
+ "required": false;
1767
+ };
1768
+ "showSpinners": {
1769
+ "alias": "showSpinners";
1770
+ "required": false;
1771
+ };
1772
+ "showSeconds": {
1773
+ "alias": "showSeconds";
1774
+ "required": false;
1775
+ };
1776
+ "stepHour": {
1777
+ "alias": "stepHour";
1778
+ "required": false;
1779
+ };
1780
+ "stepMinute": {
1781
+ "alias": "stepMinute";
1782
+ "required": false;
1783
+ };
1784
+ "stepSecond": {
1785
+ "alias": "stepSecond";
1786
+ "required": false;
1787
+ };
1788
+ "enableMeridian": {
1789
+ "alias": "enableMeridian";
1790
+ "required": false;
1791
+ };
1792
+ "disableMinute": {
1793
+ "alias": "disableMinute";
1794
+ "required": false;
1795
+ };
1796
+ "defaultTime": {
1797
+ "alias": "defaultTime";
1798
+ "required": false;
1799
+ };
1800
+ }, {
1801
+ "yearSelected": "yearSelected";
1802
+ "monthSelected": "monthSelected";
1803
+ "viewChanged": "viewChanged";
1804
+ "openedStream": "opened";
1805
+ "closedStream": "closed";
1806
+ }, never, never, true, never>;
1335
1807
  }
1336
-
1337
1808
  /**
1338
1809
  * Input that can be associated with a date range picker.
1339
1810
  * @docs-private
1340
1811
  */
1341
- interface NgxMatDateRangePickerInput<D> extends NgxMatDatepickerControl<D> {
1342
- _getEndDateAccessibleName(): string | null;
1343
- _getStartDateAccessibleName(): string | null;
1344
- comparisonStart: D | null;
1345
- comparisonEnd: D | null;
1812
+ export interface NgxMatDateRangePickerInput<D> extends NgxMatDatepickerControl<D> {
1813
+ _getEndDateAccessibleName(): string | null;
1814
+ _getStartDateAccessibleName(): string | null;
1815
+ comparisonStart: D | null;
1816
+ comparisonEnd: D | null;
1346
1817
  }
1347
1818
  /** Component responsible for managing the date range picker popup/dialog. */
1348
- declare class NgxMatDateRangePicker<D> extends NgxMatDatepickerBase<NgxMatDateRangePickerInput<D>, NgxDateRange<D>, D> {
1349
- protected _forwardContentValues(instance: NgxMatDatepickerContent<NgxDateRange<D>, D>): void;
1350
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDateRangePicker<any>, never>;
1351
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatDateRangePicker<any>, "ngx-mat-date-range-picker", ["ngxMatDateRangePicker"], {}, {}, never, never, true, never>;
1819
+ export declare class NgxMatDateRangePicker<D> extends NgxMatDatepickerBase<NgxMatDateRangePickerInput<D>, NgxDateRange<D>, D> {
1820
+ protected _forwardContentValues(instance: NgxMatDatepickerContent<NgxDateRange<D>, D>): void;
1821
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDateRangePicker<any>, never>;
1822
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatDateRangePicker<any>, "ngx-mat-date-range-picker", ["ngxMatDateRangePicker"], {}, {}, never, never, true, never>;
1352
1823
  }
1353
-
1354
- declare class NgxMatDateRangeInput<D> implements MatFormFieldControl<NgxDateRange<D>>, NgxMatDatepickerControl<D>, NgxMatDateRangeInputParent<D>, NgxMatDateRangePickerInput<D>, AfterContentInit, OnChanges, OnDestroy {
1355
- private _closedSubscription;
1356
- /** Current value of the range input. */
1357
- get value(): NgxDateRange<D> | null;
1358
- /** Unique ID for the group. */
1359
- id: string;
1360
- /** Whether the control is focused. */
1361
- focused: boolean;
1362
- /** Whether the control's label should float. */
1363
- get shouldLabelFloat(): boolean;
1364
- /** Name of the form control. */
1365
- controlType: string;
1366
- /**
1367
- * Implemented as a part of `MatFormFieldControl`.
1368
- * Set the placeholder attribute on `matStartDate` and `matEndDate`.
1369
- * @docs-private
1370
- */
1371
- get placeholder(): string;
1372
- /** The range picker that this input is associated with. */
1373
- get rangePicker(): NgxMatDatepickerPanel<NgxMatDatepickerControl<D>, NgxDateRange<D>, D>;
1374
- set rangePicker(rangePicker: NgxMatDatepickerPanel<NgxMatDatepickerControl<D>, NgxDateRange<D>, D>);
1375
- private _rangePicker;
1376
- /** Whether the input is required. */
1377
- get required(): boolean;
1378
- set required(value: BooleanInput);
1379
- private _required;
1380
- /** Function that can be used to filter out dates within the date range picker. */
1381
- get dateFilter(): NgxDateFilterFn<D>;
1382
- set dateFilter(value: NgxDateFilterFn<D>);
1383
- private _dateFilter;
1384
- /** The minimum valid date. */
1385
- get min(): D | null;
1386
- set min(value: D | null);
1387
- private _min;
1388
- /** The maximum valid date. */
1389
- get max(): D | null;
1390
- set max(value: D | null);
1391
- private _max;
1392
- /** Whether the input is disabled. */
1393
- get disabled(): boolean;
1394
- set disabled(value: BooleanInput);
1395
- _groupDisabled: boolean;
1396
- /** Whether the input is in an error state. */
1397
- get errorState(): boolean;
1398
- /** Whether the datepicker input is empty. */
1399
- get empty(): boolean;
1400
- /** Value for the `aria-describedby` attribute of the inputs. */
1401
- _ariaDescribedBy: string | null;
1402
- /** Date selection model currently registered with the input. */
1403
- private _model;
1404
- /** Separator text to be shown between the inputs. */
1405
- separator: string;
1406
- /** Start of the comparison range that should be shown in the calendar. */
1407
- comparisonStart: D | null;
1408
- /** End of the comparison range that should be shown in the calendar. */
1409
- comparisonEnd: D | null;
1410
- _startInput: NgxMatStartDate<D>;
1411
- _endInput: NgxMatEndDate<D>;
1412
- /**
1413
- * Implemented as a part of `MatFormFieldControl`.
1414
- * TODO(crisbeto): change type to `AbstractControlDirective` after #18206 lands.
1415
- * @docs-private
1416
- */
1417
- ngControl: NgControl | null;
1418
- /** Emits when the input's state has changed. */
1419
- readonly stateChanges: Subject<void>;
1420
- private _changeDetectorRef;
1421
- private _elementRef;
1422
- control: ControlContainer | null;
1423
- private _dateAdapter;
1424
- private _formField;
1425
- constructor();
1426
- /**
1427
- * Implemented as a part of `MatFormFieldControl`.
1428
- * @docs-private
1429
- */
1430
- setDescribedByIds(ids: string[]): void;
1431
- /**
1432
- * Implemented as a part of `MatFormFieldControl`.
1433
- * @docs-private
1434
- */
1435
- onContainerClick(): void;
1436
- ngAfterContentInit(): void;
1437
- ngOnChanges(changes: SimpleChanges): void;
1438
- ngOnDestroy(): void;
1439
- /** Gets the date at which the calendar should start. */
1440
- getStartValue(): D | null;
1441
- /** Gets the input's theme palette. */
1442
- getThemePalette(): ThemePalette;
1443
- /** Gets the element to which the calendar overlay should be attached. */
1444
- getConnectedOverlayOrigin(): ElementRef;
1445
- /** Gets the ID of an element that should be used a description for the calendar overlay. */
1446
- getOverlayLabelId(): string | null;
1447
- /** Gets the value that is used to mirror the state input. */
1448
- _getInputMirrorValue(part: 'start' | 'end'): string;
1449
- /** Whether the input placeholders should be hidden. */
1450
- _shouldHidePlaceholders(): boolean;
1451
- /** Handles the value in one of the child inputs changing. */
1452
- _handleChildValueChange(): void;
1453
- /** Opens the date range picker associated with the input. */
1454
- _openDatepicker(): void;
1455
- /** Whether the separate text should be hidden. */
1456
- _shouldHideSeparator(): boolean | "" | null;
1457
- /** Gets the value for the `aria-labelledby` attribute of the inputs. */
1458
- _getAriaLabelledby(): string | null;
1459
- _getStartDateAccessibleName(): string;
1460
- _getEndDateAccessibleName(): string;
1461
- /** Updates the focused state of the range input. */
1462
- _updateFocus(origin: FocusOrigin): void;
1463
- /** Re-runs the validators on the start/end inputs. */
1464
- private _revalidate;
1465
- /** Registers the current date selection model with the start/end inputs. */
1466
- private _registerModel;
1467
- /** Checks whether a specific range input directive is required. */
1468
- private _isTargetRequired;
1469
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDateRangeInput<any>, never>;
1470
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatDateRangeInput<any>, "ngx-mat-date-range-input", ["ngxMatDateRangeInput"], { "rangePicker": { "alias": "rangePicker"; "required": false; }; "required": { "alias": "required"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; }, {}, ["_startInput", "_endInput"], ["input[matStartDate]", "input[matEndDate]"], true, never>;
1824
+ export declare class NgxMatDateRangeInput<D> implements MatFormFieldControl<NgxDateRange<D>>, NgxMatDatepickerControl<D>, NgxMatDateRangeInputParent<D>, NgxMatDateRangePickerInput<D>, AfterContentInit, OnChanges, OnDestroy {
1825
+ private _closedSubscription;
1826
+ /** Current value of the range input. */
1827
+ get value(): NgxDateRange<D> | null;
1828
+ /** Unique ID for the group. */
1829
+ id: string;
1830
+ /** Whether the control is focused. */
1831
+ focused: boolean;
1832
+ /** Whether the control's label should float. */
1833
+ get shouldLabelFloat(): boolean;
1834
+ /** Name of the form control. */
1835
+ controlType: string;
1836
+ /**
1837
+ * Implemented as a part of `MatFormFieldControl`.
1838
+ * Set the placeholder attribute on `matStartDate` and `matEndDate`.
1839
+ * @docs-private
1840
+ */
1841
+ get placeholder(): string;
1842
+ /** The range picker that this input is associated with. */
1843
+ get rangePicker(): NgxMatDatepickerPanel<NgxMatDatepickerControl<D>, NgxDateRange<D>, D>;
1844
+ set rangePicker(rangePicker: NgxMatDatepickerPanel<NgxMatDatepickerControl<D>, NgxDateRange<D>, D>);
1845
+ private _rangePicker;
1846
+ /** Whether the input is required. */
1847
+ get required(): boolean;
1848
+ set required(value: BooleanInput);
1849
+ private _required;
1850
+ /** Function that can be used to filter out dates within the date range picker. */
1851
+ get dateFilter(): NgxDateFilterFn<D>;
1852
+ set dateFilter(value: NgxDateFilterFn<D>);
1853
+ private _dateFilter;
1854
+ /** The minimum valid date. */
1855
+ get min(): D | null;
1856
+ set min(value: D | null);
1857
+ private _min;
1858
+ /** The maximum valid date. */
1859
+ get max(): D | null;
1860
+ set max(value: D | null);
1861
+ private _max;
1862
+ /** Whether the input is disabled. */
1863
+ get disabled(): boolean;
1864
+ set disabled(value: BooleanInput);
1865
+ _groupDisabled: boolean;
1866
+ /** Whether the input is in an error state. */
1867
+ get errorState(): boolean;
1868
+ /** Whether the datepicker input is empty. */
1869
+ get empty(): boolean;
1870
+ /** Value for the `aria-describedby` attribute of the inputs. */
1871
+ _ariaDescribedBy: string | null;
1872
+ /** Date selection model currently registered with the input. */
1873
+ private _model;
1874
+ /** Separator text to be shown between the inputs. */
1875
+ separator: string;
1876
+ /** Start of the comparison range that should be shown in the calendar. */
1877
+ comparisonStart: D | null;
1878
+ /** End of the comparison range that should be shown in the calendar. */
1879
+ comparisonEnd: D | null;
1880
+ _startInput: NgxMatStartDate<D>;
1881
+ _endInput: NgxMatEndDate<D>;
1882
+ /**
1883
+ * Implemented as a part of `MatFormFieldControl`.
1884
+ * TODO(crisbeto): change type to `AbstractControlDirective` after #18206 lands.
1885
+ * @docs-private
1886
+ */
1887
+ ngControl: NgControl | null;
1888
+ /** Emits when the input's state has changed. */
1889
+ readonly stateChanges: Subject<void>;
1890
+ private _changeDetectorRef;
1891
+ private _elementRef;
1892
+ control: ControlContainer | null;
1893
+ private _dateAdapter;
1894
+ private _formField;
1895
+ constructor();
1896
+ /**
1897
+ * Implemented as a part of `MatFormFieldControl`.
1898
+ * @docs-private
1899
+ */
1900
+ setDescribedByIds(ids: string[]): void;
1901
+ /**
1902
+ * Implemented as a part of `MatFormFieldControl`.
1903
+ * @docs-private
1904
+ */
1905
+ onContainerClick(): void;
1906
+ ngAfterContentInit(): void;
1907
+ ngOnChanges(changes: SimpleChanges): void;
1908
+ ngOnDestroy(): void;
1909
+ /** Gets the date at which the calendar should start. */
1910
+ getStartValue(): D | null;
1911
+ /** Gets the input's theme palette. */
1912
+ getThemePalette(): ThemePalette;
1913
+ /** Gets the element to which the calendar overlay should be attached. */
1914
+ getConnectedOverlayOrigin(): ElementRef;
1915
+ /** Gets the ID of an element that should be used a description for the calendar overlay. */
1916
+ getOverlayLabelId(): string | null;
1917
+ /** Gets the value that is used to mirror the state input. */
1918
+ _getInputMirrorValue(part: 'start' | 'end'): string;
1919
+ /** Whether the input placeholders should be hidden. */
1920
+ _shouldHidePlaceholders(): boolean;
1921
+ /** Handles the value in one of the child inputs changing. */
1922
+ _handleChildValueChange(): void;
1923
+ /** Opens the date range picker associated with the input. */
1924
+ _openDatepicker(): void;
1925
+ /** Whether the separate text should be hidden. */
1926
+ _shouldHideSeparator(): boolean | "" | null;
1927
+ /** Gets the value for the `aria-labelledby` attribute of the inputs. */
1928
+ _getAriaLabelledby(): string | null;
1929
+ _getStartDateAccessibleName(): string;
1930
+ _getEndDateAccessibleName(): string;
1931
+ /** Updates the focused state of the range input. */
1932
+ _updateFocus(origin: FocusOrigin): void;
1933
+ /** Re-runs the validators on the start/end inputs. */
1934
+ private _revalidate;
1935
+ /** Registers the current date selection model with the start/end inputs. */
1936
+ private _registerModel;
1937
+ /** Checks whether a specific range input directive is required. */
1938
+ private _isTargetRequired;
1939
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDateRangeInput<any>, never>;
1940
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatDateRangeInput<any>, "ngx-mat-date-range-input", ["ngxMatDateRangeInput"], {
1941
+ "rangePicker": {
1942
+ "alias": "rangePicker";
1943
+ "required": false;
1944
+ };
1945
+ "required": {
1946
+ "alias": "required";
1947
+ "required": false;
1948
+ };
1949
+ "dateFilter": {
1950
+ "alias": "dateFilter";
1951
+ "required": false;
1952
+ };
1953
+ "min": {
1954
+ "alias": "min";
1955
+ "required": false;
1956
+ };
1957
+ "max": {
1958
+ "alias": "max";
1959
+ "required": false;
1960
+ };
1961
+ "disabled": {
1962
+ "alias": "disabled";
1963
+ "required": false;
1964
+ };
1965
+ "separator": {
1966
+ "alias": "separator";
1967
+ "required": false;
1968
+ };
1969
+ "comparisonStart": {
1970
+ "alias": "comparisonStart";
1971
+ "required": false;
1972
+ };
1973
+ "comparisonEnd": {
1974
+ "alias": "comparisonEnd";
1975
+ "required": false;
1976
+ };
1977
+ }, {}, ["_startInput", "_endInput"], ["input[matStartDate]", "input[matEndDate]"], true, never>;
1471
1978
  }
1472
-
1473
1979
  /** Injection token used to customize the date range selection behavior. */
1474
- declare const NGX_MAT_DATE_RANGE_SELECTION_STRATEGY: InjectionToken<NgxMatDateRangeSelectionStrategy<any>>;
1980
+ export declare const NGX_MAT_DATE_RANGE_SELECTION_STRATEGY: InjectionToken<NgxMatDateRangeSelectionStrategy<any>>;
1475
1981
  /** Object that can be provided in order to customize the date range selection behavior. */
1476
- interface NgxMatDateRangeSelectionStrategy<D> {
1477
- /**
1478
- * Called when the user has finished selecting a value.
1479
- * @param date Date that was selected. Will be null if the user cleared the selection.
1480
- * @param currentRange Range that is currently show in the calendar.
1481
- * @param event DOM event that triggered the selection. Currently only corresponds to a `click`
1482
- * event, but it may get expanded in the future.
1483
- */
1484
- selectionFinished(date: D | null, currentRange: NgxDateRange<D>, event: Event): NgxDateRange<D>;
1485
- /**
1486
- * Called when the user has activated a new date (e.g. by hovering over
1487
- * it or moving focus) and the calendar tries to display a date range.
1488
- *
1489
- * @param activeDate Date that the user has activated. Will be null if the user moved
1490
- * focus to an element that's no a calendar cell.
1491
- * @param currentRange Range that is currently shown in the calendar.
1492
- * @param event DOM event that caused the preview to be changed. Will be either a
1493
- * `mouseenter`/`mouseleave` or `focus`/`blur` depending on how the user is navigating.
1494
- */
1495
- createPreview(activeDate: D | null, currentRange: NgxDateRange<D>, event: Event): NgxDateRange<D>;
1496
- /**
1497
- * Called when the user has dragged a date in the currently selected range to another
1498
- * date. Returns the date updated range that should result from this interaction.
1499
- *
1500
- * @param dateOrigin The date the user started dragging from.
1501
- * @param originalRange The originally selected date range.
1502
- * @param newDate The currently targeted date in the drag operation.
1503
- * @param event DOM event that triggered the updated drag state. Will be
1504
- * `mouseenter`/`mouseup` or `touchmove`/`touchend` depending on the device type.
1505
- */
1506
- createDrag?(dragOrigin: D, originalRange: NgxDateRange<D>, newDate: D, event: Event): NgxDateRange<D> | null;
1982
+ export interface NgxMatDateRangeSelectionStrategy<D> {
1983
+ /**
1984
+ * Called when the user has finished selecting a value.
1985
+ * @param date Date that was selected. Will be null if the user cleared the selection.
1986
+ * @param currentRange Range that is currently show in the calendar.
1987
+ * @param event DOM event that triggered the selection. Currently only corresponds to a `click`
1988
+ * event, but it may get expanded in the future.
1989
+ */
1990
+ selectionFinished(date: D | null, currentRange: NgxDateRange<D>, event: Event): NgxDateRange<D>;
1991
+ /**
1992
+ * Called when the user has activated a new date (e.g. by hovering over
1993
+ * it or moving focus) and the calendar tries to display a date range.
1994
+ *
1995
+ * @param activeDate Date that the user has activated. Will be null if the user moved
1996
+ * focus to an element that's no a calendar cell.
1997
+ * @param currentRange Range that is currently shown in the calendar.
1998
+ * @param event DOM event that caused the preview to be changed. Will be either a
1999
+ * `mouseenter`/`mouseleave` or `focus`/`blur` depending on how the user is navigating.
2000
+ */
2001
+ createPreview(activeDate: D | null, currentRange: NgxDateRange<D>, event: Event): NgxDateRange<D>;
2002
+ /**
2003
+ * Called when the user has dragged a date in the currently selected range to another
2004
+ * date. Returns the date updated range that should result from this interaction.
2005
+ *
2006
+ * @param dateOrigin The date the user started dragging from.
2007
+ * @param originalRange The originally selected date range.
2008
+ * @param newDate The currently targeted date in the drag operation.
2009
+ * @param event DOM event that triggered the updated drag state. Will be
2010
+ * `mouseenter`/`mouseup` or `touchmove`/`touchend` depending on the device type.
2011
+ */
2012
+ createDrag?(dragOrigin: D, originalRange: NgxDateRange<D>, newDate: D, event: Event): NgxDateRange<D> | null;
1507
2013
  }
1508
2014
  /** Provides the default date range selection behavior. */
1509
- declare class DefaultNgxMatCalendarRangeStrategy<D> implements NgxMatDateRangeSelectionStrategy<D> {
1510
- private _dateAdapter;
1511
- selectionFinished(date: D, currentRange: NgxDateRange<D>): NgxDateRange<D>;
1512
- createPreview(activeDate: D | null, currentRange: NgxDateRange<D>): NgxDateRange<D>;
1513
- createDrag(dragOrigin: D, originalRange: NgxDateRange<D>, newDate: D): NgxDateRange<D> | null;
1514
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DefaultNgxMatCalendarRangeStrategy<any>, never>;
1515
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<any>;
2015
+ export declare class DefaultNgxMatCalendarRangeStrategy<D> implements NgxMatDateRangeSelectionStrategy<D> {
2016
+ private _dateAdapter;
2017
+ selectionFinished(date: D, currentRange: NgxDateRange<D>): NgxDateRange<D>;
2018
+ createPreview(activeDate: D | null, currentRange: NgxDateRange<D>): NgxDateRange<D>;
2019
+ createDrag(dragOrigin: D, originalRange: NgxDateRange<D>, newDate: D): NgxDateRange<D> | null;
2020
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultNgxMatCalendarRangeStrategy<any>, never>;
2021
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1516
2022
  }
1517
2023
  /** @docs-private */
1518
- declare function NGX_MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY(parent: NgxMatDateRangeSelectionStrategy<unknown>): NgxMatDateRangeSelectionStrategy<unknown>;
1519
- declare const NGX_MAT_CALENDAR_RANGE_STRATEGY_PROVIDER: FactoryProvider;
1520
-
2024
+ export declare function NGX_MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY(parent: NgxMatDateRangeSelectionStrategy<unknown>): NgxMatDateRangeSelectionStrategy<unknown>;
2025
+ export declare const NGX_MAT_CALENDAR_RANGE_STRATEGY_PROVIDER: FactoryProvider;
1521
2026
  /** Component responsible for managing the datepicker popup/dialog. */
1522
- declare class NgxMatDatetimepicker<D> extends NgxMatDatepickerBase<NgxMatDatepickerControl<D>, D | null, D> {
1523
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatetimepicker<any>, never>;
1524
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatDatetimepicker<any>, "ngx-mat-datetime-picker", ["ngxMatDatetimePicker"], {}, {}, never, never, true, never>;
2027
+ export declare class NgxMatDatetimepicker<D> extends NgxMatDatepickerBase<NgxMatDatepickerControl<D>, D | null, D> {
2028
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatetimepicker<any>, never>;
2029
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatDatetimepicker<any>, "ngx-mat-datetime-picker", ["ngxMatDatetimePicker"], {}, {}, never, never, true, never>;
1525
2030
  }
1526
-
1527
2031
  /** Button that will close the datepicker and assign the current selection to the data model. */
1528
- declare class NgxMatDatepickerApply {
1529
- readonly _datepicker: NgxMatDatepickerBase<NgxMatDatepickerControl<any>, unknown, {}>;
1530
- _applySelection(): void;
1531
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerApply, never>;
1532
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatDatepickerApply, "[ngxMatDatepickerApply], [ngxMatDateRangePickerApply]", never, {}, {}, never, never, true, never>;
2032
+ export declare class NgxMatDatepickerApply {
2033
+ readonly _datepicker: NgxMatDatepickerBase<NgxMatDatepickerControl<any>, unknown, {}>;
2034
+ _applySelection(): void;
2035
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerApply, never>;
2036
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatDatepickerApply, "[ngxMatDatepickerApply], [ngxMatDateRangePickerApply]", never, {}, {}, never, never, true, never>;
1533
2037
  }
1534
- declare class NgxMatDatepickerClear {
1535
- readonly _datepicker: NgxMatDatepickerBase<NgxMatDatepickerControl<any>, unknown, {}>;
1536
- close: boolean;
1537
- _clearSelection(): void;
1538
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerClear, never>;
1539
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatDatepickerClear, "[ngxMatDatepickerClear], [ngxMatDateRangePickerClear]", never, { "close": { "alias": "close"; "required": false; }; }, {}, never, never, true, never>;
1540
- static ngAcceptInputType_close: unknown;
2038
+ export declare class NgxMatDatepickerClear {
2039
+ readonly _datepicker: NgxMatDatepickerBase<NgxMatDatepickerControl<any>, unknown, {}>;
2040
+ close: boolean;
2041
+ _clearSelection(): void;
2042
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerClear, never>;
2043
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatDatepickerClear, "[ngxMatDatepickerClear], [ngxMatDateRangePickerClear]", never, {
2044
+ "close": {
2045
+ "alias": "close";
2046
+ "required": false;
2047
+ };
2048
+ }, {}, never, never, true, never>;
2049
+ static ngAcceptInputType_close: unknown;
1541
2050
  }
1542
2051
  /** Button that will close the datepicker and discard the current selection. */
1543
- declare class NgxMatDatepickerCancel {
1544
- readonly _datepicker: NgxMatDatepickerBase<NgxMatDatepickerControl<any>, unknown, {}>;
1545
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerCancel, never>;
1546
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatDatepickerCancel, "[ngxMatDatepickerCancel], [ngxMatDateRangePickerCancel]", never, {}, {}, never, never, true, never>;
2052
+ export declare class NgxMatDatepickerCancel {
2053
+ readonly _datepicker: NgxMatDatepickerBase<NgxMatDatepickerControl<any>, unknown, {}>;
2054
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerCancel, never>;
2055
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatDatepickerCancel, "[ngxMatDatepickerCancel], [ngxMatDateRangePickerCancel]", never, {}, {}, never, never, true, never>;
1547
2056
  }
1548
2057
  /**
1549
2058
  * Container that can be used to project a row of action buttons
1550
2059
  * to the bottom of a datepicker or date range picker.
1551
2060
  */
1552
- declare class NgxMatDatepickerActions implements AfterViewInit, OnDestroy {
1553
- _template: _angular_core.Signal<TemplateRef<unknown> | undefined>;
1554
- private _portal;
1555
- private _datepicker;
1556
- private _viewContainerRef;
1557
- ngAfterViewInit(): void;
1558
- ngOnDestroy(): void;
1559
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerActions, never>;
1560
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatDatepickerActions, "ngx-mat-datepicker-actions, ngx-mat-date-range-picker-actions", never, {}, {}, never, ["*"], true, never>;
2061
+ export declare class NgxMatDatepickerActions implements AfterViewInit, OnDestroy {
2062
+ _template: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
2063
+ private _portal;
2064
+ private _datepicker;
2065
+ private _viewContainerRef;
2066
+ ngAfterViewInit(): void;
2067
+ ngOnDestroy(): void;
2068
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerActions, never>;
2069
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatDatepickerActions, "ngx-mat-datepicker-actions, ngx-mat-date-range-picker-actions", never, {}, {}, never, ["*"], true, never>;
1561
2070
  }
1562
-
1563
2071
  /** @docs-private */
1564
- declare const NGX_MAT_DATEPICKER_VALUE_ACCESSOR: {
1565
- provide: _angular_core.InjectionToken<readonly _angular_forms.ControlValueAccessor[]>;
1566
- useExisting: _angular_core.Type<any>;
1567
- multi: boolean;
2072
+ export declare const NGX_MAT_DATEPICKER_VALUE_ACCESSOR: {
2073
+ provide: import("@angular/core").InjectionToken<readonly import("@angular/forms").ControlValueAccessor[]>;
2074
+ useExisting: import("@angular/core").Type<any>;
2075
+ multi: boolean;
1568
2076
  };
1569
2077
  /** @docs-private */
1570
- declare const NGX_MAT_DATEPICKER_VALIDATORS: {
1571
- provide: _angular_core.InjectionToken<readonly (Function | _angular_forms.Validator)[]>;
1572
- useExisting: _angular_core.Type<any>;
1573
- multi: boolean;
2078
+ export declare const NGX_MAT_DATEPICKER_VALIDATORS: {
2079
+ provide: import("@angular/core").InjectionToken<readonly (Function | import("@angular/forms").Validator)[]>;
2080
+ useExisting: import("@angular/core").Type<any>;
2081
+ multi: boolean;
1574
2082
  };
1575
2083
  /** Directive used to connect an input to a MatDatepicker. */
1576
- declare class NgxMatDatepickerInput<D> extends NgxMatDatepickerInputBase<D | null, D> implements NgxMatDatepickerControl<D | null>, OnDestroy {
1577
- private _closedSubscription;
1578
- /** The datepicker that this input is associated with. */
1579
- set ngxMatDatetimePicker(datepicker: NgxMatDatepickerPanel<NgxMatDatepickerControl<D>, D | null, D>);
1580
- _datepicker: NgxMatDatepickerPanel<NgxMatDatepickerControl<D>, D | null, D> | null;
1581
- /** The minimum valid date. */
1582
- get min(): D | null;
1583
- set min(value: D | null);
1584
- private _min;
1585
- /** The maximum valid date. */
1586
- get max(): D | null;
1587
- set max(value: D | null);
1588
- private _max;
1589
- /** Function that can be used to filter out dates within the datepicker. */
1590
- get dateFilter(): NgxDateFilterFn<D | null>;
1591
- set dateFilter(value: NgxDateFilterFn<D | null>);
1592
- private _dateFilter;
1593
- /** The combined form control validator for this input. */
1594
- protected _validator: ValidatorFn | null;
1595
- private _formField;
1596
- constructor();
1597
- /**
1598
- * Gets the element that the datepicker popup should be connected to.
1599
- * @return The element to connect the popup to.
1600
- */
1601
- getConnectedOverlayOrigin(): ElementRef;
1602
- /** Gets the ID of an element that should be used a description for the calendar overlay. */
1603
- getOverlayLabelId(): string | null;
1604
- /** Returns the palette used by the input's form field, if any. */
1605
- getThemePalette(): ThemePalette;
1606
- /** Gets the value at which the calendar should start. */
1607
- getStartValue(): D | null;
1608
- ngOnDestroy(): void;
1609
- /** Opens the associated datepicker. */
1610
- protected _openPopup(): void;
1611
- protected _getValueFromModel(modelValue: D | null): D | null;
1612
- protected _assignValueToModel(value: D | null): void;
1613
- /** Gets the input's minimum date. */
1614
- _getMinDate(): D | null;
1615
- /** Gets the input's maximum date. */
1616
- _getMaxDate(): D | null;
1617
- /** Gets the input's date filtering function. */
1618
- protected _getDateFilter(): NgxDateFilterFn<D | null>;
1619
- protected _shouldHandleChangeEvent(event: NgxDateSelectionModelChange<D>): boolean;
1620
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerInput<any>, never>;
1621
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatDatepickerInput<any>, "input[ngxMatDatetimePicker]", ["ngxMatDatepickerInput"], { "ngxMatDatetimePicker": { "alias": "ngxMatDatetimePicker"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "dateFilter": { "alias": "matDatepickerFilter"; "required": false; }; }, {}, never, never, true, never>;
2084
+ export declare class NgxMatDatepickerInput<D> extends NgxMatDatepickerInputBase<D | null, D> implements NgxMatDatepickerControl<D | null>, OnDestroy {
2085
+ private _closedSubscription;
2086
+ /** The datepicker that this input is associated with. */
2087
+ set ngxMatDatetimePicker(datepicker: NgxMatDatepickerPanel<NgxMatDatepickerControl<D>, D | null, D>);
2088
+ _datepicker: NgxMatDatepickerPanel<NgxMatDatepickerControl<D>, D | null, D> | null;
2089
+ /** The minimum valid date. */
2090
+ get min(): D | null;
2091
+ set min(value: D | null);
2092
+ private _min;
2093
+ /** The maximum valid date. */
2094
+ get max(): D | null;
2095
+ set max(value: D | null);
2096
+ private _max;
2097
+ /** Function that can be used to filter out dates within the datepicker. */
2098
+ get dateFilter(): NgxDateFilterFn<D | null>;
2099
+ set dateFilter(value: NgxDateFilterFn<D | null>);
2100
+ private _dateFilter;
2101
+ /** The combined form control validator for this input. */
2102
+ protected _validator: ValidatorFn | null;
2103
+ private _formField;
2104
+ constructor();
2105
+ /**
2106
+ * Gets the element that the datepicker popup should be connected to.
2107
+ * @return The element to connect the popup to.
2108
+ */
2109
+ getConnectedOverlayOrigin(): ElementRef;
2110
+ /** Gets the ID of an element that should be used a description for the calendar overlay. */
2111
+ getOverlayLabelId(): string | null;
2112
+ /** Returns the palette used by the input's form field, if any. */
2113
+ getThemePalette(): ThemePalette;
2114
+ /** Gets the value at which the calendar should start. */
2115
+ getStartValue(): D | null;
2116
+ ngOnDestroy(): void;
2117
+ /** Opens the associated datepicker. */
2118
+ protected _openPopup(): void;
2119
+ protected _getValueFromModel(modelValue: D | null): D | null;
2120
+ protected _assignValueToModel(value: D | null): void;
2121
+ /** Gets the input's minimum date. */
2122
+ _getMinDate(): D | null;
2123
+ /** Gets the input's maximum date. */
2124
+ _getMaxDate(): D | null;
2125
+ /** Gets the input's date filtering function. */
2126
+ protected _getDateFilter(): NgxDateFilterFn<D | null>;
2127
+ protected _shouldHandleChangeEvent(event: NgxDateSelectionModelChange<D>): boolean;
2128
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerInput<any>, never>;
2129
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatDatepickerInput<any>, "input[ngxMatDatetimePicker]", ["ngxMatDatepickerInput"], {
2130
+ "ngxMatDatetimePicker": {
2131
+ "alias": "ngxMatDatetimePicker";
2132
+ "required": false;
2133
+ };
2134
+ "min": {
2135
+ "alias": "min";
2136
+ "required": false;
2137
+ };
2138
+ "max": {
2139
+ "alias": "max";
2140
+ "required": false;
2141
+ };
2142
+ "dateFilter": {
2143
+ "alias": "matDatepickerFilter";
2144
+ "required": false;
2145
+ };
2146
+ }, {}, never, never, true, never>;
1622
2147
  }
1623
-
1624
2148
  /** Can be used to override the icon of a `matDatepickerToggle`. */
1625
- declare class NgxMatDatepickerToggleIcon {
1626
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerToggleIcon, never>;
1627
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatDatepickerToggleIcon, "[ngxMatDatepickerToggleIcon]", never, {}, {}, never, never, true, never>;
2149
+ export declare class NgxMatDatepickerToggleIcon {
2150
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerToggleIcon, never>;
2151
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatDatepickerToggleIcon, "[ngxMatDatepickerToggleIcon]", never, {}, {}, never, never, true, never>;
1628
2152
  }
1629
- declare class NgxMatDatepickerToggle<D> implements AfterContentInit, OnDestroy {
1630
- private _stateChanges;
1631
- /** Datepicker instance that the button will toggle. */
1632
- readonly datepicker: _angular_core.InputSignal<NgxMatDatepickerPanel<NgxMatDatepickerControl<any>, D, NgxExtractDateTypeFromSelection<D>> | undefined>;
1633
- /** Tabindex for the toggle. */
1634
- tabIndex: number | null;
1635
- /** Screen-reader label for the button. */
1636
- readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
1637
- /** Whether the toggle button is disabled. */
1638
- get disabled(): boolean;
1639
- set disabled(value: BooleanInput);
1640
- private _disabled;
1641
- /** Whether ripples on the toggle should be disabled. */
1642
- disableRipple: _angular_core.InputSignal<boolean | undefined>;
1643
- /** Underlying button element. */
1644
- _button: _angular_core.Signal<MatButton | undefined>;
1645
- _intl: NgxMatDatepickerIntl;
1646
- private _changeDetectorRef;
1647
- constructor(defaultTabIndex: string);
1648
- ngOnDestroy(): void;
1649
- ngAfterContentInit(): void;
1650
- _open(event: Event): void;
1651
- private _watchStateChanges;
1652
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatepickerToggle<any>, [{ attribute: "tabindex"; }]>;
1653
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatDatepickerToggle<any>, "ngx-mat-datepicker-toggle", ["ngxMatDatepickerToggle"], { "datepicker": { "alias": "for"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; "isSignal": true; }; }, {}, never, ["[ngxMatDatepickerToggleIcon]"], true, never>;
2153
+ export declare class NgxMatDatepickerToggle<D> implements AfterContentInit, OnDestroy {
2154
+ private _stateChanges;
2155
+ /** Datepicker instance that the button will toggle. */
2156
+ readonly datepicker: import("@angular/core").InputSignal<NgxMatDatepickerPanel<NgxMatDatepickerControl<any>, D, NgxExtractDateTypeFromSelection<D>> | undefined>;
2157
+ /** Tabindex for the toggle. */
2158
+ tabIndex: number | null;
2159
+ /** Screen-reader label for the button. */
2160
+ readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
2161
+ /** Whether the toggle button is disabled. */
2162
+ get disabled(): boolean;
2163
+ set disabled(value: BooleanInput);
2164
+ private _disabled;
2165
+ /** Whether ripples on the toggle should be disabled. */
2166
+ disableRipple: import("@angular/core").InputSignal<boolean | undefined>;
2167
+ /** Underlying button element. */
2168
+ _button: import("@angular/core").Signal<MatButton | undefined>;
2169
+ _intl: NgxMatDatepickerIntl;
2170
+ private _changeDetectorRef;
2171
+ constructor(defaultTabIndex: string);
2172
+ ngOnDestroy(): void;
2173
+ ngAfterContentInit(): void;
2174
+ _open(event: Event): void;
2175
+ private _watchStateChanges;
2176
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatepickerToggle<any>, [{
2177
+ attribute: "tabindex";
2178
+ }]>;
2179
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatDatepickerToggle<any>, "ngx-mat-datepicker-toggle", ["ngxMatDatepickerToggle"], {
2180
+ "datepicker": {
2181
+ "alias": "for";
2182
+ "required": false;
2183
+ "isSignal": true;
2184
+ };
2185
+ "tabIndex": {
2186
+ "alias": "tabIndex";
2187
+ "required": false;
2188
+ };
2189
+ "ariaLabel": {
2190
+ "alias": "aria-label";
2191
+ "required": false;
2192
+ "isSignal": true;
2193
+ };
2194
+ "disabled": {
2195
+ "alias": "disabled";
2196
+ "required": false;
2197
+ };
2198
+ "disableRipple": {
2199
+ "alias": "disableRipple";
2200
+ "required": false;
2201
+ "isSignal": true;
2202
+ };
2203
+ }, {}, never, ["[ngxMatDatepickerToggleIcon]"], true, never>;
1654
2204
  }
1655
-
1656
- declare enum MERIDIANS {
1657
- AM = "AM",
1658
- PM = "PM"
2205
+ export declare enum MERIDIANS {
2206
+ AM = "AM",
2207
+ PM = "PM"
1659
2208
  }
1660
- declare class NgxMatTimepickerComponent<D> implements ControlValueAccessor {
1661
- private readonly formBuilder;
1662
- private readonly _dateAdapter;
1663
- readonly disabled: InputSignal<boolean>;
1664
- readonly showSpinners: InputSignal<boolean>;
1665
- readonly stepHour: InputSignal<number>;
1666
- readonly stepMinute: InputSignal<number>;
1667
- readonly stepSecond: InputSignal<number>;
1668
- readonly showSeconds: InputSignal<boolean>;
1669
- readonly disableMinute: InputSignal<boolean>;
1670
- readonly enableMeridian: InputSignal<boolean>;
1671
- readonly defaultTime: InputSignal<[number, number, number] | undefined>;
1672
- readonly color: InputSignal<ThemePalette>;
1673
- readonly pattern: RegExp;
1674
- readonly meridianInput: InputSignal<MERIDIANS>;
1675
- readonly meridian: _angular_core.WritableSignal<MERIDIANS>;
1676
- readonly form: _angular_forms.FormGroup<{
1677
- hour: FormControl<string | null>;
1678
- minute: FormControl<string | null>;
1679
- second: FormControl<string | null>;
1680
- }>;
1681
- private _onChange;
1682
- private _onTouched;
1683
- readonly value: _angular_core.ModelSignal<D | undefined>;
1684
- /** Hour */
1685
- private get hour();
1686
- private get minute();
1687
- private get second();
1688
- constructor();
1689
- writeValue(val: D): void;
1690
- registerOnChange(fn: (_: D) => void): void;
1691
- registerOnTouched(fn: () => void): void;
1692
- setDisabledState(isDisabled: boolean): void;
1693
- formatInput(input: HTMLInputElement): void;
1694
- toggleMeridian(): void;
1695
- change(prop: 'hour' | 'minute' | 'second', up?: boolean): void;
1696
- private _updateHourMinuteSecond;
1697
- /** Update model */
1698
- private _updateModel;
1699
- private castKey;
1700
- /**
1701
- * Get next value by property
1702
- */
1703
- private _getNextValueByProp;
1704
- /**
1705
- * Set disable states
1706
- */
1707
- private _setDisableStates;
1708
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatTimepickerComponent<any>, never>;
1709
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatTimepickerComponent<any>, "ngx-mat-timepicker", ["ngxMatTimepicker"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "showSpinners": { "alias": "showSpinners"; "required": false; "isSignal": true; }; "stepHour": { "alias": "stepHour"; "required": false; "isSignal": true; }; "stepMinute": { "alias": "stepMinute"; "required": false; "isSignal": true; }; "stepSecond": { "alias": "stepSecond"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "disableMinute": { "alias": "disableMinute"; "required": false; "isSignal": true; }; "enableMeridian": { "alias": "enableMeridian"; "required": false; "isSignal": true; }; "defaultTime": { "alias": "defaultTime"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "meridianInput": { "alias": "meridian"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
2209
+ export declare class NgxMatTimepickerComponent<D> implements ControlValueAccessor {
2210
+ private readonly formBuilder;
2211
+ private readonly _dateAdapter;
2212
+ readonly disabled: InputSignal<boolean>;
2213
+ readonly showSpinners: InputSignal<boolean>;
2214
+ readonly stepHour: InputSignal<number>;
2215
+ readonly stepMinute: InputSignal<number>;
2216
+ readonly stepSecond: InputSignal<number>;
2217
+ readonly showSeconds: InputSignal<boolean>;
2218
+ readonly disableMinute: InputSignal<boolean>;
2219
+ readonly enableMeridian: InputSignal<boolean>;
2220
+ readonly defaultTime: InputSignal<[number, number, number] | undefined>;
2221
+ readonly color: InputSignal<ThemePalette>;
2222
+ readonly pattern: RegExp;
2223
+ readonly meridianInput: InputSignal<MERIDIANS>;
2224
+ readonly meridian: import("@angular/core").WritableSignal<MERIDIANS>;
2225
+ readonly form: import("@angular/forms").FormGroup<{
2226
+ hour: FormControl<string | null>;
2227
+ minute: FormControl<string | null>;
2228
+ second: FormControl<string | null>;
2229
+ }>;
2230
+ private _onChange;
2231
+ private _onTouched;
2232
+ readonly value: import("@angular/core").ModelSignal<D | undefined>;
2233
+ /** Hour */
2234
+ private get hour();
2235
+ private get minute();
2236
+ private get second();
2237
+ constructor();
2238
+ writeValue(val: D): void;
2239
+ registerOnChange(fn: (_: D) => void): void;
2240
+ registerOnTouched(fn: () => void): void;
2241
+ setDisabledState(isDisabled: boolean): void;
2242
+ formatInput(input: HTMLInputElement): void;
2243
+ toggleMeridian(): void;
2244
+ change(prop: 'hour' | 'minute' | 'second', up?: boolean): void;
2245
+ private _updateHourMinuteSecond;
2246
+ /** Update model */
2247
+ private _updateModel;
2248
+ private castKey;
2249
+ /**
2250
+ * Get next value by property
2251
+ */
2252
+ private _getNextValueByProp;
2253
+ /**
2254
+ * Set disable states
2255
+ */
2256
+ private _setDisableStates;
2257
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatTimepickerComponent<any>, never>;
2258
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatTimepickerComponent<any>, "ngx-mat-timepicker", ["ngxMatTimepicker"], {
2259
+ "disabled": {
2260
+ "alias": "disabled";
2261
+ "required": false;
2262
+ "isSignal": true;
2263
+ };
2264
+ "showSpinners": {
2265
+ "alias": "showSpinners";
2266
+ "required": false;
2267
+ "isSignal": true;
2268
+ };
2269
+ "stepHour": {
2270
+ "alias": "stepHour";
2271
+ "required": false;
2272
+ "isSignal": true;
2273
+ };
2274
+ "stepMinute": {
2275
+ "alias": "stepMinute";
2276
+ "required": false;
2277
+ "isSignal": true;
2278
+ };
2279
+ "stepSecond": {
2280
+ "alias": "stepSecond";
2281
+ "required": false;
2282
+ "isSignal": true;
2283
+ };
2284
+ "showSeconds": {
2285
+ "alias": "showSeconds";
2286
+ "required": false;
2287
+ "isSignal": true;
2288
+ };
2289
+ "disableMinute": {
2290
+ "alias": "disableMinute";
2291
+ "required": false;
2292
+ "isSignal": true;
2293
+ };
2294
+ "enableMeridian": {
2295
+ "alias": "enableMeridian";
2296
+ "required": false;
2297
+ "isSignal": true;
2298
+ };
2299
+ "defaultTime": {
2300
+ "alias": "defaultTime";
2301
+ "required": false;
2302
+ "isSignal": true;
2303
+ };
2304
+ "color": {
2305
+ "alias": "color";
2306
+ "required": false;
2307
+ "isSignal": true;
2308
+ };
2309
+ "meridianInput": {
2310
+ "alias": "meridian";
2311
+ "required": false;
2312
+ "isSignal": true;
2313
+ };
2314
+ "value": {
2315
+ "alias": "value";
2316
+ "required": false;
2317
+ "isSignal": true;
2318
+ };
2319
+ }, {
2320
+ "value": "valueChange";
2321
+ }, never, never, true, never>;
1710
2322
  }
1711
-
1712
- interface NgxMatDatetimePickerContentData<D> {
1713
- color?: ThemePalette;
1714
- touchUi?: boolean;
1715
- hideTime?: boolean;
1716
- showSpinners?: boolean;
1717
- showSeconds?: boolean;
1718
- stepHour?: number;
1719
- stepMinute?: number;
1720
- stepSecond?: number;
1721
- enableMeridian?: boolean;
1722
- defaultTime?: [number, number, number];
1723
- preventOverlayClick?: boolean;
1724
- disabled?: boolean;
1725
- startView?: MatCalendarView;
1726
- minDate?: D | null;
1727
- maxDate?: D | null;
1728
- dateFilter?: (date: D) => boolean;
1729
- value?: D | null;
2323
+ export interface NgxMatDatetimePickerContentData<D> {
2324
+ color?: ThemePalette;
2325
+ touchUi?: boolean;
2326
+ hideTime?: boolean;
2327
+ showSpinners?: boolean;
2328
+ showSeconds?: boolean;
2329
+ stepHour?: number;
2330
+ stepMinute?: number;
2331
+ stepSecond?: number;
2332
+ enableMeridian?: boolean;
2333
+ defaultTime?: [number, number, number];
2334
+ preventOverlayClick?: boolean;
2335
+ disabled?: boolean;
2336
+ startView?: MatCalendarView;
2337
+ minDate?: D | null;
2338
+ maxDate?: D | null;
2339
+ dateFilter?: (date: D) => boolean;
2340
+ value?: D | null;
1730
2341
  }
1731
- declare class NgxMatDatetimePickerContentV2<D> implements OnInit, OnDestroy {
1732
- calendar: MatCalendar<D>;
1733
- timepicker: NgxMatTimepickerComponent<D>;
1734
- readonly dialogRef: MatDialogRef<any, any>;
1735
- readonly data: NgxMatDatetimePickerContentData<D>;
1736
- private readonly _dateAdapter;
1737
- private readonly _destroyed;
1738
- readonly selectedDate: _angular_core.WritableSignal<D | null>;
1739
- readonly selectedDateTime: _angular_core.WritableSignal<D | null>;
1740
- constructor();
1741
- ngOnInit(): void;
1742
- ngOnDestroy(): void;
1743
- onDateSelected(date: D | null): void;
1744
- onYearSelected(_: D): void;
1745
- onMonthSelected(_: D): void;
1746
- onTimeChanged(time: D | null): void;
1747
- onApply(): void;
1748
- onCancel(): void;
1749
- private _getDefaultTime;
1750
- private _extractTimeFromDate;
1751
- private _combineDateTime;
1752
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatetimePickerContentV2<any>, never>;
1753
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatDatetimePickerContentV2<any>, "ngx-mat-datetime-picker-content-v2", never, {}, {}, never, never, true, never>;
2342
+ export declare class NgxMatDatetimePickerContentV2<D> implements OnInit, OnDestroy {
2343
+ calendar: MatCalendar<D>;
2344
+ timepicker: NgxMatTimepickerComponent<D>;
2345
+ readonly dialogRef: MatDialogRef<any, any>;
2346
+ readonly data: NgxMatDatetimePickerContentData<D>;
2347
+ private readonly _dateAdapter;
2348
+ private readonly _destroyed;
2349
+ readonly selectedDate: import("@angular/core").WritableSignal<D | null>;
2350
+ readonly selectedDateTime: import("@angular/core").WritableSignal<D | null>;
2351
+ constructor();
2352
+ ngOnInit(): void;
2353
+ ngOnDestroy(): void;
2354
+ onDateSelected(date: D | null): void;
2355
+ onYearSelected(_: D): void;
2356
+ onMonthSelected(_: D): void;
2357
+ onTimeChanged(time: D | null): void;
2358
+ onApply(): void;
2359
+ onCancel(): void;
2360
+ private _getDefaultTime;
2361
+ private _extractTimeFromDate;
2362
+ private _combineDateTime;
2363
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatetimePickerContentV2<any>, never>;
2364
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatDatetimePickerContentV2<any>, "ngx-mat-datetime-picker-content-v2", never, {}, {}, never, never, true, never>;
1754
2365
  }
1755
-
1756
- declare class NgxMatDatetimePickerV2<D> implements OnDestroy {
1757
- private readonly _dialog;
1758
- private readonly _dateAdapter;
1759
- private _dialogRef;
1760
- private _inputStateChanges;
1761
- /** The id for the datepicker. */
1762
- readonly id: string;
1763
- /** The input element this datepicker is associated with. */
1764
- datepickerInput: NgxMatDatepickerControl<D> | null;
1765
- /** Emits when the datepicker is disabled. */
1766
- readonly stateChanges: Subject<void>;
1767
- /** Emits when the datepicker has been opened. */
1768
- readonly openedStream: EventEmitter<void>;
1769
- /** Emits when the datepicker has been closed. */
1770
- readonly closedStream: EventEmitter<void>;
1771
- readonly startView: _angular_core.InputSignal<MatCalendarView>;
1772
- readonly color: _angular_core.InputSignal<ThemePalette>;
1773
- readonly touchUi: _angular_core.InputSignal<boolean>;
1774
- readonly disabled: _angular_core.InputSignal<boolean>;
1775
- readonly hideTime: _angular_core.InputSignal<boolean>;
1776
- readonly showSpinners: _angular_core.InputSignal<boolean>;
1777
- readonly showSeconds: _angular_core.InputSignal<boolean>;
1778
- readonly stepHour: _angular_core.InputSignal<number>;
1779
- readonly stepMinute: _angular_core.InputSignal<number>;
1780
- readonly stepSecond: _angular_core.InputSignal<number>;
1781
- readonly enableMeridian: _angular_core.InputSignal<boolean>;
1782
- readonly disableMinute: _angular_core.InputSignal<boolean>;
1783
- readonly defaultTime: _angular_core.InputSignal<number[] | undefined>;
1784
- readonly startAt: _angular_core.InputSignal<D | null>;
1785
- readonly panelClass: _angular_core.InputSignal<string | string[]>;
1786
- private readonly _opened;
1787
- readonly opened: _angular_core.Signal<boolean>;
1788
- constructor();
1789
- ngOnDestroy(): void;
1790
- /** Register an input with this datepicker. */
1791
- _registerInput(input: NgxMatDatepickerControl<D>): void;
1792
- /** Open the calendar. */
1793
- open(): void;
1794
- /** Close the calendar. */
1795
- close(): void;
1796
- /** Applies the current pending selection on the overlay to the model. */
1797
- select(_: D): void;
1798
- /** Get the minimum date from the input. */
1799
- _getMinDate(): D | null;
1800
- /** Get the maximum date from the input. */
1801
- _getMaxDate(): D | null;
1802
- /** Get the date filter from the input. */
1803
- _getDateFilter(): ((date: D) => boolean) | null;
1804
- /** Open the calendar as a dialog. */
1805
- private _openAsDialog;
1806
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatetimePickerV2<any>, never>;
1807
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMatDatetimePickerV2<any>, "ngx-mat-datetime-picker", ["ngxMatDatetimePicker"], { "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "touchUi": { "alias": "touchUi"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "hideTime": { "alias": "hideTime"; "required": false; "isSignal": true; }; "showSpinners": { "alias": "showSpinners"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "stepHour": { "alias": "stepHour"; "required": false; "isSignal": true; }; "stepMinute": { "alias": "stepMinute"; "required": false; "isSignal": true; }; "stepSecond": { "alias": "stepSecond"; "required": false; "isSignal": true; }; "enableMeridian": { "alias": "enableMeridian"; "required": false; "isSignal": true; }; "disableMinute": { "alias": "disableMinute"; "required": false; "isSignal": true; }; "defaultTime": { "alias": "defaultTime"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; }, { "openedStream": "openedStream"; "closedStream": "closedStream"; }, never, never, true, never>;
2366
+ export declare class NgxMatDatetimePickerV2<D> implements OnDestroy {
2367
+ private readonly _dialog;
2368
+ private readonly _dateAdapter;
2369
+ private _dialogRef;
2370
+ private _inputStateChanges;
2371
+ /** The id for the datepicker. */
2372
+ readonly id: string;
2373
+ /** The input element this datepicker is associated with. */
2374
+ datepickerInput: NgxMatDatepickerControl<D> | null;
2375
+ /** Emits when the datepicker is disabled. */
2376
+ readonly stateChanges: Subject<void>;
2377
+ /** Emits when the datepicker has been opened. */
2378
+ readonly openedStream: EventEmitter<void>;
2379
+ /** Emits when the datepicker has been closed. */
2380
+ readonly closedStream: EventEmitter<void>;
2381
+ readonly startView: import("@angular/core").InputSignal<MatCalendarView>;
2382
+ readonly color: import("@angular/core").InputSignal<ThemePalette>;
2383
+ readonly touchUi: import("@angular/core").InputSignal<boolean>;
2384
+ readonly disabled: import("@angular/core").InputSignal<boolean>;
2385
+ readonly hideTime: import("@angular/core").InputSignal<boolean>;
2386
+ readonly showSpinners: import("@angular/core").InputSignal<boolean>;
2387
+ readonly showSeconds: import("@angular/core").InputSignal<boolean>;
2388
+ readonly stepHour: import("@angular/core").InputSignal<number>;
2389
+ readonly stepMinute: import("@angular/core").InputSignal<number>;
2390
+ readonly stepSecond: import("@angular/core").InputSignal<number>;
2391
+ readonly enableMeridian: import("@angular/core").InputSignal<boolean>;
2392
+ readonly disableMinute: import("@angular/core").InputSignal<boolean>;
2393
+ readonly defaultTime: import("@angular/core").InputSignal<number[] | undefined>;
2394
+ readonly startAt: import("@angular/core").InputSignal<D | null>;
2395
+ readonly panelClass: import("@angular/core").InputSignal<string | string[]>;
2396
+ private readonly _opened;
2397
+ readonly opened: import("@angular/core").Signal<boolean>;
2398
+ constructor();
2399
+ ngOnDestroy(): void;
2400
+ /** Register an input with this datepicker. */
2401
+ _registerInput(input: NgxMatDatepickerControl<D>): void;
2402
+ /** Open the calendar. */
2403
+ open(): void;
2404
+ /** Close the calendar. */
2405
+ close(): void;
2406
+ /** Applies the current pending selection on the overlay to the model. */
2407
+ select(_: D): void;
2408
+ /** Get the minimum date from the input. */
2409
+ _getMinDate(): D | null;
2410
+ /** Get the maximum date from the input. */
2411
+ _getMaxDate(): D | null;
2412
+ /** Get the date filter from the input. */
2413
+ _getDateFilter(): ((date: D) => boolean) | null;
2414
+ /** Open the calendar as a dialog. */
2415
+ private _openAsDialog;
2416
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatetimePickerV2<any>, never>;
2417
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatDatetimePickerV2<any>, "ngx-mat-datetime-picker", ["ngxMatDatetimePicker"], {
2418
+ "startView": {
2419
+ "alias": "startView";
2420
+ "required": false;
2421
+ "isSignal": true;
2422
+ };
2423
+ "color": {
2424
+ "alias": "color";
2425
+ "required": false;
2426
+ "isSignal": true;
2427
+ };
2428
+ "touchUi": {
2429
+ "alias": "touchUi";
2430
+ "required": false;
2431
+ "isSignal": true;
2432
+ };
2433
+ "disabled": {
2434
+ "alias": "disabled";
2435
+ "required": false;
2436
+ "isSignal": true;
2437
+ };
2438
+ "hideTime": {
2439
+ "alias": "hideTime";
2440
+ "required": false;
2441
+ "isSignal": true;
2442
+ };
2443
+ "showSpinners": {
2444
+ "alias": "showSpinners";
2445
+ "required": false;
2446
+ "isSignal": true;
2447
+ };
2448
+ "showSeconds": {
2449
+ "alias": "showSeconds";
2450
+ "required": false;
2451
+ "isSignal": true;
2452
+ };
2453
+ "stepHour": {
2454
+ "alias": "stepHour";
2455
+ "required": false;
2456
+ "isSignal": true;
2457
+ };
2458
+ "stepMinute": {
2459
+ "alias": "stepMinute";
2460
+ "required": false;
2461
+ "isSignal": true;
2462
+ };
2463
+ "stepSecond": {
2464
+ "alias": "stepSecond";
2465
+ "required": false;
2466
+ "isSignal": true;
2467
+ };
2468
+ "enableMeridian": {
2469
+ "alias": "enableMeridian";
2470
+ "required": false;
2471
+ "isSignal": true;
2472
+ };
2473
+ "disableMinute": {
2474
+ "alias": "disableMinute";
2475
+ "required": false;
2476
+ "isSignal": true;
2477
+ };
2478
+ "defaultTime": {
2479
+ "alias": "defaultTime";
2480
+ "required": false;
2481
+ "isSignal": true;
2482
+ };
2483
+ "startAt": {
2484
+ "alias": "startAt";
2485
+ "required": false;
2486
+ "isSignal": true;
2487
+ };
2488
+ "panelClass": {
2489
+ "alias": "panelClass";
2490
+ "required": false;
2491
+ "isSignal": true;
2492
+ };
2493
+ }, {
2494
+ "openedStream": "openedStream";
2495
+ "closedStream": "closedStream";
2496
+ }, never, never, true, never>;
1808
2497
  }
1809
-
1810
- declare const NGX_MAT_DATETIME_PICKER_VALUE_ACCESSOR: Provider;
1811
- declare const NGX_MAT_DATETIME_PICKER_VALIDATORS: Provider;
1812
- declare class NgxMatDatetimePickerInputV2<D> implements MatFormFieldControl<D>, ControlValueAccessor, OnDestroy, OnInit, Validator, NgxMatDatepickerControl<D> {
1813
- readonly _dateAdapter: DateAdapter<D> | null;
1814
- private readonly _elementRef;
1815
- private readonly _dateFormats;
1816
- private readonly _formField;
1817
- ngControl: NgControl | null;
1818
- ngxMatDatetimePicker: NgxMatDatetimePickerV2<D> | null;
1819
- /** The value of the input. */
1820
- get value(): D | null;
1821
- set value(value: D | null);
1822
- private readonly _value;
1823
- /** The minimum valid date. */
1824
- get min(): D | null;
1825
- set min(value: D | null);
1826
- private readonly _min;
1827
- /** The maximum valid date. */
1828
- get max(): D | null;
1829
- set max(value: D | null);
1830
- private readonly _max;
1831
- /** Function that can be used to filter out dates within the datepicker. */
1832
- get dateFilter(): (date: D | null) => boolean;
1833
- set dateFilter(value: (date: D | null) => boolean);
1834
- private readonly _dateFilter;
1835
- /** Whether the datepicker-input is disabled. */
1836
- get disabled(): boolean;
1837
- set disabled(value: BooleanInput);
1838
- private readonly _disabled;
1839
- /** Emits when a `change` event is fired on this `<input>`. */
1840
- readonly dateChange: EventEmitter<NgxMatDatetimePickerInputEvent<D>>;
1841
- /** Emits when an `input` event is fired on this `<input>`. */
1842
- readonly dateInput: EventEmitter<NgxMatDatetimePickerInputEvent<D>>;
1843
- /** Emits when the internal state has changed */
1844
- readonly stateChanges: Subject<void>;
1845
- _onTouched: () => void;
1846
- _validatorOnChange: () => void;
1847
- private _cvaOnChange;
1848
- private _valueChangesSubscription;
1849
- private _localeSubscription;
1850
- /** The form control validator for whether the input parses. */
1851
- private _parseValidator;
1852
- /** The form control validator for the date filter. */
1853
- private _filterValidator;
1854
- /** The form control validator for the min date. */
1855
- private _minValidator;
1856
- /** The form control validator for the max date. */
1857
- private _maxValidator;
1858
- /** Gets the base validator functions. */
1859
- private _getValidators;
1860
- /** The combined form control validator for this input. */
1861
- private _validator;
1862
- /** Tracks the last value that was set programmatically. */
1863
- private _lastValueValid;
1864
- readonly controlType = "ngx-mat-datetime-picker-input-v2";
1865
- focused: boolean;
1866
- get empty(): boolean;
1867
- get shouldLabelFloat(): boolean;
1868
- get required(): boolean;
1869
- set required(value: BooleanInput);
1870
- private readonly _required;
1871
- get placeholder(): string;
1872
- set placeholder(value: string);
1873
- private readonly _placeholder;
1874
- get errorState(): boolean;
1875
- private readonly _errorState;
1876
- readonly id: string;
1877
- constructor();
1878
- private readonly _injector;
1879
- ngOnInit(): void;
1880
- ngOnDestroy(): void;
1881
- /** @docs-private */
1882
- registerOnValidatorChange(fn: () => void): void;
1883
- /** @docs-private */
1884
- validate(c: AbstractControl): ValidationErrors | null;
1885
- writeValue(value: D | null): void;
1886
- registerOnChange(fn: (value: D | null) => void): void;
1887
- registerOnTouched(fn: () => void): void;
1888
- setDisabledState(isDisabled: boolean): void;
1889
- _onKeydown(event: KeyboardEvent): void;
1890
- _onInput(event: Event): void;
1891
- _onChange(): void;
1892
- _onBlur(): void;
1893
- _onClick(_: MouseEvent): void;
1894
- /** Formats a value and sets it on the input element. */
1895
- private _formatValue;
1896
- /** Assigns a value to the model. */
1897
- private _assignValue;
1898
- /** Public method to update value and trigger change events */
1899
- updateValue(value: D | null): void;
1900
- /** Whether the given value is considered valid. */
1901
- private _matchesFilter;
1902
- setDescribedByIds(_: string[]): void;
1903
- onContainerClick(): void;
1904
- focus(): void;
1905
- /** Gets the element that the datepicker popup should be connected to. */
1906
- getConnectedOverlayOrigin(): ElementRef;
1907
- /** Implementation of NgxMatDatepickerControl interface methods */
1908
- getStartValue(): D | null;
1909
- getThemePalette(): ThemePalette;
1910
- getOverlayLabelId(): string | null;
1911
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMatDatetimePickerInputV2<any>, never>;
1912
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxMatDatetimePickerInputV2<any>, "input[ngxMatDatetimePicker]", never, { "ngxMatDatetimePicker": { "alias": "ngxMatDatetimePicker"; "required": false; }; "value": { "alias": "value"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
2498
+ export declare const NGX_MAT_DATETIME_PICKER_VALUE_ACCESSOR: Provider;
2499
+ export declare const NGX_MAT_DATETIME_PICKER_VALIDATORS: Provider;
2500
+ export declare class NgxMatDatetimePickerInputV2<D> implements MatFormFieldControl<D>, ControlValueAccessor, OnDestroy, OnInit, Validator, NgxMatDatepickerControl<D> {
2501
+ readonly _dateAdapter: DateAdapter<D> | null;
2502
+ private readonly _elementRef;
2503
+ private readonly _dateFormats;
2504
+ private readonly _formField;
2505
+ ngControl: NgControl | null;
2506
+ ngxMatDatetimePicker: NgxMatDatetimePickerV2<D> | null;
2507
+ /** The value of the input. */
2508
+ get value(): D | null;
2509
+ set value(value: D | null);
2510
+ private readonly _value;
2511
+ /** The minimum valid date. */
2512
+ get min(): D | null;
2513
+ set min(value: D | null);
2514
+ private readonly _min;
2515
+ /** The maximum valid date. */
2516
+ get max(): D | null;
2517
+ set max(value: D | null);
2518
+ private readonly _max;
2519
+ /** Function that can be used to filter out dates within the datepicker. */
2520
+ get dateFilter(): (date: D | null) => boolean;
2521
+ set dateFilter(value: (date: D | null) => boolean);
2522
+ private readonly _dateFilter;
2523
+ /** Whether the datepicker-input is disabled. */
2524
+ get disabled(): boolean;
2525
+ set disabled(value: BooleanInput);
2526
+ private readonly _disabled;
2527
+ /** Emits when a `change` event is fired on this `<input>`. */
2528
+ readonly dateChange: EventEmitter<NgxMatDatetimePickerInputEvent<D>>;
2529
+ /** Emits when an `input` event is fired on this `<input>`. */
2530
+ readonly dateInput: EventEmitter<NgxMatDatetimePickerInputEvent<D>>;
2531
+ /** Emits when the internal state has changed */
2532
+ readonly stateChanges: Subject<void>;
2533
+ _onTouched: () => void;
2534
+ _validatorOnChange: () => void;
2535
+ private _cvaOnChange;
2536
+ private _valueChangesSubscription;
2537
+ private _localeSubscription;
2538
+ /** The form control validator for whether the input parses. */
2539
+ private _parseValidator;
2540
+ /** The form control validator for the date filter. */
2541
+ private _filterValidator;
2542
+ /** The form control validator for the min date. */
2543
+ private _minValidator;
2544
+ /** The form control validator for the max date. */
2545
+ private _maxValidator;
2546
+ /** Gets the base validator functions. */
2547
+ private _getValidators;
2548
+ /** The combined form control validator for this input. */
2549
+ private _validator;
2550
+ /** Tracks the last value that was set programmatically. */
2551
+ private _lastValueValid;
2552
+ readonly controlType = "ngx-mat-datetime-picker-input-v2";
2553
+ focused: boolean;
2554
+ get empty(): boolean;
2555
+ get shouldLabelFloat(): boolean;
2556
+ get required(): boolean;
2557
+ set required(value: BooleanInput);
2558
+ private readonly _required;
2559
+ get placeholder(): string;
2560
+ set placeholder(value: string);
2561
+ private readonly _placeholder;
2562
+ get errorState(): boolean;
2563
+ private readonly _errorState;
2564
+ readonly id: string;
2565
+ constructor();
2566
+ private readonly _injector;
2567
+ ngOnInit(): void;
2568
+ ngOnDestroy(): void;
2569
+ /** @docs-private */
2570
+ registerOnValidatorChange(fn: () => void): void;
2571
+ /** @docs-private */
2572
+ validate(c: AbstractControl): ValidationErrors | null;
2573
+ writeValue(value: D | null): void;
2574
+ registerOnChange(fn: (value: D | null) => void): void;
2575
+ registerOnTouched(fn: () => void): void;
2576
+ setDisabledState(isDisabled: boolean): void;
2577
+ _onKeydown(event: KeyboardEvent): void;
2578
+ _onInput(event: Event): void;
2579
+ _onChange(): void;
2580
+ _onBlur(): void;
2581
+ _onClick(_: MouseEvent): void;
2582
+ /** Formats a value and sets it on the input element. */
2583
+ private _formatValue;
2584
+ /** Assigns a value to the model. */
2585
+ private _assignValue;
2586
+ /** Public method to update value and trigger change events */
2587
+ updateValue(value: D | null): void;
2588
+ /** Whether the given value is considered valid. */
2589
+ private _matchesFilter;
2590
+ setDescribedByIds(_: string[]): void;
2591
+ onContainerClick(): void;
2592
+ focus(): void;
2593
+ /** Gets the element that the datepicker popup should be connected to. */
2594
+ getConnectedOverlayOrigin(): ElementRef;
2595
+ /** Implementation of NgxMatDatepickerControl interface methods */
2596
+ getStartValue(): D | null;
2597
+ getThemePalette(): ThemePalette;
2598
+ getOverlayLabelId(): string | null;
2599
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatDatetimePickerInputV2<any>, never>;
2600
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatDatetimePickerInputV2<any>, "input[ngxMatDatetimePicker]", never, {
2601
+ "ngxMatDatetimePicker": {
2602
+ "alias": "ngxMatDatetimePicker";
2603
+ "required": false;
2604
+ };
2605
+ "value": {
2606
+ "alias": "value";
2607
+ "required": false;
2608
+ };
2609
+ "min": {
2610
+ "alias": "min";
2611
+ "required": false;
2612
+ };
2613
+ "max": {
2614
+ "alias": "max";
2615
+ "required": false;
2616
+ };
2617
+ "dateFilter": {
2618
+ "alias": "dateFilter";
2619
+ "required": false;
2620
+ };
2621
+ "disabled": {
2622
+ "alias": "disabled";
2623
+ "required": false;
2624
+ };
2625
+ }, {
2626
+ "dateChange": "dateChange";
2627
+ "dateInput": "dateInput";
2628
+ }, never, never, true, never>;
1913
2629
  }
1914
2630
  /** An event used for datepicker input and change events. */
1915
- declare class NgxMatDatetimePickerInputEvent<D> {
1916
- /** Reference to the datepicker input component that emitted the event. */
1917
- target: NgxMatDatetimePickerInputV2<D>;
1918
- /** Reference to the native input element that the event originated from. */
1919
- targetElement: HTMLElement;
1920
- /** The new value for the target datepicker input. */
1921
- value: D | null;
1922
- constructor(
1923
- /** Reference to the datepicker input component that emitted the event. */
1924
- target: NgxMatDatetimePickerInputV2<D>,
1925
- /** Reference to the native input element that the event originated from. */
1926
- targetElement: HTMLElement);
1927
- }
1928
-
1929
- export { DefaultNgxMatCalendarRangeStrategy, MERIDIANS, NGX_MAT_CALENDAR_RANGE_STRATEGY_PROVIDER, NGX_MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY, NGX_MAT_DATEPICKER_SCROLL_STRATEGY, NGX_MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY, NGX_MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, NGX_MAT_DATEPICKER_VALIDATORS, NGX_MAT_DATEPICKER_VALUE_ACCESSOR, NGX_MAT_DATETIME_PICKER_VALIDATORS, NGX_MAT_DATETIME_PICKER_VALUE_ACCESSOR, NGX_MAT_DATE_RANGE_INPUT_PARENT, NGX_MAT_DATE_RANGE_SELECTION_STRATEGY, NgxMatCalendar, NgxMatCalendarBody, NgxMatCalendarCell, NgxMatCalendarHeader, NgxMatDateRangeInput, NgxMatDateRangePicker, NgxMatDatepickerActions, NgxMatDatepickerApply, NgxMatDatepickerBase, NgxMatDatepickerCancel, NgxMatDatepickerClear, NgxMatDatepickerContent, NgxMatDatepickerInput, NgxMatDatepickerInputEvent, NgxMatDatepickerToggle, NgxMatDatepickerToggleIcon, NgxMatDatetimePickerContentV2, NgxMatDatetimePickerInputEvent, NgxMatDatetimePickerInputV2, NgxMatDatetimePickerV2, NgxMatDatetimepicker, NgxMatEndDate, NgxMatMonthView, NgxMatMultiYearView, NgxMatStartDate, NgxMatTimepickerComponent, NgxMatYearView, getActiveOffset, isSameMultiYearView, yearsPerPage, yearsPerRow };
1930
- export type { NgxDatepickerDropdownPositionX, NgxDatepickerDropdownPositionY, NgxMatCalendarCellClassFunction, NgxMatCalendarCellCssClasses, NgxMatCalendarUserEvent, NgxMatCalendarView, NgxMatDateRangeInputParent, NgxMatDateRangePickerInput, NgxMatDateRangeSelectionStrategy, NgxMatDatepickerControl, NgxMatDatepickerPanel, NgxMatDatetimePickerContentData };
2631
+ export declare class NgxMatDatetimePickerInputEvent<D> {
2632
+ /** Reference to the datepicker input component that emitted the event. */
2633
+ target: NgxMatDatetimePickerInputV2<D>;
2634
+ /** Reference to the native input element that the event originated from. */
2635
+ targetElement: HTMLElement;
2636
+ /** The new value for the target datepicker input. */
2637
+ value: D | null;
2638
+ constructor(
2639
+ /** Reference to the datepicker input component that emitted the event. */
2640
+ target: NgxMatDatetimePickerInputV2<D>,
2641
+ /** Reference to the native input element that the event originated from. */
2642
+ targetElement: HTMLElement);
2643
+ }