@skyux/datetime 5.6.0 → 5.7.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.
- package/bundles/skyux-datetime.umd.js +488 -162
- package/documentation.json +696 -835
- package/esm2015/lib/modules/date-pipe/date-format-utility.js +0 -2
- package/esm2015/lib/modules/date-pipe/date-format-utility.js.map +1 -1
- package/esm2015/lib/modules/date-range-picker/date-range-picker.component.js +47 -58
- package/esm2015/lib/modules/date-range-picker/date-range-picker.component.js.map +1 -1
- package/esm2015/lib/modules/date-range-picker/types/date-range-relative-value.js +0 -3
- package/esm2015/lib/modules/date-range-picker/types/date-range-relative-value.js.map +1 -1
- package/esm2015/lib/modules/datepicker/datepicker-calendar-inner.component.js.map +1 -1
- package/esm2015/lib/modules/datepicker/datepicker-input-fuzzy.directive.js +60 -50
- package/esm2015/lib/modules/datepicker/datepicker-input-fuzzy.directive.js.map +1 -1
- package/esm2015/lib/modules/datepicker/datepicker-input.directive.js +51 -40
- package/esm2015/lib/modules/datepicker/datepicker-input.directive.js.map +1 -1
- package/esm2015/lib/modules/shared/sky-datetime-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/sky-datetime-resources.module.js.map +1 -1
- package/esm2015/lib/modules/timepicker/timepicker.component.js +6 -6
- package/esm2015/lib/modules/timepicker/timepicker.component.js.map +1 -1
- package/esm2015/lib/modules/timepicker/timepicker.directive.js +4 -5
- package/esm2015/lib/modules/timepicker/timepicker.directive.js.map +1 -1
- package/fesm2015/skyux-datetime.js +168 -164
- package/fesm2015/skyux-datetime.js.map +1 -1
- package/lib/modules/date-pipe/date-format-utility.d.ts +0 -1
- package/lib/modules/date-range-picker/date-range-picker.component.d.ts +4 -3
- package/lib/modules/date-range-picker/types/date-range-relative-value.d.ts +0 -1
- package/lib/modules/datepicker/datepicker-calendar-inner.component.d.ts +16 -13
- package/lib/modules/datepicker/datepicker-input-fuzzy.directive.d.ts +6 -1
- package/lib/modules/datepicker/datepicker-input.directive.d.ts +6 -2
- package/lib/modules/shared/sky-datetime-resources.module.d.ts +1 -1
- package/package.json +18 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectorRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { AbstractControl, ControlValueAccessor, FormBuilder, FormGroup, ValidationErrors, Validator } from '@angular/forms';
|
|
3
3
|
import { SkyAppWindowRef } from '@skyux/core';
|
|
4
4
|
import { SkyAppLocaleProvider } from '@skyux/i18n';
|
|
@@ -24,6 +24,7 @@ export declare class SkyDateRangePickerComponent implements OnInit, OnChanges, O
|
|
|
24
24
|
private formBuilder;
|
|
25
25
|
private localeProvider;
|
|
26
26
|
private windowRef;
|
|
27
|
+
private ngZone;
|
|
27
28
|
/**
|
|
28
29
|
* Specifies IDs for the date range options to include in the picker's dropdown.
|
|
29
30
|
* The options specify calculator objects that return two `Date` objects to represent date ranges.
|
|
@@ -83,7 +84,7 @@ export declare class SkyDateRangePickerComponent implements OnInit, OnChanges, O
|
|
|
83
84
|
private _dateFormat;
|
|
84
85
|
private _disabled;
|
|
85
86
|
private _value;
|
|
86
|
-
constructor(changeDetector: ChangeDetectorRef, dateRangeService: SkyDateRangeService, formBuilder: FormBuilder, localeProvider: SkyAppLocaleProvider, windowRef: SkyAppWindowRef, themeSvc?: SkyThemeService);
|
|
87
|
+
constructor(changeDetector: ChangeDetectorRef, dateRangeService: SkyDateRangeService, formBuilder: FormBuilder, localeProvider: SkyAppLocaleProvider, windowRef: SkyAppWindowRef, ngZone: NgZone, themeSvc?: SkyThemeService);
|
|
87
88
|
ngOnInit(): void;
|
|
88
89
|
ngOnChanges(changes: SimpleChanges): void;
|
|
89
90
|
ngOnDestroy(): void;
|
|
@@ -106,6 +107,6 @@ export declare class SkyDateRangePickerComponent implements OnInit, OnChanges, O
|
|
|
106
107
|
private onChange;
|
|
107
108
|
private onTouched;
|
|
108
109
|
private onValidatorChange;
|
|
109
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDateRangePickerComponent, [null, null, null, null, null, { optional: true; }]>;
|
|
110
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDateRangePickerComponent, [null, null, null, null, null, null, { optional: true; }]>;
|
|
110
111
|
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDateRangePickerComponent, "sky-date-range-picker", never, { "calculatorIds": "calculatorIds"; "dateFormat": "dateFormat"; "disabled": "disabled"; "label": "label"; "startDateRequired": "startDateRequired"; "endDateRequired": "endDateRequired"; }, {}, never, never>;
|
|
111
112
|
}
|
|
@@ -3,6 +3,8 @@ import { SkyDateFormatter } from './date-formatter';
|
|
|
3
3
|
import { SkyDatepickerCustomDate } from './datepicker-custom-date';
|
|
4
4
|
import { SkyDatepickerDate } from './datepicker-date';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
declare type DateComparator = (date1: Date, date2: Date) => number | undefined;
|
|
7
|
+
declare type KeyboardEventHandler = (key: string, event: KeyboardEvent) => void;
|
|
6
8
|
/**
|
|
7
9
|
* @internal
|
|
8
10
|
*/
|
|
@@ -35,26 +37,26 @@ export declare class SkyDatepickerCalendarInnerComponent implements OnDestroy, O
|
|
|
35
37
|
stepYear: any;
|
|
36
38
|
protected modes: string[];
|
|
37
39
|
protected dateFormatter: SkyDateFormatter;
|
|
38
|
-
refreshViewHandlerDay:
|
|
39
|
-
compareHandlerDay:
|
|
40
|
-
refreshViewHandlerMonth:
|
|
41
|
-
compareHandlerMonth:
|
|
42
|
-
refreshViewHandlerYear:
|
|
43
|
-
compareHandlerYear:
|
|
44
|
-
handleKeydownDay:
|
|
45
|
-
handleKeydownMonth:
|
|
46
|
-
handleKeydownYear:
|
|
40
|
+
refreshViewHandlerDay: () => void;
|
|
41
|
+
compareHandlerDay: DateComparator;
|
|
42
|
+
refreshViewHandlerMonth: () => void;
|
|
43
|
+
compareHandlerMonth: DateComparator;
|
|
44
|
+
refreshViewHandlerYear: () => void;
|
|
45
|
+
compareHandlerYear: DateComparator;
|
|
46
|
+
handleKeydownDay: KeyboardEventHandler;
|
|
47
|
+
handleKeydownMonth: KeyboardEventHandler;
|
|
48
|
+
handleKeydownYear: KeyboardEventHandler;
|
|
47
49
|
keys: any;
|
|
48
50
|
private ngUnsubscribe;
|
|
49
51
|
private _selectedDate;
|
|
50
52
|
ngOnInit(): void;
|
|
51
53
|
ngOnChanges(changes: SimpleChanges): void;
|
|
52
54
|
ngOnDestroy(): void;
|
|
53
|
-
setCompareHandler(handler:
|
|
54
|
-
compare(date1: Date, date2: Date):
|
|
55
|
-
setRefreshViewHandler(handler:
|
|
55
|
+
setCompareHandler(handler: DateComparator, type: string): void;
|
|
56
|
+
compare(date1: Date, date2: Date): undefined | number;
|
|
57
|
+
setRefreshViewHandler(handler: () => void, type: string): void;
|
|
56
58
|
refreshView(): void;
|
|
57
|
-
setKeydownHandler(handler:
|
|
59
|
+
setKeydownHandler(handler: KeyboardEventHandler, type: string): void;
|
|
58
60
|
handleKeydown(key: string, event: KeyboardEvent): void;
|
|
59
61
|
dateFilter(date: Date, format: string): string;
|
|
60
62
|
isActive(dateObject: any): boolean;
|
|
@@ -78,3 +80,4 @@ export declare class SkyDatepickerCalendarInnerComponent implements OnDestroy, O
|
|
|
78
80
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDatepickerCalendarInnerComponent, never>;
|
|
79
81
|
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDatepickerCalendarInnerComponent, "sky-datepicker-inner", never, { "customDates": "customDates"; "startingDay": "startingDay"; "minDate": "minDate"; "maxDate": "maxDate"; "selectedDate": "selectedDate"; }, { "selectedDateChange": "selectedDateChange"; "calendarModeChange": "calendarModeChange"; }, never, ["*"]>;
|
|
80
82
|
}
|
|
83
|
+
export {};
|
|
@@ -83,7 +83,6 @@ export declare class SkyFuzzyDatepickerInputDirective implements OnInit, OnDestr
|
|
|
83
83
|
private set value(value);
|
|
84
84
|
private control;
|
|
85
85
|
private dateFormatter;
|
|
86
|
-
private isFirstChange;
|
|
87
86
|
private locale;
|
|
88
87
|
private preferredShortDateFormat;
|
|
89
88
|
private ngUnsubscribe;
|
|
@@ -122,6 +121,12 @@ export declare class SkyFuzzyDatepickerInputDirective implements OnInit, OnDestr
|
|
|
122
121
|
private onChange;
|
|
123
122
|
private onTouched;
|
|
124
123
|
private onValidatorChange;
|
|
124
|
+
/**
|
|
125
|
+
* Update the value of the form control and input element
|
|
126
|
+
* @param emitEvent Denotes if we emit an event to the consumer's form control. We do not want to do this if the value is being updated via a `setValue` call or a `patchValue` call as this is already handled by Angular.
|
|
127
|
+
* In these cases we do not want to fire `onChange` as it will cause extra `valueChange` and `statusChange` events and the status of the form should not be affected by these changes.
|
|
128
|
+
*/
|
|
129
|
+
private updateValue;
|
|
125
130
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyFuzzyDatepickerInputDirective, [null, null, null, null, null, null, null, { optional: true; }]>;
|
|
126
131
|
static ɵdir: i0.ɵɵDirectiveDeclaration<SkyFuzzyDatepickerInputDirective, "[skyFuzzyDatepickerInput]", never, { "dateFormat": "dateFormat"; "disabled": "disabled"; "futureDisabled": "futureDisabled"; "maxDate": "maxDate"; "minDate": "minDate"; "skyDatepickerNoValidate": "skyDatepickerNoValidate"; "skyFuzzyDatepickerInput": "skyFuzzyDatepickerInput"; "startingDay": "startingDay"; "yearRequired": "yearRequired"; }, {}, never>;
|
|
127
132
|
}
|
|
@@ -78,7 +78,6 @@ export declare class SkyDatepickerInputDirective implements OnInit, OnDestroy, A
|
|
|
78
78
|
private set value(value);
|
|
79
79
|
private control;
|
|
80
80
|
private dateFormatter;
|
|
81
|
-
private isFirstChange;
|
|
82
81
|
private initialPlaceholder;
|
|
83
82
|
private preferredShortDateFormat;
|
|
84
83
|
private ngUnsubscribe;
|
|
@@ -119,8 +118,13 @@ export declare class SkyDatepickerInputDirective implements OnInit, OnDestroy, A
|
|
|
119
118
|
private onChange;
|
|
120
119
|
private onTouched;
|
|
121
120
|
private onValidatorChange;
|
|
122
|
-
private notifyUpdatedValue;
|
|
123
121
|
private updatePlaceholder;
|
|
122
|
+
/**
|
|
123
|
+
* Update the value of the form control and input element
|
|
124
|
+
* @param emitEvent Denotes if we emit an event to the consumer's form control. We do not want to do this if the value is being updated via a `setValue` call or a `patchValue` call as this is already handled by Angular.
|
|
125
|
+
* In these cases we do not want to fire `onChange` as it will cause extra `valueChange` and `statusChange` events and the status of the form should not be affected by these changes.
|
|
126
|
+
*/
|
|
127
|
+
private updateValue;
|
|
124
128
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDatepickerInputDirective, [null, null, null, null, null, null, null, { optional: true; }]>;
|
|
125
129
|
static ɵdir: i0.ɵɵDirectiveDeclaration<SkyDatepickerInputDirective, "[skyDatepickerInput]", never, { "dateFormat": "dateFormat"; "disabled": "disabled"; "maxDate": "maxDate"; "minDate": "minDate"; "skyDatepickerInput": "skyDatepickerInput"; "skyDatepickerNoValidate": "skyDatepickerNoValidate"; "startingDay": "startingDay"; "strict": "strict"; }, {}, never>;
|
|
126
130
|
}
|
|
@@ -2,7 +2,7 @@ import { SkyAppLocaleInfo, SkyLibResourcesProvider } from '@skyux/i18n';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "@skyux/i18n";
|
|
4
4
|
export declare class SkyDatetimeResourcesProvider implements SkyLibResourcesProvider {
|
|
5
|
-
getString(localeInfo: SkyAppLocaleInfo, name: string): string;
|
|
5
|
+
getString(localeInfo: SkyAppLocaleInfo, name: string): string | undefined;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Import into any component library module that needs to use resource strings.
|
package/package.json
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/datetime",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^12.2.16",
|
|
6
|
-
"@angular/core": "^12.2.16",
|
|
7
|
-
"@angular/forms": "^12.2.16",
|
|
8
|
-
"@angular/router": "^12.2.16",
|
|
9
|
-
"@skyux/core": "5.6.0",
|
|
10
|
-
"@skyux/forms": "5.6.0",
|
|
11
|
-
"@skyux/i18n": "5.6.0",
|
|
12
|
-
"@skyux/indicators": "5.6.0",
|
|
13
|
-
"@skyux/popovers": "5.6.0"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"moment": "2.29.1",
|
|
17
|
-
"tslib": "^2.3.1"
|
|
18
|
-
},
|
|
3
|
+
"version": "5.7.0",
|
|
19
4
|
"author": "Blackbaud, Inc.",
|
|
20
5
|
"keywords": [
|
|
21
6
|
"blackbaud",
|
|
@@ -30,6 +15,23 @@
|
|
|
30
15
|
"url": "https://github.com/blackbaud/skyux/issues"
|
|
31
16
|
},
|
|
32
17
|
"homepage": "https://github.com/blackbaud/skyux#readme",
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@angular/common": "^12.2.16",
|
|
20
|
+
"@angular/core": "^12.2.16",
|
|
21
|
+
"@angular/forms": "^12.2.16",
|
|
22
|
+
"@angular/platform-browser": "^12.2.16",
|
|
23
|
+
"@skyux-sdk/testing": "5.7.0",
|
|
24
|
+
"@skyux/core": "5.7.0",
|
|
25
|
+
"@skyux/forms": "5.7.0",
|
|
26
|
+
"@skyux/i18n": "5.7.0",
|
|
27
|
+
"@skyux/indicators": "5.7.0",
|
|
28
|
+
"@skyux/popovers": "5.7.0",
|
|
29
|
+
"@skyux/theme": "5.7.0"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"moment": "2.29.1",
|
|
33
|
+
"tslib": "^2.3.1"
|
|
34
|
+
},
|
|
33
35
|
"main": "bundles/skyux-datetime.umd.js",
|
|
34
36
|
"module": "fesm2015/skyux-datetime.js",
|
|
35
37
|
"es2015": "fesm2015/skyux-datetime.js",
|