@skyux/datetime 7.0.0-beta.11 → 7.0.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/documentation.json +1532 -991
  2. package/esm2020/lib/modules/date-range-picker/date-range-picker-end-date-resource-key.pipe.mjs +20 -0
  3. package/esm2020/lib/modules/date-range-picker/date-range-picker-start-date-resource-key.pipe.mjs +20 -0
  4. package/esm2020/lib/modules/date-range-picker/date-range-picker.component.mjs +262 -204
  5. package/esm2020/lib/modules/date-range-picker/date-range-picker.module.mjs +11 -3
  6. package/esm2020/lib/modules/date-range-picker/date-range.service.mjs +42 -38
  7. package/esm2020/lib/modules/date-range-picker/types/date-range-calculator-date-range-function.mjs +1 -1
  8. package/esm2020/lib/modules/date-range-picker/types/date-range-calculator-validate-function.mjs +1 -1
  9. package/esm2020/lib/modules/date-range-picker/types/date-range-calculator.mjs +15 -15
  10. package/esm2020/lib/modules/date-range-picker/types/date-range-default-calculator-configs.mjs +4 -2
  11. package/esm2020/lib/modules/date-range-picker/types/date-range.mjs +1 -1
  12. package/esm2020/lib/modules/datepicker/date-formatter.mjs +2 -2
  13. package/esm2020/lib/modules/datepicker/datepicker-adapter.service.mjs +7 -14
  14. package/esm2020/lib/modules/datepicker/datepicker-calendar-inner.component.mjs +43 -20
  15. package/esm2020/lib/modules/datepicker/datepicker-calendar.component.mjs +28 -35
  16. package/esm2020/lib/modules/datepicker/datepicker-config.service.mjs +1 -1
  17. package/esm2020/lib/modules/datepicker/datepicker-input-fuzzy.directive.mjs +223 -209
  18. package/esm2020/lib/modules/datepicker/datepicker-input.directive.mjs +212 -220
  19. package/esm2020/lib/modules/datepicker/datepicker.component.mjs +117 -138
  20. package/esm2020/lib/modules/datepicker/daypicker-button.component.mjs +3 -3
  21. package/esm2020/lib/modules/datepicker/daypicker-cell.component.mjs +61 -59
  22. package/esm2020/lib/modules/datepicker/daypicker.component.mjs +143 -137
  23. package/esm2020/lib/modules/datepicker/fuzzy-date.service.mjs +123 -132
  24. package/esm2020/lib/modules/datepicker/monthpicker.component.mjs +51 -49
  25. package/esm2020/lib/modules/datepicker/yearpicker.component.mjs +52 -50
  26. package/esm2020/lib/modules/timepicker/timepicker.component.mjs +104 -88
  27. package/esm2020/lib/modules/timepicker/timepicker.directive.mjs +105 -98
  28. package/fesm2015/skyux-datetime.mjs +1642 -1516
  29. package/fesm2015/skyux-datetime.mjs.map +1 -1
  30. package/fesm2020/skyux-datetime.mjs +1618 -1510
  31. package/fesm2020/skyux-datetime.mjs.map +1 -1
  32. package/lib/modules/date-range-picker/date-range-picker-end-date-resource-key.pipe.d.ts +8 -0
  33. package/lib/modules/date-range-picker/date-range-picker-start-date-resource-key.pipe.d.ts +8 -0
  34. package/lib/modules/date-range-picker/date-range-picker.component.d.ts +14 -43
  35. package/lib/modules/date-range-picker/date-range-picker.module.d.ts +9 -7
  36. package/lib/modules/date-range-picker/date-range.service.d.ts +1 -5
  37. package/lib/modules/date-range-picker/types/date-range-calculator-date-range-function.d.ts +1 -1
  38. package/lib/modules/date-range-picker/types/date-range-calculator-validate-function.d.ts +1 -1
  39. package/lib/modules/date-range-picker/types/date-range-calculator.d.ts +3 -8
  40. package/lib/modules/date-range-picker/types/date-range.d.ts +2 -2
  41. package/lib/modules/datepicker/date-formatter.d.ts +3 -3
  42. package/lib/modules/datepicker/datepicker-adapter.service.d.ts +1 -5
  43. package/lib/modules/datepicker/datepicker-calendar-inner.component.d.ts +18 -19
  44. package/lib/modules/datepicker/datepicker-calendar.component.d.ts +14 -25
  45. package/lib/modules/datepicker/datepicker-config.service.d.ts +3 -3
  46. package/lib/modules/datepicker/datepicker-input-fuzzy.directive.d.ts +17 -53
  47. package/lib/modules/datepicker/datepicker-input.directive.d.ts +13 -68
  48. package/lib/modules/datepicker/datepicker.component.d.ts +21 -58
  49. package/lib/modules/datepicker/daypicker-button.component.d.ts +1 -1
  50. package/lib/modules/datepicker/daypicker-cell.component.d.ts +3 -10
  51. package/lib/modules/datepicker/daypicker.component.d.ts +4 -16
  52. package/lib/modules/datepicker/fuzzy-date.service.d.ts +6 -30
  53. package/lib/modules/datepicker/monthpicker.component.d.ts +1 -4
  54. package/lib/modules/datepicker/yearpicker.component.d.ts +1 -3
  55. package/lib/modules/timepicker/timepicker.component.d.ts +14 -32
  56. package/lib/modules/timepicker/timepicker.directive.d.ts +9 -27
  57. package/package.json +8 -8
