nxt-pick-datetime 19.0.4 → 20.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.
Files changed (45) hide show
  1. package/assets/picker.scss +21 -21
  2. package/fesm2022/nxt-pick-datetime-moment-adapter.mjs +8 -8
  3. package/fesm2022/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
  4. package/fesm2022/nxt-pick-datetime-native-adapter.mjs +8 -8
  5. package/fesm2022/nxt-pick-datetime-native-adapter.mjs.map +1 -1
  6. package/fesm2022/nxt-pick-datetime.mjs +62 -62
  7. package/fesm2022/nxt-pick-datetime.mjs.map +1 -1
  8. package/index.d.ts +1888 -5
  9. package/moment-adapter/index.d.ts +24 -5
  10. package/native-adapter/index.d.ts +12 -5
  11. package/package.json +8 -8
  12. package/lib/class/date-time-adapter.class.d.ts +0 -176
  13. package/lib/class/date-time-format.class.d.ts +0 -12
  14. package/lib/class/date-time.class.d.ts +0 -76
  15. package/lib/class/dialog-config.class.d.ts +0 -90
  16. package/lib/class/dialog-ref.class.d.ts +0 -50
  17. package/lib/date-time/calendar/calendar.component.d.ts +0 -147
  18. package/lib/date-time/calendar-body/calendar-body.component.d.ts +0 -79
  19. package/lib/date-time/calendar-month-view/calendar-month-view.component.d.ts +0 -139
  20. package/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +0 -115
  21. package/lib/date-time/calendar-year-view/calendar-year-view.component.d.ts +0 -123
  22. package/lib/date-time/date-time-inline/date-time-inline.component.d.ts +0 -106
  23. package/lib/date-time/date-time-picker/date-time-picker.component.d.ts +0 -172
  24. package/lib/date-time/date-time-picker-container/date-time-picker-container.animations.d.ts +0 -6
  25. package/lib/date-time/date-time-picker-container/date-time-picker-container.component.d.ts +0 -129
  26. package/lib/date-time/date-time-picker-input.directive.d.ts +0 -167
  27. package/lib/date-time/date-time-picker-intl.service.d.ts +0 -51
  28. package/lib/date-time/date-time-picker-trigger.directive.d.ts +0 -22
  29. package/lib/date-time/date-time.module.d.ts +0 -23
  30. package/lib/date-time/number-fixed-len.pipe.d.ts +0 -8
  31. package/lib/date-time/timer/timer.component.d.ts +0 -131
  32. package/lib/date-time/timer-box/timer-box.component.d.ts +0 -37
  33. package/lib/dialog/dialog-container/dialog-container.component.d.ts +0 -69
  34. package/lib/dialog/dialog.module.d.ts +0 -12
  35. package/lib/dialog/dialog.service.d.ts +0 -78
  36. package/lib/utils/object.d.ts +0 -9
  37. package/moment-adapter/date-time-adapter.class.d.ts +0 -64
  38. package/moment-adapter/date-time-format.class.d.ts +0 -5
  39. package/moment-adapter/moment-adapter.module.d.ts +0 -8
  40. package/moment-adapter/public-api.d.ts +0 -2
  41. package/native-adapter/date-time-adapter.class.d.ts +0 -72
  42. package/native-adapter/date-time-format.class.d.ts +0 -5
  43. package/native-adapter/native-adapter.module.d.ts +0 -9
  44. package/native-adapter/public-api.d.ts +0 -1
  45. package/public-api.d.ts +0 -14
