@netwin/angular-datetime-picker 18.1.0 → 19.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -27
- package/assets/style/picker.min.css +1 -1
- package/esm2022/lib/date-time/adapter/date-time-adapter.class.mjs +7 -13
- package/esm2022/lib/date-time/adapter/date-time-format.class.mjs +1 -4
- package/esm2022/lib/date-time/adapter/native-date-time-adapter.class.mjs +21 -36
- package/esm2022/lib/date-time/adapter/native-date-time-format.class.mjs +1 -2
- package/esm2022/lib/date-time/adapter/native-date-time.module.mjs +9 -12
- package/esm2022/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.mjs +12 -25
- package/esm2022/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.mjs +1 -2
- package/esm2022/lib/date-time/calendar-body.component.mjs +22 -31
- package/esm2022/lib/date-time/calendar-month-view.component.mjs +13 -29
- package/esm2022/lib/date-time/calendar-multi-year-view.component.mjs +11 -17
- package/esm2022/lib/date-time/calendar-year-view.component.mjs +11 -19
- package/esm2022/lib/date-time/calendar.component.mjs +16 -27
- package/esm2022/lib/date-time/date-time-inline.component.mjs +262 -108
- package/esm2022/lib/date-time/date-time-picker-intl.service.mjs +4 -11
- package/esm2022/lib/date-time/date-time.module.mjs +12 -36
- package/esm2022/lib/date-time/options-provider.mjs +1 -1
- package/esm2022/lib/date-time/timer-box.component.mjs +6 -16
- package/esm2022/lib/date-time/timer.component.mjs +18 -17
- package/esm2022/lib/types/date-view.mjs +19 -0
- package/esm2022/lib/types/index.mjs +4 -0
- package/esm2022/lib/types/picker-type.mjs +2 -0
- package/esm2022/lib/types/select-mode.mjs +2 -0
- package/esm2022/lib/utils/array.utils.mjs +2 -9
- package/esm2022/lib/utils/constants.mjs +1 -4
- package/esm2022/lib/utils/date.utils.mjs +1 -4
- package/esm2022/public_api.mjs +13 -20
- package/fesm2022/netwin-angular-datetime-picker.mjs +2653 -5112
- package/fesm2022/netwin-angular-datetime-picker.mjs.map +1 -1
- package/lib/date-time/adapter/date-time-adapter.class.d.ts +16 -26
- package/lib/date-time/adapter/date-time-format.class.d.ts +8 -12
- package/lib/date-time/adapter/native-date-time-adapter.class.d.ts +7 -18
- package/lib/date-time/adapter/native-date-time-format.class.d.ts +0 -3
- package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.d.ts +6 -17
- package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.d.ts +0 -3
- package/lib/date-time/calendar-body.component.d.ts +21 -26
- package/lib/date-time/calendar-month-view.component.d.ts +19 -24
- package/lib/date-time/calendar-multi-year-view.component.d.ts +7 -8
- package/lib/date-time/calendar-year-view.component.d.ts +8 -9
- package/lib/date-time/calendar.component.d.ts +15 -21
- package/lib/date-time/date-time-inline.component.d.ts +164 -74
- package/lib/date-time/date-time-picker-intl.service.d.ts +0 -4
- package/lib/date-time/date-time.module.d.ts +11 -18
- package/lib/date-time/timer-box.component.d.ts +4 -5
- package/lib/date-time/timer.component.d.ts +6 -9
- package/lib/types/date-view.d.ts +17 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/picker-type.d.ts +7 -0
- package/lib/types/select-mode.d.ts +8 -0
- package/lib/utils/array.utils.d.ts +0 -3
- package/lib/utils/constants.d.ts +0 -3
- package/lib/utils/date.utils.d.ts +0 -3
- package/package.json +1 -1
- package/public_api.d.ts +12 -19
- package/esm2022/lib/date-time/date-time-picker-container.component.mjs +0 -405
- package/esm2022/lib/date-time/date-time-picker-input.directive.mjs +0 -598
- package/esm2022/lib/date-time/date-time-picker-trigger.directive.mjs +0 -64
- package/esm2022/lib/date-time/date-time-picker.animations.mjs +0 -21
- package/esm2022/lib/date-time/date-time-picker.component.mjs +0 -564
- package/esm2022/lib/date-time/date-time.class.mjs +0 -176
- package/esm2022/lib/date-time/numberedFixLen.pipe.mjs +0 -28
- package/esm2022/lib/dialog/dialog-config.class.mjs +0 -59
- package/esm2022/lib/dialog/dialog-container.component.mjs +0 -232
- package/esm2022/lib/dialog/dialog-ref.class.mjs +0 -134
- package/esm2022/lib/dialog/dialog.module.mjs +0 -26
- package/esm2022/lib/dialog/dialog.service.mjs +0 -228
- package/esm2022/lib/utils/index.mjs +0 -5
- package/esm2022/lib/utils/object.utils.mjs +0 -26
- package/lib/date-time/date-time-picker-container.component.d.ts +0 -130
- package/lib/date-time/date-time-picker-input.directive.d.ts +0 -164
- package/lib/date-time/date-time-picker-trigger.directive.d.ts +0 -23
- package/lib/date-time/date-time-picker.animations.d.ts +0 -8
- package/lib/date-time/date-time-picker.component.d.ts +0 -173
- package/lib/date-time/date-time.class.d.ts +0 -103
- package/lib/date-time/numberedFixLen.pipe.d.ts +0 -10
- package/lib/dialog/dialog-config.class.d.ts +0 -169
- package/lib/dialog/dialog-container.component.d.ts +0 -58
- package/lib/dialog/dialog-ref.class.d.ts +0 -51
- package/lib/dialog/dialog.module.d.ts +0 -11
- package/lib/dialog/dialog.service.d.ts +0 -76
- package/lib/utils/index.d.ts +0 -4
- package/lib/utils/object.utils.d.ts +0 -11
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
-
import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
|
|
3
|
-
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
4
|
-
import { OwlDateTimeFormats } from './adapter/date-time-format.class';
|
|
5
|
-
import { OwlDateTimeComponent } from './date-time-picker.component';
|
|
6
|
-
import { SelectMode } from './date-time.class';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare const OWL_DATETIME_VALUE_ACCESSOR: any;
|
|
9
|
-
export declare const OWL_DATETIME_VALIDATORS: any;
|
|
10
|
-
export declare class OwlDateTimeInputDirective<T> implements OnInit, AfterContentInit, OnDestroy, ControlValueAccessor, Validator {
|
|
11
|
-
private elmRef;
|
|
12
|
-
private renderer;
|
|
13
|
-
private dateTimeAdapter;
|
|
14
|
-
private dateTimeFormats;
|
|
15
|
-
static ngAcceptInputType_disabled: boolean | '';
|
|
16
|
-
/**
|
|
17
|
-
* Required flag to be used for range of [null, null]
|
|
18
|
-
* */
|
|
19
|
-
private _required;
|
|
20
|
-
get required(): any;
|
|
21
|
-
set required(value: any);
|
|
22
|
-
/**
|
|
23
|
-
* The date time picker that this input is associated with.
|
|
24
|
-
* */
|
|
25
|
-
set owlDateTime(value: OwlDateTimeComponent<T>);
|
|
26
|
-
/**
|
|
27
|
-
* A function to filter date time
|
|
28
|
-
*/
|
|
29
|
-
set owlDateTimeFilter(filter: (date: T | null) => boolean);
|
|
30
|
-
private _dateTimeFilter;
|
|
31
|
-
get dateTimeFilter(): (date: T | null) => boolean;
|
|
32
|
-
/** Whether the date time picker's input is disabled. */
|
|
33
|
-
private _disabled;
|
|
34
|
-
get disabled(): boolean;
|
|
35
|
-
set disabled(value: boolean);
|
|
36
|
-
/** The minimum valid date. */
|
|
37
|
-
private _min;
|
|
38
|
-
get min(): T | null;
|
|
39
|
-
set min(value: T | null);
|
|
40
|
-
/** The maximum valid date. */
|
|
41
|
-
private _max;
|
|
42
|
-
get max(): T | null;
|
|
43
|
-
set max(value: T | null);
|
|
44
|
-
/**
|
|
45
|
-
* The picker's select mode
|
|
46
|
-
*/
|
|
47
|
-
private _selectMode;
|
|
48
|
-
get selectMode(): SelectMode;
|
|
49
|
-
set selectMode(mode: SelectMode);
|
|
50
|
-
/**
|
|
51
|
-
* The character to separate the 'from' and 'to' in input value
|
|
52
|
-
*/
|
|
53
|
-
rangeSeparator: string;
|
|
54
|
-
private _value;
|
|
55
|
-
get value(): T | null;
|
|
56
|
-
set value(value: T | null);
|
|
57
|
-
private _values;
|
|
58
|
-
get values(): Array<T>;
|
|
59
|
-
set values(values: Array<T>);
|
|
60
|
-
/**
|
|
61
|
-
* Callback to invoke when `change` event is fired on this `<input>`
|
|
62
|
-
* */
|
|
63
|
-
dateTimeChange: EventEmitter<any>;
|
|
64
|
-
/**
|
|
65
|
-
* Callback to invoke when an `input` event is fired on this `<input>`.
|
|
66
|
-
* */
|
|
67
|
-
dateTimeInput: EventEmitter<any>;
|
|
68
|
-
get elementRef(): ElementRef;
|
|
69
|
-
get isInSingleMode(): boolean;
|
|
70
|
-
get isInRangeMode(): boolean;
|
|
71
|
-
/** The date-time-picker that this input is associated with. */
|
|
72
|
-
dtPicker: OwlDateTimeComponent<T>;
|
|
73
|
-
private dtPickerSub;
|
|
74
|
-
private localeSub;
|
|
75
|
-
private lastValueValid;
|
|
76
|
-
private onModelChange;
|
|
77
|
-
private onModelTouched;
|
|
78
|
-
private validatorOnChange;
|
|
79
|
-
/** The form control validator for whether the input parses. */
|
|
80
|
-
private parseValidator;
|
|
81
|
-
/** The form control validator for the min date. */
|
|
82
|
-
private minValidator;
|
|
83
|
-
/** The form control validator for the max date. */
|
|
84
|
-
private maxValidator;
|
|
85
|
-
/** The form control validator for the date filter. */
|
|
86
|
-
private filterValidator;
|
|
87
|
-
/**
|
|
88
|
-
* The form control validator for the range.
|
|
89
|
-
* Check whether the 'before' value is before the 'to' value
|
|
90
|
-
* */
|
|
91
|
-
private rangeValidator;
|
|
92
|
-
/**
|
|
93
|
-
* The form control validator for the range when required.
|
|
94
|
-
* Check whether the 'before' and 'to' values are present
|
|
95
|
-
* */
|
|
96
|
-
private requiredRangeValidator;
|
|
97
|
-
/** The combined form control validator for this input. */
|
|
98
|
-
private validator;
|
|
99
|
-
/** Emits when the value changes (either due to user input or programmatic change). */
|
|
100
|
-
valueChange: EventEmitter<T | T[]>;
|
|
101
|
-
/** Emits when the disabled state has changed */
|
|
102
|
-
disabledChange: EventEmitter<boolean>;
|
|
103
|
-
get owlDateTimeInputAriaHaspopup(): boolean;
|
|
104
|
-
get owlDateTimeInputAriaOwns(): string;
|
|
105
|
-
get minIso8601(): string;
|
|
106
|
-
get maxIso8601(): string;
|
|
107
|
-
get owlDateTimeInputDisabled(): boolean;
|
|
108
|
-
constructor(elmRef: ElementRef, renderer: Renderer2, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: OwlDateTimeFormats);
|
|
109
|
-
ngOnInit(): void;
|
|
110
|
-
ngAfterContentInit(): void;
|
|
111
|
-
ngOnDestroy(): void;
|
|
112
|
-
writeValue(value: any): void;
|
|
113
|
-
registerOnChange(fn: any): void;
|
|
114
|
-
registerOnTouched(fn: any): void;
|
|
115
|
-
setDisabledState(isDisabled: boolean): void;
|
|
116
|
-
validate(c: AbstractControl): {
|
|
117
|
-
[key: string]: any;
|
|
118
|
-
};
|
|
119
|
-
registerOnValidatorChange(fn: () => void): void;
|
|
120
|
-
/**
|
|
121
|
-
* Open the picker when user hold alt + DOWN_ARROW
|
|
122
|
-
* */
|
|
123
|
-
handleKeydownOnHost(event: KeyboardEvent): void;
|
|
124
|
-
handleBlurOnHost(event: Event): void;
|
|
125
|
-
handleInputOnHost(event: any): void;
|
|
126
|
-
handleChangeOnHost(event: any): void;
|
|
127
|
-
/**
|
|
128
|
-
* Set the native input property 'value'
|
|
129
|
-
*/
|
|
130
|
-
formatNativeInputValue(): void;
|
|
131
|
-
/**
|
|
132
|
-
* Register the relationship between this input and its picker component
|
|
133
|
-
*/
|
|
134
|
-
private registerDateTimePicker;
|
|
135
|
-
/**
|
|
136
|
-
* Convert a given obj to a valid date object
|
|
137
|
-
*/
|
|
138
|
-
private getValidDate;
|
|
139
|
-
/**
|
|
140
|
-
* Convert a time string to a date-time string
|
|
141
|
-
* When pickerType is 'timer', the value in the picker's input is a time string.
|
|
142
|
-
* The dateTimeAdapter parse fn could not parse a time string to a Date Object.
|
|
143
|
-
* Therefore we need this fn to convert a time string to a date-time string.
|
|
144
|
-
*/
|
|
145
|
-
private convertTimeStringToDateTimeString;
|
|
146
|
-
/**
|
|
147
|
-
* Handle input change in single mode
|
|
148
|
-
*/
|
|
149
|
-
private changeInputInSingleMode;
|
|
150
|
-
/**
|
|
151
|
-
* Handle input change in rangeFrom or rangeTo mode
|
|
152
|
-
*/
|
|
153
|
-
private changeInputInRangeFromToMode;
|
|
154
|
-
/**
|
|
155
|
-
* Handle input change in range mode
|
|
156
|
-
*/
|
|
157
|
-
private changeInputInRangeMode;
|
|
158
|
-
/**
|
|
159
|
-
* Check if the two value is the same
|
|
160
|
-
*/
|
|
161
|
-
private isSameValue;
|
|
162
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeInputDirective<any>, [null, null, { optional: true; }, { optional: true; }]>;
|
|
163
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<OwlDateTimeInputDirective<any>, "input[owlDateTime]", ["owlDateTimeInput"], { "required": { "alias": "required"; "required": false; }; "owlDateTime": { "alias": "owlDateTime"; "required": false; }; "owlDateTimeFilter": { "alias": "owlDateTimeFilter"; "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>;
|
|
164
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* date-time-picker-trigger.directive
|
|
3
|
-
*/
|
|
4
|
-
import { AfterContentInit, ChangeDetectorRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
5
|
-
import { OwlDateTimeComponent } from './date-time-picker.component';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class OwlDateTimeTriggerDirective<T> implements OnChanges, AfterContentInit, OnDestroy {
|
|
8
|
-
protected changeDetector: ChangeDetectorRef;
|
|
9
|
-
dtPicker: OwlDateTimeComponent<T>;
|
|
10
|
-
private _disabled;
|
|
11
|
-
get disabled(): boolean;
|
|
12
|
-
set disabled(value: boolean);
|
|
13
|
-
get owlDTTriggerDisabledClass(): boolean;
|
|
14
|
-
private stateChanges;
|
|
15
|
-
constructor(changeDetector: ChangeDetectorRef);
|
|
16
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
17
|
-
ngAfterContentInit(): void;
|
|
18
|
-
ngOnDestroy(): void;
|
|
19
|
-
handleClickOnHost(event: Event): void;
|
|
20
|
-
private watchStateChanges;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeTriggerDirective<any>, never>;
|
|
22
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<OwlDateTimeTriggerDirective<any>, "[owlDateTimeTrigger]", never, { "dtPicker": { "alias": "owlDateTimeTrigger"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
|
|
23
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* date-time-picker.animations
|
|
3
|
-
*/
|
|
4
|
-
import { AnimationTriggerMetadata } from '@angular/animations';
|
|
5
|
-
export declare const owlDateTimePickerAnimations: {
|
|
6
|
-
readonly transformPicker: AnimationTriggerMetadata;
|
|
7
|
-
readonly fadeInPicker: AnimationTriggerMetadata;
|
|
8
|
-
};
|
|
@@ -1,173 +0,0 @@
|
|
|
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
|
-
_pickerMode: 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
|
-
afterPickerClosed: EventEmitter<any>;
|
|
72
|
-
/**
|
|
73
|
-
* Callback before the picker is open
|
|
74
|
-
* */
|
|
75
|
-
beforePickerOpen: EventEmitter<any>;
|
|
76
|
-
/**
|
|
77
|
-
* Callback when the picker is open
|
|
78
|
-
* */
|
|
79
|
-
afterPickerOpen: EventEmitter<any>;
|
|
80
|
-
/**
|
|
81
|
-
* Emits selected year in multi-year view
|
|
82
|
-
* This doesn't imply a change on the selected date.
|
|
83
|
-
* */
|
|
84
|
-
yearSelected: EventEmitter<T>;
|
|
85
|
-
/**
|
|
86
|
-
* Emits selected month in year view
|
|
87
|
-
* This doesn't imply a change on the selected date.
|
|
88
|
-
* */
|
|
89
|
-
monthSelected: EventEmitter<T>;
|
|
90
|
-
/**
|
|
91
|
-
* Emits selected date
|
|
92
|
-
* */
|
|
93
|
-
dateSelected: EventEmitter<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
|
-
/** The element that was focused before the date time picker was opened. */
|
|
112
|
-
private focusedElementBeforeOpen;
|
|
113
|
-
private _dtInput;
|
|
114
|
-
get dtInput(): OwlDateTimeInputDirective<T>;
|
|
115
|
-
private _selected;
|
|
116
|
-
get selected(): T | null;
|
|
117
|
-
set selected(value: T | null);
|
|
118
|
-
private _selecteds;
|
|
119
|
-
get selecteds(): Array<T>;
|
|
120
|
-
set selecteds(values: Array<T>);
|
|
121
|
-
/** The minimum selectable date. */
|
|
122
|
-
get minDateTime(): T | null;
|
|
123
|
-
/** The maximum selectable date. */
|
|
124
|
-
get maxDateTime(): T | null;
|
|
125
|
-
get dateTimeFilter(): (date: T | null) => boolean;
|
|
126
|
-
get selectMode(): SelectMode;
|
|
127
|
-
get isInSingleMode(): boolean;
|
|
128
|
-
get isInRangeMode(): boolean;
|
|
129
|
-
private readonly defaultScrollStrategy;
|
|
130
|
-
constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, dialogService: OwlDialogService, ngZone: NgZone, changeDetector: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, defaultScrollStrategy: any, dateTimeFormats: OwlDateTimeFormats, document: any);
|
|
131
|
-
ngOnDestroy(): void;
|
|
132
|
-
registerInput(input: OwlDateTimeInputDirective<T>): void;
|
|
133
|
-
open(): void;
|
|
134
|
-
/**
|
|
135
|
-
* Selects the given date
|
|
136
|
-
*/
|
|
137
|
-
select(date: Array<T> | T): void;
|
|
138
|
-
/**
|
|
139
|
-
* Emits the selected year in multi-year view
|
|
140
|
-
* */
|
|
141
|
-
selectYear(normalizedYear: T): void;
|
|
142
|
-
/**
|
|
143
|
-
* Emits selected month in year view
|
|
144
|
-
* */
|
|
145
|
-
selectMonth(normalizedMonth: T): void;
|
|
146
|
-
/**
|
|
147
|
-
* Emits the selected date
|
|
148
|
-
* */
|
|
149
|
-
selectDate(normalizedDate: T): void;
|
|
150
|
-
/**
|
|
151
|
-
* Hide the picker
|
|
152
|
-
*/
|
|
153
|
-
close(): void;
|
|
154
|
-
/**
|
|
155
|
-
* Confirm the selected value
|
|
156
|
-
*/
|
|
157
|
-
confirmSelect(event?: any): void;
|
|
158
|
-
/**
|
|
159
|
-
* Open the picker as a dialog
|
|
160
|
-
*/
|
|
161
|
-
private openAsDialog;
|
|
162
|
-
/**
|
|
163
|
-
* Open the picker as popup
|
|
164
|
-
*/
|
|
165
|
-
private openAsPopup;
|
|
166
|
-
private createPopup;
|
|
167
|
-
/**
|
|
168
|
-
* Create the popup PositionStrategy.
|
|
169
|
-
* */
|
|
170
|
-
private createPopupPositionStrategy;
|
|
171
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeComponent<any>, [null, null, null, null, null, { optional: true; }, null, { optional: true; }, { optional: true; }]>;
|
|
172
|
-
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>;
|
|
173
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } 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: EventEmitter<T>;
|
|
88
|
-
abstract monthSelected: EventEmitter<T>;
|
|
89
|
-
abstract dateSelected: EventEmitter<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, false, never>;
|
|
103
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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,169 +0,0 @@
|
|
|
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
|
-
}
|