@skyux/datetime 5.0.2 → 5.1.2
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-testing.umd.js +3 -1
- package/bundles/skyux-datetime-testing.umd.js.map +1 -1
- package/bundles/skyux-datetime.umd.js +871 -434
- package/bundles/skyux-datetime.umd.js.map +1 -1
- package/documentation.json +1355 -971
- package/esm2015/modules/date-pipe/date-format-utility.js +10 -10
- package/esm2015/modules/date-pipe/date-pipe.module.js +9 -30
- package/esm2015/modules/date-pipe/date.pipe.js +7 -6
- package/esm2015/modules/date-pipe/fuzzy-date.pipe.js +5 -5
- package/esm2015/modules/date-range-picker/date-range-picker.component.js +30 -30
- package/esm2015/modules/date-range-picker/date-range-picker.module.js +11 -13
- package/esm2015/modules/date-range-picker/date-range.service.js +8 -13
- package/esm2015/modules/date-range-picker/types/date-range-calculation.js +1 -1
- package/esm2015/modules/date-range-picker/types/date-range-calculator-config.js +1 -1
- package/esm2015/modules/date-range-picker/types/date-range-calculator-date-range-function.js +1 -1
- package/esm2015/modules/date-range-picker/types/date-range-calculator-id.js +1 -1
- package/esm2015/modules/date-range-picker/types/date-range-calculator-type.js +1 -1
- package/esm2015/modules/date-range-picker/types/date-range-calculator-validate-function.js +1 -1
- package/esm2015/modules/date-range-picker/types/date-range-calculator.js +2 -2
- package/esm2015/modules/date-range-picker/types/date-range-default-calculator-config.js +1 -1
- package/esm2015/modules/date-range-picker/types/date-range-default-calculator-configs.js +25 -25
- package/esm2015/modules/date-range-picker/types/date-range-relative-value.js +17 -17
- package/esm2015/modules/date-range-picker/types/date-range.js +1 -1
- package/esm2015/modules/datepicker/date-formatter.js +4 -3
- package/esm2015/modules/datepicker/datepicker-adapter.service.js +4 -4
- package/esm2015/modules/datepicker/datepicker-calendar-change.js +2 -0
- package/esm2015/modules/datepicker/datepicker-calendar-inner.component.js +42 -15
- package/esm2015/modules/datepicker/datepicker-calendar.component.js +24 -14
- package/esm2015/modules/datepicker/datepicker-config.service.js +5 -5
- package/esm2015/modules/datepicker/datepicker-custom-date.js +2 -0
- package/esm2015/modules/datepicker/datepicker-date.js +1 -1
- package/esm2015/modules/datepicker/datepicker-input-fuzzy.directive.js +41 -41
- package/esm2015/modules/datepicker/datepicker-input.directive.js +38 -39
- package/esm2015/modules/datepicker/datepicker.component.js +68 -17
- package/esm2015/modules/datepicker/datepicker.module.js +28 -13
- package/esm2015/modules/datepicker/datepicker.service.js +21 -0
- package/esm2015/modules/datepicker/daypicker-button.component.js +25 -0
- package/esm2015/modules/datepicker/daypicker-cell.component.js +128 -0
- package/esm2015/modules/datepicker/daypicker.component.js +111 -20
- package/esm2015/modules/datepicker/fuzzy-date.js +1 -1
- package/esm2015/modules/datepicker/fuzzy-date.service.js +55 -27
- package/esm2015/modules/datepicker/monthpicker.component.js +8 -10
- package/esm2015/modules/datepicker/yearpicker.component.js +17 -12
- package/esm2015/modules/shared/sky-datetime-resources.module.js +102 -15
- package/esm2015/modules/timepicker/timepicker.component.js +29 -30
- package/esm2015/modules/timepicker/timepicker.directive.js +37 -36
- package/esm2015/modules/timepicker/timepicker.interface.js +1 -1
- package/esm2015/modules/timepicker/timepicker.module.js +10 -18
- package/esm2015/public-api.js +3 -1
- package/esm2015/testing/datepicker-fixture.js +4 -2
- package/esm2015/testing/timepicker-fixture.js +1 -1
- package/fesm2015/skyux-datetime-testing.js +3 -1
- package/fesm2015/skyux-datetime-testing.js.map +1 -1
- package/fesm2015/skyux-datetime.js +850 -422
- package/fesm2015/skyux-datetime.js.map +1 -1
- package/modules/datepicker/datepicker-calendar-change.d.ts +24 -0
- package/modules/datepicker/datepicker-calendar-inner.component.d.ts +13 -3
- package/modules/datepicker/datepicker-calendar.component.d.ts +8 -2
- package/modules/datepicker/datepicker-custom-date.d.ts +21 -0
- package/modules/datepicker/datepicker-date.d.ts +2 -0
- package/modules/datepicker/datepicker.component.d.ts +14 -1
- package/modules/datepicker/datepicker.module.d.ts +11 -8
- package/modules/datepicker/datepicker.service.d.ts +15 -0
- package/modules/datepicker/daypicker-button.component.d.ts +16 -0
- package/modules/datepicker/daypicker-cell.component.d.ts +40 -0
- package/modules/datepicker/daypicker.component.d.ts +18 -3
- package/package.json +7 -7
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SkyDatepickerCustomDate } from './datepicker-custom-date';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Specifies changes in the datepicker calendar.
|
|
5
|
+
*/
|
|
6
|
+
export interface SkyDatepickerCalendarChange {
|
|
7
|
+
/**
|
|
8
|
+
* The end date.
|
|
9
|
+
*/
|
|
10
|
+
endDate: Date;
|
|
11
|
+
/**
|
|
12
|
+
* The start date.
|
|
13
|
+
*/
|
|
14
|
+
startDate: Date;
|
|
15
|
+
/**
|
|
16
|
+
* Provides an observable that allows the consumer to push custom dates back to the calendar
|
|
17
|
+
* when the `SkyCalendarDateRangeChangeEvent` event fires. This is useful
|
|
18
|
+
* for displaying key dates or disabled dates each time the calendar changes. If disabled dates
|
|
19
|
+
* are provided, SKY UX will prevent the user from selecting the date from the calendar.
|
|
20
|
+
* However, consumers will still need to add a custom validator to prevent users from entering
|
|
21
|
+
* disabled dates in the text input.
|
|
22
|
+
*/
|
|
23
|
+
customDates?: Observable<SkyDatepickerCustomDate[]>;
|
|
24
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { SkyDatepickerCustomDate } from './datepicker-custom-date';
|
|
2
3
|
import { SkyDateFormatter } from './date-formatter';
|
|
3
4
|
import { SkyDatepickerDate } from './datepicker-date';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
8
|
-
export declare class SkyDatepickerCalendarInnerComponent implements OnInit, OnChanges {
|
|
9
|
+
export declare class SkyDatepickerCalendarInnerComponent implements OnDestroy, OnInit, OnChanges {
|
|
10
|
+
customDates: SkyDatepickerCustomDate[];
|
|
9
11
|
startingDay: number;
|
|
10
12
|
minDate: Date;
|
|
11
13
|
maxDate: Date;
|
|
@@ -43,9 +45,11 @@ export declare class SkyDatepickerCalendarInnerComponent implements OnInit, OnCh
|
|
|
43
45
|
handleKeydownMonth: Function;
|
|
44
46
|
handleKeydownYear: Function;
|
|
45
47
|
keys: any;
|
|
48
|
+
private ngUnsubscribe;
|
|
46
49
|
private _selectedDate;
|
|
47
50
|
ngOnInit(): void;
|
|
48
51
|
ngOnChanges(changes: SimpleChanges): void;
|
|
52
|
+
ngOnDestroy(): void;
|
|
49
53
|
setCompareHandler(handler: Function, type: string): void;
|
|
50
54
|
compare(date1: Date, date2: Date): any;
|
|
51
55
|
setRefreshViewHandler(handler: Function, type: string): void;
|
|
@@ -64,7 +68,13 @@ export declare class SkyDatepickerCalendarInnerComponent implements OnInit, OnCh
|
|
|
64
68
|
move(direction: number): void;
|
|
65
69
|
toggleModeCalendar(event: Event): void;
|
|
66
70
|
toggleMode(direction: number): void;
|
|
71
|
+
/**
|
|
72
|
+
* Date is disabled if it meets any of these criteria:
|
|
73
|
+
* 1. Date falls outside the min or max dates set by the SkyDatepickerConfigService.
|
|
74
|
+
* 2. Date is marked as disabled in the customDates array.
|
|
75
|
+
*/
|
|
67
76
|
protected isDisabled(date: Date): boolean;
|
|
77
|
+
private getCustomDate;
|
|
68
78
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDatepickerCalendarInnerComponent, never>;
|
|
69
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDatepickerCalendarInnerComponent, "sky-datepicker-inner", never, { "startingDay": "startingDay"; "minDate": "minDate"; "maxDate": "maxDate"; "selectedDate": "selectedDate"; }, { "selectedDateChange": "selectedDateChange"; "calendarModeChange": "calendarModeChange"; }, never, ["*"]>;
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDatepickerCalendarInnerComponent, "sky-datepicker-inner", never, { "customDates": "customDates"; "startingDay": "startingDay"; "minDate": "minDate"; "maxDate": "maxDate"; "selectedDate": "selectedDate"; }, { "selectedDateChange": "selectedDateChange"; "calendarModeChange": "calendarModeChange"; }, never, ["*"]>;
|
|
70
80
|
}
|
|
@@ -2,6 +2,8 @@ import { AfterViewInit, ElementRef, EventEmitter } from '@angular/core';
|
|
|
2
2
|
import { SkyDatepickerAdapterService } from './datepicker-adapter.service';
|
|
3
3
|
import { SkyDatepickerCalendarInnerComponent } from './datepicker-calendar-inner.component';
|
|
4
4
|
import { SkyDatepickerConfigService } from './datepicker-config.service';
|
|
5
|
+
import { SkyDatepickerCustomDate } from './datepicker-custom-date';
|
|
6
|
+
import { SkyDatepickerCalendarChange } from './datepicker-calendar-change';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
6
8
|
/**
|
|
7
9
|
* @internal
|
|
@@ -10,6 +12,8 @@ export declare class SkyDatepickerCalendarComponent implements AfterViewInit {
|
|
|
10
12
|
private adapter;
|
|
11
13
|
private config;
|
|
12
14
|
private elementRef;
|
|
15
|
+
customDates: SkyDatepickerCustomDate[];
|
|
16
|
+
isDaypickerWaiting: boolean;
|
|
13
17
|
minDate: Date;
|
|
14
18
|
maxDate: Date;
|
|
15
19
|
/** currently selected date */
|
|
@@ -17,8 +21,9 @@ export declare class SkyDatepickerCalendarComponent implements AfterViewInit {
|
|
|
17
21
|
/** starting day of the week from 0-6 (0=Sunday, ..., 6=Saturday) */
|
|
18
22
|
set startingDay(start: number);
|
|
19
23
|
get startingDay(): number;
|
|
20
|
-
|
|
24
|
+
calendarDateRangeChange: EventEmitter<SkyDatepickerCalendarChange>;
|
|
21
25
|
calendarModeChange: EventEmitter<string>;
|
|
26
|
+
selectedDateChange: EventEmitter<Date>;
|
|
22
27
|
/**
|
|
23
28
|
* @internal
|
|
24
29
|
* Indicates if the calendar element's visiblity property is 'visible'.
|
|
@@ -31,9 +36,10 @@ export declare class SkyDatepickerCalendarComponent implements AfterViewInit {
|
|
|
31
36
|
constructor(adapter: SkyDatepickerAdapterService, config: SkyDatepickerConfigService, elementRef: ElementRef);
|
|
32
37
|
ngAfterViewInit(): void;
|
|
33
38
|
configureOptions(): void;
|
|
39
|
+
onCalendarDateRangeChange(event: SkyDatepickerCalendarChange): void;
|
|
34
40
|
onCalendarModeChange(event: string): void;
|
|
35
41
|
onSelectedDateChange(event: Date): void;
|
|
36
42
|
writeValue(value: Date): void;
|
|
37
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDatepickerCalendarComponent, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDatepickerCalendarComponent, "sky-datepicker-calendar", never, { "minDate": "minDate"; "maxDate": "maxDate"; "selectedDate": "selectedDate"; "startingDay": "startingDay"; }, { "
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDatepickerCalendarComponent, "sky-datepicker-calendar", never, { "customDates": "customDates"; "isDaypickerWaiting": "isDaypickerWaiting"; "minDate": "minDate"; "maxDate": "maxDate"; "selectedDate": "selectedDate"; "startingDay": "startingDay"; }, { "calendarDateRangeChange": "calendarDateRangeChange"; "calendarModeChange": "calendarModeChange"; "selectedDateChange": "selectedDateChange"; }, never, never>;
|
|
39
45
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The configuration for a custom date.
|
|
3
|
+
*/
|
|
4
|
+
export interface SkyDatepickerCustomDate {
|
|
5
|
+
/**
|
|
6
|
+
* The date to customize.
|
|
7
|
+
*/
|
|
8
|
+
date: Date;
|
|
9
|
+
/**
|
|
10
|
+
* Indicates whether to disable the date.
|
|
11
|
+
*/
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether to display the date as a key date in the calendar.
|
|
15
|
+
*/
|
|
16
|
+
keyDate?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Displays a popup of the provided text when hovering over the key date in the calendar.
|
|
19
|
+
*/
|
|
20
|
+
keyDateText?: Array<string>;
|
|
21
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { SkyAffixService, SkyCoreAdapterService, SkyOverlayService } from '@skyux/core';
|
|
3
|
+
import { SkyDatepickerCustomDate } from './datepicker-custom-date';
|
|
4
|
+
import { SkyDatepickerCalendarChange } from './datepicker-calendar-change';
|
|
3
5
|
import { SkyInputBoxHostService } from '@skyux/forms';
|
|
4
6
|
import { SkyThemeService } from '@skyux/theme';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
@@ -38,8 +40,16 @@ export declare class SkyDatepickerComponent implements OnDestroy, OnInit {
|
|
|
38
40
|
get disabled(): boolean;
|
|
39
41
|
set disabled(value: boolean);
|
|
40
42
|
set selectedDate(value: Date);
|
|
43
|
+
/**
|
|
44
|
+
* Fires when the range of displayed dates in the calendar changes. Provides the
|
|
45
|
+
* current range of displayed dates and a mutable `customDate` property consumers can use
|
|
46
|
+
* to modify individual dates on the calendar.
|
|
47
|
+
*/
|
|
48
|
+
calendarDateRangeChange: EventEmitter<SkyDatepickerCalendarChange>;
|
|
41
49
|
calendarId: string;
|
|
50
|
+
customDates: SkyDatepickerCustomDate[] | undefined;
|
|
42
51
|
dateChange: EventEmitter<Date>;
|
|
52
|
+
isDaypickerWaiting: boolean;
|
|
43
53
|
isOpen: boolean;
|
|
44
54
|
isVisible: boolean;
|
|
45
55
|
maxDate: Date;
|
|
@@ -55,6 +65,7 @@ export declare class SkyDatepickerComponent implements OnDestroy, OnInit {
|
|
|
55
65
|
private triggerButtonTemplateRef;
|
|
56
66
|
private affixer;
|
|
57
67
|
private calendarUnsubscribe;
|
|
68
|
+
private customDatesSubscription;
|
|
58
69
|
private ngUnsubscribe;
|
|
59
70
|
private overlay;
|
|
60
71
|
private overlayKeydownListner;
|
|
@@ -67,6 +78,7 @@ export declare class SkyDatepickerComponent implements OnDestroy, OnInit {
|
|
|
67
78
|
onCalendarModeChange(): void;
|
|
68
79
|
onSelectedDateChange(value: Date): void;
|
|
69
80
|
onTriggerButtonClick(): void;
|
|
81
|
+
onCalendarDateRangeChange(event: SkyDatepickerCalendarChange): void;
|
|
70
82
|
private closePicker;
|
|
71
83
|
private openPicker;
|
|
72
84
|
private createAffixer;
|
|
@@ -75,6 +87,7 @@ export declare class SkyDatepickerComponent implements OnDestroy, OnInit {
|
|
|
75
87
|
private destroyOverlay;
|
|
76
88
|
private addKeydownListner;
|
|
77
89
|
private removePickerEventListeners;
|
|
90
|
+
private cancelCustomDatesSubscription;
|
|
78
91
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDatepickerComponent, [null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
79
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDatepickerComponent, "sky-datepicker", never, { "pickerClass": "pickerClass"; }, {}, never, ["*"]>;
|
|
92
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDatepickerComponent, "sky-datepicker", never, { "pickerClass": "pickerClass"; }, { "calendarDateRangeChange": "calendarDateRangeChange"; }, never, ["*"]>;
|
|
80
93
|
}
|
|
@@ -7,15 +7,18 @@ import * as i5 from "./yearpicker.component";
|
|
|
7
7
|
import * as i6 from "./datepicker.component";
|
|
8
8
|
import * as i7 from "./datepicker-input.directive";
|
|
9
9
|
import * as i8 from "./datepicker-input-fuzzy.directive";
|
|
10
|
-
import * as i9 from "
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "@angular/
|
|
13
|
-
import * as i12 from "@skyux/
|
|
14
|
-
import * as i13 from "
|
|
15
|
-
import * as i14 from "@skyux/
|
|
16
|
-
import * as i15 from "
|
|
10
|
+
import * as i9 from "./daypicker-cell.component";
|
|
11
|
+
import * as i10 from "./daypicker-button.component";
|
|
12
|
+
import * as i11 from "@angular/common";
|
|
13
|
+
import * as i12 from "@skyux/i18n";
|
|
14
|
+
import * as i13 from "@angular/forms";
|
|
15
|
+
import * as i14 from "@skyux/indicators";
|
|
16
|
+
import * as i15 from "../shared/sky-datetime-resources.module";
|
|
17
|
+
import * as i16 from "@skyux/core";
|
|
18
|
+
import * as i17 from "@skyux/theme";
|
|
19
|
+
import * as i18 from "@skyux/popovers";
|
|
17
20
|
export declare class SkyDatepickerModule {
|
|
18
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDatepickerModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyDatepickerModule, [typeof i1.SkyDatepickerCalendarComponent, typeof i2.SkyDatepickerCalendarInnerComponent, typeof i3.SkyDayPickerComponent, typeof i4.SkyMonthPickerComponent, typeof i5.SkyYearPickerComponent, typeof i6.SkyDatepickerComponent, typeof i7.SkyDatepickerInputDirective, typeof i8.SkyFuzzyDatepickerInputDirective], [typeof
|
|
22
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyDatepickerModule, [typeof i1.SkyDatepickerCalendarComponent, typeof i2.SkyDatepickerCalendarInnerComponent, typeof i3.SkyDayPickerComponent, typeof i4.SkyMonthPickerComponent, typeof i5.SkyYearPickerComponent, typeof i6.SkyDatepickerComponent, typeof i7.SkyDatepickerInputDirective, typeof i8.SkyFuzzyDatepickerInputDirective, typeof i9.SkyDayPickerCellComponent, typeof i10.SkyDayPickerButtonComponent], [typeof i11.CommonModule, typeof i12.SkyI18nModule, typeof i13.FormsModule, typeof i14.SkyIconModule, typeof i15.SkyDatetimeResourcesModule, typeof i16.SkyAffixModule, typeof i16.SkyOverlayModule, typeof i17.SkyThemeModule, typeof i18.SkyPopoverModule, typeof i14.SkyWaitModule], [typeof i1.SkyDatepickerCalendarComponent, typeof i6.SkyDatepickerComponent, typeof i7.SkyDatepickerInputDirective, typeof i8.SkyFuzzyDatepickerInputDirective]>;
|
|
20
23
|
static ɵinj: i0.ɵɵInjectorDeclaration<SkyDatepickerModule>;
|
|
21
24
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { SkyDatepickerDate } from './datepicker-date';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class SkyDatepickerService {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies if a key date popover is currently displayed.
|
|
10
|
+
* Useful for communicating across all daypicker siblings when a popover is displayed.
|
|
11
|
+
*/
|
|
12
|
+
keyDatePopoverStream: Subject<SkyDatepickerDate>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDatepickerService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyDatepickerService>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SkyDatepickerCalendarInnerComponent } from './datepicker-calendar-inner.component';
|
|
2
|
+
import { SkyDatepickerDate } from './datepicker-date';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class SkyDayPickerButtonComponent {
|
|
8
|
+
datepicker: SkyDatepickerCalendarInnerComponent;
|
|
9
|
+
/**
|
|
10
|
+
* Specifies the date this picker button will represent on the calendar.
|
|
11
|
+
*/
|
|
12
|
+
date: SkyDatepickerDate;
|
|
13
|
+
constructor(datepicker: SkyDatepickerCalendarInnerComponent);
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDayPickerButtonComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDayPickerButtonComponent, "sky-daypicker-button", never, { "date": "date"; }, {}, never, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { SkyPopoverMessage } from '@skyux/popovers';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { SkyDatepickerCalendarInnerComponent } from './datepicker-calendar-inner.component';
|
|
5
|
+
import { SkyDatepickerDate } from './datepicker-date';
|
|
6
|
+
import { SkyDatepickerService } from './datepicker.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare class SkyDayPickerCellComponent implements OnInit, OnDestroy {
|
|
12
|
+
private datepicker;
|
|
13
|
+
private datepickerService;
|
|
14
|
+
/**
|
|
15
|
+
* Specifies if the active date has been changed.
|
|
16
|
+
*/
|
|
17
|
+
activeDateHasChanged: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Specifies the date this picker cell will represent on the calendar.
|
|
20
|
+
*/
|
|
21
|
+
date: SkyDatepickerDate;
|
|
22
|
+
hasTooltip: boolean;
|
|
23
|
+
popoverController: Subject<SkyPopoverMessage>;
|
|
24
|
+
private activeUid;
|
|
25
|
+
private cancelPopover;
|
|
26
|
+
private popoverOpen;
|
|
27
|
+
private ngUnsubscribe;
|
|
28
|
+
constructor(datepicker: SkyDatepickerCalendarInnerComponent, datepickerService: SkyDatepickerService);
|
|
29
|
+
ngOnInit(): void;
|
|
30
|
+
ngOnDestroy(): void;
|
|
31
|
+
onDayMouseenter(): void;
|
|
32
|
+
onDayMouseleave(): void;
|
|
33
|
+
onPopoverClosed(): void;
|
|
34
|
+
onPopoverOpened(): void;
|
|
35
|
+
getKeyDateLabel(): string;
|
|
36
|
+
private hideTooltip;
|
|
37
|
+
private showTooltip;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDayPickerCellComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDayPickerCellComponent, "sky-daypicker-cell", never, { "activeDateHasChanged": "activeDateHasChanged"; "date": "date"; }, {}, never, never>;
|
|
40
|
+
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { SkyDatepickerCustomDate } from './datepicker-custom-date';
|
|
3
|
+
import { SkyDatepickerCalendarChange } from './datepicker-calendar-change';
|
|
2
4
|
import { SkyDatepickerCalendarInnerComponent } from './datepicker-calendar-inner.component';
|
|
3
5
|
import { SkyDatepickerDate } from './datepicker-date';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
/**
|
|
6
8
|
* @internal
|
|
7
9
|
*/
|
|
8
|
-
export declare class SkyDayPickerComponent implements OnInit {
|
|
10
|
+
export declare class SkyDayPickerComponent implements OnDestroy, OnInit {
|
|
11
|
+
set customDates(value: SkyDatepickerCustomDate[]);
|
|
12
|
+
calendarDateRangeChange: EventEmitter<SkyDatepickerCalendarChange>;
|
|
13
|
+
isWaiting: boolean;
|
|
14
|
+
activeDateHasChanged: boolean;
|
|
9
15
|
labels: any[];
|
|
10
16
|
title: string;
|
|
11
17
|
rows: Array<Array<SkyDatepickerDate>>;
|
|
@@ -13,13 +19,22 @@ export declare class SkyDayPickerComponent implements OnInit {
|
|
|
13
19
|
datepicker: SkyDatepickerCalendarInnerComponent;
|
|
14
20
|
CURRENT_THEME_TEMPLATE: any;
|
|
15
21
|
private daysInMonth;
|
|
22
|
+
private initialDate;
|
|
23
|
+
private ngUnsubscribe;
|
|
16
24
|
constructor(datepicker: SkyDatepickerCalendarInnerComponent);
|
|
17
25
|
ngOnInit(): void;
|
|
26
|
+
ngOnDestroy(): void;
|
|
18
27
|
protected getDates(startDate: Date, n: number): Date[];
|
|
19
28
|
private compareDays;
|
|
20
29
|
private refreshDayView;
|
|
21
30
|
private keydownDays;
|
|
22
31
|
private getDaysInMonth;
|
|
32
|
+
/**
|
|
33
|
+
* Applies custom date properties to the existing dates displayed in the calendar.
|
|
34
|
+
*/
|
|
35
|
+
private applyCustomDates;
|
|
36
|
+
private dateRangeRowsAreEqual;
|
|
37
|
+
private getDateRange;
|
|
23
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDayPickerComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDayPickerComponent, "sky-daypicker", never, {}, {}, never, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyDayPickerComponent, "sky-daypicker", never, { "customDates": "customDates"; "isWaiting": "isWaiting"; }, { "calendarDateRangeChange": "calendarDateRangeChange"; }, never, never>;
|
|
25
40
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/datetime",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^12.2.
|
|
6
|
-
"@angular/core": "^12.2.
|
|
7
|
-
"@angular/forms": "^12.2.
|
|
8
|
-
"@angular/router": "^12.2.
|
|
9
|
-
"@skyux/core": "^5.
|
|
5
|
+
"@angular/common": "^12.2.14",
|
|
6
|
+
"@angular/core": "^12.2.14",
|
|
7
|
+
"@angular/forms": "^12.2.14",
|
|
8
|
+
"@angular/router": "^12.2.14",
|
|
9
|
+
"@skyux/core": "^5.2.2",
|
|
10
10
|
"@skyux/forms": "^5.0.1",
|
|
11
11
|
"@skyux/i18n": "^5.0.1",
|
|
12
|
-
"@skyux/indicators": "^5.
|
|
12
|
+
"@skyux/indicators": "^5.1.2"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"moment": "2.29.1",
|
package/public-api.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export * from './modules/datepicker/datepicker-config.service';
|
|
|
11
11
|
export * from './modules/datepicker/datepicker.module';
|
|
12
12
|
export * from './modules/datepicker/fuzzy-date';
|
|
13
13
|
export * from './modules/datepicker/fuzzy-date.service';
|
|
14
|
+
export * from './modules/datepicker/datepicker-calendar-change';
|
|
15
|
+
export * from './modules/datepicker/datepicker-custom-date';
|
|
14
16
|
export * from './modules/timepicker/timepicker.interface';
|
|
15
17
|
export * from './modules/timepicker/timepicker.module';
|
|
16
18
|
export { SkyDatepickerCalendarComponent as λ1 } from './modules/datepicker/datepicker-calendar.component';
|