@@ -6,44 +6,32 @@ import { SkyDatepickerConfigService } from './datepicker-config.service';
6
6
  import { SkyDatepickerComponent } from './datepicker.component';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class SkyDatepickerInputDirective implements OnInit, OnDestroy, AfterViewInit, AfterContentInit, ControlValueAccessor, Validator {
9
- private adapter;
10
- private changeDetector;
11
- private configService;
12
- private elementRef;
13
- private localeProvider;
14
- private renderer;
15
- private resourcesService;
16
- private datepickerComponent;
9
+ #private;
17
10
  /**
18
11
  * Specifies the date format for the input. Place this attribute on the `input` element
19
12
  * to override the default in the `SkyDatepickerConfigService`.
20
13
  * @default "MM/DD/YYYY"
21
14
  */
22
- set dateFormat(value: string);
23
- get dateFormat(): string;
15
+ set dateFormat(value: string | undefined);
16
+ get dateFormat(): string | undefined;
24
17
  /**
25
18
  * Indicates whether to disable the datepicker.
26
19
  * @default false
27
20
  */
28
- set disabled(value: boolean);
21
+ set disabled(value: boolean | undefined);
29
22
  get disabled(): boolean;
30
- /**
31
- * @internal
32
- * Indicates if the input element or any of its children have focus.
33
- */
34
- get inputIsFocused(): boolean;
35
23
  /**
36
24
  * Specifies the latest date that is available in the calendar. Place this attribute on
37
25
  * the `input` element to override the default in `SkyDatepickerConfigService`.
38
26
  */
39
- set maxDate(value: Date);
40
- get maxDate(): Date;
27
+ set maxDate(value: Date | undefined);
28
+ get maxDate(): Date | undefined;
41
29
  /**
42
30
  * Specifies the earliest date that is available in the calendar. Place this attribute on
43
31
  * the `input` element to override the default in `SkyDatepickerConfigService`.
44
32
  */
45
- set minDate(value: Date);
46
- get minDate(): Date;
33
+ set minDate(value: Date | undefined);
34
+ get minDate(): Date | undefined;
47
35
  /**
48
36
  * Creates the datepicker input and calendar. Place this directive on an `input` element,
49
37
  * and wrap the input in a `sky-datepicker` component. The value that users select is driven
@@ -55,14 +43,14 @@ export declare class SkyDatepickerInputDirective implements OnInit, OnDestroy, A
55
43
  * Indicates whether to disable date validation on the datepicker input.
56
44
  * @default false
57
45
  */
58
- skyDatepickerNoValidate: boolean;
46
+ skyDatepickerNoValidate: boolean | undefined;
59
47
  /**
60
48
  * Specifies the starting day of the week in the calendar, where `0` sets the starting day
61
49
  * to Sunday. Place this attribute on the `input` element to override the default
62
50
  * in `SkyDatepickerConfigService`.
63
51
  * @default 0
64
52
  */
65
- set startingDay(value: number);
53
+ set startingDay(value: number | undefined);
66
54
  get startingDay(): number;
67
55
  /**
68
56
  * Indicates whether the format of the date value must match the format from the `dateFormat` value.
@@ -72,23 +60,9 @@ export declare class SkyDatepickerInputDirective implements OnInit, OnDestroy, A
72
60
  * it attempts to format the string based on the [ISO 8601 standard format](https://www.iso.org/iso-8601-date-and-time-format.html).
73
61
  * @default false
74
62
  */
75
- set strict(value: boolean);
63
+ set strict(value: boolean | undefined);
76
64
  get strict(): boolean;
77
- private get value();
78
- private set value(value);
79
- private control;
80
- private dateFormatter;
81
- private initialPlaceholder;
82
- private preferredShortDateFormat;
83
- private ngUnsubscribe;
84
- private _dateFormat;
85
- private _disabled;
86
- private _maxDate;
87
- private _minDate;
88
- private _startingDay;
89
- private _strict;
90
- private _value;
91
- constructor(adapter: SkyDatepickerAdapterService, changeDetector: ChangeDetectorRef, configService: SkyDatepickerConfigService, elementRef: ElementRef, localeProvider: SkyAppLocaleProvider, renderer: Renderer2, resourcesService: SkyLibResourcesService, datepickerComponent: SkyDatepickerComponent);
65
+ constructor(adapter: SkyDatepickerAdapterService, changeDetector: ChangeDetectorRef, configService: SkyDatepickerConfigService, elementRef: ElementRef, localeProvider: SkyAppLocaleProvider, renderer: Renderer2, resourcesService: SkyLibResourcesService, datepickerComponent?: SkyDatepickerComponent);
92
66
  ngOnInit(): void;
93
67
  ngAfterContentInit(): void;
94
68
  ngAfterViewInit(): void;
@@ -97,7 +71,7 @@ export declare class SkyDatepickerInputDirective implements OnInit, OnDestroy, A
97
71
  onInputBlur(): void;
98
72
  onInput(): void;
99
73
  writeValue(value: any): void;
100
- validate(control: AbstractControl): ValidationErrors;
74
+ validate(control: AbstractControl): ValidationErrors | null;
101
75
  registerOnChange(fn: (value: any) => void): void;
102
76
  registerOnTouched(fn: () => void): void;
103
77
  registerOnValidatorChange(fn: () => void): void;
@@ -107,35 +81,6 @@ export declare class SkyDatepickerInputDirective implements OnInit, OnDestroy, A
107
81
  * This is useful if you need to update the ngModel value before the input element loses focus.
108
82
  */
109
83
  detectInputValueChange(): void;
110
- private applyDateFormat;
111
- private onValueChange;
112
- private setInputElementValue;
113
- /**
114
- * Gets the date value from a value - if possible.
115
- * Will not convert unconvertable dates or numbers outside of the current month's number of days.
116
- * Returns `undefined` if the value can not be converted.
117
- */
118
- private getDateValue;
119
- /**
120
- * Converts a string to a date object if the string is a valid date string.
121
- * It will also convert numeric input to a date if that number is within the current month's number of days.
122
- * If the string can not be converted, `undefined` be returned.
123
- */
124
- private getShortcutOrDateValue;
125
- /**
126
- * Validates the input value to ensure it is formatted correctly.
127
- */
128
- private isDateStringValid;
129
- private onChange;
130
- private onTouched;
131
- private onValidatorChange;
132
- private updatePlaceholder;
133
- /**
134
- * Update the value of the form control and input element
135
- * @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.
136
- * 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.
137
- */
138
- private updateValue;
139
84
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyDatepickerInputDirective, [null, null, null, null, null, null, null, { optional: true; }]>;
140
85
  static ɵdir: i0.ɵɵDirectiveDeclaration<SkyDatepickerInputDirective, "[skyDatepickerInput]", never, { "dateFormat": "dateFormat"; "disabled": "disabled"; "maxDate": "maxDate"; "minDate": "minDate"; "skyDatepickerInput": "skyDatepickerInput"; "skyDatepickerNoValidate": "skyDatepickerNoValidate"; "startingDay": "startingDay"; "strict": "strict"; }, {}, never, never, false>;
141
86
  }
