@netwin/angular-datetime-picker 19.0.0 → 20.0.0-rc.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.
- package/assets/style/picker.min.css +1 -1
- package/fesm2022/netwin-angular-datetime-picker.mjs +813 -3150
- package/fesm2022/netwin-angular-datetime-picker.mjs.map +1 -1
- package/index.d.ts +1474 -3
- package/package.json +4 -4
- package/lib/date-time/adapter/date-time-adapter.class.d.ts +0 -193
- package/lib/date-time/adapter/date-time-format.class.d.ts +0 -15
- package/lib/date-time/adapter/native-date-time-adapter.class.d.ts +0 -72
- package/lib/date-time/adapter/native-date-time-format.class.d.ts +0 -5
- package/lib/date-time/adapter/native-date-time.module.d.ts +0 -12
- package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.d.ts +0 -67
- package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.d.ts +0 -5
- package/lib/date-time/calendar-body.component.d.ts +0 -79
- package/lib/date-time/calendar-month-view.component.d.ts +0 -141
- package/lib/date-time/calendar-multi-year-view.component.d.ts +0 -107
- package/lib/date-time/calendar-year-view.component.d.ts +0 -120
- package/lib/date-time/calendar.component.d.ts +0 -168
- package/lib/date-time/date-time-inline.component.d.ts +0 -115
- package/lib/date-time/date-time-picker-container.component.d.ts +0 -131
- package/lib/date-time/date-time-picker-input.directive.d.ts +0 -172
- package/lib/date-time/date-time-picker-intl.service.d.ts +0 -53
- package/lib/date-time/date-time-picker-trigger.directive.d.ts +0 -23
- package/lib/date-time/date-time-picker.animations.d.ts +0 -8
- package/lib/date-time/date-time-picker.component.d.ts +0 -171
- package/lib/date-time/date-time.class.d.ts +0 -103
- package/lib/date-time/date-time.module.d.ts +0 -22
- package/lib/date-time/numberedFixLen.pipe.d.ts +0 -10
- package/lib/date-time/options-provider.d.ts +0 -23
- package/lib/date-time/timer-box.component.d.ts +0 -42
- package/lib/date-time/timer.component.d.ts +0 -131
- package/lib/dialog/dialog-config.class.d.ts +0 -169
- package/lib/dialog/dialog-container.component.d.ts +0 -69
- package/lib/dialog/dialog-ref.class.d.ts +0 -51
- package/lib/dialog/dialog.module.d.ts +0 -11
- package/lib/dialog/dialog.service.d.ts +0 -76
- package/lib/utils/array.utils.d.ts +0 -2
- package/lib/utils/constants.d.ts +0 -16
- package/lib/utils/date.utils.d.ts +0 -9
- package/lib/utils/index.d.ts +0 -4
- package/lib/utils/object.utils.d.ts +0 -8
- package/public_api.d.ts +0 -21
package/index.d.ts
CHANGED
|
@@ -1,5 +1,1476 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, OutputRef, AfterContentInit, AfterViewChecked, OnInit, OnDestroy, Provider } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/cdk/platform';
|
|
4
|
+
import * as rxjs from 'rxjs';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
6
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
7
|
+
import * as i10 from '@angular/cdk/a11y';
|
|
8
|
+
|
|
9
|
+
declare class NativeDateTimeModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NativeDateTimeModule, never, [typeof i1.PlatformModule], never>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NativeDateTimeModule>;
|
|
13
|
+
}
|
|
14
|
+
declare class OwlNativeDateTimeModule {
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlNativeDateTimeModule, never>;
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<OwlNativeDateTimeModule, never, [typeof NativeDateTimeModule], never>;
|
|
17
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<OwlNativeDateTimeModule>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** InjectionToken for date time picker that can be used to override default locale code. */
|
|
21
|
+
declare const OWL_DATE_TIME_LOCALE: InjectionToken<string>;
|
|
22
|
+
/** Provider for OWL_DATE_TIME_LOCALE injection token. */
|
|
23
|
+
declare const OWL_DATE_TIME_LOCALE_PROVIDER: {
|
|
24
|
+
provide: InjectionToken<string>;
|
|
25
|
+
useExisting: InjectionToken<string>;
|
|
26
|
+
};
|
|
27
|
+
declare abstract class DateTimeAdapter<T> {
|
|
28
|
+
/** The locale to use for all dates. */
|
|
29
|
+
protected locale: string;
|
|
30
|
+
/** A stream that emits when the locale changes. */
|
|
31
|
+
protected _localeChanges: Subject<string>;
|
|
32
|
+
localeChanges: rxjs.Observable<string>;
|
|
33
|
+
/** total milliseconds in a day. */
|
|
34
|
+
protected readonly millisecondsInDay = 86400000;
|
|
35
|
+
/** total milliseconds in a minute. */
|
|
36
|
+
protected readonly milliseondsInMinute = 60000;
|
|
37
|
+
/**
|
|
38
|
+
* Get the year of the given date
|
|
39
|
+
*/
|
|
40
|
+
abstract getYear(date: T): number;
|
|
41
|
+
/**
|
|
42
|
+
* Get the month of the given date
|
|
43
|
+
* 0 -- January
|
|
44
|
+
* 11 -- December
|
|
45
|
+
*/
|
|
46
|
+
abstract getMonth(date: T): number;
|
|
47
|
+
/**
|
|
48
|
+
* Get the day of the week of the given date
|
|
49
|
+
* 0 -- Sunday
|
|
50
|
+
* 6 -- Saturday
|
|
51
|
+
*/
|
|
52
|
+
abstract getDay(date: T): number;
|
|
53
|
+
/**
|
|
54
|
+
* Get the day num of the given date
|
|
55
|
+
*/
|
|
56
|
+
abstract getDate(date: T): number;
|
|
57
|
+
/**
|
|
58
|
+
* Get the hours of the given date
|
|
59
|
+
*/
|
|
60
|
+
abstract getHours(date: T): number;
|
|
61
|
+
/**
|
|
62
|
+
* Get the minutes of the given date
|
|
63
|
+
*/
|
|
64
|
+
abstract getMinutes(date: T): number;
|
|
65
|
+
/**
|
|
66
|
+
* Get the seconds of the given date
|
|
67
|
+
*/
|
|
68
|
+
abstract getSeconds(date: T): number;
|
|
69
|
+
/**
|
|
70
|
+
* Get the milliseconds timestamp of the given date
|
|
71
|
+
*/
|
|
72
|
+
abstract getTime(date: T): number;
|
|
73
|
+
/**
|
|
74
|
+
* Gets the number of days in the month of the given date.
|
|
75
|
+
*/
|
|
76
|
+
abstract getNumDaysInMonth(date: T): number;
|
|
77
|
+
/**
|
|
78
|
+
* Get the number of calendar days between the given dates.
|
|
79
|
+
* If dateLeft is before dateRight, it would return positive value
|
|
80
|
+
* If dateLeft is after dateRight, it would return negative value
|
|
81
|
+
*/
|
|
82
|
+
abstract differenceInCalendarDays(dateLeft: T, dateRight: T): number;
|
|
83
|
+
/**
|
|
84
|
+
* Gets the name for the year of the given date.
|
|
85
|
+
*/
|
|
86
|
+
abstract getYearName(date: T): string;
|
|
87
|
+
/**
|
|
88
|
+
* Get a list of month names
|
|
89
|
+
*/
|
|
90
|
+
abstract getMonthNames(style: Intl.DateTimeFormatOptions['month']): Array<string>;
|
|
91
|
+
/**
|
|
92
|
+
* Get a list of week names
|
|
93
|
+
*/
|
|
94
|
+
abstract getDayOfWeekNames(style: Intl.DateTimeFormatOptions['weekday']): Array<string>;
|
|
95
|
+
/**
|
|
96
|
+
* Gets a list of names for the dates of the month.
|
|
97
|
+
*/
|
|
98
|
+
abstract getDateNames(): Array<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Return a Date object as a string, using the ISO standard
|
|
101
|
+
*/
|
|
102
|
+
abstract toIso8601(date: T): string;
|
|
103
|
+
/**
|
|
104
|
+
* Check if the give dates are equal
|
|
105
|
+
*/
|
|
106
|
+
abstract isEqual(dateLeft: T, dateRight: T): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Check if the give dates are the same day
|
|
109
|
+
*/
|
|
110
|
+
abstract isSameDay(dateLeft: T, dateRight: T): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Checks whether the given date is valid.
|
|
113
|
+
*/
|
|
114
|
+
abstract isValid(date: T): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Gets date instance that is not valid.
|
|
117
|
+
*/
|
|
118
|
+
abstract invalid(): T;
|
|
119
|
+
/**
|
|
120
|
+
* Checks whether the given object is considered a date instance by this DateTimeAdapter.
|
|
121
|
+
*/
|
|
122
|
+
abstract isDateInstance(obj: unknown): obj is T;
|
|
123
|
+
/**
|
|
124
|
+
* Add the specified number of years to the given date
|
|
125
|
+
*/
|
|
126
|
+
abstract addCalendarYears(date: T, amount: number): T;
|
|
127
|
+
/**
|
|
128
|
+
* Add the specified number of months to the given date
|
|
129
|
+
*/
|
|
130
|
+
abstract addCalendarMonths(date: T, amount: number): T;
|
|
131
|
+
/**
|
|
132
|
+
* Add the specified number of days to the given date
|
|
133
|
+
*/
|
|
134
|
+
abstract addCalendarDays(date: T, amount: number): T;
|
|
135
|
+
/**
|
|
136
|
+
* Set the hours to the given date.
|
|
137
|
+
*/
|
|
138
|
+
abstract setHours(date: T, amount: number): T;
|
|
139
|
+
/**
|
|
140
|
+
* Set the minutes to the given date.
|
|
141
|
+
*/
|
|
142
|
+
abstract setMinutes(date: T, amount: number): T;
|
|
143
|
+
/**
|
|
144
|
+
* Set the seconds to the given date.
|
|
145
|
+
*/
|
|
146
|
+
abstract setSeconds(date: T, amount: number): T;
|
|
147
|
+
/**
|
|
148
|
+
* Creates a date with the given year, month, date, hour, minute and second. Does not allow over/under-flow of the
|
|
149
|
+
* month and date.
|
|
150
|
+
*/
|
|
151
|
+
abstract createDate(year: number, month: number, date: number): T;
|
|
152
|
+
abstract createDate(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): T;
|
|
153
|
+
/**
|
|
154
|
+
* Clone the given date
|
|
155
|
+
*/
|
|
156
|
+
abstract clone(date: T): T;
|
|
157
|
+
/**
|
|
158
|
+
* Get a new moment
|
|
159
|
+
*/
|
|
160
|
+
abstract now(): T;
|
|
161
|
+
/**
|
|
162
|
+
* Formats a date as a string according to the given format.
|
|
163
|
+
*/
|
|
164
|
+
abstract format(date: T, displayFormat: Intl.DateTimeFormatOptions): string;
|
|
165
|
+
/**
|
|
166
|
+
* Parse a user-provided value to a Date Object
|
|
167
|
+
*/
|
|
168
|
+
abstract parse(value: unknown): T | null;
|
|
169
|
+
/**
|
|
170
|
+
* Compare two given dates
|
|
171
|
+
* 1 if the first date is after the second,
|
|
172
|
+
* -1 if the first date is before the second
|
|
173
|
+
* 0 if dates are equal.
|
|
174
|
+
*/
|
|
175
|
+
compare(first: T, second: T): number;
|
|
176
|
+
/**
|
|
177
|
+
* Check if two given dates are in the same year
|
|
178
|
+
* 1 if the first date's year is after the second,
|
|
179
|
+
* -1 if the first date's year is before the second
|
|
180
|
+
* 0 if two given dates are in the same year
|
|
181
|
+
*/
|
|
182
|
+
compareYear(first: T, second: T): number;
|
|
183
|
+
/**
|
|
184
|
+
* Attempts to deserialize a value to a valid date object. This is different from parsing in that
|
|
185
|
+
* deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
|
|
186
|
+
* string). The default implementation does not allow any deserialization, it simply checks that
|
|
187
|
+
* the given value is already a valid date object or null. The `<mat-datepicker>` will call this
|
|
188
|
+
* method on all of it's `@Input()` properties that accept dates. It is therefore possible to
|
|
189
|
+
* support passing values from your backend directly to these properties by overriding this method
|
|
190
|
+
* to also deserialize the format used by your backend.
|
|
191
|
+
*/
|
|
192
|
+
deserialize(value: T | null): T | null;
|
|
193
|
+
/**
|
|
194
|
+
* Sets the locale used for all dates.
|
|
195
|
+
*/
|
|
196
|
+
setLocale(locale: string): void;
|
|
197
|
+
/**
|
|
198
|
+
* Get the locale used for all dates.
|
|
199
|
+
*/
|
|
200
|
+
getLocale(): string;
|
|
201
|
+
/**
|
|
202
|
+
* Clamp the given date between min and max dates.
|
|
203
|
+
*/
|
|
204
|
+
clampDate(date: T, min?: T | null, max?: T | null): T;
|
|
205
|
+
}
|
|
206
|
+
|
|
1
207
|
/**
|
|
2
|
-
*
|
|
208
|
+
* date-time-format.class
|
|
3
209
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
210
|
+
|
|
211
|
+
type OwlDateTimeFormats = {
|
|
212
|
+
fullPickerInput: Partial<Intl.DateTimeFormatOptions>;
|
|
213
|
+
datePickerInput: Partial<Intl.DateTimeFormatOptions>;
|
|
214
|
+
timePickerInput: Partial<Intl.DateTimeFormatOptions>;
|
|
215
|
+
monthYearLabel: Partial<Intl.DateTimeFormatOptions>;
|
|
216
|
+
dateA11yLabel: Partial<Intl.DateTimeFormatOptions>;
|
|
217
|
+
monthYearA11yLabel: Partial<Intl.DateTimeFormatOptions>;
|
|
218
|
+
};
|
|
219
|
+
/** InjectionToken for date time picker that can be used to override default format. */
|
|
220
|
+
declare const OWL_DATE_TIME_FORMATS: InjectionToken<OwlDateTimeFormats>;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* date-time.class
|
|
224
|
+
*/
|
|
225
|
+
|
|
226
|
+
declare const PickerType: {
|
|
227
|
+
/**
|
|
228
|
+
* Shows both calendar and timer views.
|
|
229
|
+
*/
|
|
230
|
+
readonly Both: "both";
|
|
231
|
+
/**
|
|
232
|
+
* Shows only the calendar view.
|
|
233
|
+
*/
|
|
234
|
+
readonly Calendar: "calendar";
|
|
235
|
+
/**
|
|
236
|
+
* Shows only the timer view.
|
|
237
|
+
*/
|
|
238
|
+
readonly Timer: "timer";
|
|
239
|
+
};
|
|
240
|
+
type PickerType = (typeof PickerType)[keyof typeof PickerType];
|
|
241
|
+
declare const SelectMode: {
|
|
242
|
+
/**
|
|
243
|
+
* Selects a single date.
|
|
244
|
+
*/
|
|
245
|
+
readonly Single: "single";
|
|
246
|
+
/**
|
|
247
|
+
* Selects a date range.
|
|
248
|
+
*/
|
|
249
|
+
readonly Range: "range";
|
|
250
|
+
/**
|
|
251
|
+
* Selects a date range from a specific date.
|
|
252
|
+
* The end date (range[1]) will always be `null` in this mode.
|
|
253
|
+
*/
|
|
254
|
+
readonly RangeFrom: "rangeFrom";
|
|
255
|
+
/**
|
|
256
|
+
* Selects a date range up to a specific date.
|
|
257
|
+
* The start date (range[0]) will always be `null` in this mode.
|
|
258
|
+
*/
|
|
259
|
+
readonly RangeTo: "rangeTo";
|
|
260
|
+
};
|
|
261
|
+
type SelectMode = (typeof SelectMode)[keyof typeof SelectMode];
|
|
262
|
+
declare const DateView: {
|
|
263
|
+
/**
|
|
264
|
+
* Shows all days of a month in a grid.
|
|
265
|
+
*/
|
|
266
|
+
readonly MONTH: "month";
|
|
267
|
+
/**
|
|
268
|
+
* Shows all months of a year in a grid.
|
|
269
|
+
*/
|
|
270
|
+
readonly YEAR: "year";
|
|
271
|
+
/**
|
|
272
|
+
* Shows a list of years.
|
|
273
|
+
*/
|
|
274
|
+
readonly MULTI_YEARS: "multi-years";
|
|
275
|
+
};
|
|
276
|
+
type DateViewType = (typeof DateView)[keyof typeof DateView];
|
|
277
|
+
declare abstract class OwlDateTime<T> {
|
|
278
|
+
protected readonly dateTimeAdapter: DateTimeAdapter<T>;
|
|
279
|
+
protected readonly dateTimeFormats: OwlDateTimeFormats;
|
|
280
|
+
/**
|
|
281
|
+
* Whether to show the second's timer
|
|
282
|
+
*/
|
|
283
|
+
showSecondsTimer: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Whether the timer is in hour12 format
|
|
286
|
+
*/
|
|
287
|
+
hour12Timer: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* The view that the calendar should start in.
|
|
290
|
+
*/
|
|
291
|
+
startView: DateViewType;
|
|
292
|
+
/**
|
|
293
|
+
* Whether to should only the year and multi-year views.
|
|
294
|
+
*/
|
|
295
|
+
yearOnly: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Whether to should only the multi-year view.
|
|
298
|
+
*/
|
|
299
|
+
multiyearOnly: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Hours to change per step
|
|
302
|
+
*/
|
|
303
|
+
stepHour: number;
|
|
304
|
+
/**
|
|
305
|
+
* Minutes to change per step
|
|
306
|
+
*/
|
|
307
|
+
stepMinute: number;
|
|
308
|
+
/**
|
|
309
|
+
* Seconds to change per step
|
|
310
|
+
*/
|
|
311
|
+
stepSecond: number;
|
|
312
|
+
/**
|
|
313
|
+
* Set the first day of week
|
|
314
|
+
*/
|
|
315
|
+
firstDayOfWeek: number | undefined;
|
|
316
|
+
/**
|
|
317
|
+
* Whether to hide dates in other months at the start or end of the current month.
|
|
318
|
+
*/
|
|
319
|
+
hideOtherMonths: boolean;
|
|
320
|
+
readonly id: string;
|
|
321
|
+
abstract disabled: boolean;
|
|
322
|
+
abstract get selected(): T | null;
|
|
323
|
+
abstract get selecteds(): Array<T> | null;
|
|
324
|
+
abstract get dateTimeFilter(): (date: T | null) => boolean;
|
|
325
|
+
abstract get maxDateTime(): T | null;
|
|
326
|
+
abstract get minDateTime(): T | null;
|
|
327
|
+
abstract get selectMode(): SelectMode;
|
|
328
|
+
abstract get startAt(): T | null;
|
|
329
|
+
abstract get endAt(): T | null;
|
|
330
|
+
abstract get opened(): boolean;
|
|
331
|
+
abstract get pickerType(): PickerType;
|
|
332
|
+
abstract get isInSingleMode(): boolean;
|
|
333
|
+
abstract get isInRangeMode(): boolean;
|
|
334
|
+
abstract select(date: T | Array<T>): void;
|
|
335
|
+
abstract yearSelected: OutputRef<T>;
|
|
336
|
+
abstract monthSelected: OutputRef<T>;
|
|
337
|
+
abstract dateSelected: OutputRef<T>;
|
|
338
|
+
abstract selectYear(normalizedYear: T): void;
|
|
339
|
+
abstract selectMonth(normalizedMonth: T): void;
|
|
340
|
+
abstract selectDate(normalizedDate: T): void;
|
|
341
|
+
get displayFormat(): Partial<Intl.DateTimeFormatOptions>;
|
|
342
|
+
/**
|
|
343
|
+
* Date Time Checker to check if the give dateTime is selectable
|
|
344
|
+
*/
|
|
345
|
+
dateTimeChecker: (dateTime: T) => boolean;
|
|
346
|
+
constructor();
|
|
347
|
+
protected getValidDate(obj: unknown): T | null;
|
|
348
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTime<any>, never>;
|
|
349
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<OwlDateTime<any>, never, never, { "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "yearOnly": { "alias": "yearOnly"; "required": false; }; "multiyearOnly": { "alias": "multiyearOnly"; "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>;
|
|
350
|
+
static ngAcceptInputType_showSecondsTimer: unknown;
|
|
351
|
+
static ngAcceptInputType_hour12Timer: unknown;
|
|
352
|
+
static ngAcceptInputType_stepHour: unknown;
|
|
353
|
+
static ngAcceptInputType_stepMinute: unknown;
|
|
354
|
+
static ngAcceptInputType_stepSecond: unknown;
|
|
355
|
+
static ngAcceptInputType_firstDayOfWeek: unknown;
|
|
356
|
+
static ngAcceptInputType_hideOtherMonths: unknown;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
declare class CalendarCell {
|
|
360
|
+
value: number;
|
|
361
|
+
displayValue: string;
|
|
362
|
+
ariaLabel: string;
|
|
363
|
+
enabled: boolean;
|
|
364
|
+
out: boolean;
|
|
365
|
+
cellClass: string;
|
|
366
|
+
constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, out?: boolean, cellClass?: string);
|
|
367
|
+
}
|
|
368
|
+
declare class OwlCalendarBodyComponent {
|
|
369
|
+
private readonly elmRef;
|
|
370
|
+
private readonly ngZone;
|
|
371
|
+
/**
|
|
372
|
+
* The cell number of the active cell in the table.
|
|
373
|
+
*/
|
|
374
|
+
activeCell: number;
|
|
375
|
+
/**
|
|
376
|
+
* The cells to display in the table.
|
|
377
|
+
*/
|
|
378
|
+
rows: Array<Array<CalendarCell>>;
|
|
379
|
+
/**
|
|
380
|
+
* The number of columns in the table.
|
|
381
|
+
*/
|
|
382
|
+
numCols: number;
|
|
383
|
+
/**
|
|
384
|
+
* The ratio (width / height) to use for the cells in the table.
|
|
385
|
+
*/
|
|
386
|
+
cellRatio: number;
|
|
387
|
+
/**
|
|
388
|
+
* The value in the table that corresponds to today.
|
|
389
|
+
*/
|
|
390
|
+
todayValue: number;
|
|
391
|
+
/**
|
|
392
|
+
* The value in the table that is currently selected.
|
|
393
|
+
*/
|
|
394
|
+
selectedValues: Array<number>;
|
|
395
|
+
/**
|
|
396
|
+
* Current picker select mode
|
|
397
|
+
*/
|
|
398
|
+
selectMode: SelectMode;
|
|
399
|
+
/**
|
|
400
|
+
* Emit when a calendar cell is selected
|
|
401
|
+
*/
|
|
402
|
+
readonly selectCell: i0.OutputEmitterRef<CalendarCell>;
|
|
403
|
+
protected handleSelect(cell: CalendarCell): void;
|
|
404
|
+
protected get isInSingleMode(): boolean;
|
|
405
|
+
protected get isInRangeMode(): boolean;
|
|
406
|
+
isActiveCell(rowIndex: number, colIndex: number): boolean;
|
|
407
|
+
/**
|
|
408
|
+
* Check if the cell is selected
|
|
409
|
+
*/
|
|
410
|
+
isSelected(value: number): boolean;
|
|
411
|
+
/**
|
|
412
|
+
* Check if the cell in the range
|
|
413
|
+
*/
|
|
414
|
+
isInRange(value: number): boolean;
|
|
415
|
+
/**
|
|
416
|
+
* Check if the cell is the range from
|
|
417
|
+
*/
|
|
418
|
+
isRangeFrom(value: number): boolean;
|
|
419
|
+
/**
|
|
420
|
+
* Check if the cell is the range to
|
|
421
|
+
*/
|
|
422
|
+
isRangeTo(value: number): boolean;
|
|
423
|
+
/**
|
|
424
|
+
* Focus to a active cell
|
|
425
|
+
*/
|
|
426
|
+
focusActiveCell(): void;
|
|
427
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlCalendarBodyComponent, never>;
|
|
428
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlCalendarBodyComponent, "[owl-date-time-calendar-body]", ["owlDateTimeCalendarBody"], { "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; }; }, { "selectCell": "selectCell"; }, never, never, false, never>;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
declare class OwlCalendarComponent<T> implements AfterContentInit, AfterViewChecked {
|
|
432
|
+
private readonly elmRef;
|
|
433
|
+
private readonly pickerIntl;
|
|
434
|
+
private readonly ngZone;
|
|
435
|
+
private readonly cdRef;
|
|
436
|
+
private readonly dateTimeAdapter;
|
|
437
|
+
private readonly dateTimeFormats;
|
|
438
|
+
DateView: {
|
|
439
|
+
readonly MONTH: "month";
|
|
440
|
+
readonly YEAR: "year";
|
|
441
|
+
readonly MULTI_YEARS: "multi-years";
|
|
442
|
+
};
|
|
443
|
+
get minDate(): T | null;
|
|
444
|
+
set minDate(value: T | null);
|
|
445
|
+
get maxDate(): T | null;
|
|
446
|
+
set maxDate(value: T | null);
|
|
447
|
+
get pickerMoment(): T;
|
|
448
|
+
set pickerMoment(value: T);
|
|
449
|
+
get selected(): T | null;
|
|
450
|
+
set selected(value: T | null);
|
|
451
|
+
get selecteds(): Array<T>;
|
|
452
|
+
set selecteds(values: Array<T>);
|
|
453
|
+
get periodButtonText(): string;
|
|
454
|
+
get periodButtonLabel(): string;
|
|
455
|
+
get todayButtonLabel(): string;
|
|
456
|
+
get prevButtonLabel(): string;
|
|
457
|
+
get nextButtonLabel(): string;
|
|
458
|
+
get currentView(): DateViewType;
|
|
459
|
+
set currentView(view: DateViewType);
|
|
460
|
+
get isInSingleMode(): boolean;
|
|
461
|
+
get isInRangeMode(): boolean;
|
|
462
|
+
get showControlArrows(): boolean;
|
|
463
|
+
get isMonthView(): boolean;
|
|
464
|
+
get isTodayAllowed(): boolean;
|
|
465
|
+
/**
|
|
466
|
+
* Date filter for the month and year view
|
|
467
|
+
*/
|
|
468
|
+
dateFilter: (date: T) => boolean;
|
|
469
|
+
/**
|
|
470
|
+
* Set the first day of week
|
|
471
|
+
*/
|
|
472
|
+
firstDayOfWeek: number;
|
|
473
|
+
/** The minimum selectable date. */
|
|
474
|
+
private _minDate;
|
|
475
|
+
/** The maximum selectable date. */
|
|
476
|
+
private _maxDate;
|
|
477
|
+
/** The current picker moment */
|
|
478
|
+
private _pickerMoment;
|
|
479
|
+
selectMode: SelectMode;
|
|
480
|
+
/** The currently selected moment. */
|
|
481
|
+
private _selected;
|
|
482
|
+
private _selecteds;
|
|
483
|
+
/**
|
|
484
|
+
* The view that the calendar should start in.
|
|
485
|
+
*/
|
|
486
|
+
startView: DateViewType;
|
|
487
|
+
/**
|
|
488
|
+
* Whether to should only the year and multi-year views.
|
|
489
|
+
*/
|
|
490
|
+
yearOnly: boolean;
|
|
491
|
+
/**
|
|
492
|
+
* Whether to should only the multi-year view.
|
|
493
|
+
*/
|
|
494
|
+
multiyearOnly: boolean;
|
|
495
|
+
/**
|
|
496
|
+
* Whether to hide dates in other months at the start or end of the current month.
|
|
497
|
+
*/
|
|
498
|
+
hideOtherMonths: boolean;
|
|
499
|
+
/**
|
|
500
|
+
* Flag to show today button to jump to today's date. Defaults to `false`.
|
|
501
|
+
*/
|
|
502
|
+
showTodayButton: boolean;
|
|
503
|
+
/**
|
|
504
|
+
* Emits when the currently picker moment changes.
|
|
505
|
+
*/
|
|
506
|
+
readonly pickerMomentChange: i0.OutputEmitterRef<T>;
|
|
507
|
+
/**
|
|
508
|
+
* Emits when the selected date changes.
|
|
509
|
+
*/
|
|
510
|
+
readonly dateClicked: i0.OutputEmitterRef<T>;
|
|
511
|
+
/**
|
|
512
|
+
* Emits when the currently selected date changes.
|
|
513
|
+
*/
|
|
514
|
+
readonly selectedChange: i0.OutputEmitterRef<T>;
|
|
515
|
+
/**
|
|
516
|
+
* Emits when any date is selected.
|
|
517
|
+
*/
|
|
518
|
+
readonly userSelection: i0.OutputEmitterRef<void>;
|
|
519
|
+
/**
|
|
520
|
+
* Emits the selected year. This doesn't imply a change on the selected date
|
|
521
|
+
*/
|
|
522
|
+
readonly yearSelected: i0.OutputEmitterRef<T>;
|
|
523
|
+
/**
|
|
524
|
+
* Emits the selected month. This doesn't imply a change on the selected date
|
|
525
|
+
*/
|
|
526
|
+
readonly monthSelected: i0.OutputEmitterRef<T>;
|
|
527
|
+
private _currentView;
|
|
528
|
+
constructor();
|
|
529
|
+
/**
|
|
530
|
+
* Used for scheduling that focus should be moved to the active cell on the next tick.
|
|
531
|
+
* We need to schedule it, rather than do it immediately, because we have to wait
|
|
532
|
+
* for Angular to re-evaluate the view children.
|
|
533
|
+
*/
|
|
534
|
+
private moveFocusOnNextTick;
|
|
535
|
+
/**
|
|
536
|
+
* Date filter for the month and year view
|
|
537
|
+
*/
|
|
538
|
+
dateFilterForViews: (date: T | null) => boolean;
|
|
539
|
+
ngAfterContentInit(): void;
|
|
540
|
+
ngAfterViewChecked(): void;
|
|
541
|
+
/**
|
|
542
|
+
* Toggle between month view and year view
|
|
543
|
+
*/
|
|
544
|
+
toggleViews(): void;
|
|
545
|
+
/**
|
|
546
|
+
* Handles user clicks on the previous button.
|
|
547
|
+
*/
|
|
548
|
+
previousClicked(): void;
|
|
549
|
+
/**
|
|
550
|
+
* Handles user clicks on the next button.
|
|
551
|
+
*/
|
|
552
|
+
nextClicked(): void;
|
|
553
|
+
jumpToToday(): void;
|
|
554
|
+
dateSelected(date: T): void;
|
|
555
|
+
/**
|
|
556
|
+
* Change the pickerMoment value and switch to a specific view
|
|
557
|
+
*/
|
|
558
|
+
goToDateInView(date: T, view: DateViewType): void;
|
|
559
|
+
/**
|
|
560
|
+
* Change the pickerMoment value
|
|
561
|
+
*/
|
|
562
|
+
handlePickerMomentChange(date: T): void;
|
|
563
|
+
userSelected(): void;
|
|
564
|
+
/**
|
|
565
|
+
* Whether the previous period button is enabled.
|
|
566
|
+
*/
|
|
567
|
+
prevButtonEnabled(): boolean;
|
|
568
|
+
/**
|
|
569
|
+
* Whether the next period button is enabled.
|
|
570
|
+
*/
|
|
571
|
+
nextButtonEnabled(): boolean;
|
|
572
|
+
/**
|
|
573
|
+
* Focus to the host element
|
|
574
|
+
*/
|
|
575
|
+
focusActiveCell(): void;
|
|
576
|
+
selectYearInMultiYearView(normalizedYear: T): void;
|
|
577
|
+
selectMonthInYearView(normalizedMonth: T): void;
|
|
578
|
+
/**
|
|
579
|
+
* Whether the two dates represent the same view in the current view mode (month or year).
|
|
580
|
+
*/
|
|
581
|
+
private isSameView;
|
|
582
|
+
/**
|
|
583
|
+
* Get a valid date object
|
|
584
|
+
*/
|
|
585
|
+
private getValidDate;
|
|
586
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlCalendarComponent<any>, never>;
|
|
587
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlCalendarComponent<any>, "owl-date-time-calendar", ["owlDateTimeCalendar"], { "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "yearOnly": { "alias": "yearOnly"; "required": false; }; "multiyearOnly": { "alias": "multiyearOnly"; "required": false; }; "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; }; }, { "pickerMomentChange": "pickerMomentChange"; "dateClicked": "dateClicked"; "selectedChange": "selectedChange"; "userSelection": "userSelection"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, false, never>;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
declare class OwlTimerComponent<T> {
|
|
591
|
+
private readonly ngZone;
|
|
592
|
+
private readonly elmRef;
|
|
593
|
+
private readonly pickerIntl;
|
|
594
|
+
private readonly cdRef;
|
|
595
|
+
private readonly dateTimeAdapter;
|
|
596
|
+
/** The current picker moment */
|
|
597
|
+
private _pickerMoment;
|
|
598
|
+
get pickerMoment(): T;
|
|
599
|
+
set pickerMoment(value: T);
|
|
600
|
+
/** The minimum selectable date time. */
|
|
601
|
+
private _minDateTime;
|
|
602
|
+
get minDateTime(): T | null;
|
|
603
|
+
set minDateTime(value: T | null);
|
|
604
|
+
/** The maximum selectable date time. */
|
|
605
|
+
private _maxDateTime;
|
|
606
|
+
get maxDateTime(): T | null;
|
|
607
|
+
set maxDateTime(value: T | null);
|
|
608
|
+
private isPM;
|
|
609
|
+
/**
|
|
610
|
+
* Whether to show the second's timer
|
|
611
|
+
*/
|
|
612
|
+
readonly showSecondsTimer: i0.InputSignal<boolean>;
|
|
613
|
+
/**
|
|
614
|
+
* Whether the timer is in hour12 format
|
|
615
|
+
*/
|
|
616
|
+
readonly hour12Timer: i0.InputSignal<boolean>;
|
|
617
|
+
/**
|
|
618
|
+
* Hours to change per step
|
|
619
|
+
*/
|
|
620
|
+
readonly stepHour: i0.InputSignal<number>;
|
|
621
|
+
/**
|
|
622
|
+
* Minutes to change per step
|
|
623
|
+
*/
|
|
624
|
+
readonly stepMinute: i0.InputSignal<number>;
|
|
625
|
+
/**
|
|
626
|
+
* Seconds to change per step
|
|
627
|
+
*/
|
|
628
|
+
readonly stepSecond: i0.InputSignal<number>;
|
|
629
|
+
readonly selectedChange: i0.OutputEmitterRef<T>;
|
|
630
|
+
protected get hourValue(): number;
|
|
631
|
+
/**
|
|
632
|
+
* The value would be displayed in hourBox.
|
|
633
|
+
* We need this because the value displayed in hourBox it not
|
|
634
|
+
* the same as the hourValue when the timer is in hour12Timer mode.
|
|
635
|
+
*/
|
|
636
|
+
protected get hourBoxValue(): number;
|
|
637
|
+
protected get minuteValue(): number;
|
|
638
|
+
protected get secondValue(): number;
|
|
639
|
+
protected get upHourButtonLabel(): string;
|
|
640
|
+
protected get downHourButtonLabel(): string;
|
|
641
|
+
protected get upMinuteButtonLabel(): string;
|
|
642
|
+
protected get downMinuteButtonLabel(): string;
|
|
643
|
+
protected get upSecondButtonLabel(): string;
|
|
644
|
+
protected get downSecondButtonLabel(): string;
|
|
645
|
+
protected get hour12ButtonLabel(): string;
|
|
646
|
+
/**
|
|
647
|
+
* Focus to the host element
|
|
648
|
+
*/
|
|
649
|
+
focus(): void;
|
|
650
|
+
/**
|
|
651
|
+
* Set the hour value via typing into timer box input
|
|
652
|
+
* We need this to handle the hour value when the timer is in hour12 mode
|
|
653
|
+
*/
|
|
654
|
+
setHourValueViaInput(hours: number): void;
|
|
655
|
+
setHourValue(hours: number): void;
|
|
656
|
+
setMinuteValue(minutes: number): void;
|
|
657
|
+
setSecondValue(seconds: number): void;
|
|
658
|
+
setMeridiem(event: Event): void;
|
|
659
|
+
/**
|
|
660
|
+
* Check if the up hour button is enabled
|
|
661
|
+
*/
|
|
662
|
+
upHourEnabled(): boolean;
|
|
663
|
+
/**
|
|
664
|
+
* Check if the down hour button is enabled
|
|
665
|
+
*/
|
|
666
|
+
downHourEnabled(): boolean;
|
|
667
|
+
/**
|
|
668
|
+
* Check if the up minute button is enabled
|
|
669
|
+
*/
|
|
670
|
+
upMinuteEnabled(): boolean;
|
|
671
|
+
/**
|
|
672
|
+
* Check if the down minute button is enabled
|
|
673
|
+
*/
|
|
674
|
+
downMinuteEnabled(): boolean;
|
|
675
|
+
/**
|
|
676
|
+
* Check if the up second button is enabled
|
|
677
|
+
*/
|
|
678
|
+
upSecondEnabled(): boolean;
|
|
679
|
+
/**
|
|
680
|
+
* Check if the down second button is enabled
|
|
681
|
+
*/
|
|
682
|
+
downSecondEnabled(): boolean;
|
|
683
|
+
/**
|
|
684
|
+
* PickerMoment's hour value +/- certain amount and compare it to the give date
|
|
685
|
+
* 1 is after the comparedDate
|
|
686
|
+
* -1 is before the comparedDate
|
|
687
|
+
* 0 is equal the comparedDate
|
|
688
|
+
*/
|
|
689
|
+
private compareHours;
|
|
690
|
+
/**
|
|
691
|
+
* PickerMoment's minute value +/- certain amount and compare it to the give date
|
|
692
|
+
* 1 is after the comparedDate
|
|
693
|
+
* -1 is before the comparedDate
|
|
694
|
+
* 0 is equal the comparedDate
|
|
695
|
+
*/
|
|
696
|
+
private compareMinutes;
|
|
697
|
+
/**
|
|
698
|
+
* PickerMoment's second value +/- certain amount and compare it to the give date
|
|
699
|
+
* 1 is after the comparedDate
|
|
700
|
+
* -1 is before the comparedDate
|
|
701
|
+
* 0 is equal the comparedDate
|
|
702
|
+
*/
|
|
703
|
+
private compareSeconds;
|
|
704
|
+
/**
|
|
705
|
+
* Get a valid date object
|
|
706
|
+
*/
|
|
707
|
+
private getValidDate;
|
|
708
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlTimerComponent<any>, never>;
|
|
709
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlTimerComponent<any>, "owl-date-time-timer", ["owlDateTimeTimer"], { "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "minDateTime": { "alias": "minDateTime"; "required": false; }; "maxDateTime": { "alias": "maxDateTime"; "required": false; }; "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; "isSignal": true; }; "hour12Timer": { "alias": "hour12Timer"; "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; }; }, { "selectedChange": "selectedChange"; }, never, never, false, never>;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
declare class OwlDateTimeContainerComponent<T> implements OnInit, AfterContentInit {
|
|
713
|
+
private readonly cdRef;
|
|
714
|
+
private readonly elmRef;
|
|
715
|
+
private readonly pickerIntl;
|
|
716
|
+
private readonly dateTimeAdapter;
|
|
717
|
+
protected calendar: OwlCalendarComponent<T>;
|
|
718
|
+
protected timer: OwlTimerComponent<T>;
|
|
719
|
+
picker: OwlDateTime<T>;
|
|
720
|
+
activeSelectedIndex: number;
|
|
721
|
+
private retainStartTime;
|
|
722
|
+
private retainEndTime;
|
|
723
|
+
showTodayButton: boolean;
|
|
724
|
+
/**
|
|
725
|
+
* The current picker moment. This determines which time period is shown and which date is
|
|
726
|
+
* highlighted when using keyboard navigation.
|
|
727
|
+
*/
|
|
728
|
+
private _clamPickerMoment;
|
|
729
|
+
get pickerMoment(): T;
|
|
730
|
+
set pickerMoment(value: T);
|
|
731
|
+
get pickerType(): PickerType;
|
|
732
|
+
/**
|
|
733
|
+
* The range 'from' label
|
|
734
|
+
*/
|
|
735
|
+
get fromLabel(): string;
|
|
736
|
+
/**
|
|
737
|
+
* The range 'to' label
|
|
738
|
+
*/
|
|
739
|
+
get toLabel(): string;
|
|
740
|
+
/**
|
|
741
|
+
* The range 'from' formatted value
|
|
742
|
+
*/
|
|
743
|
+
get fromFormattedValue(): string;
|
|
744
|
+
/**
|
|
745
|
+
* The range 'to' formatted value
|
|
746
|
+
*/
|
|
747
|
+
get toFormattedValue(): string;
|
|
748
|
+
get containerElm(): HTMLElement;
|
|
749
|
+
ngOnInit(): void;
|
|
750
|
+
ngAfterContentInit(): void;
|
|
751
|
+
dateSelected(date: T): void;
|
|
752
|
+
timeSelected(time: T): void;
|
|
753
|
+
/**
|
|
754
|
+
* Handle click on inform radio group
|
|
755
|
+
*/
|
|
756
|
+
handleClickOnInfoGroup(event: Event, index: number): void;
|
|
757
|
+
/**
|
|
758
|
+
* Handle click on inform radio group
|
|
759
|
+
*/
|
|
760
|
+
handleKeydownOnInfoGroup(event: KeyboardEvent, next: HTMLElement, index: number): void;
|
|
761
|
+
/**
|
|
762
|
+
* Set the value of activeSelectedIndex
|
|
763
|
+
*/
|
|
764
|
+
private setActiveSelectedIndex;
|
|
765
|
+
private initPicker;
|
|
766
|
+
/**
|
|
767
|
+
* Select calendar date in single mode,
|
|
768
|
+
* it returns null when date is not selected.
|
|
769
|
+
*/
|
|
770
|
+
private dateSelectedInSingleMode;
|
|
771
|
+
/**
|
|
772
|
+
* Select dates in range Mode
|
|
773
|
+
*/
|
|
774
|
+
private dateSelectedInRangeMode;
|
|
775
|
+
/**
|
|
776
|
+
* Update the given calendar date's time and check if it is valid
|
|
777
|
+
* Because the calendar date has 00:00:00 as default time, if the picker type is 'both',
|
|
778
|
+
* we need to update the given calendar date's time before selecting it.
|
|
779
|
+
* if it is valid, return the updated dateTime
|
|
780
|
+
* if it is not valid, return null
|
|
781
|
+
*/
|
|
782
|
+
private updateAndCheckCalendarDate;
|
|
783
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeContainerComponent<any>, never>;
|
|
784
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlDateTimeContainerComponent<any>, "owl-date-time-container", ["owlDateTimeContainer"], { "showTodayButton": { "alias": "showTodayButton"; "required": false; }; }, {}, never, never, false, never>;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
declare class OwlDateTimeInlineComponent<T> extends OwlDateTime<T> implements OnInit, ControlValueAccessor {
|
|
788
|
+
#private;
|
|
789
|
+
protected readonly container: i0.Signal<OwlDateTimeContainerComponent<any>>;
|
|
790
|
+
/**
|
|
791
|
+
* Set the type of the dateTime picker
|
|
792
|
+
* 'both' -- show both calendar and timer
|
|
793
|
+
* 'calendar' -- show only calendar
|
|
794
|
+
* 'timer' -- show only timer
|
|
795
|
+
*/
|
|
796
|
+
pickerType: PickerType;
|
|
797
|
+
disabled: boolean;
|
|
798
|
+
private _selectMode;
|
|
799
|
+
get selectMode(): SelectMode;
|
|
800
|
+
set selectMode(mode: SelectMode);
|
|
801
|
+
/** The date to open the calendar to initially. */
|
|
802
|
+
private _startAt;
|
|
803
|
+
get startAt(): T | null;
|
|
804
|
+
set startAt(date: T | null);
|
|
805
|
+
/** The date to open for range calendar. */
|
|
806
|
+
private _endAt;
|
|
807
|
+
get endAt(): T | null;
|
|
808
|
+
set endAt(date: T | null);
|
|
809
|
+
private _dateTimeFilter;
|
|
810
|
+
get dateTimeFilter(): (date: T | null) => boolean;
|
|
811
|
+
set dateTimeFilter(filter: (date: T | null) => boolean);
|
|
812
|
+
/** The minimum valid date. */
|
|
813
|
+
private _min;
|
|
814
|
+
get minDateTime(): T | null;
|
|
815
|
+
set minDateTime(value: T | null);
|
|
816
|
+
/** The maximum valid date. */
|
|
817
|
+
private _max;
|
|
818
|
+
get maxDateTime(): T | null;
|
|
819
|
+
set maxDateTime(value: T | null);
|
|
820
|
+
private _value;
|
|
821
|
+
get value(): T | null;
|
|
822
|
+
set value(value: T | null);
|
|
823
|
+
private _values;
|
|
824
|
+
get values(): Array<T>;
|
|
825
|
+
set values(values: Array<T>);
|
|
826
|
+
/**
|
|
827
|
+
* Limit to the amount of days that can be selected at once.
|
|
828
|
+
*/
|
|
829
|
+
rangeLimit: number | null;
|
|
830
|
+
/**
|
|
831
|
+
* Flag to show today button to jump to today's date. Defaults to `false`.
|
|
832
|
+
*/
|
|
833
|
+
showTodayButton: boolean;
|
|
834
|
+
/**
|
|
835
|
+
* Variable to hold the old max date time value for when we override it with rangeLimit
|
|
836
|
+
*/
|
|
837
|
+
private _initialMaxDateTime;
|
|
838
|
+
/**
|
|
839
|
+
* Emits selected year in multi-year view
|
|
840
|
+
* This doesn't imply a change on the selected date.
|
|
841
|
+
*/
|
|
842
|
+
readonly yearSelected: i0.OutputEmitterRef<T>;
|
|
843
|
+
/**
|
|
844
|
+
* Emits selected month in year view
|
|
845
|
+
* This doesn't imply a change on the selected date.
|
|
846
|
+
*/
|
|
847
|
+
readonly monthSelected: i0.OutputEmitterRef<T>;
|
|
848
|
+
/**
|
|
849
|
+
* Emits selected date
|
|
850
|
+
*/
|
|
851
|
+
readonly dateSelected: i0.OutputEmitterRef<T>;
|
|
852
|
+
private _selected;
|
|
853
|
+
get selected(): T | null;
|
|
854
|
+
set selected(value: T | null);
|
|
855
|
+
private _selecteds;
|
|
856
|
+
get selecteds(): Array<T>;
|
|
857
|
+
set selecteds(values: Array<T>);
|
|
858
|
+
readonly opened = true;
|
|
859
|
+
get isInSingleMode(): boolean;
|
|
860
|
+
get isInRangeMode(): boolean;
|
|
861
|
+
private onModelChange;
|
|
862
|
+
private onModelTouched;
|
|
863
|
+
ngOnInit(): void;
|
|
864
|
+
writeValue(value: unknown): void;
|
|
865
|
+
registerOnChange(fn: (v: T | Array<T>) => void): void;
|
|
866
|
+
registerOnTouched(fn: () => void): void;
|
|
867
|
+
select(date: Array<T> | T): void;
|
|
868
|
+
/**
|
|
869
|
+
* Emits the selected year in multi-year view
|
|
870
|
+
*/
|
|
871
|
+
selectYear(normalizedYear: T): void;
|
|
872
|
+
/**
|
|
873
|
+
* Emits selected month in year view
|
|
874
|
+
*/
|
|
875
|
+
selectMonth(normalizedMonth: T): void;
|
|
876
|
+
/**
|
|
877
|
+
* Emits the selected date
|
|
878
|
+
*/
|
|
879
|
+
selectDate(normalizedDate: T): void;
|
|
880
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeInlineComponent<any>, never>;
|
|
881
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlDateTimeInlineComponent<any>, "owl-date-time-inline", never, { "pickerType": { "alias": "pickerType"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "endAt": { "alias": "endAt"; "required": false; }; "dateTimeFilter": { "alias": "owlDateTimeFilter"; "required": false; }; "minDateTime": { "alias": "min"; "required": false; }; "maxDateTime": { "alias": "max"; "required": false; }; "value": { "alias": "value"; "required": false; }; "values": { "alias": "values"; "required": false; }; "rangeLimit": { "alias": "rangeLimit"; "required": false; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "dateSelected": "dateSelected"; }, never, never, false, never>;
|
|
882
|
+
static ngAcceptInputType_disabled: unknown;
|
|
883
|
+
static ngAcceptInputType_showTodayButton: unknown;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
declare class OwlMonthViewComponent<T> implements OnInit, AfterContentInit, OnDestroy {
|
|
887
|
+
private readonly cdRef;
|
|
888
|
+
private readonly dateTimeAdapter;
|
|
889
|
+
private readonly dateTimeFormats;
|
|
890
|
+
/**
|
|
891
|
+
* Whether to hide dates in other months at the start or end of the current month.
|
|
892
|
+
*/
|
|
893
|
+
hideOtherMonths: boolean;
|
|
894
|
+
private isDefaultFirstDayOfWeek;
|
|
895
|
+
/**
|
|
896
|
+
* Define the first day of a week
|
|
897
|
+
* Sunday: 0 - Saturday: 6
|
|
898
|
+
*/
|
|
899
|
+
private _firstDayOfWeek;
|
|
900
|
+
get firstDayOfWeek(): number;
|
|
901
|
+
set firstDayOfWeek(val: number);
|
|
902
|
+
/**
|
|
903
|
+
* The select mode of the picker;
|
|
904
|
+
*/
|
|
905
|
+
private _selectMode;
|
|
906
|
+
get selectMode(): SelectMode;
|
|
907
|
+
set selectMode(val: SelectMode);
|
|
908
|
+
/** The currently selected date. */
|
|
909
|
+
private _selected;
|
|
910
|
+
get selected(): T | null;
|
|
911
|
+
set selected(value: T | null);
|
|
912
|
+
private _selecteds;
|
|
913
|
+
get selecteds(): Array<T>;
|
|
914
|
+
set selecteds(values: Array<T>);
|
|
915
|
+
private _pickerMoment;
|
|
916
|
+
get pickerMoment(): T;
|
|
917
|
+
set pickerMoment(value: T);
|
|
918
|
+
/**
|
|
919
|
+
* A function used to filter which dates are selectable
|
|
920
|
+
*/
|
|
921
|
+
private _dateFilter;
|
|
922
|
+
get dateFilter(): (date: T) => boolean;
|
|
923
|
+
set dateFilter(filter: (date: T) => boolean);
|
|
924
|
+
/** The minimum selectable date. */
|
|
925
|
+
private _minDate;
|
|
926
|
+
get minDate(): T | null;
|
|
927
|
+
set minDate(value: T | null);
|
|
928
|
+
/** The maximum selectable date. */
|
|
929
|
+
private _maxDate;
|
|
930
|
+
get maxDate(): T | null;
|
|
931
|
+
set maxDate(value: T | null);
|
|
932
|
+
private _weekdays;
|
|
933
|
+
get weekdays(): Array<Record<Intl.DateTimeFormatOptions['weekday'], string>>;
|
|
934
|
+
private _days;
|
|
935
|
+
get days(): Array<Array<CalendarCell>>;
|
|
936
|
+
get activeCell(): number;
|
|
937
|
+
get isInSingleMode(): boolean;
|
|
938
|
+
get isInRangeMode(): boolean;
|
|
939
|
+
private firstDateOfMonth;
|
|
940
|
+
private localeSub;
|
|
941
|
+
private initiated;
|
|
942
|
+
private dateNames;
|
|
943
|
+
/**
|
|
944
|
+
* The date of the month that today falls on.
|
|
945
|
+
*/
|
|
946
|
+
todayDate: number | null;
|
|
947
|
+
/**
|
|
948
|
+
* An array to hold all selectedDates' value
|
|
949
|
+
* the value is the day number in current month
|
|
950
|
+
*/
|
|
951
|
+
selectedDates: Array<number>;
|
|
952
|
+
firstRowOffset: number;
|
|
953
|
+
/**
|
|
954
|
+
* Callback to invoke when a new date is selected
|
|
955
|
+
*/
|
|
956
|
+
readonly selectedChange: i0.OutputEmitterRef<T>;
|
|
957
|
+
/**
|
|
958
|
+
* Callback to invoke when any date is selected.
|
|
959
|
+
*/
|
|
960
|
+
readonly userSelection: i0.OutputEmitterRef<void>;
|
|
961
|
+
/** Emits when any date is activated. */
|
|
962
|
+
readonly pickerMomentChange: i0.OutputEmitterRef<T>;
|
|
963
|
+
/** The body of calendar table */
|
|
964
|
+
calendarBodyElm: OwlCalendarBodyComponent;
|
|
965
|
+
ngOnInit(): void;
|
|
966
|
+
ngAfterContentInit(): void;
|
|
967
|
+
ngOnDestroy(): void;
|
|
968
|
+
/**
|
|
969
|
+
* Handle a calendarCell selected
|
|
970
|
+
*/
|
|
971
|
+
selectCalendarCell(cell: CalendarCell): void;
|
|
972
|
+
/**
|
|
973
|
+
* Handle a new date selected
|
|
974
|
+
*/
|
|
975
|
+
private selectDate;
|
|
976
|
+
/**
|
|
977
|
+
* Handle keydown event on calendar body
|
|
978
|
+
*/
|
|
979
|
+
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
980
|
+
/**
|
|
981
|
+
* Generate the calendar weekdays array
|
|
982
|
+
*/
|
|
983
|
+
private generateWeekDays;
|
|
984
|
+
/**
|
|
985
|
+
* Generate the calendar days array
|
|
986
|
+
*/
|
|
987
|
+
private generateCalendar;
|
|
988
|
+
private updateFirstDayOfWeek;
|
|
989
|
+
/**
|
|
990
|
+
* Creates CalendarCell for days.
|
|
991
|
+
*/
|
|
992
|
+
private createDateCell;
|
|
993
|
+
/**
|
|
994
|
+
* Check if the date is valid
|
|
995
|
+
*/
|
|
996
|
+
private isDateEnabled;
|
|
997
|
+
/**
|
|
998
|
+
* Get a valid date object
|
|
999
|
+
*/
|
|
1000
|
+
private getValidDate;
|
|
1001
|
+
/**
|
|
1002
|
+
* Check if the give dates are none-null and in the same month
|
|
1003
|
+
*/
|
|
1004
|
+
isSameMonth(dateLeft: T, dateRight: T): boolean;
|
|
1005
|
+
/**
|
|
1006
|
+
* Set the selectedDates value.
|
|
1007
|
+
* In single mode, it has only one value which represent the selected date
|
|
1008
|
+
* In range mode, it would has two values, one for the fromValue and the other for the toValue
|
|
1009
|
+
*/
|
|
1010
|
+
private setSelectedDates;
|
|
1011
|
+
private focusActiveCell;
|
|
1012
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlMonthViewComponent<any>, never>;
|
|
1013
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlMonthViewComponent<any>, "owl-date-time-month-view", ["owlYearView"], { "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; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "selectedChange": "selectedChange"; "userSelection": "userSelection"; "pickerMomentChange": "pickerMomentChange"; }, never, never, false, never>;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
1017
|
+
private readonly cdRef;
|
|
1018
|
+
private readonly pickerIntl;
|
|
1019
|
+
private readonly dateTimeAdapter;
|
|
1020
|
+
private readonly options;
|
|
1021
|
+
/**
|
|
1022
|
+
* The select mode of the picker;
|
|
1023
|
+
*/
|
|
1024
|
+
private _selectMode;
|
|
1025
|
+
get selectMode(): SelectMode;
|
|
1026
|
+
set selectMode(val: SelectMode);
|
|
1027
|
+
/** The currently selected date. */
|
|
1028
|
+
private _selected;
|
|
1029
|
+
get selected(): T | null;
|
|
1030
|
+
set selected(value: T | null);
|
|
1031
|
+
private _selecteds;
|
|
1032
|
+
get selecteds(): Array<T>;
|
|
1033
|
+
set selecteds(values: Array<T>);
|
|
1034
|
+
private _pickerMoment;
|
|
1035
|
+
get pickerMoment(): T | null;
|
|
1036
|
+
set pickerMoment(value: T);
|
|
1037
|
+
/**
|
|
1038
|
+
* A function used to filter which dates are selectable
|
|
1039
|
+
*/
|
|
1040
|
+
private _dateFilter;
|
|
1041
|
+
get dateFilter(): (date: T) => boolean;
|
|
1042
|
+
set dateFilter(filter: (date: T) => boolean);
|
|
1043
|
+
/** The minimum selectable date. */
|
|
1044
|
+
private _minDate;
|
|
1045
|
+
get minDate(): T | null;
|
|
1046
|
+
set minDate(value: T | null);
|
|
1047
|
+
/** The maximum selectable date. */
|
|
1048
|
+
private _maxDate;
|
|
1049
|
+
get maxDate(): T | null;
|
|
1050
|
+
set maxDate(value: T | null);
|
|
1051
|
+
private _todayYear;
|
|
1052
|
+
protected get todayYear(): number;
|
|
1053
|
+
private _years;
|
|
1054
|
+
protected get years(): Array<Array<CalendarCell>>;
|
|
1055
|
+
private _selectedYears;
|
|
1056
|
+
protected get selectedYears(): Array<number>;
|
|
1057
|
+
private initiated;
|
|
1058
|
+
protected get isInSingleMode(): boolean;
|
|
1059
|
+
protected get isInRangeMode(): boolean;
|
|
1060
|
+
protected get activeCell(): number | undefined;
|
|
1061
|
+
protected get tableHeader(): string | undefined;
|
|
1062
|
+
protected get prevButtonLabel(): string;
|
|
1063
|
+
protected get nextButtonLabel(): string;
|
|
1064
|
+
/**
|
|
1065
|
+
* Callback to invoke when a new month is selected
|
|
1066
|
+
*/
|
|
1067
|
+
readonly changeYear: i0.OutputEmitterRef<T>;
|
|
1068
|
+
/**
|
|
1069
|
+
* Emits the selected year. This doesn't imply a change on the selected date
|
|
1070
|
+
*/
|
|
1071
|
+
readonly yearSelected: i0.OutputEmitterRef<T>;
|
|
1072
|
+
/** Emits when any date is activated. */
|
|
1073
|
+
readonly pickerMomentChange: i0.OutputEmitterRef<T>;
|
|
1074
|
+
/** Emits when use keyboard enter to select a calendar cell */
|
|
1075
|
+
readonly keyboardEnter: i0.OutputEmitterRef<void>;
|
|
1076
|
+
/** The body of calendar table */
|
|
1077
|
+
protected readonly calendarBodyElm: i0.Signal<OwlCalendarBodyComponent>;
|
|
1078
|
+
ngAfterContentInit(): void;
|
|
1079
|
+
/**
|
|
1080
|
+
* Handle a calendarCell selected
|
|
1081
|
+
*/
|
|
1082
|
+
selectCalendarCell(cell: CalendarCell): void;
|
|
1083
|
+
private selectYear;
|
|
1084
|
+
/**
|
|
1085
|
+
* Generate the previous year list
|
|
1086
|
+
*/
|
|
1087
|
+
prevYearList(event: Event): void;
|
|
1088
|
+
/**
|
|
1089
|
+
* Generate the next year list
|
|
1090
|
+
*/
|
|
1091
|
+
nextYearList(event: Event): void;
|
|
1092
|
+
generateYearList(): void;
|
|
1093
|
+
/** Whether the previous period button is enabled. */
|
|
1094
|
+
previousEnabled(): boolean;
|
|
1095
|
+
/** Whether the next period button is enabled. */
|
|
1096
|
+
nextEnabled(): boolean;
|
|
1097
|
+
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
1098
|
+
/**
|
|
1099
|
+
* Creates an CalendarCell for the given year.
|
|
1100
|
+
*/
|
|
1101
|
+
private createYearCell;
|
|
1102
|
+
private setSelectedYears;
|
|
1103
|
+
/** Whether the given year is enabled. */
|
|
1104
|
+
private isYearEnabled;
|
|
1105
|
+
private isSameYearList;
|
|
1106
|
+
/**
|
|
1107
|
+
* Get a valid date object
|
|
1108
|
+
*/
|
|
1109
|
+
private getValidDate;
|
|
1110
|
+
private focusActiveCell;
|
|
1111
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlMultiYearViewComponent<any>, never>;
|
|
1112
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlMultiYearViewComponent<any>, "owl-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; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "changeYear": "changeYear"; "yearSelected": "yearSelected"; "pickerMomentChange": "pickerMomentChange"; "keyboardEnter": "keyboardEnter"; }, never, never, false, never>;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
declare class OwlTimerBoxComponent implements OnInit, OnDestroy {
|
|
1116
|
+
showDivider: boolean;
|
|
1117
|
+
upBtnAriaLabel: string;
|
|
1118
|
+
upBtnDisabled: boolean;
|
|
1119
|
+
downBtnAriaLabel: string;
|
|
1120
|
+
downBtnDisabled: boolean;
|
|
1121
|
+
/**
|
|
1122
|
+
* Value would be displayed in the box
|
|
1123
|
+
* If it is null, the box would display [value]
|
|
1124
|
+
*/
|
|
1125
|
+
boxValue: number;
|
|
1126
|
+
value: number;
|
|
1127
|
+
min: number;
|
|
1128
|
+
max: number;
|
|
1129
|
+
step: number;
|
|
1130
|
+
inputLabel: string;
|
|
1131
|
+
readonly valueChange: i0.OutputEmitterRef<number>;
|
|
1132
|
+
readonly inputChange: i0.OutputEmitterRef<number>;
|
|
1133
|
+
private inputStream;
|
|
1134
|
+
private inputStreamSub;
|
|
1135
|
+
private hasFocus;
|
|
1136
|
+
protected get displayValue(): string;
|
|
1137
|
+
private valueInput;
|
|
1138
|
+
private onValueInputMouseWheelBind;
|
|
1139
|
+
ngOnInit(): void;
|
|
1140
|
+
ngOnDestroy(): void;
|
|
1141
|
+
upBtnClicked(): void;
|
|
1142
|
+
downBtnClicked(): void;
|
|
1143
|
+
handleInputChange(val: string): void;
|
|
1144
|
+
focusIn(): void;
|
|
1145
|
+
focusOut(value: string): void;
|
|
1146
|
+
private updateValue;
|
|
1147
|
+
private updateValueViaInput;
|
|
1148
|
+
private onValueInputMouseWheel;
|
|
1149
|
+
private bindValueInputMouseWheel;
|
|
1150
|
+
private unbindValueInputMouseWheel;
|
|
1151
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlTimerBoxComponent, never>;
|
|
1152
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlTimerBoxComponent, "owl-date-time-timer-box", ["owlDateTimeTimerBox"], { "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>;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit, OnDestroy {
|
|
1156
|
+
private readonly cdRef;
|
|
1157
|
+
private readonly dateTimeAdapter;
|
|
1158
|
+
private readonly dateTimeFormats;
|
|
1159
|
+
/**
|
|
1160
|
+
* The select mode of the picker;
|
|
1161
|
+
*/
|
|
1162
|
+
private _selectMode;
|
|
1163
|
+
get selectMode(): SelectMode;
|
|
1164
|
+
set selectMode(val: SelectMode);
|
|
1165
|
+
/** The currently selected date. */
|
|
1166
|
+
private _selected;
|
|
1167
|
+
get selected(): T | null;
|
|
1168
|
+
set selected(value: T | null);
|
|
1169
|
+
private _selecteds;
|
|
1170
|
+
get selecteds(): Array<T>;
|
|
1171
|
+
set selecteds(values: Array<T>);
|
|
1172
|
+
private _pickerMoment;
|
|
1173
|
+
get pickerMoment(): T | null;
|
|
1174
|
+
set pickerMoment(value: T);
|
|
1175
|
+
/**
|
|
1176
|
+
* A function used to filter which dates are selectable
|
|
1177
|
+
*/
|
|
1178
|
+
private _dateFilter;
|
|
1179
|
+
get dateFilter(): (date: T) => boolean;
|
|
1180
|
+
set dateFilter(filter: (date: T) => boolean);
|
|
1181
|
+
/** The minimum selectable date. */
|
|
1182
|
+
private _minDate;
|
|
1183
|
+
get minDate(): T | null;
|
|
1184
|
+
set minDate(value: T | null);
|
|
1185
|
+
/** The maximum selectable date. */
|
|
1186
|
+
private _maxDate;
|
|
1187
|
+
get maxDate(): T | null;
|
|
1188
|
+
set maxDate(value: T | null);
|
|
1189
|
+
private readonly monthNames;
|
|
1190
|
+
private _months;
|
|
1191
|
+
protected get months(): Array<Array<CalendarCell>>;
|
|
1192
|
+
protected get activeCell(): number;
|
|
1193
|
+
protected get isInSingleMode(): boolean;
|
|
1194
|
+
protected get isInRangeMode(): boolean;
|
|
1195
|
+
private localeSub;
|
|
1196
|
+
private initiated;
|
|
1197
|
+
todayMonth: number | null;
|
|
1198
|
+
/**
|
|
1199
|
+
* An array to hold all selectedDates' month value
|
|
1200
|
+
* the value is the month number in current year
|
|
1201
|
+
*/
|
|
1202
|
+
selectedMonths: Array<number>;
|
|
1203
|
+
/**
|
|
1204
|
+
* Callback to invoke when a new month is selected
|
|
1205
|
+
*/
|
|
1206
|
+
readonly changeMonth: i0.OutputEmitterRef<T>;
|
|
1207
|
+
/**
|
|
1208
|
+
* Emits the selected year. This doesn't imply a change on the selected date
|
|
1209
|
+
*/
|
|
1210
|
+
readonly monthSelected: i0.OutputEmitterRef<T>;
|
|
1211
|
+
/** Emits when any date is activated. */
|
|
1212
|
+
readonly pickerMomentChange: i0.OutputEmitterRef<T>;
|
|
1213
|
+
/** Emits when use keyboard enter to select a calendar cell */
|
|
1214
|
+
readonly keyboardEnter: i0.OutputEmitterRef<void>;
|
|
1215
|
+
/** The body of calendar table */
|
|
1216
|
+
protected calendarBodyElm: OwlCalendarBodyComponent;
|
|
1217
|
+
ngOnInit(): void;
|
|
1218
|
+
ngAfterContentInit(): void;
|
|
1219
|
+
ngOnDestroy(): void;
|
|
1220
|
+
/**
|
|
1221
|
+
* Handle a calendarCell selected
|
|
1222
|
+
*/
|
|
1223
|
+
selectCalendarCell(cell: CalendarCell): void;
|
|
1224
|
+
/**
|
|
1225
|
+
* Handle a new month selected
|
|
1226
|
+
*/
|
|
1227
|
+
private selectMonth;
|
|
1228
|
+
/**
|
|
1229
|
+
* Handle keydown event on calendar body
|
|
1230
|
+
*/
|
|
1231
|
+
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
1232
|
+
/**
|
|
1233
|
+
* Generate the calendar month list
|
|
1234
|
+
*/
|
|
1235
|
+
private generateMonthList;
|
|
1236
|
+
/**
|
|
1237
|
+
* Creates an CalendarCell for the given month.
|
|
1238
|
+
*/
|
|
1239
|
+
private createMonthCell;
|
|
1240
|
+
/**
|
|
1241
|
+
* Check if the given month is enable
|
|
1242
|
+
*/
|
|
1243
|
+
private isMonthEnabled;
|
|
1244
|
+
/**
|
|
1245
|
+
* Gets the month in this year that the given Date falls on.
|
|
1246
|
+
* Returns null if the given Date is in another year.
|
|
1247
|
+
*/
|
|
1248
|
+
private getMonthInCurrentYear;
|
|
1249
|
+
/**
|
|
1250
|
+
* Set the selectedMonths value
|
|
1251
|
+
* In single mode, it has only one value which represent the month the selected date in
|
|
1252
|
+
* In range mode, it would has two values, one for the month the fromValue in and the other for the month the toValue in
|
|
1253
|
+
*/
|
|
1254
|
+
private setSelectedMonths;
|
|
1255
|
+
/**
|
|
1256
|
+
* Check the given dates are in the same year
|
|
1257
|
+
*/
|
|
1258
|
+
private hasSameYear;
|
|
1259
|
+
/**
|
|
1260
|
+
* Get a valid date object
|
|
1261
|
+
*/
|
|
1262
|
+
private getValidDate;
|
|
1263
|
+
private focusActiveCell;
|
|
1264
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlYearViewComponent<any>, never>;
|
|
1265
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlYearViewComponent<any>, "owl-date-time-year-view", ["owlMonthView"], { "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "changeMonth": "changeMonth"; "monthSelected": "monthSelected"; "pickerMomentChange": "pickerMomentChange"; "keyboardEnter": "keyboardEnter"; }, never, never, false, never>;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
declare class OwlDateTimeModule {
|
|
1269
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeModule, never>;
|
|
1270
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<OwlDateTimeModule, [typeof OwlCalendarBodyComponent, typeof OwlCalendarComponent, typeof OwlDateTimeContainerComponent, typeof OwlDateTimeInlineComponent, typeof OwlMonthViewComponent, typeof OwlMultiYearViewComponent, typeof OwlTimerBoxComponent, typeof OwlTimerComponent, typeof OwlYearViewComponent], [typeof i10.A11yModule], [typeof OwlCalendarComponent, typeof OwlDateTimeInlineComponent, typeof OwlMonthViewComponent, typeof OwlMultiYearViewComponent, typeof OwlTimerComponent, typeof OwlYearViewComponent]>;
|
|
1271
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<OwlDateTimeModule>;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
declare class OwlDateTimeIntl {
|
|
1275
|
+
/**
|
|
1276
|
+
* Stream that emits whenever the labels here are changed. Use this to notify
|
|
1277
|
+
* components if the labels have changed after initialization.
|
|
1278
|
+
*/
|
|
1279
|
+
readonly changes: Subject<void>;
|
|
1280
|
+
/** A label for the up second button (used by screen readers). */
|
|
1281
|
+
upSecondLabel: string;
|
|
1282
|
+
/** A label for the down second button (used by screen readers). */
|
|
1283
|
+
downSecondLabel: string;
|
|
1284
|
+
/** A label for the up minute button (used by screen readers). */
|
|
1285
|
+
upMinuteLabel: string;
|
|
1286
|
+
/** A label for the down minute button (used by screen readers). */
|
|
1287
|
+
downMinuteLabel: string;
|
|
1288
|
+
/** A label for the up hour button (used by screen readers). */
|
|
1289
|
+
upHourLabel: string;
|
|
1290
|
+
/** A label for the down hour button (used by screen readers). */
|
|
1291
|
+
downHourLabel: string;
|
|
1292
|
+
/** A label for the previous month button (used by screen readers). */
|
|
1293
|
+
prevMonthLabel: string;
|
|
1294
|
+
/** A label for the next month button (used by screen readers). */
|
|
1295
|
+
nextMonthLabel: string;
|
|
1296
|
+
/** A label for the previous year button (used by screen readers). */
|
|
1297
|
+
prevYearLabel: string;
|
|
1298
|
+
/** A label for the next year button (used by screen readers). */
|
|
1299
|
+
nextYearLabel: string;
|
|
1300
|
+
/** A label for the previous multi-year button (used by screen readers). */
|
|
1301
|
+
prevMultiYearLabel: string;
|
|
1302
|
+
/** A label for the next multi-year button (used by screen readers). */
|
|
1303
|
+
nextMultiYearLabel: string;
|
|
1304
|
+
/** A label for the 'switch to month view' button (used by screen readers). */
|
|
1305
|
+
switchToMonthViewLabel: string;
|
|
1306
|
+
/** A label for the 'switch to year view' button (used by screen readers). */
|
|
1307
|
+
switchToMultiYearViewLabel: string;
|
|
1308
|
+
/** A label for the range 'from' in picker info */
|
|
1309
|
+
rangeFromLabel: string;
|
|
1310
|
+
/** A label for the range 'to' in picker info */
|
|
1311
|
+
rangeToLabel: string;
|
|
1312
|
+
/** A label for the hour12 button (AM) */
|
|
1313
|
+
hour12AMLabel: string;
|
|
1314
|
+
/** A label for the hour12 button (PM) */
|
|
1315
|
+
hour12PMLabel: string;
|
|
1316
|
+
/** A label for the today button */
|
|
1317
|
+
todayButtonLabel: string;
|
|
1318
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeIntl, never>;
|
|
1319
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OwlDateTimeIntl>;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
|
|
1323
|
+
private readonly owlDateTimeLocale;
|
|
1324
|
+
private readonly platform;
|
|
1325
|
+
/** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */
|
|
1326
|
+
private readonly _clampDate;
|
|
1327
|
+
/**
|
|
1328
|
+
* Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
|
|
1329
|
+
* Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
|
|
1330
|
+
* the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
|
|
1331
|
+
* will produce `'8/13/1800'`.
|
|
1332
|
+
*/
|
|
1333
|
+
useUtcForDisplay: boolean;
|
|
1334
|
+
constructor();
|
|
1335
|
+
getYear(date: Date): number;
|
|
1336
|
+
getMonth(date: Date): number;
|
|
1337
|
+
getDay(date: Date): number;
|
|
1338
|
+
getDate(date: Date): number;
|
|
1339
|
+
getHours(date: Date): number;
|
|
1340
|
+
getMinutes(date: Date): number;
|
|
1341
|
+
getSeconds(date: Date): number;
|
|
1342
|
+
getTime(date: Date): number;
|
|
1343
|
+
getNumDaysInMonth(date: Date): number;
|
|
1344
|
+
differenceInCalendarDays(dateLeft: Date, dateRight: Date): number;
|
|
1345
|
+
getYearName(date: Date): string;
|
|
1346
|
+
getMonthNames(style: Intl.DateTimeFormatOptions['month']): Array<string>;
|
|
1347
|
+
getDayOfWeekNames(style: Intl.DateTimeFormatOptions['weekday']): Array<string>;
|
|
1348
|
+
getDateNames(): Array<string>;
|
|
1349
|
+
toIso8601(date: Date): string;
|
|
1350
|
+
isEqual(dateLeft: Date, dateRight: Date): boolean;
|
|
1351
|
+
isSameDay(dateLeft: Date, dateRight: Date): boolean;
|
|
1352
|
+
isValid(date: Date): boolean;
|
|
1353
|
+
invalid(): Date;
|
|
1354
|
+
isDateInstance(obj: unknown): obj is Date;
|
|
1355
|
+
addCalendarYears(date: Date, amount: number): Date;
|
|
1356
|
+
addCalendarMonths(date: Date, amount: number): Date;
|
|
1357
|
+
addCalendarDays(date: Date, amount: number): Date;
|
|
1358
|
+
setHours(date: Date, amount: number): Date;
|
|
1359
|
+
setMinutes(date: Date, amount: number): Date;
|
|
1360
|
+
setSeconds(date: Date, amount: number): Date;
|
|
1361
|
+
createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): Date;
|
|
1362
|
+
clone(date: Date): Date;
|
|
1363
|
+
now(): Date;
|
|
1364
|
+
format(date: Date, displayFormat: Intl.DateTimeFormatOptions): string;
|
|
1365
|
+
parse(value: number | string): Date | null;
|
|
1366
|
+
/**
|
|
1367
|
+
* Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
|
|
1368
|
+
* (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
|
|
1369
|
+
* invalid date for all other values.
|
|
1370
|
+
*/
|
|
1371
|
+
deserialize(value: Date | null): Date | null;
|
|
1372
|
+
/**
|
|
1373
|
+
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
1374
|
+
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
1375
|
+
* date parsing.
|
|
1376
|
+
*/
|
|
1377
|
+
private stripDirectionalityCharacters;
|
|
1378
|
+
/**
|
|
1379
|
+
* When converting Date object to string, javascript built-in functions may return wrong
|
|
1380
|
+
* results because it applies its internal DST rules. The DST rules around the world change
|
|
1381
|
+
* very frequently, and the current valid rule is not always valid in previous years though.
|
|
1382
|
+
* We work around this problem building a new Date object which has its internal UTC
|
|
1383
|
+
* representation with the local date and time.
|
|
1384
|
+
*/
|
|
1385
|
+
private _format;
|
|
1386
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeAdapter, never>;
|
|
1387
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateTimeAdapter>;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
declare class UnixTimestampDateTimeAdapter extends DateTimeAdapter<number> {
|
|
1391
|
+
private readonly owlDateTimeLocale;
|
|
1392
|
+
private readonly platform;
|
|
1393
|
+
constructor();
|
|
1394
|
+
/** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */
|
|
1395
|
+
private readonly _clampDate;
|
|
1396
|
+
/**
|
|
1397
|
+
* Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
|
|
1398
|
+
* Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
|
|
1399
|
+
* the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
|
|
1400
|
+
* will produce `'8/13/1800'`.
|
|
1401
|
+
*/
|
|
1402
|
+
useUtcForDisplay: boolean;
|
|
1403
|
+
/**
|
|
1404
|
+
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
1405
|
+
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
1406
|
+
* date parsing.
|
|
1407
|
+
*/
|
|
1408
|
+
private static search_ltr_rtl_pattern;
|
|
1409
|
+
private static stripDirectionalityCharacters;
|
|
1410
|
+
/**
|
|
1411
|
+
* When converting Date object to string, javascript built-in functions may return wrong
|
|
1412
|
+
* results because it applies its internal DST rules. The DST rules around the world change
|
|
1413
|
+
* very frequently, and the current valid rule is not always valid in previous years though.
|
|
1414
|
+
* We work around this problem building a new Date object which has its internal UTC
|
|
1415
|
+
* representation with the local date and time.
|
|
1416
|
+
*/
|
|
1417
|
+
private static _format;
|
|
1418
|
+
addCalendarDays(date: number, amount: number): number;
|
|
1419
|
+
addCalendarMonths(date: number, amount: number): number;
|
|
1420
|
+
addCalendarYears(date: number, amount: number): number;
|
|
1421
|
+
clone(date: number): number;
|
|
1422
|
+
createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): number;
|
|
1423
|
+
differenceInCalendarDays(dateLeft: number, dateRight: number): number;
|
|
1424
|
+
format(date: number, displayFormat: Intl.DateTimeFormatOptions): string;
|
|
1425
|
+
getDate(date: number): number;
|
|
1426
|
+
getDateNames(): Array<string>;
|
|
1427
|
+
getDay(date: number): number;
|
|
1428
|
+
getDayOfWeekNames(style: Intl.DateTimeFormatOptions['weekday']): Array<string>;
|
|
1429
|
+
getHours(date: number): number;
|
|
1430
|
+
getMinutes(date: number): number;
|
|
1431
|
+
getMonth(date: number): number;
|
|
1432
|
+
getMonthNames(style: Intl.DateTimeFormatOptions['month']): Array<string>;
|
|
1433
|
+
getNumDaysInMonth(date: number): number;
|
|
1434
|
+
getSeconds(date: number): number;
|
|
1435
|
+
getTime(date: number): number;
|
|
1436
|
+
getYear(date: number): number;
|
|
1437
|
+
getYearName(date: number): string;
|
|
1438
|
+
invalid(): number;
|
|
1439
|
+
isDateInstance(obj: unknown): obj is number;
|
|
1440
|
+
isEqual(dateLeft: number, dateRight: number): boolean;
|
|
1441
|
+
isSameDay(dateLeft: number, dateRight: number): boolean;
|
|
1442
|
+
isValid(date: number): boolean;
|
|
1443
|
+
now(): number;
|
|
1444
|
+
parse(value: number | string | null): number;
|
|
1445
|
+
setHours(date: number, amount: number): number;
|
|
1446
|
+
setMinutes(date: number, amount: number): number;
|
|
1447
|
+
setSeconds(date: number, amount: number): number;
|
|
1448
|
+
toIso8601(date: number): string;
|
|
1449
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UnixTimestampDateTimeAdapter, never>;
|
|
1450
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UnixTimestampDateTimeAdapter>;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* unix-timestamp-date-time-format.class
|
|
1455
|
+
*/
|
|
1456
|
+
|
|
1457
|
+
declare const OWL_UNIX_TIMESTAMP_DATE_TIME_FORMATS: OwlDateTimeFormats;
|
|
1458
|
+
|
|
1459
|
+
declare function defaultOptionsFactory(): Options;
|
|
1460
|
+
declare function multiYearOptionsFactory(options: Options): Options['multiYear'];
|
|
1461
|
+
type Options = {
|
|
1462
|
+
multiYear: {
|
|
1463
|
+
yearsPerRow: number;
|
|
1464
|
+
yearRows: number;
|
|
1465
|
+
};
|
|
1466
|
+
};
|
|
1467
|
+
declare class DefaultOptions {
|
|
1468
|
+
static create(): Options;
|
|
1469
|
+
}
|
|
1470
|
+
declare abstract class OptionsTokens {
|
|
1471
|
+
static all: InjectionToken<Options>;
|
|
1472
|
+
}
|
|
1473
|
+
declare const optionsProviders: Array<Provider>;
|
|
1474
|
+
|
|
1475
|
+
export { CalendarCell, DateTimeAdapter, DateView, DefaultOptions, NativeDateTimeAdapter, OWL_DATE_TIME_FORMATS, OWL_DATE_TIME_LOCALE, OWL_DATE_TIME_LOCALE_PROVIDER, OWL_UNIX_TIMESTAMP_DATE_TIME_FORMATS, OptionsTokens, OwlCalendarBodyComponent, OwlCalendarComponent, OwlDateTimeInlineComponent, OwlDateTimeIntl, OwlDateTimeModule, OwlMonthViewComponent, OwlMultiYearViewComponent, OwlNativeDateTimeModule, OwlTimerComponent, OwlYearViewComponent, PickerType, SelectMode, UnixTimestampDateTimeAdapter, defaultOptionsFactory, multiYearOptionsFactory, optionsProviders };
|
|
1476
|
+
export type { DateViewType, Options, OwlDateTimeFormats };
|