@skyux/datetime 10.19.0 → 10.20.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.
@@ -1,25 +1,25 @@
1
1
  import * as i2 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { NgModule, inject, Injectable, Pipe, EventEmitter, Component, ViewEncapsulation, Input, Output, ChangeDetectionStrategy, ViewChild, EnvironmentInjector, ElementRef, TemplateRef, Optional, Inject, forwardRef, Directive, HostListener, booleanAttribute, HostBinding } from '@angular/core';
5
- import * as i3 from '@skyux/i18n';
4
+ import { NgModule, inject, Injectable, Pipe, EventEmitter, Component, ViewEncapsulation, Input, Output, ChangeDetectionStrategy, ViewChild, EnvironmentInjector, ElementRef, TemplateRef, Optional, Inject, forwardRef, Directive, HostListener, ChangeDetectorRef, Injector, booleanAttribute, HostBinding } from '@angular/core';
5
+ import * as i1 from '@skyux/i18n';
6
6
  import { SkyLibResourcesService, getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS, SkyAppLocaleProvider, SkyIntlDateFormatter } from '@skyux/i18n';
7
- import { Subject, takeUntil as takeUntil$1, fromEvent, BehaviorSubject, forkJoin, combineLatest } from 'rxjs';
7
+ import { Subject, takeUntil as takeUntil$1, fromEvent, BehaviorSubject, forkJoin, distinctUntilChanged as distinctUntilChanged$1, merge } from 'rxjs';
8
8
  import { takeUntil, debounceTime, distinctUntilChanged, first, map } from 'rxjs/operators';
9
9
  import moment from 'moment';
10
10
  import * as i2$3 from '@angular/forms';
11
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
12
- import * as i1 from '@skyux/core';
13
- import { SkyLiveAnnouncerService, SkyAppFormat, SkyAffixAutoFitContext, SKY_STACKING_CONTEXT, SkyAffixModule, SkyIdModule } from '@skyux/core';
11
+ import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, FormBuilder, FormControl, NgControl, Validators, ReactiveFormsModule } from '@angular/forms';
14
12
  import * as i2$2 from '@skyux/forms';
15
13
  import { SkyFormFieldLabelTextRequiredService, SkyInputBoxModule } from '@skyux/forms';
16
14
  import * as i4$1 from '@angular/cdk/a11y';
17
15
  import { A11yModule } from '@angular/cdk/a11y';
16
+ import * as i1$1 from '@skyux/core';
17
+ import { SkyLiveAnnouncerService, SkyAppFormat, SkyAffixAutoFitContext, SKY_STACKING_CONTEXT, SkyAffixModule } from '@skyux/core';
18
18
  import * as i2$1 from '@skyux/indicators';
19
19
  import { SkyIconModule, SkyWaitModule } from '@skyux/indicators';
20
20
  import * as i4 from '@skyux/popovers';
21
21
  import { SkyPopoverMessageType, SkyPopoverModule } from '@skyux/popovers';
22
- import * as i3$1 from '@skyux/theme';
22
+ import * as i3 from '@skyux/theme';
23
23
  import { SkyThemeModule } from '@skyux/theme';
24
24
 
25
25
  /* istanbul ignore file */
@@ -691,7 +691,7 @@ class SkyFuzzyDateService {
691
691
  }
692
692
  return true;
693
693
  }
694
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyFuzzyDateService, deps: [{ token: i3.SkyAppLocaleProvider }], target: i0.ɵɵFactoryTarget.Injectable }); }
694
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyFuzzyDateService, deps: [{ token: i1.SkyAppLocaleProvider }], target: i0.ɵɵFactoryTarget.Injectable }); }
695
695
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyFuzzyDateService, providedIn: 'root' }); }
696
696
  }
697
697
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyFuzzyDateService, decorators: [{
@@ -699,7 +699,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
699
699
  args: [{
700
700
  providedIn: 'root',
701
701
  }]
702
- }], ctorParameters: () => [{ type: i3.SkyAppLocaleProvider }] });
702
+ }], ctorParameters: () => [{ type: i1.SkyAppLocaleProvider }] });
703
703
 
