nxt-pick-datetime 19.0.4 → 21.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +11 -14
  2. package/assets/picker.scss +23 -23
  3. package/fesm2022/nxt-pick-datetime-moment-adapter.mjs +19 -27
  4. package/fesm2022/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
  5. package/fesm2022/nxt-pick-datetime-native-adapter.mjs +19 -22
  6. package/fesm2022/nxt-pick-datetime-native-adapter.mjs.map +1 -1
  7. package/fesm2022/nxt-pick-datetime.mjs +1862 -2637
  8. package/fesm2022/nxt-pick-datetime.mjs.map +1 -1
  9. package/package.json +16 -13
  10. package/types/nxt-pick-datetime-moment-adapter.d.ts +25 -0
  11. package/types/nxt-pick-datetime-native-adapter.d.ts +13 -0
  12. package/types/nxt-pick-datetime.d.ts +1200 -0
  13. package/index.d.ts +0 -5
  14. package/lib/class/date-time-adapter.class.d.ts +0 -176
  15. package/lib/class/date-time-format.class.d.ts +0 -12
  16. package/lib/class/date-time.class.d.ts +0 -76
  17. package/lib/class/dialog-config.class.d.ts +0 -90
  18. package/lib/class/dialog-ref.class.d.ts +0 -50
  19. package/lib/date-time/calendar/calendar.component.d.ts +0 -147
  20. package/lib/date-time/calendar-body/calendar-body.component.d.ts +0 -79
  21. package/lib/date-time/calendar-month-view/calendar-month-view.component.d.ts +0 -139
  22. package/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +0 -115
  23. package/lib/date-time/calendar-year-view/calendar-year-view.component.d.ts +0 -123
  24. package/lib/date-time/date-time-inline/date-time-inline.component.d.ts +0 -106
  25. package/lib/date-time/date-time-picker/date-time-picker.component.d.ts +0 -172
  26. package/lib/date-time/date-time-picker-container/date-time-picker-container.animations.d.ts +0 -6
  27. package/lib/date-time/date-time-picker-container/date-time-picker-container.component.d.ts +0 -129
  28. package/lib/date-time/date-time-picker-input.directive.d.ts +0 -167
  29. package/lib/date-time/date-time-picker-intl.service.d.ts +0 -51
  30. package/lib/date-time/date-time-picker-trigger.directive.d.ts +0 -22
  31. package/lib/date-time/date-time.module.d.ts +0 -23
  32. package/lib/date-time/number-fixed-len.pipe.d.ts +0 -8
  33. package/lib/date-time/timer/timer.component.d.ts +0 -131
  34. package/lib/date-time/timer-box/timer-box.component.d.ts +0 -37
  35. package/lib/dialog/dialog-container/dialog-container.component.d.ts +0 -69
  36. package/lib/dialog/dialog.module.d.ts +0 -12
  37. package/lib/dialog/dialog.service.d.ts +0 -78
  38. package/lib/utils/object.d.ts +0 -9
  39. package/moment-adapter/date-time-adapter.class.d.ts +0 -64
  40. package/moment-adapter/date-time-format.class.d.ts +0 -5
  41. package/moment-adapter/index.d.ts +0 -5
  42. package/moment-adapter/moment-adapter.module.d.ts +0 -8
  43. package/moment-adapter/public-api.d.ts +0 -2
  44. package/native-adapter/date-time-adapter.class.d.ts +0 -72
  45. package/native-adapter/date-time-format.class.d.ts +0 -5
  46. package/native-adapter/index.d.ts +0 -5
  47. package/native-adapter/native-adapter.module.d.ts +0 -9
  48. package/native-adapter/public-api.d.ts +0 -1
  49. package/public-api.d.ts +0 -14