@@ -1,8 +1,9 @@
1
- import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
2
2
  import { SkyAffixService, SkyCoreAdapterService, SkyOverlayService } from '@skyux/core';
3
3
  import { SkyInputBoxHostService } from '@skyux/forms';
4
4
  import { SkyThemeService } from '@skyux/theme';
5
5
  import { SkyDatepickerCalendarChange } from './datepicker-calendar-change';
6
+ import { SkyDatepickerCalendarComponent } from './datepicker-calendar.component';
6
7
  import { SkyDatepickerCustomDate } from './datepicker-custom-date';
7
8
  import * as i0 from "@angular/core";
8
9
  /**
@@ -10,37 +11,17 @@ import * as i0 from "@angular/core";
10
11
  * You must wrap this component around an input with the `skyDatepickerInput` directive.
11
12
  */
12
13
  export declare class SkyDatepickerComponent implements OnDestroy, OnInit {
13
- private affixService;
14
- private changeDetector;
15
- private coreAdapter;
16
- private overlayService;
17
- inputBoxHostService?: SkyInputBoxHostService;
14
+ #private;
15
+ inputBoxHostService?: SkyInputBoxHostService | undefined;
18
16
  /**
19
17
  * Adds a class to the datepicker.
20
18
  * @default ""
21
19
  */
22
- pickerClass: string;
23
- /**
24
- * @internal
25
- * Indicates if the calendar button element or any of its children have focus.
26
- * @deprecated This property will be removed in the next major version release.
27
- */
28
- get buttonIsFocused(): boolean;
29
- /**
30
- * @internal
31
- * Indicates if the calendar element or any of its children have focus.
32
- * @deprecated This property will be removed in the next major version release.
33
- */
34
- get calendarIsFocused(): boolean;
35
- /**
36
- * @internal
37
- * Indicates if the calendar element's visiblity property is 'visible'.
38
- * @deprecated This property will be removed in the next major version release.
39
- */
40
- get calendarIsVisible(): boolean;
41
- get disabled(): boolean;
42
- set disabled(value: boolean);
43
- set selectedDate(value: Date);
20
+ pickerClass: string | undefined;
21
+ get disabled(): boolean | undefined;
22
+ set disabled(value: boolean | undefined);
23
+ set selectedDate(value: Date | undefined);
24
+ get selectedDate(): Date | undefined;
44
25
  /**
45
26
  * Fires when the range of displayed dates in the calendar changes. Provides the
46
27
  * current range of displayed dates and a mutable `customDate` property consumers can use
@@ -53,42 +34,24 @@ export declare class SkyDatepickerComponent implements OnDestroy, OnInit {
53
34
  isDaypickerWaiting: boolean;
54
35
  isOpen: boolean;
55
36
  isVisible: boolean;
56
- maxDate: Date;
57
- minDate: Date;
58
- startingDay: number;
37
+ maxDate: Date | undefined;
38
+ minDate: Date | undefined;
39
+ startingDay: number | undefined;
59
40
  triggerButtonId: string;
60
- private calendar;
61
- private set calendarRef(value);
62
- private get calendarRef();
63
- private calendarTemplateRef;
64
- private triggerButtonRef;
65
- private inputTemplateRef;
66
- private triggerButtonTemplateRef;
67
- private affixer;
68
- private calendarUnsubscribe;
69
- private customDatesSubscription;
70
- private ngUnsubscribe;
71
- private overlay;
72
- private overlayKeydownListner;
73
- private _calendarRef;
74
- private _disabled;
75
- private _selectedDate;
76
- constructor(affixService: SkyAffixService, changeDetector: ChangeDetectorRef, coreAdapter: SkyCoreAdapterService, overlayService: SkyOverlayService, inputBoxHostService?: SkyInputBoxHostService, themeSvc?: SkyThemeService);
41
+ calendar: SkyDatepickerCalendarComponent | undefined;
42
+ set calendarRef(value: ElementRef | undefined);
43
+ get calendarRef(): ElementRef | undefined;
44
+ calendarTemplateRef: TemplateRef<unknown> | undefined;
45
+ triggerButtonRef: ElementRef | undefined;
46
+ inputTemplateRef: TemplateRef<unknown> | undefined;
47
+ triggerButtonTemplateRef: TemplateRef<unknown> | undefined;
48
+ constructor(affixService: SkyAffixService, changeDetector: ChangeDetectorRef, coreAdapter: SkyCoreAdapterService, overlayService: SkyOverlayService, inputBoxHostService?: SkyInputBoxHostService | undefined, themeSvc?: SkyThemeService);
77
49
  ngOnInit(): void;
78
50
  ngOnDestroy(): void;
79
51
  onCalendarModeChange(): void;
80
52
  onSelectedDateChange(value: Date): void;
81
53
  onTriggerButtonClick(): void;
82
- onCalendarDateRangeChange(event: SkyDatepickerCalendarChange): void;
83
- private closePicker;
84
- private openPicker;
85
- private createAffixer;
86
- private destroyAffixer;
87
- private createOverlay;
88
- private destroyOverlay;
89
- private addKeydownListner;
90
- private removePickerEventListeners;
91
- private cancelCustomDatesSubscription;
54
+ onCalendarDateRangeChange(event?: SkyDatepickerCalendarChange): void;
92
55
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyDatepickerComponent, [null, null, null, null, { optional: true; }, { optional: true; }]>;
93
56
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyDatepickerComponent, "sky-datepicker", never, { "pickerClass": "pickerClass"; }, { "calendarDateRangeChange": "calendarDateRangeChange"; }, never, ["*"], false>;
94
57
  }
@@ -9,7 +9,7 @@ export declare class SkyDayPickerButtonComponent {
9
9
  /**
10
10
  * Specifies the date this picker button will represent on the calendar.
11
11
  */
12
- date: SkyDatepickerDate;
12
+ date: SkyDatepickerDate | undefined;
13
13
  constructor(datepicker: SkyDatepickerCalendarInnerComponent);
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyDayPickerButtonComponent, never>;
15
15
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyDayPickerButtonComponent, "sky-daypicker-button", never, { "date": "date"; }, {}, never, never, false>;
@@ -9,22 +9,17 @@ import * as i0 from "@angular/core";
9
9
  * @internal
10
10
  */
11
11
  export declare class SkyDayPickerCellComponent implements OnInit, OnDestroy {
12
- private datepicker;
13
- private datepickerService;
12
+ #private;
14
13
  /**
15
14
  * Specifies if the active date has been changed.
16
15
  */
17
- activeDateHasChanged: boolean;
16
+ activeDateHasChanged: boolean | undefined;
18
17
  /**
19
18
  * Specifies the date this picker cell will represent on the calendar.
20
19
  */
21
- date: SkyDatepickerDate;
20
+ date: SkyDatepickerDate | undefined;
22
21
  hasTooltip: boolean;
23
22
  popoverController: Subject<SkyPopoverMessage>;
24
- private activeUid;
25
- private cancelPopover;
26
- private popoverOpen;
27
- private ngUnsubscribe;
28
23
  constructor(datepicker: SkyDatepickerCalendarInnerComponent, datepickerService: SkyDatepickerService);
29
24
  ngOnInit(): void;
30
25
  ngOnDestroy(): void;
@@ -33,8 +28,6 @@ export declare class SkyDayPickerCellComponent implements OnInit, OnDestroy {
33
28
  onPopoverClosed(): void;
34
29
  onPopoverOpened(): void;
35
30
  getKeyDateLabel(): string;
36
- private hideTooltip;
37
- private showTooltip;
38
31
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyDayPickerCellComponent, never>;
39
32
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyDayPickerCellComponent, "sky-daypicker-cell", never, { "activeDateHasChanged": "activeDateHasChanged"; "date": "date"; }, {}, never, never, false>;
40
33
  }
@@ -8,9 +8,10 @@ import * as i0 from "@angular/core";
8
8
  * @internal
9
9
  */
10
10
  export declare class SkyDayPickerComponent implements OnDestroy, OnInit {
11
- set customDates(value: SkyDatepickerCustomDate[]);
12
- calendarDateRangeChange: EventEmitter<SkyDatepickerCalendarChange>;
13
- isWaiting: boolean;
11
+ #private;
12
+ set customDates(value: SkyDatepickerCustomDate[] | undefined);
13
+ calendarDateRangeChange: EventEmitter<SkyDatepickerCalendarChange | undefined>;
14
+ isWaiting: boolean | undefined;
14
15
  activeDateHasChanged: boolean;
15
16
  labels: any[];
16
17
  title: string;
@@ -18,23 +19,10 @@ export declare class SkyDayPickerComponent implements OnDestroy, OnInit {
18
19
  weekNumbers: number[];
19
20
  datepicker: SkyDatepickerCalendarInnerComponent;
20
21
  CURRENT_THEME_TEMPLATE: any;
21
- private daysInMonth;
22
- private initialDate;
23
- private ngUnsubscribe;
24
22
  constructor(datepicker: SkyDatepickerCalendarInnerComponent);
25
23
  ngOnInit(): void;
26
24
  ngOnDestroy(): void;
27
25
  protected getDates(startDate: Date, n: number): Date[];
28
- private compareDays;
29
- private refreshDayView;
30
- private keydownDays;
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;
38
26
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyDayPickerComponent, never>;
39
27
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyDayPickerComponent, "sky-daypicker", never, { "customDates": "customDates"; "isWaiting": "isWaiting"; }, { "calendarDateRangeChange": "calendarDateRangeChange"; }, never, never, false>;
40
28
  }
@@ -15,9 +15,7 @@ interface SkyFuzzyDateRange {
15
15
  * @internal
16
16
  */
17
17
  export declare class SkyFuzzyDateService implements OnDestroy {
18
- private localeProvider;
19
- private currentLocale;
20
- private ngUnsubscribe;
18
+ #private;
21
19
  constructor(localeProvider: SkyAppLocaleProvider);
22
20
  ngOnDestroy(): void;
23
21
  /**
@@ -33,43 +31,21 @@ export declare class SkyFuzzyDateService implements OnDestroy {
33
31
  * Formats a fuzzy date by using the provided format and locale strings.
34
32
  * If not provided, the locale will be taken from the browser's default locale.
35
33
  */
36
- format(fuzzyDate: SkyFuzzyDate, format: string, locale?: string): string;
34
+ format(fuzzyDate: SkyFuzzyDate, format?: string, locale?: string): string;
37
35
  /**
38
36
  * If not provided, years will default to current year; months will default to January;
39
37
  * days will default to 1st of the month.
40
38
  */
41
- getMomentFromFuzzyDate(fuzzyDate: SkyFuzzyDate): any;
39
+ getMomentFromFuzzyDate(fuzzyDate?: SkyFuzzyDate): any;
42
40
  /**
43
41
  * Gets a string instance of a fuzzy date.
44
42
  * @deprecated Deprecated in favor of the `format` function.
45
43
  */
46
- getStringFromFuzzyDate(fuzzyDate: SkyFuzzyDate, dateFormat: string): string;
47
- getFuzzyDateFromSelectedDate(selectedDate: Date, dateFormat: string): SkyFuzzyDate;
48
- getFuzzyDateFromString(date: string, dateFormat: string): SkyFuzzyDate;
44
+ getStringFromFuzzyDate(fuzzyDate?: SkyFuzzyDate, dateFormat?: string): string | undefined;
45
+ getFuzzyDateFromSelectedDate(selectedDate?: Date, dateFormat?: string): SkyFuzzyDate | undefined;
46
+ getFuzzyDateFromString(date: string, dateFormat?: string): SkyFuzzyDate | undefined;
49
47
  getFuzzyDateRange(startFuzzyDate: SkyFuzzyDate, endFuzzyDate: SkyFuzzyDate): SkyFuzzyDateRange;
50
48
  getCurrentFuzzyDate(): SkyFuzzyDate;
51
- private getMostRecentLeapYear;
52
- /**
53
- * Returns the first separator found in the provided date format string.
54
- * Accepted separators: ['/', '.', '-', ' '].
55
- * @param dateFormat
56
- */
57
- private getDateSeparator;
58
- private get4DigitYearFromDateString;
59
- private isLeapYear;
60
- private getMonthNumber;
61
- private getDefaultYear;
62
- private getDateComponents;
63
- private getDateFormatIndexes;
64
- private getDateValueIndexes;
65
- /**
66
- * Validates the provided SkyFuzzyDate object. Valid fuzzy dates are as follows:
67
- * month, day, year
68
- * month, year
69
- * month, day
70
- * year only
71
- */
72
- private isFuzzyDateValid;
73
49
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyFuzzyDateService, never>;
74
50
  static ɵprov: i0.ɵɵInjectableDeclaration<SkyFuzzyDateService>;
75
51
  }
@@ -6,15 +6,12 @@ import * as i0 from "@angular/core";
6
6
  * @internal
7
7
  */
8
8
  export declare class SkyMonthPickerComponent implements OnInit {
9
+ #private;
9
10
  datepicker: SkyDatepickerCalendarInnerComponent;
10
- maxMode: string;
11
11
  rows: Array<Array<SkyDatepickerDate>>;
12
12
  title: string;
13
13
  constructor(datepicker: SkyDatepickerCalendarInnerComponent);
14
14
  ngOnInit(): void;
15
- private compareMonth;
16
- private refreshMonthView;
17
- private keydownMonths;
18
15
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyMonthPickerComponent, never>;
19
16
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyMonthPickerComponent, "sky-monthpicker", never, {}, {}, never, never, false>;
20
17
  }
@@ -6,15 +6,13 @@ import * as i0 from "@angular/core";
6
6
  * @internal
7
7
  */
8
8
  export declare class SkyYearPickerComponent implements OnInit {
9
+ #private;
9
10
  datepicker: SkyDatepickerCalendarInnerComponent;
10
11
  rows: Array<Array<SkyDatepickerDate>>;
11
12
  title: string;
12
13
  constructor(datepicker: SkyDatepickerCalendarInnerComponent);
13
14
  ngOnInit(): void;
14
15
  protected getStartingYear(year: number): number;
15
- private compareYears;
16
- private refreshYearView;
17
- private keydownYears;
18
16
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyYearPickerComponent, never>;
19
17
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyYearPickerComponent, "sky-yearpicker", never, {}, {}, never, never, false>;
20
18
  }
@@ -1,4 +1,4 @@
1
- import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
2
2
  import { SkyAffixService, SkyCoreAdapterService, SkyOverlayService } from '@skyux/core';
3
3
  import { SkyInputBoxHostService } from '@skyux/forms';
4
4
  import { SkyThemeService } from '@skyux/theme';
@@ -11,11 +11,8 @@ import * as i0 from "@angular/core";
11
11
  * with the `skyTimepickerInput` directive.
12
12
  */
13
13
  export declare class SkyTimepickerComponent implements OnInit, OnDestroy {
14
- private affixService;
15
- private changeDetector;
16
- private coreAdapter;
17
- private overlayService;
18
- inputBoxHostService?: SkyInputBoxHostService;
14
+ #private;
15
+ inputBoxHostService?: SkyInputBoxHostService | undefined;
19
16
  /**
20
17
  * Fires when the value in the timepicker input changes.
21
18
  */
@@ -28,8 +25,8 @@ export declare class SkyTimepickerComponent implements OnInit, OnDestroy {
28
25
  get selectedMeridies(): string;
29
26
  set selectedMinute(minute: number);
30
27
  get selectedMinute(): number;
31
- set selectedTime(newTime: SkyTimepickerTimeOutput);
32
- get selectedTime(): SkyTimepickerTimeOutput;
28
+ set selectedTime(newTime: SkyTimepickerTimeOutput | undefined);
29
+ get selectedTime(): SkyTimepickerTimeOutput | undefined;
33
30
  activeTime: Date;
34
31
  hours: Array<number>;
35
32
  is8601: boolean;
@@ -37,39 +34,24 @@ export declare class SkyTimepickerComponent implements OnInit, OnDestroy {
37
34
  isVisible: boolean;
38
35
  localeFormat: string;
39
36
  minutes: Array<number>;
40
- minuteMultiplier: number;
41
- returnFormat: string;
37
+ minuteMultiplier: number | undefined;
38
+ returnFormat: string | undefined;
42
39
  timeFormat: string;
43
40
  timepickerId: string;
44
41
  triggerButtonId: string;
45
- private set timepickerRef(value);
46
- private get timepickerRef();
47
- private timepickerTemplateRef;
48
- private triggerButtonRef;
49
- private inputTemplateRef;
50
- private triggerButtonTemplateRef;
51
- private affixer;
52
- private timepickerUnsubscribe;
53
- private ngUnsubscribe;
54
- private overlay;
55
- private overlayKeydownListner;
56
- private _disabled;
57
- private _timepickerRef;
58
- constructor(affixService: SkyAffixService, changeDetector: ChangeDetectorRef, coreAdapter: SkyCoreAdapterService, overlayService: SkyOverlayService, inputBoxHostService?: SkyInputBoxHostService, themeSvc?: SkyThemeService);
42
+ set timepickerRef(value: ElementRef | undefined);
43
+ get timepickerRef(): ElementRef | undefined;
44
+ timepickerTemplateRef: TemplateRef<unknown> | undefined;
45
+ triggerButtonRef: ElementRef | undefined;
46
+ inputTemplateRef: TemplateRef<unknown> | undefined;
47
+ triggerButtonTemplateRef: TemplateRef<unknown> | undefined;
48
+ constructor(affixService: SkyAffixService, changeDetector: ChangeDetectorRef, coreAdapter: SkyCoreAdapterService, overlayService: SkyOverlayService, inputBoxHostService?: SkyInputBoxHostService | undefined, themeSvc?: SkyThemeService);
59
49
  ngOnInit(): void;
60
50
  ngOnDestroy(): void;
61
51
  setFormat(format: string): void;
62
52
  onCloseButtonCick(): void;
63
53
  setTime(event: any): void;
64
54
  onTriggerButtonClick(): void;
65
- private closePicker;
66
- private openPicker;
67
- private createAffixer;
68
- private destroyAffixer;
69
- private createOverlay;
70
- private destroyOverlay;
71
- private addKeydownListner;
72
- private removePickerEventListeners;
73
55
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyTimepickerComponent, [null, null, null, null, { optional: true; }, { optional: true; }]>;
74
56
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyTimepickerComponent, "sky-timepicker", never, {}, { "selectedTimeChanged": "selectedTimeChanged"; }, never, ["*"], false>;
75
57
  }
@@ -1,47 +1,37 @@
1
1
  import { AfterContentInit, ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, OnInit, Renderer2 } from '@angular/core';
2
- import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
2
+ import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
3
3
  import { SkyLibResourcesService } from '@skyux/i18n';
4
4
  import { Subscription } from 'rxjs';
5
5
  import { SkyTimepickerComponent } from './timepicker.component';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class SkyTimepickerInputDirective implements OnInit, OnDestroy, ControlValueAccessor, Validator, OnChanges, AfterContentInit {
8
- private renderer;
9
- private elRef;
10
- private resourcesService;
11
- private changeDetector;
12
- pickerChangedSubscription: Subscription;
13
- private _timeFormat;
8
+ #private;
9
+ pickerChangedSubscription: Subscription | undefined;
14
10
  /**
15
11
  * Creates the timepicker input field and picker. Place this attribute on an `input` element,
16
12
  * and wrap the input in a `sky-timepicker` component.
17
13
  * This attribute must be set to the instance of the `sky-timepicker`.
18
14
  * @required
19
15
  */
20
- get skyTimepickerInput(): SkyTimepickerComponent;
21
- set skyTimepickerInput(value: SkyTimepickerComponent);
16
+ get skyTimepickerInput(): SkyTimepickerComponent | undefined;
17
+ set skyTimepickerInput(value: SkyTimepickerComponent | undefined);
22
18
  /**
23
19
  * Specifies the 12-hour `hh` or 24-hour `HH` time format for the input.
24
20
  * @default "hh"
25
21
  */
26
- set timeFormat(value: string);
22
+ set timeFormat(value: string | undefined);
27
23
  get timeFormat(): string;
28
24
  /**
29
25
  * Specifies a custom time format. For examples,
30
26
  * see the [moment.js](https://momentjs.com/docs/#/displaying/format/) docs.
31
27
  */
32
- returnFormat: string;
28
+ returnFormat: string | undefined;
33
29
  /**
34
30
  * Indicates whether to disable the timepicker.
35
31
  * @default false
36
32
  */
37
33
  get disabled(): boolean;
38
- set disabled(value: boolean);
39
- private get modelValue();
40
- private set modelValue(value);
41
- private control;
42
- private _disabled;
43
- private _modelValue;
44
- private _skyTimepickerInput;
34
+ set disabled(value: boolean | undefined);
45
35
  constructor(renderer: Renderer2, elRef: ElementRef, resourcesService: SkyLibResourcesService, changeDetector: ChangeDetectorRef);
46
36
  ngOnInit(): void;
47
37
  ngAfterContentInit(): void;
@@ -54,15 +44,7 @@ export declare class SkyTimepickerInputDirective implements OnInit, OnDestroy, C
54
44
  registerOnValidatorChange(fn: () => void): void;
55
45
  setDisabledState(isDisabled: boolean): void;
56
46
  writeValue(value: any): void;
57
- validate(control: AbstractControl): {
58
- [key: string]: any;
59
- };
60
- private setInputValue;
61
- private formatter;
62
- private updateTimepickerInput;
63
- private _onChange;
64
- private _onTouched;
65
- private _validatorChange;
47
+ validate(control: AbstractControl): ValidationErrors | null;
66
48
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyTimepickerInputDirective, never>;
67
49
  static ɵdir: i0.ɵɵDirectiveDeclaration<SkyTimepickerInputDirective, "[skyTimepickerInput]", never, { "skyTimepickerInput": "skyTimepickerInput"; "timeFormat": "timeFormat"; "returnFormat": "returnFormat"; "disabled": "disabled"; }, {}, never, never, false>;
68
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/datetime",
3
- "version": "7.0.0-beta.11",
3
+ "version": "7.0.0-beta.13",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -44,13 +44,13 @@
44
44
  "@angular/core": "^14.2.0",
45
45
  "@angular/forms": "^14.2.0",
46
46
  "@angular/platform-browser": "^14.2.0",
47
- "@skyux-sdk/testing": "7.0.0-beta.11",
48
- "@skyux/core": "7.0.0-beta.11",
49
- "@skyux/forms": "7.0.0-beta.11",
50
- "@skyux/i18n": "7.0.0-beta.11",
51
- "@skyux/indicators": "7.0.0-beta.11",
52
- "@skyux/popovers": "7.0.0-beta.11",
53
- "@skyux/theme": "7.0.0-beta.11",
47
+ "@skyux-sdk/testing": "7.0.0-beta.13",
48
+ "@skyux/core": "7.0.0-beta.13",
49
+ "@skyux/forms": "7.0.0-beta.13",
50
+ "@skyux/i18n": "7.0.0-beta.13",
51
+ "@skyux/indicators": "7.0.0-beta.13",
52
+ "@skyux/popovers": "7.0.0-beta.13",
53
+ "@skyux/theme": "7.0.0-beta.13",
54
54
  "moment": "^2.29.4"
55
55
  },
56
56
  "dependencies": {