@netwin/angular-datetime-picker 19.0.0-rc.4 → 19.0.0-rc.6
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 +27 -1
- package/assets/style/picker.min.css +1 -1
- package/fesm2022/netwin-angular-datetime-picker.mjs +4178 -1486
- package/fesm2022/netwin-angular-datetime-picker.mjs.map +1 -1
- package/lib/date-time/adapter/date-time-adapter.class.d.ts +19 -9
- package/lib/date-time/adapter/date-time-format.class.d.ts +12 -8
- package/lib/date-time/adapter/native-date-time-adapter.class.d.ts +16 -5
- package/lib/date-time/adapter/native-date-time-format.class.d.ts +3 -0
- package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.d.ts +15 -4
- package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.d.ts +3 -0
- package/lib/date-time/calendar-body.component.d.ts +18 -13
- package/lib/date-time/calendar-month-view.component.d.ts +17 -12
- package/lib/date-time/calendar-multi-year-view.component.d.ts +12 -12
- package/lib/date-time/calendar-year-view.component.d.ts +7 -6
- package/lib/date-time/calendar.component.d.ts +37 -17
- package/lib/date-time/date-time-inline.component.d.ts +79 -156
- package/lib/date-time/date-time-picker-container.component.d.ts +131 -0
- package/lib/date-time/date-time-picker-input.directive.d.ts +172 -0
- package/lib/date-time/date-time-picker-intl.service.d.ts +6 -0
- package/lib/date-time/date-time-picker-trigger.directive.d.ts +23 -0
- package/lib/date-time/date-time-picker.animations.d.ts +8 -0
- package/lib/date-time/date-time-picker.component.d.ts +171 -0
- package/lib/date-time/date-time.class.d.ts +103 -0
- package/lib/date-time/date-time.module.d.ts +17 -11
- package/lib/date-time/numberedFixLen.pipe.d.ts +10 -0
- package/lib/date-time/timer-box.component.d.ts +4 -3
- package/lib/date-time/timer.component.d.ts +19 -16
- package/lib/dialog/dialog-config.class.d.ts +169 -0
- package/lib/dialog/dialog-container.component.d.ts +69 -0
- package/lib/dialog/dialog-ref.class.d.ts +51 -0
- package/lib/dialog/dialog.module.d.ts +11 -0
- package/lib/dialog/dialog.service.d.ts +76 -0
- package/lib/utils/index.d.ts +4 -0
- package/lib/utils/object.utils.d.ts +8 -0
- package/package.json +5 -7
- package/public_api.d.ts +16 -12
- package/esm2022/lib/date-time/adapter/date-time-adapter.class.mjs +0 -114
- package/esm2022/lib/date-time/adapter/date-time-format.class.mjs +0 -4
- package/esm2022/lib/date-time/adapter/native-date-time-adapter.class.mjs +0 -238
- package/esm2022/lib/date-time/adapter/native-date-time-format.class.mjs +0 -15
- package/esm2022/lib/date-time/adapter/native-date-time.module.mjs +0 -42
- package/esm2022/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.mjs +0 -215
- package/esm2022/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.mjs +0 -15
- package/esm2022/lib/date-time/calendar-body.component.mjs +0 -137
- package/esm2022/lib/date-time/calendar-month-view.component.mjs +0 -420
- package/esm2022/lib/date-time/calendar-multi-year-view.component.mjs +0 -360
- package/esm2022/lib/date-time/calendar-year-view.component.mjs +0 -354
- package/esm2022/lib/date-time/calendar.component.mjs +0 -357
- package/esm2022/lib/date-time/date-time-inline.component.mjs +0 -463
- package/esm2022/lib/date-time/date-time-picker-intl.service.mjs +0 -55
- package/esm2022/lib/date-time/date-time.module.mjs +0 -59
- package/esm2022/lib/date-time/options-provider.mjs +0 -34
- package/esm2022/lib/date-time/timer-box.component.mjs +0 -130
- package/esm2022/lib/date-time/timer.component.mjs +0 -280
- package/esm2022/lib/types/date-view.mjs +0 -19
- package/esm2022/lib/types/index.mjs +0 -4
- package/esm2022/lib/types/picker-type.mjs +0 -2
- package/esm2022/lib/types/select-mode.mjs +0 -2
- package/esm2022/lib/utils/array.utils.mjs +0 -5
- package/esm2022/lib/utils/constants.mjs +0 -31
- package/esm2022/lib/utils/date.utils.mjs +0 -46
- package/esm2022/netwin-angular-datetime-picker.mjs +0 -5
- package/esm2022/public_api.mjs +0 -23
- package/lib/types/date-view.d.ts +0 -17
- package/lib/types/index.d.ts +0 -3
- package/lib/types/picker-type.d.ts +0 -7
- package/lib/types/select-mode.d.ts +0 -8
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* date-time-adapter.class
|
|
3
|
+
*/
|
|
1
4
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
5
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
6
|
/** InjectionToken for date time picker that can be used to override default locale code. */
|
|
4
7
|
export declare const OWL_DATE_TIME_LOCALE: InjectionToken<string>;
|
|
8
|
+
/** @docs-private */
|
|
9
|
+
export declare function OWL_DATE_TIME_LOCALE_FACTORY(): string;
|
|
5
10
|
/** Provider for OWL_DATE_TIME_LOCALE injection token. */
|
|
6
11
|
export declare const OWL_DATE_TIME_LOCALE_PROVIDER: {
|
|
7
12
|
provide: InjectionToken<string>;
|
|
@@ -9,10 +14,10 @@ export declare const OWL_DATE_TIME_LOCALE_PROVIDER: {
|
|
|
9
14
|
};
|
|
10
15
|
export declare abstract class DateTimeAdapter<T> {
|
|
11
16
|
/** The locale to use for all dates. */
|
|
12
|
-
protected locale:
|
|
17
|
+
protected locale: any;
|
|
13
18
|
/** A stream that emits when the locale changes. */
|
|
14
19
|
protected _localeChanges: Subject<string>;
|
|
15
|
-
localeChanges:
|
|
20
|
+
get localeChanges(): Observable<string>;
|
|
16
21
|
/** total milliseconds in a day. */
|
|
17
22
|
protected readonly millisecondsInDay = 86400000;
|
|
18
23
|
/** total milliseconds in a minute. */
|
|
@@ -128,10 +133,11 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
128
133
|
*/
|
|
129
134
|
abstract setSeconds(date: T, amount: number): T;
|
|
130
135
|
/**
|
|
131
|
-
* Creates a date with the given year, month,
|
|
132
|
-
*
|
|
136
|
+
* Creates a date with the given year, month, date, hour, minute and second. Does not allow over/under-flow of the
|
|
137
|
+
* month and date.
|
|
133
138
|
*/
|
|
134
|
-
abstract createDate(year: number, month: number,
|
|
139
|
+
abstract createDate(year: number, month: number, date: number): T;
|
|
140
|
+
abstract createDate(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): T;
|
|
135
141
|
/**
|
|
136
142
|
* Clone the given date
|
|
137
143
|
*/
|
|
@@ -143,7 +149,11 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
143
149
|
/**
|
|
144
150
|
* Formats a date as a string according to the given format.
|
|
145
151
|
*/
|
|
146
|
-
abstract format(date: T, displayFormat:
|
|
152
|
+
abstract format(date: T, displayFormat: any): string;
|
|
153
|
+
/**
|
|
154
|
+
* Parse a user-provided value to a Date Object
|
|
155
|
+
*/
|
|
156
|
+
abstract parse(value: any, parseFormat: any): T | null;
|
|
147
157
|
/**
|
|
148
158
|
* Compare two given dates
|
|
149
159
|
* 1 if the first date is after the second,
|
|
@@ -167,7 +177,7 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
167
177
|
* support passing values from your backend directly to these properties by overriding this method
|
|
168
178
|
* to also deserialize the format used by your backend.
|
|
169
179
|
*/
|
|
170
|
-
deserialize(value:
|
|
180
|
+
deserialize(value: any): T | null;
|
|
171
181
|
/**
|
|
172
182
|
* Sets the locale used for all dates.
|
|
173
183
|
*/
|
|
@@ -175,7 +185,7 @@ export declare abstract class DateTimeAdapter<T> {
|
|
|
175
185
|
/**
|
|
176
186
|
* Get the locale used for all dates.
|
|
177
187
|
*/
|
|
178
|
-
getLocale():
|
|
188
|
+
getLocale(): any;
|
|
179
189
|
/**
|
|
180
190
|
* Clamp the given date between min and max dates.
|
|
181
191
|
*/
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* date-time-format.class
|
|
3
|
+
*/
|
|
1
4
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export interface OwlDateTimeFormats {
|
|
6
|
+
parseInput: any;
|
|
7
|
+
fullPickerInput: any;
|
|
8
|
+
datePickerInput: any;
|
|
9
|
+
timePickerInput: any;
|
|
10
|
+
monthYearLabel: any;
|
|
11
|
+
dateA11yLabel: any;
|
|
12
|
+
monthYearA11yLabel: any;
|
|
13
|
+
}
|
|
10
14
|
/** InjectionToken for date time picker that can be used to override default format. */
|
|
11
15
|
export declare const OWL_DATE_TIME_FORMATS: InjectionToken<OwlDateTimeFormats>;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* native-date-time-adapter.class
|
|
3
|
+
*/
|
|
4
|
+
import { Platform } from '@angular/cdk/platform';
|
|
1
5
|
import { DateTimeAdapter } from './date-time-adapter.class';
|
|
2
6
|
import * as i0 from "@angular/core";
|
|
3
7
|
export declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
|
|
4
|
-
private
|
|
5
|
-
private readonly owlDateTimeLocale;
|
|
8
|
+
private owlDateTimeLocale;
|
|
6
9
|
/** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */
|
|
7
10
|
private readonly _clampDate;
|
|
8
|
-
|
|
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);
|
|
9
19
|
getYear(date: Date): number;
|
|
10
20
|
getMonth(date: Date): number;
|
|
11
21
|
getDay(date: Date): number;
|
|
@@ -36,12 +46,13 @@ export declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
|
|
|
36
46
|
clone(date: Date): Date;
|
|
37
47
|
now(): Date;
|
|
38
48
|
format(date: Date, displayFormat: Intl.DateTimeFormatOptions): string;
|
|
49
|
+
parse(value: any, parseFormat: any): Date | null;
|
|
39
50
|
/**
|
|
40
51
|
* Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
|
|
41
52
|
* (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
|
|
42
53
|
* invalid date for all other values.
|
|
43
54
|
*/
|
|
44
|
-
deserialize(value:
|
|
55
|
+
deserialize(value: any): Date | null;
|
|
45
56
|
/**
|
|
46
57
|
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
47
58
|
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
@@ -56,6 +67,6 @@ export declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
|
|
|
56
67
|
* representation with the local date and time.
|
|
57
68
|
*/
|
|
58
69
|
private _format;
|
|
59
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeAdapter,
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeAdapter, [{ optional: true; }, null]>;
|
|
60
71
|
static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateTimeAdapter>;
|
|
61
72
|
}
|
package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.d.ts
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* unix-timestamp-date-time-adapter.class
|
|
3
|
+
*/
|
|
4
|
+
import { Platform } from '@angular/cdk/platform';
|
|
1
5
|
import { DateTimeAdapter } from '../date-time-adapter.class';
|
|
2
6
|
import * as i0 from "@angular/core";
|
|
3
7
|
export declare class UnixTimestampDateTimeAdapter extends DateTimeAdapter<number> {
|
|
4
|
-
private
|
|
5
|
-
|
|
8
|
+
private owlDateTimeLocale;
|
|
9
|
+
constructor(owlDateTimeLocale: string, platform: Platform);
|
|
6
10
|
/** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */
|
|
7
11
|
private readonly _clampDate;
|
|
8
|
-
|
|
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;
|
|
9
19
|
/**
|
|
10
20
|
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
11
21
|
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
@@ -47,10 +57,11 @@ export declare class UnixTimestampDateTimeAdapter extends DateTimeAdapter<number
|
|
|
47
57
|
isSameDay(dateLeft: number, dateRight: number): boolean;
|
|
48
58
|
isValid(date: number): boolean;
|
|
49
59
|
now(): number;
|
|
60
|
+
parse(value: any, parseFormat: any): number | null;
|
|
50
61
|
setHours(date: number, amount: number): number;
|
|
51
62
|
setMinutes(date: number, amount: number): number;
|
|
52
63
|
setSeconds(date: number, amount: number): number;
|
|
53
64
|
toIso8601(date: number): string;
|
|
54
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<UnixTimestampDateTimeAdapter,
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UnixTimestampDateTimeAdapter, [{ optional: true; }, null]>;
|
|
55
66
|
static ɵprov: i0.ɵɵInjectableDeclaration<UnixTimestampDateTimeAdapter>;
|
|
56
67
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* calendar-body.component
|
|
3
|
+
*/
|
|
4
|
+
import { ElementRef, NgZone } from '@angular/core';
|
|
5
|
+
import { SelectMode } from './date-time.class';
|
|
3
6
|
import * as i0 from "@angular/core";
|
|
4
7
|
export declare class CalendarCell {
|
|
5
8
|
value: number;
|
|
@@ -11,8 +14,8 @@ export declare class CalendarCell {
|
|
|
11
14
|
constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, out?: boolean, cellClass?: string);
|
|
12
15
|
}
|
|
13
16
|
export declare class OwlCalendarBodyComponent {
|
|
14
|
-
private
|
|
15
|
-
private
|
|
17
|
+
private elmRef;
|
|
18
|
+
private ngZone;
|
|
16
19
|
/**
|
|
17
20
|
* The cell number of the active cell in the table.
|
|
18
21
|
*/
|
|
@@ -44,27 +47,29 @@ export declare class OwlCalendarBodyComponent {
|
|
|
44
47
|
/**
|
|
45
48
|
* Emit when a calendar cell is selected
|
|
46
49
|
*/
|
|
47
|
-
readonly select:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
readonly select: import("@angular/core").OutputEmitterRef<CalendarCell>;
|
|
51
|
+
get owlDTCalendarBodyClass(): boolean;
|
|
52
|
+
get isInSingleMode(): boolean;
|
|
53
|
+
get isInRangeMode(): boolean;
|
|
54
|
+
constructor(elmRef: ElementRef, ngZone: NgZone);
|
|
55
|
+
selectCell(cell: CalendarCell): void;
|
|
56
|
+
isActiveCell(rowIndex: number, colIndex: number): boolean;
|
|
52
57
|
/**
|
|
53
58
|
* Check if the cell is selected
|
|
54
59
|
*/
|
|
55
|
-
|
|
60
|
+
isSelected(value: number): boolean;
|
|
56
61
|
/**
|
|
57
62
|
* Check if the cell in the range
|
|
58
63
|
*/
|
|
59
|
-
|
|
64
|
+
isInRange(value: number): boolean;
|
|
60
65
|
/**
|
|
61
66
|
* Check if the cell is the range from
|
|
62
67
|
*/
|
|
63
|
-
|
|
68
|
+
isRangeFrom(value: number): boolean;
|
|
64
69
|
/**
|
|
65
70
|
* Check if the cell is the range to
|
|
66
71
|
*/
|
|
67
|
-
|
|
72
|
+
isRangeTo(value: number): boolean;
|
|
68
73
|
/**
|
|
69
74
|
* Focus to a active cell
|
|
70
75
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AfterContentInit, ChangeDetectorRef,
|
|
2
|
-
import { SelectMode } from '../types';
|
|
1
|
+
import { AfterContentInit, ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
3
2
|
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
4
3
|
import { OwlDateTimeFormats } from './adapter/date-time-format.class';
|
|
5
4
|
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;
|
|
@@ -51,16 +51,16 @@ 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
|
-
|
|
54
|
+
get weekdays(): {
|
|
55
55
|
long: string;
|
|
56
56
|
short: string;
|
|
57
57
|
narrow: string;
|
|
58
|
-
}
|
|
58
|
+
}[];
|
|
59
59
|
private _days;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
get days(): CalendarCell[][];
|
|
61
|
+
get activeCell(): number;
|
|
62
|
+
get isInSingleMode(): boolean;
|
|
63
|
+
get isInRangeMode(): boolean;
|
|
64
64
|
private firstDateOfMonth;
|
|
65
65
|
private localeSub;
|
|
66
66
|
private initiated;
|
|
@@ -78,11 +78,16 @@ export declare class OwlMonthViewComponent<T> implements OnInit, AfterContentIni
|
|
|
78
78
|
/**
|
|
79
79
|
* Callback to invoke when a new date is selected
|
|
80
80
|
*/
|
|
81
|
-
readonly selectedChange:
|
|
81
|
+
readonly selectedChange: import("@angular/core").OutputEmitterRef<T>;
|
|
82
|
+
/**
|
|
83
|
+
* Callback to invoke when any date is selected.
|
|
84
|
+
*/
|
|
85
|
+
readonly userSelection: import("@angular/core").OutputEmitterRef<void>;
|
|
82
86
|
/** Emits when any date is activated. */
|
|
83
|
-
readonly pickerMomentChange:
|
|
87
|
+
readonly pickerMomentChange: import("@angular/core").OutputEmitterRef<T>;
|
|
84
88
|
/** The body of calendar table */
|
|
85
|
-
|
|
89
|
+
calendarBodyElm: OwlCalendarBodyComponent;
|
|
90
|
+
get owlDTCalendarView(): boolean;
|
|
86
91
|
constructor(cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: OwlDateTimeFormats);
|
|
87
92
|
ngOnInit(): void;
|
|
88
93
|
ngAfterContentInit(): void;
|
|
@@ -132,5 +137,5 @@ export declare class OwlMonthViewComponent<T> implements OnInit, AfterContentIni
|
|
|
132
137
|
private setSelectedDates;
|
|
133
138
|
private focusActiveCell;
|
|
134
139
|
static ɵfac: i0.ɵɵFactoryDeclaration<OwlMonthViewComponent<any>, [null, { optional: true; }, { optional: true; }]>;
|
|
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>;
|
|
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"; "userSelection": "userSelection"; "pickerMomentChange": "pickerMomentChange"; }, never, never, false, never>;
|
|
136
141
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { AfterContentInit, ChangeDetectorRef
|
|
2
|
-
import { SelectMode } from '../types';
|
|
1
|
+
import { AfterContentInit, ChangeDetectorRef } from '@angular/core';
|
|
3
2
|
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
4
3
|
import { CalendarCell, OwlCalendarBodyComponent } from './calendar-body.component';
|
|
5
4
|
import { OwlDateTimeIntl } from './date-time-picker-intl.service';
|
|
6
|
-
import {
|
|
5
|
+
import { SelectMode } from './date-time.class';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
7
|
export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
9
8
|
private cdRef;
|
|
@@ -24,7 +23,7 @@ export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
|
24
23
|
get selecteds(): Array<T>;
|
|
25
24
|
set selecteds(values: Array<T>);
|
|
26
25
|
private _pickerMoment;
|
|
27
|
-
get pickerMoment(): T
|
|
26
|
+
get pickerMoment(): T;
|
|
28
27
|
set pickerMoment(value: T);
|
|
29
28
|
/**
|
|
30
29
|
* A function used to filter which dates are selectable
|
|
@@ -43,7 +42,7 @@ export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
|
43
42
|
private _todayYear;
|
|
44
43
|
get todayYear(): number;
|
|
45
44
|
private _years;
|
|
46
|
-
get years():
|
|
45
|
+
get years(): CalendarCell[][];
|
|
47
46
|
private _selectedYears;
|
|
48
47
|
get selectedYears(): Array<number>;
|
|
49
48
|
private initiated;
|
|
@@ -56,19 +55,20 @@ export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
|
56
55
|
/**
|
|
57
56
|
* Callback to invoke when a new month is selected
|
|
58
57
|
*/
|
|
59
|
-
readonly change:
|
|
58
|
+
readonly change: import("@angular/core").OutputEmitterRef<T>;
|
|
60
59
|
/**
|
|
61
60
|
* Emits the selected year. This doesn't imply a change on the selected date
|
|
62
61
|
*/
|
|
63
|
-
readonly yearSelected:
|
|
62
|
+
readonly yearSelected: import("@angular/core").OutputEmitterRef<T>;
|
|
64
63
|
/** Emits when any date is activated. */
|
|
65
|
-
readonly pickerMomentChange:
|
|
64
|
+
readonly pickerMomentChange: import("@angular/core").OutputEmitterRef<T>;
|
|
66
65
|
/** Emits when use keyboard enter to select a calendar cell */
|
|
67
|
-
readonly keyboardEnter:
|
|
66
|
+
readonly keyboardEnter: import("@angular/core").OutputEmitterRef<void>;
|
|
68
67
|
/** The body of calendar table */
|
|
69
68
|
calendarBodyElm: OwlCalendarBodyComponent;
|
|
69
|
+
get owlDTCalendarView(): boolean;
|
|
70
70
|
get owlDTCalendarMultiYearView(): boolean;
|
|
71
|
-
constructor(cdRef: ChangeDetectorRef, pickerIntl: OwlDateTimeIntl, dateTimeAdapter: DateTimeAdapter<T>, options:
|
|
71
|
+
constructor(cdRef: ChangeDetectorRef, pickerIntl: OwlDateTimeIntl, dateTimeAdapter: DateTimeAdapter<T>, options: any);
|
|
72
72
|
ngAfterContentInit(): void;
|
|
73
73
|
/**
|
|
74
74
|
* Handle a calendarCell selected
|
|
@@ -78,11 +78,11 @@ export declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
|
|
|
78
78
|
/**
|
|
79
79
|
* Generate the previous year list
|
|
80
80
|
*/
|
|
81
|
-
prevYearList(event:
|
|
81
|
+
prevYearList(event: any): void;
|
|
82
82
|
/**
|
|
83
83
|
* Generate the next year list
|
|
84
84
|
*/
|
|
85
|
-
nextYearList(event:
|
|
85
|
+
nextYearList(event: any): void;
|
|
86
86
|
generateYearList(): void;
|
|
87
87
|
/** Whether the previous period button is enabled. */
|
|
88
88
|
previousEnabled(): boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AfterContentInit, ChangeDetectorRef,
|
|
2
|
-
import { SelectMode } from '../types';
|
|
1
|
+
import { AfterContentInit, ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
3
2
|
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
4
3
|
import { OwlDateTimeFormats } from './adapter/date-time-format.class';
|
|
5
4
|
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;
|
|
@@ -55,17 +55,18 @@ export declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit
|
|
|
55
55
|
/**
|
|
56
56
|
* Callback to invoke when a new month is selected
|
|
57
57
|
*/
|
|
58
|
-
readonly change:
|
|
58
|
+
readonly change: import("@angular/core").OutputEmitterRef<T>;
|
|
59
59
|
/**
|
|
60
60
|
* Emits the selected year. This doesn't imply a change on the selected date
|
|
61
61
|
*/
|
|
62
|
-
readonly monthSelected:
|
|
62
|
+
readonly monthSelected: import("@angular/core").OutputEmitterRef<T>;
|
|
63
63
|
/** Emits when any date is activated. */
|
|
64
|
-
readonly pickerMomentChange:
|
|
64
|
+
readonly pickerMomentChange: import("@angular/core").OutputEmitterRef<T>;
|
|
65
65
|
/** Emits when use keyboard enter to select a calendar cell */
|
|
66
|
-
readonly keyboardEnter:
|
|
66
|
+
readonly keyboardEnter: import("@angular/core").OutputEmitterRef<void>;
|
|
67
67
|
/** The body of calendar table */
|
|
68
68
|
calendarBodyElm: OwlCalendarBodyComponent;
|
|
69
|
+
get owlDTCalendarView(): boolean;
|
|
69
70
|
constructor(cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: OwlDateTimeFormats);
|
|
70
71
|
ngOnInit(): void;
|
|
71
72
|
ngAfterContentInit(): void;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* calendar.component
|
|
3
|
+
*/
|
|
4
|
+
import { AfterContentInit, AfterViewChecked, ChangeDetectorRef, ElementRef, NgZone, OnDestroy } from '@angular/core';
|
|
3
5
|
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
4
6
|
import { OwlDateTimeFormats } from './adapter/date-time-format.class';
|
|
5
7
|
import { OwlDateTimeIntl } from './date-time-picker-intl.service';
|
|
8
|
+
import { DateView, DateViewType, SelectMode } from './date-time.class';
|
|
6
9
|
import * as i0 from "@angular/core";
|
|
7
10
|
export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterViewChecked, OnDestroy {
|
|
8
11
|
private elmRef;
|
|
@@ -11,7 +14,7 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
|
|
|
11
14
|
private cdRef;
|
|
12
15
|
private dateTimeAdapter;
|
|
13
16
|
private dateTimeFormats;
|
|
14
|
-
|
|
17
|
+
DateView: typeof DateView;
|
|
15
18
|
get minDate(): T | null;
|
|
16
19
|
set minDate(value: T | null);
|
|
17
20
|
get maxDate(): T | null;
|
|
@@ -24,10 +27,11 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
|
|
|
24
27
|
set selecteds(values: Array<T>);
|
|
25
28
|
get periodButtonText(): string;
|
|
26
29
|
get periodButtonLabel(): string;
|
|
30
|
+
get todayButtonLabel(): string;
|
|
27
31
|
get prevButtonLabel(): string;
|
|
28
32
|
get nextButtonLabel(): string;
|
|
29
|
-
get currentView():
|
|
30
|
-
set currentView(view:
|
|
33
|
+
get currentView(): DateViewType;
|
|
34
|
+
set currentView(view: DateViewType);
|
|
31
35
|
get isInSingleMode(): boolean;
|
|
32
36
|
get isInRangeMode(): boolean;
|
|
33
37
|
get showControlArrows(): boolean;
|
|
@@ -58,7 +62,7 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
|
|
|
58
62
|
/**
|
|
59
63
|
* The view that the calendar should start in.
|
|
60
64
|
*/
|
|
61
|
-
startView:
|
|
65
|
+
startView: DateViewType;
|
|
62
66
|
/**
|
|
63
67
|
* Whether to should only the year and multi-year views.
|
|
64
68
|
*/
|
|
@@ -71,20 +75,34 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
|
|
|
71
75
|
* Whether to hide dates in other months at the start or end of the current month.
|
|
72
76
|
*/
|
|
73
77
|
hideOtherMonths: boolean;
|
|
74
|
-
/**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Flag to show today button to jump to today's date. Defaults to `false`.
|
|
80
|
+
*/
|
|
81
|
+
showTodayButton: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Emits when the currently picker moment changes.
|
|
84
|
+
*/
|
|
85
|
+
readonly pickerMomentChange: import("@angular/core").OutputEmitterRef<T>;
|
|
86
|
+
/**
|
|
87
|
+
* Emits when the selected date changes.
|
|
88
|
+
*/
|
|
89
|
+
readonly dateClicked: import("@angular/core").OutputEmitterRef<T>;
|
|
90
|
+
/**
|
|
91
|
+
* Emits when the currently selected date changes.
|
|
92
|
+
*/
|
|
93
|
+
readonly selectedChange: import("@angular/core").OutputEmitterRef<T>;
|
|
94
|
+
/**
|
|
95
|
+
* Emits when any date is selected.
|
|
96
|
+
*/
|
|
97
|
+
readonly userSelection: import("@angular/core").OutputEmitterRef<void>;
|
|
80
98
|
/**
|
|
81
99
|
* Emits the selected year. This doesn't imply a change on the selected date
|
|
82
100
|
*/
|
|
83
|
-
readonly yearSelected:
|
|
101
|
+
readonly yearSelected: import("@angular/core").OutputEmitterRef<T>;
|
|
84
102
|
/**
|
|
85
103
|
* Emits the selected month. This doesn't imply a change on the selected date
|
|
86
104
|
*/
|
|
87
|
-
readonly monthSelected:
|
|
105
|
+
readonly monthSelected: import("@angular/core").OutputEmitterRef<T>;
|
|
88
106
|
private _currentView;
|
|
89
107
|
private intlChangesSub;
|
|
90
108
|
/**
|
|
@@ -96,7 +114,7 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
|
|
|
96
114
|
/**
|
|
97
115
|
* Date filter for the month and year view
|
|
98
116
|
*/
|
|
99
|
-
dateFilterForViews: (date: T) => boolean;
|
|
117
|
+
dateFilterForViews: (date: T | null) => boolean;
|
|
100
118
|
ngAfterContentInit(): void;
|
|
101
119
|
ngAfterViewChecked(): void;
|
|
102
120
|
ngOnDestroy(): void;
|
|
@@ -112,15 +130,17 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
|
|
|
112
130
|
* Handles user clicks on the next button.
|
|
113
131
|
*/
|
|
114
132
|
nextClicked(): void;
|
|
133
|
+
jumpToToday(): void;
|
|
115
134
|
dateSelected(date: T): void;
|
|
116
135
|
/**
|
|
117
136
|
* Change the pickerMoment value and switch to a specific view
|
|
118
137
|
*/
|
|
119
|
-
goToDateInView(date: T, view:
|
|
138
|
+
goToDateInView(date: T, view: DateViewType): void;
|
|
120
139
|
/**
|
|
121
140
|
* Change the pickerMoment value
|
|
122
141
|
*/
|
|
123
142
|
handlePickerMomentChange(date: T): void;
|
|
143
|
+
userSelected(): void;
|
|
124
144
|
/**
|
|
125
145
|
* Whether the previous period button is enabled.
|
|
126
146
|
*/
|
|
@@ -144,5 +164,5 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
|
|
|
144
164
|
*/
|
|
145
165
|
private getValidDate;
|
|
146
166
|
static ɵfac: i0.ɵɵFactoryDeclaration<OwlCalendarComponent<any>, [null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
147
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<OwlCalendarComponent<any>, "owl-date-time-calendar", ["owlDateTimeCalendar"], { "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "yearOnly": { "alias": "yearOnly"; "required": false; }; "multiyearOnly": { "alias": "multiyearOnly"; "required": false; }; "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; }, { "pickerMomentChange": "pickerMomentChange"; "dateClicked": "dateClicked"; "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, false, never>;
|
|
167
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlCalendarComponent<any>, "owl-date-time-calendar", ["owlDateTimeCalendar"], { "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "yearOnly": { "alias": "yearOnly"; "required": false; }; "multiyearOnly": { "alias": "multiyearOnly"; "required": false; }; "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; }; }, { "pickerMomentChange": "pickerMomentChange"; "dateClicked": "dateClicked"; "selectedChange": "selectedChange"; "userSelection": "userSelection"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, false, never>;
|
|
148
168
|
}
|