nxt-pick-datetime 20.0.0 → 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -14
- package/assets/picker.scss +2 -2
- package/fesm2022/nxt-pick-datetime-moment-adapter.mjs +19 -27
- package/fesm2022/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
- package/fesm2022/nxt-pick-datetime-native-adapter.mjs +19 -22
- package/fesm2022/nxt-pick-datetime-native-adapter.mjs.map +1 -1
- package/fesm2022/nxt-pick-datetime.mjs +1861 -2636
- package/fesm2022/nxt-pick-datetime.mjs.map +1 -1
- package/package.json +19 -16
- package/{moment-adapter/index.d.ts → types/nxt-pick-datetime-moment-adapter.d.ts} +1 -0
- package/{native-adapter/index.d.ts → types/nxt-pick-datetime-native-adapter.d.ts} +1 -0
- package/types/nxt-pick-datetime.d.ts +1200 -0
- package/index.d.ts +0 -1888
package/index.d.ts
DELETED
|
@@ -1,1888 +0,0 @@
|
|
|
1
|
-
import * as rxjs from 'rxjs';
|
|
2
|
-
import { Subject, Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, EventEmitter, OnInit, ElementRef, NgZone, AfterContentInit, OnDestroy, ChangeDetectorRef, AfterViewChecked, ViewContainerRef, ComponentRef, EmbeddedViewRef, Injector, TemplateRef, Renderer2, OnChanges, SimpleChanges, AfterViewInit, PipeTransform } from '@angular/core';
|
|
5
|
-
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
6
|
-
import * as nxt_pick_datetime from 'nxt-pick-datetime';
|
|
7
|
-
import * as i4 from '@angular/cdk/overlay';
|
|
8
|
-
import { ScrollStrategy, OverlayRef, Overlay, OverlayContainer } from '@angular/cdk/overlay';
|
|
9
|
-
import * as i5 from '@angular/cdk/portal';
|
|
10
|
-
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, ComponentType } from '@angular/cdk/portal';
|
|
11
|
-
import * as i2 from '@angular/common';
|
|
12
|
-
import { Location } from '@angular/common';
|
|
13
|
-
import { AnimationEvent } from '@angular/animations';
|
|
14
|
-
import * as i3 from '@angular/cdk/a11y';
|
|
15
|
-
import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
|
16
|
-
|
|
17
|
-
declare abstract class DateTimeAdapter<T> {
|
|
18
|
-
/** The locale to use for all dates */
|
|
19
|
-
protected locale: any;
|
|
20
|
-
/** A stream that emits when the locale changes */
|
|
21
|
-
protected _localeChanges: Subject<void>;
|
|
22
|
-
get localeChanges(): Observable<void>;
|
|
23
|
-
/** total milliseconds in a day */
|
|
24
|
-
protected readonly millisecondsInDay = 86400000;
|
|
25
|
-
/** total milliseconds in a minute */
|
|
26
|
-
protected readonly milliseondsInMinute = 60000;
|
|
27
|
-
/**
|
|
28
|
-
* Get the year of the given date
|
|
29
|
-
*/
|
|
30
|
-
abstract getYear(date?: T): number;
|
|
31
|
-
/**
|
|
32
|
-
* Get the month of the given date
|
|
33
|
-
* 0 -- January
|
|
34
|
-
* 11 -- December
|
|
35
|
-
* */
|
|
36
|
-
abstract getMonth(date?: T): number;
|
|
37
|
-
/**
|
|
38
|
-
* Get the day of the week of the given date
|
|
39
|
-
* 0 -- Sunday
|
|
40
|
-
* 6 -- Saturday
|
|
41
|
-
* */
|
|
42
|
-
abstract getDay(date?: T): number;
|
|
43
|
-
/**
|
|
44
|
-
* Get the day num of the given date
|
|
45
|
-
*/
|
|
46
|
-
abstract getDate(date?: T): number;
|
|
47
|
-
/**
|
|
48
|
-
* Get the hours of the given date
|
|
49
|
-
*/
|
|
50
|
-
abstract getHours(date?: T): number;
|
|
51
|
-
/**
|
|
52
|
-
* Get the minutes of the given date
|
|
53
|
-
*/
|
|
54
|
-
abstract getMinutes(date?: T): number;
|
|
55
|
-
/**
|
|
56
|
-
* Get the seconds of the given date
|
|
57
|
-
*/
|
|
58
|
-
abstract getSeconds(date?: T): number;
|
|
59
|
-
/**
|
|
60
|
-
* Get the milliseconds timestamp of the given date
|
|
61
|
-
*/
|
|
62
|
-
abstract getTime(date?: T): number;
|
|
63
|
-
/**
|
|
64
|
-
* Gets the number of days in the month of the given date.
|
|
65
|
-
*/
|
|
66
|
-
abstract getNumDaysInMonth(date?: T): number;
|
|
67
|
-
/**
|
|
68
|
-
* Get the number of calendar days between the given dates.
|
|
69
|
-
* If dateLeft is before dateRight, it would return positive value
|
|
70
|
-
* If dateLeft is after dateRight, it would return negative value
|
|
71
|
-
*/
|
|
72
|
-
abstract differenceInCalendarDays(dateLeft?: T, dateRight?: T): number | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* Gets the name for the year of the given date.
|
|
75
|
-
*/
|
|
76
|
-
abstract getYearName(date?: T): string;
|
|
77
|
-
/**
|
|
78
|
-
* Get a list of month names
|
|
79
|
-
*/
|
|
80
|
-
abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
|
|
81
|
-
/**
|
|
82
|
-
* Get a list of week names
|
|
83
|
-
*/
|
|
84
|
-
abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
|
|
85
|
-
/**
|
|
86
|
-
* Gets a list of names for the dates of the month.
|
|
87
|
-
*/
|
|
88
|
-
abstract getDateNames(): string[];
|
|
89
|
-
/**
|
|
90
|
-
* Return a Date object as a string, using the ISO standard
|
|
91
|
-
*/
|
|
92
|
-
abstract toIso8601(date: T): string;
|
|
93
|
-
/**
|
|
94
|
-
* Check if the give dates are equal
|
|
95
|
-
*/
|
|
96
|
-
abstract isEqual(dateLeft?: T, dateRight?: T): boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Check if the give dates are the same day
|
|
99
|
-
*/
|
|
100
|
-
abstract isSameDay(dateLeft?: T, dateRight?: T): boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Checks whether the given date is valid.
|
|
103
|
-
*/
|
|
104
|
-
abstract isValid(date?: T): boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Gets date instance that is not valid.
|
|
107
|
-
*/
|
|
108
|
-
abstract invalid(): T;
|
|
109
|
-
/**
|
|
110
|
-
* Checks whether the given object is considered a date instance by this DateTimeAdapter.
|
|
111
|
-
*/
|
|
112
|
-
abstract isDateInstance(obj: any): boolean;
|
|
113
|
-
/**
|
|
114
|
-
* Add the specified number of years to the given date
|
|
115
|
-
*/
|
|
116
|
-
abstract addCalendarYears(date: T | undefined, amount: number): T;
|
|
117
|
-
/**
|
|
118
|
-
* Add the specified number of months to the given date
|
|
119
|
-
*/
|
|
120
|
-
abstract addCalendarMonths(date: T | undefined, amount: number): T;
|
|
121
|
-
/**
|
|
122
|
-
* Add the specified number of days to the given date
|
|
123
|
-
*/
|
|
124
|
-
abstract addCalendarDays(date: T | undefined, amount: number): T;
|
|
125
|
-
/**
|
|
126
|
-
* Set the hours to the given date.
|
|
127
|
-
*/
|
|
128
|
-
abstract setHours(date: T | undefined, amount: number): T;
|
|
129
|
-
/**
|
|
130
|
-
* Set the minutes to the given date.
|
|
131
|
-
*/
|
|
132
|
-
abstract setMinutes(date: T | undefined, amount: number): T;
|
|
133
|
-
/**
|
|
134
|
-
* Set the seconds to the given date.
|
|
135
|
-
*/
|
|
136
|
-
abstract setSeconds(date: T | undefined, amount: number): T;
|
|
137
|
-
/**
|
|
138
|
-
* Creates a date with the given year, month, date, hour, minute and second. Does not allow over/under-flow of the
|
|
139
|
-
* month and date.
|
|
140
|
-
*/
|
|
141
|
-
abstract createDate(year: number, month: number, date: number): T;
|
|
142
|
-
abstract createDate(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): T;
|
|
143
|
-
/**
|
|
144
|
-
* Clone the given date
|
|
145
|
-
*/
|
|
146
|
-
abstract clone(date?: T): T;
|
|
147
|
-
/**
|
|
148
|
-
* Get a new moment
|
|
149
|
-
* */
|
|
150
|
-
abstract now(): T;
|
|
151
|
-
/**
|
|
152
|
-
* Formats a date as a string according to the given format.
|
|
153
|
-
*/
|
|
154
|
-
abstract format(date: T | undefined, displayFormat: any): string;
|
|
155
|
-
/**
|
|
156
|
-
* Parse a user-provided value to a Date Object
|
|
157
|
-
*/
|
|
158
|
-
abstract parse(value: any, parseFormat: any): T | undefined;
|
|
159
|
-
/**
|
|
160
|
-
* Compare two given dates
|
|
161
|
-
* 1 if the first date is after the second,
|
|
162
|
-
* -1 if the first date is before the second
|
|
163
|
-
* 0 if dates are equal.
|
|
164
|
-
* */
|
|
165
|
-
compare(first?: T, second?: T): number;
|
|
166
|
-
/**
|
|
167
|
-
* Check if two given dates are in the same year
|
|
168
|
-
* 1 if the first date's year is after the second,
|
|
169
|
-
* -1 if the first date's year is before the second
|
|
170
|
-
* 0 if two given dates are in the same year
|
|
171
|
-
* */
|
|
172
|
-
compareYear(first?: T, second?: T): number;
|
|
173
|
-
/**
|
|
174
|
-
* Attempts to deserialize a value to a valid date object. This is different from parsing in that
|
|
175
|
-
* deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
|
|
176
|
-
* string). The default implementation does not allow any deserialization, it simply checks that
|
|
177
|
-
* the given value is already a valid date object or null. The `<mat-datepicker>` will call this
|
|
178
|
-
* method on all of it's `@Input()` properties that accept dates. It is therefore possible to
|
|
179
|
-
* support passing values from your backend directly to these properties by overriding this method
|
|
180
|
-
* to also deserialize the format used by your backend.
|
|
181
|
-
*/
|
|
182
|
-
deserialize(value: any): T | undefined;
|
|
183
|
-
/**
|
|
184
|
-
* Sets the locale used for all dates.
|
|
185
|
-
*/
|
|
186
|
-
setLocale(locale: any): void;
|
|
187
|
-
/**
|
|
188
|
-
* Clamp the given date between min and max dates.
|
|
189
|
-
*/
|
|
190
|
-
clampDate(date: T, min?: T, max?: T): T;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
interface DateTimeFormats {
|
|
194
|
-
parseInput: any;
|
|
195
|
-
fullPickerInput: any;
|
|
196
|
-
datePickerInput: any;
|
|
197
|
-
timePickerInput: any;
|
|
198
|
-
monthYearLabel: any;
|
|
199
|
-
dateA11yLabel: any;
|
|
200
|
-
monthYearA11yLabel: any;
|
|
201
|
-
}
|
|
202
|
-
/** InjectionToken for date time picker that can be used to override default format */
|
|
203
|
-
declare const NXT_DATE_TIME_FORMATS: InjectionToken<DateTimeFormats>;
|
|
204
|
-
|
|
205
|
-
type PickerType = 'both' | 'calendar' | 'timer';
|
|
206
|
-
type PickerMode = 'popup' | 'dialog' | 'inline';
|
|
207
|
-
type SelectMode = 'single' | 'range' | 'rangeFrom' | 'rangeTo';
|
|
208
|
-
type RenderItem = 'year' | 'month' | 'date';
|
|
209
|
-
type ViewType = 'month' | 'year' | 'multi-years';
|
|
210
|
-
type DateFilter<T> = (date?: T, forRender?: RenderItem) => boolean;
|
|
211
|
-
declare abstract class DateTimeDirective<T> {
|
|
212
|
-
protected readonly dateTimeAdapter: DateTimeAdapter<T>;
|
|
213
|
-
protected readonly dateTimeFormats: DateTimeFormats;
|
|
214
|
-
/**
|
|
215
|
-
* When true, shows a timer to configure the seconds value
|
|
216
|
-
*/
|
|
217
|
-
showSecondsTimer: boolean;
|
|
218
|
-
/**
|
|
219
|
-
* When true, the timer will be in 12-hour format mode
|
|
220
|
-
*/
|
|
221
|
-
hour12Timer: boolean;
|
|
222
|
-
/**
|
|
223
|
-
* The view that the calendar should start on
|
|
224
|
-
*/
|
|
225
|
-
startView: ViewType;
|
|
226
|
-
/**
|
|
227
|
-
* Hours to change per step
|
|
228
|
-
*/
|
|
229
|
-
stepHour: number;
|
|
230
|
-
/**
|
|
231
|
-
* Minutes to change per step
|
|
232
|
-
*/
|
|
233
|
-
stepMinute: number;
|
|
234
|
-
/**
|
|
235
|
-
* Seconds to change per step
|
|
236
|
-
*/
|
|
237
|
-
stepSecond: number;
|
|
238
|
-
/**
|
|
239
|
-
* Set the first day of week
|
|
240
|
-
*
|
|
241
|
-
* Valid values are from 0 [Sunday] to 6 [Saturday]
|
|
242
|
-
*/
|
|
243
|
-
firstDayOfWeek: number;
|
|
244
|
-
/**
|
|
245
|
-
* If true, don't show dates from preious / next month on the calendar month view
|
|
246
|
-
*/
|
|
247
|
-
hideOtherMonths: boolean;
|
|
248
|
-
readonly id: string;
|
|
249
|
-
abstract get selected(): T | undefined;
|
|
250
|
-
abstract get selecteds(): Array<T | undefined>;
|
|
251
|
-
abstract get dateTimeFilter(): DateFilter<T> | undefined;
|
|
252
|
-
abstract get max(): T | undefined;
|
|
253
|
-
abstract get min(): T | undefined;
|
|
254
|
-
abstract get selectMode(): SelectMode | undefined;
|
|
255
|
-
abstract get startAt(): T | undefined;
|
|
256
|
-
abstract get isOpen(): boolean;
|
|
257
|
-
abstract get pickerMode(): PickerMode;
|
|
258
|
-
abstract get pickerType(): PickerType;
|
|
259
|
-
abstract get isInSingleMode(): boolean;
|
|
260
|
-
abstract get isInRangeMode(): boolean;
|
|
261
|
-
abstract select(date: T | Array<T | undefined>): void;
|
|
262
|
-
abstract yearSelected: EventEmitter<T>;
|
|
263
|
-
abstract monthSelected: EventEmitter<T>;
|
|
264
|
-
abstract selectYear(normalizedYear: T): void;
|
|
265
|
-
abstract selectMonth(normalizedMonth: T): void;
|
|
266
|
-
get formatString(): string;
|
|
267
|
-
/**
|
|
268
|
-
* Date Time Checker to check if the give dateTime is selectable
|
|
269
|
-
*/
|
|
270
|
-
dateTimeChecker: (dateTime: T | undefined) => boolean;
|
|
271
|
-
get disabled(): boolean;
|
|
272
|
-
constructor(dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
|
|
273
|
-
protected getValidDate(obj: any): T | undefined;
|
|
274
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeDirective<any>, never>;
|
|
275
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeDirective<any>, never, never, { "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "stepHour": { "alias": "stepHour"; "required": false; }; "stepMinute": { "alias": "stepMinute"; "required": false; }; "stepSecond": { "alias": "stepSecond"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; }, {}, never, never, true, never>;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
declare class CalendarCell {
|
|
279
|
-
value: number;
|
|
280
|
-
displayValue: string;
|
|
281
|
-
ariaLabel: string;
|
|
282
|
-
enabled: boolean;
|
|
283
|
-
out: boolean;
|
|
284
|
-
cellClass: string;
|
|
285
|
-
constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, out?: boolean, cellClass?: string);
|
|
286
|
-
}
|
|
287
|
-
/** @internal */
|
|
288
|
-
declare class CalendarBodyComponent implements OnInit {
|
|
289
|
-
private readonly elmRef;
|
|
290
|
-
private readonly ngZone;
|
|
291
|
-
/**
|
|
292
|
-
* The cell number of the active cell in the table.
|
|
293
|
-
*/
|
|
294
|
-
activeCell: number;
|
|
295
|
-
/**
|
|
296
|
-
* The cells to display in the table.
|
|
297
|
-
*/
|
|
298
|
-
rows?: CalendarCell[][];
|
|
299
|
-
/**
|
|
300
|
-
* The number of columns in the table.
|
|
301
|
-
*/
|
|
302
|
-
numCols: number;
|
|
303
|
-
/**
|
|
304
|
-
* The ratio (width / height) to use for the cells in the table.
|
|
305
|
-
*/
|
|
306
|
-
cellRatio: number;
|
|
307
|
-
/**
|
|
308
|
-
* The value in the table that corresponds to today.
|
|
309
|
-
*/
|
|
310
|
-
todayValue?: number;
|
|
311
|
-
/**
|
|
312
|
-
* The value in the table that is currently selected.
|
|
313
|
-
*/
|
|
314
|
-
selectedValues?: Array<number | undefined>;
|
|
315
|
-
/**
|
|
316
|
-
* Current picker select mode
|
|
317
|
-
*/
|
|
318
|
-
selectMode?: SelectMode;
|
|
319
|
-
/**
|
|
320
|
-
* Emit when a calendar cell is selected
|
|
321
|
-
*/
|
|
322
|
-
readonly select: EventEmitter<CalendarCell>;
|
|
323
|
-
/** @internal */
|
|
324
|
-
get calendarBodyClass(): boolean;
|
|
325
|
-
get isInSingleMode(): boolean;
|
|
326
|
-
get isInRangeMode(): boolean;
|
|
327
|
-
constructor(elmRef: ElementRef<HTMLElement>, ngZone: NgZone);
|
|
328
|
-
ngOnInit(): void;
|
|
329
|
-
selectCell(cell: CalendarCell): void;
|
|
330
|
-
isActiveCell(rowIndex: number, colIndex: number): boolean;
|
|
331
|
-
/**
|
|
332
|
-
* Check if the cell is selected
|
|
333
|
-
*/
|
|
334
|
-
isSelected(value: number): boolean;
|
|
335
|
-
/**
|
|
336
|
-
* Check if the cell in the range
|
|
337
|
-
*/
|
|
338
|
-
isInRange(value: number): boolean;
|
|
339
|
-
/**
|
|
340
|
-
* Check if the cell is the range from
|
|
341
|
-
*/
|
|
342
|
-
isRangeFrom(value: number): boolean;
|
|
343
|
-
/**
|
|
344
|
-
* Check if the cell is the range to
|
|
345
|
-
*/
|
|
346
|
-
isRangeTo(value: number): boolean;
|
|
347
|
-
/**
|
|
348
|
-
* Focus to a active cell
|
|
349
|
-
*/
|
|
350
|
-
focusActiveCell(): void;
|
|
351
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarBodyComponent, never>;
|
|
352
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarBodyComponent, "[nxtDateTimeCalendarBody]", ["nxtDateTimeCalendarBody"], { "activeCell": { "alias": "activeCell"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "numCols": { "alias": "numCols"; "required": false; }; "cellRatio": { "alias": "cellRatio"; "required": false; }; "todayValue": { "alias": "todayValue"; "required": false; }; "selectedValues": { "alias": "selectedValues"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; }, { "select": "select"; }, never, never, false, never>;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
declare class MonthViewComponent<T> implements OnInit, AfterContentInit, OnDestroy {
|
|
356
|
-
private readonly cdRef;
|
|
357
|
-
private readonly dateTimeAdapter;
|
|
358
|
-
private readonly dateTimeFormats;
|
|
359
|
-
/**
|
|
360
|
-
* Whether to hide dates in other months at the start or end of the current month
|
|
361
|
-
*/
|
|
362
|
-
hideOtherMonths: boolean;
|
|
363
|
-
/**
|
|
364
|
-
* Define the first day of a week
|
|
365
|
-
* Sunday: 0 ~ Saturday: 6
|
|
366
|
-
*/
|
|
367
|
-
private _firstDayOfWeek;
|
|
368
|
-
get firstDayOfWeek(): number;
|
|
369
|
-
set firstDayOfWeek(val: number);
|
|
370
|
-
/**
|
|
371
|
-
* The select mode of the picker;
|
|
372
|
-
*/
|
|
373
|
-
private _selectMode;
|
|
374
|
-
get selectMode(): SelectMode;
|
|
375
|
-
set selectMode(val: SelectMode);
|
|
376
|
-
/** The currently selected date */
|
|
377
|
-
private _selected?;
|
|
378
|
-
get selected(): T | undefined;
|
|
379
|
-
set selected(value: T | undefined);
|
|
380
|
-
private _selecteds;
|
|
381
|
-
get selecteds(): Array<T | undefined>;
|
|
382
|
-
set selecteds(values: Array<T | undefined>);
|
|
383
|
-
private _pickerMoment?;
|
|
384
|
-
get pickerMoment(): T | undefined;
|
|
385
|
-
set pickerMoment(value: T | undefined);
|
|
386
|
-
/**
|
|
387
|
-
* A function used to filter which dates are selectable
|
|
388
|
-
*/
|
|
389
|
-
private _dateTimeFilter?;
|
|
390
|
-
get dateTimeFilter(): DateFilter<T> | undefined;
|
|
391
|
-
set dateTimeFilter(filter: DateFilter<T> | undefined);
|
|
392
|
-
/** The minimum selectable date */
|
|
393
|
-
private _minDate?;
|
|
394
|
-
get min(): T | undefined;
|
|
395
|
-
set min(value: T | undefined);
|
|
396
|
-
/** The maximum selectable date */
|
|
397
|
-
private _maxDate?;
|
|
398
|
-
get max(): T | undefined;
|
|
399
|
-
set max(value: T | undefined);
|
|
400
|
-
private _weekdays?;
|
|
401
|
-
get weekdays(): {
|
|
402
|
-
long: string;
|
|
403
|
-
short: string;
|
|
404
|
-
narrow: string;
|
|
405
|
-
}[] | undefined;
|
|
406
|
-
private _days?;
|
|
407
|
-
get days(): CalendarCell[][] | undefined;
|
|
408
|
-
get activeCell(): number | undefined;
|
|
409
|
-
get isInSingleMode(): boolean;
|
|
410
|
-
get isInRangeMode(): boolean;
|
|
411
|
-
private firstDateOfMonth?;
|
|
412
|
-
private localeSub?;
|
|
413
|
-
private initiated;
|
|
414
|
-
/**
|
|
415
|
-
* The date of the month that today falls on.
|
|
416
|
-
*/
|
|
417
|
-
todayDate?: number;
|
|
418
|
-
/**
|
|
419
|
-
* An array to hold all selectedDates' value
|
|
420
|
-
* the value is the day number in current month
|
|
421
|
-
*/
|
|
422
|
-
selectedDates?: Array<number | undefined>;
|
|
423
|
-
firstRowOffset: number;
|
|
424
|
-
/**
|
|
425
|
-
* Callback to invoke when a new date is selected
|
|
426
|
-
*/
|
|
427
|
-
readonly selectedChange: EventEmitter<T | undefined>;
|
|
428
|
-
/**
|
|
429
|
-
* Callback to invoke when any date is selected.
|
|
430
|
-
*/
|
|
431
|
-
readonly userSelection: EventEmitter<void>;
|
|
432
|
-
/** Emits when any date is activated */
|
|
433
|
-
readonly pickerMomentChange: EventEmitter<T>;
|
|
434
|
-
/** The body of calendar table */
|
|
435
|
-
private calendarBodyElm?;
|
|
436
|
-
/** @internal */
|
|
437
|
-
get calendarView(): boolean;
|
|
438
|
-
constructor(cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
|
|
439
|
-
ngOnInit(): void;
|
|
440
|
-
ngAfterContentInit(): void;
|
|
441
|
-
ngOnDestroy(): void;
|
|
442
|
-
/**
|
|
443
|
-
* Handle a calendarCell selected
|
|
444
|
-
*/
|
|
445
|
-
selectCalendarCell(cell: CalendarCell): void;
|
|
446
|
-
/**
|
|
447
|
-
* Handle a new date selected
|
|
448
|
-
*/
|
|
449
|
-
private selectDate;
|
|
450
|
-
/**
|
|
451
|
-
* Handle keydown event on calendar body
|
|
452
|
-
*/
|
|
453
|
-
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
454
|
-
/**
|
|
455
|
-
* Generate the calendar weekdays array
|
|
456
|
-
*/
|
|
457
|
-
private generateWeekDays;
|
|
458
|
-
/**
|
|
459
|
-
* Generate the calendar days array
|
|
460
|
-
*/
|
|
461
|
-
private generateCalendar;
|
|
462
|
-
/**
|
|
463
|
-
* Creates CalendarCell for days.
|
|
464
|
-
*/
|
|
465
|
-
private createDateCell;
|
|
466
|
-
/**
|
|
467
|
-
* Check if the date is valid
|
|
468
|
-
*/
|
|
469
|
-
private isDateEnabled;
|
|
470
|
-
/**
|
|
471
|
-
* Get a valid date object
|
|
472
|
-
*/
|
|
473
|
-
private getValidDate;
|
|
474
|
-
/**
|
|
475
|
-
* Check if the give dates are defined and in the same month
|
|
476
|
-
*/
|
|
477
|
-
isSameMonth(dateLeft?: T, dateRight?: T): boolean;
|
|
478
|
-
/**
|
|
479
|
-
* Set the selectedDates value.
|
|
480
|
-
* In single mode, it has only one value which represent the selected date
|
|
481
|
-
* In range mode, it would has two values, one for the fromValue and the other for the toValue
|
|
482
|
-
*/
|
|
483
|
-
private setSelectedDates;
|
|
484
|
-
private focusActiveCell;
|
|
485
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MonthViewComponent<any>, never>;
|
|
486
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MonthViewComponent<any>, "nxt-date-time-month-view", never, { "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "dateTimeFilter": { "alias": "dateTimeFilter"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, { "selectedChange": "selectedChange"; "userSelection": "userSelection"; "pickerMomentChange": "pickerMomentChange"; }, never, never, false, never>;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
declare class DateTimeIntl {
|
|
490
|
-
/**
|
|
491
|
-
* Stream that emits whenever the labels here are changed. Use this to notify
|
|
492
|
-
* components if the labels have changed after initialization.
|
|
493
|
-
*/
|
|
494
|
-
readonly changes: Subject<void>;
|
|
495
|
-
/** A label for the up second button (used by screen readers). */
|
|
496
|
-
upSecondLabel: string;
|
|
497
|
-
/** A label for the down second button (used by screen readers). */
|
|
498
|
-
downSecondLabel: string;
|
|
499
|
-
/** A label for the up minute button (used by screen readers). */
|
|
500
|
-
upMinuteLabel: string;
|
|
501
|
-
/** A label for the down minute button (used by screen readers). */
|
|
502
|
-
downMinuteLabel: string;
|
|
503
|
-
/** A label for the up hour button (used by screen readers). */
|
|
504
|
-
upHourLabel: string;
|
|
505
|
-
/** A label for the down hour button (used by screen readers). */
|
|
506
|
-
downHourLabel: string;
|
|
507
|
-
/** A label for the previous month button (used by screen readers) */
|
|
508
|
-
prevMonthLabel: string;
|
|
509
|
-
/** A label for the next month button (used by screen readers) */
|
|
510
|
-
nextMonthLabel: string;
|
|
511
|
-
/** A label for the previous year button (used by screen readers) */
|
|
512
|
-
prevYearLabel: string;
|
|
513
|
-
/** A label for the next year button (used by screen readers) */
|
|
514
|
-
nextYearLabel: string;
|
|
515
|
-
/** A label for the previous multi-year button (used by screen readers) */
|
|
516
|
-
prevMultiYearLabel: string;
|
|
517
|
-
/** A label for the next multi-year button (used by screen readers) */
|
|
518
|
-
nextMultiYearLabel: string;
|
|
519
|
-
/** A label for the 'switch to month view' button (used by screen readers) */
|
|
520
|
-
switchToMonthViewLabel: string;
|
|
521
|
-
/** A label for the 'switch to year view' button (used by screen readers) */
|
|
522
|
-
switchToMultiYearViewLabel: string;
|
|
523
|
-
/** A label for the cancel button */
|
|
524
|
-
cancelBtnLabel: string;
|
|
525
|
-
/** A label for the set button */
|
|
526
|
-
setBtnLabel: string;
|
|
527
|
-
/** A label for the range 'from' in picker info */
|
|
528
|
-
rangeFromLabel: string;
|
|
529
|
-
/** A label for the range 'to' in picker info */
|
|
530
|
-
rangeToLabel: string;
|
|
531
|
-
/** A label for the hour12 button (AM) */
|
|
532
|
-
hour12AMLabel: string;
|
|
533
|
-
/** A label for the hour12 button (PM) */
|
|
534
|
-
hour12PMLabel: string;
|
|
535
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeIntl, never>;
|
|
536
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DateTimeIntl>;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
declare class MultiYearViewComponent<T> implements OnInit, AfterContentInit {
|
|
540
|
-
private readonly cdRef;
|
|
541
|
-
private readonly pickerIntl;
|
|
542
|
-
private readonly dateTimeAdapter;
|
|
543
|
-
/**
|
|
544
|
-
* The select mode of the picker;
|
|
545
|
-
*/
|
|
546
|
-
private _selectMode;
|
|
547
|
-
get selectMode(): SelectMode;
|
|
548
|
-
set selectMode(val: SelectMode);
|
|
549
|
-
/** The currently selected date */
|
|
550
|
-
private _selected?;
|
|
551
|
-
get selected(): T | undefined;
|
|
552
|
-
set selected(value: T | undefined);
|
|
553
|
-
private _selecteds;
|
|
554
|
-
get selecteds(): Array<T | undefined>;
|
|
555
|
-
set selecteds(values: Array<T | undefined>);
|
|
556
|
-
private _pickerMoment?;
|
|
557
|
-
get pickerMoment(): T | undefined;
|
|
558
|
-
set pickerMoment(value: T | undefined);
|
|
559
|
-
/**
|
|
560
|
-
* A function used to filter which dates are selectable
|
|
561
|
-
*/
|
|
562
|
-
private _dateTimeFilter?;
|
|
563
|
-
get dateTimeFilter(): DateFilter<T> | undefined;
|
|
564
|
-
set dateTimeFilter(filter: DateFilter<T> | undefined);
|
|
565
|
-
/** The minimum selectable date */
|
|
566
|
-
private _minDate?;
|
|
567
|
-
get min(): T | undefined;
|
|
568
|
-
set min(value: T | undefined);
|
|
569
|
-
/** The maximum selectable date */
|
|
570
|
-
private _maxDate?;
|
|
571
|
-
get max(): T | undefined;
|
|
572
|
-
set max(value: T | undefined);
|
|
573
|
-
private _todayYear?;
|
|
574
|
-
get todayYear(): number | undefined;
|
|
575
|
-
private _years?;
|
|
576
|
-
get years(): CalendarCell[][] | undefined;
|
|
577
|
-
private _selectedYears?;
|
|
578
|
-
get selectedYears(): (number | undefined)[] | undefined;
|
|
579
|
-
private initiated;
|
|
580
|
-
get isInSingleMode(): boolean;
|
|
581
|
-
get isInRangeMode(): boolean;
|
|
582
|
-
get activeCell(): number | undefined;
|
|
583
|
-
get tableHeader(): string | undefined;
|
|
584
|
-
get prevButtonLabel(): string;
|
|
585
|
-
get nextButtonLabel(): string;
|
|
586
|
-
/**
|
|
587
|
-
* Callback to invoke when a new month is selected
|
|
588
|
-
*/
|
|
589
|
-
readonly change: EventEmitter<T>;
|
|
590
|
-
/**
|
|
591
|
-
* Emits the selected year
|
|
592
|
-
*
|
|
593
|
-
* This doesn't imply a change on the selected date.
|
|
594
|
-
*/
|
|
595
|
-
readonly yearSelected: EventEmitter<T>;
|
|
596
|
-
/** Emits when any date is activated */
|
|
597
|
-
readonly pickerMomentChange: EventEmitter<T>;
|
|
598
|
-
/** Emits when use keyboard enter to select a calendar cell */
|
|
599
|
-
readonly keyboardEnter: EventEmitter<void>;
|
|
600
|
-
/** The body of calendar table */
|
|
601
|
-
private calendarBodyElm?;
|
|
602
|
-
/** @internal */
|
|
603
|
-
get calendarView(): boolean;
|
|
604
|
-
/** @internal */
|
|
605
|
-
get calendarMultiYearView(): boolean;
|
|
606
|
-
constructor(cdRef: ChangeDetectorRef, pickerIntl: DateTimeIntl, dateTimeAdapter: DateTimeAdapter<T>);
|
|
607
|
-
ngOnInit(): void;
|
|
608
|
-
ngAfterContentInit(): void;
|
|
609
|
-
/**
|
|
610
|
-
* Handle a calendarCell selected
|
|
611
|
-
*/
|
|
612
|
-
selectCalendarCell(cell: CalendarCell): void;
|
|
613
|
-
private selectYear;
|
|
614
|
-
/**
|
|
615
|
-
* Generate the previous year list
|
|
616
|
-
*/
|
|
617
|
-
prevYearList(event: any): void;
|
|
618
|
-
/**
|
|
619
|
-
* Generate the next year list
|
|
620
|
-
*/
|
|
621
|
-
nextYearList(event: any): void;
|
|
622
|
-
generateYearList(): void;
|
|
623
|
-
/** Whether the previous period button is enabled */
|
|
624
|
-
previousEnabled(): boolean;
|
|
625
|
-
/** Whether the next period button is enabled */
|
|
626
|
-
nextEnabled(): boolean;
|
|
627
|
-
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
628
|
-
/**
|
|
629
|
-
* Creates an CalendarCell for the given year.
|
|
630
|
-
*/
|
|
631
|
-
private createYearCell;
|
|
632
|
-
private setSelectedYears;
|
|
633
|
-
/** Whether the given year is enabled */
|
|
634
|
-
private isYearEnabled;
|
|
635
|
-
private isSameYearList;
|
|
636
|
-
/**
|
|
637
|
-
* Get a valid date object
|
|
638
|
-
*/
|
|
639
|
-
private getValidDate;
|
|
640
|
-
private focusActiveCell;
|
|
641
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MultiYearViewComponent<any>, never>;
|
|
642
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MultiYearViewComponent<any>, "nxt-date-time-multi-year-view", never, { "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "dateTimeFilter": { "alias": "dateTimeFilter"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, { "change": "change"; "yearSelected": "yearSelected"; "pickerMomentChange": "pickerMomentChange"; "keyboardEnter": "keyboardEnter"; }, never, never, false, never>;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
declare class YearViewComponent<T> implements OnInit, AfterContentInit, OnDestroy {
|
|
646
|
-
private readonly cdRef;
|
|
647
|
-
private readonly dateTimeAdapter;
|
|
648
|
-
private readonly dateTimeFormats;
|
|
649
|
-
/**
|
|
650
|
-
* The select mode of the picker;
|
|
651
|
-
*/
|
|
652
|
-
private _selectMode;
|
|
653
|
-
get selectMode(): SelectMode;
|
|
654
|
-
set selectMode(val: SelectMode);
|
|
655
|
-
/** The currently selected date */
|
|
656
|
-
private _selected?;
|
|
657
|
-
get selected(): T | undefined;
|
|
658
|
-
set selected(value: T | undefined);
|
|
659
|
-
private _selecteds;
|
|
660
|
-
get selecteds(): Array<T | undefined>;
|
|
661
|
-
set selecteds(values: Array<T | undefined>);
|
|
662
|
-
private _pickerMoment?;
|
|
663
|
-
get pickerMoment(): T | undefined;
|
|
664
|
-
set pickerMoment(value: T | undefined);
|
|
665
|
-
/**
|
|
666
|
-
* A function used to filter which dates are selectable
|
|
667
|
-
*/
|
|
668
|
-
private _dateTimeFilter?;
|
|
669
|
-
get dateTimeFilter(): DateFilter<T> | undefined;
|
|
670
|
-
set dateTimeFilter(filter: DateFilter<T> | undefined);
|
|
671
|
-
/** The minimum selectable date */
|
|
672
|
-
private _minDate?;
|
|
673
|
-
get min(): T | undefined;
|
|
674
|
-
set min(value: T | undefined);
|
|
675
|
-
/** The maximum selectable date */
|
|
676
|
-
private _maxDate?;
|
|
677
|
-
get max(): T | undefined;
|
|
678
|
-
set max(value: T | undefined);
|
|
679
|
-
private readonly monthNames;
|
|
680
|
-
private _months?;
|
|
681
|
-
get months(): CalendarCell[][] | undefined;
|
|
682
|
-
get activeCell(): number | undefined;
|
|
683
|
-
get isInSingleMode(): boolean;
|
|
684
|
-
get isInRangeMode(): boolean;
|
|
685
|
-
private localeSub?;
|
|
686
|
-
private initiated;
|
|
687
|
-
todayMonth?: number;
|
|
688
|
-
/**
|
|
689
|
-
* An array to hold all selectedDates' month value
|
|
690
|
-
* the value is the month number in current year
|
|
691
|
-
*/
|
|
692
|
-
selectedMonths?: Array<number | undefined>;
|
|
693
|
-
/**
|
|
694
|
-
* Callback to invoke when a new month is selected
|
|
695
|
-
*/
|
|
696
|
-
readonly change: EventEmitter<T>;
|
|
697
|
-
/**
|
|
698
|
-
* Emits the selected year
|
|
699
|
-
*
|
|
700
|
-
* This doesn't imply a change on the selected date.
|
|
701
|
-
*/
|
|
702
|
-
readonly monthSelected: EventEmitter<T>;
|
|
703
|
-
/** Emits when any date is activated */
|
|
704
|
-
readonly pickerMomentChange: EventEmitter<T>;
|
|
705
|
-
/** Emits when use keyboard enter to select a calendar cell */
|
|
706
|
-
readonly keyboardEnter: EventEmitter<void>;
|
|
707
|
-
/** The body of calendar table */
|
|
708
|
-
private calendarBodyElm?;
|
|
709
|
-
/** @internal */
|
|
710
|
-
get calendarView(): boolean;
|
|
711
|
-
constructor(cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
|
|
712
|
-
ngOnInit(): void;
|
|
713
|
-
ngAfterContentInit(): void;
|
|
714
|
-
ngOnDestroy(): void;
|
|
715
|
-
/**
|
|
716
|
-
* Handle a calendarCell selected
|
|
717
|
-
*/
|
|
718
|
-
selectCalendarCell(cell: CalendarCell): void;
|
|
719
|
-
/**
|
|
720
|
-
* Handle a new month selected
|
|
721
|
-
*/
|
|
722
|
-
private selectMonth;
|
|
723
|
-
/**
|
|
724
|
-
* Handle keydown event on calendar body
|
|
725
|
-
*/
|
|
726
|
-
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
727
|
-
/**
|
|
728
|
-
* Generate the calendar month list
|
|
729
|
-
*/
|
|
730
|
-
private generateMonthList;
|
|
731
|
-
/**
|
|
732
|
-
* Creates an CalendarCell for the given month.
|
|
733
|
-
*/
|
|
734
|
-
private createMonthCell;
|
|
735
|
-
/**
|
|
736
|
-
* Check if the given month is enable
|
|
737
|
-
*/
|
|
738
|
-
private isMonthEnabled;
|
|
739
|
-
/**
|
|
740
|
-
* Gets the month in this year that the given Date falls on.
|
|
741
|
-
* Returns undefined if the given Date is in another year.
|
|
742
|
-
*/
|
|
743
|
-
private getMonthInCurrentYear;
|
|
744
|
-
/**
|
|
745
|
-
* Set the selectedMonths value
|
|
746
|
-
* In single mode, it has only one value which represent the month the selected date in
|
|
747
|
-
* In range mode, it would has two values, one for the month the fromValue in and the other for the month the toValue in
|
|
748
|
-
*/
|
|
749
|
-
private setSelectedMonths;
|
|
750
|
-
/**
|
|
751
|
-
* Check the given dates are in the same year
|
|
752
|
-
*/
|
|
753
|
-
private hasSameYear;
|
|
754
|
-
/**
|
|
755
|
-
* Get a valid date object
|
|
756
|
-
*/
|
|
757
|
-
private getValidDate;
|
|
758
|
-
private focusActiveCell;
|
|
759
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<YearViewComponent<any>, never>;
|
|
760
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<YearViewComponent<any>, "nxt-date-time-year-view", never, { "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "dateTimeFilter": { "alias": "dateTimeFilter"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, { "change": "change"; "monthSelected": "monthSelected"; "pickerMomentChange": "pickerMomentChange"; "keyboardEnter": "keyboardEnter"; }, never, never, false, never>;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
declare class CalendarComponent<T> implements OnInit, AfterContentInit, AfterViewChecked, OnDestroy {
|
|
764
|
-
private readonly elmRef;
|
|
765
|
-
private readonly pickerIntl;
|
|
766
|
-
private readonly ngZone;
|
|
767
|
-
private readonly cdRef;
|
|
768
|
-
private readonly dateTimeAdapter;
|
|
769
|
-
private readonly dateTimeFormats;
|
|
770
|
-
/**
|
|
771
|
-
* Date filter for the month and year view
|
|
772
|
-
*/
|
|
773
|
-
dateTimeFilter?: DateFilter<T>;
|
|
774
|
-
/**
|
|
775
|
-
* Set the first day of week
|
|
776
|
-
*/
|
|
777
|
-
firstDayOfWeek: number;
|
|
778
|
-
/** The minimum selectable date */
|
|
779
|
-
private _minDate?;
|
|
780
|
-
get min(): T | undefined;
|
|
781
|
-
set min(value: T | undefined);
|
|
782
|
-
/** The maximum selectable date */
|
|
783
|
-
private _maxDate?;
|
|
784
|
-
get max(): T | undefined;
|
|
785
|
-
set max(value: T | undefined);
|
|
786
|
-
/** The current picker moment */
|
|
787
|
-
private _pickerMoment?;
|
|
788
|
-
get pickerMoment(): T | undefined;
|
|
789
|
-
set pickerMoment(value: T | undefined);
|
|
790
|
-
selectMode?: SelectMode;
|
|
791
|
-
/** The currently selected moment */
|
|
792
|
-
private _selected?;
|
|
793
|
-
get selected(): T | undefined;
|
|
794
|
-
set selected(value: T | undefined);
|
|
795
|
-
private _selecteds;
|
|
796
|
-
get selecteds(): Array<T | undefined>;
|
|
797
|
-
set selecteds(values: Array<T | undefined>);
|
|
798
|
-
/**
|
|
799
|
-
* The view that the calendar should start in
|
|
800
|
-
*/
|
|
801
|
-
startView: 'month' | 'year' | 'multi-years';
|
|
802
|
-
/**
|
|
803
|
-
* Whether to hide dates in other months at the start or end of the current month
|
|
804
|
-
*/
|
|
805
|
-
hideOtherMonths: boolean;
|
|
806
|
-
/** Emits when the currently picker moment changes */
|
|
807
|
-
readonly pickerMomentChange: EventEmitter<T>;
|
|
808
|
-
/** Emits when the currently selected date changes */
|
|
809
|
-
readonly selectedChange: EventEmitter<T | undefined>;
|
|
810
|
-
/** Emits when any date is selected */
|
|
811
|
-
readonly userSelection: EventEmitter<void>;
|
|
812
|
-
/**
|
|
813
|
-
* Emits the selected year
|
|
814
|
-
*
|
|
815
|
-
* This doesn't imply a change on the selected date.
|
|
816
|
-
*/
|
|
817
|
-
readonly yearSelected: EventEmitter<T>;
|
|
818
|
-
/**
|
|
819
|
-
* Emits the selected month
|
|
820
|
-
*
|
|
821
|
-
* This doesn't imply a change on the selected date.
|
|
822
|
-
*/
|
|
823
|
-
readonly monthSelected: EventEmitter<T>;
|
|
824
|
-
get periodButtonText(): string;
|
|
825
|
-
get periodButtonLabel(): string;
|
|
826
|
-
get prevButtonLabel(): string | undefined;
|
|
827
|
-
get nextButtonLabel(): string | undefined;
|
|
828
|
-
private _currentView?;
|
|
829
|
-
get currentView(): "month" | "year" | "multi-years" | undefined;
|
|
830
|
-
set currentView(view: 'month' | 'year' | 'multi-years' | undefined);
|
|
831
|
-
get isInSingleMode(): boolean;
|
|
832
|
-
get isInRangeMode(): boolean;
|
|
833
|
-
get showControlArrows(): boolean;
|
|
834
|
-
get isMonthView(): boolean;
|
|
835
|
-
/**
|
|
836
|
-
* Date filter for the month and year view
|
|
837
|
-
*/
|
|
838
|
-
dateTimeFilterForViews: (date?: T) => boolean;
|
|
839
|
-
/**
|
|
840
|
-
* Bind class 'nxt-dt-calendar' to host
|
|
841
|
-
*
|
|
842
|
-
* @internal
|
|
843
|
-
*/
|
|
844
|
-
get calendarClass(): boolean;
|
|
845
|
-
private intlChangesSub?;
|
|
846
|
-
/**
|
|
847
|
-
* Used for scheduling that focus should be moved to the active cell on the next tick.
|
|
848
|
-
* We need to schedule it, rather than do it immediately, because we have to wait
|
|
849
|
-
* for Angular to re-evaluate the view children.
|
|
850
|
-
*/
|
|
851
|
-
private moveFocusOnNextTick;
|
|
852
|
-
constructor(elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, ngZone: NgZone, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
|
|
853
|
-
ngOnInit(): void;
|
|
854
|
-
ngAfterContentInit(): void;
|
|
855
|
-
ngAfterViewChecked(): void;
|
|
856
|
-
ngOnDestroy(): void;
|
|
857
|
-
/**
|
|
858
|
-
* Toggle between month view and year view
|
|
859
|
-
*/
|
|
860
|
-
toggleViews(): void;
|
|
861
|
-
/**
|
|
862
|
-
* Handles user clicks on the previous button.
|
|
863
|
-
*/
|
|
864
|
-
previousClicked(): void;
|
|
865
|
-
/**
|
|
866
|
-
* Handles user clicks on the next button.
|
|
867
|
-
*/
|
|
868
|
-
nextClicked(): void;
|
|
869
|
-
dateSelected(date?: T): void;
|
|
870
|
-
/**
|
|
871
|
-
* Change the pickerMoment value and switch to a specific view
|
|
872
|
-
*/
|
|
873
|
-
goToDateInView(date: T, view: 'month' | 'year' | 'multi-years'): void;
|
|
874
|
-
/**
|
|
875
|
-
* Change the pickerMoment value
|
|
876
|
-
*/
|
|
877
|
-
handlePickerMomentChange(date: T): void;
|
|
878
|
-
userSelected(): void;
|
|
879
|
-
/**
|
|
880
|
-
* Whether the previous period button is enabled.
|
|
881
|
-
*/
|
|
882
|
-
prevButtonEnabled(): boolean;
|
|
883
|
-
/**
|
|
884
|
-
* Whether the next period button is enabled.
|
|
885
|
-
*/
|
|
886
|
-
nextButtonEnabled(): boolean;
|
|
887
|
-
/**
|
|
888
|
-
* Focus to the host element
|
|
889
|
-
*/
|
|
890
|
-
focusActiveCell(): void;
|
|
891
|
-
selectYearInMultiYearView(normalizedYear: T): void;
|
|
892
|
-
selectMonthInYearView(normalizedMonth: T): void;
|
|
893
|
-
/**
|
|
894
|
-
* Whether the two dates represent the same view in the current view mode (month or year).
|
|
895
|
-
*/
|
|
896
|
-
private isSameView;
|
|
897
|
-
/**
|
|
898
|
-
* Get a valid date object
|
|
899
|
-
*/
|
|
900
|
-
private getValidDate;
|
|
901
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent<any>, never>;
|
|
902
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent<any>, "nxt-date-time-calendar", never, { "dateTimeFilter": { "alias": "dateTimeFilter"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; }, { "pickerMomentChange": "pickerMomentChange"; "selectedChange": "selectedChange"; "userSelection": "userSelection"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, false, never>;
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
declare class DateTimeInlineComponent<T> extends DateTimeDirective<T> implements OnInit, ControlValueAccessor {
|
|
906
|
-
protected readonly changeDetector: ChangeDetectorRef;
|
|
907
|
-
private container?;
|
|
908
|
-
private _pickerType;
|
|
909
|
-
/**
|
|
910
|
-
* Set the type of the dateTime picker
|
|
911
|
-
*
|
|
912
|
-
* - `'both'` - show both calendar and timer
|
|
913
|
-
* - `'calendar'` - show only calendar
|
|
914
|
-
* - `'timer'` - show only timer
|
|
915
|
-
*/
|
|
916
|
-
get pickerType(): PickerType;
|
|
917
|
-
set pickerType(val: PickerType);
|
|
918
|
-
private _disabled;
|
|
919
|
-
/** Whether the date time picker should be disabled */
|
|
920
|
-
get disabled(): boolean;
|
|
921
|
-
set disabled(value: boolean);
|
|
922
|
-
private _selectMode;
|
|
923
|
-
/**
|
|
924
|
-
* The picker select mode
|
|
925
|
-
*
|
|
926
|
-
* - `'single'` - select a single date
|
|
927
|
-
* - `'range'` - select a range [from, to]
|
|
928
|
-
* - `'rangeFrom'` - an open range with a fixed start date
|
|
929
|
-
* - `'rangeTo'` - an open range with a fixed end date
|
|
930
|
-
*/
|
|
931
|
-
get selectMode(): SelectMode;
|
|
932
|
-
set selectMode(mode: SelectMode);
|
|
933
|
-
private _startAt?;
|
|
934
|
-
/**
|
|
935
|
-
* The date to show when picker opens
|
|
936
|
-
*
|
|
937
|
-
* Defaults to selected date (if available) or current date.
|
|
938
|
-
*/
|
|
939
|
-
get startAt(): T | undefined;
|
|
940
|
-
set startAt(date: T | undefined);
|
|
941
|
-
private _dateTimeFilter?;
|
|
942
|
-
/** A function to filter available date & time */
|
|
943
|
-
get dateTimeFilter(): DateFilter<T> | undefined;
|
|
944
|
-
set dateTimeFilter(filter: DateFilter<T> | undefined);
|
|
945
|
-
private _min?;
|
|
946
|
-
/** The minimum valid date */
|
|
947
|
-
set min(value: T | undefined);
|
|
948
|
-
get min(): T | undefined;
|
|
949
|
-
private _max?;
|
|
950
|
-
/** The maximum valid date */
|
|
951
|
-
set max(value: T | undefined);
|
|
952
|
-
get max(): T | undefined;
|
|
953
|
-
private _value?;
|
|
954
|
-
get value(): T | undefined;
|
|
955
|
-
set value(value: T | undefined);
|
|
956
|
-
private _values?;
|
|
957
|
-
get values(): Array<T | undefined> | undefined;
|
|
958
|
-
set values(values: Array<T | undefined> | undefined);
|
|
959
|
-
/**
|
|
960
|
-
* Emits selected year in multi-year view
|
|
961
|
-
*
|
|
962
|
-
* This doesn't imply a change on the selected date.
|
|
963
|
-
*/
|
|
964
|
-
readonly yearSelected: EventEmitter<T>;
|
|
965
|
-
/**
|
|
966
|
-
* Emits selected month in year view
|
|
967
|
-
*
|
|
968
|
-
* This doesn't imply a change on the selected date.
|
|
969
|
-
*/
|
|
970
|
-
readonly monthSelected: EventEmitter<T>;
|
|
971
|
-
private _selected?;
|
|
972
|
-
get selected(): T | undefined;
|
|
973
|
-
set selected(value: T | undefined);
|
|
974
|
-
private _selecteds;
|
|
975
|
-
get selecteds(): Array<T | undefined>;
|
|
976
|
-
set selecteds(values: Array<T | undefined>);
|
|
977
|
-
get isOpen(): boolean;
|
|
978
|
-
get pickerMode(): PickerMode;
|
|
979
|
-
get isInSingleMode(): boolean;
|
|
980
|
-
get isInRangeMode(): boolean;
|
|
981
|
-
/** @internal */
|
|
982
|
-
get inlineClass(): boolean;
|
|
983
|
-
private onModelChange?;
|
|
984
|
-
private onModelTouched?;
|
|
985
|
-
constructor(changeDetector: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
|
|
986
|
-
ngOnInit(): void;
|
|
987
|
-
writeValue(value: any): void;
|
|
988
|
-
registerOnChange(fn: any): void;
|
|
989
|
-
registerOnTouched(fn: any): void;
|
|
990
|
-
setDisabledState(isDisabled: boolean): void;
|
|
991
|
-
select(date: T[] | T): void;
|
|
992
|
-
/**
|
|
993
|
-
* Emits the selected year in multi-year view
|
|
994
|
-
*/
|
|
995
|
-
selectYear(normalizedYear: T): void;
|
|
996
|
-
/**
|
|
997
|
-
* Emits selected month in year view
|
|
998
|
-
*/
|
|
999
|
-
selectMonth(normalizedMonth: T): void;
|
|
1000
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeInlineComponent<any>, never>;
|
|
1001
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeInlineComponent<any>, "nxt-date-time-inline", never, { "pickerType": { "alias": "pickerType"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "dateTimeFilter": { "alias": "dateTimeFilter"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "value": { "alias": "value"; "required": false; }; "values": { "alias": "values"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, false, never>;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
/** Possible overrides for a dialog's position */
|
|
1005
|
-
interface DialogPosition {
|
|
1006
|
-
/** Override for the dialog's top position */
|
|
1007
|
-
top?: string;
|
|
1008
|
-
/** Override for the dialog's bottom position */
|
|
1009
|
-
bottom?: string;
|
|
1010
|
-
/** Override for the dialog's left position */
|
|
1011
|
-
left?: string;
|
|
1012
|
-
/** Override for the dialog's right position */
|
|
1013
|
-
right?: string;
|
|
1014
|
-
}
|
|
1015
|
-
declare class DialogConfig {
|
|
1016
|
-
/**
|
|
1017
|
-
* ID of the element that describes the dialog.
|
|
1018
|
-
*/
|
|
1019
|
-
ariaDescribedBy?: string;
|
|
1020
|
-
/**
|
|
1021
|
-
* Whether to focus the dialog when the dialog is isOpen
|
|
1022
|
-
*/
|
|
1023
|
-
autoFocus: boolean;
|
|
1024
|
-
/** Whether the dialog has a backdrop */
|
|
1025
|
-
hasBackdrop?: boolean | undefined;
|
|
1026
|
-
/**
|
|
1027
|
-
* Custom style for the backdrop
|
|
1028
|
-
*/
|
|
1029
|
-
backdropStyle?: any;
|
|
1030
|
-
/** Data being injected into the child component */
|
|
1031
|
-
data?: any;
|
|
1032
|
-
/** Whether the user can use escape or clicking outside to close a modal */
|
|
1033
|
-
disableClose?: boolean | undefined;
|
|
1034
|
-
/**
|
|
1035
|
-
* ID for the modal. If omitted, a unique one will be generated.
|
|
1036
|
-
*/
|
|
1037
|
-
id?: string;
|
|
1038
|
-
/**
|
|
1039
|
-
* The ARIA role of the dialog element.
|
|
1040
|
-
*/
|
|
1041
|
-
role?: 'dialog' | 'alertdialog';
|
|
1042
|
-
/**
|
|
1043
|
-
* Custom class for the pane
|
|
1044
|
-
*/
|
|
1045
|
-
paneClass?: string | string[];
|
|
1046
|
-
/**
|
|
1047
|
-
* Mouse Event
|
|
1048
|
-
*/
|
|
1049
|
-
event?: MouseEvent;
|
|
1050
|
-
/**
|
|
1051
|
-
* Custom class for the backdrop
|
|
1052
|
-
*/
|
|
1053
|
-
backdropClass?: string | string[];
|
|
1054
|
-
/**
|
|
1055
|
-
* Whether the dialog should close when the user goes backwards/forwards in history.
|
|
1056
|
-
*/
|
|
1057
|
-
closeOnNavigation?: boolean;
|
|
1058
|
-
/** Width of the dialog */
|
|
1059
|
-
width?: string;
|
|
1060
|
-
/** Height of the dialog */
|
|
1061
|
-
height?: string;
|
|
1062
|
-
/**
|
|
1063
|
-
* The min-width of the overlay panel.
|
|
1064
|
-
* If a number is provided, pixel units are assumed.
|
|
1065
|
-
*/
|
|
1066
|
-
minWidth?: number | string;
|
|
1067
|
-
/**
|
|
1068
|
-
* The min-height of the overlay panel.
|
|
1069
|
-
* If a number is provided, pixel units are assumed.
|
|
1070
|
-
*/
|
|
1071
|
-
minHeight?: number | string;
|
|
1072
|
-
/**
|
|
1073
|
-
* The max-width of the overlay panel.
|
|
1074
|
-
* If a number is provided, pixel units are assumed.
|
|
1075
|
-
*/
|
|
1076
|
-
maxWidth?: number | string;
|
|
1077
|
-
/**
|
|
1078
|
-
* The max-height of the overlay panel.
|
|
1079
|
-
* If a number is provided, pixel units are assumed.
|
|
1080
|
-
*/
|
|
1081
|
-
maxHeight?: number | string;
|
|
1082
|
-
/** Position overrides */
|
|
1083
|
-
position?: DialogPosition;
|
|
1084
|
-
/**
|
|
1085
|
-
* The scroll strategy when the dialog is open
|
|
1086
|
-
* Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies
|
|
1087
|
-
*/
|
|
1088
|
-
scrollStrategy?: ScrollStrategy;
|
|
1089
|
-
viewContainerRef?: ViewContainerRef;
|
|
1090
|
-
constructor();
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
/** @internal */
|
|
1094
|
-
type DialogContainerState = 'void' | 'enter' | 'exit';
|
|
1095
|
-
/** @internal */
|
|
1096
|
-
declare class DialogContainerComponent extends BasePortalOutlet implements OnInit {
|
|
1097
|
-
private readonly changeDetector;
|
|
1098
|
-
private readonly elementRef;
|
|
1099
|
-
private readonly focusTrapFactory;
|
|
1100
|
-
private readonly document?;
|
|
1101
|
-
portalOutlet?: CdkPortalOutlet;
|
|
1102
|
-
/** The class that traps and manages focus within the dialog */
|
|
1103
|
-
private focusTrap?;
|
|
1104
|
-
/** ID of the element that should be considered as the dialog's label */
|
|
1105
|
-
ariaLabelledBy?: string;
|
|
1106
|
-
/** Emits when an animation state changes */
|
|
1107
|
-
readonly animationStateChanged: EventEmitter<AnimationEvent>;
|
|
1108
|
-
isAnimating: boolean;
|
|
1109
|
-
private _config?;
|
|
1110
|
-
get config(): DialogConfig | undefined;
|
|
1111
|
-
private state;
|
|
1112
|
-
private params;
|
|
1113
|
-
private elementFocusedBeforeDialogWasOpened?;
|
|
1114
|
-
/** @internal */
|
|
1115
|
-
get dialogContainerClass(): boolean;
|
|
1116
|
-
/** @internal */
|
|
1117
|
-
get dialogContainerTabIndex(): number;
|
|
1118
|
-
/** @internal */
|
|
1119
|
-
get dialogContainerId(): string | undefined;
|
|
1120
|
-
/** @internal */
|
|
1121
|
-
get dialogContainerRole(): "dialog" | "alertdialog" | undefined;
|
|
1122
|
-
/** @internal */
|
|
1123
|
-
get dialogContainerAriaLabelledby(): string | undefined;
|
|
1124
|
-
/** @internal */
|
|
1125
|
-
get dialogContainerAriaDescribedby(): string | undefined;
|
|
1126
|
-
/** @internal */
|
|
1127
|
-
get dialogContainerAnimation(): {
|
|
1128
|
-
value: DialogContainerState;
|
|
1129
|
-
params: any;
|
|
1130
|
-
};
|
|
1131
|
-
constructor(changeDetector: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>, focusTrapFactory: ConfigurableFocusTrapFactory, document?: Document | undefined);
|
|
1132
|
-
ngOnInit(): void;
|
|
1133
|
-
/**
|
|
1134
|
-
* Attach a ComponentPortal as content to this dialog container.
|
|
1135
|
-
*/
|
|
1136
|
-
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
|
1137
|
-
attachTemplatePortal<C>(_portal: TemplatePortal<C>): EmbeddedViewRef<C>;
|
|
1138
|
-
setConfig(config: DialogConfig): void;
|
|
1139
|
-
onAnimationStart(event: AnimationEvent): void;
|
|
1140
|
-
onAnimationDone(event: AnimationEvent): void;
|
|
1141
|
-
startExitAnimation(): void;
|
|
1142
|
-
/**
|
|
1143
|
-
* Calculate origin used in the `zoomFadeInFrom()`
|
|
1144
|
-
* for animation purpose
|
|
1145
|
-
*/
|
|
1146
|
-
private calculateZoomOrigin;
|
|
1147
|
-
/**
|
|
1148
|
-
* Save the focused element before dialog was open
|
|
1149
|
-
*/
|
|
1150
|
-
private savePreviouslyFocusedElement;
|
|
1151
|
-
private trapFocus;
|
|
1152
|
-
private restoreFocus;
|
|
1153
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DialogContainerComponent, [null, null, null, { optional: true; }]>;
|
|
1154
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DialogContainerComponent, "nxt-dialog-container", never, {}, {}, never, never, false, never>;
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
declare class DialogRef<T> {
|
|
1158
|
-
private readonly overlayRef;
|
|
1159
|
-
private readonly container;
|
|
1160
|
-
readonly id?: string | undefined;
|
|
1161
|
-
private result;
|
|
1162
|
-
private readonly _beforeClose$;
|
|
1163
|
-
private readonly _afterOpen$;
|
|
1164
|
-
private readonly _afterClosed$;
|
|
1165
|
-
/** Subscription to changes in the user's location */
|
|
1166
|
-
private locationChanged?;
|
|
1167
|
-
/**
|
|
1168
|
-
* The instance of component isOpen into modal
|
|
1169
|
-
*/
|
|
1170
|
-
componentInstance?: T;
|
|
1171
|
-
/** Whether the user is allowed to close the dialog */
|
|
1172
|
-
disableClose: boolean;
|
|
1173
|
-
constructor(overlayRef: OverlayRef, container: DialogContainerComponent, id?: string | undefined, location?: Location);
|
|
1174
|
-
close(dialogResult?: any): void;
|
|
1175
|
-
/**
|
|
1176
|
-
* Gets an observable that emits when the overlay's backdrop has been clicked.
|
|
1177
|
-
*/
|
|
1178
|
-
backdropClick(): rxjs.Observable<MouseEvent>;
|
|
1179
|
-
/**
|
|
1180
|
-
* Gets an observable that emits when keydown events are targeted on the overlay.
|
|
1181
|
-
*/
|
|
1182
|
-
keydownEvents(): rxjs.Observable<KeyboardEvent>;
|
|
1183
|
-
/**
|
|
1184
|
-
* Updates the dialog's position.
|
|
1185
|
-
*
|
|
1186
|
-
* @param position New dialog position.
|
|
1187
|
-
*/
|
|
1188
|
-
updatePosition(position?: DialogPosition): this;
|
|
1189
|
-
/**
|
|
1190
|
-
* Updates the dialog's width and height.
|
|
1191
|
-
*
|
|
1192
|
-
* @param width New width of the dialog.
|
|
1193
|
-
* @param height New height of the dialog.
|
|
1194
|
-
*/
|
|
1195
|
-
updateSize(width?: string, height?: string): this;
|
|
1196
|
-
isAnimating(): boolean;
|
|
1197
|
-
afterOpen(): rxjs.Observable<void>;
|
|
1198
|
-
beforeClose(): rxjs.Observable<void>;
|
|
1199
|
-
afterClosed(): rxjs.Observable<void>;
|
|
1200
|
-
/** Fetches the position strategy object from the overlay ref */
|
|
1201
|
-
private getPositionStrategy;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
/** @internal */
|
|
1205
|
-
declare class DialogService {
|
|
1206
|
-
private readonly overlay;
|
|
1207
|
-
private readonly injector;
|
|
1208
|
-
private readonly location;
|
|
1209
|
-
private readonly defaultOptions;
|
|
1210
|
-
private readonly parentDialog;
|
|
1211
|
-
private readonly overlayContainer;
|
|
1212
|
-
private readonly ariaHiddenElements;
|
|
1213
|
-
private readonly _openDialogsAtThisLevel;
|
|
1214
|
-
private readonly _afterOpenAtThisLevel;
|
|
1215
|
-
private readonly _afterAllClosedAtThisLevel;
|
|
1216
|
-
/** Keeps track of the currently-open dialogs */
|
|
1217
|
-
get openDialogs(): Array<DialogRef<any>>;
|
|
1218
|
-
/** Stream that emits when a dialog has been isOpen */
|
|
1219
|
-
get afterOpen(): Subject<DialogRef<any>>;
|
|
1220
|
-
get _afterAllClosed(): Subject<void>;
|
|
1221
|
-
/**
|
|
1222
|
-
* Stream that emits when all open dialog have finished closing.
|
|
1223
|
-
* Will emit on subscribe if there are no open dialogs to begin with.
|
|
1224
|
-
*/
|
|
1225
|
-
readonly afterAllClosed: rxjs.Observable<void | undefined>;
|
|
1226
|
-
private scrollStrategy;
|
|
1227
|
-
constructor(overlay: Overlay, injector: Injector, location: Location | undefined, scrollStrategy: () => ScrollStrategy, defaultOptions: DialogConfig | undefined, parentDialog: DialogService | undefined, overlayContainer: OverlayContainer);
|
|
1228
|
-
open<T>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>, config?: DialogConfig): DialogRef<any>;
|
|
1229
|
-
/**
|
|
1230
|
-
* Closes all of the currently-open dialogs.
|
|
1231
|
-
*/
|
|
1232
|
-
closeAll(): void;
|
|
1233
|
-
/**
|
|
1234
|
-
* Finds an open dialog by its id.
|
|
1235
|
-
*
|
|
1236
|
-
* @param id ID to use when looking up the dialog.
|
|
1237
|
-
*/
|
|
1238
|
-
getDialogById(id: string): DialogRef<any> | undefined;
|
|
1239
|
-
private attachDialogContent;
|
|
1240
|
-
private createInjector;
|
|
1241
|
-
private createOverlay;
|
|
1242
|
-
private attachDialogContainer;
|
|
1243
|
-
private getOverlayConfig;
|
|
1244
|
-
private removeOpenDialog;
|
|
1245
|
-
/**
|
|
1246
|
-
* Hides all of the content that isn't an overlay from assistive technology.
|
|
1247
|
-
*/
|
|
1248
|
-
private hideNonDialogContentFromAssistiveTechnology;
|
|
1249
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, [null, null, { optional: true; }, null, { optional: true; }, { optional: true; skipSelf: true; }, null]>;
|
|
1250
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
declare class DateTimeComponent<T> extends DateTimeDirective<T> implements OnInit, OnDestroy {
|
|
1254
|
-
private readonly overlay;
|
|
1255
|
-
private readonly viewContainerRef;
|
|
1256
|
-
private readonly dialogService;
|
|
1257
|
-
private readonly ngZone;
|
|
1258
|
-
protected readonly changeDetector: ChangeDetectorRef;
|
|
1259
|
-
private readonly defaultScrollStrategy;
|
|
1260
|
-
private readonly document?;
|
|
1261
|
-
/** Custom class for the picker backdrop */
|
|
1262
|
-
backdropClass?: string | string[];
|
|
1263
|
-
/** Custom class for the picker overlay pane */
|
|
1264
|
-
panelClass?: string | string[];
|
|
1265
|
-
private _startAt?;
|
|
1266
|
-
/**
|
|
1267
|
-
* The date to show when picker opens
|
|
1268
|
-
*
|
|
1269
|
-
* Defaults to selected date (if available) or current date.
|
|
1270
|
-
*/
|
|
1271
|
-
get startAt(): T | undefined;
|
|
1272
|
-
set startAt(date: T | undefined);
|
|
1273
|
-
private _pickerType;
|
|
1274
|
-
/**
|
|
1275
|
-
* Set the type of the dateTime picker
|
|
1276
|
-
*
|
|
1277
|
-
* - `'both'` - show both calendar and timer
|
|
1278
|
-
* - `'calendar'` - show only calendar
|
|
1279
|
-
* - `'timer'` - show only timer
|
|
1280
|
-
*/
|
|
1281
|
-
get pickerType(): PickerType;
|
|
1282
|
-
set pickerType(val: PickerType);
|
|
1283
|
-
private _pickerMode;
|
|
1284
|
-
/**
|
|
1285
|
-
* The style the picker would open as
|
|
1286
|
-
*
|
|
1287
|
-
* - `'popup'` - display picker attached to the trigger element
|
|
1288
|
-
* - `'dialog'` - display picker as a dialog
|
|
1289
|
-
*/
|
|
1290
|
-
get pickerMode(): PickerMode;
|
|
1291
|
-
set pickerMode(mode: PickerMode);
|
|
1292
|
-
private _disabled?;
|
|
1293
|
-
/** Whether the date time picker should be disabled */
|
|
1294
|
-
get disabled(): boolean;
|
|
1295
|
-
set disabled(value: boolean);
|
|
1296
|
-
private _isOpen;
|
|
1297
|
-
/** Whether the calendar is open */
|
|
1298
|
-
get isOpen(): boolean;
|
|
1299
|
-
set isOpen(val: boolean);
|
|
1300
|
-
/**
|
|
1301
|
-
* The scroll strategy when the picker is open (see [CDK documentation](https://material.angular.io/cdk/overlay/overview#scroll-strategies))
|
|
1302
|
-
*/
|
|
1303
|
-
scrollStrategy?: ScrollStrategy;
|
|
1304
|
-
/**
|
|
1305
|
-
* Callback when the picker is opened
|
|
1306
|
-
*/
|
|
1307
|
-
readonly afterPickerOpened: EventEmitter<void>;
|
|
1308
|
-
/**
|
|
1309
|
-
* Callback when the picker is closed
|
|
1310
|
-
*/
|
|
1311
|
-
readonly afterPickerClosed: EventEmitter<void>;
|
|
1312
|
-
/**
|
|
1313
|
-
* Emits selected year in multi-year view
|
|
1314
|
-
*
|
|
1315
|
-
* This doesn't imply a change on the selected date.
|
|
1316
|
-
*/
|
|
1317
|
-
readonly yearSelected: EventEmitter<T>;
|
|
1318
|
-
/**
|
|
1319
|
-
* Emits selected month in year view
|
|
1320
|
-
*
|
|
1321
|
-
* This doesn't imply a change on the selected date.
|
|
1322
|
-
*/
|
|
1323
|
-
readonly monthSelected: EventEmitter<T>;
|
|
1324
|
-
/**
|
|
1325
|
-
* Emits when picker open state changes
|
|
1326
|
-
*/
|
|
1327
|
-
readonly isOpenChange: EventEmitter<boolean>;
|
|
1328
|
-
/**
|
|
1329
|
-
* Emit when the selected value has been confirmed
|
|
1330
|
-
*/
|
|
1331
|
-
readonly confirmSelectedChange: EventEmitter<T | (T | undefined)[]>;
|
|
1332
|
-
/**
|
|
1333
|
-
* Emits when the date time picker is disabled
|
|
1334
|
-
*/
|
|
1335
|
-
readonly disabledChange: EventEmitter<boolean>;
|
|
1336
|
-
private pickerContainerPortal?;
|
|
1337
|
-
private pickerContainer?;
|
|
1338
|
-
private popupRef?;
|
|
1339
|
-
private dialogRef?;
|
|
1340
|
-
private dtInputSub?;
|
|
1341
|
-
private hidePickerStreamSub?;
|
|
1342
|
-
private confirmSelectedStreamSub?;
|
|
1343
|
-
private pickerOpenedStreamSub?;
|
|
1344
|
-
/** The element that was focused before the date time picker was isOpen */
|
|
1345
|
-
private focusedElementBeforeOpen?;
|
|
1346
|
-
private _dtInput?;
|
|
1347
|
-
get dtInput(): DateTimeInputDirective<T> | undefined;
|
|
1348
|
-
private _selected?;
|
|
1349
|
-
get selected(): T | undefined;
|
|
1350
|
-
set selected(value: T | undefined);
|
|
1351
|
-
private _selecteds;
|
|
1352
|
-
get selecteds(): Array<T | undefined>;
|
|
1353
|
-
set selecteds(values: Array<T | undefined>);
|
|
1354
|
-
/** The minimum selectable date */
|
|
1355
|
-
get min(): T | undefined;
|
|
1356
|
-
/** The maximum selectable date */
|
|
1357
|
-
get max(): T | undefined;
|
|
1358
|
-
get dateTimeFilter(): nxt_pick_datetime.DateFilter<T> | undefined;
|
|
1359
|
-
get selectMode(): nxt_pick_datetime.SelectMode | undefined;
|
|
1360
|
-
get isInSingleMode(): boolean;
|
|
1361
|
-
get isInRangeMode(): boolean;
|
|
1362
|
-
constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, dialogService: DialogService, ngZone: NgZone, changeDetector: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, defaultScrollStrategy: () => ScrollStrategy, dateTimeFormats: DateTimeFormats, document?: Document | undefined);
|
|
1363
|
-
ngOnInit(): void;
|
|
1364
|
-
ngOnDestroy(): void;
|
|
1365
|
-
registerInput(input: DateTimeInputDirective<T>): void;
|
|
1366
|
-
open(): void;
|
|
1367
|
-
/**
|
|
1368
|
-
* Selects the given date
|
|
1369
|
-
*/
|
|
1370
|
-
select(date: T[] | T): void;
|
|
1371
|
-
/**
|
|
1372
|
-
* Emits the selected year in multi-year view
|
|
1373
|
-
*/
|
|
1374
|
-
selectYear(normalizedYear: T): void;
|
|
1375
|
-
/**
|
|
1376
|
-
* Emits selected month in year view
|
|
1377
|
-
*/
|
|
1378
|
-
selectMonth(normalizedMonth: T): void;
|
|
1379
|
-
/**
|
|
1380
|
-
* Hide the picker
|
|
1381
|
-
*/
|
|
1382
|
-
close(): void;
|
|
1383
|
-
/**
|
|
1384
|
-
* Confirm the selected value
|
|
1385
|
-
*/
|
|
1386
|
-
confirmSelect(_event?: any): void;
|
|
1387
|
-
/**
|
|
1388
|
-
* Open the picker as a dialog
|
|
1389
|
-
*/
|
|
1390
|
-
private openAsDialog;
|
|
1391
|
-
/**
|
|
1392
|
-
* Open the picker as popup
|
|
1393
|
-
*/
|
|
1394
|
-
private openAsPopup;
|
|
1395
|
-
private createPopup;
|
|
1396
|
-
/**
|
|
1397
|
-
* Create the popup PositionStrategy.
|
|
1398
|
-
*/
|
|
1399
|
-
private createPopupPositionStrategy;
|
|
1400
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeComponent<any>, [null, null, null, null, null, null, null, null, { optional: true; }]>;
|
|
1401
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeComponent<any>, "nxt-date-time", never, { "backdropClass": { "alias": "backdropClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "pickerType": { "alias": "pickerType"; "required": false; }; "pickerMode": { "alias": "pickerMode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "scrollStrategy": { "alias": "scrollStrategy"; "required": false; }; }, { "afterPickerOpened": "open"; "afterPickerClosed": "close"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "isOpenChange": "isOpenChange"; }, never, never, false, never>;
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
interface DateTimeInputEvent<T> {
|
|
1405
|
-
source: DateTimeInputDirective<T>;
|
|
1406
|
-
value?: T | Array<T | undefined>;
|
|
1407
|
-
input: HTMLInputElement;
|
|
1408
|
-
}
|
|
1409
|
-
declare class DateTimeInputDirective<T> implements OnInit, AfterContentInit, OnDestroy, ControlValueAccessor, Validator {
|
|
1410
|
-
private readonly elmRef;
|
|
1411
|
-
private readonly renderer;
|
|
1412
|
-
private readonly dateTimeAdapter;
|
|
1413
|
-
private readonly dateTimeFormats;
|
|
1414
|
-
/**
|
|
1415
|
-
* The date & time picker this input is associated with
|
|
1416
|
-
*/
|
|
1417
|
-
set dateTime(value: DateTimeComponent<T>);
|
|
1418
|
-
private _dateTimeFilter?;
|
|
1419
|
-
/**
|
|
1420
|
-
* A function to filter available date & time
|
|
1421
|
-
*/
|
|
1422
|
-
set dateTimeFilter(filter: DateFilter<T> | undefined);
|
|
1423
|
-
get dateTimeFilter(): DateFilter<T> | undefined;
|
|
1424
|
-
private _disabled;
|
|
1425
|
-
/** Whether the date & time picker input is disabled */
|
|
1426
|
-
get disabled(): boolean;
|
|
1427
|
-
set disabled(value: boolean);
|
|
1428
|
-
private _min?;
|
|
1429
|
-
/** The minimum valid date */
|
|
1430
|
-
get min(): T | undefined;
|
|
1431
|
-
set min(value: T | undefined);
|
|
1432
|
-
private _max?;
|
|
1433
|
-
/** The maximum valid date */
|
|
1434
|
-
get max(): T | undefined;
|
|
1435
|
-
set max(value: T | undefined);
|
|
1436
|
-
private _selectMode;
|
|
1437
|
-
/**
|
|
1438
|
-
* The picker select mode
|
|
1439
|
-
*
|
|
1440
|
-
* - `'single'` - select a single date
|
|
1441
|
-
* - `'range'` - select a range [from, to]
|
|
1442
|
-
* - `'rangeFrom'` - an open range with a fixed start date
|
|
1443
|
-
* - `'rangeTo'` - an open range with a fixed end date
|
|
1444
|
-
*/
|
|
1445
|
-
get selectMode(): SelectMode;
|
|
1446
|
-
set selectMode(mode: SelectMode);
|
|
1447
|
-
/**
|
|
1448
|
-
* The character to separate the 'from' and 'to' in input value
|
|
1449
|
-
*/
|
|
1450
|
-
rangeSeparator: string;
|
|
1451
|
-
private _value?;
|
|
1452
|
-
get value(): T | undefined;
|
|
1453
|
-
set value(value: T | undefined);
|
|
1454
|
-
private _values;
|
|
1455
|
-
get values(): Array<T | undefined>;
|
|
1456
|
-
set values(values: Array<T | undefined>);
|
|
1457
|
-
/**
|
|
1458
|
-
* Callback to invoke when `change` event is fired on this `<input>`
|
|
1459
|
-
*/
|
|
1460
|
-
readonly dateTimeChange: EventEmitter<DateTimeInputEvent<T>>;
|
|
1461
|
-
/**
|
|
1462
|
-
* Callback to invoke when an `input` event is fired on this `<input>`.
|
|
1463
|
-
*/
|
|
1464
|
-
readonly dateTimeInput: EventEmitter<DateTimeInputEvent<T>>;
|
|
1465
|
-
get elementRef(): ElementRef<HTMLInputElement>;
|
|
1466
|
-
get isInSingleMode(): boolean;
|
|
1467
|
-
get isInRangeMode(): boolean;
|
|
1468
|
-
/** The date-time-picker that this input is associated with */
|
|
1469
|
-
dtPicker?: DateTimeComponent<T>;
|
|
1470
|
-
private dtPickerSub?;
|
|
1471
|
-
private localeSub?;
|
|
1472
|
-
private lastValueValid;
|
|
1473
|
-
private onModelChange?;
|
|
1474
|
-
private onModelTouched?;
|
|
1475
|
-
private validatorOnChange?;
|
|
1476
|
-
/** The form control validator for whether the input parses */
|
|
1477
|
-
private readonly parseValidator;
|
|
1478
|
-
/** The form control validator for the min date */
|
|
1479
|
-
private readonly minValidator;
|
|
1480
|
-
/** The form control validator for the max date */
|
|
1481
|
-
private readonly maxValidator;
|
|
1482
|
-
/** The form control validator for the date filter */
|
|
1483
|
-
private readonly filterValidator;
|
|
1484
|
-
/**
|
|
1485
|
-
* The form control validator for the range.
|
|
1486
|
-
* Check whether the 'before' value is before the 'to' value
|
|
1487
|
-
*/
|
|
1488
|
-
private readonly rangeValidator;
|
|
1489
|
-
/** The combined form control validator for this input */
|
|
1490
|
-
private readonly validator;
|
|
1491
|
-
/** Emits when the value changes (either due to user input or programmatic change) */
|
|
1492
|
-
readonly valueChange: EventEmitter<T | (T | undefined)[] | undefined>;
|
|
1493
|
-
/** Emits when the disabled state has changed */
|
|
1494
|
-
readonly disabledChange: EventEmitter<boolean>;
|
|
1495
|
-
/** @internal */
|
|
1496
|
-
get inputAriaHaspopup(): boolean;
|
|
1497
|
-
/** @internal */
|
|
1498
|
-
get inputAriaOwns(): string | undefined;
|
|
1499
|
-
/** @internal */
|
|
1500
|
-
get minIso8601(): string | undefined;
|
|
1501
|
-
/** @internal */
|
|
1502
|
-
get maxIso8601(): string | undefined;
|
|
1503
|
-
/** @internal */
|
|
1504
|
-
get inputDisabled(): boolean;
|
|
1505
|
-
constructor(elmRef: ElementRef<HTMLInputElement>, renderer: Renderer2, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
|
|
1506
|
-
ngOnInit(): void;
|
|
1507
|
-
ngAfterContentInit(): void;
|
|
1508
|
-
ngOnDestroy(): void;
|
|
1509
|
-
writeValue(value: any): void;
|
|
1510
|
-
registerOnChange(fn: any): void;
|
|
1511
|
-
registerOnTouched(fn: any): void;
|
|
1512
|
-
setDisabledState(isDisabled: boolean): void;
|
|
1513
|
-
validate(c: AbstractControl): ValidationErrors | null;
|
|
1514
|
-
registerOnValidatorChange(fn: () => void): void;
|
|
1515
|
-
/**
|
|
1516
|
-
* Open the picker when user hold alt + ArrowDown
|
|
1517
|
-
*/
|
|
1518
|
-
handleKeydownOnHost(event: KeyboardEvent): void;
|
|
1519
|
-
handleBlurOnHost(_event: Event): void;
|
|
1520
|
-
handleInputOnHost(event: any): void;
|
|
1521
|
-
handleChangeOnHost(_event: any): void;
|
|
1522
|
-
/**
|
|
1523
|
-
* Set the native input property 'value'
|
|
1524
|
-
*/
|
|
1525
|
-
formatNativeInputValue(): void;
|
|
1526
|
-
/**
|
|
1527
|
-
* Register the relationship between this input and its picker component
|
|
1528
|
-
*/
|
|
1529
|
-
private registerDateTimePicker;
|
|
1530
|
-
/**
|
|
1531
|
-
* Convert a given obj to a valid date object
|
|
1532
|
-
*/
|
|
1533
|
-
private getValidDate;
|
|
1534
|
-
/**
|
|
1535
|
-
* Convert a time string to a date-time string
|
|
1536
|
-
* When pickerType is 'timer', the value in the picker's input is a time string.
|
|
1537
|
-
* The dateTimeAdapter parse fn could not parse a time string to a Date Object.
|
|
1538
|
-
* Therefore we need this fn to convert a time string to a date-time string.
|
|
1539
|
-
*/
|
|
1540
|
-
private convertTimeStringToDateTimeString;
|
|
1541
|
-
/**
|
|
1542
|
-
* Handle input change in single mode
|
|
1543
|
-
*/
|
|
1544
|
-
private changeInputInSingleMode;
|
|
1545
|
-
/**
|
|
1546
|
-
* Handle input change in rangeFrom or rangeTo mode
|
|
1547
|
-
*/
|
|
1548
|
-
private changeInputInRangeFromToMode;
|
|
1549
|
-
/**
|
|
1550
|
-
* Handle input change in range mode
|
|
1551
|
-
*/
|
|
1552
|
-
private changeInputInRangeMode;
|
|
1553
|
-
/**
|
|
1554
|
-
* Check if the two value is the same
|
|
1555
|
-
*/
|
|
1556
|
-
private isSameValue;
|
|
1557
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeInputDirective<any>, never>;
|
|
1558
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeInputDirective<any>, "input[nxtDateTime]", ["nxtDateTimeInput"], { "dateTime": { "alias": "nxtDateTime"; "required": false; }; "dateTimeFilter": { "alias": "dateTimeFilter"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "rangeSeparator": { "alias": "rangeSeparator"; "required": false; }; "value": { "alias": "value"; "required": false; }; "values": { "alias": "values"; "required": false; }; }, { "dateTimeChange": "dateTimeChange"; "dateTimeInput": "dateTimeInput"; }, never, never, false, never>;
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
declare class DateTimeTriggerDirective<T> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
|
|
1562
|
-
protected readonly changeDetector: ChangeDetectorRef;
|
|
1563
|
-
dtPicker?: DateTimeComponent<T>;
|
|
1564
|
-
private _disabled?;
|
|
1565
|
-
get disabled(): boolean;
|
|
1566
|
-
set disabled(value: boolean);
|
|
1567
|
-
/** @internal */
|
|
1568
|
-
get triggerDisabledClass(): boolean;
|
|
1569
|
-
private stateChanges?;
|
|
1570
|
-
constructor(changeDetector: ChangeDetectorRef);
|
|
1571
|
-
ngOnInit(): void;
|
|
1572
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
1573
|
-
ngAfterContentInit(): void;
|
|
1574
|
-
ngOnDestroy(): void;
|
|
1575
|
-
handleClickOnHost(event: Event): void;
|
|
1576
|
-
private watchStateChanges;
|
|
1577
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeTriggerDirective<any>, never>;
|
|
1578
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeTriggerDirective<any>, "[nxtDateTimeTrigger]", never, { "dtPicker": { "alias": "nxtDateTimeTrigger"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
declare class TimerComponent<T> implements OnInit {
|
|
1582
|
-
private readonly ngZone;
|
|
1583
|
-
private readonly elmRef;
|
|
1584
|
-
private readonly pickerIntl;
|
|
1585
|
-
private readonly cdRef;
|
|
1586
|
-
private readonly dateTimeAdapter;
|
|
1587
|
-
/** The current picker moment */
|
|
1588
|
-
private _pickerMoment?;
|
|
1589
|
-
get pickerMoment(): T | undefined;
|
|
1590
|
-
set pickerMoment(value: T | undefined);
|
|
1591
|
-
/** The minimum selectable date time */
|
|
1592
|
-
private _minDateTime?;
|
|
1593
|
-
get min(): T | undefined;
|
|
1594
|
-
set min(value: T | undefined);
|
|
1595
|
-
/** The maximum selectable date time */
|
|
1596
|
-
private _maxDateTime?;
|
|
1597
|
-
get max(): T | undefined;
|
|
1598
|
-
set max(value: T | undefined);
|
|
1599
|
-
private isPM;
|
|
1600
|
-
/**
|
|
1601
|
-
* Whether to show the second's timer
|
|
1602
|
-
*/
|
|
1603
|
-
showSecondsTimer: boolean;
|
|
1604
|
-
/**
|
|
1605
|
-
* Whether the timer is in hour12 format
|
|
1606
|
-
*/
|
|
1607
|
-
hour12Timer: boolean;
|
|
1608
|
-
/**
|
|
1609
|
-
* Hours to change per step
|
|
1610
|
-
*/
|
|
1611
|
-
stepHour: number;
|
|
1612
|
-
/**
|
|
1613
|
-
* Minutes to change per step
|
|
1614
|
-
*/
|
|
1615
|
-
stepMinute: number;
|
|
1616
|
-
/**
|
|
1617
|
-
* Seconds to change per step
|
|
1618
|
-
*/
|
|
1619
|
-
stepSecond: number;
|
|
1620
|
-
get hourValue(): number;
|
|
1621
|
-
/**
|
|
1622
|
-
* The value would be displayed in hourBox.
|
|
1623
|
-
* We need this because the value displayed in hourBox it not
|
|
1624
|
-
* the same as the hourValue when the timer is in hour12Timer mode.
|
|
1625
|
-
*/
|
|
1626
|
-
get hourBoxValue(): number;
|
|
1627
|
-
get minuteValue(): number;
|
|
1628
|
-
get secondValue(): number;
|
|
1629
|
-
get upHourButtonLabel(): string;
|
|
1630
|
-
get downHourButtonLabel(): string;
|
|
1631
|
-
get upMinuteButtonLabel(): string;
|
|
1632
|
-
get downMinuteButtonLabel(): string;
|
|
1633
|
-
get upSecondButtonLabel(): string;
|
|
1634
|
-
get downSecondButtonLabel(): string;
|
|
1635
|
-
get hour12ButtonLabel(): string;
|
|
1636
|
-
readonly selectedChange: EventEmitter<T>;
|
|
1637
|
-
/** @internal */
|
|
1638
|
-
get timerClass(): boolean;
|
|
1639
|
-
/** @internal */
|
|
1640
|
-
get timeTabIndex(): number;
|
|
1641
|
-
constructor(ngZone: NgZone, elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>);
|
|
1642
|
-
ngOnInit(): void;
|
|
1643
|
-
/**
|
|
1644
|
-
* Focus to the host element
|
|
1645
|
-
*/
|
|
1646
|
-
focus(): void;
|
|
1647
|
-
/**
|
|
1648
|
-
* Set the hour value via typing into timer box input
|
|
1649
|
-
* We need this to handle the hour value when the timer is in hour12 mode
|
|
1650
|
-
*/
|
|
1651
|
-
setHourValueViaInput(hours: number): void;
|
|
1652
|
-
setHourValue(hours: number): void;
|
|
1653
|
-
setMinuteValue(minutes: number): void;
|
|
1654
|
-
setSecondValue(seconds: number): void;
|
|
1655
|
-
setMeridiem(event: any): void;
|
|
1656
|
-
/**
|
|
1657
|
-
* Check if the up hour button is enabled
|
|
1658
|
-
*/
|
|
1659
|
-
upHourEnabled(): boolean;
|
|
1660
|
-
/**
|
|
1661
|
-
* Check if the down hour button is enabled
|
|
1662
|
-
*/
|
|
1663
|
-
downHourEnabled(): boolean;
|
|
1664
|
-
/**
|
|
1665
|
-
* Check if the up minute button is enabled
|
|
1666
|
-
*/
|
|
1667
|
-
upMinuteEnabled(): boolean;
|
|
1668
|
-
/**
|
|
1669
|
-
* Check if the down minute button is enabled
|
|
1670
|
-
*/
|
|
1671
|
-
downMinuteEnabled(): boolean;
|
|
1672
|
-
/**
|
|
1673
|
-
* Check if the up second button is enabled
|
|
1674
|
-
*/
|
|
1675
|
-
upSecondEnabled(): boolean;
|
|
1676
|
-
/**
|
|
1677
|
-
* Check if the down second button is enabled
|
|
1678
|
-
*/
|
|
1679
|
-
downSecondEnabled(): boolean;
|
|
1680
|
-
/**
|
|
1681
|
-
* PickerMoment's hour value +/- certain amount and compare it to the give date
|
|
1682
|
-
* 1 is after the comparedDate
|
|
1683
|
-
* -1 is before the comparedDate
|
|
1684
|
-
* 0 is equal the comparedDate
|
|
1685
|
-
*/
|
|
1686
|
-
private compareHours;
|
|
1687
|
-
/**
|
|
1688
|
-
* PickerMoment's minute value +/- certain amount and compare it to the give date
|
|
1689
|
-
* 1 is after the comparedDate
|
|
1690
|
-
* -1 is before the comparedDate
|
|
1691
|
-
* 0 is equal the comparedDate
|
|
1692
|
-
*/
|
|
1693
|
-
private compareMinutes;
|
|
1694
|
-
/**
|
|
1695
|
-
* PickerMoment's second value +/- certain amount and compare it to the give date
|
|
1696
|
-
* 1 is after the comparedDate
|
|
1697
|
-
* -1 is before the comparedDate
|
|
1698
|
-
* 0 is equal the comparedDate
|
|
1699
|
-
*/
|
|
1700
|
-
private compareSeconds;
|
|
1701
|
-
/**
|
|
1702
|
-
* Get a valid date object
|
|
1703
|
-
*/
|
|
1704
|
-
private getValidDate;
|
|
1705
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TimerComponent<any>, never>;
|
|
1706
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TimerComponent<any>, "nxt-date-time-timer", never, { "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; }; "stepHour": { "alias": "stepHour"; "required": false; }; "stepMinute": { "alias": "stepMinute"; "required": false; }; "stepSecond": { "alias": "stepSecond"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, false, never>;
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
/** @internal */
|
|
1710
|
-
declare class DateTimeContainerComponent<T> implements OnInit, AfterContentInit, AfterViewInit {
|
|
1711
|
-
private readonly cdRef;
|
|
1712
|
-
private readonly elmRef;
|
|
1713
|
-
private readonly pickerIntl;
|
|
1714
|
-
private readonly dateTimeAdapter;
|
|
1715
|
-
calendar?: CalendarComponent<T>;
|
|
1716
|
-
timer?: TimerComponent<T>;
|
|
1717
|
-
picker?: DateTimeDirective<T>;
|
|
1718
|
-
activeSelectedIndex: number;
|
|
1719
|
-
/**
|
|
1720
|
-
* Stream emits when try to hide picker
|
|
1721
|
-
*/
|
|
1722
|
-
private readonly hidePicker$;
|
|
1723
|
-
readonly hidePickerStream: rxjs.Observable<void>;
|
|
1724
|
-
/**
|
|
1725
|
-
* Stream emits when try to confirm the selected value
|
|
1726
|
-
*/
|
|
1727
|
-
private readonly confirmSelected$;
|
|
1728
|
-
readonly confirmSelectedStream: rxjs.Observable<Event>;
|
|
1729
|
-
private readonly pickerOpened$;
|
|
1730
|
-
readonly pickerOpenedStream: rxjs.Observable<void>;
|
|
1731
|
-
/**
|
|
1732
|
-
* The current picker moment. This determines which time period is shown and which date is
|
|
1733
|
-
* highlighted when using keyboard navigation.
|
|
1734
|
-
*/
|
|
1735
|
-
private _clamPickerMoment?;
|
|
1736
|
-
get pickerMoment(): T | undefined;
|
|
1737
|
-
set pickerMoment(value: T | undefined);
|
|
1738
|
-
get pickerType(): nxt_pick_datetime.PickerType | undefined;
|
|
1739
|
-
get cancelLabel(): string;
|
|
1740
|
-
get setLabel(): string;
|
|
1741
|
-
/**
|
|
1742
|
-
* The range 'from' label
|
|
1743
|
-
*/
|
|
1744
|
-
get fromLabel(): string;
|
|
1745
|
-
/**
|
|
1746
|
-
* The range 'to' label
|
|
1747
|
-
*/
|
|
1748
|
-
get toLabel(): string;
|
|
1749
|
-
/**
|
|
1750
|
-
* The range 'from' formatted value
|
|
1751
|
-
*/
|
|
1752
|
-
get fromFormattedValue(): string;
|
|
1753
|
-
/**
|
|
1754
|
-
* The range 'to' formatted value
|
|
1755
|
-
*/
|
|
1756
|
-
get toFormattedValue(): string;
|
|
1757
|
-
/**
|
|
1758
|
-
* Cases in which the control buttons show in the picker
|
|
1759
|
-
* 1) picker mode is 'dialog'
|
|
1760
|
-
* 2) picker type is NOT 'calendar' and the picker mode is NOT 'inline'
|
|
1761
|
-
*/
|
|
1762
|
-
get showControlButtons(): boolean;
|
|
1763
|
-
get containerElm(): HTMLElement;
|
|
1764
|
-
/** @internal */
|
|
1765
|
-
get containerClass(): boolean;
|
|
1766
|
-
/** @internal */
|
|
1767
|
-
get popupContainerClass(): boolean;
|
|
1768
|
-
/** @internal */
|
|
1769
|
-
get dialogContainerClass(): boolean;
|
|
1770
|
-
/** @internal */
|
|
1771
|
-
get inlineContainerClass(): boolean;
|
|
1772
|
-
/** @internal */
|
|
1773
|
-
get containerDisabledClass(): boolean;
|
|
1774
|
-
/** @internal */
|
|
1775
|
-
get containerId(): string | undefined;
|
|
1776
|
-
/** @internal */
|
|
1777
|
-
get containerAnimation(): any;
|
|
1778
|
-
constructor(cdRef: ChangeDetectorRef, elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, dateTimeAdapter: DateTimeAdapter<T>);
|
|
1779
|
-
ngOnInit(): void;
|
|
1780
|
-
ngAfterContentInit(): void;
|
|
1781
|
-
ngAfterViewInit(): void;
|
|
1782
|
-
handleContainerAnimationDone(event: AnimationEvent): void;
|
|
1783
|
-
dateSelected(date?: T): void;
|
|
1784
|
-
timeSelected(time?: T): void;
|
|
1785
|
-
/**
|
|
1786
|
-
* Handle click on cancel button
|
|
1787
|
-
*/
|
|
1788
|
-
onCancelClicked(event: Event): void;
|
|
1789
|
-
/**
|
|
1790
|
-
* Handle click on set button
|
|
1791
|
-
*/
|
|
1792
|
-
onSetClicked(event: Event): void;
|
|
1793
|
-
/**
|
|
1794
|
-
* Handle click on inform radio group
|
|
1795
|
-
*/
|
|
1796
|
-
handleClickOnInfoGroup(event: any, index: number): void;
|
|
1797
|
-
/**
|
|
1798
|
-
* Handle click on inform radio group
|
|
1799
|
-
*/
|
|
1800
|
-
handleKeydownOnInfoGroup(event: any, next: any, index: number): void;
|
|
1801
|
-
/**
|
|
1802
|
-
* Set the value of activeSelectedIndex
|
|
1803
|
-
*/
|
|
1804
|
-
private setActiveSelectedIndex;
|
|
1805
|
-
private initPicker;
|
|
1806
|
-
/**
|
|
1807
|
-
* Select calendar date in single mode,
|
|
1808
|
-
* it returns undefined when date is not selected.
|
|
1809
|
-
*/
|
|
1810
|
-
private dateSelectedInSingleMode;
|
|
1811
|
-
/**
|
|
1812
|
-
* Select dates in range Mode
|
|
1813
|
-
*/
|
|
1814
|
-
private dateSelectedInRangeMode;
|
|
1815
|
-
/**
|
|
1816
|
-
* Update the given calendar date's time and check if it is valid
|
|
1817
|
-
* Because the calendar date has 00:00:00 as default time, if the picker type is 'both',
|
|
1818
|
-
* we need to update the given calendar date's time before selecting it.
|
|
1819
|
-
* if it is valid, return the updated dateTime
|
|
1820
|
-
* if it is not valid, return undefined
|
|
1821
|
-
*/
|
|
1822
|
-
private updateAndCheckCalendarDate;
|
|
1823
|
-
/**
|
|
1824
|
-
* Focus to the picker
|
|
1825
|
-
*/
|
|
1826
|
-
private focusPicker;
|
|
1827
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeContainerComponent<any>, never>;
|
|
1828
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeContainerComponent<any>, "nxt-date-time-container", never, {}, {}, never, never, false, never>;
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
/** @internal */
|
|
1832
|
-
declare class TimerBoxComponent implements OnInit, OnDestroy {
|
|
1833
|
-
showDivider: boolean;
|
|
1834
|
-
upBtnAriaLabel?: string;
|
|
1835
|
-
upBtnDisabled: boolean;
|
|
1836
|
-
downBtnAriaLabel?: string;
|
|
1837
|
-
downBtnDisabled: boolean;
|
|
1838
|
-
/**
|
|
1839
|
-
* Value would be displayed in the box
|
|
1840
|
-
* If it is undefiend, the box would display [value]
|
|
1841
|
-
*/
|
|
1842
|
-
boxValue?: number;
|
|
1843
|
-
value: number;
|
|
1844
|
-
min: number;
|
|
1845
|
-
max: number;
|
|
1846
|
-
step: number;
|
|
1847
|
-
inputLabel?: string;
|
|
1848
|
-
valueChange: EventEmitter<number>;
|
|
1849
|
-
inputChange: EventEmitter<number>;
|
|
1850
|
-
private inputStream;
|
|
1851
|
-
private inputStreamSub?;
|
|
1852
|
-
get displayValue(): number;
|
|
1853
|
-
/** @internal */
|
|
1854
|
-
get timerBoxClass(): boolean;
|
|
1855
|
-
constructor();
|
|
1856
|
-
ngOnInit(): void;
|
|
1857
|
-
ngOnDestroy(): void;
|
|
1858
|
-
upBtnClicked(): void;
|
|
1859
|
-
downBtnClicked(): void;
|
|
1860
|
-
handleInputChange(val: string): void;
|
|
1861
|
-
private updateValue;
|
|
1862
|
-
private updateValueViaInput;
|
|
1863
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TimerBoxComponent, never>;
|
|
1864
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TimerBoxComponent, "nxt-date-time-timer-box", never, { "showDivider": { "alias": "showDivider"; "required": false; }; "upBtnAriaLabel": { "alias": "upBtnAriaLabel"; "required": false; }; "upBtnDisabled": { "alias": "upBtnDisabled"; "required": false; }; "downBtnAriaLabel": { "alias": "downBtnAriaLabel"; "required": false; }; "downBtnDisabled": { "alias": "downBtnDisabled"; "required": false; }; "boxValue": { "alias": "boxValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "inputLabel": { "alias": "inputLabel"; "required": false; }; }, { "valueChange": "valueChange"; "inputChange": "inputChange"; }, never, never, false, never>;
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
/** @internal */
|
|
1868
|
-
declare class NumberFixedLenPipe implements PipeTransform {
|
|
1869
|
-
transform(num: number | undefined, len: number | undefined): string | number | undefined;
|
|
1870
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NumberFixedLenPipe, never>;
|
|
1871
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<NumberFixedLenPipe, "numberFixedLen", false>;
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
/** @internal */
|
|
1875
|
-
declare class DialogModule {
|
|
1876
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DialogModule, never>;
|
|
1877
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DialogModule, [typeof DialogContainerComponent], [typeof i2.CommonModule, typeof i3.A11yModule, typeof i4.OverlayModule, typeof i5.PortalModule], never>;
|
|
1878
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DialogModule>;
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
declare class DateTimeModule {
|
|
1882
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeModule, never>;
|
|
1883
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DateTimeModule, [typeof DateTimeTriggerDirective, typeof DateTimeInputDirective, typeof DateTimeComponent, typeof DateTimeContainerComponent, typeof MultiYearViewComponent, typeof YearViewComponent, typeof MonthViewComponent, typeof TimerComponent, typeof TimerBoxComponent, typeof CalendarComponent, typeof CalendarBodyComponent, typeof NumberFixedLenPipe, typeof DateTimeInlineComponent], [typeof i2.CommonModule, typeof i4.OverlayModule, typeof DialogModule, typeof i3.A11yModule], [typeof CalendarComponent, typeof TimerComponent, typeof DateTimeTriggerDirective, typeof DateTimeInputDirective, typeof DateTimeComponent, typeof DateTimeInlineComponent, typeof MultiYearViewComponent, typeof YearViewComponent, typeof MonthViewComponent]>;
|
|
1884
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DateTimeModule>;
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
export { CalendarComponent, DateTimeAdapter, DateTimeComponent, DateTimeInlineComponent, DateTimeInputDirective, DateTimeIntl, DateTimeModule, DateTimeTriggerDirective, MonthViewComponent, MultiYearViewComponent, NXT_DATE_TIME_FORMATS, TimerComponent, YearViewComponent };
|
|
1888
|
-
export type { DateFilter, DateTimeFormats, DateTimeInputEvent, PickerMode, PickerType, RenderItem, SelectMode, ViewType };
|