@@ -1,129 +0,0 @@
1
- import { AnimationEvent } from '@angular/animations';
2
- import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
3
- import { DateTimeAdapter } from '../../class/date-time-adapter.class';
4
- import { DateTimeDirective } from '../../class/date-time.class';
5
- import { CalendarComponent } from '../calendar/calendar.component';
6
- import { DateTimeIntl } from '../date-time-picker-intl.service';
7
- import { TimerComponent } from '../timer/timer.component';
8
- import * as i0 from "@angular/core";
9
- /** @internal */
10
- export declare class DateTimeContainerComponent<T> implements OnInit, AfterContentInit, AfterViewInit {
11
- private readonly cdRef;
12
- private readonly elmRef;
13
- private readonly pickerIntl;
14
- private readonly dateTimeAdapter;
15
- calendar?: CalendarComponent<T>;
16
- timer?: TimerComponent<T>;
17
- picker?: DateTimeDirective<T>;
18
- activeSelectedIndex: number;
19
- /**
20
- * Stream emits when try to hide picker
21
- */
22
- private readonly hidePicker$;
23
- readonly hidePickerStream: import("rxjs").Observable<void>;
24
- /**
25
- * Stream emits when try to confirm the selected value
26
- */
27
- private readonly confirmSelected$;
28
- readonly confirmSelectedStream: import("rxjs").Observable<Event>;
29
- private readonly pickerOpened$;
30
- readonly pickerOpenedStream: import("rxjs").Observable<void>;
31
- /**
32
- * The current picker moment. This determines which time period is shown and which date is
33
- * highlighted when using keyboard navigation.
34
- */
35
- private _clamPickerMoment?;
36
- get pickerMoment(): T | undefined;
37
- set pickerMoment(value: T | undefined);
38
- get pickerType(): import("../../class/date-time.class").PickerType | undefined;
39
- get cancelLabel(): string;
40
- get setLabel(): string;
41
- /**
42
- * The range 'from' label
43
- */
44
- get fromLabel(): string;
45
- /**
46
- * The range 'to' label
47
- */
48
- get toLabel(): string;
49
- /**
50
- * The range 'from' formatted value
51
- */
52
- get fromFormattedValue(): string;
53
- /**
54
- * The range 'to' formatted value
55
- */
56
- get toFormattedValue(): string;
57
- /**
58
- * Cases in which the control buttons show in the picker
59
- * 1) picker mode is 'dialog'
60
- * 2) picker type is NOT 'calendar' and the picker mode is NOT 'inline'
61
- */
62
- get showControlButtons(): boolean;
63
- get containerElm(): HTMLElement;
64
- /** @internal */
65
- get containerClass(): boolean;
66
- /** @internal */
67
- get popupContainerClass(): boolean;
68
- /** @internal */
69
- get dialogContainerClass(): boolean;
70
- /** @internal */
71
- get inlineContainerClass(): boolean;
72
- /** @internal */
73
- get containerDisabledClass(): boolean;
74
- /** @internal */
75
- get containerId(): string | undefined;
76
- /** @internal */
77
- get containerAnimation(): any;
78
- constructor(cdRef: ChangeDetectorRef, elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, dateTimeAdapter: DateTimeAdapter<T>);
79
- ngOnInit(): void;
80
- ngAfterContentInit(): void;
81
- ngAfterViewInit(): void;
82
- handleContainerAnimationDone(event: AnimationEvent): void;
83
- dateSelected(date?: T): void;
84
- timeSelected(time?: T): void;
85
- /**
86
- * Handle click on cancel button
87
- */
88
- onCancelClicked(event: Event): void;
89
- /**
90
- * Handle click on set button
91
- */
92
- onSetClicked(event: Event): void;
93
- /**
94
- * Handle click on inform radio group
95
- */
96
- handleClickOnInfoGroup(event: any, index: number): void;
97
- /**
98
- * Handle click on inform radio group
99
- */
100
- handleKeydownOnInfoGroup(event: any, next: any, index: number): void;
101
- /**
102
- * Set the value of activeSelectedIndex
103
- */
104
- private setActiveSelectedIndex;
105
- private initPicker;
106
- /**
107
- * Select calendar date in single mode,
108
- * it returns undefined when date is not selected.
109
- */
110
- private dateSelectedInSingleMode;
111
- /**
112
- * Select dates in range Mode
113
- */
114
- private dateSelectedInRangeMode;
115
- /**
116
- * Update the given calendar date's time and check if it is valid
117
- * Because the calendar date has 00:00:00 as default time, if the picker type is 'both',
118
- * we need to update the given calendar date's time before selecting it.
119
- * if it is valid, return the updated dateTime
120
- * if it is not valid, return undefined
121
- */
122
- private updateAndCheckCalendarDate;
123
- /**
124
- * Focus to the picker
125
- */
126
- private focusPicker;
127
- static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeContainerComponent<any>, never>;
128
- static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeContainerComponent<any>, "nxt-date-time-container", never, {}, {}, never, never, false, never>;
129
- }
@@ -1,167 +0,0 @@
1
- import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, OnInit, Provider, Renderer2 } from '@angular/core';
2
- import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
3
- import { DateTimeAdapter } from '../class/date-time-adapter.class';
4
- import { DateTimeFormats } from '../class/date-time-format.class';
5
- import { DateFilter, SelectMode } from '../class/date-time.class';
6
- import { DateTimeComponent } from './date-time-picker/date-time-picker.component';
7
- import * as i0 from "@angular/core";
8
- /** @internal */
9
- export declare const NXT_DATETIME_VALUE_ACCESSOR: Provider;
10
- /** @internal */
11
- export declare const NXT_DATETIME_VALIDATORS: Provider;
12
- export interface DateTimeInputEvent<T> {
13
- source: DateTimeInputDirective<T>;
14
- value?: T | Array<T | undefined>;
15
- input: HTMLInputElement;
16
- }
17
- export declare class DateTimeInputDirective<T> implements OnInit, AfterContentInit, OnDestroy, ControlValueAccessor, Validator {
18
- private readonly elmRef;
19
- private readonly renderer;
20
- private readonly dateTimeAdapter;
21
- private readonly dateTimeFormats;
22
- /**
23
- * The date & time picker this input is associated with
24
- */
25
- set dateTime(value: DateTimeComponent<T>);
26
- private _dateTimeFilter?;
27
- /**
28
- * A function to filter available date & time
29
- */
30
- set dateTimeFilter(filter: DateFilter<T> | undefined);
31
- get dateTimeFilter(): DateFilter<T> | undefined;
32
- private _disabled;
33
- /** Whether the date & time picker input is disabled */
34
- get disabled(): boolean;
35
- set disabled(value: boolean);
36
- private _min?;
37
- /** The minimum valid date */
38
- get min(): T | undefined;
39
- set min(value: T | undefined);
40
- private _max?;
41
- /** The maximum valid date */
42
- get max(): T | undefined;
43
- set max(value: T | undefined);
44
- private _selectMode;
45
- /**
46
- * The picker select mode
47
- *
48
- * - `'single'` - select a single date
49
- * - `'range'` - select a range [from, to]
50
- * - `'rangeFrom'` - an open range with a fixed start date
51
- * - `'rangeTo'` - an open range with a fixed end date
52
- */
53
- get selectMode(): SelectMode;
54
- set selectMode(mode: SelectMode);
55
- /**
56
- * The character to separate the 'from' and 'to' in input value
57
- */
58
- rangeSeparator: string;
59
- private _value?;
60
- get value(): T | undefined;
61
- set value(value: T | undefined);
62
- private _values;
63
- get values(): Array<T | undefined>;
64
- set values(values: Array<T | undefined>);
65
- /**
66
- * Callback to invoke when `change` event is fired on this `<input>`
67
- */
68
- readonly dateTimeChange: EventEmitter<DateTimeInputEvent<T>>;
69
- /**
70
- * Callback to invoke when an `input` event is fired on this `<input>`.
71
- */
72
- readonly dateTimeInput: EventEmitter<DateTimeInputEvent<T>>;
73
- get elementRef(): ElementRef<HTMLInputElement>;
74
- get isInSingleMode(): boolean;
75
- get isInRangeMode(): boolean;
76
- /** The date-time-picker that this input is associated with */
77
- dtPicker?: DateTimeComponent<T>;
78
- private dtPickerSub?;
79
- private localeSub?;
80
- private lastValueValid;
81
- private onModelChange?;
82
- private onModelTouched?;
83
- private validatorOnChange?;
84
- /** The form control validator for whether the input parses */
85
- private readonly parseValidator;
86
- /** The form control validator for the min date */
87
- private readonly minValidator;
88
- /** The form control validator for the max date */
89
- private readonly maxValidator;
90
- /** The form control validator for the date filter */
91
- private readonly filterValidator;
92
- /**
93
- * The form control validator for the range.
94
- * Check whether the 'before' value is before the 'to' value
95
- */
96
- private readonly rangeValidator;
97
- /** The combined form control validator for this input */
98
- private readonly validator;
99
- /** Emits when the value changes (either due to user input or programmatic change) */
100
- readonly valueChange: EventEmitter<T | (T | undefined)[] | undefined>;
101
- /** Emits when the disabled state has changed */
102
- readonly disabledChange: EventEmitter<boolean>;
103
- /** @internal */
104
- get inputAriaHaspopup(): boolean;
105
- /** @internal */
106
- get inputAriaOwns(): string | undefined;
107
- /** @internal */
108
- get minIso8601(): string | undefined;
109
- /** @internal */
110
- get maxIso8601(): string | undefined;
111
- /** @internal */
112
- get inputDisabled(): boolean;
113
- constructor(elmRef: ElementRef<HTMLInputElement>, renderer: Renderer2, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
114
- ngOnInit(): void;
115
- ngAfterContentInit(): void;
116
- ngOnDestroy(): void;
117
- writeValue(value: any): void;
118
- registerOnChange(fn: any): void;
119
- registerOnTouched(fn: any): void;
120
- setDisabledState(isDisabled: boolean): void;
121
- validate(c: AbstractControl): ValidationErrors | null;
122
- registerOnValidatorChange(fn: () => void): void;
123
- /**
124
- * Open the picker when user hold alt + ArrowDown
125
- */
126
- handleKeydownOnHost(event: KeyboardEvent): void;
127
- handleBlurOnHost(_event: Event): void;
128
- handleInputOnHost(event: any): void;
129
- handleChangeOnHost(_event: any): void;
130
- /**
131
- * Set the native input property 'value'
132
- */
133
- formatNativeInputValue(): void;
134
- /**
135
- * Register the relationship between this input and its picker component
136
- */
137
- private registerDateTimePicker;
138
- /**
139
- * Convert a given obj to a valid date object
140
- */
141
- private getValidDate;
142
- /**
143
- * Convert a time string to a date-time string
144
- * When pickerType is 'timer', the value in the picker's input is a time string.
145
- * The dateTimeAdapter parse fn could not parse a time string to a Date Object.
146
- * Therefore we need this fn to convert a time string to a date-time string.
147
- */
148
- private convertTimeStringToDateTimeString;
149
- /**
150
- * Handle input change in single mode
151
- */
152
- private changeInputInSingleMode;
153
- /**
154
- * Handle input change in rangeFrom or rangeTo mode
155
- */
156
- private changeInputInRangeFromToMode;
157
- /**
158
- * Handle input change in range mode
159
- */
160
- private changeInputInRangeMode;
161
- /**
162
- * Check if the two value is the same
163
- */
164
- private isSameValue;
165
- static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeInputDirective<any>, never>;
166
- static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeInputDirective<any>, "input[nxtDateTime]", ["nxtDateTimeInput"], { "dateTime": { "alias": "nxtDateTime"; "required": false; }; "dateTimeFilter": { "alias": "dateTimeFilter"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "rangeSeparator": { "alias": "rangeSeparator"; "required": false; }; "value": { "alias": "value"; "required": false; }; "values": { "alias": "values"; "required": false; }; }, { "dateTimeChange": "dateTimeChange"; "dateTimeInput": "dateTimeInput"; }, never, never, false, never>;
167
- }
@@ -1,51 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import * as i0 from "@angular/core";
3
- export declare class DateTimeIntl {
4
- /**
5
- * Stream that emits whenever the labels here are changed. Use this to notify
6
- * components if the labels have changed after initialization.
7
- */
8
- readonly changes: Subject<void>;
9
- /** A label for the up second button (used by screen readers). */
10
- upSecondLabel: string;
11
- /** A label for the down second button (used by screen readers). */
12
- downSecondLabel: string;
13
- /** A label for the up minute button (used by screen readers). */
14
- upMinuteLabel: string;
15
- /** A label for the down minute button (used by screen readers). */
16
- downMinuteLabel: string;
17
- /** A label for the up hour button (used by screen readers). */
18
- upHourLabel: string;
19
- /** A label for the down hour button (used by screen readers). */
20
- downHourLabel: string;
21
- /** A label for the previous month button (used by screen readers) */
22
- prevMonthLabel: string;
23
- /** A label for the next month button (used by screen readers) */
24
- nextMonthLabel: string;
25
- /** A label for the previous year button (used by screen readers) */
26
- prevYearLabel: string;
27
- /** A label for the next year button (used by screen readers) */
28
- nextYearLabel: string;
29
- /** A label for the previous multi-year button (used by screen readers) */
30
- prevMultiYearLabel: string;
31
- /** A label for the next multi-year button (used by screen readers) */
32
- nextMultiYearLabel: string;
33
- /** A label for the 'switch to month view' button (used by screen readers) */
34
- switchToMonthViewLabel: string;
35
- /** A label for the 'switch to year view' button (used by screen readers) */
36
- switchToMultiYearViewLabel: string;
37
- /** A label for the cancel button */
38
- cancelBtnLabel: string;
39
- /** A label for the set button */
40
- setBtnLabel: string;
41
- /** A label for the range 'from' in picker info */
42
- rangeFromLabel: string;
43
- /** A label for the range 'to' in picker info */
44
- rangeToLabel: string;
45
- /** A label for the hour12 button (AM) */
46
- hour12AMLabel: string;
47
- /** A label for the hour12 button (PM) */
48
- hour12PMLabel: string;
49
- static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeIntl, never>;
50
- static ɵprov: i0.ɵɵInjectableDeclaration<DateTimeIntl>;
51
- }
@@ -1,22 +0,0 @@
1
- import { AfterContentInit, ChangeDetectorRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
- import { DateTimeComponent } from './date-time-picker/date-time-picker.component';
3
- import * as i0 from "@angular/core";
4
- export declare class DateTimeTriggerDirective<T> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
5
- protected readonly changeDetector: ChangeDetectorRef;
6
- dtPicker?: DateTimeComponent<T>;
7
- private _disabled?;
8
- get disabled(): boolean;
9
- set disabled(value: boolean);
10
- /** @internal */
11
- get triggerDisabledClass(): boolean;
12
- private stateChanges?;
13
- constructor(changeDetector: ChangeDetectorRef);
14
- ngOnInit(): void;
15
- ngOnChanges(changes: SimpleChanges): void;
16
- ngAfterContentInit(): void;
17
- ngOnDestroy(): void;
18
- handleClickOnHost(event: Event): void;
19
- private watchStateChanges;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeTriggerDirective<any>, never>;
21
- static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeTriggerDirective<any>, "[nxtDateTimeTrigger]", never, { "dtPicker": { "alias": "nxtDateTimeTrigger"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
22
- }
@@ -1,23 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./date-time-picker-trigger.directive";
3
- import * as i2 from "./date-time-picker-input.directive";
4
- import * as i3 from "./date-time-picker/date-time-picker.component";
5
- import * as i4 from "./date-time-picker-container/date-time-picker-container.component";
6
- import * as i5 from "./calendar-multi-year-view/calendar-multi-year-view.component";
7
- import * as i6 from "./calendar-year-view/calendar-year-view.component";
8
- import * as i7 from "./calendar-month-view/calendar-month-view.component";
9
- import * as i8 from "./timer/timer.component";
10
- import * as i9 from "./timer-box/timer-box.component";
11
- import * as i10 from "./calendar/calendar.component";
12
- import * as i11 from "./calendar-body/calendar-body.component";
13
- import * as i12 from "./number-fixed-len.pipe";
14
- import * as i13 from "./date-time-inline/date-time-inline.component";
15
- import * as i14 from "@angular/common";
16
- import * as i15 from "@angular/cdk/overlay";
17
- import * as i16 from "../dialog/dialog.module";
18
- import * as i17 from "@angular/cdk/a11y";
19
- export declare class DateTimeModule {
20
- static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeModule, never>;
21
- static ɵmod: i0.ɵɵNgModuleDeclaration<DateTimeModule, [typeof i1.DateTimeTriggerDirective, typeof i2.DateTimeInputDirective, typeof i3.DateTimeComponent, typeof i4.DateTimeContainerComponent, typeof i5.MultiYearViewComponent, typeof i6.YearViewComponent, typeof i7.MonthViewComponent, typeof i8.TimerComponent, typeof i9.TimerBoxComponent, typeof i10.CalendarComponent, typeof i11.CalendarBodyComponent, typeof i12.NumberFixedLenPipe, typeof i13.DateTimeInlineComponent], [typeof i14.CommonModule, typeof i15.OverlayModule, typeof i16.DialogModule, typeof i17.A11yModule], [typeof i10.CalendarComponent, typeof i8.TimerComponent, typeof i1.DateTimeTriggerDirective, typeof i2.DateTimeInputDirective, typeof i3.DateTimeComponent, typeof i13.DateTimeInlineComponent, typeof i5.MultiYearViewComponent, typeof i6.YearViewComponent, typeof i7.MonthViewComponent]>;
22
- static ɵinj: i0.ɵɵInjectorDeclaration<DateTimeModule>;
23
- }
@@ -1,8 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /** @internal */
4
- export declare class NumberFixedLenPipe implements PipeTransform {
5
- transform(num: number | undefined, len: number | undefined): string | number | undefined;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<NumberFixedLenPipe, never>;
7
- static ɵpipe: i0.ɵɵPipeDeclaration<NumberFixedLenPipe, "numberFixedLen", false>;
8
- }
@@ -1,131 +0,0 @@
1
- import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnInit } from '@angular/core';
2
- import { DateTimeAdapter } from '../../class/date-time-adapter.class';
3
- import { DateTimeIntl } from '../date-time-picker-intl.service';
4
- import * as i0 from "@angular/core";
5
- export declare class TimerComponent<T> implements OnInit {
6
- private readonly ngZone;
7
- private readonly elmRef;
8
- private readonly pickerIntl;
9
- private readonly cdRef;
10
- private readonly dateTimeAdapter;
11
- /** The current picker moment */
12
- private _pickerMoment?;
13
- get pickerMoment(): T | undefined;
14
- set pickerMoment(value: T | undefined);
15
- /** The minimum selectable date time */
16
- private _minDateTime?;
17
- get min(): T | undefined;
18
- set min(value: T | undefined);
19
- /** The maximum selectable date time */
20
- private _maxDateTime?;
21
- get max(): T | undefined;
22
- set max(value: T | undefined);
23
- private isPM;
24
- /**
25
- * Whether to show the second's timer
26
- */
27
- showSecondsTimer: boolean;
28
- /**
29
- * Whether the timer is in hour12 format
30
- */
31
- hour12Timer: boolean;
32
- /**
33
- * Hours to change per step
34
- */
35
- stepHour: number;
36
- /**
37
- * Minutes to change per step
38
- */
39
- stepMinute: number;
40
- /**
41
- * Seconds to change per step
42
- */
43
- stepSecond: number;
44
- get hourValue(): number;
45
- /**
46
- * The value would be displayed in hourBox.
47
- * We need this because the value displayed in hourBox it not
48
- * the same as the hourValue when the timer is in hour12Timer mode.
49
- */
50
- get hourBoxValue(): number;
51
- get minuteValue(): number;
52
- get secondValue(): number;
53
- get upHourButtonLabel(): string;
54
- get downHourButtonLabel(): string;
55
- get upMinuteButtonLabel(): string;
56
- get downMinuteButtonLabel(): string;
57
- get upSecondButtonLabel(): string;
58
- get downSecondButtonLabel(): string;
59
- get hour12ButtonLabel(): string;
60
- readonly selectedChange: EventEmitter<T>;
61
- /** @internal */
62
- get timerClass(): boolean;
63
- /** @internal */
64
- get timeTabIndex(): number;
65
- constructor(ngZone: NgZone, elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>);
66
- ngOnInit(): void;
67
- /**
68
- * Focus to the host element
69
- */
70
- focus(): void;
71
- /**
72
- * Set the hour value via typing into timer box input
73
- * We need this to handle the hour value when the timer is in hour12 mode
74
- */
75
- setHourValueViaInput(hours: number): void;
76
- setHourValue(hours: number): void;
77
- setMinuteValue(minutes: number): void;
78
- setSecondValue(seconds: number): void;
79
- setMeridiem(event: any): void;
80
- /**
81
- * Check if the up hour button is enabled
82
- */
83
- upHourEnabled(): boolean;
84
- /**
85
- * Check if the down hour button is enabled
86
- */
87
- downHourEnabled(): boolean;
88
- /**
89
- * Check if the up minute button is enabled
90
- */
91
- upMinuteEnabled(): boolean;
92
- /**
93
- * Check if the down minute button is enabled
94
- */
95
- downMinuteEnabled(): boolean;
96
- /**
97
- * Check if the up second button is enabled
98
- */
99
- upSecondEnabled(): boolean;
100
- /**
101
- * Check if the down second button is enabled
102
- */
103
- downSecondEnabled(): boolean;
104
- /**
105
- * PickerMoment's hour value +/- certain amount and compare it to the give date
106
- * 1 is after the comparedDate
107
- * -1 is before the comparedDate
108
- * 0 is equal the comparedDate
109
- */
110
- private compareHours;
111
- /**
112
- * PickerMoment's minute value +/- certain amount and compare it to the give date
113
- * 1 is after the comparedDate
114
- * -1 is before the comparedDate
115
- * 0 is equal the comparedDate
116
- */
117
- private compareMinutes;
118
- /**
119
- * PickerMoment's second value +/- certain amount and compare it to the give date
120
- * 1 is after the comparedDate
121
- * -1 is before the comparedDate
122
- * 0 is equal the comparedDate
123
- */
124
- private compareSeconds;
125
- /**
126
- * Get a valid date object
127
- */
128
- private getValidDate;
129
- static ɵfac: i0.ɵɵFactoryDeclaration<TimerComponent<any>, never>;
130
- static ɵcmp: i0.ɵɵComponentDeclaration<TimerComponent<any>, "nxt-date-time-timer", never, { "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; }; "stepHour": { "alias": "stepHour"; "required": false; }; "stepMinute": { "alias": "stepMinute"; "required": false; }; "stepSecond": { "alias": "stepSecond"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, false, never>;
131
- }
@@ -1,37 +0,0 @@
1
- import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /** @internal */
4
- export declare class TimerBoxComponent implements OnInit, OnDestroy {
5
- showDivider: boolean;
6
- upBtnAriaLabel?: string;
7
- upBtnDisabled: boolean;
8
- downBtnAriaLabel?: string;
9
- downBtnDisabled: boolean;
10
- /**
11
- * Value would be displayed in the box
12
- * If it is undefiend, the box would display [value]
13
- */
14
- boxValue?: number;
15
- value: number;
16
- min: number;
17
- max: number;
18
- step: number;
19
- inputLabel?: string;
20
- valueChange: EventEmitter<number>;
21
- inputChange: EventEmitter<number>;
22
- private inputStream;
23
- private inputStreamSub?;
24
- get displayValue(): number;
25
- /** @internal */
26
- get timerBoxClass(): boolean;
27
- constructor();
28
- ngOnInit(): void;
29
- ngOnDestroy(): void;
30
- upBtnClicked(): void;
31
- downBtnClicked(): void;
32
- handleInputChange(val: string): void;
33
- private updateValue;
34
- private updateValueViaInput;
35
- static ɵfac: i0.ɵɵFactoryDeclaration<TimerBoxComponent, never>;
36
- static ɵcmp: i0.ɵɵComponentDeclaration<TimerBoxComponent, "nxt-date-time-timer-box", never, { "showDivider": { "alias": "showDivider"; "required": false; }; "upBtnAriaLabel": { "alias": "upBtnAriaLabel"; "required": false; }; "upBtnDisabled": { "alias": "upBtnDisabled"; "required": false; }; "downBtnAriaLabel": { "alias": "downBtnAriaLabel"; "required": false; }; "downBtnDisabled": { "alias": "downBtnDisabled"; "required": false; }; "boxValue": { "alias": "boxValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "inputLabel": { "alias": "inputLabel"; "required": false; }; }, { "valueChange": "valueChange"; "inputChange": "inputChange"; }, never, never, false, never>;
37
- }
@@ -1,69 +0,0 @@
1
- import { AnimationEvent } from '@angular/animations';
2
- import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
3
- import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
4
- import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, EventEmitter, OnInit } from '@angular/core';
5
- import { DialogConfig } from '../../class/dialog-config.class';
6
- import * as i0 from "@angular/core";
7
- /** @internal */
8
- export type DialogContainerState = 'void' | 'enter' | 'exit';
9
- /** @internal */
10
- export declare class DialogContainerComponent extends BasePortalOutlet implements OnInit {
11
- private readonly changeDetector;
12
- private readonly elementRef;
13
- private readonly focusTrapFactory;
14
- private readonly document?;
15
- portalOutlet?: CdkPortalOutlet;
16
- /** The class that traps and manages focus within the dialog */
17
- private focusTrap?;
18
- /** ID of the element that should be considered as the dialog's label */
19
- ariaLabelledBy?: string;
20
- /** Emits when an animation state changes */
21
- readonly animationStateChanged: EventEmitter<AnimationEvent>;
22
- isAnimating: boolean;
23
- private _config?;
24
- get config(): DialogConfig | undefined;
25
- private state;
26
- private params;
27
- private elementFocusedBeforeDialogWasOpened?;
28
- /** @internal */
29
- get dialogContainerClass(): boolean;
30
- /** @internal */
31
- get dialogContainerTabIndex(): number;
32
- /** @internal */
33
- get dialogContainerId(): string | undefined;
34
- /** @internal */
35
- get dialogContainerRole(): "dialog" | "alertdialog" | undefined;
36
- /** @internal */
37
- get dialogContainerAriaLabelledby(): string | undefined;
38
- /** @internal */
39
- get dialogContainerAriaDescribedby(): string | undefined;
40
- /** @internal */
41
- get dialogContainerAnimation(): {
42
- value: DialogContainerState;
43
- params: any;
44
- };
45
- constructor(changeDetector: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>, focusTrapFactory: ConfigurableFocusTrapFactory, document?: Document | undefined);
46
- ngOnInit(): void;
47
- /**
48
- * Attach a ComponentPortal as content to this dialog container.
49
- */
50
- attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
51
- attachTemplatePortal<C>(_portal: TemplatePortal<C>): EmbeddedViewRef<C>;
52
- setConfig(config: DialogConfig): void;
53
- onAnimationStart(event: AnimationEvent): void;
54
- onAnimationDone(event: AnimationEvent): void;
55
- startExitAnimation(): void;
56
- /**
57
- * Calculate origin used in the `zoomFadeInFrom()`
58
- * for animation purpose
59
- */
60
- private calculateZoomOrigin;
61
- /**
62
- * Save the focused element before dialog was open
63
- */
64
- private savePreviouslyFocusedElement;
65
- private trapFocus;
66
- private restoreFocus;
67
- static ɵfac: i0.ɵɵFactoryDeclaration<DialogContainerComponent, [null, null, null, { optional: true; }]>;
68
- static ɵcmp: i0.ɵɵComponentDeclaration<DialogContainerComponent, "nxt-dialog-container", never, {}, {}, never, never, false, never>;
69
- }
@@ -1,12 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./dialog-container/dialog-container.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "@angular/cdk/a11y";
5
- import * as i4 from "@angular/cdk/overlay";
6
- import * as i5 from "@angular/cdk/portal";
7
- /** @internal */
8
- export declare class DialogModule {
9
- static ɵfac: i0.ɵɵFactoryDeclaration<DialogModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<DialogModule, [typeof i1.DialogContainerComponent], [typeof i2.CommonModule, typeof i3.A11yModule, typeof i4.OverlayModule, typeof i5.PortalModule], never>;
11
- static ɵinj: i0.ɵɵInjectorDeclaration<DialogModule>;
12
- }