@netwin/angular-datetime-picker 18.2.0 → 19.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -27
- package/assets/style/picker.min.css +1 -1
- package/esm2022/lib/date-time/adapter/date-time-adapter.class.mjs +7 -13
- package/esm2022/lib/date-time/adapter/date-time-format.class.mjs +1 -4
- package/esm2022/lib/date-time/adapter/native-date-time-adapter.class.mjs +19 -34
- package/esm2022/lib/date-time/adapter/native-date-time-format.class.mjs +1 -2
- package/esm2022/lib/date-time/adapter/native-date-time.module.mjs +1 -4
- package/esm2022/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.mjs +10 -23
- package/esm2022/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.mjs +1 -2
- package/esm2022/lib/date-time/calendar-body.component.mjs +21 -30
- package/esm2022/lib/date-time/calendar-month-view.component.mjs +11 -27
- package/esm2022/lib/date-time/calendar-multi-year-view.component.mjs +9 -15
- package/esm2022/lib/date-time/calendar-year-view.component.mjs +9 -17
- package/esm2022/lib/date-time/calendar.component.mjs +14 -25
- package/esm2022/lib/date-time/date-time-inline.component.mjs +261 -107
- package/esm2022/lib/date-time/date-time-picker-intl.service.mjs +1 -8
- package/esm2022/lib/date-time/date-time.module.mjs +10 -34
- package/esm2022/lib/date-time/options-provider.mjs +1 -1
- package/esm2022/lib/date-time/timer-box.component.mjs +4 -14
- package/esm2022/lib/date-time/timer.component.mjs +16 -15
- package/esm2022/lib/types/date-view.mjs +19 -0
- package/esm2022/lib/types/index.mjs +4 -0
- package/esm2022/lib/types/picker-type.mjs +2 -0
- package/esm2022/lib/types/select-mode.mjs +2 -0
- package/esm2022/public_api.mjs +13 -20
- package/fesm2022/netwin-angular-datetime-picker.mjs +2522 -4961
- package/fesm2022/netwin-angular-datetime-picker.mjs.map +1 -1
- package/lib/date-time/adapter/date-time-adapter.class.d.ts +16 -26
- package/lib/date-time/adapter/date-time-format.class.d.ts +8 -12
- package/lib/date-time/adapter/native-date-time-adapter.class.d.ts +7 -18
- package/lib/date-time/adapter/native-date-time-format.class.d.ts +0 -3
- package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.d.ts +6 -17
- package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.d.ts +0 -3
- package/lib/date-time/calendar-body.component.d.ts +21 -26
- package/lib/date-time/calendar-month-view.component.d.ts +19 -24
- package/lib/date-time/calendar-multi-year-view.component.d.ts +7 -8
- package/lib/date-time/calendar-year-view.component.d.ts +8 -9
- package/lib/date-time/calendar.component.d.ts +15 -21
- package/lib/date-time/date-time-inline.component.d.ts +164 -74
- package/lib/date-time/date-time-picker-intl.service.d.ts +0 -4
- package/lib/date-time/date-time.module.d.ts +11 -18
- package/lib/date-time/timer-box.component.d.ts +4 -5
- package/lib/date-time/timer.component.d.ts +6 -9
- package/lib/types/date-view.d.ts +17 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/picker-type.d.ts +7 -0
- package/lib/types/select-mode.d.ts +8 -0
- package/package.json +1 -1
- package/public_api.d.ts +12 -19
- package/esm2022/lib/date-time/date-time-picker-container.component.mjs +0 -405
- package/esm2022/lib/date-time/date-time-picker-input.directive.mjs +0 -598
- package/esm2022/lib/date-time/date-time-picker-trigger.directive.mjs +0 -64
- package/esm2022/lib/date-time/date-time-picker.animations.mjs +0 -21
- package/esm2022/lib/date-time/date-time-picker.component.mjs +0 -564
- package/esm2022/lib/date-time/date-time.class.mjs +0 -176
- package/esm2022/lib/date-time/numberedFixLen.pipe.mjs +0 -28
- package/esm2022/lib/dialog/dialog-config.class.mjs +0 -59
- package/esm2022/lib/dialog/dialog-container.component.mjs +0 -232
- package/esm2022/lib/dialog/dialog-ref.class.mjs +0 -134
- package/esm2022/lib/dialog/dialog.module.mjs +0 -26
- package/esm2022/lib/dialog/dialog.service.mjs +0 -228
- package/esm2022/lib/utils/index.mjs +0 -5
- package/esm2022/lib/utils/object.utils.mjs +0 -23
- package/lib/date-time/date-time-picker-container.component.d.ts +0 -130
- package/lib/date-time/date-time-picker-input.directive.d.ts +0 -164
- package/lib/date-time/date-time-picker-trigger.directive.d.ts +0 -23
- package/lib/date-time/date-time-picker.animations.d.ts +0 -8
- package/lib/date-time/date-time-picker.component.d.ts +0 -173
- package/lib/date-time/date-time.class.d.ts +0 -103
- package/lib/date-time/numberedFixLen.pipe.d.ts +0 -10
- package/lib/dialog/dialog-config.class.d.ts +0 -169
- package/lib/dialog/dialog-container.component.d.ts +0 -58
- package/lib/dialog/dialog-ref.class.d.ts +0 -51
- package/lib/dialog/dialog.module.d.ts +0 -11
- package/lib/dialog/dialog.service.d.ts +0 -76
- package/lib/utils/index.d.ts +0 -4
- package/lib/utils/object.utils.d.ts +0 -8
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* date-time-adapter.class
|
|
3
|
-
*/
|
|
4
1
|
import { InjectionToken } from '@angular/core';
|
|
5
|
-
import {
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
6
3
|
/** InjectionToken for date time picker that can be used to override default locale code. */
|
|
7
4
|
export declare const OWL_DATE_TIME_LOCALE: InjectionToken<string>;
|
|
8
|
-
/** @docs-private */
|
|
9
|
-
export declare function OWL_DATE_TIME_LOCALE_FACTORY(): string;
|
|
10
5
|
/** Provider for OWL_DATE_TIME_LOCALE injection token. */
|
|
11
6
|
export declare const OWL_DATE_TIME_LOCALE_PROVIDER: {
|
|
12
7
|
provide: InjectionToken<string>;
|
|
@@ -14,10 +9,10 @@ export declare const OWL_DATE_TIME_LOCALE_PROVIDER: {
|
|
|
14
9
|
};
|
|
15
10
|
export declare abstract class DateTimeAdapter<T> {
|
|
16
11
|
/** The locale to use for all dates. */
|
|
17
|
-
protected locale:
|
|
12
|
+
protected locale: string;
|
|
18
13
|
/** A stream that emits when the locale changes. */
|
|
19
14
|
protected _localeChanges: Subject<string>;
|
|
20
|
-
|
|
15
|
+
localeChanges: import("rxjs").Observable<string>;
|
|
21
16
|
/** total milliseconds in a day. */
|
|
22
17
|
protected readonly millisecondsInDay = 86400000;
|
|
23
18
|
/** total milliseconds in a minute. */
|
|
@@ -30,13 +25,13 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
30
25
|
* Get the month of the given date
|
|
31
26
|
* 0 -- January
|
|
32
27
|
* 11 -- December
|
|
33
|
-
|
|
28
|
+
*/
|
|
34
29
|
abstract getMonth(date: T): number;
|
|
35
30
|
/**
|
|
36
31
|
* Get the day of the week of the given date
|
|
37
32
|
* 0 -- Sunday
|
|
38
33
|
* 6 -- Saturday
|
|
39
|
-
|
|
34
|
+
*/
|
|
40
35
|
abstract getDay(date: T): number;
|
|
41
36
|
/**
|
|
42
37
|
* Get the day num of the given date
|
|
@@ -107,7 +102,7 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
107
102
|
/**
|
|
108
103
|
* Checks whether the given object is considered a date instance by this DateTimeAdapter.
|
|
109
104
|
*/
|
|
110
|
-
abstract isDateInstance(obj:
|
|
105
|
+
abstract isDateInstance(obj: unknown): obj is T;
|
|
111
106
|
/**
|
|
112
107
|
* Add the specified number of years to the given date
|
|
113
108
|
*/
|
|
@@ -133,40 +128,35 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
133
128
|
*/
|
|
134
129
|
abstract setSeconds(date: T, amount: number): T;
|
|
135
130
|
/**
|
|
136
|
-
* Creates a date with the given year, month,
|
|
137
|
-
* month and date.
|
|
131
|
+
* Creates a date with the given year, month, day, hour, minute and second.
|
|
132
|
+
* Does not allow over/under-flow of the month and date.
|
|
138
133
|
*/
|
|
139
|
-
abstract createDate(year: number, month: number,
|
|
140
|
-
abstract createDate(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): T;
|
|
134
|
+
abstract createDate(year: number, month: number, day: number, hours?: number, minutes?: number, seconds?: number): T;
|
|
141
135
|
/**
|
|
142
136
|
* Clone the given date
|
|
143
137
|
*/
|
|
144
138
|
abstract clone(date: T): T;
|
|
145
139
|
/**
|
|
146
140
|
* Get a new moment
|
|
147
|
-
|
|
141
|
+
*/
|
|
148
142
|
abstract now(): T;
|
|
149
143
|
/**
|
|
150
144
|
* Formats a date as a string according to the given format.
|
|
151
145
|
*/
|
|
152
|
-
abstract format(date: T, displayFormat:
|
|
153
|
-
/**
|
|
154
|
-
* Parse a user-provided value to a Date Object
|
|
155
|
-
*/
|
|
156
|
-
abstract parse(value: any, parseFormat: any): T | null;
|
|
146
|
+
abstract format(date: T, displayFormat: Intl.DateTimeFormatOptions): string;
|
|
157
147
|
/**
|
|
158
148
|
* Compare two given dates
|
|
159
149
|
* 1 if the first date is after the second,
|
|
160
150
|
* -1 if the first date is before the second
|
|
161
151
|
* 0 if dates are equal.
|
|
162
|
-
|
|
152
|
+
*/
|
|
163
153
|
compare(first: T, second: T): number;
|
|
164
154
|
/**
|
|
165
155
|
* Check if two given dates are in the same year
|
|
166
156
|
* 1 if the first date's year is after the second,
|
|
167
157
|
* -1 if the first date's year is before the second
|
|
168
158
|
* 0 if two given dates are in the same year
|
|
169
|
-
|
|
159
|
+
*/
|
|
170
160
|
compareYear(first: T, second: T): number;
|
|
171
161
|
/**
|
|
172
162
|
* Attempts to deserialize a value to a valid date object. This is different from parsing in that
|
|
@@ -177,15 +167,15 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
177
167
|
* support passing values from your backend directly to these properties by overriding this method
|
|
178
168
|
* to also deserialize the format used by your backend.
|
|
179
169
|
*/
|
|
180
|
-
deserialize(value:
|
|
170
|
+
deserialize(value: unknown | null): T | null;
|
|
181
171
|
/**
|
|
182
172
|
* Sets the locale used for all dates.
|
|
183
173
|
*/
|
|
184
174
|
setLocale(locale: string): void;
|
|
185
175
|
/**
|
|
186
176
|
* Get the locale used for all dates.
|
|
187
|
-
|
|
188
|
-
getLocale():
|
|
177
|
+
*/
|
|
178
|
+
getLocale(): string;
|
|
189
179
|
/**
|
|
190
180
|
* Clamp the given date between min and max dates.
|
|
191
181
|
*/
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* date-time-format.class
|
|
3
|
-
*/
|
|
4
1
|
import { InjectionToken } from '@angular/core';
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
2
|
+
export type OwlDateTimeFormats = {
|
|
3
|
+
fullPickerInput: Pick<Intl.DateTimeFormatOptions, 'year' | 'month' | 'day' | 'hour' | 'minute'>;
|
|
4
|
+
datePickerInput: Pick<Intl.DateTimeFormatOptions, 'year' | 'month' | 'day'>;
|
|
5
|
+
timePickerInput: Pick<Intl.DateTimeFormatOptions, 'hour' | 'minute'>;
|
|
6
|
+
monthYearLabel: Pick<Intl.DateTimeFormatOptions, 'year' | 'month'>;
|
|
7
|
+
dateA11yLabel: Pick<Intl.DateTimeFormatOptions, 'year' | 'month' | 'day'>;
|
|
8
|
+
monthYearA11yLabel: Pick<Intl.DateTimeFormatOptions, 'year' | 'month'>;
|
|
9
|
+
};
|
|
14
10
|
/** InjectionToken for date time picker that can be used to override default format. */
|
|
15
11
|
export declare const OWL_DATE_TIME_FORMATS: InjectionToken<OwlDateTimeFormats>;
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* native-date-time-adapter.class
|
|
3
|
-
*/
|
|
4
|
-
import { Platform } from '@angular/cdk/platform';
|
|
5
1
|
import { DateTimeAdapter } from './date-time-adapter.class';
|
|
6
2
|
import * as i0 from "@angular/core";
|
|
7
3
|
export declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
|
|
8
|
-
private
|
|
4
|
+
private readonly platform;
|
|
5
|
+
private readonly owlDateTimeLocale;
|
|
9
6
|
/** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */
|
|
10
7
|
private readonly _clampDate;
|
|
11
|
-
|
|
12
|
-
* Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
|
|
13
|
-
* Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
|
|
14
|
-
* the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
|
|
15
|
-
* will produce `'8/13/1800'`.
|
|
16
|
-
*/
|
|
17
|
-
useUtcForDisplay: boolean;
|
|
18
|
-
constructor(owlDateTimeLocale: string, platform: Platform);
|
|
8
|
+
constructor();
|
|
19
9
|
getYear(date: Date): number;
|
|
20
10
|
getMonth(date: Date): number;
|
|
21
11
|
getDay(date: Date): number;
|
|
@@ -35,7 +25,7 @@ export declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
|
|
|
35
25
|
isSameDay(dateLeft: Date, dateRight: Date): boolean;
|
|
36
26
|
isValid(date: Date): boolean;
|
|
37
27
|
invalid(): Date;
|
|
38
|
-
isDateInstance(obj:
|
|
28
|
+
isDateInstance(obj: unknown): obj is Date;
|
|
39
29
|
addCalendarYears(date: Date, amount: number): Date;
|
|
40
30
|
addCalendarMonths(date: Date, amount: number): Date;
|
|
41
31
|
addCalendarDays(date: Date, amount: number): Date;
|
|
@@ -45,14 +35,13 @@ export declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
|
|
|
45
35
|
createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): Date;
|
|
46
36
|
clone(date: Date): Date;
|
|
47
37
|
now(): Date;
|
|
48
|
-
format(date: Date, displayFormat:
|
|
49
|
-
parse(value: any, parseFormat: any): Date | null;
|
|
38
|
+
format(date: Date, displayFormat: Intl.DateTimeFormatOptions): string;
|
|
50
39
|
/**
|
|
51
40
|
* Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
|
|
52
41
|
* (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
|
|
53
42
|
* invalid date for all other values.
|
|
54
43
|
*/
|
|
55
|
-
deserialize(value:
|
|
44
|
+
deserialize(value: unknown): Date | null;
|
|
56
45
|
/**
|
|
57
46
|
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
58
47
|
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
@@ -67,6 +56,6 @@ export declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
|
|
|
67
56
|
* representation with the local date and time.
|
|
68
57
|
*/
|
|
69
58
|
private _format;
|
|
70
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeAdapter,
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeAdapter, never>;
|
|
71
60
|
static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateTimeAdapter>;
|
|
72
61
|
}
|
package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.d.ts
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* unix-timestamp-date-time-adapter.class
|
|
3
|
-
*/
|
|
4
|
-
import { Platform } from '@angular/cdk/platform';
|
|
5
1
|
import { DateTimeAdapter } from '../date-time-adapter.class';
|
|
6
2
|
import * as i0 from "@angular/core";
|
|
7
3
|
export declare class UnixTimestampDateTimeAdapter extends DateTimeAdapter<number> {
|
|
8
|
-
private
|
|
9
|
-
|
|
4
|
+
private readonly platform;
|
|
5
|
+
private readonly owlDateTimeLocale;
|
|
10
6
|
/** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */
|
|
11
7
|
private readonly _clampDate;
|
|
12
|
-
|
|
13
|
-
* Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
|
|
14
|
-
* Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
|
|
15
|
-
* the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
|
|
16
|
-
* will produce `'8/13/1800'`.
|
|
17
|
-
*/
|
|
18
|
-
useUtcForDisplay: boolean;
|
|
8
|
+
constructor();
|
|
19
9
|
/**
|
|
20
10
|
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
21
11
|
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
@@ -37,7 +27,7 @@ export declare class UnixTimestampDateTimeAdapter extends DateTimeAdapter<number
|
|
|
37
27
|
clone(date: number): number;
|
|
38
28
|
createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): number;
|
|
39
29
|
differenceInCalendarDays(dateLeft: number, dateRight: number): number;
|
|
40
|
-
format(date: number, displayFormat:
|
|
30
|
+
format(date: number, displayFormat: Intl.DateTimeFormatOptions): string;
|
|
41
31
|
getDate(date: number): number;
|
|
42
32
|
getDateNames(): Array<string>;
|
|
43
33
|
getDay(date: number): number;
|
|
@@ -52,16 +42,15 @@ export declare class UnixTimestampDateTimeAdapter extends DateTimeAdapter<number
|
|
|
52
42
|
getYear(date: number): number;
|
|
53
43
|
getYearName(date: number): string;
|
|
54
44
|
invalid(): number;
|
|
55
|
-
isDateInstance(obj:
|
|
45
|
+
isDateInstance(obj: unknown): obj is number;
|
|
56
46
|
isEqual(dateLeft: number, dateRight: number): boolean;
|
|
57
47
|
isSameDay(dateLeft: number, dateRight: number): boolean;
|
|
58
48
|
isValid(date: number): boolean;
|
|
59
49
|
now(): number;
|
|
60
|
-
parse(value: any, parseFormat: any): number | null;
|
|
61
50
|
setHours(date: number, amount: number): number;
|
|
62
51
|
setMinutes(date: number, amount: number): number;
|
|
63
52
|
setSeconds(date: number, amount: number): number;
|
|
64
53
|
toIso8601(date: number): string;
|
|
65
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<UnixTimestampDateTimeAdapter,
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UnixTimestampDateTimeAdapter, never>;
|
|
66
55
|
static ɵprov: i0.ɵɵInjectableDeclaration<UnixTimestampDateTimeAdapter>;
|
|
67
56
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
import { ElementRef, EventEmitter, NgZone } from '@angular/core';
|
|
5
|
-
import { SelectMode } from './date-time.class';
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { SelectMode } from '../types';
|
|
6
3
|
import * as i0 from "@angular/core";
|
|
7
4
|
export declare class CalendarCell {
|
|
8
5
|
value: number;
|
|
@@ -14,19 +11,19 @@ export declare class CalendarCell {
|
|
|
14
11
|
constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, out?: boolean, cellClass?: string);
|
|
15
12
|
}
|
|
16
13
|
export declare class OwlCalendarBodyComponent {
|
|
17
|
-
private elmRef;
|
|
18
|
-
private ngZone;
|
|
14
|
+
private readonly elmRef;
|
|
15
|
+
private readonly ngZone;
|
|
19
16
|
/**
|
|
20
17
|
* The cell number of the active cell in the table.
|
|
21
18
|
*/
|
|
22
19
|
activeCell: number;
|
|
23
20
|
/**
|
|
24
21
|
* The cells to display in the table.
|
|
25
|
-
|
|
22
|
+
*/
|
|
26
23
|
rows: Array<Array<CalendarCell>>;
|
|
27
24
|
/**
|
|
28
25
|
* The number of columns in the table.
|
|
29
|
-
|
|
26
|
+
*/
|
|
30
27
|
numCols: number;
|
|
31
28
|
/**
|
|
32
29
|
* The ratio (width / height) to use for the cells in the table.
|
|
@@ -34,11 +31,11 @@ export declare class OwlCalendarBodyComponent {
|
|
|
34
31
|
cellRatio: number;
|
|
35
32
|
/**
|
|
36
33
|
* The value in the table that corresponds to today.
|
|
37
|
-
|
|
34
|
+
*/
|
|
38
35
|
todayValue: number;
|
|
39
36
|
/**
|
|
40
37
|
* The value in the table that is currently selected.
|
|
41
|
-
|
|
38
|
+
*/
|
|
42
39
|
selectedValues: Array<number>;
|
|
43
40
|
/**
|
|
44
41
|
* Current picker select mode
|
|
@@ -46,33 +43,31 @@ export declare class OwlCalendarBodyComponent {
|
|
|
46
43
|
selectMode: SelectMode;
|
|
47
44
|
/**
|
|
48
45
|
* Emit when a calendar cell is selected
|
|
49
|
-
|
|
46
|
+
*/
|
|
50
47
|
readonly select: EventEmitter<CalendarCell>;
|
|
51
|
-
get
|
|
52
|
-
get
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
selectCell(cell: CalendarCell): void;
|
|
56
|
-
isActiveCell(rowIndex: number, colIndex: number): boolean;
|
|
48
|
+
protected get isInSingleMode(): boolean;
|
|
49
|
+
protected get isInRangeMode(): boolean;
|
|
50
|
+
protected selectCell(cell: CalendarCell): void;
|
|
51
|
+
protected isActiveCell(rowIndex: number, colIndex: number): boolean;
|
|
57
52
|
/**
|
|
58
53
|
* Check if the cell is selected
|
|
59
54
|
*/
|
|
60
|
-
isSelected(value: number): boolean;
|
|
55
|
+
protected isSelected(value: number): boolean;
|
|
61
56
|
/**
|
|
62
57
|
* Check if the cell in the range
|
|
63
|
-
|
|
64
|
-
isInRange(value: number): boolean;
|
|
58
|
+
*/
|
|
59
|
+
protected isInRange(value: number): boolean;
|
|
65
60
|
/**
|
|
66
61
|
* Check if the cell is the range from
|
|
67
|
-
|
|
68
|
-
isRangeFrom(value: number): boolean;
|
|
62
|
+
*/
|
|
63
|
+
protected isRangeFrom(value: number): boolean;
|
|
69
64
|
/**
|
|
70
65
|
* Check if the cell is the range to
|
|
71
|
-
|
|
72
|
-
isRangeTo(value: number): boolean;
|
|
66
|
+
*/
|
|
67
|
+
protected isRangeTo(value: number): boolean;
|
|
73
68
|
/**
|
|
74
69
|
* Focus to a active cell
|
|
75
|
-
|
|
70
|
+
*/
|
|
76
71
|
focusActiveCell(): void;
|
|
77
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<OwlCalendarBodyComponent, never>;
|
|
78
73
|
static ɵcmp: i0.ɵɵComponentDeclaration<OwlCalendarBodyComponent, "[owl-date-time-calendar-body]", ["owlDateTimeCalendarBody"], { "activeCell": { "alias": "activeCell"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "numCols": { "alias": "numCols"; "required": false; }; "cellRatio": { "alias": "cellRatio"; "required": false; }; "todayValue": { "alias": "todayValue"; "required": false; }; "selectedValues": { "alias": "selectedValues"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; }, { "select": "select"; }, never, never, false, never>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AfterContentInit, ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { SelectMode } from '../types';
|
|
2
3
|
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
3
4
|
import { OwlDateTimeFormats } from './adapter/date-time-format.class';
|
|
4
5
|
import { CalendarCell, OwlCalendarBodyComponent } from './calendar-body.component';
|
|
5
|
-
import { SelectMode } from './date-time.class';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class OwlMonthViewComponent<T> implements OnInit, AfterContentInit, OnDestroy {
|
|
8
8
|
private cdRef;
|
|
@@ -10,19 +10,19 @@ export declare class OwlMonthViewComponent<T> implements OnInit, AfterContentIni
|
|
|
10
10
|
private dateTimeFormats;
|
|
11
11
|
/**
|
|
12
12
|
* Whether to hide dates in other months at the start or end of the current month.
|
|
13
|
-
|
|
13
|
+
*/
|
|
14
14
|
hideOtherMonths: boolean;
|
|
15
15
|
private isDefaultFirstDayOfWeek;
|
|
16
16
|
/**
|
|
17
17
|
* Define the first day of a week
|
|
18
18
|
* Sunday: 0 - Saturday: 6
|
|
19
|
-
|
|
19
|
+
*/
|
|
20
20
|
private _firstDayOfWeek;
|
|
21
21
|
get firstDayOfWeek(): number;
|
|
22
22
|
set firstDayOfWeek(val: number);
|
|
23
23
|
/**
|
|
24
24
|
* The select mode of the picker;
|
|
25
|
-
|
|
25
|
+
*/
|
|
26
26
|
private _selectMode;
|
|
27
27
|
get selectMode(): SelectMode;
|
|
28
28
|
set selectMode(val: SelectMode);
|
|
@@ -38,7 +38,7 @@ export declare class OwlMonthViewComponent<T> implements OnInit, AfterContentIni
|
|
|
38
38
|
set pickerMoment(value: T);
|
|
39
39
|
/**
|
|
40
40
|
* A function used to filter which dates are selectable
|
|
41
|
-
|
|
41
|
+
*/
|
|
42
42
|
private _dateFilter;
|
|
43
43
|
get dateFilter(): (date: T) => boolean;
|
|
44
44
|
set dateFilter(filter: (date: T) => boolean);
|
|
@@ -51,43 +51,38 @@ export declare class OwlMonthViewComponent<T> implements OnInit, AfterContentIni
|
|
|
51
51
|
get maxDate(): T | null;
|
|
52
52
|
set maxDate(value: T | null);
|
|
53
53
|
private _weekdays;
|
|
54
|
-
get weekdays(): {
|
|
54
|
+
protected get weekdays(): Array<{
|
|
55
55
|
long: string;
|
|
56
56
|
short: string;
|
|
57
57
|
narrow: string;
|
|
58
|
-
}
|
|
58
|
+
}>;
|
|
59
59
|
private _days;
|
|
60
|
-
get days(): CalendarCell
|
|
61
|
-
get activeCell(): number;
|
|
62
|
-
get isInSingleMode(): boolean;
|
|
63
|
-
get isInRangeMode(): boolean;
|
|
60
|
+
protected get days(): Array<Array<CalendarCell>>;
|
|
61
|
+
protected get activeCell(): number;
|
|
62
|
+
protected get isInSingleMode(): boolean;
|
|
63
|
+
protected get isInRangeMode(): boolean;
|
|
64
64
|
private firstDateOfMonth;
|
|
65
65
|
private localeSub;
|
|
66
66
|
private initiated;
|
|
67
67
|
private dateNames;
|
|
68
68
|
/**
|
|
69
69
|
* The date of the month that today falls on.
|
|
70
|
-
|
|
70
|
+
*/
|
|
71
71
|
todayDate: number | null;
|
|
72
72
|
/**
|
|
73
73
|
* An array to hold all selectedDates' value
|
|
74
74
|
* the value is the day number in current month
|
|
75
|
-
|
|
75
|
+
*/
|
|
76
76
|
selectedDates: Array<number>;
|
|
77
77
|
firstRowOffset: number;
|
|
78
78
|
/**
|
|
79
79
|
* Callback to invoke when a new date is selected
|
|
80
|
-
|
|
80
|
+
*/
|
|
81
81
|
readonly selectedChange: EventEmitter<T>;
|
|
82
|
-
/**
|
|
83
|
-
* Callback to invoke when any date is selected.
|
|
84
|
-
* */
|
|
85
|
-
readonly userSelection: EventEmitter<void>;
|
|
86
82
|
/** Emits when any date is activated. */
|
|
87
83
|
readonly pickerMomentChange: EventEmitter<T>;
|
|
88
84
|
/** The body of calendar table */
|
|
89
|
-
calendarBodyElm: OwlCalendarBodyComponent;
|
|
90
|
-
get owlDTCalendarView(): boolean;
|
|
85
|
+
protected calendarBodyElm: OwlCalendarBodyComponent;
|
|
91
86
|
constructor(cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: OwlDateTimeFormats);
|
|
92
87
|
ngOnInit(): void;
|
|
93
88
|
ngAfterContentInit(): void;
|
|
@@ -106,11 +101,11 @@ export declare class OwlMonthViewComponent<T> implements OnInit, AfterContentIni
|
|
|
106
101
|
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
107
102
|
/**
|
|
108
103
|
* Generate the calendar weekdays array
|
|
109
|
-
|
|
104
|
+
*/
|
|
110
105
|
private generateWeekDays;
|
|
111
106
|
/**
|
|
112
107
|
* Generate the calendar days array
|
|
113
|
-
|
|
108
|
+
*/
|
|
114
109
|
private generateCalendar;
|
|
115
110
|
private updateFirstDayOfWeek;
|
|
116
111
|
/**
|
|
@@ -133,9 +128,9 @@ export declare class OwlMonthViewComponent<T> implements OnInit, AfterContentIni
|
|
|
133
128
|
* Set the selectedDates value.
|
|
134
129
|
* In single mode, it has only one value which represent the selected date
|
|
135
130
|
* In range mode, it would has two values, one for the fromValue and the other for the toValue
|
|
136
|
-
|
|
131
|
+
*/
|
|
137
132
|
private setSelectedDates;
|
|
138
133
|
private focusActiveCell;
|
|
139
134
|
static ɵfac: i0.ɵɵFactoryDeclaration<OwlMonthViewComponent<any>, [null, { optional: true; }, { optional: true; }]>;
|
|
140
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<OwlMonthViewComponent<any>, "owl-date-time-month-view", ["owlYearView"], { "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "selectedChange": "selectedChange"; "
|
|
135
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlMonthViewComponent<any>, "owl-date-time-month-view", ["owlYearView"], { "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "selectedChange": "selectedChange"; "pickerMomentChange": "pickerMomentChange"; }, never, never, false, never>;
|
|
141
136
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AfterContentInit, ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { SelectMode } from '../types';
|
|
2
3
|
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
3
4
|
import { CalendarCell, OwlCalendarBodyComponent } from './calendar-body.component';
|
|
4
5
|
import { OwlDateTimeIntl } from './date-time-picker-intl.service';
|
|
5
|
-
import { SelectMode } from './date-time.class';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
8
8
|
private cdRef;
|
|
@@ -11,7 +11,7 @@ export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
|
11
11
|
private options;
|
|
12
12
|
/**
|
|
13
13
|
* The select mode of the picker;
|
|
14
|
-
|
|
14
|
+
*/
|
|
15
15
|
private _selectMode;
|
|
16
16
|
get selectMode(): SelectMode;
|
|
17
17
|
set selectMode(val: SelectMode);
|
|
@@ -27,7 +27,7 @@ export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
|
27
27
|
set pickerMoment(value: T);
|
|
28
28
|
/**
|
|
29
29
|
* A function used to filter which dates are selectable
|
|
30
|
-
|
|
30
|
+
*/
|
|
31
31
|
private _dateFilter;
|
|
32
32
|
get dateFilter(): (date: T) => boolean;
|
|
33
33
|
set dateFilter(filter: (date: T) => boolean);
|
|
@@ -54,11 +54,11 @@ export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
|
54
54
|
get nextButtonLabel(): string;
|
|
55
55
|
/**
|
|
56
56
|
* Callback to invoke when a new month is selected
|
|
57
|
-
|
|
57
|
+
*/
|
|
58
58
|
readonly change: EventEmitter<T>;
|
|
59
59
|
/**
|
|
60
60
|
* Emits the selected year. This doesn't imply a change on the selected date
|
|
61
|
-
|
|
61
|
+
*/
|
|
62
62
|
readonly yearSelected: EventEmitter<T>;
|
|
63
63
|
/** Emits when any date is activated. */
|
|
64
64
|
readonly pickerMomentChange: EventEmitter<T>;
|
|
@@ -66,7 +66,6 @@ export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
|
66
66
|
readonly keyboardEnter: EventEmitter<any>;
|
|
67
67
|
/** The body of calendar table */
|
|
68
68
|
calendarBodyElm: OwlCalendarBodyComponent;
|
|
69
|
-
get owlDTCalendarView(): boolean;
|
|
70
69
|
get owlDTCalendarMultiYearView(): boolean;
|
|
71
70
|
constructor(cdRef: ChangeDetectorRef, pickerIntl: OwlDateTimeIntl, dateTimeAdapter: DateTimeAdapter<T>, options: any);
|
|
72
71
|
ngAfterContentInit(): void;
|
|
@@ -77,11 +76,11 @@ export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
|
77
76
|
private selectYear;
|
|
78
77
|
/**
|
|
79
78
|
* Generate the previous year list
|
|
80
|
-
|
|
79
|
+
*/
|
|
81
80
|
prevYearList(event: any): void;
|
|
82
81
|
/**
|
|
83
82
|
* Generate the next year list
|
|
84
|
-
|
|
83
|
+
*/
|
|
85
84
|
nextYearList(event: any): void;
|
|
86
85
|
generateYearList(): void;
|
|
87
86
|
/** Whether the previous period button is enabled. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AfterContentInit, ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { SelectMode } from '../types';
|
|
2
3
|
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
3
4
|
import { OwlDateTimeFormats } from './adapter/date-time-format.class';
|
|
4
5
|
import { CalendarCell, OwlCalendarBodyComponent } from './calendar-body.component';
|
|
5
|
-
import { SelectMode } from './date-time.class';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit, OnDestroy {
|
|
8
8
|
private cdRef;
|
|
@@ -10,7 +10,7 @@ export declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit
|
|
|
10
10
|
private dateTimeFormats;
|
|
11
11
|
/**
|
|
12
12
|
* The select mode of the picker;
|
|
13
|
-
|
|
13
|
+
*/
|
|
14
14
|
private _selectMode;
|
|
15
15
|
get selectMode(): SelectMode;
|
|
16
16
|
set selectMode(val: SelectMode);
|
|
@@ -26,7 +26,7 @@ export declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit
|
|
|
26
26
|
set pickerMoment(value: T);
|
|
27
27
|
/**
|
|
28
28
|
* A function used to filter which dates are selectable
|
|
29
|
-
|
|
29
|
+
*/
|
|
30
30
|
private _dateFilter;
|
|
31
31
|
get dateFilter(): (date: T) => boolean;
|
|
32
32
|
set dateFilter(filter: (date: T) => boolean);
|
|
@@ -50,15 +50,15 @@ export declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit
|
|
|
50
50
|
/**
|
|
51
51
|
* An array to hold all selectedDates' month value
|
|
52
52
|
* the value is the month number in current year
|
|
53
|
-
|
|
53
|
+
*/
|
|
54
54
|
selectedMonths: Array<number>;
|
|
55
55
|
/**
|
|
56
56
|
* Callback to invoke when a new month is selected
|
|
57
|
-
|
|
57
|
+
*/
|
|
58
58
|
readonly change: EventEmitter<T>;
|
|
59
59
|
/**
|
|
60
60
|
* Emits the selected year. This doesn't imply a change on the selected date
|
|
61
|
-
|
|
61
|
+
*/
|
|
62
62
|
readonly monthSelected: EventEmitter<T>;
|
|
63
63
|
/** Emits when any date is activated. */
|
|
64
64
|
readonly pickerMomentChange: EventEmitter<T>;
|
|
@@ -66,7 +66,6 @@ export declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit
|
|
|
66
66
|
readonly keyboardEnter: EventEmitter<any>;
|
|
67
67
|
/** The body of calendar table */
|
|
68
68
|
calendarBodyElm: OwlCalendarBodyComponent;
|
|
69
|
-
get owlDTCalendarView(): boolean;
|
|
70
69
|
constructor(cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: OwlDateTimeFormats);
|
|
71
70
|
ngOnInit(): void;
|
|
72
71
|
ngAfterContentInit(): void;
|
|
@@ -85,7 +84,7 @@ export declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit
|
|
|
85
84
|
handleCalendarKeydown(event: KeyboardEvent): void;
|
|
86
85
|
/**
|
|
87
86
|
* Generate the calendar month list
|
|
88
|
-
|
|
87
|
+
*/
|
|
89
88
|
private generateMonthList;
|
|
90
89
|
/**
|
|
91
90
|
* Creates an CalendarCell for the given month.
|
|
@@ -104,7 +103,7 @@ export declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit
|
|
|
104
103
|
* Set the selectedMonths value
|
|
105
104
|
* In single mode, it has only one value which represent the month the selected date in
|
|
106
105
|
* In range mode, it would has two values, one for the month the fromValue in and the other for the month the toValue in
|
|
107
|
-
|
|
106
|
+
*/
|
|
108
107
|
private setSelectedMonths;
|
|
109
108
|
/**
|
|
110
109
|
* Check the given dates are in the same year
|