nxt-pick-datetime 13.0.1 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +130 -147
- package/assets/picker.scss +88 -93
- package/esm2020/lib/class/date-time-adapter.class.mjs +8 -8
- package/esm2020/lib/class/date-time-format.class.mjs +2 -2
- package/esm2020/lib/class/date-time.class.mjs +54 -71
- package/esm2020/lib/class/dialog-config.class.mjs +3 -13
- package/esm2020/lib/class/dialog-ref.class.mjs +9 -10
- package/esm2020/lib/date-time/calendar/calendar.component.mjs +89 -94
- package/esm2020/lib/date-time/calendar-body/calendar-body.component.mjs +32 -28
- package/esm2020/lib/date-time/calendar-month-view/calendar-month-view.component.mjs +71 -80
- package/esm2020/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.mjs +57 -63
- package/esm2020/lib/date-time/calendar-year-view/calendar-year-view.component.mjs +57 -68
- package/esm2020/lib/date-time/date-time-inline/date-time-inline.component.mjs +68 -78
- package/esm2020/lib/date-time/date-time-picker/date-time-picker.component.mjs +164 -182
- package/esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.animations.mjs +2 -2
- package/esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.component.mjs +109 -117
- package/esm2020/lib/date-time/date-time-picker-input.directive.mjs +185 -203
- package/esm2020/lib/date-time/date-time-picker-intl.service.mjs +5 -5
- package/esm2020/lib/date-time/date-time-picker-trigger.directive.mjs +20 -19
- package/esm2020/lib/date-time/date-time.module.mjs +79 -71
- package/esm2020/lib/date-time/number-fixed-len.pipe.mjs +9 -13
- package/esm2020/lib/date-time/timer/timer.component.mjs +64 -59
- package/esm2020/lib/date-time/timer-box/timer-box.component.mjs +22 -17
- package/esm2020/lib/dialog/dialog-container/dialog-container.component.mjs +44 -49
- package/esm2020/lib/dialog/dialog.module.mjs +26 -19
- package/esm2020/lib/dialog/dialog.service.mjs +52 -49
- package/esm2020/lib/utils/object.mjs +3 -3
- package/esm2020/moment-adapter/date-time-adapter.class.mjs +17 -16
- package/esm2020/moment-adapter/date-time-format.class.mjs +2 -2
- package/esm2020/moment-adapter/moment-adapter.module.mjs +18 -22
- package/esm2020/moment-adapter/nxt-pick-datetime-moment-adapter.mjs +1 -1
- package/esm2020/moment-adapter/public-api.mjs +2 -2
- package/esm2020/native-adapter/date-time-adapter.class.mjs +13 -13
- package/esm2020/native-adapter/date-time-format.class.mjs +2 -2
- package/esm2020/native-adapter/native-adapter.module.mjs +24 -22
- 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 +33 -35
- package/fesm2015/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
- package/fesm2015/nxt-pick-datetime-native-adapter.mjs +36 -33
- package/fesm2015/nxt-pick-datetime-native-adapter.mjs.map +1 -1
- package/fesm2015/nxt-pick-datetime.mjs +1234 -1257
- package/fesm2015/nxt-pick-datetime.mjs.map +1 -1
- package/fesm2020/nxt-pick-datetime-moment-adapter.mjs +33 -35
- package/fesm2020/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
- package/fesm2020/nxt-pick-datetime-native-adapter.mjs +36 -33
- package/fesm2020/nxt-pick-datetime-native-adapter.mjs.map +1 -1
- package/fesm2020/nxt-pick-datetime.mjs +1164 -1247
- package/fesm2020/nxt-pick-datetime.mjs.map +1 -1
- package/lib/class/date-time-adapter.class.d.ts +31 -31
- package/lib/class/date-time-format.class.d.ts +2 -2
- package/lib/class/date-time.class.d.ts +24 -23
- package/lib/class/dialog-config.class.d.ts +5 -5
- package/lib/class/dialog-ref.class.d.ts +16 -17
- package/lib/date-time/calendar/calendar.component.d.ts +41 -41
- package/lib/date-time/calendar-body/calendar-body.component.d.ts +11 -11
- package/lib/date-time/calendar-month-view/calendar-month-view.component.d.ts +40 -40
- package/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +38 -38
- package/lib/date-time/calendar-year-view/calendar-year-view.component.d.ts +36 -36
- package/lib/date-time/date-time-inline/date-time-inline.component.d.ts +38 -40
- package/lib/date-time/date-time-picker/date-time-picker.component.d.ts +51 -53
- package/lib/date-time/date-time-picker-container/date-time-picker-container.animations.d.ts +1 -1
- package/lib/date-time/date-time-picker-container/date-time-picker-container.component.d.ts +38 -39
- package/lib/date-time/date-time-picker-input.directive.d.ts +59 -53
- package/lib/date-time/date-time-picker-intl.service.d.ts +3 -3
- package/lib/date-time/date-time-picker-trigger.directive.d.ts +9 -9
- package/lib/date-time/date-time.module.d.ts +4 -4
- package/lib/date-time/number-fixed-len.pipe.d.ts +2 -2
- package/lib/date-time/timer/timer.component.d.ts +22 -22
- package/lib/date-time/timer-box/timer-box.component.d.ts +10 -10
- package/lib/dialog/dialog-container/dialog-container.component.d.ts +28 -24
- package/lib/dialog/dialog.module.d.ts +4 -4
- package/lib/dialog/dialog.service.d.ts +28 -28
- package/moment-adapter/date-time-adapter.class.d.ts +9 -9
- package/moment-adapter/date-time-format.class.d.ts +2 -2
- package/moment-adapter/moment-adapter.module.d.ts +0 -5
- package/moment-adapter/public-api.d.ts +1 -1
- package/native-adapter/date-time-adapter.class.d.ts +6 -6
- package/native-adapter/date-time-format.class.d.ts +2 -2
- package/native-adapter/native-adapter.module.d.ts +0 -5
- package/native-adapter/public-api.d.ts +1 -1
- package/package.json +17 -15
- package/public-api.d.ts +13 -13
- package/moment-adapter/package.json +0 -10
- package/native-adapter/package.json +0 -10
- /package/{nxt-pick-datetime.d.ts → index.d.ts} +0 -0
- /package/moment-adapter/{nxt-pick-datetime-moment-adapter.d.ts → index.d.ts} +0 -0
- /package/native-adapter/{nxt-pick-datetime-native-adapter.d.ts → index.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { Observable, Subject } from 'rxjs';
|
|
3
3
|
/** InjectionToken for date time picker that can be used to override default locale code. */
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const NXT_DATE_TIME_LOCALE: InjectionToken<string>;
|
|
5
5
|
/** @docs-private */
|
|
6
|
-
export declare function
|
|
7
|
-
/** Provider for
|
|
8
|
-
export declare const
|
|
6
|
+
export declare function NXT_DATE_TIME_LOCALE_FACTORY(): string;
|
|
7
|
+
/** Provider for NXT_DATE_TIME_LOCALE injection token. */
|
|
8
|
+
export declare const NXT_DATE_TIME_LOCALE_PROVIDER: {
|
|
9
9
|
provide: InjectionToken<string>;
|
|
10
10
|
useExisting: InjectionToken<string>;
|
|
11
11
|
};
|
|
@@ -22,53 +22,53 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
22
22
|
/**
|
|
23
23
|
* Get the year of the given date
|
|
24
24
|
*/
|
|
25
|
-
abstract getYear(date
|
|
25
|
+
abstract getYear(date?: T): number;
|
|
26
26
|
/**
|
|
27
27
|
* Get the month of the given date
|
|
28
28
|
* 0 -- January
|
|
29
29
|
* 11 -- December
|
|
30
30
|
* */
|
|
31
|
-
abstract getMonth(date
|
|
31
|
+
abstract getMonth(date?: T): number;
|
|
32
32
|
/**
|
|
33
33
|
* Get the day of the week of the given date
|
|
34
34
|
* 0 -- Sunday
|
|
35
35
|
* 6 -- Saturday
|
|
36
36
|
* */
|
|
37
|
-
abstract getDay(date
|
|
37
|
+
abstract getDay(date?: T): number;
|
|
38
38
|
/**
|
|
39
39
|
* Get the day num of the given date
|
|
40
40
|
*/
|
|
41
|
-
abstract getDate(date
|
|
41
|
+
abstract getDate(date?: T): number;
|
|
42
42
|
/**
|
|
43
43
|
* Get the hours of the given date
|
|
44
44
|
*/
|
|
45
|
-
abstract getHours(date
|
|
45
|
+
abstract getHours(date?: T): number;
|
|
46
46
|
/**
|
|
47
47
|
* Get the minutes of the given date
|
|
48
48
|
*/
|
|
49
|
-
abstract getMinutes(date
|
|
49
|
+
abstract getMinutes(date?: T): number;
|
|
50
50
|
/**
|
|
51
51
|
* Get the seconds of the given date
|
|
52
52
|
*/
|
|
53
|
-
abstract getSeconds(date
|
|
53
|
+
abstract getSeconds(date?: T): number;
|
|
54
54
|
/**
|
|
55
55
|
* Get the milliseconds timestamp of the given date
|
|
56
56
|
*/
|
|
57
|
-
abstract getTime(date
|
|
57
|
+
abstract getTime(date?: T): number;
|
|
58
58
|
/**
|
|
59
59
|
* Gets the number of days in the month of the given date.
|
|
60
60
|
*/
|
|
61
|
-
abstract getNumDaysInMonth(date
|
|
61
|
+
abstract getNumDaysInMonth(date?: T): number;
|
|
62
62
|
/**
|
|
63
63
|
* Get the number of calendar days between the given dates.
|
|
64
64
|
* If dateLeft is before dateRight, it would return positive value
|
|
65
65
|
* If dateLeft is after dateRight, it would return negative value
|
|
66
66
|
*/
|
|
67
|
-
abstract differenceInCalendarDays(dateLeft
|
|
67
|
+
abstract differenceInCalendarDays(dateLeft?: T, dateRight?: T): number | undefined;
|
|
68
68
|
/**
|
|
69
69
|
* Gets the name for the year of the given date.
|
|
70
70
|
*/
|
|
71
|
-
abstract getYearName(date
|
|
71
|
+
abstract getYearName(date?: T): string;
|
|
72
72
|
/**
|
|
73
73
|
* Get a list of month names
|
|
74
74
|
*/
|
|
@@ -88,15 +88,15 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
88
88
|
/**
|
|
89
89
|
* Check if the give dates are equal
|
|
90
90
|
*/
|
|
91
|
-
abstract isEqual(dateLeft
|
|
91
|
+
abstract isEqual(dateLeft?: T, dateRight?: T): boolean;
|
|
92
92
|
/**
|
|
93
93
|
* Check if the give dates are the same day
|
|
94
94
|
*/
|
|
95
|
-
abstract isSameDay(dateLeft
|
|
95
|
+
abstract isSameDay(dateLeft?: T, dateRight?: T): boolean;
|
|
96
96
|
/**
|
|
97
97
|
* Checks whether the given date is valid.
|
|
98
98
|
*/
|
|
99
|
-
abstract isValid(date
|
|
99
|
+
abstract isValid(date?: T): boolean;
|
|
100
100
|
/**
|
|
101
101
|
* Gets date instance that is not valid.
|
|
102
102
|
*/
|
|
@@ -108,27 +108,27 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
108
108
|
/**
|
|
109
109
|
* Add the specified number of years to the given date
|
|
110
110
|
*/
|
|
111
|
-
abstract addCalendarYears(date: T, amount: number): T;
|
|
111
|
+
abstract addCalendarYears(date: T | undefined, amount: number): T;
|
|
112
112
|
/**
|
|
113
113
|
* Add the specified number of months to the given date
|
|
114
114
|
*/
|
|
115
|
-
abstract addCalendarMonths(date: T, amount: number): T;
|
|
115
|
+
abstract addCalendarMonths(date: T | undefined, amount: number): T;
|
|
116
116
|
/**
|
|
117
117
|
* Add the specified number of days to the given date
|
|
118
118
|
*/
|
|
119
|
-
abstract addCalendarDays(date: T, amount: number): T;
|
|
119
|
+
abstract addCalendarDays(date: T | undefined, amount: number): T;
|
|
120
120
|
/**
|
|
121
121
|
* Set the hours to the given date.
|
|
122
122
|
*/
|
|
123
|
-
abstract setHours(date: T, amount: number): T;
|
|
123
|
+
abstract setHours(date: T | undefined, amount: number): T;
|
|
124
124
|
/**
|
|
125
125
|
* Set the minutes to the given date.
|
|
126
126
|
*/
|
|
127
|
-
abstract setMinutes(date: T, amount: number): T;
|
|
127
|
+
abstract setMinutes(date: T | undefined, amount: number): T;
|
|
128
128
|
/**
|
|
129
129
|
* Set the seconds to the given date.
|
|
130
130
|
*/
|
|
131
|
-
abstract setSeconds(date: T, amount: number): T;
|
|
131
|
+
abstract setSeconds(date: T | undefined, amount: number): T;
|
|
132
132
|
/**
|
|
133
133
|
* Creates a date with the given year, month, date, hour, minute and second. Does not allow over/under-flow of the
|
|
134
134
|
* month and date.
|
|
@@ -138,7 +138,7 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
138
138
|
/**
|
|
139
139
|
* Clone the given date
|
|
140
140
|
*/
|
|
141
|
-
abstract clone(date
|
|
141
|
+
abstract clone(date?: T): T;
|
|
142
142
|
/**
|
|
143
143
|
* Get a new moment
|
|
144
144
|
* */
|
|
@@ -146,25 +146,25 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
146
146
|
/**
|
|
147
147
|
* Formats a date as a string according to the given format.
|
|
148
148
|
*/
|
|
149
|
-
abstract format(date: T, displayFormat: any): string;
|
|
149
|
+
abstract format(date: T | undefined, displayFormat: any): string;
|
|
150
150
|
/**
|
|
151
151
|
* Parse a user-provided value to a Date Object
|
|
152
152
|
*/
|
|
153
|
-
abstract parse(value: any, parseFormat: any): T |
|
|
153
|
+
abstract parse(value: any, parseFormat: any): T | undefined;
|
|
154
154
|
/**
|
|
155
155
|
* Compare two given dates
|
|
156
156
|
* 1 if the first date is after the second,
|
|
157
157
|
* -1 if the first date is before the second
|
|
158
158
|
* 0 if dates are equal.
|
|
159
159
|
* */
|
|
160
|
-
compare(first
|
|
160
|
+
compare(first?: T, second?: T): number;
|
|
161
161
|
/**
|
|
162
162
|
* Check if two given dates are in the same year
|
|
163
163
|
* 1 if the first date's year is after the second,
|
|
164
164
|
* -1 if the first date's year is before the second
|
|
165
165
|
* 0 if two given dates are in the same year
|
|
166
166
|
* */
|
|
167
|
-
compareYear(first
|
|
167
|
+
compareYear(first?: T, second?: T): number;
|
|
168
168
|
/**
|
|
169
169
|
* Attempts to deserialize a value to a valid date object. This is different from parsing in that
|
|
170
170
|
* deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
|
|
@@ -174,7 +174,7 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
174
174
|
* support passing values from your backend directly to these properties by overriding this method
|
|
175
175
|
* to also deserialize the format used by your backend.
|
|
176
176
|
*/
|
|
177
|
-
deserialize(value: any): T |
|
|
177
|
+
deserialize(value: any): T | undefined;
|
|
178
178
|
/**
|
|
179
179
|
* Sets the locale used for all dates.
|
|
180
180
|
*/
|
|
@@ -182,5 +182,5 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
182
182
|
/**
|
|
183
183
|
* Clamp the given date between min and max dates.
|
|
184
184
|
*/
|
|
185
|
-
clampDate(date: T, min?: T
|
|
185
|
+
clampDate(date: T, min?: T, max?: T): T;
|
|
186
186
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export interface
|
|
2
|
+
export interface DateTimeFormats {
|
|
3
3
|
parseInput: any;
|
|
4
4
|
fullPickerInput: any;
|
|
5
5
|
datePickerInput: any;
|
|
@@ -9,4 +9,4 @@ export interface OwlDateTimeFormats {
|
|
|
9
9
|
monthYearA11yLabel: any;
|
|
10
10
|
}
|
|
11
11
|
/** InjectionToken for date time picker that can be used to override default format. */
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const NXT_DATE_TIME_FORMATS: InjectionToken<DateTimeFormats>;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { DateTimeAdapter } from './date-time-adapter.class';
|
|
3
|
-
import {
|
|
3
|
+
import { DateTimeFormats } from './date-time-format.class';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
protected
|
|
5
|
+
export type PickerType = 'both' | 'calendar' | 'timer';
|
|
6
|
+
export type PickerMode = 'popup' | 'dialog' | 'inline';
|
|
7
|
+
export type SelectMode = 'single' | 'range' | 'rangeFrom' | 'rangeTo';
|
|
8
|
+
export type RenderItem = 'year' | 'month' | 'date';
|
|
9
|
+
export type ViewType = 'month' | 'year' | 'multi-years';
|
|
10
|
+
export type DateFilter<T> = (date?: T, forRender?: RenderItem) => boolean;
|
|
11
|
+
export declare abstract class DateTimeDirective<T> {
|
|
12
|
+
protected readonly dateTimeAdapter: DateTimeAdapter<T>;
|
|
13
|
+
protected readonly dateTimeFormats: DateTimeFormats;
|
|
13
14
|
/**
|
|
14
15
|
* Whether to show the second's timer
|
|
15
16
|
*/
|
|
@@ -25,7 +26,7 @@ export declare abstract class OwlDateTimeDirective<T> {
|
|
|
25
26
|
/**
|
|
26
27
|
* The view that the calendar should start in.
|
|
27
28
|
*/
|
|
28
|
-
startView:
|
|
29
|
+
startView: ViewType;
|
|
29
30
|
/**
|
|
30
31
|
* Hours to change per step
|
|
31
32
|
*/
|
|
@@ -58,19 +59,19 @@ export declare abstract class OwlDateTimeDirective<T> {
|
|
|
58
59
|
set hideOtherMonths(val: boolean);
|
|
59
60
|
private _id;
|
|
60
61
|
get id(): string;
|
|
61
|
-
abstract get selected(): T |
|
|
62
|
-
abstract get selecteds(): T
|
|
63
|
-
abstract get dateTimeFilter(): (date: T |
|
|
64
|
-
abstract get
|
|
65
|
-
abstract get
|
|
66
|
-
abstract get selectMode(): SelectMode;
|
|
67
|
-
abstract get startAt(): T |
|
|
62
|
+
abstract get selected(): T | undefined;
|
|
63
|
+
abstract get selecteds(): Array<T | undefined>;
|
|
64
|
+
abstract get dateTimeFilter(): ((date: T | undefined) => boolean) | undefined;
|
|
65
|
+
abstract get max(): T | undefined;
|
|
66
|
+
abstract get min(): T | undefined;
|
|
67
|
+
abstract get selectMode(): SelectMode | undefined;
|
|
68
|
+
abstract get startAt(): T | undefined;
|
|
68
69
|
abstract get opened(): boolean;
|
|
69
70
|
abstract get pickerMode(): PickerMode;
|
|
70
71
|
abstract get pickerType(): PickerType;
|
|
71
72
|
abstract get isInSingleMode(): boolean;
|
|
72
73
|
abstract get isInRangeMode(): boolean;
|
|
73
|
-
abstract select(date: T | T
|
|
74
|
+
abstract select(date: T | Array<T | undefined>): void;
|
|
74
75
|
abstract yearSelected: EventEmitter<T>;
|
|
75
76
|
abstract monthSelected: EventEmitter<T>;
|
|
76
77
|
abstract selectYear(normalizedYear: T): void;
|
|
@@ -79,10 +80,10 @@ export declare abstract class OwlDateTimeDirective<T> {
|
|
|
79
80
|
/**
|
|
80
81
|
* Date Time Checker to check if the give dateTime is selectable
|
|
81
82
|
*/
|
|
82
|
-
dateTimeChecker: (dateTime: T) => boolean;
|
|
83
|
+
dateTimeChecker: (dateTime: T | undefined) => boolean;
|
|
83
84
|
get disabled(): boolean;
|
|
84
|
-
constructor(dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats:
|
|
85
|
-
protected getValidDate(obj: any): T |
|
|
86
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
87
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
85
|
+
constructor(dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
|
|
86
|
+
protected getValidDate(obj: any): T | undefined;
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeDirective<any>, never>;
|
|
88
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeDirective<any>, never, never, { "showSecondsTimer": "showSecondsTimer"; "hour12Timer": "hour12Timer"; "startView": "startView"; "stepHour": "stepHour"; "stepMinute": "stepMinute"; "stepSecond": "stepSecond"; "firstDayOfWeek": "firstDayOfWeek"; "hideOtherMonths": "hideOtherMonths"; }, {}, never, never, false, never>;
|
|
88
89
|
}
|
|
@@ -11,17 +11,17 @@ export interface DialogPosition {
|
|
|
11
11
|
/** Override for the dialog's right position. */
|
|
12
12
|
right?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare class
|
|
14
|
+
export declare class DialogConfig {
|
|
15
15
|
/**
|
|
16
16
|
* ID of the element that describes the dialog.
|
|
17
17
|
*/
|
|
18
|
-
ariaDescribedBy?: string
|
|
18
|
+
ariaDescribedBy?: string;
|
|
19
19
|
/**
|
|
20
20
|
* Whether to focus the dialog when the dialog is opened
|
|
21
21
|
*/
|
|
22
|
-
autoFocus
|
|
22
|
+
autoFocus: boolean;
|
|
23
23
|
/** Whether the dialog has a backdrop. */
|
|
24
|
-
hasBackdrop?: boolean;
|
|
24
|
+
hasBackdrop?: boolean | undefined;
|
|
25
25
|
/**
|
|
26
26
|
* Custom style for the backdrop
|
|
27
27
|
* */
|
|
@@ -29,7 +29,7 @@ export declare class OwlDialogConfig {
|
|
|
29
29
|
/** Data being injected into the child component. */
|
|
30
30
|
data?: any;
|
|
31
31
|
/** Whether the user can use escape or clicking outside to close a modal. */
|
|
32
|
-
disableClose?: boolean;
|
|
32
|
+
disableClose?: boolean | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* ID for the modal. If omitted, a unique one will be generated.
|
|
35
35
|
*/
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
import { OverlayRef } from '@angular/cdk/overlay';
|
|
2
2
|
import { Location } from '@angular/common';
|
|
3
|
-
import {
|
|
4
|
-
import { OwlDialogContainerComponent } from '../dialog/dialog-container/dialog-container.component';
|
|
3
|
+
import { DialogContainerComponent } from '../dialog/dialog-container/dialog-container.component';
|
|
5
4
|
import { DialogPosition } from './dialog-config.class';
|
|
6
|
-
export declare class
|
|
7
|
-
private overlayRef;
|
|
8
|
-
private container;
|
|
9
|
-
readonly id
|
|
5
|
+
export declare class DialogRef<T> {
|
|
6
|
+
private readonly overlayRef;
|
|
7
|
+
private readonly container;
|
|
8
|
+
readonly id?: string | undefined;
|
|
10
9
|
private result;
|
|
11
|
-
private _beforeClose$;
|
|
12
|
-
private _afterOpen$;
|
|
13
|
-
private _afterClosed$;
|
|
10
|
+
private readonly _beforeClose$;
|
|
11
|
+
private readonly _afterOpen$;
|
|
12
|
+
private readonly _afterClosed$;
|
|
14
13
|
/** Subscription to changes in the user's location. */
|
|
15
|
-
private locationChanged
|
|
14
|
+
private locationChanged?;
|
|
16
15
|
/**
|
|
17
16
|
* The instance of component opened into modal
|
|
18
17
|
* */
|
|
19
|
-
componentInstance
|
|
18
|
+
componentInstance?: T;
|
|
20
19
|
/** Whether the user is allowed to close the dialog. */
|
|
21
20
|
disableClose: boolean;
|
|
22
|
-
constructor(overlayRef: OverlayRef, container:
|
|
21
|
+
constructor(overlayRef: OverlayRef, container: DialogContainerComponent, id?: string | undefined, location?: Location);
|
|
23
22
|
close(dialogResult?: any): void;
|
|
24
23
|
/**
|
|
25
24
|
* Gets an observable that emits when the overlay's backdrop has been clicked.
|
|
26
25
|
*/
|
|
27
|
-
backdropClick(): Observable<
|
|
26
|
+
backdropClick(): import("rxjs").Observable<MouseEvent>;
|
|
28
27
|
/**
|
|
29
28
|
* Gets an observable that emits when keydown events are targeted on the overlay.
|
|
30
29
|
*/
|
|
31
|
-
keydownEvents(): Observable<KeyboardEvent>;
|
|
30
|
+
keydownEvents(): import("rxjs").Observable<KeyboardEvent>;
|
|
32
31
|
/**
|
|
33
32
|
* Updates the dialog's position.
|
|
34
33
|
*
|
|
@@ -43,9 +42,9 @@ export declare class OwlDialogRef<T> {
|
|
|
43
42
|
*/
|
|
44
43
|
updateSize(width?: string, height?: string): this;
|
|
45
44
|
isAnimating(): boolean;
|
|
46
|
-
afterOpen(): Observable<
|
|
47
|
-
beforeClose(): Observable<
|
|
48
|
-
afterClosed(): Observable<
|
|
45
|
+
afterOpen(): import("rxjs").Observable<void>;
|
|
46
|
+
beforeClose(): import("rxjs").Observable<void>;
|
|
47
|
+
afterClosed(): import("rxjs").Observable<void>;
|
|
49
48
|
/** Fetches the position strategy object from the overlay ref. */
|
|
50
49
|
private getPositionStrategy;
|
|
51
50
|
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { AfterContentInit, AfterViewChecked, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { DateTimeAdapter } from '../../class/date-time-adapter.class';
|
|
3
|
-
import {
|
|
3
|
+
import { DateTimeFormats } from '../../class/date-time-format.class';
|
|
4
4
|
import { DateFilter, SelectMode } from '../../class/date-time.class';
|
|
5
|
-
import {
|
|
5
|
+
import { DateTimeIntl } from '../date-time-picker-intl.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
8
|
-
private elmRef;
|
|
9
|
-
private pickerIntl;
|
|
10
|
-
private ngZone;
|
|
11
|
-
private cdRef;
|
|
12
|
-
private dateTimeAdapter;
|
|
13
|
-
private dateTimeFormats;
|
|
7
|
+
export declare class CalendarComponent<T> implements OnInit, AfterContentInit, AfterViewChecked, OnDestroy {
|
|
8
|
+
private readonly elmRef;
|
|
9
|
+
private readonly pickerIntl;
|
|
10
|
+
private readonly ngZone;
|
|
11
|
+
private readonly cdRef;
|
|
12
|
+
private readonly dateTimeAdapter;
|
|
13
|
+
private readonly dateTimeFormats;
|
|
14
14
|
/**
|
|
15
15
|
* Date filter for the month and year view
|
|
16
16
|
* */
|
|
17
|
-
dateFilter
|
|
17
|
+
dateFilter?: DateFilter<T>;
|
|
18
18
|
/**
|
|
19
19
|
* Set the first day of week
|
|
20
20
|
*/
|
|
21
21
|
firstDayOfWeek: number;
|
|
22
22
|
/** The minimum selectable date. */
|
|
23
|
-
private _minDate
|
|
24
|
-
get
|
|
25
|
-
set
|
|
23
|
+
private _minDate?;
|
|
24
|
+
get min(): T | undefined;
|
|
25
|
+
set min(value: T | undefined);
|
|
26
26
|
/** The maximum selectable date. */
|
|
27
|
-
private _maxDate
|
|
28
|
-
get
|
|
29
|
-
set
|
|
27
|
+
private _maxDate?;
|
|
28
|
+
get max(): T | undefined;
|
|
29
|
+
set max(value: T | undefined);
|
|
30
30
|
/** The current picker moment */
|
|
31
|
-
private _pickerMoment
|
|
32
|
-
get pickerMoment(): T;
|
|
33
|
-
set pickerMoment(value: T);
|
|
34
|
-
selectMode
|
|
31
|
+
private _pickerMoment?;
|
|
32
|
+
get pickerMoment(): T | undefined;
|
|
33
|
+
set pickerMoment(value: T | undefined);
|
|
34
|
+
selectMode?: SelectMode;
|
|
35
35
|
/** The currently selected moment. */
|
|
36
|
-
private _selected
|
|
37
|
-
get selected(): T |
|
|
38
|
-
set selected(value: T |
|
|
36
|
+
private _selected?;
|
|
37
|
+
get selected(): T | undefined;
|
|
38
|
+
set selected(value: T | undefined);
|
|
39
39
|
private _selecteds;
|
|
40
|
-
get selecteds(): T
|
|
41
|
-
set selecteds(values: T
|
|
40
|
+
get selecteds(): Array<T | undefined>;
|
|
41
|
+
set selecteds(values: Array<T | undefined>);
|
|
42
42
|
/**
|
|
43
43
|
* The view that the calendar should start in.
|
|
44
44
|
*/
|
|
@@ -48,11 +48,11 @@ export declare class OwlCalendarComponent<T> implements OnInit, AfterContentInit
|
|
|
48
48
|
* */
|
|
49
49
|
hideOtherMonths: boolean;
|
|
50
50
|
/** Emits when the currently picker moment changes. */
|
|
51
|
-
pickerMomentChange: EventEmitter<T>;
|
|
51
|
+
readonly pickerMomentChange: EventEmitter<T>;
|
|
52
52
|
/** Emits when the currently selected date changes. */
|
|
53
|
-
selectedChange: EventEmitter<T>;
|
|
53
|
+
readonly selectedChange: EventEmitter<T | undefined>;
|
|
54
54
|
/** Emits when any date is selected. */
|
|
55
|
-
userSelection: EventEmitter<void>;
|
|
55
|
+
readonly userSelection: EventEmitter<void>;
|
|
56
56
|
/**
|
|
57
57
|
* Emits the selected year. This doesn't imply a change on the selected date
|
|
58
58
|
* */
|
|
@@ -63,11 +63,11 @@ export declare class OwlCalendarComponent<T> implements OnInit, AfterContentInit
|
|
|
63
63
|
readonly monthSelected: EventEmitter<T>;
|
|
64
64
|
get periodButtonText(): string;
|
|
65
65
|
get periodButtonLabel(): string;
|
|
66
|
-
get prevButtonLabel(): string;
|
|
67
|
-
get nextButtonLabel(): string;
|
|
68
|
-
private _currentView
|
|
69
|
-
get currentView(): 'month' | 'year' | 'multi-years';
|
|
70
|
-
set currentView(view: 'month' | 'year' | 'multi-years');
|
|
66
|
+
get prevButtonLabel(): string | undefined;
|
|
67
|
+
get nextButtonLabel(): string | undefined;
|
|
68
|
+
private _currentView?;
|
|
69
|
+
get currentView(): 'month' | 'year' | 'multi-years' | undefined;
|
|
70
|
+
set currentView(view: 'month' | 'year' | 'multi-years' | undefined);
|
|
71
71
|
get isInSingleMode(): boolean;
|
|
72
72
|
get isInRangeMode(): boolean;
|
|
73
73
|
get showControlArrows(): boolean;
|
|
@@ -75,19 +75,19 @@ export declare class OwlCalendarComponent<T> implements OnInit, AfterContentInit
|
|
|
75
75
|
/**
|
|
76
76
|
* Date filter for the month and year view
|
|
77
77
|
*/
|
|
78
|
-
dateFilterForViews: (date
|
|
78
|
+
dateFilterForViews: (date?: T) => boolean;
|
|
79
79
|
/**
|
|
80
|
-
* Bind class '
|
|
80
|
+
* Bind class 'nxt-dt-calendar' to host
|
|
81
81
|
* */
|
|
82
|
-
get
|
|
83
|
-
private intlChangesSub
|
|
82
|
+
get calendarClass(): boolean;
|
|
83
|
+
private intlChangesSub?;
|
|
84
84
|
/**
|
|
85
85
|
* Used for scheduling that focus should be moved to the active cell on the next tick.
|
|
86
86
|
* We need to schedule it, rather than do it immediately, because we have to wait
|
|
87
87
|
* for Angular to re-evaluate the view children.
|
|
88
88
|
*/
|
|
89
89
|
private moveFocusOnNextTick;
|
|
90
|
-
constructor(elmRef: ElementRef
|
|
90
|
+
constructor(elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, ngZone: NgZone, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
|
|
91
91
|
ngOnInit(): void;
|
|
92
92
|
ngAfterContentInit(): void;
|
|
93
93
|
ngAfterViewChecked(): void;
|
|
@@ -104,7 +104,7 @@ export declare class OwlCalendarComponent<T> implements OnInit, AfterContentInit
|
|
|
104
104
|
* Handles user clicks on the next button.
|
|
105
105
|
* */
|
|
106
106
|
nextClicked(): void;
|
|
107
|
-
dateSelected(date
|
|
107
|
+
dateSelected(date?: T): void;
|
|
108
108
|
/**
|
|
109
109
|
* Change the pickerMoment value and switch to a specific view
|
|
110
110
|
*/
|
|
@@ -136,6 +136,6 @@ export declare class OwlCalendarComponent<T> implements OnInit, AfterContentInit
|
|
|
136
136
|
* Get a valid date object
|
|
137
137
|
*/
|
|
138
138
|
private getValidDate;
|
|
139
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
140
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
139
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent<any>, never>;
|
|
140
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent<any>, "nxt-date-time-calendar", never, { "dateFilter": "dateFilter"; "firstDayOfWeek": "firstDayOfWeek"; "min": "min"; "max": "max"; "pickerMoment": "pickerMoment"; "selectMode": "selectMode"; "selected": "selected"; "selecteds": "selecteds"; "startView": "startView"; "hideOtherMonths": "hideOtherMonths"; }, { "pickerMomentChange": "pickerMomentChange"; "selectedChange": "selectedChange"; "userSelection": "userSelection"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, false, never>;
|
|
141
141
|
}
|
|
@@ -10,9 +10,9 @@ export declare class CalendarCell {
|
|
|
10
10
|
cellClass: string;
|
|
11
11
|
constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, out?: boolean, cellClass?: string);
|
|
12
12
|
}
|
|
13
|
-
export declare class
|
|
14
|
-
private elmRef;
|
|
15
|
-
private ngZone;
|
|
13
|
+
export declare class CalendarBodyComponent implements OnInit {
|
|
14
|
+
private readonly elmRef;
|
|
15
|
+
private readonly ngZone;
|
|
16
16
|
/**
|
|
17
17
|
* The cell number of the active cell in the table.
|
|
18
18
|
*/
|
|
@@ -20,7 +20,7 @@ export declare class OwlCalendarBodyComponent implements OnInit {
|
|
|
20
20
|
/**
|
|
21
21
|
* The cells to display in the table.
|
|
22
22
|
* */
|
|
23
|
-
rows
|
|
23
|
+
rows?: CalendarCell[][];
|
|
24
24
|
/**
|
|
25
25
|
* The number of columns in the table.
|
|
26
26
|
* */
|
|
@@ -32,23 +32,23 @@ export declare class OwlCalendarBodyComponent implements OnInit {
|
|
|
32
32
|
/**
|
|
33
33
|
* The value in the table that corresponds to today.
|
|
34
34
|
* */
|
|
35
|
-
todayValue
|
|
35
|
+
todayValue?: number;
|
|
36
36
|
/**
|
|
37
37
|
* The value in the table that is currently selected.
|
|
38
38
|
* */
|
|
39
|
-
selectedValues
|
|
39
|
+
selectedValues?: Array<number | undefined>;
|
|
40
40
|
/**
|
|
41
41
|
* Current picker select mode
|
|
42
42
|
*/
|
|
43
|
-
selectMode
|
|
43
|
+
selectMode?: SelectMode;
|
|
44
44
|
/**
|
|
45
45
|
* Emit when a calendar cell is selected
|
|
46
46
|
* */
|
|
47
47
|
readonly select: EventEmitter<CalendarCell>;
|
|
48
|
-
get
|
|
48
|
+
get calendarBodyClass(): boolean;
|
|
49
49
|
get isInSingleMode(): boolean;
|
|
50
50
|
get isInRangeMode(): boolean;
|
|
51
|
-
constructor(elmRef: ElementRef
|
|
51
|
+
constructor(elmRef: ElementRef<HTMLElement>, ngZone: NgZone);
|
|
52
52
|
ngOnInit(): void;
|
|
53
53
|
selectCell(cell: CalendarCell): void;
|
|
54
54
|
isActiveCell(rowIndex: number, colIndex: number): boolean;
|
|
@@ -72,6 +72,6 @@ export declare class OwlCalendarBodyComponent implements OnInit {
|
|
|
72
72
|
* Focus to a active cell
|
|
73
73
|
* */
|
|
74
74
|
focusActiveCell(): void;
|
|
75
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
76
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
75
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarBodyComponent, never>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarBodyComponent, "[nxtDateTimeCalendarBody]", ["nxtDateTimeCalendarBody"], { "activeCell": "activeCell"; "rows": "rows"; "numCols": "numCols"; "cellRatio": "cellRatio"; "todayValue": "todayValue"; "selectedValues": "selectedValues"; "selectMode": "selectMode"; }, { "select": "select"; }, never, never, false, never>;
|
|
77
77
|
}
|