@netwin/angular-datetime-picker 19.0.0-rc.3 → 19.0.0-rc.5
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
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { BlockScrollStrategy, Overlay, ScrollStrategy } from '@angular/cdk/overlay';
|
|
2
|
+
import { ChangeDetectorRef, EventEmitter, InjectionToken, NgZone, OnDestroy, ViewContainerRef } from '@angular/core';
|
|
3
|
+
import { OwlDialogService } from '../dialog/dialog.service';
|
|
4
|
+
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
5
|
+
import { OwlDateTimeFormats } from './adapter/date-time-format.class';
|
|
6
|
+
import { OwlDateTimeInputDirective } from './date-time-picker-input.directive';
|
|
7
|
+
import { OwlDateTime, PickerMode, PickerType, SelectMode } from './date-time.class';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/** Injection token that determines the scroll handling while the dtPicker is open. */
|
|
10
|
+
export declare const OWL_DTPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
|
|
11
|
+
/** @docs-private */
|
|
12
|
+
export declare function OWL_DTPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => BlockScrollStrategy;
|
|
13
|
+
/** @docs-private */
|
|
14
|
+
export declare const OWL_DTPICKER_SCROLL_STRATEGY_PROVIDER: {
|
|
15
|
+
provide: InjectionToken<() => ScrollStrategy>;
|
|
16
|
+
deps: (typeof Overlay)[];
|
|
17
|
+
useFactory: typeof OWL_DTPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY;
|
|
18
|
+
};
|
|
19
|
+
export declare class OwlDateTimeComponent<T> extends OwlDateTime<T> implements OnDestroy {
|
|
20
|
+
overlay: Overlay;
|
|
21
|
+
private viewContainerRef;
|
|
22
|
+
private dialogService;
|
|
23
|
+
private ngZone;
|
|
24
|
+
protected changeDetector: ChangeDetectorRef;
|
|
25
|
+
protected dateTimeAdapter: DateTimeAdapter<T>;
|
|
26
|
+
protected dateTimeFormats: OwlDateTimeFormats;
|
|
27
|
+
private document;
|
|
28
|
+
/** Custom class for the picker backdrop. */
|
|
29
|
+
backdropClass: string | Array<string>;
|
|
30
|
+
/** Custom class for the picker overlay pane. */
|
|
31
|
+
panelClass: string | Array<string>;
|
|
32
|
+
/** The date to open the calendar to initially. */
|
|
33
|
+
private _startAt;
|
|
34
|
+
get startAt(): T | null;
|
|
35
|
+
set startAt(date: T | null);
|
|
36
|
+
/** The end date to set for range calendar. */
|
|
37
|
+
private _endAt;
|
|
38
|
+
get endAt(): T | null;
|
|
39
|
+
set endAt(date: T | null);
|
|
40
|
+
/**
|
|
41
|
+
* Set the type of the dateTime picker
|
|
42
|
+
* 'both' -- show both calendar and timer
|
|
43
|
+
* 'calendar' -- show only calendar
|
|
44
|
+
* 'timer' -- show only timer
|
|
45
|
+
*/
|
|
46
|
+
private _pickerType;
|
|
47
|
+
get pickerType(): PickerType;
|
|
48
|
+
set pickerType(val: PickerType);
|
|
49
|
+
/**
|
|
50
|
+
* Whether the picker open as a dialog
|
|
51
|
+
*/
|
|
52
|
+
private _pickerMode;
|
|
53
|
+
get pickerMode(): PickerMode;
|
|
54
|
+
set pickerMode(mode: PickerMode);
|
|
55
|
+
/** Whether the date time picker should be disabled. */
|
|
56
|
+
private _disabled;
|
|
57
|
+
get disabled(): boolean;
|
|
58
|
+
set disabled(value: boolean);
|
|
59
|
+
/** Whether the calendar is open. */
|
|
60
|
+
private _opened;
|
|
61
|
+
get opened(): boolean;
|
|
62
|
+
set opened(val: boolean);
|
|
63
|
+
/**
|
|
64
|
+
* The scroll strategy when the picker is open
|
|
65
|
+
* Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies
|
|
66
|
+
*/
|
|
67
|
+
scrollStrategy: ScrollStrategy;
|
|
68
|
+
/**
|
|
69
|
+
* Callback when the picker is closed
|
|
70
|
+
*/
|
|
71
|
+
readonly afterPickerClosed: import("@angular/core").OutputEmitterRef<T | T[]>;
|
|
72
|
+
/**
|
|
73
|
+
* Callback before the picker is open
|
|
74
|
+
*/
|
|
75
|
+
readonly beforePickerOpen: import("@angular/core").OutputEmitterRef<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Callback when the picker is open
|
|
78
|
+
*/
|
|
79
|
+
readonly afterPickerOpen: import("@angular/core").OutputEmitterRef<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Emits selected year in multi-year view
|
|
82
|
+
* This doesn't imply a change on the selected date.
|
|
83
|
+
*/
|
|
84
|
+
readonly yearSelected: import("@angular/core").OutputEmitterRef<T>;
|
|
85
|
+
/**
|
|
86
|
+
* Emits selected month in year view
|
|
87
|
+
* This doesn't imply a change on the selected date.
|
|
88
|
+
*/
|
|
89
|
+
readonly monthSelected: import("@angular/core").OutputEmitterRef<T>;
|
|
90
|
+
/**
|
|
91
|
+
* Emits selected date
|
|
92
|
+
*/
|
|
93
|
+
readonly dateSelected: import("@angular/core").OutputEmitterRef<T>;
|
|
94
|
+
/**
|
|
95
|
+
* Emit when the selected value has been confirmed
|
|
96
|
+
*/
|
|
97
|
+
confirmSelectedChange: EventEmitter<T | T[]>;
|
|
98
|
+
/**
|
|
99
|
+
* Emits when the date time picker is disabled.
|
|
100
|
+
*/
|
|
101
|
+
disabledChange: EventEmitter<boolean>;
|
|
102
|
+
private pickerContainerPortal;
|
|
103
|
+
private pickerContainer;
|
|
104
|
+
private popupRef;
|
|
105
|
+
private dialogRef;
|
|
106
|
+
private dtInputSub;
|
|
107
|
+
private hidePickerStreamSub;
|
|
108
|
+
private confirmSelectedStreamSub;
|
|
109
|
+
private pickerOpenedStreamSub;
|
|
110
|
+
private pickerBeforeOpenedStreamSub;
|
|
111
|
+
private _dtInput;
|
|
112
|
+
get dtInput(): OwlDateTimeInputDirective<T>;
|
|
113
|
+
private _selected;
|
|
114
|
+
get selected(): T | null;
|
|
115
|
+
set selected(value: T | null);
|
|
116
|
+
private _selecteds;
|
|
117
|
+
get selecteds(): Array<T>;
|
|
118
|
+
set selecteds(values: Array<T>);
|
|
119
|
+
/** The minimum selectable date. */
|
|
120
|
+
get minDateTime(): T | null;
|
|
121
|
+
/** The maximum selectable date. */
|
|
122
|
+
get maxDateTime(): T | null;
|
|
123
|
+
get dateTimeFilter(): (date: T | null) => boolean;
|
|
124
|
+
get selectMode(): SelectMode;
|
|
125
|
+
get isInSingleMode(): boolean;
|
|
126
|
+
get isInRangeMode(): boolean;
|
|
127
|
+
private readonly defaultScrollStrategy;
|
|
128
|
+
constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, dialogService: OwlDialogService, ngZone: NgZone, changeDetector: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, defaultScrollStrategy: any, dateTimeFormats: OwlDateTimeFormats, document: any);
|
|
129
|
+
ngOnDestroy(): void;
|
|
130
|
+
registerInput(input: OwlDateTimeInputDirective<T>): void;
|
|
131
|
+
open(): void;
|
|
132
|
+
/**
|
|
133
|
+
* Selects the given date
|
|
134
|
+
*/
|
|
135
|
+
select(date: Array<T> | T): void;
|
|
136
|
+
/**
|
|
137
|
+
* Emits the selected year in multi-year view
|
|
138
|
+
*/
|
|
139
|
+
selectYear(normalizedYear: T): void;
|
|
140
|
+
/**
|
|
141
|
+
* Emits selected month in year view
|
|
142
|
+
*/
|
|
143
|
+
selectMonth(normalizedMonth: T): void;
|
|
144
|
+
/**
|
|
145
|
+
* Emits the selected date
|
|
146
|
+
*/
|
|
147
|
+
selectDate(normalizedDate: T): void;
|
|
148
|
+
/**
|
|
149
|
+
* Hide the picker
|
|
150
|
+
*/
|
|
151
|
+
close(): void;
|
|
152
|
+
/**
|
|
153
|
+
* Confirm the selected value
|
|
154
|
+
*/
|
|
155
|
+
confirmSelect(): void;
|
|
156
|
+
/**
|
|
157
|
+
* Open the picker as a dialog
|
|
158
|
+
*/
|
|
159
|
+
private openAsDialog;
|
|
160
|
+
/**
|
|
161
|
+
* Open the picker as popup
|
|
162
|
+
*/
|
|
163
|
+
private openAsPopup;
|
|
164
|
+
private createPopup;
|
|
165
|
+
/**
|
|
166
|
+
* Create the popup PositionStrategy.
|
|
167
|
+
*/
|
|
168
|
+
private createPopupPositionStrategy;
|
|
169
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeComponent<any>, [null, null, null, null, null, { optional: true; }, null, { optional: true; }, { optional: true; }]>;
|
|
170
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlDateTimeComponent<any>, "owl-date-time", ["owlDateTime"], { "backdropClass": { "alias": "backdropClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "endAt": { "alias": "endAt"; "required": false; }; "pickerType": { "alias": "pickerType"; "required": false; }; "pickerMode": { "alias": "pickerMode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "scrollStrategy": { "alias": "scrollStrategy"; "required": false; }; }, { "afterPickerClosed": "afterPickerClosed"; "beforePickerOpen": "beforePickerOpen"; "afterPickerOpen": "afterPickerOpen"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "dateSelected": "dateSelected"; }, never, never, false, never>;
|
|
171
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type OutputRef } from '@angular/core';
|
|
2
|
+
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
3
|
+
import { OwlDateTimeFormats } from './adapter/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 declare enum DateView {
|
|
9
|
+
MONTH = "month",
|
|
10
|
+
YEAR = "year",
|
|
11
|
+
MULTI_YEARS = "multi-years"
|
|
12
|
+
}
|
|
13
|
+
export type DateViewType = DateView.MONTH | DateView.YEAR | DateView.MULTI_YEARS;
|
|
14
|
+
export declare abstract class OwlDateTime<T> {
|
|
15
|
+
protected dateTimeAdapter: DateTimeAdapter<T>;
|
|
16
|
+
protected dateTimeFormats: OwlDateTimeFormats;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to show the second's timer
|
|
19
|
+
*/
|
|
20
|
+
private _showSecondsTimer;
|
|
21
|
+
get showSecondsTimer(): boolean;
|
|
22
|
+
set showSecondsTimer(val: boolean);
|
|
23
|
+
/**
|
|
24
|
+
* Whether the timer is in hour12 format
|
|
25
|
+
*/
|
|
26
|
+
private _hour12Timer;
|
|
27
|
+
get hour12Timer(): boolean;
|
|
28
|
+
set hour12Timer(val: boolean);
|
|
29
|
+
/**
|
|
30
|
+
* The view that the calendar should start in.
|
|
31
|
+
*/
|
|
32
|
+
startView: DateViewType;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to should only the year and multi-year views.
|
|
35
|
+
*/
|
|
36
|
+
yearOnly: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether to should only the multi-year view.
|
|
39
|
+
*/
|
|
40
|
+
multiyearOnly: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Hours to change per step
|
|
43
|
+
*/
|
|
44
|
+
private _stepHour;
|
|
45
|
+
get stepHour(): number;
|
|
46
|
+
set stepHour(val: number);
|
|
47
|
+
/**
|
|
48
|
+
* Minutes to change per step
|
|
49
|
+
*/
|
|
50
|
+
private _stepMinute;
|
|
51
|
+
get stepMinute(): number;
|
|
52
|
+
set stepMinute(val: number);
|
|
53
|
+
/**
|
|
54
|
+
* Seconds to change per step
|
|
55
|
+
*/
|
|
56
|
+
private _stepSecond;
|
|
57
|
+
get stepSecond(): number;
|
|
58
|
+
set stepSecond(val: number);
|
|
59
|
+
/**
|
|
60
|
+
* Set the first day of week
|
|
61
|
+
*/
|
|
62
|
+
private _firstDayOfWeek;
|
|
63
|
+
get firstDayOfWeek(): number;
|
|
64
|
+
set firstDayOfWeek(value: number);
|
|
65
|
+
/**
|
|
66
|
+
* Whether to hide dates in other months at the start or end of the current month.
|
|
67
|
+
*/
|
|
68
|
+
private _hideOtherMonths;
|
|
69
|
+
get hideOtherMonths(): boolean;
|
|
70
|
+
set hideOtherMonths(val: boolean);
|
|
71
|
+
private readonly _id;
|
|
72
|
+
get id(): string;
|
|
73
|
+
abstract get selected(): T | null;
|
|
74
|
+
abstract get selecteds(): Array<T> | null;
|
|
75
|
+
abstract get dateTimeFilter(): (date: T | null) => boolean;
|
|
76
|
+
abstract get maxDateTime(): T | null;
|
|
77
|
+
abstract get minDateTime(): T | null;
|
|
78
|
+
abstract get selectMode(): SelectMode;
|
|
79
|
+
abstract get startAt(): T | null;
|
|
80
|
+
abstract get endAt(): T | null;
|
|
81
|
+
abstract get opened(): boolean;
|
|
82
|
+
abstract get pickerMode(): PickerMode;
|
|
83
|
+
abstract get pickerType(): PickerType;
|
|
84
|
+
abstract get isInSingleMode(): boolean;
|
|
85
|
+
abstract get isInRangeMode(): boolean;
|
|
86
|
+
abstract select(date: T | Array<T>): void;
|
|
87
|
+
abstract yearSelected: OutputRef<T>;
|
|
88
|
+
abstract monthSelected: OutputRef<T>;
|
|
89
|
+
abstract dateSelected: OutputRef<T>;
|
|
90
|
+
abstract selectYear(normalizedYear: T): void;
|
|
91
|
+
abstract selectMonth(normalizedMonth: T): void;
|
|
92
|
+
abstract selectDate(normalizedDate: T): void;
|
|
93
|
+
get formatString(): string;
|
|
94
|
+
/**
|
|
95
|
+
* Date Time Checker to check if the give dateTime is selectable
|
|
96
|
+
*/
|
|
97
|
+
dateTimeChecker: (dateTime: T) => boolean;
|
|
98
|
+
get disabled(): boolean;
|
|
99
|
+
protected constructor(dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: OwlDateTimeFormats);
|
|
100
|
+
protected getValidDate(obj: any): T | null;
|
|
101
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTime<any>, [{ optional: true; }, { optional: true; }]>;
|
|
102
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<OwlDateTime<any>, never, never, { "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "yearOnly": { "alias": "yearOnly"; "required": false; }; "multiyearOnly": { "alias": "multiyearOnly"; "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>;
|
|
103
|
+
}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./
|
|
3
|
-
import * as i2 from "./
|
|
4
|
-
import * as i3 from "./
|
|
5
|
-
import * as i4 from "./
|
|
6
|
-
import * as i5 from "./
|
|
7
|
-
import * as i6 from "./calendar.component";
|
|
8
|
-
import * as i7 from "./calendar-
|
|
9
|
-
import * as i8 from "./
|
|
10
|
-
import * as i9 from "
|
|
11
|
-
import * as i10 from "
|
|
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.component";
|
|
5
|
+
import * as i4 from "./date-time-picker-container.component";
|
|
6
|
+
import * as i5 from "./calendar-multi-year-view.component";
|
|
7
|
+
import * as i6 from "./calendar-year-view.component";
|
|
8
|
+
import * as i7 from "./calendar-month-view.component";
|
|
9
|
+
import * as i8 from "./timer.component";
|
|
10
|
+
import * as i9 from "./timer-box.component";
|
|
11
|
+
import * as i10 from "./calendar.component";
|
|
12
|
+
import * as i11 from "./calendar-body.component";
|
|
13
|
+
import * as i12 from "./numberedFixLen.pipe";
|
|
14
|
+
import * as i13 from "./date-time-inline.component";
|
|
15
|
+
import * as i14 from "@angular/cdk/overlay";
|
|
16
|
+
import * as i15 from "../dialog/dialog.module";
|
|
17
|
+
import * as i16 from "@angular/cdk/a11y";
|
|
12
18
|
export declare class OwlDateTimeModule {
|
|
13
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<OwlDateTimeModule, [typeof i1.
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<OwlDateTimeModule, [typeof i1.OwlDateTimeTriggerDirective, typeof i2.OwlDateTimeInputDirective, typeof i3.OwlDateTimeComponent, typeof i4.OwlDateTimeContainerComponent, typeof i5.OwlMultiYearViewComponent, typeof i6.OwlYearViewComponent, typeof i7.OwlMonthViewComponent, typeof i8.OwlTimerComponent, typeof i9.OwlTimerBoxComponent, typeof i10.OwlCalendarComponent, typeof i11.OwlCalendarBodyComponent, typeof i12.NumberFixedLenPipe, typeof i13.OwlDateTimeInlineComponent], [typeof i14.OverlayModule, typeof i15.OwlDialogModule, typeof i16.A11yModule], [typeof i10.OwlCalendarComponent, typeof i8.OwlTimerComponent, typeof i1.OwlDateTimeTriggerDirective, typeof i2.OwlDateTimeInputDirective, typeof i3.OwlDateTimeComponent, typeof i13.OwlDateTimeInlineComponent, typeof i5.OwlMultiYearViewComponent, typeof i6.OwlYearViewComponent, typeof i7.OwlMonthViewComponent]>;
|
|
15
21
|
static ɵinj: i0.ɵɵInjectorDeclaration<OwlDateTimeModule>;
|
|
16
22
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* numberFixedLen.pipe
|
|
3
|
+
*/
|
|
4
|
+
import { PipeTransform } from '@angular/core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NumberFixedLenPipe implements PipeTransform {
|
|
7
|
+
transform(num: number, len: number): string | number;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NumberFixedLenPipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<NumberFixedLenPipe, "numberFixedLen", false>;
|
|
10
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class OwlTimerBoxComponent implements OnInit, OnDestroy {
|
|
4
4
|
showDivider: boolean;
|
|
@@ -16,12 +16,13 @@ export declare class OwlTimerBoxComponent implements OnInit, OnDestroy {
|
|
|
16
16
|
max: number;
|
|
17
17
|
step: number;
|
|
18
18
|
inputLabel: string;
|
|
19
|
-
readonly valueChange:
|
|
20
|
-
readonly inputChange:
|
|
19
|
+
readonly valueChange: import("@angular/core").OutputEmitterRef<number>;
|
|
20
|
+
readonly inputChange: import("@angular/core").OutputEmitterRef<number>;
|
|
21
21
|
private inputStream;
|
|
22
22
|
private inputStreamSub;
|
|
23
23
|
private hasFocus;
|
|
24
24
|
protected get displayValue(): string;
|
|
25
|
+
protected readonly owlDTTimerBoxClass = true;
|
|
25
26
|
private valueInput;
|
|
26
27
|
private onValueInputMouseWheelBind;
|
|
27
28
|
ngOnInit(): void;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* timer.component
|
|
3
|
+
*/
|
|
4
|
+
import { ChangeDetectorRef, ElementRef, NgZone } from '@angular/core';
|
|
2
5
|
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
3
6
|
import { OwlDateTimeIntl } from './date-time-picker-intl.service';
|
|
4
7
|
import * as i0 from "@angular/core";
|
|
@@ -41,25 +44,25 @@ export declare class OwlTimerComponent<T> {
|
|
|
41
44
|
* Seconds to change per step
|
|
42
45
|
*/
|
|
43
46
|
stepSecond: number;
|
|
44
|
-
|
|
47
|
+
readonly selectedChange: import("@angular/core").OutputEmitterRef<T>;
|
|
48
|
+
protected get hourValue(): number;
|
|
45
49
|
/**
|
|
46
50
|
* The value would be displayed in hourBox.
|
|
47
51
|
* We need this because the value displayed in hourBox it not
|
|
48
52
|
* the same as the hourValue when the timer is in hour12Timer mode.
|
|
49
53
|
*/
|
|
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
|
-
|
|
61
|
-
get
|
|
62
|
-
get owlDTTimeTabIndex(): number;
|
|
54
|
+
protected get hourBoxValue(): number;
|
|
55
|
+
protected get minuteValue(): number;
|
|
56
|
+
protected get secondValue(): number;
|
|
57
|
+
protected get upHourButtonLabel(): string;
|
|
58
|
+
protected get downHourButtonLabel(): string;
|
|
59
|
+
protected get upMinuteButtonLabel(): string;
|
|
60
|
+
protected get downMinuteButtonLabel(): string;
|
|
61
|
+
protected get upSecondButtonLabel(): string;
|
|
62
|
+
protected get downSecondButtonLabel(): string;
|
|
63
|
+
protected get hour12ButtonLabel(): string;
|
|
64
|
+
protected get owlDTTimerClass(): boolean;
|
|
65
|
+
protected get owlDTTimeTabIndex(): number;
|
|
63
66
|
constructor(ngZone: NgZone, elmRef: ElementRef, pickerIntl: OwlDateTimeIntl, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>);
|
|
64
67
|
/**
|
|
65
68
|
* Focus to the host element
|
|
@@ -73,7 +76,7 @@ export declare class OwlTimerComponent<T> {
|
|
|
73
76
|
setHourValue(hours: number): void;
|
|
74
77
|
setMinuteValue(minutes: number): void;
|
|
75
78
|
setSecondValue(seconds: number): void;
|
|
76
|
-
setMeridiem(event:
|
|
79
|
+
setMeridiem(event: Event): void;
|
|
77
80
|
/**
|
|
78
81
|
* Check if the up hour button is enabled
|
|
79
82
|
*/
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dialog-config.class
|
|
3
|
+
*/
|
|
4
|
+
import { ScrollStrategy } from '@angular/cdk/overlay';
|
|
5
|
+
import { ViewContainerRef } from '@angular/core';
|
|
6
|
+
/** Possible overrides for a dialog's position. */
|
|
7
|
+
export interface DialogPosition {
|
|
8
|
+
/** Override for the dialog's top position. */
|
|
9
|
+
top?: string;
|
|
10
|
+
/** Override for the dialog's bottom position. */
|
|
11
|
+
bottom?: string;
|
|
12
|
+
/** Override for the dialog's left position. */
|
|
13
|
+
left?: string;
|
|
14
|
+
/** Override for the dialog's right position. */
|
|
15
|
+
right?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface OwlDialogConfigInterface {
|
|
18
|
+
/**
|
|
19
|
+
* ID of the element that describes the dialog.
|
|
20
|
+
*/
|
|
21
|
+
ariaDescribedBy?: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to focus the dialog when the dialog is opened
|
|
24
|
+
*/
|
|
25
|
+
autoFocus?: boolean;
|
|
26
|
+
/** Whether the dialog has a backdrop. */
|
|
27
|
+
hasBackdrop?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Custom style for the backdrop
|
|
30
|
+
*/
|
|
31
|
+
backdropStyle?: any;
|
|
32
|
+
/** Data being injected into the child component. */
|
|
33
|
+
data?: any;
|
|
34
|
+
/** Whether the user can use escape or clicking outside to close a modal. */
|
|
35
|
+
disableClose?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* ID for the modal. If omitted, a unique one will be generated.
|
|
38
|
+
*/
|
|
39
|
+
id?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The ARIA role of the dialog element.
|
|
42
|
+
*/
|
|
43
|
+
role?: 'dialog' | 'alertdialog';
|
|
44
|
+
/**
|
|
45
|
+
* Custom class for the pane
|
|
46
|
+
*/
|
|
47
|
+
paneClass?: string | Array<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Mouse Event
|
|
50
|
+
*/
|
|
51
|
+
event?: MouseEvent;
|
|
52
|
+
/**
|
|
53
|
+
* Custom class for the backdrop
|
|
54
|
+
*/
|
|
55
|
+
backdropClass?: string | Array<string>;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the dialog should close when the user goes backwards/forwards in history.
|
|
58
|
+
*/
|
|
59
|
+
closeOnNavigation?: boolean;
|
|
60
|
+
/** Width of the dialog. */
|
|
61
|
+
width?: string;
|
|
62
|
+
/** Height of the dialog. */
|
|
63
|
+
height?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The min-width of the overlay panel.
|
|
66
|
+
* If a number is provided, pixel units are assumed.
|
|
67
|
+
*/
|
|
68
|
+
minWidth?: number | string;
|
|
69
|
+
/**
|
|
70
|
+
* The min-height of the overlay panel.
|
|
71
|
+
* If a number is provided, pixel units are assumed.
|
|
72
|
+
*/
|
|
73
|
+
minHeight?: number | string;
|
|
74
|
+
/**
|
|
75
|
+
* The max-width of the overlay panel.
|
|
76
|
+
* If a number is provided, pixel units are assumed.
|
|
77
|
+
*/
|
|
78
|
+
maxWidth?: number | string;
|
|
79
|
+
/**
|
|
80
|
+
* The max-height of the overlay panel.
|
|
81
|
+
* If a number is provided, pixel units are assumed.
|
|
82
|
+
*/
|
|
83
|
+
maxHeight?: number | string;
|
|
84
|
+
/** Position overrides. */
|
|
85
|
+
position?: DialogPosition;
|
|
86
|
+
/**
|
|
87
|
+
* The scroll strategy when the dialog is open
|
|
88
|
+
* Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies
|
|
89
|
+
*/
|
|
90
|
+
scrollStrategy?: ScrollStrategy;
|
|
91
|
+
viewContainerRef?: ViewContainerRef;
|
|
92
|
+
}
|
|
93
|
+
export declare class OwlDialogConfig implements OwlDialogConfigInterface {
|
|
94
|
+
/**
|
|
95
|
+
* ID of the element that describes the dialog.
|
|
96
|
+
*/
|
|
97
|
+
ariaDescribedBy: string | null;
|
|
98
|
+
/**
|
|
99
|
+
* Whether to focus the dialog when the dialog is opened
|
|
100
|
+
*/
|
|
101
|
+
autoFocus: boolean;
|
|
102
|
+
/** Whether the dialog has a backdrop. */
|
|
103
|
+
hasBackdrop: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Custom style for the backdrop
|
|
106
|
+
*/
|
|
107
|
+
backdropStyle: any;
|
|
108
|
+
/** Data being injected into the child component. */
|
|
109
|
+
data: any;
|
|
110
|
+
/** Whether the user can use escape or clicking outside to close a modal. */
|
|
111
|
+
disableClose: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* ID for the modal. If omitted, a unique one will be generated.
|
|
114
|
+
*/
|
|
115
|
+
id: string;
|
|
116
|
+
/**
|
|
117
|
+
* The ARIA role of the dialog element.
|
|
118
|
+
*/
|
|
119
|
+
role: 'dialog' | 'alertdialog';
|
|
120
|
+
/**
|
|
121
|
+
* Custom class for the pane
|
|
122
|
+
*/
|
|
123
|
+
paneClass: string | Array<string>;
|
|
124
|
+
/**
|
|
125
|
+
* Mouse Event
|
|
126
|
+
*/
|
|
127
|
+
event: MouseEvent;
|
|
128
|
+
/**
|
|
129
|
+
* Custom class for the backdrop
|
|
130
|
+
*/
|
|
131
|
+
backdropClass: string | Array<string>;
|
|
132
|
+
/**
|
|
133
|
+
* Whether the dialog should close when the user goes backwards/forwards in history.
|
|
134
|
+
*/
|
|
135
|
+
closeOnNavigation: boolean;
|
|
136
|
+
/** Width of the dialog. */
|
|
137
|
+
width: string;
|
|
138
|
+
/** Height of the dialog. */
|
|
139
|
+
height: string;
|
|
140
|
+
/**
|
|
141
|
+
* The min-width of the overlay panel.
|
|
142
|
+
* If a number is provided, pixel units are assumed.
|
|
143
|
+
*/
|
|
144
|
+
minWidth: number | string;
|
|
145
|
+
/**
|
|
146
|
+
* The min-height of the overlay panel.
|
|
147
|
+
* If a number is provided, pixel units are assumed.
|
|
148
|
+
*/
|
|
149
|
+
minHeight: number | string;
|
|
150
|
+
/**
|
|
151
|
+
* The max-width of the overlay panel.
|
|
152
|
+
* If a number is provided, pixel units are assumed.
|
|
153
|
+
*/
|
|
154
|
+
maxWidth: number | string;
|
|
155
|
+
/**
|
|
156
|
+
* The max-height of the overlay panel.
|
|
157
|
+
* If a number is provided, pixel units are assumed.
|
|
158
|
+
*/
|
|
159
|
+
maxHeight: number | string;
|
|
160
|
+
/** Position overrides. */
|
|
161
|
+
position: DialogPosition;
|
|
162
|
+
/**
|
|
163
|
+
* The scroll strategy when the dialog is open
|
|
164
|
+
* Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies
|
|
165
|
+
*/
|
|
166
|
+
scrollStrategy: ScrollStrategy;
|
|
167
|
+
viewContainerRef: ViewContainerRef;
|
|
168
|
+
constructor();
|
|
169
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dialog-container.component
|
|
3
|
+
*/
|
|
4
|
+
import { AnimationEvent } from '@angular/animations';
|
|
5
|
+
import { FocusTrapFactory } from '@angular/cdk/a11y';
|
|
6
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal } from '@angular/cdk/portal';
|
|
7
|
+
import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, EventEmitter } from '@angular/core';
|
|
8
|
+
import { OwlDialogConfigInterface } from './dialog-config.class';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
type AnimationParams = {
|
|
11
|
+
x: string;
|
|
12
|
+
y: string;
|
|
13
|
+
ox: string;
|
|
14
|
+
oy: string;
|
|
15
|
+
scale: number;
|
|
16
|
+
};
|
|
17
|
+
export declare class OwlDialogContainerComponent extends BasePortalOutlet {
|
|
18
|
+
private changeDetector;
|
|
19
|
+
private elementRef;
|
|
20
|
+
private focusTrapFactory;
|
|
21
|
+
private document;
|
|
22
|
+
portalOutlet: CdkPortalOutlet | null;
|
|
23
|
+
/** The class that traps and manages focus within the dialog. */
|
|
24
|
+
private focusTrap;
|
|
25
|
+
/** ID of the element that should be considered as the dialog's label. */
|
|
26
|
+
ariaLabelledBy: string | null;
|
|
27
|
+
/** Emits when an animation state changes. */
|
|
28
|
+
animationStateChanged: EventEmitter<AnimationEvent>;
|
|
29
|
+
isAnimating: boolean;
|
|
30
|
+
private _config;
|
|
31
|
+
get config(): OwlDialogConfigInterface;
|
|
32
|
+
private state;
|
|
33
|
+
private params;
|
|
34
|
+
private elementFocusedBeforeDialogWasOpened;
|
|
35
|
+
protected readonly owlDialogContainerClass = true;
|
|
36
|
+
protected get owlDialogContainerTabIndex(): number;
|
|
37
|
+
protected get owlDialogContainerId(): string;
|
|
38
|
+
protected get owlDialogContainerRole(): string;
|
|
39
|
+
protected get owlDialogContainerAriaLabelledby(): string;
|
|
40
|
+
protected get owlDialogContainerAriaDescribedby(): string;
|
|
41
|
+
protected get owlDialogContainerAnimation(): {
|
|
42
|
+
value: string;
|
|
43
|
+
params: AnimationParams;
|
|
44
|
+
};
|
|
45
|
+
constructor(changeDetector: ChangeDetectorRef, elementRef: ElementRef, focusTrapFactory: FocusTrapFactory, document: Document);
|
|
46
|
+
/**
|
|
47
|
+
* Attach a ComponentPortal as content to this dialog container.
|
|
48
|
+
*/
|
|
49
|
+
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
|
50
|
+
attachTemplatePortal<C>(): EmbeddedViewRef<C>;
|
|
51
|
+
setConfig(config: OwlDialogConfigInterface): void;
|
|
52
|
+
onAnimationStart(event: AnimationEvent): void;
|
|
53
|
+
onAnimationDone(event: AnimationEvent): void;
|
|
54
|
+
startExitAnimation(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Calculate origin used in the `zoomFadeInFrom()`
|
|
57
|
+
* for animation purpose
|
|
58
|
+
*/
|
|
59
|
+
private calculateZoomOrigin;
|
|
60
|
+
/**
|
|
61
|
+
* Save the focused element before dialog was open
|
|
62
|
+
*/
|
|
63
|
+
private savePreviouslyFocusedElement;
|
|
64
|
+
private trapFocus;
|
|
65
|
+
private restoreFocus;
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDialogContainerComponent, [null, null, null, { optional: true; }]>;
|
|
67
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OwlDialogContainerComponent, "owl-dialog-container", never, {}, {}, never, never, false, never>;
|
|
68
|
+
}
|
|
69
|
+
export {};
|