704
704
  /**
705
705
  * Formats date values using two or more date tokens that represent the day, month,
@@ -2148,15 +2148,15 @@ class SkyDatepickerComponent {
2148
2148
  }
2149
2149
  }
2150
2150
  }
2151
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDatepickerComponent, deps: [{ token: i1.SkyAffixService }, { token: i0.ChangeDetectorRef }, { token: i1.SkyCoreAdapterService }, { token: i1.SkyOverlayService }, { token: i2$2.SkyInputBoxHostService, optional: true }, { token: i3$1.SkyThemeService, optional: true }, { token: SKY_STACKING_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
2152
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: SkyDatepickerComponent, selector: "sky-datepicker", inputs: { pickerClass: "pickerClass" }, outputs: { calendarDateRangeChange: "calendarDateRangeChange", dateFormatChange: "dateFormatChange", openChange: "openChange" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: SkyDatepickerCalendarComponent, descendants: true }, { propertyName: "calendarRef", first: true, predicate: ["calendarRef"], descendants: true, read: ElementRef }, { propertyName: "calendarTemplateRef", first: true, predicate: ["calendarTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "triggerButtonRef", first: true, predicate: ["triggerButtonRef"], descendants: true, read: ElementRef }, { propertyName: "inputTemplateRef", first: true, predicate: ["inputTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "triggerButtonTemplateRef", first: true, predicate: ["triggerButtonTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<div class=\"sky-datepicker\">\n <ng-container *ngIf=\"!inputBoxHostService\">\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n <ng-container *ngTemplateOutlet=\"triggerButtonTemplateRef\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #inputTemplateRef>\n <ng-content />\n</ng-template>\n\n<ng-template #triggerButtonTemplateRef>\n <div class=\"sky-input-group-btn\">\n <button\n aria-haspopup=\"dialog\"\n class=\"sky-btn sky-btn-default sky-input-group-datepicker-btn\"\n type=\"button\"\n [attr.aria-controls]=\"isOpen ? calendarId : null\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-label]=\"\n inputBoxHostService?.labelText\n ? ('skyux_datepicker_trigger_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_datepicker_trigger_button_label' | skyLibResources)\n \"\n [attr.id]=\"triggerButtonId\"\n [attr.title]=\"\n inputBoxHostService?.labelText\n ? ('skyux_datepicker_trigger_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_datepicker_trigger_button_label' | skyLibResources)\n \"\n [disabled]=\"disabled\"\n (click)=\"onTriggerButtonClick()\"\n #triggerButtonRef\n >\n <sky-icon icon=\"calendar\" size=\"lg\" />\n </button>\n </div>\n</ng-template>\n\n<ng-template #calendarTemplateRef>\n <div\n class=\"sky-datepicker-calendar-container sky-shadow sky-elevation-4\"\n role=\"dialog\"\n [attr.aria-labelledby]=\"triggerButtonId\"\n [attr.id]=\"calendarId\"\n [class.sky-datepicker-hidden]=\"!isVisible\"\n #calendarRef\n >\n <sky-datepicker-calendar\n cdkTrapFocus\n [customDates]=\"customDates\"\n [isDaypickerWaiting]=\"isDaypickerWaiting\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [startAtDate]=\"startAtDate\"\n [startingDay]=\"startingDay\"\n (calendarDateRangeChange)=\"onCalendarDateRangeChange($event)\"\n (calendarModeChange)=\"onCalendarModeChange()\"\n (selectedDateChange)=\"onSelectedDateChange($event)\"\n >\n </sky-datepicker-calendar>\n </div>\n</ng-template>\n", styles: [".sky-datepicker-calendar-container{position:fixed;border-radius:5px}.sky-datepicker-hidden{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: i4$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "component", type: SkyDatepickerCalendarComponent, selector: "sky-datepicker-calendar", inputs: ["customDates", "isDaypickerWaiting", "minDate", "maxDate", "startAtDate", "selectedDate", "startingDay"], outputs: ["calendarDateRangeChange", "calendarModeChange", "selectedDateChange"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2151
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDatepickerComponent, deps: [{ token: i1$1.SkyAffixService }, { token: i0.ChangeDetectorRef }, { token: i1$1.SkyCoreAdapterService }, { token: i1$1.SkyOverlayService }, { token: i2$2.SkyInputBoxHostService, optional: true }, { token: i3.SkyThemeService, optional: true }, { token: SKY_STACKING_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
2152
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: SkyDatepickerComponent, selector: "sky-datepicker", inputs: { pickerClass: "pickerClass" }, outputs: { calendarDateRangeChange: "calendarDateRangeChange", dateFormatChange: "dateFormatChange", openChange: "openChange" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: SkyDatepickerCalendarComponent, descendants: true }, { propertyName: "calendarRef", first: true, predicate: ["calendarRef"], descendants: true, read: ElementRef }, { propertyName: "calendarTemplateRef", first: true, predicate: ["calendarTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "triggerButtonRef", first: true, predicate: ["triggerButtonRef"], descendants: true, read: ElementRef }, { propertyName: "inputTemplateRef", first: true, predicate: ["inputTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "triggerButtonTemplateRef", first: true, predicate: ["triggerButtonTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<div class=\"sky-datepicker\">\n <ng-container *ngIf=\"!inputBoxHostService\">\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n <ng-container *ngTemplateOutlet=\"triggerButtonTemplateRef\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #inputTemplateRef>\n <ng-content />\n</ng-template>\n\n<ng-template #triggerButtonTemplateRef>\n <div class=\"sky-input-group-btn\">\n <button\n aria-haspopup=\"dialog\"\n class=\"sky-btn sky-btn-default sky-input-group-datepicker-btn\"\n type=\"button\"\n [attr.aria-controls]=\"isOpen ? calendarId : null\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-label]=\"\n inputBoxHostService?.labelText\n ? ('skyux_datepicker_trigger_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_datepicker_trigger_button_label' | skyLibResources)\n \"\n [attr.id]=\"triggerButtonId\"\n [attr.title]=\"\n inputBoxHostService?.labelText\n ? ('skyux_datepicker_trigger_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_datepicker_trigger_button_label' | skyLibResources)\n \"\n [disabled]=\"disabled\"\n (click)=\"onTriggerButtonClick()\"\n #triggerButtonRef\n >\n <sky-icon icon=\"calendar\" size=\"lg\" />\n </button>\n </div>\n</ng-template>\n\n<ng-template #calendarTemplateRef>\n <div\n class=\"sky-datepicker-calendar-container sky-shadow sky-elevation-4\"\n role=\"dialog\"\n [attr.aria-labelledby]=\"triggerButtonId\"\n [attr.id]=\"calendarId\"\n [class.sky-datepicker-hidden]=\"!isVisible\"\n #calendarRef\n >\n <sky-datepicker-calendar\n cdkTrapFocus\n [customDates]=\"customDates\"\n [isDaypickerWaiting]=\"isDaypickerWaiting\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [startAtDate]=\"startAtDate\"\n [startingDay]=\"startingDay\"\n (calendarDateRangeChange)=\"onCalendarDateRangeChange($event)\"\n (calendarModeChange)=\"onCalendarModeChange()\"\n (selectedDateChange)=\"onSelectedDateChange($event)\"\n >\n </sky-datepicker-calendar>\n </div>\n</ng-template>\n", styles: [".sky-datepicker-calendar-container{position:fixed;border-radius:5px}.sky-datepicker-hidden{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: i4$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "component", type: SkyDatepickerCalendarComponent, selector: "sky-datepicker-calendar", inputs: ["customDates", "isDaypickerWaiting", "minDate", "maxDate", "startAtDate", "selectedDate", "startingDay"], outputs: ["calendarDateRangeChange", "calendarModeChange", "selectedDateChange"] }, { kind: "pipe", type: i1.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2153
2153
  }
2154
2154
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDatepickerComponent, decorators: [{
2155
2155
  type: Component,
2156
2156
  args: [{ selector: 'sky-datepicker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-datepicker\">\n <ng-container *ngIf=\"!inputBoxHostService\">\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n <ng-container *ngTemplateOutlet=\"triggerButtonTemplateRef\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #inputTemplateRef>\n <ng-content />\n</ng-template>\n\n<ng-template #triggerButtonTemplateRef>\n <div class=\"sky-input-group-btn\">\n <button\n aria-haspopup=\"dialog\"\n class=\"sky-btn sky-btn-default sky-input-group-datepicker-btn\"\n type=\"button\"\n [attr.aria-controls]=\"isOpen ? calendarId : null\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-label]=\"\n inputBoxHostService?.labelText\n ? ('skyux_datepicker_trigger_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_datepicker_trigger_button_label' | skyLibResources)\n \"\n [attr.id]=\"triggerButtonId\"\n [attr.title]=\"\n inputBoxHostService?.labelText\n ? ('skyux_datepicker_trigger_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_datepicker_trigger_button_label' | skyLibResources)\n \"\n [disabled]=\"disabled\"\n (click)=\"onTriggerButtonClick()\"\n #triggerButtonRef\n >\n <sky-icon icon=\"calendar\" size=\"lg\" />\n </button>\n </div>\n</ng-template>\n\n<ng-template #calendarTemplateRef>\n <div\n class=\"sky-datepicker-calendar-container sky-shadow sky-elevation-4\"\n role=\"dialog\"\n [attr.aria-labelledby]=\"triggerButtonId\"\n [attr.id]=\"calendarId\"\n [class.sky-datepicker-hidden]=\"!isVisible\"\n #calendarRef\n >\n <sky-datepicker-calendar\n cdkTrapFocus\n [customDates]=\"customDates\"\n [isDaypickerWaiting]=\"isDaypickerWaiting\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [startAtDate]=\"startAtDate\"\n [startingDay]=\"startingDay\"\n (calendarDateRangeChange)=\"onCalendarDateRangeChange($event)\"\n (calendarModeChange)=\"onCalendarModeChange()\"\n (selectedDateChange)=\"onSelectedDateChange($event)\"\n >\n </sky-datepicker-calendar>\n </div>\n</ng-template>\n", styles: [".sky-datepicker-calendar-container{position:fixed;border-radius:5px}.sky-datepicker-hidden{visibility:hidden}\n"] }]
2157
- }], ctorParameters: () => [{ type: i1.SkyAffixService }, { type: i0.ChangeDetectorRef }, { type: i1.SkyCoreAdapterService }, { type: i1.SkyOverlayService }, { type: i2$2.SkyInputBoxHostService, decorators: [{
2157
+ }], ctorParameters: () => [{ type: i1$1.SkyAffixService }, { type: i0.ChangeDetectorRef }, { type: i1$1.SkyCoreAdapterService }, { type: i1$1.SkyOverlayService }, { type: i2$2.SkyInputBoxHostService, decorators: [{
2158
2158
  type: Optional
2159
- }] }, { type: i3$1.SkyThemeService, decorators: [{
2159
+ }] }, { type: i3.SkyThemeService, decorators: [{
2160
2160
  type: Optional
2161
2161
  }] }, { type: undefined, decorators: [{
2162
2162
  type: Optional
@@ -2648,7 +2648,7 @@ class SkyFuzzyDatepickerInputDirective {
2648
2648
  }
2649
2649
  this.#setInputElementValue(formattedDate || '');
2650
2650
  }
2651
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyFuzzyDatepickerInputDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyDatepickerConfigService }, { token: i0.ElementRef }, { token: SkyFuzzyDateService }, { token: i3.SkyAppLocaleProvider }, { token: i0.Renderer2 }, { token: SkyDatepickerComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2651
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyFuzzyDatepickerInputDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyDatepickerConfigService }, { token: i0.ElementRef }, { token: SkyFuzzyDateService }, { token: i1.SkyAppLocaleProvider }, { token: i0.Renderer2 }, { token: SkyDatepickerComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2652
2652
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: SkyFuzzyDatepickerInputDirective, selector: "[skyFuzzyDatepickerInput]", inputs: { dateFormat: "dateFormat", disabled: "disabled", futureDisabled: "futureDisabled", maxDate: "maxDate", minDate: "minDate", startAtDate: "startAtDate", skyDatepickerNoValidate: "skyDatepickerNoValidate", startingDay: "startingDay", yearRequired: "yearRequired" }, host: { listeners: { "change": "onInputChange($event)", "blur": "onInputBlur()", "input": "onInput()" } }, providers: [
2653
2653
  SKY_FUZZY_DATEPICKER_VALUE_ACCESSOR,
2654
2654
  SKY_FUZZY_DATEPICKER_VALIDATOR,
@@ -2663,7 +2663,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
2663
2663
  SKY_FUZZY_DATEPICKER_VALIDATOR,
2664
2664
  ],
2665
2665
  }]
2666
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyDatepickerConfigService }, { type: i0.ElementRef }, { type: SkyFuzzyDateService }, { type: i3.SkyAppLocaleProvider }, { type: i0.Renderer2 }, { type: SkyDatepickerComponent, decorators: [{
2666
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyDatepickerConfigService }, { type: i0.ElementRef }, { type: SkyFuzzyDateService }, { type: i1.SkyAppLocaleProvider }, { type: i0.Renderer2 }, { type: SkyDatepickerComponent, decorators: [{
2667
2667
  type: Optional
2668
2668
  }] }], propDecorators: { dateFormat: [{
2669
2669
  type: Input
@@ -3161,7 +3161,7 @@ class SkyDatepickerInputDirective {
3161
3161
  }
3162
3162
  }
3163
3163
  }
3164
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDatepickerInputDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyDatepickerConfigService }, { token: i0.ElementRef }, { token: i3.SkyAppLocaleProvider }, { token: i0.Renderer2 }, { token: SkyDatepickerComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3164
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDatepickerInputDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyDatepickerConfigService }, { token: i0.ElementRef }, { token: i1.SkyAppLocaleProvider }, { token: i0.Renderer2 }, { token: SkyDatepickerComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3165
3165
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: SkyDatepickerInputDirective, selector: "[skyDatepickerInput]", inputs: { dateFormat: "dateFormat", disabled: "disabled", maxDate: "maxDate", minDate: "minDate", startAtDate: "startAtDate", skyDatepickerInput: "skyDatepickerInput", skyDatepickerNoValidate: "skyDatepickerNoValidate", startingDay: "startingDay", strict: "strict" }, host: { listeners: { "change": "onInputChange($event)", "blur": "onInputBlur()", "input": "onInput()" } }, providers: [SKY_DATEPICKER_VALUE_ACCESSOR, SKY_DATEPICKER_VALIDATOR], ngImport: i0 }); }
3166
3166
  }
3167
3167
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDatepickerInputDirective, decorators: [{
@@ -3170,7 +3170,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3170
3170
  selector: '[skyDatepickerInput]',
3171
3171
  providers: [SKY_DATEPICKER_VALUE_ACCESSOR, SKY_DATEPICKER_VALIDATOR],
3172
3172
  }]
3173
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyDatepickerConfigService }, { type: i0.ElementRef }, { type: i3.SkyAppLocaleProvider }, { type: i0.Renderer2 }, { type: SkyDatepickerComponent, decorators: [{
3173
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyDatepickerConfigService }, { type: i0.ElementRef }, { type: i1.SkyAppLocaleProvider }, { type: i0.Renderer2 }, { type: SkyDatepickerComponent, decorators: [{
3174
3174
  type: Optional
3175
3175
  }] }], propDecorators: { dateFormat: [{
3176
3176
  type: Input
@@ -3303,12 +3303,13 @@ class SkyDateRangePickerEndDateResourceKeyPipe {
3303
3303
  return 'skyux_date_range_picker_before_date_label';
3304
3304
  }
3305
3305
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerEndDateResourceKeyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3306
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerEndDateResourceKeyPipe, name: "skyDateRangePickerEndDateResourceKey" }); }
3306
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerEndDateResourceKeyPipe, isStandalone: true, name: "skyDateRangePickerEndDateResourceKey" }); }
3307
3307
  }
3308
3308
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerEndDateResourceKeyPipe, decorators: [{
3309
3309
  type: Pipe,
3310
3310
  args: [{
3311
3311
  name: 'skyDateRangePickerEndDateResourceKey',
3312
+ standalone: true,
3312
3313
  }]
3313
3314
  }] });
3314
3315
 
@@ -3320,15 +3321,71 @@ class SkyDateRangePickerStartDateResourceKeyPipe {
3320
3321
  return 'skyux_date_range_picker_after_date_label';
3321
3322
  }
3322
3323
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerStartDateResourceKeyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3323
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerStartDateResourceKeyPipe, name: "skyDateRangePickerStartDateResourceKey" }); }
3324
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerStartDateResourceKeyPipe, isStandalone: true, name: "skyDateRangePickerStartDateResourceKey" }); }
3324
3325
  }
3325
3326
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerStartDateResourceKeyPipe, decorators: [{
3326
3327
  type: Pipe,
3327
3328
  args: [{
3328
3329
  name: 'skyDateRangePickerStartDateResourceKey',
3330
+ standalone: true,
3329
3331
  }]
3330
3332
  }] });
3331
3333
 
3334
+ /**
3335
+ * Represents the calculator.
3336
+ */
3337
+ class SkyDateRangeCalculator {
3338
+ #config;
3339
+ constructor(
3340
+ /**
3341
+ * The calculator ID that specifies calculator objects that represent date ranges.
3342
+ */
3343
+ calculatorId, config) {
3344
+ this.calculatorId = calculatorId;
3345
+ this.#config = config;
3346
+ this.type = config.type;
3347
+ this.shortDescription = config.shortDescription;
3348
+ this._shortDescriptionResourceKey = config._shortDescriptionResourceKey;
3349
+ }
3350
+ /**
3351
+ * Gets the current value of the calculator.
3352
+ * @param startDateInput The start date.
3353
+ * @param endDateInput The end date.
3354
+ */
3355
+ getValue(startDateInput, endDateInput) {
3356
+ const result = this.#config.getValue(startDateInput, endDateInput);
3357
+ let startDate = null;
3358
+ if (result.startDate instanceof Date) {
3359
+ startDate = this.#parseDateWithoutTime(result.startDate);
3360
+ }
3361
+ let endDate = null;
3362
+ if (result.endDate instanceof Date) {
3363
+ endDate = this.#parseDateWithoutTime(result.endDate);
3364
+ }
3365
+ return {
3366
+ calculatorId: this.calculatorId,
3367
+ startDate,
3368
+ endDate,
3369
+ };
3370
+ }
3371
+ /**
3372
+ * Performs synchronous validation against the control.
3373
+ */
3374
+ validate(value) {
3375
+ if (!this.#config.validate) {
3376
+ return null;
3377
+ }
3378
+ return this.#config.validate(value);
3379
+ }
3380
+ /**
3381
+ * Get a date object without time information.
3382
+ * See: https://stackoverflow.com/a/38050824/6178885
3383
+ */
3384
+ #parseDateWithoutTime(date) {
3385
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
3386
+ }
3387
+ }
3388
+
3332
3389
  /**
3333
3390
  * `SkyDateRangeCalculatorId` values specify calculator objects that return
3334
3391
  * two `Date` objects to represent date ranges. The values populate the options
@@ -3447,60 +3504,6 @@ var SkyDateRangeCalculatorId;
3447
3504
  SkyDateRangeCalculatorId[SkyDateRangeCalculatorId["NextFiscalYear"] = 21] = "NextFiscalYear";
3448
3505
  })(SkyDateRangeCalculatorId || (SkyDateRangeCalculatorId = {}));
3449
3506
 
3450
- /**
3451
- * Represents the calculator.
3452
- */
3453
- class SkyDateRangeCalculator {
3454
- #config;
3455
- constructor(
3456
- /**
3457
- * The calculator ID that specifies calculator objects that represent date ranges.
3458
- */
3459
- calculatorId, config) {
3460
- this.calculatorId = calculatorId;
3461
- this.#config = config;
3462
- this.type = config.type;
3463
- this.shortDescription = config.shortDescription;
3464
- }
3465
- /**
3466
- * Gets the current value of the calculator.
3467
- * @param startDateInput The start date.
3468
- * @param endDateInput The end date.
3469
- */
3470
- getValue(startDateInput, endDateInput) {
3471
- const result = this.#config.getValue(startDateInput, endDateInput);
3472
- let startDate = null;
3473
- if (result.startDate instanceof Date) {
3474
- startDate = this.#parseDateWithoutTime(result.startDate);
3475
- }
3476
- let endDate = null;
3477
- if (result.endDate instanceof Date) {
3478
- endDate = this.#parseDateWithoutTime(result.endDate);
3479
- }
3480
- return {
3481
- calculatorId: this.calculatorId,
3482
- startDate,
3483
- endDate,
3484
- };
3485
- }
3486
- /**
3487
- * Performs synchronous validation against the control.
3488
- */
3489
- validate(value) {
3490
- if (!this.#config.validate) {
3491
- return null;
3492
- }
3493
- return this.#config.validate(value);
3494
- }
3495
- /**
3496
- * Get a date object without time information.
3497
- * See: https://stackoverflow.com/a/38050824/6178885
3498
- */
3499
- #parseDateWithoutTime(date) {
3500
- return new Date(date.getFullYear(), date.getMonth(), date.getDate());
3501
- }
3502
- }
3503
-
3504
3507
  /**
3505
3508
  * Need to add the following to classes which contain static methods.
3506
3509
  * See: https://github.com/ng-packagr/ng-packagr/issues/641
@@ -3750,6 +3753,30 @@ class SkyDateRangeRelativeValue {
3750
3753
  }
3751
3754
  }
3752
3755
 
3756
+ const SKY_DEFAULT_CALCULATOR_IDS = [
3757
+ SkyDateRangeCalculatorId.AnyTime,
3758
+ SkyDateRangeCalculatorId.Before,
3759
+ SkyDateRangeCalculatorId.After,
3760
+ SkyDateRangeCalculatorId.SpecificRange,
3761
+ SkyDateRangeCalculatorId.Yesterday,
3762
+ SkyDateRangeCalculatorId.Today,
3763
+ SkyDateRangeCalculatorId.Tomorrow,
3764
+ SkyDateRangeCalculatorId.LastWeek,
3765
+ SkyDateRangeCalculatorId.ThisWeek,
3766
+ SkyDateRangeCalculatorId.NextWeek,
3767
+ SkyDateRangeCalculatorId.LastMonth,
3768
+ SkyDateRangeCalculatorId.ThisMonth,
3769
+ SkyDateRangeCalculatorId.NextMonth,
3770
+ SkyDateRangeCalculatorId.LastQuarter,
3771
+ SkyDateRangeCalculatorId.ThisQuarter,
3772
+ SkyDateRangeCalculatorId.NextQuarter,
3773
+ SkyDateRangeCalculatorId.LastCalendarYear,
3774
+ SkyDateRangeCalculatorId.ThisCalendarYear,
3775
+ SkyDateRangeCalculatorId.NextCalendarYear,
3776
+ SkyDateRangeCalculatorId.LastFiscalYear,
3777
+ SkyDateRangeCalculatorId.ThisFiscalYear,
3778
+ SkyDateRangeCalculatorId.NextFiscalYear,
3779
+ ];
3753
3780
  const SKY_DEFAULT_CALCULATOR_CONFIGS = [
3754
3781
  {
3755
3782
  calculatorId: SkyDateRangeCalculatorId.AnyTime,
@@ -3900,16 +3927,24 @@ const SKY_DEFAULT_CALCULATOR_CONFIGS = [
3900
3927
  * Creates and manages `SkyDateRangeCalculator` instances.
3901
3928
  */
3902
3929
  class SkyDateRangeService {
3930
+ get calculators() {
3931
+ return this.#calculators;
3932
+ }
3903
3933
  // Start the count higher than the number of available values
3904
3934
  // provided in the SkyDateRangeCalculatorId enum.
3905
3935
  static { this.lastId = 1000; }
3906
3936
  #calculatorReadyStream = new BehaviorSubject(false);
3907
- #calculatorConfigs = {};
3908
3937
  #calculators = [];
3938
+ #ngUnsubscribe = new Subject();
3909
3939
  #resourcesService;
3910
3940
  constructor(resourcesService) {
3911
3941
  this.#resourcesService = resourcesService;
3912
- this.#createDefaultCalculators();
3942
+ this.#calculators = this.#createDefaultCalculators();
3943
+ this.#resolveResourcesStrings(this.#calculators);
3944
+ }
3945
+ ngOnDestroy() {
3946
+ this.#ngUnsubscribe.next();
3947
+ this.#ngUnsubscribe.complete();
3913
3948
  }
3914
3949
  /**
3915
3950
  * Creates a custom date range calculator.
@@ -3921,9 +3956,24 @@ class SkyDateRangeService {
3921
3956
  this.#calculators.push(calculator);
3922
3957
  return calculator;
3923
3958
  }
3959
+ /**
3960
+ * Returns calculators from an array of calculator IDs.
3961
+ * @param calculatorIds The array of calculator IDs.
3962
+ */
3963
+ filterCalculators(calculatorIds) {
3964
+ const filtered = [];
3965
+ for (const calculatorId of calculatorIds) {
3966
+ const found = this.#calculators.find((c) => c.calculatorId === calculatorId);
3967
+ if (found) {
3968
+ filtered.push(found);
3969
+ }
3970
+ }
3971
+ return filtered;
3972
+ }
3924
3973
  /**
3925
3974
  * Returns calculators from an array of calculator IDs.
3926
3975
  * @param ids The array of calculator IDs.
3976
+ * @deprecated Call `filterCalculators()` instead.
3927
3977
  */
3928
3978
  getCalculators(ids) {
3929
3979
  const promises = ids.map((id) => {
@@ -3934,9 +3984,10 @@ class SkyDateRangeService {
3934
3984
  /**
3935
3985
  * Returns a calculator from a calculator ID.
3936
3986
  * @param id The calculator ID.
3987
+ * @deprecated Call `filterCalculators()` instead.
3937
3988
  */
3938
3989
  getCalculatorById(id) {
3939
- const calculatorId = parseInt(id, 10);
3990
+ const calculatorId = +id;
3940
3991
  const found = this.#calculators.find((calculator) => {
3941
3992
  return calculator.calculatorId === calculatorId;
3942
3993
  });
@@ -3950,36 +4001,45 @@ class SkyDateRangeService {
3950
4001
  });
3951
4002
  });
3952
4003
  }