@@ -1,5 +1,24 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="nxt-pick-datetime/moment-adapter" />
5
- export * from './public-api';
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Provider } from '@angular/core';
3
+
4
+ /** Configurable options for {@see MomentDateAdapter} */
5
+ interface MomentDateTimeAdapterOptions {
6
+ /**
7
+ * Turns the use of utc dates on or off.
8
+ * Changing this will change how the DateTimePicker output value.
9
+ * {@default false}
10
+ */
11
+ useUtc: boolean;
12
+ }
13
+ /** InjectionToken for moment date adapter to configure options */
14
+ declare const NXT_MOMENT_DATE_TIME_ADAPTER_OPTIONS: InjectionToken<MomentDateTimeAdapterOptions>;
15
+
16
+ declare function provideMomentDateTimeAdapter(): Provider[];
17
+ declare class MomentDateTimeModule {
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<MomentDateTimeModule, never>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MomentDateTimeModule, never, never, never>;
20
+ static ɵinj: i0.ɵɵInjectorDeclaration<MomentDateTimeModule>;
21
+ }
22
+
23
+ export { MomentDateTimeModule, NXT_MOMENT_DATE_TIME_ADAPTER_OPTIONS, provideMomentDateTimeAdapter };
24
+ export type { MomentDateTimeAdapterOptions };
@@ -1,5 +1,12 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="nxt-pick-datetime/native-adapter" />
5
- export * from './public-api';
1
+ import * as i0 from '@angular/core';
2
+ import { Provider } from '@angular/core';
3
+ import * as i1 from '@angular/cdk/platform';
4
+
5
+ declare function provideNativeDateTimeAdapter(): Provider[];
6
+ declare class NativeDateTimeModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NativeDateTimeModule, never, [typeof i1.PlatformModule], never>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<NativeDateTimeModule>;
10
+ }
11
+
12
+ export { NativeDateTimeModule, provideNativeDateTimeAdapter };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "nxt-pick-datetime",
3
3
  "description": "Date time picker for Angular",
4
4
  "bugs": "https://github.com/Liquid-JS/nxt-components/issues",
5
- "version": "19.0.4",
5
+ "version": "20.0.0",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "repository": "https://github.com/Liquid-JS/nxt-components.git",
@@ -20,14 +20,14 @@
20
20
  "picker"
21
21
  ],
22
22
  "peerDependencies": {
23
- "@angular/animations": "^19.0.0",
24
- "@angular/cdk": "^19.0.0",
25
- "@angular/common": "^19.0.0",
26
- "@angular/core": "^19.0.0",
27
- "@angular/forms": "^19.0.0",
28
- "@angular/localize": "^19.0.0",
23
+ "@angular/animations": "^20.0.0",
24
+ "@angular/cdk": "^20.0.0",
25
+ "@angular/common": "^20.0.0",
26
+ "@angular/core": "^20.0.0",
27
+ "@angular/forms": "^20.0.0",
28
+ "@angular/localize": "^20.0.0",
29
29
  "moment": "^2.30.1",
30
- "rxjs": "^7.8.1"
30
+ "rxjs": "^7.8.2"
31
31
  },
