@dintecom/ngx-datetime-picker 22.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/LICENSE +22 -0
- package/README.md +357 -0
- package/assets/style/picker.min.css +1 -0
- package/assets/style/picker.min.css.map +1 -0
- package/fesm2022/dintecom-ngx-datetime-picker.mjs +6523 -0
- package/fesm2022/dintecom-ngx-datetime-picker.mjs.map +1 -0
- package/package.json +50 -0
- package/types/dintecom-ngx-datetime-picker.d.ts +2365 -0
|
@@ -0,0 +1,2365 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, Provider, EnvironmentProviders, ViewContainerRef, OnInit, EventEmitter, ComponentRef, EmbeddedViewRef, OutputEmitterRef, AfterContentInit, OnDestroy, ElementRef, ChangeDetectorRef, OnChanges, SimpleChanges, AfterViewChecked, AfterViewInit, AnimationCallbackEvent, PipeTransform } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import * as i3 from '@angular/cdk/overlay';
|
|
5
|
+
import { ScrollStrategy, Overlay } from '@angular/cdk/overlay';
|
|
6
|
+
import * as i2 from '@angular/cdk/a11y';
|
|
7
|
+
import * as i4 from '@angular/cdk/portal';
|
|
8
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
9
|
+
import { ControlValueAccessor, Validator, AbstractControl } from '@angular/forms';
|
|
10
|
+
import { Subject, Observable } from 'rxjs';
|
|
11
|
+
import * as i1$1 from '@angular/cdk/platform';
|
|
12
|
+
|
|
13
|
+
declare function defaultOptionsFactory(): Options;
|
|
14
|
+
declare function multiYearOptionsFactory(options: Options): {
|
|
15
|
+
yearsPerRow: number;
|
|
16
|
+
yearRows: number;
|
|
17
|
+
};
|
|
18
|
+
interface Options {
|
|
19
|
+
multiYear: {
|
|
20
|
+
yearsPerRow: number;
|
|
21
|
+
yearRows: number;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
declare class DefaultOptions {
|
|
25
|
+
static create(): Options;
|
|
26
|
+
}
|
|
27
|
+
declare abstract class OptionsTokens {
|
|
28
|
+
static all: InjectionToken<Options>;
|
|
29
|
+
static multiYear: InjectionToken<{
|
|
30
|
+
yearsPerRow: number;
|
|
31
|
+
yearRows: number;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
declare const optionsProviders: Provider[];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* provide-date-time.ts
|
|
38
|
+
* Provider functions for OwlDateTime in standalone mode
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Provides the core OwlDateTime functionality without any date adapter.
|
|
43
|
+
* You must also provide a date adapter using `provideOwlNativeDateTime()` or `provideOwlUnixTimestampDateTime()`.
|
|
44
|
+
*
|
|
45
|
+
* This includes:
|
|
46
|
+
* - Date time picker internationalization service
|
|
47
|
+
* - Scroll strategy for picker overlay
|
|
48
|
+
* - Dialog service and scroll strategy (for dialog mode)
|
|
49
|
+
* - Default options configuration
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* bootstrapApplication(AppComponent, {
|
|
54
|
+
* providers: [
|
|
55
|
+
* provideOwlDateTime(),
|
|
56
|
+
* provideOwlNativeDateTime()
|
|
57
|
+
* ]
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
declare function provideOwlDateTime(): EnvironmentProviders;
|
|
62
|
+
/**
|
|
63
|
+
* Provides custom options for OwlDateTime.
|
|
64
|
+
* This is optional - default options will be used if not provided.
|
|
65
|
+
*
|
|
66
|
+
* @param options - Custom options for multi-year view configuration
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```typescript
|
|
70
|
+
* bootstrapApplication(AppComponent, {
|
|
71
|
+
* providers: [
|
|
72
|
+
* provideOwlDateTime(),
|
|
73
|
+
* provideOwlNativeDateTime(),
|
|
74
|
+
* provideOwlDateTimeOptions({
|
|
75
|
+
* multiYear: {
|
|
76
|
+
* yearsPerRow: 4,
|
|
77
|
+
* yearRows: 5
|
|
78
|
+
* }
|
|
79
|
+
* })
|
|
80
|
+
* ]
|
|
81
|
+
* });
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
declare function provideOwlDateTimeOptions(options: Partial<Options>): Provider[];
|
|
85
|
+
/**
|
|
86
|
+
* Provides the core OwlDateTime functionality for component-level usage.
|
|
87
|
+
* Returns regular Provider[] instead of EnvironmentProviders, allowing use in @Component({ providers: [] }).
|
|
88
|
+
*
|
|
89
|
+
* Use this when you want to provide OwlDateTime configuration at the component level
|
|
90
|
+
* rather than globally in main.ts.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```typescript
|
|
94
|
+
* @Component({
|
|
95
|
+
* providers: [
|
|
96
|
+
* ...owlDateTimeProviders(),
|
|
97
|
+
* ...owlNativeDateTimeProviders()
|
|
98
|
+
* ]
|
|
99
|
+
* })
|
|
100
|
+
* export class MyPickerComponent { }
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
declare function owlDateTimeProviders(): Provider[];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* date-time-format.class
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
interface OwlDateTimeFormats {
|
|
110
|
+
parseInput: any;
|
|
111
|
+
fullPickerInput: any;
|
|
112
|
+
datePickerInput: any;
|
|
113
|
+
timePickerInput: any;
|
|
114
|
+
monthYearLabel: any;
|
|
115
|
+
dateA11yLabel: any;
|
|
116
|
+
monthYearA11yLabel: any;
|
|
117
|
+
}
|
|
118
|
+
/** InjectionToken for date time picker that can be used to override default format. */
|
|
119
|
+
declare const OWL_DATE_TIME_FORMATS: InjectionToken<OwlDateTimeFormats>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* provide-native-date-time.ts
|
|
123
|
+
* Provider functions for native JavaScript Date adapter
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Provides the native JavaScript Date adapter for OwlDateTime.
|
|
128
|
+
* This includes both the adapter and the default date formats.
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```typescript
|
|
132
|
+
* bootstrapApplication(AppComponent, {
|
|
133
|
+
* providers: [
|
|
134
|
+
* provideOwlDateTime(),
|
|
135
|
+
* provideOwlNativeDateTime()
|
|
136
|
+
* ]
|
|
137
|
+
* });
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
declare function provideOwlNativeDateTime(): EnvironmentProviders;
|
|
141
|
+
/**
|
|
142
|
+
* Provides the native JavaScript Date adapter with custom formats.
|
|
143
|
+
*
|
|
144
|
+
* @param formats - Custom date time formats
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```typescript
|
|
148
|
+
* const customFormats: OwlDateTimeFormats = {
|
|
149
|
+
* parseInput: 'DD/MM/YYYY HH:mm',
|
|
150
|
+
* fullPickerInput: 'DD/MM/YYYY HH:mm:ss',
|
|
151
|
+
* datePickerInput: 'DD/MM/YYYY',
|
|
152
|
+
* timePickerInput: 'HH:mm:ss',
|
|
153
|
+
* monthYearLabel: 'MMM YYYY',
|
|
154
|
+
* dateA11yLabel: 'LL',
|
|
155
|
+
* monthYearA11yLabel: 'MMMM YYYY',
|
|
156
|
+
* };
|
|
157
|
+
*
|
|
158
|
+
* bootstrapApplication(AppComponent, {
|
|
159
|
+
* providers: [
|
|
160
|
+
* provideOwlDateTime(),
|
|
161
|
+
* provideOwlNativeDateTimeWithFormats(customFormats)
|
|
162
|
+
* ]
|
|
163
|
+
* });
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
declare function provideOwlNativeDateTimeWithFormats(formats: OwlDateTimeFormats): EnvironmentProviders;
|
|
167
|
+
/**
|
|
168
|
+
* Provides the native JavaScript Date adapter for component-level usage.
|
|
169
|
+
* Returns regular Provider[] instead of EnvironmentProviders, allowing use in @Component({ providers: [] }).
|
|
170
|
+
*
|
|
171
|
+
* Use this when you want to provide the date adapter at the component level
|
|
172
|
+
* rather than globally in main.ts.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```typescript
|
|
176
|
+
* @Component({
|
|
177
|
+
* providers: [
|
|
178
|
+
* ...owlDateTimeProviders(),
|
|
179
|
+
* ...owlNativeDateTimeProviders()
|
|
180
|
+
* ]
|
|
181
|
+
* })
|
|
182
|
+
* export class MyPickerComponent { }
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
declare function owlNativeDateTimeProviders(): Provider[];
|
|
186
|
+
/**
|
|
187
|
+
* Provides the native JavaScript Date adapter with custom formats for component-level usage.
|
|
188
|
+
* Returns regular Provider[] instead of EnvironmentProviders, allowing use in @Component({ providers: [] }).
|
|
189
|
+
*
|
|
190
|
+
* @param formats - Custom date time formats
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```typescript
|
|
194
|
+
* const customFormats: OwlDateTimeFormats = {
|
|
195
|
+
* parseInput: 'DD/MM/YYYY HH:mm',
|
|
196
|
+
* fullPickerInput: 'DD/MM/YYYY HH:mm:ss',
|
|
197
|
+
* datePickerInput: 'DD/MM/YYYY',
|
|
198
|
+
* timePickerInput: 'HH:mm:ss',
|
|
199
|
+
* monthYearLabel: 'MMM YYYY',
|
|
200
|
+
* dateA11yLabel: 'LL',
|
|
201
|
+
* monthYearA11yLabel: 'MMMM YYYY',
|
|
202
|
+
* };
|
|
203
|
+
*
|
|
204
|
+
* @Component({
|
|
205
|
+
* providers: [
|
|
206
|
+
* ...owlDateTimeProviders(),
|
|
207
|
+
* ...owlNativeDateTimeProvidersWithFormats(customFormats)
|
|
208
|
+
* ]
|
|
209
|
+
* })
|
|
210
|
+
* export class MyPickerComponent { }
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
declare function owlNativeDateTimeProvidersWithFormats(formats: OwlDateTimeFormats): Provider[];
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* provide-unix-timestamp-date-time.ts
|
|
217
|
+
* Provider functions for Unix timestamp adapter
|
|
218
|
+
*/
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Provides the Unix timestamp adapter for OwlDateTime.
|
|
222
|
+
* This includes both the adapter and the default date formats.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* bootstrapApplication(AppComponent, {
|
|
227
|
+
* providers: [
|
|
228
|
+
* provideOwlDateTime(),
|
|
229
|
+
* provideOwlUnixTimestampDateTime()
|
|
230
|
+
* ]
|
|
231
|
+
* });
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
declare function provideOwlUnixTimestampDateTime(): EnvironmentProviders;
|
|
235
|
+
/**
|
|
236
|
+
* Provides the Unix timestamp adapter with custom formats.
|
|
237
|
+
*
|
|
238
|
+
* @param formats - Custom date time formats
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* ```typescript
|
|
242
|
+
* const customFormats: OwlDateTimeFormats = {
|
|
243
|
+
* parseInput: 'X',
|
|
244
|
+
* fullPickerInput: 'X',
|
|
245
|
+
* datePickerInput: 'X',
|
|
246
|
+
* timePickerInput: 'X',
|
|
247
|
+
* monthYearLabel: 'MMM YYYY',
|
|
248
|
+
* dateA11yLabel: 'LL',
|
|
249
|
+
* monthYearA11yLabel: 'MMMM YYYY',
|
|
250
|
+
* };
|
|
251
|
+
*
|
|
252
|
+
* bootstrapApplication(AppComponent, {
|
|
253
|
+
* providers: [
|
|
254
|
+
* provideOwlDateTime(),
|
|
255
|
+
* provideOwlUnixTimestampDateTimeWithFormats(customFormats)
|
|
256
|
+
* ]
|
|
257
|
+
* });
|
|
258
|
+
* ```
|
|
259
|
+
*/
|
|
260
|
+
declare function provideOwlUnixTimestampDateTimeWithFormats(formats: OwlDateTimeFormats): EnvironmentProviders;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* provide-dialog.ts
|
|
264
|
+
* Provider functions for OwlDialog in standalone mode
|
|
265
|
+
*/
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Provides the OwlDialog service and its dependencies.
|
|
269
|
+
* This is required for dialog mode date-time picker.
|
|
270
|
+
*
|
|
271
|
+
* Note: This is automatically included when using `provideOwlDateTime()`,
|
|
272
|
+
* so you typically don't need to call this separately.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```typescript
|
|
276
|
+
* bootstrapApplication(AppComponent, {
|
|
277
|
+
* providers: [
|
|
278
|
+
* provideOwlDialog()
|
|
279
|
+
* ]
|
|
280
|
+
* });
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
declare function provideOwlDialog(): EnvironmentProviders;
|
|
284
|
+
|
|
285
|
+
interface IDateTimePickerAnimationEvent {
|
|
286
|
+
phaseName: 'start' | 'done';
|
|
287
|
+
toState: 'enter' | 'leave';
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* dialog-config.class
|
|
292
|
+
*/
|
|
293
|
+
|
|
294
|
+
/** Possible overrides for a dialog's position. */
|
|
295
|
+
interface DialogPosition {
|
|
296
|
+
/** Override for the dialog's top position. */
|
|
297
|
+
top?: string;
|
|
298
|
+
/** Override for the dialog's bottom position. */
|
|
299
|
+
bottom?: string;
|
|
300
|
+
/** Override for the dialog's left position. */
|
|
301
|
+
left?: string;
|
|
302
|
+
/** Override for the dialog's right position. */
|
|
303
|
+
right?: string;
|
|
304
|
+
}
|
|
305
|
+
interface OwlDialogConfigInterface {
|
|
306
|
+
/**
|
|
307
|
+
* ID of the element that describes the dialog.
|
|
308
|
+
*/
|
|
309
|
+
ariaDescribedBy?: string | null;
|
|
310
|
+
/**
|
|
311
|
+
* Whether to focus the dialog when the dialog is opened
|
|
312
|
+
*/
|
|
313
|
+
autoFocus?: boolean;
|
|
314
|
+
/** Whether the dialog has a backdrop. */
|
|
315
|
+
hasBackdrop?: boolean;
|
|
316
|
+
/**
|
|
317
|
+
* Custom style for the backdrop
|
|
318
|
+
* */
|
|
319
|
+
backdropStyle?: any;
|
|
320
|
+
/** Data being injected into the child component. */
|
|
321
|
+
data?: any;
|
|
322
|
+
/** Whether the user can use escape or clicking outside to close a modal. */
|
|
323
|
+
disableClose?: boolean;
|
|
324
|
+
/**
|
|
325
|
+
* ID for the modal. If omitted, a unique one will be generated.
|
|
326
|
+
*/
|
|
327
|
+
id?: string;
|
|
328
|
+
/**
|
|
329
|
+
* The ARIA role of the dialog element.
|
|
330
|
+
*/
|
|
331
|
+
role?: 'dialog' | 'alertdialog';
|
|
332
|
+
/**
|
|
333
|
+
* Custom class for the pane
|
|
334
|
+
* */
|
|
335
|
+
paneClass?: string | string[];
|
|
336
|
+
/**
|
|
337
|
+
* Mouse Event
|
|
338
|
+
* */
|
|
339
|
+
event?: MouseEvent;
|
|
340
|
+
/**
|
|
341
|
+
* Custom class for the backdrop
|
|
342
|
+
* */
|
|
343
|
+
backdropClass?: string | string[];
|
|
344
|
+
/**
|
|
345
|
+
* Whether the dialog should close when the user goes backwards/forwards in history.
|
|
346
|
+
* */
|
|
347
|
+
closeOnNavigation?: boolean;
|
|
348
|
+
/** Width of the dialog. */
|
|
349
|
+
width?: string;
|
|
350
|
+
/** Height of the dialog. */
|
|
351
|
+
height?: string;
|
|
352
|
+
/**
|
|
353
|
+
* The min-width of the overlay panel.
|
|
354
|
+
* If a number is provided, pixel units are assumed.
|
|
355
|
+
* */
|
|
356
|
+
minWidth?: number | string;
|
|
357
|
+
/**
|
|
358
|
+
* The min-height of the overlay panel.
|
|
359
|
+
* If a number is provided, pixel units are assumed.
|
|
360
|
+
* */
|
|
361
|
+
minHeight?: number | string;
|
|
362
|
+
/**
|
|
363
|
+
* The max-width of the overlay panel.
|
|
364
|
+
* If a number is provided, pixel units are assumed.
|
|
365
|
+
* */
|
|
366
|
+
maxWidth?: number | string;
|
|
367
|
+
/**
|
|
368
|
+
* The max-height of the overlay panel.
|
|
369
|
+
* If a number is provided, pixel units are assumed.
|
|
370
|
+
* */
|
|
371
|
+
maxHeight?: number | string;
|
|
372
|
+
/** Position overrides. */
|
|
373
|
+
position?: DialogPosition;
|
|
374
|
+
/**
|
|
375
|
+
* The scroll strategy when the dialog is open
|
|
376
|
+
* Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies
|
|
377
|
+
* */
|
|
378
|
+
scrollStrategy?: ScrollStrategy;
|
|
379
|
+
viewContainerRef?: ViewContainerRef;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
declare class OwlDialogContainerComponent extends BasePortalOutlet implements OnInit {
|
|
383
|
+
private changeDetector;
|
|
384
|
+
private elementRef;
|
|
385
|
+
private focusTrapFactory;
|
|
386
|
+
private document;
|
|
387
|
+
portalOutlet: CdkPortalOutlet | null;
|
|
388
|
+
/** The class that traps and manages focus within the dialog. */
|
|
389
|
+
private focusTrap;
|
|
390
|
+
/** ID of the element that should be considered as the dialog's label. */
|
|
391
|
+
ariaLabelledBy: string | null;
|
|
392
|
+
/** Emits when an animation state changes. */
|
|
393
|
+
animationStateChanged: EventEmitter<IDateTimePickerAnimationEvent>;
|
|
394
|
+
isAnimating: _angular_core.WritableSignal<boolean>;
|
|
395
|
+
private _config;
|
|
396
|
+
private _component;
|
|
397
|
+
get config(): OwlDialogConfigInterface;
|
|
398
|
+
private params;
|
|
399
|
+
private elementFocusedBeforeDialogWasOpened;
|
|
400
|
+
get owlDialogContainerClass(): boolean;
|
|
401
|
+
get owlDialogContainerTabIndex(): number;
|
|
402
|
+
get owlDialogContainerId(): string;
|
|
403
|
+
get owlDialogContainerRole(): string;
|
|
404
|
+
get owlDialogContainerAriaLabelledby(): string;
|
|
405
|
+
get owlDialogContainerAriaDescribedby(): string;
|
|
406
|
+
ngOnInit(): void;
|
|
407
|
+
/**
|
|
408
|
+
* Attach a ComponentPortal as content to this dialog container.
|
|
409
|
+
*/
|
|
410
|
+
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
|
411
|
+
attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
|
|
412
|
+
setConfig(config: OwlDialogConfigInterface): void;
|
|
413
|
+
onAnimationStart(event: IDateTimePickerAnimationEvent): void;
|
|
414
|
+
onAnimationDone(event: IDateTimePickerAnimationEvent): void;
|
|
415
|
+
startExitAnimation(): void;
|
|
416
|
+
/**
|
|
417
|
+
* Calculate origin used in the `zoomFadeInFrom()`
|
|
418
|
+
* for animation purpose
|
|
419
|
+
*/
|
|
420
|
+
private calculateZoomOrigin;
|
|
421
|
+
/**
|
|
422
|
+
* Save the focused element before dialog was open
|
|
423
|
+
*/
|
|
424
|
+
private savePreviouslyFocusedElement;
|
|
425
|
+
private trapFocus;
|
|
426
|
+
private restoreFocus;
|
|
427
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlDialogContainerComponent, never>;
|
|
428
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OwlDialogContainerComponent, "owl-dialog-container", never, {}, {}, never, never, true, never>;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* @deprecated Use `provideOwlDialog()` instead. This module will be removed in v21.0.0.
|
|
433
|
+
* Note: Dialog providers are automatically included in `provideOwlDateTime()`.
|
|
434
|
+
*
|
|
435
|
+
* Migration guide:
|
|
436
|
+
* ```typescript
|
|
437
|
+
* // Before:
|
|
438
|
+
* import { OwlDialogModule } from '@dintecom/ngx-datetime-picker';
|
|
439
|
+
* @NgModule({ imports: [OwlDialogModule] })
|
|
440
|
+
*
|
|
441
|
+
* // After (if using separately):
|
|
442
|
+
* import { provideOwlDialog } from '@dintecom/ngx-datetime-picker';
|
|
443
|
+
* providers: [provideOwlDialog()]
|
|
444
|
+
*
|
|
445
|
+
* // Or just use provideOwlDateTime() which includes it:
|
|
446
|
+
* import { provideOwlDateTime } from '@dintecom/ngx-datetime-picker';
|
|
447
|
+
* providers: [provideOwlDateTime()]
|
|
448
|
+
* ```
|
|
449
|
+
*/
|
|
450
|
+
declare class OwlDialogModule {
|
|
451
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlDialogModule, never>;
|
|
452
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<OwlDialogModule, never, [typeof i1.CommonModule, typeof i2.A11yModule, typeof i3.OverlayModule, typeof i4.PortalModule, typeof OwlDialogContainerComponent], never>;
|
|
453
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<OwlDialogModule>;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* date-time-adapter.class
|
|
458
|
+
*/
|
|
459
|
+
|
|
460
|
+
/** InjectionToken for date time picker that can be used to override default locale code. */
|
|
461
|
+
declare const OWL_DATE_TIME_LOCALE: InjectionToken<string>;
|
|
462
|
+
/** Provider for OWL_DATE_TIME_LOCALE injection token. */
|
|
463
|
+
declare const OWL_DATE_TIME_LOCALE_PROVIDER: {
|
|
464
|
+
provide: InjectionToken<string>;
|
|
465
|
+
useExisting: InjectionToken<string>;
|
|
466
|
+
};
|
|
467
|
+
declare abstract class DateTimeAdapter<T> {
|
|
468
|
+
/** The locale to use for all dates. */
|
|
469
|
+
protected locale: any;
|
|
470
|
+
/** A stream that emits when the locale changes. */
|
|
471
|
+
protected _localeChanges: Subject<string>;
|
|
472
|
+
get localeChanges(): Observable<string>;
|
|
473
|
+
firstMonthOfTheYear: number;
|
|
474
|
+
firstDayOfTheWeek: number;
|
|
475
|
+
/** total milliseconds in a day. */
|
|
476
|
+
protected readonly millisecondsInDay = 86400000;
|
|
477
|
+
/** total milliseconds in a minute. */
|
|
478
|
+
protected readonly milliseondsInMinute = 60000;
|
|
479
|
+
/**
|
|
480
|
+
* Get the year of the given date
|
|
481
|
+
*/
|
|
482
|
+
abstract getYear(date: T): number;
|
|
483
|
+
/**
|
|
484
|
+
* Get the month of the given date
|
|
485
|
+
* 0 -- January
|
|
486
|
+
* 11 -- December
|
|
487
|
+
* */
|
|
488
|
+
abstract getMonth(date: T): number;
|
|
489
|
+
/**
|
|
490
|
+
* Get the day of the week of the given date
|
|
491
|
+
* 0 -- Sunday
|
|
492
|
+
* 6 -- Saturday
|
|
493
|
+
* */
|
|
494
|
+
abstract getDay(date: T): number;
|
|
495
|
+
/**
|
|
496
|
+
* Get the day num of the given date
|
|
497
|
+
*/
|
|
498
|
+
abstract getDate(date: T): number;
|
|
499
|
+
/**
|
|
500
|
+
* Get the hours of the given date
|
|
501
|
+
*/
|
|
502
|
+
abstract getHours(date: T): number;
|
|
503
|
+
/**
|
|
504
|
+
* Get the minutes of the given date
|
|
505
|
+
*/
|
|
506
|
+
abstract getMinutes(date: T): number;
|
|
507
|
+
/**
|
|
508
|
+
* Get the seconds of the given date
|
|
509
|
+
*/
|
|
510
|
+
abstract getSeconds(date: T): number;
|
|
511
|
+
/**
|
|
512
|
+
* Get the milliseconds timestamp of the given date
|
|
513
|
+
*/
|
|
514
|
+
abstract getTime(date: T): number;
|
|
515
|
+
/**
|
|
516
|
+
* Gets the number of days in the month of the given date.
|
|
517
|
+
*/
|
|
518
|
+
abstract getNumDaysInMonth(date: T): number;
|
|
519
|
+
/**
|
|
520
|
+
* Get the number of calendar days between the given dates.
|
|
521
|
+
* If dateLeft is before dateRight, it would return positive value
|
|
522
|
+
* If dateLeft is after dateRight, it would return negative value
|
|
523
|
+
*/
|
|
524
|
+
abstract differenceInCalendarDays(dateLeft: T, dateRight: T): number;
|
|
525
|
+
/**
|
|
526
|
+
* Gets the name for the year of the given date.
|
|
527
|
+
*/
|
|
528
|
+
abstract getYearName(date: T): string;
|
|
529
|
+
/**
|
|
530
|
+
* Get a list of month names
|
|
531
|
+
*/
|
|
532
|
+
abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
|
|
533
|
+
/**
|
|
534
|
+
* Get a list of week names
|
|
535
|
+
*/
|
|
536
|
+
abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
|
|
537
|
+
/**
|
|
538
|
+
* Gets a list of names for the dates of the month.
|
|
539
|
+
*/
|
|
540
|
+
abstract getDateNames(): string[];
|
|
541
|
+
/**
|
|
542
|
+
* Return a Date object as a string, using the ISO standard
|
|
543
|
+
*/
|
|
544
|
+
abstract toIso8601(date: T): string;
|
|
545
|
+
/**
|
|
546
|
+
* Check if the give dates are equal
|
|
547
|
+
*/
|
|
548
|
+
abstract isEqual(dateLeft: T, dateRight: T): boolean;
|
|
549
|
+
/**
|
|
550
|
+
* Check if the give dates are the same day
|
|
551
|
+
*/
|
|
552
|
+
abstract isSameDay(dateLeft: T, dateRight: T): boolean;
|
|
553
|
+
/**
|
|
554
|
+
* Checks whether the given date is valid.
|
|
555
|
+
*/
|
|
556
|
+
abstract isValid(date: T): boolean;
|
|
557
|
+
/**
|
|
558
|
+
* Gets date instance that is not valid.
|
|
559
|
+
*/
|
|
560
|
+
abstract invalid(): T;
|
|
561
|
+
/**
|
|
562
|
+
* Checks whether the given object is considered a date instance by this DateTimeAdapter.
|
|
563
|
+
*/
|
|
564
|
+
abstract isDateInstance(obj: any): boolean;
|
|
565
|
+
/**
|
|
566
|
+
* Add the specified number of years to the given date
|
|
567
|
+
*/
|
|
568
|
+
abstract addCalendarYears(date: T, amount: number): T;
|
|
569
|
+
/**
|
|
570
|
+
* Add the specified number of months to the given date
|
|
571
|
+
*/
|
|
572
|
+
abstract addCalendarMonths(date: T, amount: number): T;
|
|
573
|
+
/**
|
|
574
|
+
* Add the specified number of days to the given date
|
|
575
|
+
*/
|
|
576
|
+
abstract addCalendarDays(date: T, amount: number): T;
|
|
577
|
+
/**
|
|
578
|
+
* Set the hours to the given date.
|
|
579
|
+
*/
|
|
580
|
+
abstract setHours(date: T, amount: number): T;
|
|
581
|
+
/**
|
|
582
|
+
* Set the minutes to the given date.
|
|
583
|
+
*/
|
|
584
|
+
abstract setMinutes(date: T, amount: number): T;
|
|
585
|
+
/**
|
|
586
|
+
* Set the seconds to the given date.
|
|
587
|
+
*/
|
|
588
|
+
abstract setSeconds(date: T, amount: number): T;
|
|
589
|
+
/**
|
|
590
|
+
* Creates a date with the given year, month, date, hour, minute and second. Does not allow over/under-flow of the
|
|
591
|
+
* month and date.
|
|
592
|
+
*/
|
|
593
|
+
abstract createDate(year: number, month: number, date: number): T;
|
|
594
|
+
abstract createDate(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): T;
|
|
595
|
+
/**
|
|
596
|
+
* Clone the given date
|
|
597
|
+
*/
|
|
598
|
+
abstract clone(date: T): T;
|
|
599
|
+
/**
|
|
600
|
+
* Get a new moment
|
|
601
|
+
* */
|
|
602
|
+
abstract now(): T;
|
|
603
|
+
/**
|
|
604
|
+
* Formats a date as a string according to the given format.
|
|
605
|
+
*/
|
|
606
|
+
abstract format(date: T, displayFormat: any): string;
|
|
607
|
+
/**
|
|
608
|
+
* Parse a user-provided value to a Date Object
|
|
609
|
+
*/
|
|
610
|
+
abstract parse(value: any, parseFormat: any): T | null;
|
|
611
|
+
/**
|
|
612
|
+
* Compare two given dates
|
|
613
|
+
* 1 if the first date is after the second,
|
|
614
|
+
* -1 if the first date is before the second
|
|
615
|
+
* 0 if dates are equal.
|
|
616
|
+
* */
|
|
617
|
+
compare(first: T, second: T): number;
|
|
618
|
+
/**
|
|
619
|
+
* Check if two given dates are in the same year
|
|
620
|
+
* 1 if the first date's year is after the second,
|
|
621
|
+
* -1 if the first date's year is before the second
|
|
622
|
+
* 0 if two given dates are in the same year
|
|
623
|
+
* */
|
|
624
|
+
compareYear(first: T, second: T): number;
|
|
625
|
+
/**
|
|
626
|
+
* Attempts to deserialize a value to a valid date object. This is different from parsing in that
|
|
627
|
+
* deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
|
|
628
|
+
* string). The default implementation does not allow any deserialization, it simply checks that
|
|
629
|
+
* the given value is already a valid date object or null. The `<mat-datepicker>` will call this
|
|
630
|
+
* method on all of it's `@Input()` properties that accept dates. It is therefore possible to
|
|
631
|
+
* support passing values from your backend directly to these properties by overriding this method
|
|
632
|
+
* to also deserialize the format used by your backend.
|
|
633
|
+
*/
|
|
634
|
+
deserialize(value: any): T | null;
|
|
635
|
+
/**
|
|
636
|
+
* Sets the locale used for all dates.
|
|
637
|
+
*/
|
|
638
|
+
setLocale(locale: string): void;
|
|
639
|
+
/**
|
|
640
|
+
* Get the locale used for all dates.
|
|
641
|
+
* */
|
|
642
|
+
getLocale(): any;
|
|
643
|
+
/**
|
|
644
|
+
* Clamp the given date between min and max dates.
|
|
645
|
+
*/
|
|
646
|
+
clampDate(date: T, min?: T | null, max?: T | null): T;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
type PickerType = 'both' | 'calendar' | 'timer';
|
|
650
|
+
type PickerMode = 'popup' | 'dialog' | 'inline';
|
|
651
|
+
type SelectMode = 'single' | 'range' | 'rangeFrom' | 'rangeTo';
|
|
652
|
+
declare enum DateView {
|
|
653
|
+
MONTH = "month",
|
|
654
|
+
YEAR = "year",
|
|
655
|
+
MULTI_YEARS = "multi-years"
|
|
656
|
+
}
|
|
657
|
+
type DateViewType = DateView.MONTH | DateView.YEAR | DateView.MULTI_YEARS;
|
|
658
|
+
declare abstract class OwlDateTime<T> {
|
|
659
|
+
protected dateTimeAdapter: DateTimeAdapter<T>;
|
|
660
|
+
protected dateTimeFormats: OwlDateTimeFormats;
|
|
661
|
+
/**
|
|
662
|
+
* Whether to show the second's timer
|
|
663
|
+
*/
|
|
664
|
+
private _showSecondsTimer;
|
|
665
|
+
get showSecondsTimer(): boolean;
|
|
666
|
+
set showSecondsTimer(val: boolean);
|
|
667
|
+
/**
|
|
668
|
+
* Whether the timer is in hour12 format
|
|
669
|
+
*/
|
|
670
|
+
private _hour12Timer;
|
|
671
|
+
get hour12Timer(): boolean;
|
|
672
|
+
set hour12Timer(val: boolean);
|
|
673
|
+
/**
|
|
674
|
+
* The view that the calendar should start in.
|
|
675
|
+
*/
|
|
676
|
+
readonly startView: _angular_core.InputSignal<DateViewType>;
|
|
677
|
+
/**
|
|
678
|
+
* Whether to show calendar weeks in the calendar
|
|
679
|
+
* */
|
|
680
|
+
readonly showCalendarWeeks: _angular_core.InputSignal<boolean>;
|
|
681
|
+
/**
|
|
682
|
+
* Whether to should only the year and multi-year views.
|
|
683
|
+
*/
|
|
684
|
+
readonly yearOnly: _angular_core.InputSignal<boolean>;
|
|
685
|
+
/**
|
|
686
|
+
* Whether to should only the multi-year view.
|
|
687
|
+
*/
|
|
688
|
+
readonly multiyearOnly: _angular_core.InputSignal<boolean>;
|
|
689
|
+
/**
|
|
690
|
+
* Hours to change per step
|
|
691
|
+
*/
|
|
692
|
+
private _stepHour;
|
|
693
|
+
get stepHour(): number;
|
|
694
|
+
set stepHour(val: number);
|
|
695
|
+
/**
|
|
696
|
+
* Minutes to change per step
|
|
697
|
+
*/
|
|
698
|
+
private _stepMinute;
|
|
699
|
+
get stepMinute(): number;
|
|
700
|
+
set stepMinute(val: number);
|
|
701
|
+
/**
|
|
702
|
+
* Seconds to change per step
|
|
703
|
+
*/
|
|
704
|
+
private _stepSecond;
|
|
705
|
+
get stepSecond(): number;
|
|
706
|
+
set stepSecond(val: number);
|
|
707
|
+
/**
|
|
708
|
+
* Set the first day of week
|
|
709
|
+
*/
|
|
710
|
+
private _firstDayOfWeek;
|
|
711
|
+
get firstDayOfWeek(): number;
|
|
712
|
+
set firstDayOfWeek(value: number);
|
|
713
|
+
/**
|
|
714
|
+
* Whether to hide dates in other months at the start or end of the current month.
|
|
715
|
+
*/
|
|
716
|
+
private _hideOtherMonths;
|
|
717
|
+
get hideOtherMonths(): boolean;
|
|
718
|
+
set hideOtherMonths(val: boolean);
|
|
719
|
+
private readonly _id;
|
|
720
|
+
get id(): string;
|
|
721
|
+
abstract get selected(): T | null;
|
|
722
|
+
abstract get selecteds(): T[] | null;
|
|
723
|
+
abstract get dateTimeFilter(): (date: T | null) => boolean;
|
|
724
|
+
abstract get maxDateTime(): T | null;
|
|
725
|
+
abstract get minDateTime(): T | null;
|
|
726
|
+
abstract get selectMode(): SelectMode;
|
|
727
|
+
abstract get startAt(): T | null;
|
|
728
|
+
abstract get endAt(): T | null;
|
|
729
|
+
abstract get opened(): boolean;
|
|
730
|
+
abstract get pickerMode(): PickerMode;
|
|
731
|
+
abstract get pickerType(): PickerType;
|
|
732
|
+
abstract get isInSingleMode(): boolean;
|
|
733
|
+
abstract get isInRangeMode(): boolean;
|
|
734
|
+
abstract select(date: T | T[]): void;
|
|
735
|
+
abstract yearSelected: OutputEmitterRef<T>;
|
|
736
|
+
abstract monthSelected: OutputEmitterRef<T>;
|
|
737
|
+
abstract dateSelected: OutputEmitterRef<T>;
|
|
738
|
+
abstract selectYear(normalizedYear: T): void;
|
|
739
|
+
abstract selectMonth(normalizedMonth: T): void;
|
|
740
|
+
abstract selectDate(normalizedDate: T): void;
|
|
741
|
+
get formatString(): any;
|
|
742
|
+
/**
|
|
743
|
+
* Date Time Checker to check if the give dateTime is selectable
|
|
744
|
+
*/
|
|
745
|
+
dateTimeChecker: (dateTime: T) => boolean;
|
|
746
|
+
get disabled(): boolean;
|
|
747
|
+
protected constructor(dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: OwlDateTimeFormats);
|
|
748
|
+
protected getValidDate(obj: any): T | null;
|
|
749
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlDateTime<any>, [{ optional: true; }, { optional: true; }]>;
|
|
750
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<OwlDateTime<any>, never, never, { "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "showCalendarWeeks": { "alias": "showCalendarWeeks"; "required": false; "isSignal": true; }; "yearOnly": { "alias": "yearOnly"; "required": false; "isSignal": true; }; "multiyearOnly": { "alias": "multiyearOnly"; "required": false; "isSignal": true; }; "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>;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
declare const OWL_DATETIME_VALUE_ACCESSOR: any;
|
|
754
|
+
declare const OWL_DATETIME_VALIDATORS: any;
|
|
755
|
+
declare class OwlDateTimeInputDirective<T> implements OnInit, AfterContentInit, OnDestroy, ControlValueAccessor, Validator {
|
|
756
|
+
private elmRef;
|
|
757
|
+
private renderer;
|
|
758
|
+
private dateTimeAdapter;
|
|
759
|
+
private dateTimeFormats;
|
|
760
|
+
static ngAcceptInputType_disabled: boolean | '';
|
|
761
|
+
/**
|
|
762
|
+
* Required flag to be used for range of [null, null]
|
|
763
|
+
* */
|
|
764
|
+
private _required;
|
|
765
|
+
get required(): any;
|
|
766
|
+
set required(value: any);
|
|
767
|
+
/**
|
|
768
|
+
* The date time picker that this input is associated with.
|
|
769
|
+
* */
|
|
770
|
+
set owlDateTime(value: OwlDateTimeComponent<T>);
|
|
771
|
+
/**
|
|
772
|
+
* A function to filter date time
|
|
773
|
+
*/
|
|
774
|
+
set owlDateTimeFilter(filter: (date: T | null) => boolean);
|
|
775
|
+
private _dateTimeFilter;
|
|
776
|
+
get dateTimeFilter(): (date: T | null) => boolean;
|
|
777
|
+
/** Whether the date time picker's input is disabled. */
|
|
778
|
+
protected readonly _disabled: _angular_core.ModelSignal<boolean>;
|
|
779
|
+
get disabled(): boolean;
|
|
780
|
+
set disabled(value: boolean);
|
|
781
|
+
/** The minimum valid date. */
|
|
782
|
+
private _min;
|
|
783
|
+
get min(): T | null;
|
|
784
|
+
set min(value: T | null);
|
|
785
|
+
/** The maximum valid date. */
|
|
786
|
+
private _max;
|
|
787
|
+
get max(): T | null;
|
|
788
|
+
set max(value: T | null);
|
|
789
|
+
/**
|
|
790
|
+
* The picker's select mode
|
|
791
|
+
*/
|
|
792
|
+
private _selectMode;
|
|
793
|
+
get selectMode(): SelectMode;
|
|
794
|
+
set selectMode(mode: SelectMode);
|
|
795
|
+
/**
|
|
796
|
+
* The character to separate the 'from' and 'to' in input value
|
|
797
|
+
*/
|
|
798
|
+
readonly rangeSeparator: _angular_core.InputSignal<string>;
|
|
799
|
+
private _value;
|
|
800
|
+
get value(): T | null;
|
|
801
|
+
set value(value: T | null);
|
|
802
|
+
private _values;
|
|
803
|
+
get values(): T[];
|
|
804
|
+
set values(values: T[]);
|
|
805
|
+
/**
|
|
806
|
+
* Callback to invoke when `change` event is fired on this `<input>`
|
|
807
|
+
* */
|
|
808
|
+
readonly dateTimeChange: _angular_core.OutputEmitterRef<any>;
|
|
809
|
+
/**
|
|
810
|
+
* Callback to invoke when an `input` event is fired on this `<input>`.
|
|
811
|
+
* */
|
|
812
|
+
readonly dateTimeInput: _angular_core.OutputEmitterRef<any>;
|
|
813
|
+
get elementRef(): ElementRef;
|
|
814
|
+
get isInSingleMode(): boolean;
|
|
815
|
+
get isInRangeMode(): boolean;
|
|
816
|
+
/** The date-time-picker that this input is associated with. */
|
|
817
|
+
dtPicker: OwlDateTimeComponent<T>;
|
|
818
|
+
private dtPickerSub;
|
|
819
|
+
private localeSub;
|
|
820
|
+
private lastValueValid;
|
|
821
|
+
private onModelChange;
|
|
822
|
+
private onModelTouched;
|
|
823
|
+
private validatorOnChange;
|
|
824
|
+
/** The form control validator for whether the input parses. */
|
|
825
|
+
private parseValidator;
|
|
826
|
+
/** The form control validator for the min date. */
|
|
827
|
+
private minValidator;
|
|
828
|
+
/** The form control validator for the max date. */
|
|
829
|
+
private maxValidator;
|
|
830
|
+
/** The form control validator for the date filter. */
|
|
831
|
+
private filterValidator;
|
|
832
|
+
/**
|
|
833
|
+
* The form control validator for the range.
|
|
834
|
+
* Check whether the 'before' value is before the 'to' value
|
|
835
|
+
* */
|
|
836
|
+
private rangeValidator;
|
|
837
|
+
/**
|
|
838
|
+
* The form control validator for the range when required.
|
|
839
|
+
* Check whether the 'before' and 'to' values are present
|
|
840
|
+
* */
|
|
841
|
+
private requiredRangeValidator;
|
|
842
|
+
/** The combined form control validator for this input. */
|
|
843
|
+
private validator;
|
|
844
|
+
/** Emits when the value changes (either due to user input or programmatic change). */
|
|
845
|
+
valueChange: EventEmitter<T | T[]>;
|
|
846
|
+
/** Emits when the disabled state has changed */
|
|
847
|
+
disabledChange: EventEmitter<boolean>;
|
|
848
|
+
get owlDateTimeInputAriaHaspopup(): boolean;
|
|
849
|
+
get owlDateTimeInputAriaOwns(): string;
|
|
850
|
+
get minIso8601(): string;
|
|
851
|
+
get maxIso8601(): string;
|
|
852
|
+
get owlDateTimeInputDisabled(): boolean;
|
|
853
|
+
constructor();
|
|
854
|
+
ngOnInit(): void;
|
|
855
|
+
ngAfterContentInit(): void;
|
|
856
|
+
ngOnDestroy(): void;
|
|
857
|
+
writeValue(value: any): void;
|
|
858
|
+
registerOnChange(fn: any): void;
|
|
859
|
+
registerOnTouched(fn: any): void;
|
|
860
|
+
setDisabledState(isDisabled: boolean): void;
|
|
861
|
+
validate(c: AbstractControl): {
|
|
862
|
+
[key: string]: any;
|
|
863
|
+
};
|
|
864
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
865
|
+
/**
|
|
866
|
+
* Open the picker when user hold alt + DOWN_ARROW
|
|
867
|
+
* */
|
|
868
|
+
handleKeydownOnHost(event: KeyboardEvent): void;
|
|
869
|
+
handleBlurOnHost(event: Event): void;
|
|
870
|
+
handleInputOnHost(event: any): void;
|
|
871
|
+
handleChangeOnHost(event: any): void;
|
|
872
|
+
/**
|
|
873
|
+
* Set the native input property 'value'
|
|
874
|
+
*/
|
|
875
|
+
formatNativeInputValue(): void;
|
|
876
|
+
/**
|
|
877
|
+
* Register the relationship between this input and its picker component
|
|
878
|
+
*/
|
|
879
|
+
private registerDateTimePicker;
|
|
880
|
+
/**
|
|
881
|
+
* Convert a given obj to a valid date object
|
|
882
|
+
*/
|
|
883
|
+
private getValidDate;
|
|
884
|
+
/**
|
|
885
|
+
* Convert a time string to a date-time string
|
|
886
|
+
* When pickerType is 'timer', the value in the picker's input is a time string.
|
|
887
|
+
* The dateTimeAdapter parse fn could not parse a time string to a Date Object.
|
|
888
|
+
* Therefore we need this fn to convert a time string to a date-time string.
|
|
889
|
+
*/
|
|
890
|
+
private convertTimeStringToDateTimeString;
|
|
891
|
+
/**
|
|
892
|
+
* Handle input change in single mode
|
|
893
|
+
*/
|
|
894
|
+
private changeInputInSingleMode;
|
|
895
|
+
/**
|
|
896
|
+
* Handle input change in rangeFrom or rangeTo mode
|
|
897
|
+
*/
|
|
898
|
+
private changeInputInRangeFromToMode;
|
|
899
|
+
/**
|
|
900
|
+
* Handle input change in range mode
|
|
901
|
+
*/
|
|
902
|
+
private changeInputInRangeMode;
|
|
903
|
+
/**
|
|
904
|
+
* Check if the two value is the same
|
|
905
|
+
*/
|
|
906
|
+
private isSameValue;
|
|
907
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlDateTimeInputDirective<any>, never>;
|
|
908
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<OwlDateTimeInputDirective<any>, "input[owlDateTime]", ["owlDateTimeInput"], { "required": { "alias": "required"; "required": false; }; "owlDateTime": { "alias": "owlDateTime"; "required": false; }; "owlDateTimeFilter": { "alias": "owlDateTimeFilter"; "required": false; }; "_disabled": { "alias": "_disabled"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "rangeSeparator": { "alias": "rangeSeparator"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; }; "values": { "alias": "values"; "required": false; }; }, { "_disabled": "_disabledChange"; "dateTimeChange": "dateTimeChange"; "dateTimeInput": "dateTimeInput"; }, never, never, true, never>;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
declare class OwlDateTimeComponent<T> extends OwlDateTime<T> implements OnInit, OnDestroy {
|
|
912
|
+
overlay: Overlay;
|
|
913
|
+
private viewContainerRef;
|
|
914
|
+
private dialogService;
|
|
915
|
+
private injector;
|
|
916
|
+
protected changeDetector: ChangeDetectorRef;
|
|
917
|
+
private document;
|
|
918
|
+
/** Custom class for the picker backdrop. */
|
|
919
|
+
readonly backdropClass: _angular_core.InputSignal<string | string[]>;
|
|
920
|
+
/** Custom class for the picker overlay pane. */
|
|
921
|
+
readonly panelClass: _angular_core.InputSignal<string | string[]>;
|
|
922
|
+
/** The date to open the calendar to initially. */
|
|
923
|
+
private _startAt;
|
|
924
|
+
get startAt(): T | null;
|
|
925
|
+
set startAt(date: T | null);
|
|
926
|
+
/** The end date to set for range calendar. */
|
|
927
|
+
private _endAt;
|
|
928
|
+
get endAt(): T | null;
|
|
929
|
+
set endAt(date: T | null);
|
|
930
|
+
/**
|
|
931
|
+
* Set the type of the dateTime picker
|
|
932
|
+
* 'both' -- show both calendar and timer
|
|
933
|
+
* 'calendar' -- show only calendar
|
|
934
|
+
* 'timer' -- show only timer
|
|
935
|
+
*/
|
|
936
|
+
private _pickerType;
|
|
937
|
+
get pickerType(): PickerType;
|
|
938
|
+
set pickerType(val: PickerType);
|
|
939
|
+
/**
|
|
940
|
+
* Whether the picker open as a dialog
|
|
941
|
+
*/
|
|
942
|
+
_pickerMode: PickerMode;
|
|
943
|
+
get pickerMode(): PickerMode;
|
|
944
|
+
set pickerMode(mode: PickerMode);
|
|
945
|
+
/** Whether the date time picker should be disabled. */
|
|
946
|
+
private _disabled;
|
|
947
|
+
get disabled(): boolean;
|
|
948
|
+
set disabled(value: boolean);
|
|
949
|
+
/** Whether the calendar is open. */
|
|
950
|
+
private _opened;
|
|
951
|
+
get opened(): boolean;
|
|
952
|
+
set opened(val: boolean);
|
|
953
|
+
/**
|
|
954
|
+
* The scroll strategy when the picker is open
|
|
955
|
+
* Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies
|
|
956
|
+
* */
|
|
957
|
+
readonly scrollStrategy: _angular_core.InputSignal<ScrollStrategy>;
|
|
958
|
+
/**
|
|
959
|
+
* Callback when the picker is closed
|
|
960
|
+
* */
|
|
961
|
+
readonly afterPickerClosed: _angular_core.OutputEmitterRef<any>;
|
|
962
|
+
/**
|
|
963
|
+
* Callback before the picker is open
|
|
964
|
+
* */
|
|
965
|
+
readonly beforePickerOpen: _angular_core.OutputEmitterRef<any>;
|
|
966
|
+
/**
|
|
967
|
+
* Callback when the picker is open
|
|
968
|
+
* */
|
|
969
|
+
readonly afterPickerOpen: _angular_core.OutputEmitterRef<any>;
|
|
970
|
+
/**
|
|
971
|
+
* Emits selected year in multi-year view
|
|
972
|
+
* This doesn't imply a change on the selected date.
|
|
973
|
+
* */
|
|
974
|
+
readonly yearSelected: _angular_core.OutputEmitterRef<T>;
|
|
975
|
+
/**
|
|
976
|
+
* Emits selected month in year view
|
|
977
|
+
* This doesn't imply a change on the selected date.
|
|
978
|
+
* */
|
|
979
|
+
readonly monthSelected: _angular_core.OutputEmitterRef<T>;
|
|
980
|
+
/**
|
|
981
|
+
* Emits selected date
|
|
982
|
+
* */
|
|
983
|
+
readonly dateSelected: _angular_core.OutputEmitterRef<T>;
|
|
984
|
+
/**
|
|
985
|
+
* Emit when the selected value has been confirmed
|
|
986
|
+
* */
|
|
987
|
+
confirmSelectedChange: EventEmitter<T | T[]>;
|
|
988
|
+
/**
|
|
989
|
+
* Emits when the date time picker is disabled.
|
|
990
|
+
* */
|
|
991
|
+
disabledChange: EventEmitter<boolean>;
|
|
992
|
+
private pickerContainerPortal;
|
|
993
|
+
private pickerContainer;
|
|
994
|
+
private popupRef;
|
|
995
|
+
private dialogRef;
|
|
996
|
+
private dtInputSub;
|
|
997
|
+
private hidePickerStreamSub;
|
|
998
|
+
private confirmSelectedStreamSub;
|
|
999
|
+
private pickerOpenedStreamSub;
|
|
1000
|
+
private pickerBeforeOpenedStreamSub;
|
|
1001
|
+
private dialogEventsSub;
|
|
1002
|
+
/** Pending async close (focus-restore path); cleared on destroy. */
|
|
1003
|
+
private closeTimer;
|
|
1004
|
+
/** The element that was focused before the date time picker was opened. */
|
|
1005
|
+
private focusedElementBeforeOpen;
|
|
1006
|
+
private _dtInput;
|
|
1007
|
+
get dtInput(): OwlDateTimeInputDirective<T>;
|
|
1008
|
+
private _selected;
|
|
1009
|
+
get selected(): T | null;
|
|
1010
|
+
set selected(value: T | null);
|
|
1011
|
+
private _selecteds;
|
|
1012
|
+
get selecteds(): T[];
|
|
1013
|
+
set selecteds(values: T[]);
|
|
1014
|
+
/** The minimum selectable date. */
|
|
1015
|
+
get minDateTime(): T | null;
|
|
1016
|
+
/** The maximum selectable date. */
|
|
1017
|
+
get maxDateTime(): T | null;
|
|
1018
|
+
get dateTimeFilter(): (date: T | null) => boolean;
|
|
1019
|
+
get selectMode(): SelectMode;
|
|
1020
|
+
get isInSingleMode(): boolean;
|
|
1021
|
+
get isInRangeMode(): boolean;
|
|
1022
|
+
private readonly defaultScrollStrategy;
|
|
1023
|
+
constructor();
|
|
1024
|
+
ngOnInit(): void;
|
|
1025
|
+
ngOnDestroy(): void;
|
|
1026
|
+
registerInput(input: OwlDateTimeInputDirective<T>): void;
|
|
1027
|
+
open(): void;
|
|
1028
|
+
/**
|
|
1029
|
+
* Selects the given date
|
|
1030
|
+
*/
|
|
1031
|
+
select(date: T[] | T): void;
|
|
1032
|
+
/**
|
|
1033
|
+
* Emits the selected year in multi-year view
|
|
1034
|
+
* */
|
|
1035
|
+
selectYear(normalizedYear: T): void;
|
|
1036
|
+
/**
|
|
1037
|
+
* Emits selected month in year view
|
|
1038
|
+
* */
|
|
1039
|
+
selectMonth(normalizedMonth: T): void;
|
|
1040
|
+
/**
|
|
1041
|
+
* Emits the selected date
|
|
1042
|
+
* */
|
|
1043
|
+
selectDate(normalizedDate: T): void;
|
|
1044
|
+
/**
|
|
1045
|
+
* Hide the picker
|
|
1046
|
+
*/
|
|
1047
|
+
close(): void;
|
|
1048
|
+
/**
|
|
1049
|
+
* Release the overlay/dialog and the container stream subscriptions. Shared
|
|
1050
|
+
* by close() and ngOnDestroy(); does not emit any lifecycle event itself.
|
|
1051
|
+
*/
|
|
1052
|
+
private disposeOverlayResources;
|
|
1053
|
+
/**
|
|
1054
|
+
* Confirm the selected value
|
|
1055
|
+
*/
|
|
1056
|
+
confirmSelect(event?: any): void;
|
|
1057
|
+
/**
|
|
1058
|
+
* Open the picker as a dialog
|
|
1059
|
+
*/
|
|
1060
|
+
private openAsDialog;
|
|
1061
|
+
/**
|
|
1062
|
+
* Open the picker as popup
|
|
1063
|
+
*/
|
|
1064
|
+
private openAsPopup;
|
|
1065
|
+
private createPopup;
|
|
1066
|
+
/**
|
|
1067
|
+
* Create the popup PositionStrategy.
|
|
1068
|
+
* */
|
|
1069
|
+
private createPopupPositionStrategy;
|
|
1070
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlDateTimeComponent<any>, never>;
|
|
1071
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OwlDateTimeComponent<any>, "owl-date-time", ["owlDateTime"], { "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; }; "endAt": { "alias": "endAt"; "required": false; }; "pickerType": { "alias": "pickerType"; "required": false; }; "pickerMode": { "alias": "pickerMode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "scrollStrategy": { "alias": "scrollStrategy"; "required": false; "isSignal": true; }; }, { "afterPickerClosed": "afterPickerClosed"; "beforePickerOpen": "beforePickerOpen"; "afterPickerOpen": "afterPickerOpen"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "dateSelected": "dateSelected"; }, never, never, true, never>;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
declare class OwlDateTimeTriggerDirective<T> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
|
|
1075
|
+
protected changeDetector: ChangeDetectorRef;
|
|
1076
|
+
readonly dtPicker: _angular_core.InputSignal<OwlDateTimeComponent<T>>;
|
|
1077
|
+
private _disabled;
|
|
1078
|
+
get disabled(): boolean;
|
|
1079
|
+
set disabled(value: boolean);
|
|
1080
|
+
get owlDTTriggerDisabledClass(): boolean;
|
|
1081
|
+
private stateChanges;
|
|
1082
|
+
ngOnInit(): void;
|
|
1083
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1084
|
+
ngAfterContentInit(): void;
|
|
1085
|
+
ngOnDestroy(): void;
|
|
1086
|
+
handleClickOnHost(event: Event): void;
|
|
1087
|
+
private watchStateChanges;
|
|
1088
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlDateTimeTriggerDirective<any>, never>;
|
|
1089
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<OwlDateTimeTriggerDirective<any>, "[owlDateTimeTrigger]", never, { "dtPicker": { "alias": "owlDateTimeTrigger"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
declare class OwlCalendarComponent<T> implements OnInit, AfterContentInit, AfterViewChecked, OnDestroy {
|
|
1093
|
+
private elmRef;
|
|
1094
|
+
private pickerIntl;
|
|
1095
|
+
private injector;
|
|
1096
|
+
private cdRef;
|
|
1097
|
+
private dateTimeAdapter;
|
|
1098
|
+
private dateTimeFormats;
|
|
1099
|
+
DateView: typeof DateView;
|
|
1100
|
+
get minDate(): T | null;
|
|
1101
|
+
set minDate(value: T | null);
|
|
1102
|
+
get maxDate(): T | null;
|
|
1103
|
+
set maxDate(value: T | null);
|
|
1104
|
+
get pickerMoment(): T;
|
|
1105
|
+
set pickerMoment(value: T);
|
|
1106
|
+
get selected(): T | null;
|
|
1107
|
+
set selected(value: T | null);
|
|
1108
|
+
get selecteds(): T[];
|
|
1109
|
+
set selecteds(values: T[]);
|
|
1110
|
+
get periodButtonText(): string;
|
|
1111
|
+
get periodButtonLabel(): string;
|
|
1112
|
+
get prevButtonLabel(): string;
|
|
1113
|
+
get nextButtonLabel(): string;
|
|
1114
|
+
get currentView(): DateViewType;
|
|
1115
|
+
set currentView(view: DateViewType);
|
|
1116
|
+
get isInSingleMode(): boolean;
|
|
1117
|
+
get isInRangeMode(): boolean;
|
|
1118
|
+
get showControlArrows(): boolean;
|
|
1119
|
+
get isMonthView(): boolean;
|
|
1120
|
+
/**
|
|
1121
|
+
* Bind class 'owl-dt-calendar' to host
|
|
1122
|
+
* */
|
|
1123
|
+
get owlDTCalendarClass(): boolean;
|
|
1124
|
+
constructor();
|
|
1125
|
+
/**
|
|
1126
|
+
* Date filter for the month and year view
|
|
1127
|
+
* */
|
|
1128
|
+
readonly dateFilter: _angular_core.InputSignal<(date: T) => boolean>;
|
|
1129
|
+
/**
|
|
1130
|
+
* Set the first day of week
|
|
1131
|
+
*/
|
|
1132
|
+
readonly firstDayOfWeek: _angular_core.InputSignal<number>;
|
|
1133
|
+
/** The minimum selectable date. */
|
|
1134
|
+
private _minDate;
|
|
1135
|
+
/** The maximum selectable date. */
|
|
1136
|
+
private _maxDate;
|
|
1137
|
+
/** The current picker moment */
|
|
1138
|
+
private _pickerMoment;
|
|
1139
|
+
readonly selectMode: _angular_core.InputSignal<SelectMode>;
|
|
1140
|
+
/** The currently selected moment. */
|
|
1141
|
+
private _selected;
|
|
1142
|
+
private _selecteds;
|
|
1143
|
+
/**
|
|
1144
|
+
* The view that the calendar should start in.
|
|
1145
|
+
*/
|
|
1146
|
+
readonly startView: _angular_core.InputSignal<DateViewType>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Whether to should only the year and multi-year views.
|
|
1149
|
+
*/
|
|
1150
|
+
readonly yearOnly: _angular_core.InputSignal<boolean>;
|
|
1151
|
+
/**
|
|
1152
|
+
* Whether to show calendar weeks in the calendar
|
|
1153
|
+
* */
|
|
1154
|
+
readonly showCalendarWeeks: _angular_core.InputSignal<boolean>;
|
|
1155
|
+
/**
|
|
1156
|
+
* Whether to should only the multi-year view.
|
|
1157
|
+
*/
|
|
1158
|
+
readonly multiyearOnly: _angular_core.InputSignal<boolean>;
|
|
1159
|
+
/**
|
|
1160
|
+
* Whether to hide dates in other months at the start or end of the current month.
|
|
1161
|
+
* */
|
|
1162
|
+
readonly hideOtherMonths: _angular_core.InputSignal<boolean>;
|
|
1163
|
+
/** Emits when the currently picker moment changes. */
|
|
1164
|
+
readonly pickerMomentChange: _angular_core.OutputEmitterRef<T>;
|
|
1165
|
+
/** Emits when the selected date changes. */
|
|
1166
|
+
readonly dateClicked: _angular_core.OutputEmitterRef<T>;
|
|
1167
|
+
/** Emits when the currently selected date changes. */
|
|
1168
|
+
readonly selectedChange: _angular_core.OutputEmitterRef<T>;
|
|
1169
|
+
/** Emits when any date is selected. */
|
|
1170
|
+
readonly userSelection: _angular_core.OutputEmitterRef<void>;
|
|
1171
|
+
/**
|
|
1172
|
+
* Emits the selected year. This doesn't imply a change on the selected date
|
|
1173
|
+
* */
|
|
1174
|
+
readonly yearSelected: _angular_core.OutputEmitterRef<T>;
|
|
1175
|
+
/**
|
|
1176
|
+
* Emits the selected month. This doesn't imply a change on the selected date
|
|
1177
|
+
* */
|
|
1178
|
+
readonly monthSelected: _angular_core.OutputEmitterRef<T>;
|
|
1179
|
+
private _currentView;
|
|
1180
|
+
private intlChangesSub;
|
|
1181
|
+
/**
|
|
1182
|
+
* Used for scheduling that focus should be moved to the active cell on the next tick.
|
|
1183
|
+
* We need to schedule it, rather than do it immediately, because we have to wait
|
|
1184
|
+
* for Angular to re-evaluate the view children.
|
|
1185
|
+
*/
|
|
1186
|
+
private moveFocusOnNextTick;
|
|
1187
|
+
/**
|
|
1188
|
+
* Date filter for the month and year view
|
|
1189
|
+
*/
|
|
1190
|
+
dateFilterForViews: (date: T) => boolean;
|
|
1191
|
+
ngOnInit(): void;
|
|
1192
|
+
ngAfterContentInit(): void;
|
|
1193
|
+
ngAfterViewChecked(): void;
|
|
1194
|
+
ngOnDestroy(): void;
|
|
1195
|
+
/**
|
|
1196
|
+
* Toggle between month view and year view
|
|
1197
|
+
*/
|
|
1198
|
+
toggleViews(): void;
|
|
1199
|
+
/**
|
|
1200
|
+
* Handles user clicks on the previous button.
|
|
1201
|
+
* */
|
|
1202
|
+
previousClicked(): void;
|
|
1203
|
+
/**
|
|
1204
|
+
* Handles user clicks on the next button.
|
|
1205
|
+
* */
|
|
1206
|
+
nextClicked(): void;
|
|
1207
|
+
dateSelected(date: T): void;
|
|
1208
|
+
/**
|
|
1209
|
+
* Change the pickerMoment value and switch to a specific view
|
|
1210
|
+
*/
|
|
1211
|
+
goToDateInView(date: T, view: DateViewType): void;
|
|
1212
|
+
/**
|
|
1213
|
+
* Change the pickerMoment value
|
|
1214
|
+
*/
|
|
1215
|
+
handlePickerMomentChange(date: T): void;
|
|
1216
|
+
userSelected(): void;
|
|
1217
|
+
/**
|
|
1218
|
+
* Whether the previous period button is enabled.
|
|
1219
|
+
*/
|
|
1220
|
+
prevButtonEnabled(): boolean;
|
|
1221
|
+
/**
|
|
1222
|
+
* Whether the next period button is enabled.
|
|
1223
|
+
*/
|
|
1224
|
+
nextButtonEnabled(): boolean;
|
|
1225
|
+
/**
|
|
1226
|
+
* Focus to the host element
|
|
1227
|
+
* */
|
|
1228
|
+
focusActiveCell(): void;
|
|
1229
|
+
selectYearInMultiYearView(normalizedYear: T): void;
|
|
1230
|
+
selectMonthInYearView(normalizedMonth: T): void;
|
|
1231
|
+
/**
|
|
1232
|
+
* Whether the two dates represent the same view in the current view mode (month or year).
|
|
1233
|
+
*/
|
|
1234
|
+
private isSameView;
|
|
1235
|
+
/**
|
|
1236
|
+
* Get a valid date object
|
|
1237
|
+
*/
|
|
1238
|
+
private getValidDate;
|
|
1239
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlCalendarComponent<any>, never>;
|
|
1240
|
+
static ɵcmp: _angular_core.ɵɵ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; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "selectMode": { "alias": "selectMode"; "required": false; "isSignal": true; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "yearOnly": { "alias": "yearOnly"; "required": false; "isSignal": true; }; "showCalendarWeeks": { "alias": "showCalendarWeeks"; "required": false; "isSignal": true; }; "multiyearOnly": { "alias": "multiyearOnly"; "required": false; "isSignal": true; }; "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; "isSignal": true; }; }, { "pickerMomentChange": "pickerMomentChange"; "dateClicked": "dateClicked"; "selectedChange": "selectedChange"; "userSelection": "userSelection"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, true, never>;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
declare class OwlTimerComponent<T> implements OnInit {
|
|
1244
|
+
private injector;
|
|
1245
|
+
private elmRef;
|
|
1246
|
+
private pickerIntl;
|
|
1247
|
+
private cdRef;
|
|
1248
|
+
private dateTimeAdapter;
|
|
1249
|
+
/** The current picker moment */
|
|
1250
|
+
private _pickerMoment;
|
|
1251
|
+
get pickerMoment(): T;
|
|
1252
|
+
set pickerMoment(value: T);
|
|
1253
|
+
/** The minimum selectable date time. */
|
|
1254
|
+
private _minDateTime;
|
|
1255
|
+
get minDateTime(): T | null;
|
|
1256
|
+
set minDateTime(value: T | null);
|
|
1257
|
+
/** The maximum selectable date time. */
|
|
1258
|
+
private _maxDateTime;
|
|
1259
|
+
get maxDateTime(): T | null;
|
|
1260
|
+
set maxDateTime(value: T | null);
|
|
1261
|
+
private isPM;
|
|
1262
|
+
/**
|
|
1263
|
+
* Whether to show the second's timer
|
|
1264
|
+
*/
|
|
1265
|
+
readonly showSecondsTimer: _angular_core.InputSignal<boolean>;
|
|
1266
|
+
/**
|
|
1267
|
+
* Whether the timer is in hour12 format
|
|
1268
|
+
*/
|
|
1269
|
+
readonly hour12Timer: _angular_core.InputSignal<boolean>;
|
|
1270
|
+
/**
|
|
1271
|
+
* Hours to change per step
|
|
1272
|
+
*/
|
|
1273
|
+
readonly stepHour: _angular_core.InputSignal<number>;
|
|
1274
|
+
/**
|
|
1275
|
+
* Minutes to change per step
|
|
1276
|
+
*/
|
|
1277
|
+
readonly stepMinute: _angular_core.InputSignal<number>;
|
|
1278
|
+
/**
|
|
1279
|
+
* Seconds to change per step
|
|
1280
|
+
*/
|
|
1281
|
+
readonly stepSecond: _angular_core.InputSignal<number>;
|
|
1282
|
+
get hourValue(): number;
|
|
1283
|
+
/**
|
|
1284
|
+
* The value would be displayed in hourBox.
|
|
1285
|
+
* We need this because the value displayed in hourBox it not
|
|
1286
|
+
* the same as the hourValue when the timer is in hour12Timer mode.
|
|
1287
|
+
* */
|
|
1288
|
+
get hourBoxValue(): number;
|
|
1289
|
+
get minuteValue(): number;
|
|
1290
|
+
get secondValue(): number;
|
|
1291
|
+
get upHourButtonLabel(): string;
|
|
1292
|
+
get downHourButtonLabel(): string;
|
|
1293
|
+
get upMinuteButtonLabel(): string;
|
|
1294
|
+
get downMinuteButtonLabel(): string;
|
|
1295
|
+
get upSecondButtonLabel(): string;
|
|
1296
|
+
get downSecondButtonLabel(): string;
|
|
1297
|
+
get hour12ButtonLabel(): string;
|
|
1298
|
+
readonly selectedChange: _angular_core.OutputEmitterRef<T>;
|
|
1299
|
+
get owlDTTimerClass(): boolean;
|
|
1300
|
+
get owlDTTimeTabIndex(): number;
|
|
1301
|
+
ngOnInit(): void;
|
|
1302
|
+
/**
|
|
1303
|
+
* Focus to the host element
|
|
1304
|
+
* */
|
|
1305
|
+
focus(): void;
|
|
1306
|
+
/**
|
|
1307
|
+
* Set the hour value via typing into timer box input
|
|
1308
|
+
* We need this to handle the hour value when the timer is in hour12 mode
|
|
1309
|
+
* */
|
|
1310
|
+
setHourValueViaInput(hours: number): void;
|
|
1311
|
+
setHourValue(hours: number): void;
|
|
1312
|
+
setMinuteValue(minutes: number): void;
|
|
1313
|
+
setSecondValue(seconds: number): void;
|
|
1314
|
+
setMeridiem(event: any): void;
|
|
1315
|
+
/**
|
|
1316
|
+
* Check if the up hour button is enabled
|
|
1317
|
+
*/
|
|
1318
|
+
upHourEnabled(): boolean;
|
|
1319
|
+
/**
|
|
1320
|
+
* Check if the down hour button is enabled
|
|
1321
|
+
*/
|
|
1322
|
+
downHourEnabled(): boolean;
|
|
1323
|
+
/**
|
|
1324
|
+
* Check if the up minute button is enabled
|
|
1325
|
+
*/
|
|
1326
|
+
upMinuteEnabled(): boolean;
|
|
1327
|
+
/**
|
|
1328
|
+
* Check if the down minute button is enabled
|
|
1329
|
+
*/
|
|
1330
|
+
downMinuteEnabled(): boolean;
|
|
1331
|
+
/**
|
|
1332
|
+
* Check if the up second button is enabled
|
|
1333
|
+
*/
|
|
1334
|
+
upSecondEnabled(): boolean;
|
|
1335
|
+
/**
|
|
1336
|
+
* Check if the down second button is enabled
|
|
1337
|
+
*/
|
|
1338
|
+
downSecondEnabled(): boolean;
|
|
1339
|
+
/**
|
|
1340
|
+
* PickerMoment's hour value +/- certain amount and compare it to the give date
|
|
1341
|
+
* 1 is after the comparedDate
|
|
1342
|
+
* -1 is before the comparedDate
|
|
1343
|
+
* 0 is equal the comparedDate
|
|
1344
|
+
* */
|
|
1345
|
+
private compareHours;
|
|
1346
|
+
/**
|
|
1347
|
+
* PickerMoment's minute value +/- certain amount and compare it to the give date
|
|
1348
|
+
* 1 is after the comparedDate
|
|
1349
|
+
* -1 is before the comparedDate
|
|
1350
|
+
* 0 is equal the comparedDate
|
|
1351
|
+
* */
|
|
1352
|
+
private compareMinutes;
|
|
1353
|
+
/**
|
|
1354
|
+
* PickerMoment's second value +/- certain amount and compare it to the give date
|
|
1355
|
+
* 1 is after the comparedDate
|
|
1356
|
+
* -1 is before the comparedDate
|
|
1357
|
+
* 0 is equal the comparedDate
|
|
1358
|
+
* */
|
|
1359
|
+
private compareSeconds;
|
|
1360
|
+
/**
|
|
1361
|
+
* Get a valid date object
|
|
1362
|
+
*/
|
|
1363
|
+
private getValidDate;
|
|
1364
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlTimerComponent<any>, never>;
|
|
1365
|
+
static ɵcmp: _angular_core.ɵɵ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, true, never>;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
declare class OwlDateTimeContainerComponent<T> implements OnInit, AfterContentInit, AfterViewInit, OnDestroy {
|
|
1369
|
+
private cdRef;
|
|
1370
|
+
private elmRef;
|
|
1371
|
+
private pickerIntl;
|
|
1372
|
+
private dateTimeAdapter;
|
|
1373
|
+
readonly calendar: _angular_core.Signal<OwlCalendarComponent<any>>;
|
|
1374
|
+
readonly timer: _angular_core.Signal<OwlTimerComponent<any>>;
|
|
1375
|
+
picker: OwlDateTime<T>;
|
|
1376
|
+
activeSelectedIndex: number;
|
|
1377
|
+
/** Emits when an animation state changes. */
|
|
1378
|
+
animationStateChanged: EventEmitter<IDateTimePickerAnimationEvent>;
|
|
1379
|
+
private retainStartTime;
|
|
1380
|
+
private retainEndTime;
|
|
1381
|
+
/**
|
|
1382
|
+
* Stream emits when try to hide picker
|
|
1383
|
+
* */
|
|
1384
|
+
private hidePicker$;
|
|
1385
|
+
get hidePickerStream(): Observable<any>;
|
|
1386
|
+
/**
|
|
1387
|
+
* Stream emits when try to confirm the selected value
|
|
1388
|
+
* */
|
|
1389
|
+
private confirmSelected$;
|
|
1390
|
+
get confirmSelectedStream(): Observable<any>;
|
|
1391
|
+
private beforePickerOpened$;
|
|
1392
|
+
get beforePickerOpenedStream(): Observable<any>;
|
|
1393
|
+
private pickerOpened$;
|
|
1394
|
+
get pickerOpenedStream(): Observable<any>;
|
|
1395
|
+
/**
|
|
1396
|
+
* The current picker moment. This determines which time period is shown and which date is
|
|
1397
|
+
* highlighted when using keyboard navigation.
|
|
1398
|
+
*/
|
|
1399
|
+
private _clamPickerMoment;
|
|
1400
|
+
get pickerMoment(): T;
|
|
1401
|
+
set pickerMoment(value: T);
|
|
1402
|
+
get pickerType(): PickerType;
|
|
1403
|
+
get cancelLabel(): string;
|
|
1404
|
+
get setLabel(): string;
|
|
1405
|
+
/**
|
|
1406
|
+
* The range 'from' label
|
|
1407
|
+
* */
|
|
1408
|
+
get fromLabel(): string;
|
|
1409
|
+
/**
|
|
1410
|
+
* The range 'to' label
|
|
1411
|
+
* */
|
|
1412
|
+
get toLabel(): string;
|
|
1413
|
+
/**
|
|
1414
|
+
* The range 'from' formatted value
|
|
1415
|
+
* */
|
|
1416
|
+
get fromFormattedValue(): string;
|
|
1417
|
+
/**
|
|
1418
|
+
* The range 'to' formatted value
|
|
1419
|
+
* */
|
|
1420
|
+
get toFormattedValue(): string;
|
|
1421
|
+
/**
|
|
1422
|
+
* Cases in which the control buttons show in the picker
|
|
1423
|
+
* 1) picker mode is 'dialog'
|
|
1424
|
+
* 2) picker type is NOT 'calendar' and the picker mode is NOT 'inline'
|
|
1425
|
+
* */
|
|
1426
|
+
get showControlButtons(): boolean;
|
|
1427
|
+
get containerElm(): HTMLElement;
|
|
1428
|
+
get owlDTContainerClass(): boolean;
|
|
1429
|
+
get owlDTPopupContainerClass(): boolean;
|
|
1430
|
+
get owlDTDialogContainerClass(): boolean;
|
|
1431
|
+
get owlDTInlineContainerClass(): boolean;
|
|
1432
|
+
get owlDTContainerDisabledClass(): boolean;
|
|
1433
|
+
get owlDTContainerId(): string;
|
|
1434
|
+
get owlDTContainerAnimation(): any;
|
|
1435
|
+
ngOnInit(): void;
|
|
1436
|
+
ngOnDestroy(): void;
|
|
1437
|
+
ngAfterContentInit(): void;
|
|
1438
|
+
ngAfterViewInit(): void;
|
|
1439
|
+
handleContainerAnimationStart(animationName: 'enter' | 'leave'): void;
|
|
1440
|
+
handleContainerAnimationDone(animationName: 'enter' | 'leave'): void;
|
|
1441
|
+
dateSelected(date: T): void;
|
|
1442
|
+
timeSelected(time: T): void;
|
|
1443
|
+
/**
|
|
1444
|
+
* Handle click on cancel button
|
|
1445
|
+
*/
|
|
1446
|
+
onCancelClicked(event: any): void;
|
|
1447
|
+
/**
|
|
1448
|
+
* Handle click on set button
|
|
1449
|
+
*/
|
|
1450
|
+
onSetClicked(event: any): void;
|
|
1451
|
+
/**
|
|
1452
|
+
* Handle click on inform radio group
|
|
1453
|
+
*/
|
|
1454
|
+
handleClickOnInfoGroup(event: any, index: number): void;
|
|
1455
|
+
/**
|
|
1456
|
+
* Handle click on inform radio group
|
|
1457
|
+
*/
|
|
1458
|
+
handleKeydownOnInfoGroup(event: any, next: any, index: number): void;
|
|
1459
|
+
protected onAnimateEnter(event: AnimationCallbackEvent): void;
|
|
1460
|
+
protected onAnimateLeave(event: AnimationCallbackEvent): void;
|
|
1461
|
+
/**
|
|
1462
|
+
* Set the value of activeSelectedIndex
|
|
1463
|
+
*/
|
|
1464
|
+
private setActiveSelectedIndex;
|
|
1465
|
+
private initPicker;
|
|
1466
|
+
/**
|
|
1467
|
+
* Select calendar date in single mode,
|
|
1468
|
+
* it returns null when date is not selected.
|
|
1469
|
+
*/
|
|
1470
|
+
private dateSelectedInSingleMode;
|
|
1471
|
+
/**
|
|
1472
|
+
* Select dates in range Mode
|
|
1473
|
+
*/
|
|
1474
|
+
private dateSelectedInRangeMode;
|
|
1475
|
+
/**
|
|
1476
|
+
* Update the given calendar date's time and check if it is valid
|
|
1477
|
+
* Because the calendar date has 00:00:00 as default time, if the picker type is 'both',
|
|
1478
|
+
* we need to update the given calendar date's time before selecting it.
|
|
1479
|
+
* if it is valid, return the updated dateTime
|
|
1480
|
+
* if it is not valid, return null
|
|
1481
|
+
*/
|
|
1482
|
+
private updateAndCheckCalendarDate;
|
|
1483
|
+
/**
|
|
1484
|
+
* Focus to the picker
|
|
1485
|
+
* */
|
|
1486
|
+
private focusPicker;
|
|
1487
|
+
private parseCssVariableDuration;
|
|
1488
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlDateTimeContainerComponent<any>, never>;
|
|
1489
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OwlDateTimeContainerComponent<any>, "owl-date-time-container", ["owlDateTimeContainer"], {}, {}, never, never, true, never>;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
declare class CalendarCell {
|
|
1493
|
+
value: number;
|
|
1494
|
+
displayValue: string;
|
|
1495
|
+
ariaLabel: string;
|
|
1496
|
+
enabled: boolean;
|
|
1497
|
+
out: boolean;
|
|
1498
|
+
cellClass: string;
|
|
1499
|
+
constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, out?: boolean, cellClass?: string);
|
|
1500
|
+
}
|
|
1501
|
+
declare class OwlCalendarBodyComponent implements OnInit {
|
|
1502
|
+
private elmRef;
|
|
1503
|
+
private injector;
|
|
1504
|
+
/**
|
|
1505
|
+
* The cell number of the active cell in the table.
|
|
1506
|
+
*/
|
|
1507
|
+
readonly activeCell: _angular_core.InputSignal<number>;
|
|
1508
|
+
/**
|
|
1509
|
+
* The cells to display in the table.
|
|
1510
|
+
* */
|
|
1511
|
+
readonly rows: _angular_core.InputSignal<CalendarCell[][]>;
|
|
1512
|
+
/**
|
|
1513
|
+
* The number of columns in the table.
|
|
1514
|
+
* */
|
|
1515
|
+
readonly numCols: _angular_core.InputSignal<number>;
|
|
1516
|
+
/**
|
|
1517
|
+
* The ratio (width / height) to use for the cells in the table.
|
|
1518
|
+
*/
|
|
1519
|
+
readonly cellRatio: _angular_core.InputSignal<number>;
|
|
1520
|
+
/**
|
|
1521
|
+
* The value in the table that corresponds to today.
|
|
1522
|
+
* */
|
|
1523
|
+
readonly todayValue: _angular_core.InputSignal<number>;
|
|
1524
|
+
/**
|
|
1525
|
+
* The value in the table that is currently selected.
|
|
1526
|
+
* */
|
|
1527
|
+
readonly selectedValues: _angular_core.InputSignal<number[]>;
|
|
1528
|
+
/**
|
|
1529
|
+
* Current picker select mode
|
|
1530
|
+
*/
|
|
1531
|
+
readonly selectMode: _angular_core.InputSignal<SelectMode>;
|
|
1532
|
+
/**
|
|
1533
|
+
* Emit when a calendar cell is selected
|
|
1534
|
+
* */
|
|
1535
|
+
readonly select: _angular_core.OutputEmitterRef<CalendarCell>;
|
|
1536
|
+
get owlDTCalendarBodyClass(): boolean;
|
|
1537
|
+
get isInSingleMode(): boolean;
|
|
1538
|
+
get isInRangeMode(): boolean;
|
|
1539
|
+
ngOnInit(): void;
|
|
1540
|
+
selectCell(cell: CalendarCell): void;
|
|
1541
|
+
isActiveCell(rowIndex: number, colIndex: number): boolean;
|
|
1542
|
+
/**
|
|
1543
|
+
* Check if the cell is selected
|
|
1544
|
+
*/
|
|
1545
|
+
isSelected(value: number): boolean;
|
|
1546
|
+
/**
|
|
1547
|
+
* Check if the cell in the range
|
|
1548
|
+
* */
|
|
1549
|
+
isInRange(value: number): boolean;
|
|
1550
|
+
/**
|
|
1551
|
+
* Check if the cell is the range from
|
|
1552
|
+
* */
|
|
1553
|
+
isRangeFrom(value: number): boolean;
|
|
1554
|
+
/**
|
|
1555
|
+
* Check if the cell is the range to
|
|
1556
|
+
* */
|
|
1557
|
+
isRangeTo(value: number): boolean;
|
|
1558
|
+
/**
|
|
1559
|
+
* Focus to a active cell
|
|
1560
|
+
* */
|
|
1561
|
+
focusActiveCell(): void;
|
|
1562
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlCalendarBodyComponent, never>;
|
|
1563
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OwlCalendarBodyComponent, "[owl-date-time-calendar-body]", ["owlDateTimeCalendarBody"], { "activeCell": { "alias": "activeCell"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "numCols": { "alias": "numCols"; "required": false; "isSignal": true; }; "cellRatio": { "alias": "cellRatio"; "required": false; "isSignal": true; }; "todayValue": { "alias": "todayValue"; "required": false; "isSignal": true; }; "selectedValues": { "alias": "selectedValues"; "required": false; "isSignal": true; }; "selectMode": { "alias": "selectMode"; "required": false; "isSignal": true; }; }, { "select": "select"; }, never, never, true, never>;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
declare class OwlMultiYearViewComponent<T> implements OnInit, AfterContentInit {
|
|
1567
|
+
private cdRef;
|
|
1568
|
+
private pickerIntl;
|
|
1569
|
+
private dateTimeAdapter;
|
|
1570
|
+
private options;
|
|
1571
|
+
/**
|
|
1572
|
+
* The select mode of the picker;
|
|
1573
|
+
* */
|
|
1574
|
+
private _selectMode;
|
|
1575
|
+
get selectMode(): SelectMode;
|
|
1576
|
+
set selectMode(val: SelectMode);
|
|
1577
|
+
/** The currently selected date. */
|
|
1578
|
+
private _selected;
|
|
1579
|
+
get selected(): T | null;
|
|
1580
|
+
set selected(value: T | null);
|
|
1581
|
+
private _selecteds;
|
|
1582
|
+
get selecteds(): T[];
|
|
1583
|
+
set selecteds(values: T[]);
|
|
1584
|
+
private _pickerMoment;
|
|
1585
|
+
get pickerMoment(): T;
|
|
1586
|
+
set pickerMoment(value: T);
|
|
1587
|
+
/**
|
|
1588
|
+
* A function used to filter which dates are selectable
|
|
1589
|
+
* */
|
|
1590
|
+
private _dateFilter;
|
|
1591
|
+
get dateFilter(): (date: T) => boolean;
|
|
1592
|
+
set dateFilter(filter: (date: T) => boolean);
|
|
1593
|
+
/** The minimum selectable date. */
|
|
1594
|
+
private _minDate;
|
|
1595
|
+
get minDate(): T | null;
|
|
1596
|
+
set minDate(value: T | null);
|
|
1597
|
+
/** The maximum selectable date. */
|
|
1598
|
+
private _maxDate;
|
|
1599
|
+
get maxDate(): T | null;
|
|
1600
|
+
set maxDate(value: T | null);
|
|
1601
|
+
private _todayYear;
|
|
1602
|
+
get todayYear(): number;
|
|
1603
|
+
private _years;
|
|
1604
|
+
get years(): CalendarCell[][];
|
|
1605
|
+
private _selectedYears;
|
|
1606
|
+
get selectedYears(): number[];
|
|
1607
|
+
private initiated;
|
|
1608
|
+
get isInSingleMode(): boolean;
|
|
1609
|
+
get isInRangeMode(): boolean;
|
|
1610
|
+
get activeCell(): number;
|
|
1611
|
+
get tableHeader(): string;
|
|
1612
|
+
get prevButtonLabel(): string;
|
|
1613
|
+
get nextButtonLabel(): string;
|
|
1614
|
+
/**
|
|
1615
|
+
* Callback to invoke when a new month is selected
|
|
1616
|
+
* */
|
|
1617
|
+
readonly change: _angular_core.OutputEmitterRef<T>;
|
|
1618
|
+
/**
|
|
1619
|
+
* Emits the selected year. This doesn't imply a change on the selected date
|
|
1620
|
+
* */
|
|
1621
|
+
readonly yearSelected: _angular_core.OutputEmitterRef<T>;
|
|
1622
|
+
/** Emits when any date is activated. */
|
|
1623
|
+
readonly pickerMomentChange: _angular_core.OutputEmitterRef<T>;
|
|
1624
|
+
/** Emits when use keyboard enter to select a calendar cell */
|
|
1625
|
+
readonly keyboardEnter: _angular_core.OutputEmitterRef<void>;
|
|
1626
|
+
/** The body of calendar table */
|
|
1627
|
+
readonly calendarBodyElm: _angular_core.Signal<OwlCalendarBodyComponent>;
|
|
1628
|
+
get owlDTCalendarView(): boolean;
|
|
1629
|
+
get owlDTCalendarMultiYearView(): boolean;
|
|
1630
|
+
ngOnInit(): void;
|
|
1631
|
+
ngAfterContentInit(): void;
|
|
1632
|
+
/**
|
|
1633
|
+
* Handle a calendarCell selected
|
|
1634
|
+
*/
|
|
1635
|
+
selectCalendarCell(cell: CalendarCell): void;
|
|
1636
|
+
private selectYear;
|
|
1637
|
+
/**
|
|
1638
|
+
* Generate the previous year list
|
|
1639
|
+
* */
|
|
1640
|
+
prevYearList(event: any): void;
|
|
1641
|
+
/**
|
|
1642
|
+
* Generate the next year list
|
|
1643
|
+
* */
|
|
1644
|
+
nextYearList(event: any): void;
|
|
1645
|
+
generateYearList(): void;
|
|
1646
|
+
/** Whether the previous period button is enabled. */
|
|
1647
|
+
previousEnabled(): boolean;
|
|
1648
|
+
/** Whether the next period button is enabled. */
|
|
1649
|
+
nextEnabled(): boolean;
|
|
1650
|
+
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
1651
|
+
/**
|
|
1652
|
+
* Creates an CalendarCell for the given year.
|
|
1653
|
+
*/
|
|
1654
|
+
private createYearCell;
|
|
1655
|
+
private setSelectedYears;
|
|
1656
|
+
/** Whether the given year is enabled. */
|
|
1657
|
+
private isYearEnabled;
|
|
1658
|
+
private isSameYearList;
|
|
1659
|
+
/**
|
|
1660
|
+
* Get a valid date object
|
|
1661
|
+
*/
|
|
1662
|
+
private getValidDate;
|
|
1663
|
+
private focusActiveCell;
|
|
1664
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlMultiYearViewComponent<any>, never>;
|
|
1665
|
+
static ɵcmp: _angular_core.ɵɵ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; }; }, { "change": "change"; "yearSelected": "yearSelected"; "pickerMomentChange": "pickerMomentChange"; "keyboardEnter": "keyboardEnter"; }, never, never, true, never>;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit, OnDestroy {
|
|
1669
|
+
private cdRef;
|
|
1670
|
+
private dateTimeAdapter;
|
|
1671
|
+
private dateTimeFormats;
|
|
1672
|
+
/**
|
|
1673
|
+
* The select mode of the picker;
|
|
1674
|
+
* */
|
|
1675
|
+
private _selectMode;
|
|
1676
|
+
get selectMode(): SelectMode;
|
|
1677
|
+
set selectMode(val: SelectMode);
|
|
1678
|
+
/** The currently selected date. */
|
|
1679
|
+
private _selected;
|
|
1680
|
+
get selected(): T | null;
|
|
1681
|
+
set selected(value: T | null);
|
|
1682
|
+
private _selecteds;
|
|
1683
|
+
get selecteds(): T[];
|
|
1684
|
+
set selecteds(values: T[]);
|
|
1685
|
+
private _pickerMoment;
|
|
1686
|
+
get pickerMoment(): T;
|
|
1687
|
+
set pickerMoment(value: T);
|
|
1688
|
+
/**
|
|
1689
|
+
* A function used to filter which dates are selectable
|
|
1690
|
+
* */
|
|
1691
|
+
private _dateFilter;
|
|
1692
|
+
get dateFilter(): (date: T) => boolean;
|
|
1693
|
+
set dateFilter(filter: (date: T) => boolean);
|
|
1694
|
+
/** The minimum selectable date. */
|
|
1695
|
+
private _minDate;
|
|
1696
|
+
get minDate(): T | null;
|
|
1697
|
+
set minDate(value: T | null);
|
|
1698
|
+
/** The maximum selectable date. */
|
|
1699
|
+
private _maxDate;
|
|
1700
|
+
get maxDate(): T | null;
|
|
1701
|
+
set maxDate(value: T | null);
|
|
1702
|
+
private readonly monthNames;
|
|
1703
|
+
private _months;
|
|
1704
|
+
get months(): CalendarCell[][];
|
|
1705
|
+
get activeCell(): number;
|
|
1706
|
+
get isInSingleMode(): boolean;
|
|
1707
|
+
get isInRangeMode(): boolean;
|
|
1708
|
+
private localeSub;
|
|
1709
|
+
private initiated;
|
|
1710
|
+
todayMonth: number | null;
|
|
1711
|
+
/**
|
|
1712
|
+
* An array to hold all selectedDates' month value
|
|
1713
|
+
* the value is the month number in current year
|
|
1714
|
+
* */
|
|
1715
|
+
selectedMonths: number[];
|
|
1716
|
+
/**
|
|
1717
|
+
* Callback to invoke when a new month is selected
|
|
1718
|
+
* */
|
|
1719
|
+
readonly change: _angular_core.OutputEmitterRef<T>;
|
|
1720
|
+
/**
|
|
1721
|
+
* Emits the selected year. This doesn't imply a change on the selected date
|
|
1722
|
+
* */
|
|
1723
|
+
readonly monthSelected: _angular_core.OutputEmitterRef<T>;
|
|
1724
|
+
/** Emits when any date is activated. */
|
|
1725
|
+
readonly pickerMomentChange: _angular_core.OutputEmitterRef<T>;
|
|
1726
|
+
/** Emits when use keyboard enter to select a calendar cell */
|
|
1727
|
+
readonly keyboardEnter: _angular_core.OutputEmitterRef<void>;
|
|
1728
|
+
/** The body of calendar table */
|
|
1729
|
+
readonly calendarBodyElm: _angular_core.Signal<OwlCalendarBodyComponent>;
|
|
1730
|
+
get owlDTCalendarView(): boolean;
|
|
1731
|
+
constructor();
|
|
1732
|
+
ngOnInit(): void;
|
|
1733
|
+
ngAfterContentInit(): void;
|
|
1734
|
+
ngOnDestroy(): void;
|
|
1735
|
+
/**
|
|
1736
|
+
* Handle a calendarCell selected
|
|
1737
|
+
*/
|
|
1738
|
+
selectCalendarCell(cell: CalendarCell): void;
|
|
1739
|
+
/**
|
|
1740
|
+
* Handle a new month selected
|
|
1741
|
+
*/
|
|
1742
|
+
private selectMonth;
|
|
1743
|
+
/**
|
|
1744
|
+
* Handle keydown event on calendar body
|
|
1745
|
+
*/
|
|
1746
|
+
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
1747
|
+
/**
|
|
1748
|
+
* Generate the calendar month list
|
|
1749
|
+
* */
|
|
1750
|
+
private generateMonthList;
|
|
1751
|
+
/**
|
|
1752
|
+
* Creates an CalendarCell for the given month.
|
|
1753
|
+
*/
|
|
1754
|
+
private createMonthCell;
|
|
1755
|
+
/**
|
|
1756
|
+
* Check if the given month is enable
|
|
1757
|
+
*/
|
|
1758
|
+
private isMonthEnabled;
|
|
1759
|
+
/**
|
|
1760
|
+
* Gets the month in this year that the given Date falls on.
|
|
1761
|
+
* Returns null if the given Date is in another year.
|
|
1762
|
+
*/
|
|
1763
|
+
private getMonthInCurrentYear;
|
|
1764
|
+
/**
|
|
1765
|
+
* Set the selectedMonths value
|
|
1766
|
+
* In single mode, it has only one value which represent the month the selected date in
|
|
1767
|
+
* In range mode, it would has two values, one for the month the fromValue in and the other for the month the toValue in
|
|
1768
|
+
* */
|
|
1769
|
+
private setSelectedMonths;
|
|
1770
|
+
/**
|
|
1771
|
+
* Check the given dates are in the same year
|
|
1772
|
+
*/
|
|
1773
|
+
private hasSameYear;
|
|
1774
|
+
/**
|
|
1775
|
+
* Get a valid date object
|
|
1776
|
+
*/
|
|
1777
|
+
private getValidDate;
|
|
1778
|
+
private focusActiveCell;
|
|
1779
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlYearViewComponent<any>, never>;
|
|
1780
|
+
static ɵcmp: _angular_core.ɵɵ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; }; }, { "change": "change"; "monthSelected": "monthSelected"; "pickerMomentChange": "pickerMomentChange"; "keyboardEnter": "keyboardEnter"; }, never, never, true, never>;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
declare class OwlMonthViewComponent<T> implements OnInit, AfterContentInit, OnDestroy {
|
|
1784
|
+
private cdRef;
|
|
1785
|
+
private dateTimeAdapter;
|
|
1786
|
+
private dateTimeFormats;
|
|
1787
|
+
/**
|
|
1788
|
+
* Whether to hide dates in other months at the start or end of the current month.
|
|
1789
|
+
* */
|
|
1790
|
+
readonly hideOtherMonths: _angular_core.InputSignal<boolean>;
|
|
1791
|
+
/**
|
|
1792
|
+
* Whether to show calendar weeks in the calendar
|
|
1793
|
+
* */
|
|
1794
|
+
readonly showCalendarWeeks: _angular_core.InputSignal<boolean>;
|
|
1795
|
+
private isDefaultFirstDayOfWeek;
|
|
1796
|
+
/**
|
|
1797
|
+
* Define the first day of a week
|
|
1798
|
+
* Sunday: 0 - Saturday: 6
|
|
1799
|
+
* */
|
|
1800
|
+
private _firstDayOfWeek;
|
|
1801
|
+
get firstDayOfWeek(): number;
|
|
1802
|
+
set firstDayOfWeek(val: number);
|
|
1803
|
+
/**
|
|
1804
|
+
* The select mode of the picker;
|
|
1805
|
+
* */
|
|
1806
|
+
private _selectMode;
|
|
1807
|
+
get selectMode(): SelectMode;
|
|
1808
|
+
set selectMode(val: SelectMode);
|
|
1809
|
+
/** The currently selected date. */
|
|
1810
|
+
private _selected;
|
|
1811
|
+
get selected(): T | null;
|
|
1812
|
+
set selected(value: T | null);
|
|
1813
|
+
private _selecteds;
|
|
1814
|
+
get selecteds(): T[];
|
|
1815
|
+
set selecteds(values: T[]);
|
|
1816
|
+
private _pickerMoment;
|
|
1817
|
+
get pickerMoment(): T;
|
|
1818
|
+
set pickerMoment(value: T);
|
|
1819
|
+
/**
|
|
1820
|
+
* A function used to filter which dates are selectable
|
|
1821
|
+
* */
|
|
1822
|
+
private _dateFilter;
|
|
1823
|
+
get dateFilter(): (date: T) => boolean;
|
|
1824
|
+
set dateFilter(filter: (date: T) => boolean);
|
|
1825
|
+
/** The minimum selectable date. */
|
|
1826
|
+
private _minDate;
|
|
1827
|
+
get minDate(): T | null;
|
|
1828
|
+
set minDate(value: T | null);
|
|
1829
|
+
/** The maximum selectable date. */
|
|
1830
|
+
private _maxDate;
|
|
1831
|
+
get maxDate(): T | null;
|
|
1832
|
+
set maxDate(value: T | null);
|
|
1833
|
+
private _weekdays;
|
|
1834
|
+
get weekdays(): {
|
|
1835
|
+
long: string;
|
|
1836
|
+
short: string;
|
|
1837
|
+
narrow: string;
|
|
1838
|
+
}[];
|
|
1839
|
+
private _days;
|
|
1840
|
+
get days(): CalendarCell[][];
|
|
1841
|
+
get activeCell(): number;
|
|
1842
|
+
get isInSingleMode(): boolean;
|
|
1843
|
+
get isInRangeMode(): boolean;
|
|
1844
|
+
private firstDateOfMonth;
|
|
1845
|
+
private localeSub;
|
|
1846
|
+
private initiated;
|
|
1847
|
+
private dateNames;
|
|
1848
|
+
/**
|
|
1849
|
+
* The date of the month that today falls on.
|
|
1850
|
+
* */
|
|
1851
|
+
todayDate: number | null;
|
|
1852
|
+
/**
|
|
1853
|
+
* Week day numbers
|
|
1854
|
+
* */
|
|
1855
|
+
weekNumbers: number[];
|
|
1856
|
+
/**
|
|
1857
|
+
* An array to hold all selectedDates' value
|
|
1858
|
+
* the value is the day number in current month
|
|
1859
|
+
* */
|
|
1860
|
+
selectedDates: number[];
|
|
1861
|
+
firstRowOffset: number;
|
|
1862
|
+
/**
|
|
1863
|
+
* Callback to invoke when a new date is selected
|
|
1864
|
+
* */
|
|
1865
|
+
readonly selectedChange: _angular_core.OutputEmitterRef<T>;
|
|
1866
|
+
/**
|
|
1867
|
+
* Callback to invoke when any date is selected.
|
|
1868
|
+
* */
|
|
1869
|
+
readonly userSelection: _angular_core.OutputEmitterRef<void>;
|
|
1870
|
+
/** Emits when any date is activated. */
|
|
1871
|
+
readonly pickerMomentChange: _angular_core.OutputEmitterRef<T>;
|
|
1872
|
+
/** The body of calendar table */
|
|
1873
|
+
readonly calendarBodyElm: _angular_core.Signal<OwlCalendarBodyComponent>;
|
|
1874
|
+
get owlDTCalendarView(): boolean;
|
|
1875
|
+
ngOnInit(): void;
|
|
1876
|
+
ngAfterContentInit(): void;
|
|
1877
|
+
ngOnDestroy(): void;
|
|
1878
|
+
/**
|
|
1879
|
+
* Handle a calendarCell selected
|
|
1880
|
+
*/
|
|
1881
|
+
selectCalendarCell(cell: CalendarCell): void;
|
|
1882
|
+
/**
|
|
1883
|
+
* Handle a new date selected
|
|
1884
|
+
*/
|
|
1885
|
+
private selectDate;
|
|
1886
|
+
/**
|
|
1887
|
+
* Handle keydown event on calendar body
|
|
1888
|
+
*/
|
|
1889
|
+
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
1890
|
+
/**
|
|
1891
|
+
* Generate the calendar weekdays array
|
|
1892
|
+
* */
|
|
1893
|
+
private generateWeekDays;
|
|
1894
|
+
/**
|
|
1895
|
+
* Generate the calendar days array
|
|
1896
|
+
* */
|
|
1897
|
+
private generateCalendar;
|
|
1898
|
+
getISOWeek(d: Date): number;
|
|
1899
|
+
private updateFirstDayOfWeek;
|
|
1900
|
+
/**
|
|
1901
|
+
* Creates CalendarCell for days.
|
|
1902
|
+
*/
|
|
1903
|
+
private createDateCell;
|
|
1904
|
+
/**
|
|
1905
|
+
* Check if the date is valid
|
|
1906
|
+
*/
|
|
1907
|
+
private isDateEnabled;
|
|
1908
|
+
/**
|
|
1909
|
+
* Get a valid date object
|
|
1910
|
+
*/
|
|
1911
|
+
private getValidDate;
|
|
1912
|
+
/**
|
|
1913
|
+
* Check if the give dates are none-null and in the same month
|
|
1914
|
+
*/
|
|
1915
|
+
isSameMonth(dateLeft: T, dateRight: T): boolean;
|
|
1916
|
+
/**
|
|
1917
|
+
* Set the selectedDates value.
|
|
1918
|
+
* In single mode, it has only one value which represent the selected date
|
|
1919
|
+
* In range mode, it would has two values, one for the fromValue and the other for the toValue
|
|
1920
|
+
* */
|
|
1921
|
+
private setSelectedDates;
|
|
1922
|
+
private focusActiveCell;
|
|
1923
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlMonthViewComponent<any>, never>;
|
|
1924
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OwlMonthViewComponent<any>, "owl-date-time-month-view", ["owlYearView"], { "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; "isSignal": true; }; "showCalendarWeeks": { "alias": "showCalendarWeeks"; "required": false; "isSignal": true; }; "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, true, never>;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
declare class OwlTimerBoxComponent implements OnInit, OnDestroy {
|
|
1928
|
+
readonly showDivider: _angular_core.InputSignal<boolean>;
|
|
1929
|
+
readonly upBtnAriaLabel: _angular_core.InputSignal<string>;
|
|
1930
|
+
readonly upBtnDisabled: _angular_core.InputSignal<boolean>;
|
|
1931
|
+
readonly downBtnAriaLabel: _angular_core.InputSignal<string>;
|
|
1932
|
+
readonly downBtnDisabled: _angular_core.InputSignal<boolean>;
|
|
1933
|
+
/**
|
|
1934
|
+
* Value would be displayed in the box
|
|
1935
|
+
* If it is null, the box would display [value]
|
|
1936
|
+
* */
|
|
1937
|
+
readonly boxValue: _angular_core.InputSignal<number>;
|
|
1938
|
+
readonly value: _angular_core.InputSignal<number>;
|
|
1939
|
+
readonly min: _angular_core.InputSignal<number>;
|
|
1940
|
+
readonly max: _angular_core.InputSignal<number>;
|
|
1941
|
+
readonly step: _angular_core.InputSignal<number>;
|
|
1942
|
+
readonly inputLabel: _angular_core.InputSignal<string>;
|
|
1943
|
+
readonly valueChange: _angular_core.OutputEmitterRef<number>;
|
|
1944
|
+
readonly inputChange: _angular_core.OutputEmitterRef<number>;
|
|
1945
|
+
private inputStream;
|
|
1946
|
+
private inputStreamSub;
|
|
1947
|
+
private hasFocus;
|
|
1948
|
+
get displayValue(): string;
|
|
1949
|
+
get owlDTTimerBoxClass(): boolean;
|
|
1950
|
+
private readonly valueInput;
|
|
1951
|
+
private onValueInputMouseWheelBind;
|
|
1952
|
+
constructor();
|
|
1953
|
+
ngOnInit(): void;
|
|
1954
|
+
ngOnDestroy(): void;
|
|
1955
|
+
upBtnClicked(): void;
|
|
1956
|
+
downBtnClicked(): void;
|
|
1957
|
+
handleInputChange(val: string): void;
|
|
1958
|
+
focusIn(): void;
|
|
1959
|
+
focusOut(value: string): void;
|
|
1960
|
+
private updateValue;
|
|
1961
|
+
private updateValueViaInput;
|
|
1962
|
+
private onValueInputMouseWheel;
|
|
1963
|
+
private bindValueInputMouseWheel;
|
|
1964
|
+
private unbindValueInputMouseWheel;
|
|
1965
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlTimerBoxComponent, never>;
|
|
1966
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OwlTimerBoxComponent, "owl-date-time-timer-box", ["owlDateTimeTimerBox"], { "showDivider": { "alias": "showDivider"; "required": false; "isSignal": true; }; "upBtnAriaLabel": { "alias": "upBtnAriaLabel"; "required": false; "isSignal": true; }; "upBtnDisabled": { "alias": "upBtnDisabled"; "required": false; "isSignal": true; }; "downBtnAriaLabel": { "alias": "downBtnAriaLabel"; "required": false; "isSignal": true; }; "downBtnDisabled": { "alias": "downBtnDisabled"; "required": false; "isSignal": true; }; "boxValue": { "alias": "boxValue"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "inputLabel": { "alias": "inputLabel"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "inputChange": "inputChange"; }, never, never, true, never>;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
declare class OwlHourInputComponent implements ControlValueAccessor {
|
|
1970
|
+
private readonly pickerIntl;
|
|
1971
|
+
readonly upBtnAriaLabel: _angular_core.InputSignal<string>;
|
|
1972
|
+
readonly downBtnAriaLabel: _angular_core.InputSignal<string>;
|
|
1973
|
+
readonly min: _angular_core.InputSignal<number>;
|
|
1974
|
+
readonly max: _angular_core.InputSignal<number>;
|
|
1975
|
+
readonly step: _angular_core.InputSignal<number>;
|
|
1976
|
+
readonly hour12Timer: _angular_core.InputSignal<boolean>;
|
|
1977
|
+
readonly value: _angular_core.ModelSignal<number>;
|
|
1978
|
+
readonly disabled: _angular_core.ModelSignal<boolean>;
|
|
1979
|
+
protected readonly isPM: _angular_core.Signal<boolean>;
|
|
1980
|
+
protected readonly hour12ButtonLabel: _angular_core.Signal<string>;
|
|
1981
|
+
protected readonly boxValue: _angular_core.Signal<number>;
|
|
1982
|
+
get owlHourInputClass(): boolean;
|
|
1983
|
+
upBtnClicked(): void;
|
|
1984
|
+
downBtnClicked(): void;
|
|
1985
|
+
setValueViaInput(hours: number): void;
|
|
1986
|
+
setValue(hours: number): void;
|
|
1987
|
+
setMeridian(): void;
|
|
1988
|
+
/**
|
|
1989
|
+
* Update the value (which emits `valueChange` through the model) and notify
|
|
1990
|
+
* the forms API, mirroring the behaviour of the old value setter.
|
|
1991
|
+
*/
|
|
1992
|
+
private commitValue;
|
|
1993
|
+
onChange: any;
|
|
1994
|
+
onTouch: any;
|
|
1995
|
+
writeValue(value: any): void;
|
|
1996
|
+
registerOnChange(fn: any): void;
|
|
1997
|
+
registerOnTouched(fn: any): void;
|
|
1998
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1999
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlHourInputComponent, never>;
|
|
2000
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OwlHourInputComponent, "owl-hour-input", ["owlHourInput"], { "upBtnAriaLabel": { "alias": "upBtnAriaLabel"; "required": false; "isSignal": true; }; "downBtnAriaLabel": { "alias": "downBtnAriaLabel"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "disabled": "disabledChange"; }, never, never, true, never>;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
/**
|
|
2004
|
+
* numberFixedLen.pipe
|
|
2005
|
+
*/
|
|
2006
|
+
|
|
2007
|
+
declare class NumberFixedLenPipe implements PipeTransform {
|
|
2008
|
+
transform(num: number, len: number): any;
|
|
2009
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NumberFixedLenPipe, never>;
|
|
2010
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<NumberFixedLenPipe, "numberFixedLen", true>;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
declare class OwlDateTimeInlineComponent<T> extends OwlDateTime<T> implements OnInit, ControlValueAccessor {
|
|
2014
|
+
protected changeDetector: ChangeDetectorRef;
|
|
2015
|
+
readonly container: _angular_core.Signal<OwlDateTimeContainerComponent<any>>;
|
|
2016
|
+
/**
|
|
2017
|
+
* Set the type of the dateTime picker
|
|
2018
|
+
* 'both' -- show both calendar and timer
|
|
2019
|
+
* 'calendar' -- show only calendar
|
|
2020
|
+
* 'timer' -- show only timer
|
|
2021
|
+
*/
|
|
2022
|
+
private _pickerType;
|
|
2023
|
+
get pickerType(): PickerType;
|
|
2024
|
+
set pickerType(val: PickerType);
|
|
2025
|
+
private _disabled;
|
|
2026
|
+
get disabled(): boolean;
|
|
2027
|
+
set disabled(value: boolean);
|
|
2028
|
+
private _selectMode;
|
|
2029
|
+
get selectMode(): SelectMode;
|
|
2030
|
+
set selectMode(mode: SelectMode);
|
|
2031
|
+
/** The date to open the calendar to initially. */
|
|
2032
|
+
private _startAt;
|
|
2033
|
+
get startAt(): T | null;
|
|
2034
|
+
set startAt(date: T | null);
|
|
2035
|
+
/** The date to open for range calendar. */
|
|
2036
|
+
private _endAt;
|
|
2037
|
+
get endAt(): T | null;
|
|
2038
|
+
set endAt(date: T | null);
|
|
2039
|
+
private _dateTimeFilter;
|
|
2040
|
+
get dateTimeFilter(): (date: T | null) => boolean;
|
|
2041
|
+
set dateTimeFilter(filter: (date: T | null) => boolean);
|
|
2042
|
+
/** The minimum valid date. */
|
|
2043
|
+
private _min;
|
|
2044
|
+
get minDateTime(): T | null;
|
|
2045
|
+
set minDateTime(value: T | null);
|
|
2046
|
+
/** The maximum valid date. */
|
|
2047
|
+
private _max;
|
|
2048
|
+
get maxDateTime(): T | null;
|
|
2049
|
+
set maxDateTime(value: T | null);
|
|
2050
|
+
private _value;
|
|
2051
|
+
get value(): T | null;
|
|
2052
|
+
set value(value: T | null);
|
|
2053
|
+
private _values;
|
|
2054
|
+
get values(): T[];
|
|
2055
|
+
set values(values: T[]);
|
|
2056
|
+
/**
|
|
2057
|
+
* Emits selected year in multi-year view
|
|
2058
|
+
* This doesn't imply a change on the selected date.
|
|
2059
|
+
* */
|
|
2060
|
+
readonly yearSelected: _angular_core.OutputEmitterRef<T>;
|
|
2061
|
+
/**
|
|
2062
|
+
* Emits selected month in year view
|
|
2063
|
+
* This doesn't imply a change on the selected date.
|
|
2064
|
+
* */
|
|
2065
|
+
readonly monthSelected: _angular_core.OutputEmitterRef<T>;
|
|
2066
|
+
/**
|
|
2067
|
+
* Emits selected date
|
|
2068
|
+
* */
|
|
2069
|
+
readonly dateSelected: _angular_core.OutputEmitterRef<T>;
|
|
2070
|
+
private _selected;
|
|
2071
|
+
get selected(): T | null;
|
|
2072
|
+
set selected(value: T | null);
|
|
2073
|
+
private _selecteds;
|
|
2074
|
+
get selecteds(): T[];
|
|
2075
|
+
set selecteds(values: T[]);
|
|
2076
|
+
get opened(): boolean;
|
|
2077
|
+
get pickerMode(): PickerMode;
|
|
2078
|
+
get isInSingleMode(): boolean;
|
|
2079
|
+
get isInRangeMode(): boolean;
|
|
2080
|
+
get owlDTInlineClass(): boolean;
|
|
2081
|
+
private onModelChange;
|
|
2082
|
+
private onModelTouched;
|
|
2083
|
+
constructor();
|
|
2084
|
+
ngOnInit(): void;
|
|
2085
|
+
writeValue(value: any): void;
|
|
2086
|
+
registerOnChange(fn: any): void;
|
|
2087
|
+
registerOnTouched(fn: any): void;
|
|
2088
|
+
setDisabledState(isDisabled: boolean): void;
|
|
2089
|
+
select(date: T[] | T): void;
|
|
2090
|
+
/**
|
|
2091
|
+
* Emits the selected year in multi-year view
|
|
2092
|
+
* */
|
|
2093
|
+
selectYear(normalizedYear: T): void;
|
|
2094
|
+
/**
|
|
2095
|
+
* Emits selected month in year view
|
|
2096
|
+
* */
|
|
2097
|
+
selectMonth(normalizedMonth: T): void;
|
|
2098
|
+
/**
|
|
2099
|
+
* Emits the selected date
|
|
2100
|
+
* */
|
|
2101
|
+
selectDate(normalizedDate: T): void;
|
|
2102
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlDateTimeInlineComponent<any>, never>;
|
|
2103
|
+
static ɵcmp: _angular_core.ɵɵ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; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "dateSelected": "dateSelected"; }, never, never, true, never>;
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* @deprecated Use `provideOwlDateTime()` instead. This module will be removed in v21.0.0.
|
|
2108
|
+
*
|
|
2109
|
+
* Migration guide:
|
|
2110
|
+
* ```typescript
|
|
2111
|
+
* // Before (NgModule approach):
|
|
2112
|
+
* import { OwlDateTimeModule, OwlNativeDateTimeModule } from '@dintecom/ngx-datetime-picker';
|
|
2113
|
+
*
|
|
2114
|
+
* @NgModule({
|
|
2115
|
+
* imports: [OwlDateTimeModule, OwlNativeDateTimeModule]
|
|
2116
|
+
* })
|
|
2117
|
+
* export class AppModule { }
|
|
2118
|
+
*
|
|
2119
|
+
* // After (Standalone/Provider approach):
|
|
2120
|
+
* import { provideOwlDateTime, provideOwlNativeDateTime } from '@dintecom/ngx-datetime-picker';
|
|
2121
|
+
*
|
|
2122
|
+
* // For standalone app:
|
|
2123
|
+
* bootstrapApplication(AppComponent, {
|
|
2124
|
+
* providers: [
|
|
2125
|
+
* provideOwlDateTime(),
|
|
2126
|
+
* provideOwlNativeDateTime()
|
|
2127
|
+
* ]
|
|
2128
|
+
* });
|
|
2129
|
+
*
|
|
2130
|
+
* // For existing NgModule app:
|
|
2131
|
+
* @NgModule({
|
|
2132
|
+
* providers: [
|
|
2133
|
+
* provideOwlDateTime(),
|
|
2134
|
+
* provideOwlNativeDateTime()
|
|
2135
|
+
* ]
|
|
2136
|
+
* })
|
|
2137
|
+
* export class AppModule { }
|
|
2138
|
+
* ```
|
|
2139
|
+
*/
|
|
2140
|
+
declare class OwlDateTimeModule {
|
|
2141
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlDateTimeModule, never>;
|
|
2142
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<OwlDateTimeModule, never, [typeof i1.CommonModule, typeof i3.OverlayModule, typeof OwlDialogModule, typeof i2.A11yModule, typeof OwlDateTimeTriggerDirective, typeof OwlDateTimeInputDirective, typeof OwlDateTimeComponent, typeof OwlDateTimeContainerComponent, typeof OwlMultiYearViewComponent, typeof OwlYearViewComponent, typeof OwlMonthViewComponent, typeof OwlTimerComponent, typeof OwlTimerBoxComponent, typeof OwlHourInputComponent, typeof OwlCalendarComponent, typeof OwlCalendarBodyComponent, typeof NumberFixedLenPipe, typeof OwlDateTimeInlineComponent], [typeof OwlCalendarComponent, typeof OwlTimerComponent, typeof OwlTimerBoxComponent, typeof OwlHourInputComponent, typeof OwlDateTimeTriggerDirective, typeof OwlDateTimeInputDirective, typeof OwlDateTimeComponent, typeof OwlDateTimeInlineComponent, typeof OwlMultiYearViewComponent, typeof OwlYearViewComponent, typeof OwlMonthViewComponent]>;
|
|
2143
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<OwlDateTimeModule>;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
/**
|
|
2147
|
+
* @deprecated Use `provideOwlNativeDateTime()` instead. This module will be removed in v21.0.0.
|
|
2148
|
+
* @see provideOwlNativeDateTime
|
|
2149
|
+
*/
|
|
2150
|
+
declare class NativeDateTimeModule {
|
|
2151
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NativeDateTimeModule, never>;
|
|
2152
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<NativeDateTimeModule, never, [typeof i1$1.PlatformModule], never>;
|
|
2153
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<NativeDateTimeModule>;
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2156
|
+
* @deprecated Use `provideOwlNativeDateTime()` instead. This module will be removed in v21.0.0.
|
|
2157
|
+
*
|
|
2158
|
+
* Migration guide:
|
|
2159
|
+
* ```typescript
|
|
2160
|
+
* // Before:
|
|
2161
|
+
* import { OwlNativeDateTimeModule } from '@dintecom/ngx-datetime-picker';
|
|
2162
|
+
* @NgModule({ imports: [OwlNativeDateTimeModule] })
|
|
2163
|
+
*
|
|
2164
|
+
* // After:
|
|
2165
|
+
* import { provideOwlNativeDateTime } from '@dintecom/ngx-datetime-picker';
|
|
2166
|
+
* providers: [provideOwlNativeDateTime()]
|
|
2167
|
+
* ```
|
|
2168
|
+
*/
|
|
2169
|
+
declare class OwlNativeDateTimeModule {
|
|
2170
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlNativeDateTimeModule, never>;
|
|
2171
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<OwlNativeDateTimeModule, never, [typeof NativeDateTimeModule], never>;
|
|
2172
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<OwlNativeDateTimeModule>;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
declare class OwlDateTimeIntl {
|
|
2176
|
+
/**
|
|
2177
|
+
* Stream that emits whenever the labels here are changed. Use this to notify
|
|
2178
|
+
* components if the labels have changed after initialization.
|
|
2179
|
+
*/
|
|
2180
|
+
readonly changes: Subject<void>;
|
|
2181
|
+
/** A label for the up second button (used by screen readers). */
|
|
2182
|
+
upSecondLabel: string;
|
|
2183
|
+
/** A label for the down second button (used by screen readers). */
|
|
2184
|
+
downSecondLabel: string;
|
|
2185
|
+
/** A label for the up minute button (used by screen readers). */
|
|
2186
|
+
upMinuteLabel: string;
|
|
2187
|
+
/** A label for the down minute button (used by screen readers). */
|
|
2188
|
+
downMinuteLabel: string;
|
|
2189
|
+
/** A label for the up hour button (used by screen readers). */
|
|
2190
|
+
upHourLabel: string;
|
|
2191
|
+
/** A label for the down hour button (used by screen readers). */
|
|
2192
|
+
downHourLabel: string;
|
|
2193
|
+
/** A label for the previous month button (used by screen readers). */
|
|
2194
|
+
prevMonthLabel: string;
|
|
2195
|
+
/** A label for the next month button (used by screen readers). */
|
|
2196
|
+
nextMonthLabel: string;
|
|
2197
|
+
/** A label for the previous year button (used by screen readers). */
|
|
2198
|
+
prevYearLabel: string;
|
|
2199
|
+
/** A label for the next year button (used by screen readers). */
|
|
2200
|
+
nextYearLabel: string;
|
|
2201
|
+
/** A label for the previous multi-year button (used by screen readers). */
|
|
2202
|
+
prevMultiYearLabel: string;
|
|
2203
|
+
/** A label for the next multi-year button (used by screen readers). */
|
|
2204
|
+
nextMultiYearLabel: string;
|
|
2205
|
+
/** A label for the 'switch to month view' button (used by screen readers). */
|
|
2206
|
+
switchToMonthViewLabel: string;
|
|
2207
|
+
/** A label for the 'switch to year view' button (used by screen readers). */
|
|
2208
|
+
switchToMultiYearViewLabel: string;
|
|
2209
|
+
/** A label for the cancel button */
|
|
2210
|
+
cancelBtnLabel: string;
|
|
2211
|
+
/** A label for the set button */
|
|
2212
|
+
setBtnLabel: string;
|
|
2213
|
+
/** A label for the range 'from' in picker info */
|
|
2214
|
+
rangeFromLabel: string;
|
|
2215
|
+
/** A label for the range 'to' in picker info */
|
|
2216
|
+
rangeToLabel: string;
|
|
2217
|
+
/** A label for the hour12 button (AM) */
|
|
2218
|
+
hour12AMLabel: string;
|
|
2219
|
+
/** A label for the hour12 button (PM) */
|
|
2220
|
+
hour12PMLabel: string;
|
|
2221
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OwlDateTimeIntl, never>;
|
|
2222
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<OwlDateTimeIntl>;
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
declare class UnixTimestampDateTimeAdapter extends DateTimeAdapter<number> {
|
|
2226
|
+
private owlDateTimeLocale;
|
|
2227
|
+
firstMonthOfTheYear: number;
|
|
2228
|
+
firstDayOfTheWeek: number;
|
|
2229
|
+
constructor();
|
|
2230
|
+
/** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */
|
|
2231
|
+
private readonly _clampDate;
|
|
2232
|
+
/**
|
|
2233
|
+
* Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
|
|
2234
|
+
* Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
|
|
2235
|
+
* the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
|
|
2236
|
+
* will produce `'8/13/1800'`.
|
|
2237
|
+
*/
|
|
2238
|
+
useUtcForDisplay: boolean;
|
|
2239
|
+
/**
|
|
2240
|
+
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
2241
|
+
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
2242
|
+
* date parsing.
|
|
2243
|
+
*/
|
|
2244
|
+
private static search_ltr_rtl_pattern;
|
|
2245
|
+
private static stripDirectionalityCharacters;
|
|
2246
|
+
/**
|
|
2247
|
+
* When converting Date object to string, javascript built-in functions may return wrong
|
|
2248
|
+
* results because it applies its internal DST rules. The DST rules around the world change
|
|
2249
|
+
* very frequently, and the current valid rule is not always valid in previous years though.
|
|
2250
|
+
* We work around this problem building a new Date object which has its internal UTC
|
|
2251
|
+
* representation with the local date and time.
|
|
2252
|
+
*/
|
|
2253
|
+
private static _format;
|
|
2254
|
+
addCalendarDays(date: number, amount: number): number;
|
|
2255
|
+
addCalendarMonths(date: number, amount: number): number;
|
|
2256
|
+
addCalendarYears(date: number, amount: number): number;
|
|
2257
|
+
clone(date: number): number;
|
|
2258
|
+
createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): number;
|
|
2259
|
+
differenceInCalendarDays(dateLeft: number, dateRight: number): number;
|
|
2260
|
+
format(date: number, displayFormat: any): string;
|
|
2261
|
+
getDate(date: number): number;
|
|
2262
|
+
getDateNames(): string[];
|
|
2263
|
+
getDay(date: number): number;
|
|
2264
|
+
getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
|
|
2265
|
+
getHours(date: number): number;
|
|
2266
|
+
getMinutes(date: number): number;
|
|
2267
|
+
getMonth(date: number): number;
|
|
2268
|
+
getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
|
|
2269
|
+
getNumDaysInMonth(date: number): number;
|
|
2270
|
+
getSeconds(date: number): number;
|
|
2271
|
+
getTime(date: number): number;
|
|
2272
|
+
getYear(date: number): number;
|
|
2273
|
+
getYearName(date: number): string;
|
|
2274
|
+
invalid(): number;
|
|
2275
|
+
isDateInstance(obj: any): boolean;
|
|
2276
|
+
isEqual(dateLeft: number, dateRight: number): boolean;
|
|
2277
|
+
isSameDay(dateLeft: number, dateRight: number): boolean;
|
|
2278
|
+
isValid(date: number): boolean;
|
|
2279
|
+
now(): number;
|
|
2280
|
+
parse(value: any, parseFormat: any): number | null;
|
|
2281
|
+
setHours(date: number, amount: number): number;
|
|
2282
|
+
setMinutes(date: number, amount: number): number;
|
|
2283
|
+
setSeconds(date: number, amount: number): number;
|
|
2284
|
+
toIso8601(date: number): string;
|
|
2285
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UnixTimestampDateTimeAdapter, never>;
|
|
2286
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UnixTimestampDateTimeAdapter>;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
/**
|
|
2290
|
+
* unix-timestamp-date-time-format.class
|
|
2291
|
+
*/
|
|
2292
|
+
|
|
2293
|
+
declare const OWL_UNIX_TIMESTAMP_DATE_TIME_FORMATS: OwlDateTimeFormats;
|
|
2294
|
+
|
|
2295
|
+
declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
|
|
2296
|
+
private owlDateTimeLocale;
|
|
2297
|
+
firstMonthOfTheYear: number;
|
|
2298
|
+
firstDayOfTheWeek: number;
|
|
2299
|
+
/** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */
|
|
2300
|
+
private readonly _clampDate;
|
|
2301
|
+
/**
|
|
2302
|
+
* Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
|
|
2303
|
+
* Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
|
|
2304
|
+
* the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
|
|
2305
|
+
* will produce `'8/13/1800'`.
|
|
2306
|
+
*/
|
|
2307
|
+
useUtcForDisplay: boolean;
|
|
2308
|
+
constructor();
|
|
2309
|
+
getYear(date: Date): number;
|
|
2310
|
+
getMonth(date: Date): number;
|
|
2311
|
+
getDay(date: Date): number;
|
|
2312
|
+
getDate(date: Date): number;
|
|
2313
|
+
getHours(date: Date): number;
|
|
2314
|
+
getMinutes(date: Date): number;
|
|
2315
|
+
getSeconds(date: Date): number;
|
|
2316
|
+
getTime(date: Date): number;
|
|
2317
|
+
getNumDaysInMonth(date: Date): number;
|
|
2318
|
+
differenceInCalendarDays(dateLeft: Date, dateRight: Date): number;
|
|
2319
|
+
getYearName(date: Date): string;
|
|
2320
|
+
getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
|
|
2321
|
+
getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
|
|
2322
|
+
getDateNames(): string[];
|
|
2323
|
+
toIso8601(date: Date): string;
|
|
2324
|
+
isEqual(dateLeft: Date, dateRight: Date): boolean;
|
|
2325
|
+
isSameDay(dateLeft: Date, dateRight: Date): boolean;
|
|
2326
|
+
isValid(date: Date): boolean;
|
|
2327
|
+
invalid(): Date;
|
|
2328
|
+
isDateInstance(obj: any): boolean;
|
|
2329
|
+
addCalendarYears(date: Date, amount: number): Date;
|
|
2330
|
+
addCalendarMonths(date: Date, amount: number): Date;
|
|
2331
|
+
addCalendarDays(date: Date, amount: number): Date;
|
|
2332
|
+
setHours(date: Date, amount: number): Date;
|
|
2333
|
+
setMinutes(date: Date, amount: number): Date;
|
|
2334
|
+
setSeconds(date: Date, amount: number): Date;
|
|
2335
|
+
createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): Date;
|
|
2336
|
+
clone(date: Date): Date;
|
|
2337
|
+
now(): Date;
|
|
2338
|
+
format(date: Date, displayFormat: any): string;
|
|
2339
|
+
parse(value: any, parseFormat: any): Date | null;
|
|
2340
|
+
/**
|
|
2341
|
+
* Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
|
|
2342
|
+
* (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
|
|
2343
|
+
* invalid date for all other values.
|
|
2344
|
+
*/
|
|
2345
|
+
deserialize(value: any): Date | null;
|
|
2346
|
+
/**
|
|
2347
|
+
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
2348
|
+
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
2349
|
+
* date parsing.
|
|
2350
|
+
*/
|
|
2351
|
+
private stripDirectionalityCharacters;
|
|
2352
|
+
/**
|
|
2353
|
+
* When converting Date object to string, javascript built-in functions may return wrong
|
|
2354
|
+
* results because it applies its internal DST rules. The DST rules around the world change
|
|
2355
|
+
* very frequently, and the current valid rule is not always valid in previous years though.
|
|
2356
|
+
* We work around this problem building a new Date object which has its internal UTC
|
|
2357
|
+
* representation with the local date and time.
|
|
2358
|
+
*/
|
|
2359
|
+
private _format;
|
|
2360
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NativeDateTimeAdapter, never>;
|
|
2361
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NativeDateTimeAdapter>;
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
export { CalendarCell, DateTimeAdapter, DateView, DefaultOptions, NativeDateTimeAdapter, OWL_DATETIME_VALIDATORS, OWL_DATETIME_VALUE_ACCESSOR, OWL_DATE_TIME_FORMATS, OWL_DATE_TIME_LOCALE, OWL_DATE_TIME_LOCALE_PROVIDER, OWL_UNIX_TIMESTAMP_DATE_TIME_FORMATS, OptionsTokens, OwlCalendarBodyComponent, OwlCalendarComponent, OwlDateTimeComponent, OwlDateTimeInlineComponent, OwlDateTimeInputDirective, OwlDateTimeIntl, OwlDateTimeModule, OwlDateTimeTriggerDirective, OwlHourInputComponent, OwlMonthViewComponent, OwlMultiYearViewComponent, OwlNativeDateTimeModule, OwlTimerBoxComponent, OwlTimerComponent, OwlYearViewComponent, UnixTimestampDateTimeAdapter, defaultOptionsFactory, multiYearOptionsFactory, optionsProviders, owlDateTimeProviders, owlNativeDateTimeProviders, owlNativeDateTimeProvidersWithFormats, provideOwlDateTime, provideOwlDateTimeOptions, provideOwlDialog, provideOwlNativeDateTime, provideOwlNativeDateTimeWithFormats, provideOwlUnixTimestampDateTime, provideOwlUnixTimestampDateTimeWithFormats };
|
|
2365
|
+
export type { DateViewType, Options, OwlDateTimeFormats, PickerMode, PickerType, SelectMode };
|