4004
+ /**
4005
+ * Returns default date range calculators with unresolved resources strings.
4006
+ */
3953
4007
  #createDefaultCalculators() {
3954
- const tasks = [];
3955
- // Get resource strings for short descriptions.
3956
- SKY_DEFAULT_CALCULATOR_CONFIGS.forEach((defaultConfig) => {
3957
- const config = {
4008
+ const calculators = [];
4009
+ for (const defaultConfig of SKY_DEFAULT_CALCULATOR_CONFIGS) {
4010
+ calculators.push(new SkyDateRangeCalculator(defaultConfig.calculatorId, {
3958
4011
  getValue: defaultConfig.getValue,
3959
4012
  validate: defaultConfig.validate,
3960
4013
  shortDescription: '',
4014
+ _shortDescriptionResourceKey: defaultConfig.shortDescriptionResourceKey,
3961
4015
  type: defaultConfig.type,
3962
- };
3963
- tasks.push(this.#resourcesService
3964
- .getString(defaultConfig.shortDescriptionResourceKey)
3965
- .pipe(first(), map((value) => {
3966
- config.shortDescription = value;
3967
- })));
3968
- this.#calculatorConfigs[defaultConfig.calculatorId] = config;
4016
+ }));
4017
+ }
4018
+ return calculators;
4019
+ }
4020
+ /**
4021
+ * Resolves locale resources strings for the provided calculators.
4022
+ * @deprecated The resources strings are resolved in the template, so we'll
4023
+ * remove this functionality in a later major version of SKY UX.
4024
+ */
4025
+ #resolveResourcesStrings(calculators) {
4026
+ const tasks = [];
4027
+ calculators.forEach((calculator) => {
4028
+ if (calculator._shortDescriptionResourceKey) {
4029
+ tasks.push(this.#resourcesService
4030
+ .getString(calculator._shortDescriptionResourceKey)
4031
+ .pipe(takeUntil(this.#ngUnsubscribe), map((value) => {
4032
+ calculator.shortDescription = value;
4033
+ })));
4034
+ }
3969
4035
  });
3970
4036
  forkJoin(tasks)
3971
- .pipe(first())
4037
+ .pipe(takeUntil(this.#ngUnsubscribe))
3972
4038
  .subscribe(() => {
3973
- const calculatorIds = Object.keys(this.#calculatorConfigs);
3974
- const calculators = calculatorIds.map((calculatorId) => {
3975
- const id = parseInt(calculatorId, 10);
3976
- return new SkyDateRangeCalculator(id, this.#calculatorConfigs[id]);
3977
- });
3978
- this.#calculators = calculators;
3979
4039
  this.#calculatorReadyStream.next(true);
3980
4040
  });
3981
4041
  }
3982
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangeService, deps: [{ token: i3.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4042
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangeService, deps: [{ token: i1.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3983
4043
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangeService, providedIn: 'root' }); }
3984
4044
  }
3985
4045
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangeService, decorators: [{
@@ -3987,388 +4047,341 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3987
4047
  args: [{
3988
4048
  providedIn: 'root',
3989
4049
  }]
3990
- }], ctorParameters: () => [{ type: i3.SkyLibResourcesService }] });
4050
+ }], ctorParameters: () => [{ type: i1.SkyLibResourcesService }] });
3991
4051
 
3992
- const SKY_DATE_RANGE_PICKER_VALUE_ACCESSOR = {
3993
- provide: NG_VALUE_ACCESSOR,
3994
- useExisting: forwardRef(() => SkyDateRangePickerComponent),
3995
- multi: true,
3996
- };
3997
- const SKY_DATE_RANGE_PICKER_VALIDATOR = {
3998
- provide: NG_VALIDATORS,
3999
- useExisting: forwardRef(() => SkyDateRangePickerComponent),
4000
- multi: true,
4001
- };
4002
- let uniqueId = 0;
4003
- /**
4004
- * Acts as a form control with a form model of type `SkyDateRangeCalculation`.
4005
- * @example
4006
- * ```
4007
- * <sky-date-range-picker
4008
- * formControlName="myPicker"
4009
- * >
4010
- * </sky-date-range-picker>
4011
- * ```
4012
- */
4052
+ function areDateRangesEqual(rangeA, rangeB) {
4053
+ return (!!rangeA &&
4054
+ !!rangeB &&
4055
+ rangeA.calculatorId === rangeB.calculatorId &&
4056
+ areDatesEqual(rangeA.startDate, rangeB.startDate) &&
4057
+ areDatesEqual(rangeA.endDate, rangeB.endDate));
4058
+ }
4059
+ function areDatesEqual(a, b) {
4060
+ if (typeof a !== typeof b) {
4061
+ return false;
4062
+ }
4063
+ if (!a && !b) {
4064
+ return true;
4065
+ }
4066
+ if (typeof a === 'string' && a === b) {
4067
+ return true;
4068
+ }
4069
+ return a instanceof Date && b instanceof Date && a.getTime() === b.getTime();
4070
+ }
4071
+ function isNullOrUndefined(value) {
4072
+ return value === undefined || value === null;
4073
+ }
4074
+ function isPartialValue(value) {
4075
+ return (isNullOrUndefined(value) ||
4076
+ isNullOrUndefined(value.calculatorId) ||
4077
+ !('endDate' in value) ||
4078
+ !('startDate' in value));
4079
+ }
4013
4080
  class SkyDateRangePickerComponent {
4014
4081
  /**
4015
4082
  * IDs for the date range options to include in the picker's dropdown.
4016
4083
  * The options specify calculator objects that return two `Date` objects to represent date ranges.
4017
4084
  * By default, this property includes all `SkyDateRangeCalculatorId` values.
4018
4085
  */
4019
- set calculatorIds(value) {
4020
- this.#_calculatorIds = value || [
4021
- SkyDateRangeCalculatorId.AnyTime,
4022
- SkyDateRangeCalculatorId.Before,
4023
- SkyDateRangeCalculatorId.After,
4024
- SkyDateRangeCalculatorId.SpecificRange,
4025
- SkyDateRangeCalculatorId.Yesterday,
4026
- SkyDateRangeCalculatorId.Today,
4027
- SkyDateRangeCalculatorId.Tomorrow,
4028
- SkyDateRangeCalculatorId.LastWeek,
4029
- SkyDateRangeCalculatorId.ThisWeek,
4030
- SkyDateRangeCalculatorId.NextWeek,
4031
- SkyDateRangeCalculatorId.LastMonth,
4032
- SkyDateRangeCalculatorId.ThisMonth,
4033
- SkyDateRangeCalculatorId.NextMonth,
4034
- SkyDateRangeCalculatorId.LastQuarter,
4035
- SkyDateRangeCalculatorId.ThisQuarter,
4036
- SkyDateRangeCalculatorId.NextQuarter,
4037
- SkyDateRangeCalculatorId.LastCalendarYear,
4038
- SkyDateRangeCalculatorId.ThisCalendarYear,
4039
- SkyDateRangeCalculatorId.NextCalendarYear,
4040
- SkyDateRangeCalculatorId.LastFiscalYear,
4041
- SkyDateRangeCalculatorId.ThisFiscalYear,
4042
- SkyDateRangeCalculatorId.NextFiscalYear,
4043
- ];
4086
+ set calculatorIds(calculatorIds) {
4087
+ const currentCalculatorId = this.#getValue().calculatorId;
4088
+ this.#_calculatorIds = calculatorIds ?? SKY_DEFAULT_CALCULATOR_IDS;
4089
+ this.calculators = this.#dateRangeSvc.filterCalculators(this.#_calculatorIds);
4090
+ // If the currently selected calculator isn't available anymore,
4091
+ // select the first calculator in the new array.
4092
+ if (!this.#_calculatorIds.includes(currentCalculatorId)) {
4093
+ this.#setValue({ calculatorId: this.calculatorIds[0] }, { emitEvent: true });
4094
+ }
4044
4095
  }
4045
4096
  get calculatorIds() {
4046
4097
  return this.#_calculatorIds;
4047
4098
  }
4048
4099
  /**
4049
- * The date format for
4050
- * [the `sky-datepicker` components](https://developer.blackbaud.com/skyux/components/datepicker)
4051
- * that make up the date range picker. The text input is a composite component of
4052
- * up to two `sky-datepicker` components.
4053
- * @default "MM/DD/YYYY"
4054
- */
4055
- set dateFormat(value) {
4056
- this.#_dateFormat = value;
4057
- this.dateFormatOrDefault = value || this.#preferredShortDateFormat;
4058
- }
4059
- get dateFormat() {
4060
- return this.#_dateFormat;
4061
- }
4062
- /**
4063
- * Whether to disable the date range picker on template-driven forms. Don't use this input on reactive forms because they may overwrite the input or leave the control out of sync.
4064
- * To set the disabled state on reactive forms, use the `FormControl` instead.
4100
+ * Whether to disable the date range picker on template-driven forms. Don't use
4101
+ * this input on reactive forms because they may overwrite the input or leave
4102
+ * the control out of sync. To set the disabled state on reactive forms,
4103
+ * use the `FormControl` instead.
4065
4104
  * @default false
4066
4105
  */
4067
4106
  set disabled(value) {
4068
- this.#_disabled = value;
4069
- if (this.formGroup) {
4070
- if (this.#_disabled) {
4071
- this.formGroup.disable();
4072
- }
4073
- else {
4074
- this.formGroup.enable();
4075
- }
4107
+ if (value) {
4108
+ this.formGroup.disable();
4109
+ }
4110
+ else {
4111
+ this.formGroup.enable();
4076
4112
  }
4077
- this.#changeDetector.markForCheck();
4078
- }
4079
- get disabled() {
4080
- return this.#_disabled;
4081
4113
  }
4082
4114
  get #calculatorIdControl() {
4083
- return this.formGroup?.get('calculatorId');
4084
- }
4085
- get #defaultCalculator() {
4086
- return this.calculators[0];
4087
- }
4088
- get #defaultValue() {
4089
- return this.#defaultCalculator?.getValue();
4115
+ return this.formGroup.get('calculatorId');
4090
4116
  }
4091
4117
  get #endDateControl() {
4092
- return this.formGroup?.get('endDate');
4118
+ return this.formGroup.get('endDate');
4093
4119
  }
4094
4120
  get #startDateControl() {
4095
- return this.formGroup?.get('startDate');
4121
+ return this.formGroup.get('startDate');
4096
4122
  }
4097
- #value;
4098
- set #valueOrDefault(value) {
4099
- this.#_valueOrDefault = value;
4100
- this.#updateSelectedCalculator();
4101
- }
4102
- get #valueOrDefault() {
4103
- return this.#_valueOrDefault;
4104
- }
4105
- #labelTextRequired;
4106
- #appFormatter;
4107
- #control;
4108
- #preferredShortDateFormat;
4109
- #ngUnsubscribe;
4110
- #resourceSvc;
4111
4123
  #_calculatorIds;
4112
- #_dateFormat;
4113
- #_disabled;
4114
- #_valueOrDefault;
4124
+ #_value;
4125
+ #hostControl;
4126
+ #ngUnsubscribe;
4127
+ #notifyChange;
4128
+ #notifyTouched;
4115
4129
  #changeDetector;
4116
- #dateRangeService;
4117
- #formBuilder;
4118
- #localeProvider;
4119
- #ngZone;
4120
- constructor(changeDetector, dateRangeService, formBuilder, localeProvider, ngZone, themeSvc) {
4121
- /**
4122
- * Whether to require users to specify a start date.
4123
- * @default false
4124
- */
4125
- this.startDateRequired = false;
4130
+ #dateRangeSvc;
4131
+ #injector;
4132
+ #labelTextRequiredSvc;
4133
+ constructor() {
4126
4134
  /**
4127
4135
  * Whether to require users to specify a end date.
4128
- * @default false
4136
+ * @deprecated Use the `required` directive or Angular's `Validators.required`
4137
+ * on the form control to mark the date range picker as required.
4129
4138
  */
4130
4139
  this.endDateRequired = false;
4140
+ /**
4141
+ * Whether the date range picker requires a value.
4142
+ */
4143
+ this.required = false;
4131
4144
  /**
4132
4145
  * Whether the date range picker is stacked on another form component. When specified, the appropriate
4133
4146
  * vertical spacing is automatically added to the date range picker.
4134
4147
  * @preview
4135
4148
  */
4136
4149
  this.stacked = false;
4137
- this.dateRangePickerId = `sky-date-range-picker-${uniqueId++}`;
4150
+ /**
4151
+ * Whether to require users to specify a start date.
4152
+ * @deprecated Use the `required` directive or Angular's `Validators.required`
4153
+ * on the form control to mark the date range picker as required.
4154
+ */
4155
+ this.startDateRequired = false;
4138
4156
  this.calculators = [];
4139
- this.isReady = false;
4157
+ this.hasErrors = false;
4140
4158
  this.showEndDatePicker = false;
4141
4159
  this.showStartDatePicker = false;
4142
- this.#labelTextRequired = inject(SkyFormFieldLabelTextRequiredService, {
4143
- optional: true,
4144
- });
4145
- this.#appFormatter = inject(SkyAppFormat);
4160
+ this.#_calculatorIds = SKY_DEFAULT_CALCULATOR_IDS;
4146
4161
  this.#ngUnsubscribe = new Subject();