32
32
  "dependencies": {
33
33
  "tslib": "^2.8.1"
@@ -1,176 +0,0 @@
1
- import { Observable, Subject } from 'rxjs';
2
- export declare abstract class DateTimeAdapter<T> {
3
- /** The locale to use for all dates */
4
- protected locale: any;
5
- /** A stream that emits when the locale changes */
6
- protected _localeChanges: Subject<void>;
7
- get localeChanges(): Observable<void>;
8
- /** total milliseconds in a day */
9
- protected readonly millisecondsInDay = 86400000;
10
- /** total milliseconds in a minute */
11
- protected readonly milliseondsInMinute = 60000;
12
- /**
13
- * Get the year of the given date
14
- */
15
- abstract getYear(date?: T): number;
16
- /**
17
- * Get the month of the given date
18
- * 0 -- January
19
- * 11 -- December
20
- * */
21
- abstract getMonth(date?: T): number;
22
- /**
23
- * Get the day of the week of the given date
24
- * 0 -- Sunday
25
- * 6 -- Saturday
26
- * */
27
- abstract getDay(date?: T): number;
28
- /**
29
- * Get the day num of the given date
30
- */
31
- abstract getDate(date?: T): number;
32
- /**
33
- * Get the hours of the given date
34
- */
35
- abstract getHours(date?: T): number;
36
- /**
37
- * Get the minutes of the given date
38
- */
39
- abstract getMinutes(date?: T): number;
40
- /**
41
- * Get the seconds of the given date
42
- */
43
- abstract getSeconds(date?: T): number;
44
- /**
45
- * Get the milliseconds timestamp of the given date
46
- */
47
- abstract getTime(date?: T): number;
48
- /**
49
- * Gets the number of days in the month of the given date.
50
- */
51
- abstract getNumDaysInMonth(date?: T): number;
52
- /**
53
- * Get the number of calendar days between the given dates.
54
- * If dateLeft is before dateRight, it would return positive value
55
- * If dateLeft is after dateRight, it would return negative value
56
- */
57
- abstract differenceInCalendarDays(dateLeft?: T, dateRight?: T): number | undefined;
58
- /**
59
- * Gets the name for the year of the given date.
60
- */
61
- abstract getYearName(date?: T): string;
62
- /**
63
- * Get a list of month names
64
- */
65
- abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
66
- /**
67
- * Get a list of week names
68
- */
69
- abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
70
- /**
71
- * Gets a list of names for the dates of the month.
72
- */
73
- abstract getDateNames(): string[];
74
- /**
75
- * Return a Date object as a string, using the ISO standard
76
- */
77
- abstract toIso8601(date: T): string;
78
- /**
79
- * Check if the give dates are equal
80
- */
81
- abstract isEqual(dateLeft?: T, dateRight?: T): boolean;
82
- /**
83
- * Check if the give dates are the same day
84
- */
85
- abstract isSameDay(dateLeft?: T, dateRight?: T): boolean;
86
- /**
87
- * Checks whether the given date is valid.
88
- */
89
- abstract isValid(date?: T): boolean;
90
- /**
91
- * Gets date instance that is not valid.
92
- */
93
- abstract invalid(): T;
94
- /**
95
- * Checks whether the given object is considered a date instance by this DateTimeAdapter.
96
- */
97
- abstract isDateInstance(obj: any): boolean;
98
- /**
99
- * Add the specified number of years to the given date
100
- */
101
- abstract addCalendarYears(date: T | undefined, amount: number): T;
102
- /**
103
- * Add the specified number of months to the given date
104
- */
105
- abstract addCalendarMonths(date: T | undefined, amount: number): T;
106
- /**
107
- * Add the specified number of days to the given date
108
- */
109
- abstract addCalendarDays(date: T | undefined, amount: number): T;
110
- /**
111
- * Set the hours to the given date.
112
- */
113
- abstract setHours(date: T | undefined, amount: number): T;
114
- /**
115
- * Set the minutes to the given date.
116
- */
117
- abstract setMinutes(date: T | undefined, amount: number): T;
118
- /**
119
- * Set the seconds to the given date.
120
- */
121
- abstract setSeconds(date: T | undefined, amount: number): T;
122
- /**
123
- * Creates a date with the given year, month, date, hour, minute and second. Does not allow over/under-flow of the
124
- * month and date.
125
- */
126
- abstract createDate(year: number, month: number, date: number): T;
127
- abstract createDate(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): T;
128
- /**
129
- * Clone the given date
130
- */
131
- abstract clone(date?: T): T;
132
- /**
133
- * Get a new moment
134
- * */
135
- abstract now(): T;
136
- /**
137
- * Formats a date as a string according to the given format.
138
- */
139
- abstract format(date: T | undefined, displayFormat: any): string;
140
- /**
141
- * Parse a user-provided value to a Date Object
142
- */
143
- abstract parse(value: any, parseFormat: any): T | undefined;
144
- /**
145
- * Compare two given dates
146
- * 1 if the first date is after the second,
147
- * -1 if the first date is before the second
148
- * 0 if dates are equal.
149
- * */
150
- compare(first?: T, second?: T): number;
151
- /**
152
- * Check if two given dates are in the same year
153
- * 1 if the first date's year is after the second,
154
- * -1 if the first date's year is before the second
155
- * 0 if two given dates are in the same year
156
- * */
157
- compareYear(first?: T, second?: T): number;
158
- /**
159
- * Attempts to deserialize a value to a valid date object. This is different from parsing in that
160
- * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
161
- * string). The default implementation does not allow any deserialization, it simply checks that
162
- * the given value is already a valid date object or null. The `<mat-datepicker>` will call this
163
- * method on all of it's `@Input()` properties that accept dates. It is therefore possible to
164
- * support passing values from your backend directly to these properties by overriding this method
165
- * to also deserialize the format used by your backend.
166
- */
167
- deserialize(value: any): T | undefined;
168
- /**
169
- * Sets the locale used for all dates.
170
- */
171
- setLocale(locale: any): void;
172
- /**
173
- * Clamp the given date between min and max dates.
174
- */
175
- clampDate(date: T, min?: T, max?: T): T;
176
- }
@@ -1,12 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- export interface DateTimeFormats {
3
- parseInput: any;
4
- fullPickerInput: any;
5
- datePickerInput: any;
6
- timePickerInput: any;
7
- monthYearLabel: any;
8
- dateA11yLabel: any;
9
- monthYearA11yLabel: any;
10
- }
11
- /** InjectionToken for date time picker that can be used to override default format */
12
- export declare const NXT_DATE_TIME_FORMATS: InjectionToken<DateTimeFormats>;
@@ -1,76 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { DateTimeAdapter } from './date-time-adapter.class';
3
- import { DateTimeFormats } from './date-time-format.class';
4
- import * as i0 from "@angular/core";
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;
14
- /**
15
- * When true, shows a timer to configure the seconds value
16
- */
17
- showSecondsTimer: boolean;
18
- /**
19
- * When true, the timer will be in 12-hour format mode
20
- */
21
- hour12Timer: boolean;
22
- /**
23
- * The view that the calendar should start on
24
- */
25
- startView: ViewType;
26
- /**
27
- * Hours to change per step
28
- */
29
- stepHour: number;
30
- /**
31
- * Minutes to change per step
32
- */
33
- stepMinute: number;
34
- /**
35
- * Seconds to change per step
36
- */
37
- stepSecond: number;
38
- /**
39
- * Set the first day of week
40
- *
41
- * Valid values are from 0 [Sunday] to 6 [Saturday]
42
- */
43
- firstDayOfWeek: number;
44
- /**
45
- * If true, don't show dates from preious / next month on the calendar month view
46
- */
47
- hideOtherMonths: boolean;
48
- readonly id: string;
49
- abstract get selected(): T | undefined;
50
- abstract get selecteds(): Array<T | undefined>;
51
- abstract get dateTimeFilter(): DateFilter<T> | undefined;
52
- abstract get max(): T | undefined;
53
- abstract get min(): T | undefined;
54
- abstract get selectMode(): SelectMode | undefined;
55
- abstract get startAt(): T | undefined;
56
- abstract get isOpen(): boolean;
57
- abstract get pickerMode(): PickerMode;
58
- abstract get pickerType(): PickerType;
59
- abstract get isInSingleMode(): boolean;
60
- abstract get isInRangeMode(): boolean;
61
- abstract select(date: T | Array<T | undefined>): void;
62
- abstract yearSelected: EventEmitter<T>;
63
- abstract monthSelected: EventEmitter<T>;
64
- abstract selectYear(normalizedYear: T): void;
65
- abstract selectMonth(normalizedMonth: T): void;
66
- get formatString(): string;
67
- /**
68
- * Date Time Checker to check if the give dateTime is selectable
69
- */
70
- dateTimeChecker: (dateTime: T | undefined) => boolean;
71
- get disabled(): boolean;
72
- constructor(dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
73
- protected getValidDate(obj: any): T | undefined;
74
- static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeDirective<any>, never>;
75
- static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeDirective<any>, never, never, { "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "stepHour": { "alias": "stepHour"; "required": false; }; "stepMinute": { "alias": "stepMinute"; "required": false; }; "stepSecond": { "alias": "stepSecond"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; }, {}, never, never, true, never>;
76
- }
@@ -1,90 +0,0 @@
1
- import { ScrollStrategy } from '@angular/cdk/overlay';
2
- import { ViewContainerRef } from '@angular/core';
3
- /** Possible overrides for a dialog's position */
4
- export interface DialogPosition {
5
- /** Override for the dialog's top position */
6
- top?: string;
7
- /** Override for the dialog's bottom position */
8
- bottom?: string;
9
- /** Override for the dialog's left position */
10
- left?: string;
11
- /** Override for the dialog's right position */
12
- right?: string;
13
- }
14
- export declare class DialogConfig {
15
- /**
16
- * ID of the element that describes the dialog.
17
- */
18
- ariaDescribedBy?: string;
19
- /**
20
- * Whether to focus the dialog when the dialog is isOpen
21
- */
22
- autoFocus: boolean;
23
- /** Whether the dialog has a backdrop */
24
- hasBackdrop?: boolean | undefined;
25
- /**
26
- * Custom style for the backdrop
27
- */
28
- backdropStyle?: any;
29
- /** Data being injected into the child component */
30
- data?: any;
31
- /** Whether the user can use escape or clicking outside to close a modal */
32
- disableClose?: boolean | undefined;
33
- /**
34
- * ID for the modal. If omitted, a unique one will be generated.
35
- */
36
- id?: string;
37
- /**
38
- * The ARIA role of the dialog element.
39
- */
40
- role?: 'dialog' | 'alertdialog';
41
- /**
42
- * Custom class for the pane
43
- */
44
- paneClass?: string | string[];
45
- /**
46
- * Mouse Event
47
- */
48
- event?: MouseEvent;
49
- /**
50
- * Custom class for the backdrop
51
- */
52
- backdropClass?: string | string[];
53
- /**
54
- * Whether the dialog should close when the user goes backwards/forwards in history.
55
- */
56
- closeOnNavigation?: boolean;
57
- /** Width of the dialog */
58
- width?: string;
59
- /** Height of the dialog */
60
- height?: string;
61
- /**
62
- * The min-width of the overlay panel.
63
- * If a number is provided, pixel units are assumed.
64
- */
65
- minWidth?: number | string;
66
- /**
67
- * The min-height of the overlay panel.
68
- * If a number is provided, pixel units are assumed.
69
- */
70
- minHeight?: number | string;
71
- /**
72
- * The max-width of the overlay panel.
73
- * If a number is provided, pixel units are assumed.
74
- */
75
- maxWidth?: number | string;
76
- /**
77
- * The max-height of the overlay panel.
78
- * If a number is provided, pixel units are assumed.
79
- */
80
- maxHeight?: number | string;
81
- /** Position overrides */
82
- position?: DialogPosition;
83
- /**
84
- * The scroll strategy when the dialog is open
85
- * Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies
86
- */
87
- scrollStrategy?: ScrollStrategy;
88
- viewContainerRef?: ViewContainerRef;
89
- constructor();
90
- }
@@ -1,50 +0,0 @@
1
- import { OverlayRef } from '@angular/cdk/overlay';
2
- import { Location } from '@angular/common';
3
- import { DialogContainerComponent } from '../dialog/dialog-container/dialog-container.component';
4
- import { DialogPosition } from './dialog-config.class';
5
- export declare class DialogRef<T> {
6
- private readonly overlayRef;
7
- private readonly container;
8
- readonly id?: string | undefined;
9
- private result;
10
- private readonly _beforeClose$;
11
- private readonly _afterOpen$;
12
- private readonly _afterClosed$;
13
- /** Subscription to changes in the user's location */
14
- private locationChanged?;
15
- /**
16
- * The instance of component isOpen into modal
17
- */
18
- componentInstance?: T;
19
- /** Whether the user is allowed to close the dialog */
20
- disableClose: boolean;
21
- constructor(overlayRef: OverlayRef, container: DialogContainerComponent, id?: string | undefined, location?: Location);
22
- close(dialogResult?: any): void;
23
- /**
24
- * Gets an observable that emits when the overlay's backdrop has been clicked.
25
- */
26
- backdropClick(): import("rxjs").Observable<MouseEvent>;
27
- /**
28
- * Gets an observable that emits when keydown events are targeted on the overlay.
29
- */
30
- keydownEvents(): import("rxjs").Observable<KeyboardEvent>;
31
- /**
32
- * Updates the dialog's position.
33
- *
34
- * @param position New dialog position.
35
- */
36
- updatePosition(position?: DialogPosition): this;
37
- /**
38
- * Updates the dialog's width and height.
39
- *
40
- * @param width New width of the dialog.
41
- * @param height New height of the dialog.
42
- */
43
- updateSize(width?: string, height?: string): this;
44
- isAnimating(): boolean;
45
- afterOpen(): import("rxjs").Observable<void>;
46
- beforeClose(): import("rxjs").Observable<void>;
47
- afterClosed(): import("rxjs").Observable<void>;
48
- /** Fetches the position strategy object from the overlay ref */
49
- private getPositionStrategy;
50
- }
@@ -1,147 +0,0 @@
1
- import { AfterContentInit, AfterViewChecked, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit } from '@angular/core';
2
- import { DateTimeAdapter } from '../../class/date-time-adapter.class';
3
- import { DateTimeFormats } from '../../class/date-time-format.class';
4
- import { DateFilter, SelectMode } from '../../class/date-time.class';
5
- import { DateTimeIntl } from '../date-time-picker-intl.service';
6
- import * as i0 from "@angular/core";
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
- /**
15
- * Date filter for the month and year view
16
- */
17
- dateTimeFilter?: DateFilter<T>;
18
- /**
19
- * Set the first day of week
20
- */
21
- firstDayOfWeek: number;
22
- /** The minimum selectable date */
23
- private _minDate?;
24
- get min(): T | undefined;
25
- set min(value: T | undefined);
26
- /** The maximum selectable date */
27
- private _maxDate?;
28
- get max(): T | undefined;
29
- set max(value: T | undefined);
30
- /** The current picker moment */
31
- private _pickerMoment?;
32
- get pickerMoment(): T | undefined;
33
- set pickerMoment(value: T | undefined);
34
- selectMode?: SelectMode;
35
- /** The currently selected moment */
36
- private _selected?;
37
- get selected(): T | undefined;
38
- set selected(value: T | undefined);
39
- private _selecteds;
40
- get selecteds(): Array<T | undefined>;
41
- set selecteds(values: Array<T | undefined>);
42
- /**
43
- * The view that the calendar should start in
44
- */
45
- startView: 'month' | 'year' | 'multi-years';
46
- /**
47
- * Whether to hide dates in other months at the start or end of the current month
48
- */
49
- hideOtherMonths: boolean;
50
- /** Emits when the currently picker moment changes */
51
- readonly pickerMomentChange: EventEmitter<T>;
52
- /** Emits when the currently selected date changes */
53
- readonly selectedChange: EventEmitter<T | undefined>;
54
- /** Emits when any date is selected */
55
- readonly userSelection: EventEmitter<void>;
56
- /**
57
- * Emits the selected year
58
- *
59
- * This doesn't imply a change on the selected date.
60
- */
61
- readonly yearSelected: EventEmitter<T>;
62
- /**
63
- * Emits the selected month
64
- *
65
- * This doesn't imply a change on the selected date.
66
- */
67
- readonly monthSelected: EventEmitter<T>;
68
- get periodButtonText(): string;
69
- get periodButtonLabel(): string;
70
- get prevButtonLabel(): string | undefined;
71
- get nextButtonLabel(): string | undefined;
72
- private _currentView?;
73
- get currentView(): 'month' | 'year' | 'multi-years' | undefined;
74
- set currentView(view: 'month' | 'year' | 'multi-years' | undefined);
75
- get isInSingleMode(): boolean;
76
- get isInRangeMode(): boolean;
77
- get showControlArrows(): boolean;
78
- get isMonthView(): boolean;
79
- /**
80
- * Date filter for the month and year view
81
- */
82
- dateTimeFilterForViews: (date?: T) => boolean;
83
- /**
84
- * Bind class 'nxt-dt-calendar' to host
85
- *
86
- * @internal
87
- */
88
- get calendarClass(): boolean;
89
- private intlChangesSub?;
90
- /**
91
- * Used for scheduling that focus should be moved to the active cell on the next tick.
92
- * We need to schedule it, rather than do it immediately, because we have to wait
93
- * for Angular to re-evaluate the view children.
94
- */
95
- private moveFocusOnNextTick;
96
- constructor(elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, ngZone: NgZone, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
97
- ngOnInit(): void;
98
- ngAfterContentInit(): void;
99
- ngAfterViewChecked(): void;
100
- ngOnDestroy(): void;
101
- /**
102
- * Toggle between month view and year view
103
- */
104
- toggleViews(): void;
105
- /**
106
- * Handles user clicks on the previous button.
107
- */
108
- previousClicked(): void;
109
- /**
110
- * Handles user clicks on the next button.
111
- */
112
- nextClicked(): void;
113
- dateSelected(date?: T): void;
114
- /**
115
- * Change the pickerMoment value and switch to a specific view
116
- */
117
- goToDateInView(date: T, view: 'month' | 'year' | 'multi-years'): void;
118
- /**
119
- * Change the pickerMoment value
120
- */
121
- handlePickerMomentChange(date: T): void;
122
- userSelected(): void;
123
- /**
124
- * Whether the previous period button is enabled.
125
- */
126
- prevButtonEnabled(): boolean;
127
- /**
128
- * Whether the next period button is enabled.
129
- */
130
- nextButtonEnabled(): boolean;
131
- /**
132
- * Focus to the host element
133
- */
134
- focusActiveCell(): void;
135
- selectYearInMultiYearView(normalizedYear: T): void;
136
- selectMonthInYearView(normalizedMonth: T): void;
137
- /**
138
- * Whether the two dates represent the same view in the current view mode (month or year).
139
- */
140
- private isSameView;
141
- /**
142
- * Get a valid date object
143
- */
144
- private getValidDate;
145
- static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent<any>, never>;
146
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent<any>, "nxt-date-time-calendar", never, { "dateTimeFilter": { "alias": "dateTimeFilter"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; }, { "pickerMomentChange": "pickerMomentChange"; "selectedChange": "selectedChange"; "userSelection": "userSelection"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, false, never>;
147
- }