nxt-pick-datetime 14.0.0 → 16.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -202
- package/assets/picker.scss +131 -126
- package/esm2020/lib/class/date-time-adapter.class.mjs +5 -20
- package/esm2020/lib/class/date-time-format.class.mjs +3 -3
- package/esm2020/lib/class/date-time.class.mjs +37 -103
- package/esm2020/lib/class/dialog-config.class.mjs +14 -23
- package/esm2020/lib/class/dialog-ref.class.mjs +11 -13
- package/esm2020/lib/date-time/calendar/calendar.component.mjs +97 -96
- package/esm2020/lib/date-time/calendar-body/calendar-body.component.mjs +40 -34
- package/esm2020/lib/date-time/calendar-month-view/calendar-month-view.component.mjs +92 -101
- package/esm2020/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.mjs +85 -86
- package/esm2020/lib/date-time/calendar-year-view/calendar-year-view.component.mjs +80 -87
- package/esm2020/lib/date-time/date-time-inline/date-time-inline.component.mjs +95 -84
- package/esm2020/lib/date-time/date-time-picker/date-time-picker.component.mjs +221 -209
- package/esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.animations.mjs +3 -2
- package/esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.component.mjs +125 -126
- package/esm2020/lib/date-time/date-time-picker-input.directive.mjs +215 -221
- package/esm2020/lib/date-time/date-time-picker-intl.service.mjs +13 -13
- package/esm2020/lib/date-time/date-time-picker-trigger.directive.mjs +21 -19
- package/esm2020/lib/date-time/date-time.module.mjs +79 -68
- package/esm2020/lib/date-time/number-fixed-len.pipe.mjs +10 -13
- package/esm2020/lib/date-time/timer/timer.component.mjs +70 -63
- package/esm2020/lib/date-time/timer-box/timer-box.component.mjs +24 -17
- package/esm2020/lib/dialog/dialog-container/dialog-container.component.mjs +55 -50
- package/esm2020/lib/dialog/dialog.module.mjs +27 -16
- package/esm2020/lib/dialog/dialog.service.mjs +66 -54
- package/esm2020/lib/utils/object.mjs +5 -3
- package/esm2020/moment-adapter/date-time-adapter.class.mjs +26 -21
- package/esm2020/moment-adapter/date-time-format.class.mjs +5 -2
- package/esm2020/moment-adapter/moment-adapter.module.mjs +19 -23
- package/esm2020/moment-adapter/nxt-pick-datetime-moment-adapter.mjs +1 -1
- package/esm2020/moment-adapter/public-api.mjs +3 -2
- package/esm2020/native-adapter/date-time-adapter.class.mjs +41 -19
- package/esm2020/native-adapter/date-time-format.class.mjs +5 -2
- package/esm2020/native-adapter/native-adapter.module.mjs +23 -21
- package/esm2020/native-adapter/nxt-pick-datetime-native-adapter.mjs +1 -1
- package/esm2020/native-adapter/public-api.mjs +2 -2
- package/esm2020/nxt-pick-datetime.mjs +1 -1
- package/esm2020/public-api.mjs +14 -14
- package/fesm2015/nxt-pick-datetime-moment-adapter.mjs +44 -40
- package/fesm2015/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
- package/fesm2015/nxt-pick-datetime-native-adapter.mjs +65 -38
- package/fesm2015/nxt-pick-datetime-native-adapter.mjs.map +1 -1
- package/fesm2015/nxt-pick-datetime.mjs +1492 -1447
- package/fesm2015/nxt-pick-datetime.mjs.map +1 -1
- package/fesm2020/nxt-pick-datetime-moment-adapter.mjs +44 -40
- package/fesm2020/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
- package/fesm2020/nxt-pick-datetime-native-adapter.mjs +65 -38
- package/fesm2020/nxt-pick-datetime-native-adapter.mjs.map +1 -1
- package/fesm2020/nxt-pick-datetime.mjs +1422 -1437
- package/fesm2020/nxt-pick-datetime.mjs.map +1 -1
- package/lib/class/date-time-adapter.class.d.ts +31 -41
- package/lib/class/date-time-format.class.d.ts +3 -3
- package/lib/class/date-time.class.d.ts +39 -51
- package/lib/class/dialog-config.class.d.ts +27 -27
- package/lib/class/dialog-ref.class.d.ts +21 -22
- package/lib/date-time/calendar/calendar.component.d.ts +66 -60
- package/lib/date-time/calendar-body/calendar-body.component.d.ts +22 -20
- package/lib/date-time/calendar-month-view/calendar-month-view.component.d.ts +57 -56
- package/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +58 -52
- package/lib/date-time/calendar-year-view/calendar-year-view.component.d.ts +51 -48
- package/lib/date-time/date-time-inline/date-time-inline.component.d.ts +69 -53
- package/lib/date-time/date-time-picker/date-time-picker.component.d.ts +106 -91
- package/lib/date-time/date-time-picker-container/date-time-picker-container.animations.d.ts +2 -1
- package/lib/date-time/date-time-picker-container/date-time-picker-container.component.d.ts +54 -47
- package/lib/date-time/date-time-picker-input.directive.d.ts +93 -78
- package/lib/date-time/date-time-picker-intl.service.d.ts +11 -11
- package/lib/date-time/date-time-picker-trigger.directive.d.ts +10 -9
- package/lib/date-time/date-time.module.d.ts +4 -4
- package/lib/date-time/number-fixed-len.pipe.d.ts +2 -1
- package/lib/date-time/timer/timer.component.d.ts +32 -30
- package/lib/date-time/timer-box/timer-box.component.d.ts +13 -11
- package/lib/dialog/dialog-container/dialog-container.component.d.ts +40 -27
- package/lib/dialog/dialog.module.d.ts +5 -4
- package/lib/dialog/dialog.service.d.ts +42 -35
- package/lib/utils/object.d.ts +2 -0
- package/moment-adapter/date-time-adapter.class.d.ts +13 -13
- package/moment-adapter/date-time-format.class.d.ts +5 -2
- package/moment-adapter/moment-adapter.module.d.ts +0 -5
- package/moment-adapter/public-api.d.ts +2 -1
- package/native-adapter/date-time-adapter.class.d.ts +7 -7
- package/native-adapter/date-time-format.class.d.ts +5 -2
- package/native-adapter/native-adapter.module.d.ts +0 -5
- package/native-adapter/public-api.d.ts +1 -1
- package/package.json +13 -11
- package/public-api.d.ts +14 -13
|
@@ -1,88 +1,95 @@
|
|
|
1
1
|
import { AnimationEvent } from '@angular/animations';
|
|
2
2
|
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
3
|
import { DateTimeAdapter } from '../../class/date-time-adapter.class';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { DateTimeDirective } from '../../class/date-time.class';
|
|
5
|
+
import { CalendarComponent } from '../calendar/calendar.component';
|
|
6
|
+
import { DateTimeIntl } from '../date-time-picker-intl.service';
|
|
7
|
+
import { TimerComponent } from '../timer/timer.component';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare class DateTimeContainerComponent<T> implements OnInit, AfterContentInit, AfterViewInit {
|
|
11
|
+
private readonly cdRef;
|
|
12
|
+
private readonly elmRef;
|
|
13
|
+
private readonly pickerIntl;
|
|
14
|
+
private readonly dateTimeAdapter;
|
|
15
|
+
calendar?: CalendarComponent<T>;
|
|
16
|
+
timer?: TimerComponent<T>;
|
|
17
|
+
picker?: DateTimeDirective<T>;
|
|
18
18
|
activeSelectedIndex: number;
|
|
19
19
|
/**
|
|
20
20
|
* Stream emits when try to hide picker
|
|
21
|
-
|
|
22
|
-
private hidePicker$;
|
|
23
|
-
|
|
21
|
+
*/
|
|
22
|
+
private readonly hidePicker$;
|
|
23
|
+
readonly hidePickerStream: import("rxjs").Observable<void>;
|
|
24
24
|
/**
|
|
25
25
|
* Stream emits when try to confirm the selected value
|
|
26
|
-
|
|
27
|
-
private confirmSelected$;
|
|
28
|
-
|
|
29
|
-
private pickerOpened$;
|
|
30
|
-
|
|
26
|
+
*/
|
|
27
|
+
private readonly confirmSelected$;
|
|
28
|
+
readonly confirmSelectedStream: import("rxjs").Observable<Event>;
|
|
29
|
+
private readonly pickerOpened$;
|
|
30
|
+
readonly pickerOpenedStream: import("rxjs").Observable<void>;
|
|
31
31
|
/**
|
|
32
32
|
* The current picker moment. This determines which time period is shown and which date is
|
|
33
33
|
* highlighted when using keyboard navigation.
|
|
34
34
|
*/
|
|
35
|
-
private _clamPickerMoment
|
|
36
|
-
get pickerMoment(): T;
|
|
37
|
-
set pickerMoment(value: T);
|
|
38
|
-
get pickerType(): PickerType;
|
|
35
|
+
private _clamPickerMoment?;
|
|
36
|
+
get pickerMoment(): T | undefined;
|
|
37
|
+
set pickerMoment(value: T | undefined);
|
|
38
|
+
get pickerType(): import("../../class/date-time.class").PickerType | undefined;
|
|
39
39
|
get cancelLabel(): string;
|
|
40
40
|
get setLabel(): string;
|
|
41
41
|
/**
|
|
42
42
|
* The range 'from' label
|
|
43
|
-
|
|
43
|
+
*/
|
|
44
44
|
get fromLabel(): string;
|
|
45
45
|
/**
|
|
46
46
|
* The range 'to' label
|
|
47
|
-
|
|
47
|
+
*/
|
|
48
48
|
get toLabel(): string;
|
|
49
49
|
/**
|
|
50
50
|
* The range 'from' formatted value
|
|
51
|
-
|
|
51
|
+
*/
|
|
52
52
|
get fromFormattedValue(): string;
|
|
53
53
|
/**
|
|
54
54
|
* The range 'to' formatted value
|
|
55
|
-
|
|
55
|
+
*/
|
|
56
56
|
get toFormattedValue(): string;
|
|
57
57
|
/**
|
|
58
58
|
* Cases in which the control buttons show in the picker
|
|
59
59
|
* 1) picker mode is 'dialog'
|
|
60
60
|
* 2) picker type is NOT 'calendar' and the picker mode is NOT 'inline'
|
|
61
|
-
|
|
61
|
+
*/
|
|
62
62
|
get showControlButtons(): boolean;
|
|
63
63
|
get containerElm(): HTMLElement;
|
|
64
|
-
|
|
65
|
-
get
|
|
66
|
-
|
|
67
|
-
get
|
|
68
|
-
|
|
69
|
-
get
|
|
70
|
-
|
|
71
|
-
|
|
64
|
+
/** @internal */
|
|
65
|
+
get containerClass(): boolean;
|
|
66
|
+
/** @internal */
|
|
67
|
+
get popupContainerClass(): boolean;
|
|
68
|
+
/** @internal */
|
|
69
|
+
get dialogContainerClass(): boolean;
|
|
70
|
+
/** @internal */
|
|
71
|
+
get inlineContainerClass(): boolean;
|
|
72
|
+
/** @internal */
|
|
73
|
+
get containerDisabledClass(): boolean;
|
|
74
|
+
/** @internal */
|
|
75
|
+
get containerId(): string | undefined;
|
|
76
|
+
/** @internal */
|
|
77
|
+
get containerAnimation(): any;
|
|
78
|
+
constructor(cdRef: ChangeDetectorRef, elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, dateTimeAdapter: DateTimeAdapter<T>);
|
|
72
79
|
ngOnInit(): void;
|
|
73
80
|
ngAfterContentInit(): void;
|
|
74
81
|
ngAfterViewInit(): void;
|
|
75
82
|
handleContainerAnimationDone(event: AnimationEvent): void;
|
|
76
|
-
dateSelected(date
|
|
77
|
-
timeSelected(time
|
|
83
|
+
dateSelected(date?: T): void;
|
|
84
|
+
timeSelected(time?: T): void;
|
|
78
85
|
/**
|
|
79
86
|
* Handle click on cancel button
|
|
80
87
|
*/
|
|
81
|
-
onCancelClicked(event:
|
|
88
|
+
onCancelClicked(event: Event): void;
|
|
82
89
|
/**
|
|
83
90
|
* Handle click on set button
|
|
84
91
|
*/
|
|
85
|
-
onSetClicked(event:
|
|
92
|
+
onSetClicked(event: Event): void;
|
|
86
93
|
/**
|
|
87
94
|
* Handle click on inform radio group
|
|
88
95
|
*/
|
|
@@ -98,7 +105,7 @@ export declare class OwlDateTimeContainerComponent<T> implements OnInit, AfterCo
|
|
|
98
105
|
private initPicker;
|
|
99
106
|
/**
|
|
100
107
|
* Select calendar date in single mode,
|
|
101
|
-
* it returns
|
|
108
|
+
* it returns undefined when date is not selected.
|
|
102
109
|
*/
|
|
103
110
|
private dateSelectedInSingleMode;
|
|
104
111
|
/**
|
|
@@ -110,13 +117,13 @@ export declare class OwlDateTimeContainerComponent<T> implements OnInit, AfterCo
|
|
|
110
117
|
* Because the calendar date has 00:00:00 as default time, if the picker type is 'both',
|
|
111
118
|
* we need to update the given calendar date's time before selecting it.
|
|
112
119
|
* if it is valid, return the updated dateTime
|
|
113
|
-
* if it is not valid, return
|
|
120
|
+
* if it is not valid, return undefined
|
|
114
121
|
*/
|
|
115
122
|
private updateAndCheckCalendarDate;
|
|
116
123
|
/**
|
|
117
124
|
* Focus to the picker
|
|
118
|
-
|
|
125
|
+
*/
|
|
119
126
|
private focusPicker;
|
|
120
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
121
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
127
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeContainerComponent<any>, never>;
|
|
128
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeContainerComponent<any>, "nxt-date-time-container", never, {}, {}, never, never, false, never>;
|
|
122
129
|
}
|
|
@@ -1,99 +1,116 @@
|
|
|
1
|
-
import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
-
import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
|
|
1
|
+
import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, OnInit, Provider, Renderer2 } from '@angular/core';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
|
|
3
3
|
import { DateTimeAdapter } from '../class/date-time-adapter.class';
|
|
4
|
-
import {
|
|
5
|
-
import { SelectMode } from '../class/date-time.class';
|
|
6
|
-
import {
|
|
4
|
+
import { DateTimeFormats } from '../class/date-time-format.class';
|
|
5
|
+
import { DateFilter, SelectMode } from '../class/date-time.class';
|
|
6
|
+
import { DateTimeComponent } from './date-time-picker/date-time-picker.component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const NXT_DATETIME_VALUE_ACCESSOR: Provider;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const NXT_DATETIME_VALIDATORS: Provider;
|
|
12
|
+
export interface DateTimeInputEvent<T> {
|
|
13
|
+
source: DateTimeInputDirective<T>;
|
|
14
|
+
value?: T | Array<T | undefined>;
|
|
15
|
+
input: HTMLInputElement;
|
|
16
|
+
}
|
|
17
|
+
export declare class DateTimeInputDirective<T> implements OnInit, AfterContentInit, OnDestroy, ControlValueAccessor, Validator {
|
|
18
|
+
private readonly elmRef;
|
|
19
|
+
private readonly renderer;
|
|
20
|
+
private readonly dateTimeAdapter;
|
|
21
|
+
private readonly dateTimeFormats;
|
|
22
|
+
/**
|
|
23
|
+
* The date & time picker this input is associated with
|
|
24
|
+
*/
|
|
25
|
+
set dateTime(value: DateTimeComponent<T>);
|
|
26
|
+
private _dateTimeFilter?;
|
|
27
|
+
/**
|
|
28
|
+
* A function to filter available date & time
|
|
29
|
+
*/
|
|
30
|
+
set dateTimeFilter(filter: DateFilter<T> | undefined);
|
|
31
|
+
get dateTimeFilter(): DateFilter<T> | undefined;
|
|
26
32
|
private _disabled;
|
|
33
|
+
/** Whether the date & time picker input is disabled */
|
|
27
34
|
get disabled(): boolean;
|
|
28
35
|
set disabled(value: boolean);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
get min(): T |
|
|
32
|
-
set min(value: T |
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
get max(): T |
|
|
36
|
-
set max(value: T |
|
|
36
|
+
private _min?;
|
|
37
|
+
/** The minimum valid date */
|
|
38
|
+
get min(): T | undefined;
|
|
39
|
+
set min(value: T | undefined);
|
|
40
|
+
private _max?;
|
|
41
|
+
/** The maximum valid date */
|
|
42
|
+
get max(): T | undefined;
|
|
43
|
+
set max(value: T | undefined);
|
|
44
|
+
private _selectMode;
|
|
37
45
|
/**
|
|
38
|
-
* The picker
|
|
46
|
+
* The picker select mode
|
|
47
|
+
*
|
|
48
|
+
* - `'single'` - select a single date
|
|
49
|
+
* - `'range'` - select a range [from, to]
|
|
50
|
+
* - `'rangeFrom'` - an open range with a fixed start date
|
|
51
|
+
* - `'rangeTo'` - an open range with a fixed end date
|
|
39
52
|
*/
|
|
40
|
-
private _selectMode;
|
|
41
53
|
get selectMode(): SelectMode;
|
|
42
54
|
set selectMode(mode: SelectMode);
|
|
43
55
|
/**
|
|
44
56
|
* The character to separate the 'from' and 'to' in input value
|
|
45
57
|
*/
|
|
46
58
|
rangeSeparator: string;
|
|
47
|
-
private _value
|
|
48
|
-
get value(): T |
|
|
49
|
-
set value(value: T |
|
|
59
|
+
private _value?;
|
|
60
|
+
get value(): T | undefined;
|
|
61
|
+
set value(value: T | undefined);
|
|
50
62
|
private _values;
|
|
51
|
-
get values(): T
|
|
52
|
-
set values(values: T
|
|
63
|
+
get values(): Array<T | undefined>;
|
|
64
|
+
set values(values: Array<T | undefined>);
|
|
53
65
|
/**
|
|
54
66
|
* Callback to invoke when `change` event is fired on this `<input>`
|
|
55
|
-
|
|
56
|
-
dateTimeChange: EventEmitter<
|
|
67
|
+
*/
|
|
68
|
+
readonly dateTimeChange: EventEmitter<DateTimeInputEvent<T>>;
|
|
57
69
|
/**
|
|
58
70
|
* Callback to invoke when an `input` event is fired on this `<input>`.
|
|
59
|
-
|
|
60
|
-
dateTimeInput: EventEmitter<
|
|
61
|
-
get elementRef(): ElementRef
|
|
71
|
+
*/
|
|
72
|
+
readonly dateTimeInput: EventEmitter<DateTimeInputEvent<T>>;
|
|
73
|
+
get elementRef(): ElementRef<HTMLInputElement>;
|
|
62
74
|
get isInSingleMode(): boolean;
|
|
63
75
|
get isInRangeMode(): boolean;
|
|
64
|
-
/** The date-time-picker that this input is associated with
|
|
65
|
-
dtPicker
|
|
66
|
-
private dtPickerSub
|
|
67
|
-
private localeSub
|
|
76
|
+
/** The date-time-picker that this input is associated with */
|
|
77
|
+
dtPicker?: DateTimeComponent<T>;
|
|
78
|
+
private dtPickerSub?;
|
|
79
|
+
private localeSub?;
|
|
68
80
|
private lastValueValid;
|
|
69
|
-
private onModelChange
|
|
70
|
-
private onModelTouched
|
|
71
|
-
private validatorOnChange
|
|
72
|
-
/** The form control validator for whether the input parses
|
|
73
|
-
private parseValidator;
|
|
74
|
-
/** The form control validator for the min date
|
|
75
|
-
private minValidator;
|
|
76
|
-
/** The form control validator for the max date
|
|
77
|
-
private maxValidator;
|
|
78
|
-
/** The form control validator for the date filter
|
|
79
|
-
private filterValidator;
|
|
81
|
+
private onModelChange?;
|
|
82
|
+
private onModelTouched?;
|
|
83
|
+
private validatorOnChange?;
|
|
84
|
+
/** The form control validator for whether the input parses */
|
|
85
|
+
private readonly parseValidator;
|
|
86
|
+
/** The form control validator for the min date */
|
|
87
|
+
private readonly minValidator;
|
|
88
|
+
/** The form control validator for the max date */
|
|
89
|
+
private readonly maxValidator;
|
|
90
|
+
/** The form control validator for the date filter */
|
|
91
|
+
private readonly filterValidator;
|
|
80
92
|
/**
|
|
81
93
|
* The form control validator for the range.
|
|
82
94
|
* Check whether the 'before' value is before the 'to' value
|
|
83
|
-
|
|
84
|
-
private rangeValidator;
|
|
85
|
-
/** The combined form control validator for this input
|
|
86
|
-
private validator;
|
|
87
|
-
/** Emits when the value changes (either due to user input or programmatic change)
|
|
88
|
-
valueChange: EventEmitter<T | T[]>;
|
|
95
|
+
*/
|
|
96
|
+
private readonly rangeValidator;
|
|
97
|
+
/** The combined form control validator for this input */
|
|
98
|
+
private readonly validator;
|
|
99
|
+
/** Emits when the value changes (either due to user input or programmatic change) */
|
|
100
|
+
readonly valueChange: EventEmitter<T | (T | undefined)[] | undefined>;
|
|
89
101
|
/** Emits when the disabled state has changed */
|
|
90
|
-
disabledChange: EventEmitter<boolean>;
|
|
91
|
-
|
|
92
|
-
get
|
|
93
|
-
|
|
94
|
-
get
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
readonly disabledChange: EventEmitter<boolean>;
|
|
103
|
+
/** @internal */
|
|
104
|
+
get inputAriaHaspopup(): boolean;
|
|
105
|
+
/** @internal */
|
|
106
|
+
get inputAriaOwns(): string | undefined;
|
|
107
|
+
/** @internal */
|
|
108
|
+
get minIso8601(): string | undefined;
|
|
109
|
+
/** @internal */
|
|
110
|
+
get maxIso8601(): string | undefined;
|
|
111
|
+
/** @internal */
|
|
112
|
+
get inputDisabled(): boolean;
|
|
113
|
+
constructor(elmRef: ElementRef<HTMLInputElement>, renderer: Renderer2, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
|
|
97
114
|
ngOnInit(): void;
|
|
98
115
|
ngAfterContentInit(): void;
|
|
99
116
|
ngOnDestroy(): void;
|
|
@@ -101,13 +118,11 @@ export declare class OwlDateTimeInputDirective<T> implements OnInit, AfterConten
|
|
|
101
118
|
registerOnChange(fn: any): void;
|
|
102
119
|
registerOnTouched(fn: any): void;
|
|
103
120
|
setDisabledState(isDisabled: boolean): void;
|
|
104
|
-
validate(c: AbstractControl):
|
|
105
|
-
[key: string]: any;
|
|
106
|
-
};
|
|
121
|
+
validate(c: AbstractControl): ValidationErrors | null;
|
|
107
122
|
registerOnValidatorChange(fn: () => void): void;
|
|
108
123
|
/**
|
|
109
|
-
* Open the picker when user hold alt +
|
|
110
|
-
|
|
124
|
+
* Open the picker when user hold alt + ArrowDown
|
|
125
|
+
*/
|
|
111
126
|
handleKeydownOnHost(event: KeyboardEvent): void;
|
|
112
127
|
handleBlurOnHost(_event: Event): void;
|
|
113
128
|
handleInputOnHost(event: any): void;
|
|
@@ -147,6 +162,6 @@ export declare class OwlDateTimeInputDirective<T> implements OnInit, AfterConten
|
|
|
147
162
|
* Check if the two value is the same
|
|
148
163
|
*/
|
|
149
164
|
private isSameValue;
|
|
150
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
151
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
165
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeInputDirective<any>, never>;
|
|
166
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeInputDirective<any>, "input[nxtDateTime]", ["nxtDateTimeInput"], { "dateTime": "nxtDateTime"; "dateTimeFilter": "dateTimeFilter"; "disabled": "disabled"; "min": "min"; "max": "max"; "selectMode": "selectMode"; "rangeSeparator": "rangeSeparator"; "value": "value"; "values": "values"; }, { "dateTimeChange": "dateTimeChange"; "dateTimeInput": "dateTimeInput"; }, never, never, false, never>;
|
|
152
167
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Subject } from 'rxjs';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class DateTimeIntl {
|
|
4
4
|
/**
|
|
5
5
|
* Stream that emits whenever the labels here are changed. Use this to notify
|
|
6
6
|
* components if the labels have changed after initialization.
|
|
@@ -18,21 +18,21 @@ export declare class OwlDateTimeIntl {
|
|
|
18
18
|
upHourLabel: string;
|
|
19
19
|
/** A label for the down hour button (used by screen readers). */
|
|
20
20
|
downHourLabel: string;
|
|
21
|
-
/** A label for the previous month button (used by screen readers)
|
|
21
|
+
/** A label for the previous month button (used by screen readers) */
|
|
22
22
|
prevMonthLabel: string;
|
|
23
|
-
/** A label for the next month button (used by screen readers)
|
|
23
|
+
/** A label for the next month button (used by screen readers) */
|
|
24
24
|
nextMonthLabel: string;
|
|
25
|
-
/** A label for the previous year button (used by screen readers)
|
|
25
|
+
/** A label for the previous year button (used by screen readers) */
|
|
26
26
|
prevYearLabel: string;
|
|
27
|
-
/** A label for the next year button (used by screen readers)
|
|
27
|
+
/** A label for the next year button (used by screen readers) */
|
|
28
28
|
nextYearLabel: string;
|
|
29
|
-
/** A label for the previous multi-year button (used by screen readers)
|
|
29
|
+
/** A label for the previous multi-year button (used by screen readers) */
|
|
30
30
|
prevMultiYearLabel: string;
|
|
31
|
-
/** A label for the next multi-year button (used by screen readers)
|
|
31
|
+
/** A label for the next multi-year button (used by screen readers) */
|
|
32
32
|
nextMultiYearLabel: string;
|
|
33
|
-
/** A label for the 'switch to month view' button (used by screen readers)
|
|
33
|
+
/** A label for the 'switch to month view' button (used by screen readers) */
|
|
34
34
|
switchToMonthViewLabel: string;
|
|
35
|
-
/** A label for the 'switch to year view' button (used by screen readers)
|
|
35
|
+
/** A label for the 'switch to year view' button (used by screen readers) */
|
|
36
36
|
switchToMultiYearViewLabel: string;
|
|
37
37
|
/** A label for the cancel button */
|
|
38
38
|
cancelBtnLabel: string;
|
|
@@ -46,6 +46,6 @@ export declare class OwlDateTimeIntl {
|
|
|
46
46
|
hour12AMLabel: string;
|
|
47
47
|
/** A label for the hour12 button (PM) */
|
|
48
48
|
hour12PMLabel: string;
|
|
49
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
50
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeIntl, never>;
|
|
50
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DateTimeIntl>;
|
|
51
51
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { AfterContentInit, ChangeDetectorRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { DateTimeComponent } from './date-time-picker/date-time-picker.component';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class
|
|
5
|
-
protected changeDetector: ChangeDetectorRef;
|
|
6
|
-
dtPicker
|
|
7
|
-
private _disabled
|
|
4
|
+
export declare class DateTimeTriggerDirective<T> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
|
|
5
|
+
protected readonly changeDetector: ChangeDetectorRef;
|
|
6
|
+
dtPicker?: DateTimeComponent<T>;
|
|
7
|
+
private _disabled?;
|
|
8
8
|
get disabled(): boolean;
|
|
9
9
|
set disabled(value: boolean);
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
/** @internal */
|
|
11
|
+
get triggerDisabledClass(): boolean;
|
|
12
|
+
private stateChanges?;
|
|
12
13
|
constructor(changeDetector: ChangeDetectorRef);
|
|
13
14
|
ngOnInit(): void;
|
|
14
15
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -16,6 +17,6 @@ export declare class OwlDateTimeTriggerDirective<T> implements OnInit, OnChanges
|
|
|
16
17
|
ngOnDestroy(): void;
|
|
17
18
|
handleClickOnHost(event: Event): void;
|
|
18
19
|
private watchStateChanges;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
20
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeTriggerDirective<any>, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeTriggerDirective<any>, "[nxtDateTimeTrigger]", never, { "dtPicker": "nxtDateTimeTrigger"; "disabled": "disabled"; }, {}, never, never, false, never>;
|
|
21
22
|
}
|
|
@@ -16,8 +16,8 @@ import * as i14 from "@angular/common";
|
|
|
16
16
|
import * as i15 from "@angular/cdk/overlay";
|
|
17
17
|
import * as i16 from "../dialog/dialog.module";
|
|
18
18
|
import * as i17 from "@angular/cdk/a11y";
|
|
19
|
-
export declare class
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
21
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<
|
|
22
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<
|
|
19
|
+
export declare class DateTimeModule {
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeModule, never>;
|
|
21
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DateTimeModule, [typeof i1.DateTimeTriggerDirective, typeof i2.DateTimeInputDirective, typeof i3.DateTimeComponent, typeof i4.DateTimeContainerComponent, typeof i5.MultiYearViewComponent, typeof i6.YearViewComponent, typeof i7.MonthViewComponent, typeof i8.TimerComponent, typeof i9.TimerBoxComponent, typeof i10.CalendarComponent, typeof i11.CalendarBodyComponent, typeof i12.NumberFixedLenPipe, typeof i13.DateTimeInlineComponent], [typeof i14.CommonModule, typeof i15.OverlayModule, typeof i16.DialogModule, typeof i17.A11yModule], [typeof i10.CalendarComponent, typeof i8.TimerComponent, typeof i1.DateTimeTriggerDirective, typeof i2.DateTimeInputDirective, typeof i3.DateTimeComponent, typeof i13.DateTimeInlineComponent, typeof i5.MultiYearViewComponent, typeof i6.YearViewComponent, typeof i7.MonthViewComponent]>;
|
|
22
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DateTimeModule>;
|
|
23
23
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/** @internal */
|
|
3
4
|
export declare class NumberFixedLenPipe implements PipeTransform {
|
|
4
|
-
transform(num: number, len: number):
|
|
5
|
+
transform(num: number | undefined, len: number | undefined): string | number | undefined;
|
|
5
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberFixedLenPipe, never>;
|
|
6
7
|
static ɵpipe: i0.ɵɵPipeDeclaration<NumberFixedLenPipe, "numberFixedLen", false>;
|
|
7
8
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnInit } from '@angular/core';
|
|
2
2
|
import { DateTimeAdapter } from '../../class/date-time-adapter.class';
|
|
3
|
-
import {
|
|
3
|
+
import { DateTimeIntl } from '../date-time-picker-intl.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class
|
|
6
|
-
private ngZone;
|
|
7
|
-
private elmRef;
|
|
8
|
-
private pickerIntl;
|
|
9
|
-
private cdRef;
|
|
10
|
-
private dateTimeAdapter;
|
|
5
|
+
export declare class TimerComponent<T> implements OnInit {
|
|
6
|
+
private readonly ngZone;
|
|
7
|
+
private readonly elmRef;
|
|
8
|
+
private readonly pickerIntl;
|
|
9
|
+
private readonly cdRef;
|
|
10
|
+
private readonly dateTimeAdapter;
|
|
11
11
|
/** The current picker moment */
|
|
12
|
-
private _pickerMoment
|
|
13
|
-
get pickerMoment(): T;
|
|
14
|
-
set pickerMoment(value: T);
|
|
15
|
-
/** The minimum selectable date time
|
|
16
|
-
private _minDateTime
|
|
17
|
-
get
|
|
18
|
-
set
|
|
19
|
-
/** The maximum selectable date time
|
|
20
|
-
private _maxDateTime
|
|
21
|
-
get
|
|
22
|
-
set
|
|
12
|
+
private _pickerMoment?;
|
|
13
|
+
get pickerMoment(): T | undefined;
|
|
14
|
+
set pickerMoment(value: T | undefined);
|
|
15
|
+
/** The minimum selectable date time */
|
|
16
|
+
private _minDateTime?;
|
|
17
|
+
get min(): T | undefined;
|
|
18
|
+
set min(value: T | undefined);
|
|
19
|
+
/** The maximum selectable date time */
|
|
20
|
+
private _maxDateTime?;
|
|
21
|
+
get max(): T | undefined;
|
|
22
|
+
set max(value: T | undefined);
|
|
23
23
|
private isPM;
|
|
24
24
|
/**
|
|
25
25
|
* Whether to show the second's timer
|
|
@@ -46,7 +46,7 @@ export declare class OwlTimerComponent<T> implements OnInit {
|
|
|
46
46
|
* The value would be displayed in hourBox.
|
|
47
47
|
* We need this because the value displayed in hourBox it not
|
|
48
48
|
* the same as the hourValue when the timer is in hour12Timer mode.
|
|
49
|
-
|
|
49
|
+
*/
|
|
50
50
|
get hourBoxValue(): number;
|
|
51
51
|
get minuteValue(): number;
|
|
52
52
|
get secondValue(): number;
|
|
@@ -57,19 +57,21 @@ export declare class OwlTimerComponent<T> implements OnInit {
|
|
|
57
57
|
get upSecondButtonLabel(): string;
|
|
58
58
|
get downSecondButtonLabel(): string;
|
|
59
59
|
get hour12ButtonLabel(): string;
|
|
60
|
-
selectedChange: EventEmitter<T>;
|
|
61
|
-
|
|
62
|
-
get
|
|
63
|
-
|
|
60
|
+
readonly selectedChange: EventEmitter<T>;
|
|
61
|
+
/** @internal */
|
|
62
|
+
get timerClass(): boolean;
|
|
63
|
+
/** @internal */
|
|
64
|
+
get timeTabIndex(): number;
|
|
65
|
+
constructor(ngZone: NgZone, elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>);
|
|
64
66
|
ngOnInit(): void;
|
|
65
67
|
/**
|
|
66
68
|
* Focus to the host element
|
|
67
|
-
|
|
69
|
+
*/
|
|
68
70
|
focus(): void;
|
|
69
71
|
/**
|
|
70
72
|
* Set the hour value via typing into timer box input
|
|
71
73
|
* We need this to handle the hour value when the timer is in hour12 mode
|
|
72
|
-
|
|
74
|
+
*/
|
|
73
75
|
setHourValueViaInput(hours: number): void;
|
|
74
76
|
setHourValue(hours: number): void;
|
|
75
77
|
setMinuteValue(minutes: number): void;
|
|
@@ -104,26 +106,26 @@ export declare class OwlTimerComponent<T> implements OnInit {
|
|
|
104
106
|
* 1 is after the comparedDate
|
|
105
107
|
* -1 is before the comparedDate
|
|
106
108
|
* 0 is equal the comparedDate
|
|
107
|
-
|
|
109
|
+
*/
|
|
108
110
|
private compareHours;
|
|
109
111
|
/**
|
|
110
112
|
* PickerMoment's minute value +/- certain amount and compare it to the give date
|
|
111
113
|
* 1 is after the comparedDate
|
|
112
114
|
* -1 is before the comparedDate
|
|
113
115
|
* 0 is equal the comparedDate
|
|
114
|
-
|
|
116
|
+
*/
|
|
115
117
|
private compareMinutes;
|
|
116
118
|
/**
|
|
117
119
|
* PickerMoment's second value +/- certain amount and compare it to the give date
|
|
118
120
|
* 1 is after the comparedDate
|
|
119
121
|
* -1 is before the comparedDate
|
|
120
122
|
* 0 is equal the comparedDate
|
|
121
|
-
|
|
123
|
+
*/
|
|
122
124
|
private compareSeconds;
|
|
123
125
|
/**
|
|
124
126
|
* Get a valid date object
|
|
125
127
|
*/
|
|
126
128
|
private getValidDate;
|
|
127
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
128
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
129
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimerComponent<any>, never>;
|
|
130
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TimerComponent<any>, "nxt-date-time-timer", never, { "pickerMoment": "pickerMoment"; "min": "min"; "max": "max"; "showSecondsTimer": "showSecondsTimer"; "hour12Timer": "hour12Timer"; "stepHour": "stepHour"; "stepMinute": "stepMinute"; "stepSecond": "stepSecond"; }, { "selectedChange": "selectedChange"; }, never, never, false, never>;
|
|
129
131
|
}
|