4147
- this.#resourceSvc = inject(SkyLibResourcesService);
4148
- this.#_calculatorIds = [
4149
- SkyDateRangeCalculatorId.AnyTime,
4150
- SkyDateRangeCalculatorId.Before,
4151
- SkyDateRangeCalculatorId.After,
4152
- SkyDateRangeCalculatorId.SpecificRange,
4153
- SkyDateRangeCalculatorId.Yesterday,
4154
- SkyDateRangeCalculatorId.Today,
4155
- SkyDateRangeCalculatorId.Tomorrow,
4156
- SkyDateRangeCalculatorId.LastWeek,
4157
- SkyDateRangeCalculatorId.ThisWeek,
4158
- SkyDateRangeCalculatorId.NextWeek,
4159
- SkyDateRangeCalculatorId.LastMonth,
4160
- SkyDateRangeCalculatorId.ThisMonth,
4161
- SkyDateRangeCalculatorId.NextMonth,
4162
- SkyDateRangeCalculatorId.LastQuarter,
4163
- SkyDateRangeCalculatorId.ThisQuarter,
4164
- SkyDateRangeCalculatorId.NextQuarter,
4165
- SkyDateRangeCalculatorId.LastCalendarYear,
4166
- SkyDateRangeCalculatorId.ThisCalendarYear,
4167
- SkyDateRangeCalculatorId.NextCalendarYear,
4168
- SkyDateRangeCalculatorId.LastFiscalYear,
4169
- SkyDateRangeCalculatorId.ThisFiscalYear,
4170
- SkyDateRangeCalculatorId.NextFiscalYear,
4171
- ];
4172
- this.#_disabled = false;
4173
- /* istanbul ignore next */
4174
- // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
4175
- this.#onChange = (_) => { };
4176
- /* istanbul ignore next */
4177
- // eslint-disable-next-line @typescript-eslint/no-empty-function
4178
- this.#onTouched = () => { };
4179
- this.#changeDetector = changeDetector;
4180
- this.#dateRangeService = dateRangeService;
4181
- this.#formBuilder = formBuilder;
4182
- this.#localeProvider = localeProvider;
4183
- this.#ngZone = ngZone;
4184
- this.dateFormatOrDefault = this.dateFormat;
4185
- this.#localeProvider
4186
- .getLocaleInfo()
4187
- .pipe(takeUntil(this.#ngUnsubscribe))
4188
- .subscribe((localeInfo) => {
4189
- SkyDateFormatter.setLocale(localeInfo.locale);
4190
- this.#preferredShortDateFormat =
4191
- SkyDateFormatter.getPreferredShortDateFormat();
4192
- this.dateFormatOrDefault =
4193
- this.dateFormat || this.#preferredShortDateFormat;
4162
+ this.#changeDetector = inject(ChangeDetectorRef);
4163
+ this.#dateRangeSvc = inject(SkyDateRangeService);
4164
+ this.#injector = inject(Injector);
4165
+ this.#labelTextRequiredSvc = inject(SkyFormFieldLabelTextRequiredService, {
4166
+ optional: true,
4194
4167
  });
4195
- // Update icons when theme changes.
4196
- /* istanbul ignore next */
4197
- themeSvc?.settingsChange
4198
- .pipe(takeUntil(this.#ngUnsubscribe))
4199
- .subscribe(() => {
4200
- this.#changeDetector.markForCheck();
4168
+ this.calculators = this.#dateRangeSvc.calculators;
4169
+ this.selectedCalculator = this.calculators[0];
4170
+ const initialValue = this.#getDefaultValue(this.selectedCalculator);
4171
+ this.#_value = initialValue;
4172
+ this.formGroup = inject(FormBuilder).group({
4173
+ calculatorId: new FormControl(initialValue.calculatorId),
4174
+ startDate: new FormControl(initialValue.startDate),
4175
+ endDate: new FormControl(initialValue.endDate),
4201
4176
  });
4202
4177
  }
4203
4178
  ngOnInit() {
4204
- this.#createForm();
4205
- this.#updateCalculators().then(() => {
4206
- if (!this.#value || !this.#value.calculatorId) {
4207
- this.#valueOrDefault = this.#defaultValue;
4179
+ if (this.#labelTextRequiredSvc) {
4180
+ this.#labelTextRequiredSvc.validateLabelText(this.label);
4181
+ if (!this.label) {
4182
+ this.display = 'none';
4208
4183
  }
4209
- this.#addEventListeners();
4210
- this.isReady = true;
4211
- this.#showRelevantFormFields();
4212
- // We need to let Angular be stable and have rendered the components prior to setting the values and form controls. This ensures all initial validation will be ran correctly.
4213
- this.#ngZone.onStable.pipe(first()).subscribe(() => {
4214
- // Fill in any unprovided values after the calculators have been initialized.
4215
- // For example, if the control is initialized with only the `calculatorId`,
4216
- // allow the calculator to fill in the missing start and end dates.
4217
- const defaultValue = this.selectedCalculator?.getValue(this.#valueOrDefault?.startDate, this.#valueOrDefault?.endDate);
4218
- const newValue = Object.assign({}, defaultValue, this.#valueOrDefault);
4219
- this.#setValue(newValue, false);
4220
- this.#resetFormGroupValue();
4221
- // This is needed to address a bug in Angular 4.
4222
- // When a control value is set initially, its value is not represented on the view.
4223
- // See: https://github.com/angular/angular/issues/13792
4224
- /* istanbul ignore else */
4225
- if (this.#control) {
4226
- this.#control.setValue(this.#valueOrDefault, {
4227
- emitEvent: false,
4228
- });
4229
- }
4230
- });
4231
- });
4232
- this.#resourceSvc
4233
- .getString('skyux_datepicker_format_hint_text')
4234
- .pipe(takeUntil(this.#ngUnsubscribe))
4235
- .subscribe((templateString) => {
4236
- this.hostHintText = this.#appFormatter.formatText(templateString, this.dateFormatOrDefault);
4237
- });
4238
- if (this.#labelTextRequired && !this.label) {
4239
- this.display = 'none';
4240
4184
  }
4241
- this.#labelTextRequired?.validateLabelText(this.label);
4242
4185
  }
4243
- ngOnChanges(changes) {
4244
- if (changes['calculatorIds'] &&
4245
- changes['calculatorIds'].firstChange === false) {
4246
- this.#updateCalculators().then(() => {
4247
- const id = this.#calculatorIdControl?.value;
4248
- // Maintain the currently selected values if the calculators change after
4249
- // a value has been chosen.
4250
- const found = this.calculators.find((calculator) => {
4251
- return calculator.calculatorId === id;
4186
+ ngAfterViewInit() {
4187
+ this.#hostControl = this.#injector.get(NgControl, null, {
4188
+ optional: true,
4189
+ self: true,
4190
+ })?.control;
4191
+ // Set a default value on the control if it's undefined on init.
4192
+ // We need to use setTimeout to avoid interfering with the first
4193
+ // validation cycle.
4194
+ if (isPartialValue(this.#hostControl?.value)) {
4195
+ setTimeout(() => {
4196
+ this.#hostControl?.setValue(this.#getValue(), {
4197
+ emitEvent: false,
4198
+ onlySelf: true,
4252
4199
  });
4253
- /* istanbul ignore else */
4254
- if (!found) {
4255
- const newValue = this.#defaultCalculator?.getValue();
4256
- this.#setValue(newValue);
4257
- this.#resetFormGroupValue(newValue);
4258
- this.#showRelevantFormFields();
4200
+ });
4201
+ }
4202
+ // Update the view when "required" or "disabled" states are changed on the
4203
+ // host control.
4204
+ this.#hostControl?.statusChanges
4205
+ .pipe(distinctUntilChanged$1(), takeUntil$1(this.#ngUnsubscribe))
4206
+ .subscribe(() => {
4207
+ this.#changeDetector.markForCheck();
4208
+ });
4209
+ // Start listening for changes after the first change detection cycle.
4210
+ setTimeout(() => {
4211
+ this.formGroup.valueChanges
4212
+ .pipe(distinctUntilChanged$1(areDateRangesEqual), takeUntil$1(this.#ngUnsubscribe))
4213
+ .subscribe((value) => {
4214
+ if (!isNullOrUndefined(value?.calculatorId)) {
4215
+ // The select element sets the calculator ID to a string, but we
4216
+ // need it to be a number.
4217
+ value.calculatorId = +value.calculatorId;
4218
+ // If the calculator ID is changed, we need to reset the start and
4219
+ // end date values and wait until the next valueChanges event to
4220
+ // notify the host control.
4221
+ if (value.calculatorId !== this.#getValue().calculatorId) {
4222
+ this.#setValue({ calculatorId: value.calculatorId }, { emitEvent: true });
4223
+ return;
4224
+ }
4225
+ }
4226
+ this.#setValue(value, { emitEvent: false });
4227
+ const newValue = this.#getValue();
4228
+ // Update the host control if the value is different.
4229
+ if (!areDateRangesEqual(this.#hostControl?.value, newValue)) {
4230
+ this.#notifyChange?.(newValue);
4259
4231
  }
4260
4232
  });
4233
+ });
4234
+ // If the datepickers' statuses change, we want to retrigger the host
4235
+ // control's validation so that their errors are reflected back to the host.
4236
+ merge(this.#startDateControl.statusChanges, this.#endDateControl.statusChanges)
4237
+ .pipe(distinctUntilChanged$1(), takeUntil$1(this.#ngUnsubscribe))
4238
+ .subscribe(() => {
4239
+ // Use a setTimeout to avoid an ExpressionChangedAfterChecked error,
4240
+ // since multiple calls to updateValueAndValidity in the same
4241
+ // cycle may collide with one another.
4242
+ setTimeout(() => {
4243
+ this.#hostControl?.updateValueAndValidity({
4244
+ emitEvent: false,
4245
+ onlySelf: true,
4246
+ });
4247
+ });
4248
+ });
4249
+ this.#updatePickerVisibility(this.selectedCalculator);
4250
+ }
4251
+ /**
4252
+ * Check for touched status in ngDoCheck since Angular does not (currently)
4253
+ * have an API to respond to touched status changes from the host control.
4254
+ * @see https://github.com/angular/angular/issues/17736#issuecomment-310812368
4255
+ * TODO: Angular 18 introduces a new API to respond to these statuses.
4256
+ * @see https://github.com/angular/angular/issues/10887#issuecomment-2035267400
4257
+ */
4258
+ ngDoCheck() {
4259
+ const control = this.#hostControl;
4260
+ const touched = this.formGroup.touched;
4261
+ if (control) {
4262
+ if (control.touched && !touched) {
4263
+ this.formGroup.markAllAsTouched();
4264
+ this.#changeDetector.markForCheck();
4265
+ }
4266
+ else if (control.untouched && touched) {
4267
+ this.formGroup.markAsUntouched();
4268
+ this.#changeDetector.markForCheck();
4269
+ }
4270
+ this.hasErrors = !!control.errors && (control.touched || control.dirty);
4261
4271
  }
4262
4272
  }
4263
4273
  ngOnDestroy() {
4264
4274
  this.#ngUnsubscribe.next();
4265
4275
  this.#ngUnsubscribe.complete();
4266
4276
  }
4267
- onFieldBlur() {
4268
- this.#onTouched();
4277
+ // Implemented as part of ControlValueAccessor.
4278
+ registerOnChange(fn) {
4279
+ this.#notifyChange = fn;
4269
4280
  }
4270
- writeValue(value) {
4271
- // Only update the underlying controls when the calculators are ready.
4272
- const notifyChange = false;
4273
- // (We still need to save the initial value set by the consumer's form, however.)
4274
- this.#setValue(value, notifyChange);
4275
- if (this.isReady) {
4276
- // When the control's value is set to `null`,
4277
- // set it to the default value.
4278
- if (!value) {
4279
- this.#onChange(this.#defaultValue);
4280
- }
4281
- this.#resetFormGroupValue();
4282
- this.#showRelevantFormFields();
4283
- }
4281
+ // Implemented as part of ControlValueAccessor.
4282
+ registerOnTouched(fn) {
4283
+ this.#notifyTouched = fn;
4284
+ }
4285
+ // Implemented as part of ControlValueAccessor.
4286
+ setDisabledState(isDisabled) {
4287
+ this.disabled = isDisabled;
4284
4288
  }
4289
+ // Implemented as part of Validator.
4285
4290
  validate(control) {
4286
- if (!this.#control) {
4287
- this.#control = control;
4288
- }
4289
- if (!this.isReady) {
4290
- return null;
4291
- }
4292
- const value = control.value;
4293
- const idControl = this.#calculatorIdControl;
4294
- const result = this.selectedCalculator?.validate(value);
4295
4291
  let errors = null;
4296
- if (result) {
4292
+ const calculatorErrors = this.selectedCalculator.validate(control.value);
4293
+ const startDateErrors = this.#startDateControl.errors;
4294
+ const endDateErrors = this.#endDateControl.errors;
4295
+ if (calculatorErrors) {
4297
4296
  errors = {
4298
4297
  skyDateRange: {
4299
- calculatorId: idControl?.value,
4300
- errors: result,
4298
+ calculatorId: this.#getValue().calculatorId,
4299
+ errors: calculatorErrors,
4301
4300
  },
4302
4301
  };
4303
4302
  }
4304
- else {
4305
- let startErrors = null;
4306
- let endErrors = null;
4307
- if (this.#startDateControl) {
4308
- startErrors = this.#startDateControl.errors;
4309
- }
4310
- if (this.#endDateControl) {
4311
- endErrors = this.#endDateControl.errors;
4312
- }
4313
- errors = startErrors || endErrors;
4303
+ if (this.showStartDatePicker && startDateErrors) {
4304
+ errors ||= {};
4305
+ errors = { ...errors, ...startDateErrors };
4314
4306
  }
4315
- if (!errors) {
4316
- // Clear any errors on the calculator select.
4317
- idControl?.setErrors(null);
4318
- return null;
4307
+ if (this.showEndDatePicker && endDateErrors) {
4308
+ errors ||= {};
4309
+ errors = { ...errors, ...endDateErrors };
4319
4310
  }
4320
- idControl?.setErrors(errors);
4321
- idControl?.markAsTouched();
4322
- idControl?.markAsDirty();
4323
- // Need to mark the control as touched for the error messages to appear.
4324
- this.#control.markAsTouched();
4325
- // Notify the view to display any errors.
4311
+ // Set errors on the calculator select so that they appear beneath it.
4312
+ this.#calculatorIdControl.setErrors(errors);
4326
4313
  this.#changeDetector.markForCheck();
4327
4314
  return errors;
4328
4315
  }
4329
- registerOnChange(fn) {
4330
- this.#onChange = fn;
4316
+ // Implemented as part of ControlValueAccessor.
4317
+ // The date range picker always has a value, so if the consumer passes in a
4318
+ // partial value (via `patchValue`) or null, we need to update the host control's
4319
+ // value with the complete value after it's been modified.
4320
+ writeValue(value) {
4321
+ this.#patchValue(value);
4322
+ // Update the host control if it is set to a partial or null value.
4323
+ if (isPartialValue(value)) {
4324
+ this.#hostControl?.setValue(this.#getValue(), {
4325
+ emitEvent: false,
4326
+ onlySelf: true,
4327
+ });
4328
+ }
4331
4329
  }
4332
- registerOnTouched(fn) {
4333
- this.#onTouched = fn;
4330
+ isRequired() {
4331
+ return !!(this.required || this.#hostControl?.hasValidator(Validators.required));
4334
4332
  }
4335
- setDisabledState(disabled) {
4336
- this.disabled = disabled;
4333
+ onBlur() {
4334
+ this.#notifyTouched?.();
4337
4335
  }
4338
- #setValue(value, notifyChange = true) {
4339
- const isNewValue = !this.#dateRangesEqual(this.#value, value);
4340
- if (isNewValue) {
4341
- this.#value = value;
4342
- if (!value || value.calculatorId === undefined) {
4343
- this.#valueOrDefault = this.#defaultValue;
4344
- }
4345
- else {
4346
- this.#valueOrDefault = value;
4347
- }
4348
- if (notifyChange) {
4349
- this.#onChange(this.#valueOrDefault);
4350
- }
4336
+ #getCalculator(calculatorId) {
4337
+ const found = this.calculators.find((c) => c.calculatorId === calculatorId);
4338
+ /*safety check: should not happen*/
4339
+ /*istanbul ignore if*/
4340
+ if (!found) {
4341
+ throw new Error(`A date range calculator with ID (${calculatorId}) could not be found.`);
4351
4342
  }
4343
+ return found;
4352
4344
  }
4353
- #patchValue(value) {
4354
- const newValue = Object.assign({}, this.#valueOrDefault, value);
4355
- this.#setValue(newValue);
4345
+ #getDefaultValue(calculator) {
4346
+ return calculator.getValue();
4356
4347
  }
4357
- #createForm() {
4358
- this.formGroup = this.#formBuilder.group({
4359
- calculatorId: new UntypedFormControl(),
4360
- startDate: new UntypedFormControl(),
4361
- endDate: new UntypedFormControl(),
4362
- });
4363
- if (this.disabled) {
4364
- this.formGroup.disable();
4348
+ #getValue() {
4349
+ return this.#_value;
4350
+ }
4351
+ #patchValue(partialValue) {
4352
+ this.#setValue(isNullOrUndefined(partialValue)
4353
+ ? null
4354
+ : { ...this.#getValue(), ...partialValue }, { emitEvent: true });
4355
+ }
4356
+ /**
4357
+ * Sets the value to be used by the date range picker form control.
4358
+ */
4359
+ #setValue(value, options) {
4360
+ const oldValue = this.#getValue();
4361
+ const valueOrDefault = !value || isNullOrUndefined(value.calculatorId)
4362
+ ? this.#getDefaultValue(this.calculators[0])
4363
+ : {
4364
+ ...this.#getDefaultValue(this.#getCalculator(value.calculatorId)),
4365
+ ...value,
4366
+ };
4367
+ // Ensure falsy values are set to null.
4368
+ valueOrDefault.endDate = valueOrDefault.endDate || null;
4369
+ valueOrDefault.startDate = valueOrDefault.startDate || null;
4370
+ if (!areDateRangesEqual(oldValue, valueOrDefault)) {
4371
+ this.#_value = valueOrDefault;
4372
+ this.selectedCalculator = this.#getCalculator(valueOrDefault.calculatorId);
4373
+ if (oldValue.calculatorId !== valueOrDefault.calculatorId) {
4374
+ this.#updatePickerVisibility(this.selectedCalculator);
4375
+ }
4376
+ if (options?.emitEvent) {
4377
+ this.formGroup.setValue(valueOrDefault);
4378
+ }
4365
4379
  }
4366
4380
  }
4367
- #showRelevantFormFields() {
4368
- const calculator = this.selectedCalculator;
4381
+ #updatePickerVisibility(calculator) {
4369
4382
  let showEndDatePicker = false;
4370
4383
  let showStartDatePicker = false;
4371
- switch (calculator?.type) {
4384
+ switch (calculator.type) {
4372
4385
  case SkyDateRangeCalculatorType.Before:
4373
4386
  showEndDatePicker = true;
4374
4387
  break;
@@ -4386,144 +4399,73 @@ class SkyDateRangePickerComponent {
4386
4399
  this.showStartDatePicker = showStartDatePicker;
4387
4400
  this.#changeDetector.markForCheck();
4388
4401
  }
4389
- #resetFormGroupValue(value) {
4390
- this.formGroup?.reset(value || this.#valueOrDefault);
4391
- }
4392
- #addEventListeners() {
4393
- // Watch for selected calculator change.
4394
- this.#calculatorIdControl?.valueChanges
4395
- .pipe(distinctUntilChanged(), takeUntil(this.#ngUnsubscribe))
4396
- .subscribe((value) => {
4397
- if (value !== this.#valueOrDefault?.calculatorId) {
4398
- const id = parseInt(value, 10);
4399
- // if the component is disabled during form creation, null is passed
4400
- // as the value of the calculator id control
4401
- // only handle the value changes if the calculator id is a number
4402
- /* istanbul ignore else */
4403
- if (!isNaN(id)) {
4404
- const calculator = this.#getCalculatorById(id);
4405
- const newValue = calculator?.getValue();
4406
- this.#setValue(newValue);
4407
- this.#resetFormGroupValue(newValue);
4408
- this.#showRelevantFormFields();
4409
- }
4410
- }
4411
- this.#control?.updateValueAndValidity({ emitEvent: false });
4412
- });
4413
- // Watch for start date value changes.
4414
- this.#startDateControl?.valueChanges
4415
- .pipe(distinctUntilChanged(), takeUntil(this.#ngUnsubscribe))
4416
- .subscribe((startDate) => {
4417
- this.#patchValue({ startDate });
4418
- });
4419
- // Watch for end date value changes.
4420
- this.#endDateControl?.valueChanges
4421
- .pipe(distinctUntilChanged(), takeUntil(this.#ngUnsubscribe))
4422
- .subscribe((endDate) => {
4423
- this.#patchValue({ endDate });
4424
- });
4425
- // Safety check
4426
- /* istanbul ignore else */
4427
- if (this.#startDateControl && this.#endDateControl) {
4428
- // Detect errors from the date inputs and update ng- classes on picker.
4429
- combineLatest([
4430
- this.#startDateControl.statusChanges,
4431
- this.#endDateControl.statusChanges,
4432
- ])
4433
- .pipe(takeUntil(this.#ngUnsubscribe))
4434
- .subscribe(() => {
4435
- this.#updateBasedOnControls();
4436
- });
4437
- }
4438
- else if (this.#startDateControl) {
4439
- this.#startDateControl.statusChanges
4440
- .pipe(takeUntil(this.#ngUnsubscribe))
4441
- .subscribe(() => {
4442
- this.#updateBasedOnControls();
4443
- });
4444
- }
4445
- else if (this.#endDateControl) {
4446
- this.#endDateControl.statusChanges
4447
- .pipe(takeUntil(this.#ngUnsubscribe))
4448
- .subscribe(() => {
4449
- this.#updateBasedOnControls();
4450
- });
4451
- }
4452
- }
4453
- #updateBasedOnControls() {
4454
- this.#changeDetector.markForCheck();
4455
- // Wait for initial validation to complete.
4456
- this.#ngZone.onStable.pipe(first()).subscribe(() => {
4457
- this.#control?.updateValueAndValidity({ emitEvent: false });
4458
- });
4459
- }
4460
- #updateCalculators() {
4461
- return this.#dateRangeService
4462
- .getCalculators(this.calculatorIds)
4463
- .then((calculators) => {
4464
- this.calculators = calculators;
4465
- // Ensure that any previously set value is used to determine the selected calculator
4466
- this.#updateSelectedCalculator();
4467
- this.#changeDetector.markForCheck();
4468
- });
4469
- }
4470
- #getCalculatorById(id) {
4471
- return this.calculators.find((calculator) => {
4472
- return calculator.calculatorId === id;
4473
- });
4474
- }
4475
- #dateRangesEqual(rangeA, rangeB) {
4476
- return (!!rangeA && !!rangeB && JSON.stringify(rangeA) === JSON.stringify(rangeB));
4477
- }
4478
- #updateSelectedCalculator() {
4479
- this.selectedCalculator = this.#valueOrDefault
4480
- ? this.#getCalculatorById(this.#valueOrDefault.calculatorId)
4481
- : undefined;
4482
- }
4483
- /* istanbul ignore next */
4484
- // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
4485
- #onChange;
4486
- /* istanbul ignore next */
4487
- // eslint-disable-next-line @typescript-eslint/no-empty-function
4488
- #onTouched;
4489
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyDateRangeService }, { token: i2$3.UntypedFormBuilder }, { token: i3.SkyAppLocaleProvider }, { token: i0.NgZone }, { token: i3$1.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
4490
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.4", type: SkyDateRangePickerComponent, selector: "sky-date-range-picker", inputs: { calculatorIds: "calculatorIds", dateFormat: "dateFormat", disabled: "disabled", label: "label", hintText: "hintText", startDateRequired: "startDateRequired", endDateRequired: "endDateRequired", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", stacked: ["stacked", "stacked", booleanAttribute] }, host: { properties: { "class.sky-margin-stacked-lg": "this.stacked", "style.display": "this.display" } }, providers: [
4491
- SKY_DATE_RANGE_PICKER_VALUE_ACCESSOR,
4492
- SKY_DATE_RANGE_PICKER_VALIDATOR,
4493
- ], usesOnChanges: true, ngImport: i0, template: "<div\n *ngIf=\"isReady && formGroup\"\n class=\"sky-date-range-picker\"\n [formGroup]=\"formGroup\"\n>\n <div\n class=\"sky-date-range-picker-form-group\"\n [ngClass]=\"{\n 'sky-date-range-picker-last-input':\n !showStartDatePicker && !showEndDatePicker\n }\"\n >\n <sky-input-box\n [disabled]=\"disabled\"\n [helpPopoverContent]=\"helpPopoverContent\"\n [helpPopoverTitle]=\"helpPopoverTitle\"\n [labelText]=\"\n label || ('skyux_date_range_picker_default_label' | skyLibResources)\n \"\n [hintText]=\"hintText\"\n >\n <select\n class=\"sky-form-control\"\n formControlName=\"calculatorId\"\n [attr.id]=\"dateRangePickerId + '-select-calculator'\"\n (blur)=\"onFieldBlur()\"\n >\n <option\n *ngFor=\"let calculator of calculators\"\n [value]=\"calculator.calculatorId\"\n >\n {{ calculator.shortDescription }}\n </option>\n </select>\n </sky-input-box>\n </div>\n <div\n class=\"sky-date-range-picker-form-group\"\n [ngClass]=\"{\n 'sky-date-range-picker-last-input':\n showStartDatePicker && !showEndDatePicker\n }\"\n [hidden]=\"!showStartDatePicker\"\n >\n <sky-input-box [disabled]=\"disabled\">\n <label\n class=\"sky-control-label\"\n [attr.for]=\"dateRangePickerId + '-start-date'\"\n [ngClass]=\"{ 'sky-control-label-required': startDateRequired }\"\n >\n {{\n selectedCalculator?.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources\n }}\n </label>\n\n <sky-datepicker>\n <input\n class=\"sky-form-control\"\n formControlName=\"startDate\"\n [attr.aria-label]=\"\n label\n ? ('skyux_date_range_picker_default_aria_label'\n | skyLibResources\n : (selectedCalculator?.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources)\n : label)\n : (selectedCalculator?.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources)\n \"\n [attr.id]=\"dateRangePickerId + '-start-date'\"\n [required]=\"!!startDateRequired\"\n [dateFormat]=\"dateFormatOrDefault\"\n (blur)=\"onFieldBlur()\"\n skyDatepickerInput\n />\n </sky-datepicker>\n </sky-input-box>\n </div>\n\n <div\n class=\"sky-date-range-picker-form-group\"\n [ngClass]=\"{ 'sky-date-range-picker-last-input': showEndDatePicker }\"\n [hidden]=\"!showEndDatePicker\"\n >\n <sky-input-box [disabled]=\"disabled\">\n <label\n class=\"sky-control-label\"\n [attr.for]=\"dateRangePickerId + '-end-date'\"\n [ngClass]=\"{ 'sky-control-label-required': endDateRequired }\"\n >\n {{\n selectedCalculator?.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources\n }}\n </label>\n\n <sky-datepicker>\n <input\n class=\"sky-form-control\"\n formControlName=\"endDate\"\n skyDatepickerInput\n [attr.aria-label]=\"\n label\n ? ('skyux_date_range_picker_default_aria_label'\n | skyLibResources\n : (selectedCalculator?.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources)\n : label)\n : (selectedCalculator?.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources)\n \"\n [attr.id]=\"dateRangePickerId + '-end-date'\"\n [dateFormat]=\"dateFormatOrDefault\"\n [required]=\"!!endDateRequired\"\n (blur)=\"onFieldBlur()\"\n />\n </sky-datepicker>\n </sky-input-box>\n </div>\n</div>\n", styles: [":host{display:block}.sky-date-range-picker{display:flex}@media (max-width: 768px){.sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-bottom:var(--sky-margin-stacked-lg)}}:host .sky-date-range-picker{flex-direction:column}:host .sky-date-range-picker-form-group{flex-basis:100%}:host .sky-date-range-picker-form-group:not(:first-of-type){padding-left:initial}:host .sky-date-range-picker-form-group:not(:last-of-type){padding-right:initial}:host-context(.sky-responsive-container-xs) .sky-date-range-picker,:host-context(.sky-responsive-container-sm) .sky-date-range-picker,:host-context(.sky-responsive-container-md) .sky-date-range-picker,:host-context(.sky-responsive-container-lg) .sky-date-range-picker{flex-direction:column}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group{flex-basis:100%}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:first-of-type){padding-left:initial}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:last-of-type){padding-right:initial}@media (min-width: 768px){:host .sky-date-range-picker{flex-direction:initial}:host .sky-date-range-picker-form-group{flex-basis:33.3333333333%}:host .sky-date-range-picker-form-group:not(:first-of-type){padding-left:5px}:host .sky-date-range-picker-form-group:not(:last-of-type){padding-right:5px}}:host-context(.sky-responsive-container-sm) .sky-date-range-picker,:host-context(.sky-responsive-container-md) .sky-date-range-picker,:host-context(.sky-responsive-container-lg) .sky-date-range-picker{flex-direction:initial}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group{flex-basis:33.3333333333%}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:first-of-type){padding-left:5px}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:last-of-type){padding-right:5px}@media (min-width: 768px){:host-context(sky-filter-inline-item) .sky-date-range-picker-form-group{flex-basis:100%}}.sky-responsive-container-sm :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group,.sky-responsive-container-md :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group,.sky-responsive-container-lg :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group{flex-basis:100%}:host-context(.sky-theme-modern) .sky-date-range-picker-form-group{padding:0}@media (min-width: 768px){:host-context(.sky-theme-modern) .sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-right:20px}}.sky-theme-modern .sky-date-range-picker-form-group{padding:0}@media (min-width: 768px){.sky-theme-modern .sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-right:20px}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: SkyDatepickerComponent, selector: "sky-datepicker", inputs: ["pickerClass"], outputs: ["calendarDateRangeChange", "dateFormatChange", "openChange"] }, { kind: "directive", type: SkyDatepickerInputDirective, selector: "[skyDatepickerInput]", inputs: ["dateFormat", "disabled", "maxDate", "minDate", "startAtDate", "skyDatepickerInput", "skyDatepickerNoValidate", "startingDay", "strict"] }, { kind: "component", type: i2$2.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled", "labelText", "characterLimit", "stacked", "helpPopoverTitle", "helpPopoverContent", "helpKey", "hintText"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "pipe", type: SkyDateRangePickerEndDateResourceKeyPipe, name: "skyDateRangePickerEndDateResourceKey" }, { kind: "pipe", type: SkyDateRangePickerStartDateResourceKeyPipe, name: "skyDateRangePickerStartDateResourceKey" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4402
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4403
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.4", type: SkyDateRangePickerComponent, isStandalone: true, selector: "sky-date-range-picker", inputs: { calculatorIds: "calculatorIds", dateFormat: "dateFormat", disabled: ["disabled", "disabled", booleanAttribute], endDateRequired: ["endDateRequired", "endDateRequired", booleanAttribute], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", hintText: "hintText", label: "label", required: ["required", "required", booleanAttribute], stacked: ["stacked", "stacked", booleanAttribute], startDateRequired: ["startDateRequired", "startDateRequired", booleanAttribute] }, host: { properties: { "class.sky-margin-stacked-lg": "this.stacked", "style.display": "this.display" } }, providers: [
4404
+ {
4405
+ provide: NG_VALIDATORS,
4406
+ useExisting: SkyDateRangePickerComponent,
4407
+ multi: true,
4408
+ },
4409
+ {
4410
+ provide: NG_VALUE_ACCESSOR,
4411
+ useExisting: SkyDateRangePickerComponent,
4412
+ multi: true,
4413
+ },
4414
+ ], ngImport: i0, template: "<div\n class=\"sky-date-range-picker\"\n [formGroup]=\"formGroup\"\n (focusout)=\"onBlur()\"\n>\n <div\n class=\"sky-date-range-picker-form-group\"\n [ngClass]=\"{\n 'sky-date-range-picker-last-input':\n !showStartDatePicker && !showEndDatePicker\n }\"\n >\n <sky-input-box\n [hasErrors]=\"hasErrors\"\n [helpPopoverContent]=\"helpPopoverContent\"\n [helpPopoverTitle]=\"helpPopoverTitle\"\n [hintText]=\"hintText\"\n [labelText]=\"\n label || ('skyux_date_range_picker_default_label' | skyLibResources)\n \"\n >\n <select\n formControlName=\"calculatorId\"\n [required]=\"isRequired()\"\n (blur)=\"onBlur()\"\n >\n <option\n *ngFor=\"let calculator of calculators\"\n [value]=\"calculator.calculatorId\"\n >\n {{\n calculator._shortDescriptionResourceKey\n ? (calculator._shortDescriptionResourceKey | skyLibResources)\n : calculator.shortDescription\n }}\n </option>\n </select>\n </sky-input-box>\n </div>\n <div\n class=\"sky-date-range-picker-form-group sky-date-range-datepicker-wrapper\"\n [hidden]=\"!showStartDatePicker\"\n [ngClass]=\"{\n 'sky-date-range-picker-last-input':\n showStartDatePicker && !showEndDatePicker\n }\"\n >\n <sky-input-box\n [errorsScreenReaderOnly]=\"true\"\n [hasErrors]=\"hasErrors\"\n [labelText]=\"\n selectedCalculator.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources\n \"\n >\n <sky-datepicker>\n <input\n formControlName=\"startDate\"\n name=\"startDate\"\n skyDatepickerInput\n type=\"text\"\n [attr.aria-label]=\"\n label\n ? ('skyux_date_range_picker_default_aria_label'\n | skyLibResources\n : (selectedCalculator.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources)\n : label)\n : (selectedCalculator.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources)\n \"\n [dateFormat]=\"dateFormat\"\n [required]=\"\n showStartDatePicker && (startDateRequired || isRequired())\n \"\n />\n </sky-datepicker>\n </sky-input-box>\n </div>\n <div\n class=\"sky-date-range-picker-form-group sky-date-range-datepicker-wrapper\"\n [hidden]=\"!showEndDatePicker\"\n [ngClass]=\"{ 'sky-date-range-picker-last-input': showEndDatePicker }\"\n >\n <sky-input-box\n [errorsScreenReaderOnly]=\"true\"\n [hasErrors]=\"hasErrors\"\n [labelText]=\"\n selectedCalculator.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources\n \"\n >\n <sky-datepicker>\n <input\n formControlName=\"endDate\"\n name=\"endDate\"\n skyDatepickerInput\n type=\"text\"\n [attr.aria-label]=\"\n label\n ? ('skyux_date_range_picker_default_aria_label'\n | skyLibResources\n : (selectedCalculator.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources)\n : label)\n : (selectedCalculator.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources)\n \"\n [dateFormat]=\"dateFormat\"\n [required]=\"showEndDatePicker && (endDateRequired || isRequired())\"\n />\n </sky-datepicker>\n </sky-input-box>\n </div>\n</div>\n", styles: [":host{display:block}.sky-date-range-picker{display:flex}@media (max-width: 768px){.sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-bottom:var(--sky-margin-stacked-lg)}}:host .sky-date-range-picker{flex-direction:column}:host .sky-date-range-picker-form-group{flex-basis:100%}:host .sky-date-range-picker-form-group:not(:first-of-type){padding-left:initial}:host .sky-date-range-picker-form-group:not(:last-of-type){padding-right:initial}:host-context(.sky-responsive-container-xs) .sky-date-range-picker,:host-context(.sky-responsive-container-sm) .sky-date-range-picker,:host-context(.sky-responsive-container-md) .sky-date-range-picker,:host-context(.sky-responsive-container-lg) .sky-date-range-picker{flex-direction:column}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group{flex-basis:100%}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:first-of-type){padding-left:initial}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:last-of-type){padding-right:initial}@media (min-width: 768px){:host .sky-date-range-picker{flex-direction:initial}:host .sky-date-range-picker-form-group{flex-basis:33.3333333333%}:host .sky-date-range-picker-form-group:not(:first-of-type){padding-left:5px}:host .sky-date-range-picker-form-group:not(:last-of-type){padding-right:5px}}:host-context(.sky-responsive-container-sm) .sky-date-range-picker,:host-context(.sky-responsive-container-md) .sky-date-range-picker,:host-context(.sky-responsive-container-lg) .sky-date-range-picker{flex-direction:initial}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group{flex-basis:33.3333333333%}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:first-of-type){padding-left:5px}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:last-of-type){padding-right:5px}@media (min-width: 768px){:host-context(sky-filter-inline-item) .sky-date-range-picker-form-group{flex-basis:100%}}.sky-responsive-container-sm :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group,.sky-responsive-container-md :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group,.sky-responsive-container-lg :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group{flex-basis:100%}:host-context(.sky-theme-modern) .sky-date-range-picker-form-group{padding:0}@media (min-width: 768px){:host-context(.sky-theme-modern) .sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-right:20px}}.sky-theme-modern .sky-date-range-picker-form-group{padding:0}@media (min-width: 768px){.sky-theme-modern .sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-right:20px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SkyDatepickerModule }, { kind: "component", type: SkyDatepickerComponent, selector: "sky-datepicker", inputs: ["pickerClass"], outputs: ["calendarDateRangeChange", "dateFormatChange", "openChange"] }, { kind: "directive", type: SkyDatepickerInputDirective, selector: "[skyDatepickerInput]", inputs: ["dateFormat", "disabled", "maxDate", "minDate", "startAtDate", "skyDatepickerInput", "skyDatepickerNoValidate", "startingDay", "strict"] }, { kind: "pipe", type: SkyDateRangePickerEndDateResourceKeyPipe, name: "skyDateRangePickerEndDateResourceKey" }, { kind: "pipe", type: SkyDateRangePickerStartDateResourceKeyPipe, name: "skyDateRangePickerStartDateResourceKey" }, { kind: "ngmodule", type: SkyDatetimeResourcesModule }, { kind: "pipe", type: i1.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyInputBoxModule }, { kind: "component", type: i2$2.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled", "labelText", "characterLimit", "stacked", "helpPopoverTitle", "helpPopoverContent", "helpKey", "hintText", "errorsScreenReaderOnly"] }, { kind: "directive", type: i2$2.λ20, selector: "input:not([skyId]):not(.sky-form-control),select:not([skyId]):not(.sky-form-control),textarea:not([skyId]):not(.sky-form-control)", inputs: ["autocomplete"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4494
4415
  }
4495
4416
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerComponent, decorators: [{
4496
4417
  type: Component,
4497
- args: [{ selector: 'sky-date-range-picker', providers: [
4498
- SKY_DATE_RANGE_PICKER_VALUE_ACCESSOR,
4499
- SKY_DATE_RANGE_PICKER_VALIDATOR,
4500
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"isReady && formGroup\"\n class=\"sky-date-range-picker\"\n [formGroup]=\"formGroup\"\n>\n <div\n class=\"sky-date-range-picker-form-group\"\n [ngClass]=\"{\n 'sky-date-range-picker-last-input':\n !showStartDatePicker && !showEndDatePicker\n }\"\n >\n <sky-input-box\n [disabled]=\"disabled\"\n [helpPopoverContent]=\"helpPopoverContent\"\n [helpPopoverTitle]=\"helpPopoverTitle\"\n [labelText]=\"\n label || ('skyux_date_range_picker_default_label' | skyLibResources)\n \"\n [hintText]=\"hintText\"\n >\n <select\n class=\"sky-form-control\"\n formControlName=\"calculatorId\"\n [attr.id]=\"dateRangePickerId + '-select-calculator'\"\n (blur)=\"onFieldBlur()\"\n >\n <option\n *ngFor=\"let calculator of calculators\"\n [value]=\"calculator.calculatorId\"\n >\n {{ calculator.shortDescription }}\n </option>\n </select>\n </sky-input-box>\n </div>\n <div\n class=\"sky-date-range-picker-form-group\"\n [ngClass]=\"{\n 'sky-date-range-picker-last-input':\n showStartDatePicker && !showEndDatePicker\n }\"\n [hidden]=\"!showStartDatePicker\"\n >\n <sky-input-box [disabled]=\"disabled\">\n <label\n class=\"sky-control-label\"\n [attr.for]=\"dateRangePickerId + '-start-date'\"\n [ngClass]=\"{ 'sky-control-label-required': startDateRequired }\"\n >\n {{\n selectedCalculator?.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources\n }}\n </label>\n\n <sky-datepicker>\n <input\n class=\"sky-form-control\"\n formControlName=\"startDate\"\n [attr.aria-label]=\"\n label\n ? ('skyux_date_range_picker_default_aria_label'\n | skyLibResources\n : (selectedCalculator?.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources)\n : label)\n : (selectedCalculator?.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources)\n \"\n [attr.id]=\"dateRangePickerId + '-start-date'\"\n [required]=\"!!startDateRequired\"\n [dateFormat]=\"dateFormatOrDefault\"\n (blur)=\"onFieldBlur()\"\n skyDatepickerInput\n />\n </sky-datepicker>\n </sky-input-box>\n </div>\n\n <div\n class=\"sky-date-range-picker-form-group\"\n [ngClass]=\"{ 'sky-date-range-picker-last-input': showEndDatePicker }\"\n [hidden]=\"!showEndDatePicker\"\n >\n <sky-input-box [disabled]=\"disabled\">\n <label\n class=\"sky-control-label\"\n [attr.for]=\"dateRangePickerId + '-end-date'\"\n [ngClass]=\"{ 'sky-control-label-required': endDateRequired }\"\n >\n {{\n selectedCalculator?.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources\n }}\n </label>\n\n <sky-datepicker>\n <input\n class=\"sky-form-control\"\n formControlName=\"endDate\"\n skyDatepickerInput\n [attr.aria-label]=\"\n label\n ? ('skyux_date_range_picker_default_aria_label'\n | skyLibResources\n : (selectedCalculator?.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources)\n : label)\n : (selectedCalculator?.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources)\n \"\n [attr.id]=\"dateRangePickerId + '-end-date'\"\n [dateFormat]=\"dateFormatOrDefault\"\n [required]=\"!!endDateRequired\"\n (blur)=\"onFieldBlur()\"\n />\n </sky-datepicker>\n </sky-input-box>\n </div>\n</div>\n", styles: [":host{display:block}.sky-date-range-picker{display:flex}@media (max-width: 768px){.sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-bottom:var(--sky-margin-stacked-lg)}}:host .sky-date-range-picker{flex-direction:column}:host .sky-date-range-picker-form-group{flex-basis:100%}:host .sky-date-range-picker-form-group:not(:first-of-type){padding-left:initial}:host .sky-date-range-picker-form-group:not(:last-of-type){padding-right:initial}:host-context(.sky-responsive-container-xs) .sky-date-range-picker,:host-context(.sky-responsive-container-sm) .sky-date-range-picker,:host-context(.sky-responsive-container-md) .sky-date-range-picker,:host-context(.sky-responsive-container-lg) .sky-date-range-picker{flex-direction:column}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group{flex-basis:100%}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:first-of-type){padding-left:initial}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:last-of-type){padding-right:initial}@media (min-width: 768px){:host .sky-date-range-picker{flex-direction:initial}:host .sky-date-range-picker-form-group{flex-basis:33.3333333333%}:host .sky-date-range-picker-form-group:not(:first-of-type){padding-left:5px}:host .sky-date-range-picker-form-group:not(:last-of-type){padding-right:5px}}:host-context(.sky-responsive-container-sm) .sky-date-range-picker,:host-context(.sky-responsive-container-md) .sky-date-range-picker,:host-context(.sky-responsive-container-lg) .sky-date-range-picker{flex-direction:initial}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group{flex-basis:33.3333333333%}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:first-of-type){padding-left:5px}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:last-of-type){padding-right:5px}@media (min-width: 768px){:host-context(sky-filter-inline-item) .sky-date-range-picker-form-group{flex-basis:100%}}.sky-responsive-container-sm :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group,.sky-responsive-container-md :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group,.sky-responsive-container-lg :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group{flex-basis:100%}:host-context(.sky-theme-modern) .sky-date-range-picker-form-group{padding:0}@media (min-width: 768px){:host-context(.sky-theme-modern) .sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-right:20px}}.sky-theme-modern .sky-date-range-picker-form-group{padding:0}@media (min-width: 768px){.sky-theme-modern .sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-right:20px}}\n"] }]
4501
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyDateRangeService }, { type: i2$3.UntypedFormBuilder }, { type: i3.SkyAppLocaleProvider }, { type: i0.NgZone }, { type: i3$1.SkyThemeService, decorators: [{
4502
- type: Optional
4503
- }] }], propDecorators: { calculatorIds: [{
4418
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [
4419
+ CommonModule,
4420
+ FormsModule,
4421
+ ReactiveFormsModule,
4422
+ SkyDatepickerModule,
4423
+ SkyDateRangePickerEndDateResourceKeyPipe,
4424
+ SkyDateRangePickerStartDateResourceKeyPipe,
4425
+ SkyDatetimeResourcesModule,
4426
+ SkyInputBoxModule,
4427
+ ], providers: [
4428
+ {
4429
+ provide: NG_VALIDATORS,
4430
+ useExisting: SkyDateRangePickerComponent,
4431
+ multi: true,
4432
+ },
4433
+ {
4434
+ provide: NG_VALUE_ACCESSOR,
4435
+ useExisting: SkyDateRangePickerComponent,
4436
+ multi: true,
4437
+ },
4438
+ ], selector: 'sky-date-range-picker', standalone: true, template: "<div\n class=\"sky-date-range-picker\"\n [formGroup]=\"formGroup\"\n (focusout)=\"onBlur()\"\n>\n <div\n class=\"sky-date-range-picker-form-group\"\n [ngClass]=\"{\n 'sky-date-range-picker-last-input':\n !showStartDatePicker && !showEndDatePicker\n }\"\n >\n <sky-input-box\n [hasErrors]=\"hasErrors\"\n [helpPopoverContent]=\"helpPopoverContent\"\n [helpPopoverTitle]=\"helpPopoverTitle\"\n [hintText]=\"hintText\"\n [labelText]=\"\n label || ('skyux_date_range_picker_default_label' | skyLibResources)\n \"\n >\n <select\n formControlName=\"calculatorId\"\n [required]=\"isRequired()\"\n (blur)=\"onBlur()\"\n >\n <option\n *ngFor=\"let calculator of calculators\"\n [value]=\"calculator.calculatorId\"\n >\n {{\n calculator._shortDescriptionResourceKey\n ? (calculator._shortDescriptionResourceKey | skyLibResources)\n : calculator.shortDescription\n }}\n </option>\n </select>\n </sky-input-box>\n </div>\n <div\n class=\"sky-date-range-picker-form-group sky-date-range-datepicker-wrapper\"\n [hidden]=\"!showStartDatePicker\"\n [ngClass]=\"{\n 'sky-date-range-picker-last-input':\n showStartDatePicker && !showEndDatePicker\n }\"\n >\n <sky-input-box\n [errorsScreenReaderOnly]=\"true\"\n [hasErrors]=\"hasErrors\"\n [labelText]=\"\n selectedCalculator.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources\n \"\n >\n <sky-datepicker>\n <input\n formControlName=\"startDate\"\n name=\"startDate\"\n skyDatepickerInput\n type=\"text\"\n [attr.aria-label]=\"\n label\n ? ('skyux_date_range_picker_default_aria_label'\n | skyLibResources\n : (selectedCalculator.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources)\n : label)\n : (selectedCalculator.type\n | skyDateRangePickerStartDateResourceKey\n | skyLibResources)\n \"\n [dateFormat]=\"dateFormat\"\n [required]=\"\n showStartDatePicker && (startDateRequired || isRequired())\n \"\n />\n </sky-datepicker>\n </sky-input-box>\n </div>\n <div\n class=\"sky-date-range-picker-form-group sky-date-range-datepicker-wrapper\"\n [hidden]=\"!showEndDatePicker\"\n [ngClass]=\"{ 'sky-date-range-picker-last-input': showEndDatePicker }\"\n >\n <sky-input-box\n [errorsScreenReaderOnly]=\"true\"\n [hasErrors]=\"hasErrors\"\n [labelText]=\"\n selectedCalculator.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources\n \"\n >\n <sky-datepicker>\n <input\n formControlName=\"endDate\"\n name=\"endDate\"\n skyDatepickerInput\n type=\"text\"\n [attr.aria-label]=\"\n label\n ? ('skyux_date_range_picker_default_aria_label'\n | skyLibResources\n : (selectedCalculator.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources)\n : label)\n : (selectedCalculator.type\n | skyDateRangePickerEndDateResourceKey\n | skyLibResources)\n \"\n [dateFormat]=\"dateFormat\"\n [required]=\"showEndDatePicker && (endDateRequired || isRequired())\"\n />\n </sky-datepicker>\n </sky-input-box>\n </div>\n</div>\n", styles: [":host{display:block}.sky-date-range-picker{display:flex}@media (max-width: 768px){.sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-bottom:var(--sky-margin-stacked-lg)}}:host .sky-date-range-picker{flex-direction:column}:host .sky-date-range-picker-form-group{flex-basis:100%}:host .sky-date-range-picker-form-group:not(:first-of-type){padding-left:initial}:host .sky-date-range-picker-form-group:not(:last-of-type){padding-right:initial}:host-context(.sky-responsive-container-xs) .sky-date-range-picker,:host-context(.sky-responsive-container-sm) .sky-date-range-picker,:host-context(.sky-responsive-container-md) .sky-date-range-picker,:host-context(.sky-responsive-container-lg) .sky-date-range-picker{flex-direction:column}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group{flex-basis:100%}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:first-of-type){padding-left:initial}:host-context(.sky-responsive-container-xs) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:last-of-type){padding-right:initial}@media (min-width: 768px){:host .sky-date-range-picker{flex-direction:initial}:host .sky-date-range-picker-form-group{flex-basis:33.3333333333%}:host .sky-date-range-picker-form-group:not(:first-of-type){padding-left:5px}:host .sky-date-range-picker-form-group:not(:last-of-type){padding-right:5px}}:host-context(.sky-responsive-container-sm) .sky-date-range-picker,:host-context(.sky-responsive-container-md) .sky-date-range-picker,:host-context(.sky-responsive-container-lg) .sky-date-range-picker{flex-direction:initial}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group,:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group{flex-basis:33.3333333333%}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:first-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:first-of-type){padding-left:5px}:host-context(.sky-responsive-container-sm) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-date-range-picker-form-group:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-date-range-picker-form-group:not(:last-of-type){padding-right:5px}@media (min-width: 768px){:host-context(sky-filter-inline-item) .sky-date-range-picker-form-group{flex-basis:100%}}.sky-responsive-container-sm :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group,.sky-responsive-container-md :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group,.sky-responsive-container-lg :host-context(sky-filter-inline-item) .sky-date-range-picker-form-group{flex-basis:100%}:host-context(.sky-theme-modern) .sky-date-range-picker-form-group{padding:0}@media (min-width: 768px){:host-context(.sky-theme-modern) .sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-right:20px}}.sky-theme-modern .sky-date-range-picker-form-group{padding:0}@media (min-width: 768px){.sky-theme-modern .sky-date-range-picker-form-group:not(.sky-date-range-picker-last-input){margin-right:20px}}\n"] }]
4439
+ }], ctorParameters: () => [], propDecorators: { calculatorIds: [{
4504
4440
  type: Input
4505
4441
  }], dateFormat: [{
4506
4442
  type: Input
4507
4443
  }], disabled: [{
4508
- type: Input
4509
- }], label: [{
4510
- type: Input
4511
- }], hintText: [{
4512
- type: Input
4513
- }], startDateRequired: [{
4514
- type: Input
4444
+ type: Input,
4445
+ args: [{ transform: booleanAttribute }]
4515
4446
  }], endDateRequired: [{
4516
- type: Input
4447
+ type: Input,
4448
+ args: [{ transform: booleanAttribute }]
4517
4449
  }], helpPopoverContent: [{
4518
4450
  type: Input
4519
4451
  }], helpPopoverTitle: [{
4520
4452
  type: Input
4453
+ }], hintText: [{
4454
+ type: Input
4455
+ }], label: [{
4456
+ type: Input
4457
+ }], required: [{
4458
+ type: Input,
4459
+ args: [{ transform: booleanAttribute }]
4521
4460
  }], stacked: [{
4522
4461
  type: Input,
4523
4462
  args: [{ transform: booleanAttribute }]
4524
4463
  }, {
4525
4464
  type: HostBinding,
4526
4465
  args: ['class.sky-margin-stacked-lg']
4466
+ }], startDateRequired: [{
4467
+ type: Input,
4468
+ args: [{ transform: booleanAttribute }]
4527
4469
  }], display: [{
4528
4470
  type: HostBinding,
4529
4471
  args: ['style.display']
@@ -4531,41 +4473,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
4531
4473
 
4532
4474
  class SkyDateRangePickerModule {
4533
4475
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4534
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerModule, declarations: [SkyDateRangePickerComponent,
4535
- SkyDateRangePickerEndDateResourceKeyPipe,
4536
- SkyDateRangePickerStartDateResourceKeyPipe], imports: [CommonModule,
4537
- FormsModule,
4538
- ReactiveFormsModule,
4539
- SkyDatepickerModule,
4540
- SkyDatetimeResourcesModule,
4541
- SkyIdModule,
4542
- SkyInputBoxModule], exports: [SkyDateRangePickerComponent] }); }
4543
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerModule, imports: [CommonModule,
4544
- FormsModule,
4545
- ReactiveFormsModule,
4546
- SkyDatepickerModule,
4547
- SkyDatetimeResourcesModule,
4548
- SkyIdModule,
4549
- SkyInputBoxModule] }); }
4476
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerModule, imports: [SkyDateRangePickerComponent], exports: [SkyDateRangePickerComponent] }); }
4477
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerModule, imports: [SkyDateRangePickerComponent] }); }
4550
4478
  }
4551
4479
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyDateRangePickerModule, decorators: [{
4552
4480
  type: NgModule,
4553
4481
  args: [{
4554
- declarations: [
4555
- SkyDateRangePickerComponent,
4556
- SkyDateRangePickerEndDateResourceKeyPipe,
4557
- SkyDateRangePickerStartDateResourceKeyPipe,
4558
- ],
4559
- imports: [
4560
- CommonModule,
4561
- FormsModule,
4562
- ReactiveFormsModule,
4563
- SkyDatepickerModule,
4564
- SkyDatetimeResourcesModule,
4565
- SkyIdModule,
4566
- SkyInputBoxModule,
4567
- ],
4568
4482
  exports: [SkyDateRangePickerComponent],
4483
+ imports: [SkyDateRangePickerComponent],
4569
4484
  }]
4570
4485
  }] });
4571
4486
 
@@ -4923,15 +4838,15 @@ class SkyTimepickerComponent {
4923
4838
  /* istanbul ignore next */
4924
4839
  this.#overlayKeyupListener?.unsubscribe();
4925
4840
  }
4926
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyTimepickerComponent, deps: [{ token: i1.SkyAffixService }, { token: i0.ChangeDetectorRef }, { token: i1.SkyCoreAdapterService }, { token: i1.SkyOverlayService }, { token: i2$2.SkyInputBoxHostService, optional: true }, { token: i3$1.SkyThemeService, optional: true }, { token: SKY_STACKING_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
4927
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: SkyTimepickerComponent, selector: "sky-timepicker", outputs: { selectedTimeChanged: "selectedTimeChanged" }, viewQueries: [{ propertyName: "timepickerRef", first: true, predicate: ["timepickerRef"], descendants: true, read: ElementRef }, { propertyName: "timepickerTemplateRef", first: true, predicate: ["timepickerTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "triggerButtonRef", first: true, predicate: ["triggerButtonRef"], descendants: true, read: ElementRef }, { propertyName: "inputTemplateRef", first: true, predicate: ["inputTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "triggerButtonTemplateRef", first: true, predicate: ["triggerButtonTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<div class=\"sky-timepicker\">\n <ng-container *ngIf=\"!inputBoxHostService\">\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n <ng-container *ngTemplateOutlet=\"triggerButtonTemplateRef\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #inputTemplateRef>\n <ng-content />\n</ng-template>\n\n<ng-template #triggerButtonTemplateRef>\n <div class=\"sky-input-group-btn\">\n <button\n aria-haspopup=\"dialog\"\n class=\"sky-btn sky-btn-default sky-input-group-timepicker-btn\"\n type=\"button\"\n [attr.aria-controls]=\"isOpen ? timepickerId : null\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-label]=\"\n inputBoxHostService?.labelText\n ? ('skyux_timepicker_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_timepicker_button_label' | skyLibResources)\n \"\n [attr.id]=\"triggerButtonId\"\n [attr.title]=\"\n inputBoxHostService?.labelText\n ? ('skyux_timepicker_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_timepicker_button_label' | skyLibResources)\n \"\n [disabled]=\"disabled\"\n (click)=\"onTriggerButtonClick()\"\n #triggerButtonRef\n >\n <sky-icon icon=\"clock\" size=\"lg\" />\n </button>\n </div>\n</ng-template>\n\n<ng-template #timepickerTemplateRef>\n <div\n class=\"sky-timepicker-container sky-shadow sky-box sky-elevation-4\"\n role=\"dialog\"\n [attr.aria-labelledby]=\"triggerButtonId\"\n [attr.id]=\"timepickerId\"\n [class.sky-timepicker-hidden]=\"!isVisible\"\n #timepickerRef\n >\n <div class=\"sky-timepicker-content\">\n <section\n class=\"sky-timepicker-column\"\n [ngClass]=\"{ 'sky-timepicker-24hour': is8601 }\"\n >\n <ol>\n <li *ngFor=\"let hour of hours\">\n <button\n name=\"hour\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedHour === hour }\"\n (click)=\"setTime($event)\"\n >\n {{ hour }}\n </button>\n </li>\n </ol>\n </section>\n <section class=\"sky-timepicker-column\">\n <ol>\n <li *ngFor=\"let minute of minutes\">\n <button\n name=\"minute\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedMinute === minute }\"\n (click)=\"setTime($event)\"\n >\n {{ '00'.substring(0, 2 - minute.toString().length) + minute }}\n </button>\n </li>\n </ol>\n </section>\n <section *ngIf=\"!is8601\" class=\"sky-timepicker-column\">\n <ol>\n <li>\n <button\n name=\"meridie\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedMeridies === 'AM' }\"\n (click)=\"setTime($event)\"\n >\n AM\n </button>\n </li>\n <li>\n <button\n name=\"meridie\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedMeridies === 'PM' }\"\n (click)=\"setTime($event)\"\n >\n PM\n </button>\n </li>\n </ol>\n </section>\n </div>\n <div class=\"sky-timepicker-footer\">\n <section class=\"sky-timepicker-column\">\n <button\n class=\"sky-btn sky-btn-primary\"\n type=\"button\"\n (click)=\"onCloseButtonClick()\"\n >\n {{ 'skyux_timepicker_close' | skyLibResources }}\n </button>\n </section>\n </div>\n </div>\n</ng-template>\n", styles: [".sky-timepicker-container{position:fixed;font-size:15px;padding:5px;background-color:#eeeeef;border-radius:5px}.sky-timepicker-container :last-child ol{display:flex;flex-direction:column;height:100%}.sky-timepicker-container :last-child ol li{border-bottom:1px solid #e2e3e4;flex:1}.sky-timepicker-column{margin:5px}.sky-timepicker-column ol{border-top:1px solid #e2e3e4;border-right:1px solid #e2e3e4;border-bottom:1px solid #e2e3e4;border-left:1px solid #e2e3e4;column-gap:1px;columns:2;list-style-type:none;margin:0;padding:0}.sky-timepicker-column ol li{text-align:center;cursor:pointer;margin:0}.sky-timepicker-column ol li button{cursor:pointer}.sky-timepicker-column ol li button:focus{outline:thin dotted;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.sky-timepicker-column ol li button:hover{background-color:#eeeeef}.sky-timepicker-column ol li button:active{background-color:#e2e3e4}.sky-timepicker-column ol li button.sky-btn-active:hover{background-color:#c1e8fb}.sky-timepicker-column ol .sky-btn-active{background-color:#c1e8fb;box-shadow:inset 0 0 0 2px #00b4f1;border-radius:3px}.sky-timepicker-column.sky-timepicker-24hour ol{columns:4}.sky-timepicker-column.sky-timepicker-24hour ol li{border-bottom-width:0}.sky-timepicker-content{display:flex}.sky-timepicker-content button{background-color:#fff;border-width:0;padding:5px 15px;width:100%;height:100%}.sky-timepicker-footer{margin:0;padding:0 5px}.sky-timepicker-footer .sky-timepicker-column{margin-left:0;margin-right:0;width:100%}.sky-timepicker-hidden{visibility:hidden}.sky-timepicker-clock-icon-modern,.sky-theme-modern .sky-timepicker-clock-icon-default{display:none}.sky-theme-modern .sky-timepicker-clock-icon-modern{display:inline}.sky-theme-modern .sky-timepicker-container{background-color:#fff;border:solid 1px #cdcfd2;border-radius:6px;font-size:16px}.sky-theme-modern .sky-timepicker-container:focus-within{border:solid 2px #1870B8;padding:4px}.sky-theme-modern .sky-timepicker-container:last-child ol li{border-bottom:none}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol .sky-btn-default{border-width:1px;border-color:transparent;padding:4px 6px;outline:none}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:hover:not(.sky-btn-active){background-color:transparent}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol .sky-btn-active,.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:hover{box-shadow:inset 0 0 0 1px #00b4f1;border-radius:6px}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:active,.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:focus{outline:none;border-radius:6px;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol li button.sky-btn-active:hover,.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol .sky-btn-active{background-color:var(--sky-background-color-input-selected)}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-container{color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-container:not(:focus-within){border-color:#686c73}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-column ol{border-color:#686c73}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-column ol button{background-color:transparent;color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-column ol .sky-btn-active{background-color:#009cd1}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
4841
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyTimepickerComponent, deps: [{ token: i1$1.SkyAffixService }, { token: i0.ChangeDetectorRef }, { token: i1$1.SkyCoreAdapterService }, { token: i1$1.SkyOverlayService }, { token: i2$2.SkyInputBoxHostService, optional: true }, { token: i3.SkyThemeService, optional: true }, { token: SKY_STACKING_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
4842
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: SkyTimepickerComponent, selector: "sky-timepicker", outputs: { selectedTimeChanged: "selectedTimeChanged" }, viewQueries: [{ propertyName: "timepickerRef", first: true, predicate: ["timepickerRef"], descendants: true, read: ElementRef }, { propertyName: "timepickerTemplateRef", first: true, predicate: ["timepickerTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "triggerButtonRef", first: true, predicate: ["triggerButtonRef"], descendants: true, read: ElementRef }, { propertyName: "inputTemplateRef", first: true, predicate: ["inputTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "triggerButtonTemplateRef", first: true, predicate: ["triggerButtonTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<div class=\"sky-timepicker\">\n <ng-container *ngIf=\"!inputBoxHostService\">\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n <ng-container *ngTemplateOutlet=\"triggerButtonTemplateRef\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #inputTemplateRef>\n <ng-content />\n</ng-template>\n\n<ng-template #triggerButtonTemplateRef>\n <div class=\"sky-input-group-btn\">\n <button\n aria-haspopup=\"dialog\"\n class=\"sky-btn sky-btn-default sky-input-group-timepicker-btn\"\n type=\"button\"\n [attr.aria-controls]=\"isOpen ? timepickerId : null\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-label]=\"\n inputBoxHostService?.labelText\n ? ('skyux_timepicker_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_timepicker_button_label' | skyLibResources)\n \"\n [attr.id]=\"triggerButtonId\"\n [attr.title]=\"\n inputBoxHostService?.labelText\n ? ('skyux_timepicker_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_timepicker_button_label' | skyLibResources)\n \"\n [disabled]=\"disabled\"\n (click)=\"onTriggerButtonClick()\"\n #triggerButtonRef\n >\n <sky-icon icon=\"clock\" size=\"lg\" />\n </button>\n </div>\n</ng-template>\n\n<ng-template #timepickerTemplateRef>\n <div\n class=\"sky-timepicker-container sky-shadow sky-box sky-elevation-4\"\n role=\"dialog\"\n [attr.aria-labelledby]=\"triggerButtonId\"\n [attr.id]=\"timepickerId\"\n [class.sky-timepicker-hidden]=\"!isVisible\"\n #timepickerRef\n >\n <div class=\"sky-timepicker-content\">\n <section\n class=\"sky-timepicker-column\"\n [ngClass]=\"{ 'sky-timepicker-24hour': is8601 }\"\n >\n <ol>\n <li *ngFor=\"let hour of hours\">\n <button\n name=\"hour\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedHour === hour }\"\n (click)=\"setTime($event)\"\n >\n {{ hour }}\n </button>\n </li>\n </ol>\n </section>\n <section class=\"sky-timepicker-column\">\n <ol>\n <li *ngFor=\"let minute of minutes\">\n <button\n name=\"minute\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedMinute === minute }\"\n (click)=\"setTime($event)\"\n >\n {{ '00'.substring(0, 2 - minute.toString().length) + minute }}\n </button>\n </li>\n </ol>\n </section>\n <section *ngIf=\"!is8601\" class=\"sky-timepicker-column\">\n <ol>\n <li>\n <button\n name=\"meridie\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedMeridies === 'AM' }\"\n (click)=\"setTime($event)\"\n >\n AM\n </button>\n </li>\n <li>\n <button\n name=\"meridie\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedMeridies === 'PM' }\"\n (click)=\"setTime($event)\"\n >\n PM\n </button>\n </li>\n </ol>\n </section>\n </div>\n <div class=\"sky-timepicker-footer\">\n <section class=\"sky-timepicker-column\">\n <button\n class=\"sky-btn sky-btn-primary\"\n type=\"button\"\n (click)=\"onCloseButtonClick()\"\n >\n {{ 'skyux_timepicker_close' | skyLibResources }}\n </button>\n </section>\n </div>\n </div>\n</ng-template>\n", styles: [".sky-timepicker-container{position:fixed;font-size:15px;padding:5px;background-color:#eeeeef;border-radius:5px}.sky-timepicker-container :last-child ol{display:flex;flex-direction:column;height:100%}.sky-timepicker-container :last-child ol li{border-bottom:1px solid #e2e3e4;flex:1}.sky-timepicker-column{margin:5px}.sky-timepicker-column ol{border-top:1px solid #e2e3e4;border-right:1px solid #e2e3e4;border-bottom:1px solid #e2e3e4;border-left:1px solid #e2e3e4;column-gap:1px;columns:2;list-style-type:none;margin:0;padding:0}.sky-timepicker-column ol li{text-align:center;cursor:pointer;margin:0}.sky-timepicker-column ol li button{cursor:pointer}.sky-timepicker-column ol li button:focus{outline:thin dotted;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.sky-timepicker-column ol li button:hover{background-color:#eeeeef}.sky-timepicker-column ol li button:active{background-color:#e2e3e4}.sky-timepicker-column ol li button.sky-btn-active:hover{background-color:#c1e8fb}.sky-timepicker-column ol .sky-btn-active{background-color:#c1e8fb;box-shadow:inset 0 0 0 2px #00b4f1;border-radius:3px}.sky-timepicker-column.sky-timepicker-24hour ol{columns:4}.sky-timepicker-column.sky-timepicker-24hour ol li{border-bottom-width:0}.sky-timepicker-content{display:flex}.sky-timepicker-content button{background-color:#fff;border-width:0;padding:5px 15px;width:100%;height:100%}.sky-timepicker-footer{margin:0;padding:0 5px}.sky-timepicker-footer .sky-timepicker-column{margin-left:0;margin-right:0;width:100%}.sky-timepicker-hidden{visibility:hidden}.sky-timepicker-clock-icon-modern,.sky-theme-modern .sky-timepicker-clock-icon-default{display:none}.sky-theme-modern .sky-timepicker-clock-icon-modern{display:inline}.sky-theme-modern .sky-timepicker-container{background-color:#fff;border:solid 1px #cdcfd2;border-radius:6px;font-size:16px}.sky-theme-modern .sky-timepicker-container:focus-within{border:solid 2px #1870B8;padding:4px}.sky-theme-modern .sky-timepicker-container:last-child ol li{border-bottom:none}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol .sky-btn-default{border-width:1px;border-color:transparent;padding:4px 6px;outline:none}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:hover:not(.sky-btn-active){background-color:transparent}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol .sky-btn-active,.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:hover{box-shadow:inset 0 0 0 1px #00b4f1;border-radius:6px}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:active,.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:focus{outline:none;border-radius:6px;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol li button.sky-btn-active:hover,.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol .sky-btn-active{background-color:var(--sky-background-color-input-selected)}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-container{color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-container:not(:focus-within){border-color:#686c73}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-column ol{border-color:#686c73}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-column ol button{background-color:transparent;color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-column ol .sky-btn-active{background-color:#009cd1}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "pipe", type: i1.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
4928
4843
  }
4929
4844
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: SkyTimepickerComponent, decorators: [{
4930
4845
  type: Component,
4931
4846
  args: [{ selector: 'sky-timepicker', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-timepicker\">\n <ng-container *ngIf=\"!inputBoxHostService\">\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n <ng-container *ngTemplateOutlet=\"triggerButtonTemplateRef\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #inputTemplateRef>\n <ng-content />\n</ng-template>\n\n<ng-template #triggerButtonTemplateRef>\n <div class=\"sky-input-group-btn\">\n <button\n aria-haspopup=\"dialog\"\n class=\"sky-btn sky-btn-default sky-input-group-timepicker-btn\"\n type=\"button\"\n [attr.aria-controls]=\"isOpen ? timepickerId : null\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-label]=\"\n inputBoxHostService?.labelText\n ? ('skyux_timepicker_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_timepicker_button_label' | skyLibResources)\n \"\n [attr.id]=\"triggerButtonId\"\n [attr.title]=\"\n inputBoxHostService?.labelText\n ? ('skyux_timepicker_button_label_context'\n | skyLibResources: inputBoxHostService?.labelText)\n : ('skyux_timepicker_button_label' | skyLibResources)\n \"\n [disabled]=\"disabled\"\n (click)=\"onTriggerButtonClick()\"\n #triggerButtonRef\n >\n <sky-icon icon=\"clock\" size=\"lg\" />\n </button>\n </div>\n</ng-template>\n\n<ng-template #timepickerTemplateRef>\n <div\n class=\"sky-timepicker-container sky-shadow sky-box sky-elevation-4\"\n role=\"dialog\"\n [attr.aria-labelledby]=\"triggerButtonId\"\n [attr.id]=\"timepickerId\"\n [class.sky-timepicker-hidden]=\"!isVisible\"\n #timepickerRef\n >\n <div class=\"sky-timepicker-content\">\n <section\n class=\"sky-timepicker-column\"\n [ngClass]=\"{ 'sky-timepicker-24hour': is8601 }\"\n >\n <ol>\n <li *ngFor=\"let hour of hours\">\n <button\n name=\"hour\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedHour === hour }\"\n (click)=\"setTime($event)\"\n >\n {{ hour }}\n </button>\n </li>\n </ol>\n </section>\n <section class=\"sky-timepicker-column\">\n <ol>\n <li *ngFor=\"let minute of minutes\">\n <button\n name=\"minute\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedMinute === minute }\"\n (click)=\"setTime($event)\"\n >\n {{ '00'.substring(0, 2 - minute.toString().length) + minute }}\n </button>\n </li>\n </ol>\n </section>\n <section *ngIf=\"!is8601\" class=\"sky-timepicker-column\">\n <ol>\n <li>\n <button\n name=\"meridie\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedMeridies === 'AM' }\"\n (click)=\"setTime($event)\"\n >\n AM\n </button>\n </li>\n <li>\n <button\n name=\"meridie\"\n type=\"button\"\n [ngClass]=\"{ 'sky-btn-active': selectedMeridies === 'PM' }\"\n (click)=\"setTime($event)\"\n >\n PM\n </button>\n </li>\n </ol>\n </section>\n </div>\n <div class=\"sky-timepicker-footer\">\n <section class=\"sky-timepicker-column\">\n <button\n class=\"sky-btn sky-btn-primary\"\n type=\"button\"\n (click)=\"onCloseButtonClick()\"\n >\n {{ 'skyux_timepicker_close' | skyLibResources }}\n </button>\n </section>\n </div>\n </div>\n</ng-template>\n", styles: [".sky-timepicker-container{position:fixed;font-size:15px;padding:5px;background-color:#eeeeef;border-radius:5px}.sky-timepicker-container :last-child ol{display:flex;flex-direction:column;height:100%}.sky-timepicker-container :last-child ol li{border-bottom:1px solid #e2e3e4;flex:1}.sky-timepicker-column{margin:5px}.sky-timepicker-column ol{border-top:1px solid #e2e3e4;border-right:1px solid #e2e3e4;border-bottom:1px solid #e2e3e4;border-left:1px solid #e2e3e4;column-gap:1px;columns:2;list-style-type:none;margin:0;padding:0}.sky-timepicker-column ol li{text-align:center;cursor:pointer;margin:0}.sky-timepicker-column ol li button{cursor:pointer}.sky-timepicker-column ol li button:focus{outline:thin dotted;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.sky-timepicker-column ol li button:hover{background-color:#eeeeef}.sky-timepicker-column ol li button:active{background-color:#e2e3e4}.sky-timepicker-column ol li button.sky-btn-active:hover{background-color:#c1e8fb}.sky-timepicker-column ol .sky-btn-active{background-color:#c1e8fb;box-shadow:inset 0 0 0 2px #00b4f1;border-radius:3px}.sky-timepicker-column.sky-timepicker-24hour ol{columns:4}.sky-timepicker-column.sky-timepicker-24hour ol li{border-bottom-width:0}.sky-timepicker-content{display:flex}.sky-timepicker-content button{background-color:#fff;border-width:0;padding:5px 15px;width:100%;height:100%}.sky-timepicker-footer{margin:0;padding:0 5px}.sky-timepicker-footer .sky-timepicker-column{margin-left:0;margin-right:0;width:100%}.sky-timepicker-hidden{visibility:hidden}.sky-timepicker-clock-icon-modern,.sky-theme-modern .sky-timepicker-clock-icon-default{display:none}.sky-theme-modern .sky-timepicker-clock-icon-modern{display:inline}.sky-theme-modern .sky-timepicker-container{background-color:#fff;border:solid 1px #cdcfd2;border-radius:6px;font-size:16px}.sky-theme-modern .sky-timepicker-container:focus-within{border:solid 2px #1870B8;padding:4px}.sky-theme-modern .sky-timepicker-container:last-child ol li{border-bottom:none}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol .sky-btn-default{border-width:1px;border-color:transparent;padding:4px 6px;outline:none}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:hover:not(.sky-btn-active){background-color:transparent}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol .sky-btn-active,.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:hover{box-shadow:inset 0 0 0 1px #00b4f1;border-radius:6px}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:active,.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol button:focus{outline:none;border-radius:6px;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol li button.sky-btn-active:hover,.sky-theme-modern .sky-timepicker-container .sky-timepicker-column ol .sky-btn-active{background-color:var(--sky-background-color-input-selected)}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-container{color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-container:not(:focus-within){border-color:#686c73}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-column ol{border-color:#686c73}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-column ol button{background-color:transparent;color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-timepicker-column ol .sky-btn-active{background-color:#009cd1}\n"] }]
4932
- }], ctorParameters: () => [{ type: i1.SkyAffixService }, { type: i0.ChangeDetectorRef }, { type: i1.SkyCoreAdapterService }, { type: i1.SkyOverlayService }, { type: i2$2.SkyInputBoxHostService, decorators: [{
4847
+ }], ctorParameters: () => [{ type: i1$1.SkyAffixService }, { type: i0.ChangeDetectorRef }, { type: i1$1.SkyCoreAdapterService }, { type: i1$1.SkyOverlayService }, { type: i2$2.SkyInputBoxHostService, decorators: [{
4933
4848
  type: Optional
4934
- }] }, { type: i3$1.SkyThemeService, decorators: [{
4849
+ }] }, { type: i3.SkyThemeService, decorators: [{
4935
4850
  type: Optional
4936
4851
  }] }, { type: undefined, decorators: [{
4937
4852
  type: Optional