@ardium-ui/ui 5.0.0-alpha.90 → 5.0.0-alpha.92

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.
@@ -418,8 +418,8 @@ class _NgModelComponentBase extends _FocusableComponentBase {
418
418
  }
419
419
  //! event handlers
420
420
  onFocus(event) {
421
- super.onFocus(event);
422
421
  this._shouldEmitTouched = false;
422
+ super.onFocus(event);
423
423
  }
424
424
  onBlur(event) {
425
425
  this._shouldEmitTouched = true;
@@ -6018,8 +6018,7 @@ class _AbstractDateInput extends _FormFieldComponentBase {
6018
6018
  //! control value accessor
6019
6019
  this.value = model(null);
6020
6020
  //! output events
6021
- this.isOpen = signal(false);
6022
- this.isOpenChange = output();
6021
+ this.isOpen = model(false);
6023
6022
  this.openEvent = output({ alias: 'open' });
6024
6023
  this.closeEvent = output({ alias: 'close' });
6025
6024
  //! appearance
@@ -6136,9 +6135,6 @@ class _AbstractDateInput extends _FormFieldComponentBase {
6136
6135
  _emitChange() {
6137
6136
  this._onChangeRegistered?.(this.value());
6138
6137
  }
6139
- _onTouched() {
6140
- this._onTouchedRegistered?.();
6141
- }
6142
6138
  //! lifecycle hooks
6143
6139
  ngOnChanges(changes) {
6144
6140
  if (changes['UTC']) {
@@ -6259,7 +6255,6 @@ class _AbstractDateInput extends _FormFieldComponentBase {
6259
6255
  this.activeView.set(startView);
6260
6256
  }
6261
6257
  this.isOpen.set(true);
6262
- this.isOpenChange.emit(true);
6263
6258
  this._createOverlay();
6264
6259
  this.openEvent.emit();
6265
6260
  }
@@ -6267,13 +6262,11 @@ class _AbstractDateInput extends _FormFieldComponentBase {
6267
6262
  if (!this.isOpen())
6268
6263
  return;
6269
6264
  this.isOpen.set(false);
6270
- this.isOpenChange.emit(false);
6271
6265
  this._destroyOverlay();
6272
- this._onTouched();
6273
6266
  this.closeEvent.emit();
6274
6267
  }
6275
6268
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: _AbstractDateInput, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
6276
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.15", type: _AbstractDateInput, isStandalone: true, inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, calendarDisabled: { classPropertyName: "calendarDisabled", publicName: "calendarDisabled", isSignal: true, isRequired: false, transformFunction: null }, calendarHidden: { classPropertyName: "calendarHidden", publicName: "calendarHidden", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, dropdownAppearance: { classPropertyName: "dropdownAppearance", publicName: "dropdownAppearance", isSignal: true, isRequired: false, transformFunction: null }, dropdownVariant: { classPropertyName: "dropdownVariant", publicName: "dropdownVariant", isSignal: true, isRequired: false, transformFunction: null }, activeView: { classPropertyName: "activeView", publicName: "activeView", isSignal: true, isRequired: false, transformFunction: null }, startView: { classPropertyName: "startView", publicName: "startView", isSignal: true, isRequired: false, transformFunction: null }, activeYear: { classPropertyName: "activeYear", publicName: "activeYear", isSignal: true, isRequired: false, transformFunction: null }, activeMonth: { classPropertyName: "activeMonth", publicName: "activeMonth", isSignal: true, isRequired: false, transformFunction: null }, firstWeekday: { classPropertyName: "firstWeekday", publicName: "firstWeekday", isSignal: true, isRequired: false, transformFunction: null }, multipleYearPageChangeModifier: { classPropertyName: "multipleYearPageChangeModifier", publicName: "multipleYearPageChangeModifier", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, UTC: { classPropertyName: "UTC", publicName: "UTC", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, hideFloatingMonth: { classPropertyName: "hideFloatingMonth", publicName: "hideFloatingMonth", isSignal: true, isRequired: false, transformFunction: null }, useAcceptButtonToSelect: { classPropertyName: "useAcceptButtonToSelect", publicName: "useAcceptButtonToSelect", isSignal: true, isRequired: false, transformFunction: null }, calendarDaysViewHeaderDateFormat: { classPropertyName: "calendarDaysViewHeaderDateFormat", publicName: "calendarDaysViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarYearsViewHeaderDateFormat: { classPropertyName: "calendarYearsViewHeaderDateFormat", publicName: "calendarYearsViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarMonthsViewHeaderDateFormat: { classPropertyName: "calendarMonthsViewHeaderDateFormat", publicName: "calendarMonthsViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarWeekdayDateFormat: { classPropertyName: "calendarWeekdayDateFormat", publicName: "calendarWeekdayDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarWeekdayTitleDateFormat: { classPropertyName: "calendarWeekdayTitleDateFormat", publicName: "calendarWeekdayTitleDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarFloatingMonthDateFormat: { classPropertyName: "calendarFloatingMonthDateFormat", publicName: "calendarFloatingMonthDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarFloatingMonthTitleDateFormat: { classPropertyName: "calendarFloatingMonthTitleDateFormat", publicName: "calendarFloatingMonthTitleDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarYearDateFormat: { classPropertyName: "calendarYearDateFormat", publicName: "calendarYearDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarMonthDateFormat: { classPropertyName: "calendarMonthDateFormat", publicName: "calendarMonthDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarDayDateFormat: { classPropertyName: "calendarDayDateFormat", publicName: "calendarDayDateFormat", isSignal: true, isRequired: false, transformFunction: null }, acceptButtonText: { classPropertyName: "acceptButtonText", publicName: "acceptButtonText", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonText: { classPropertyName: "cancelButtonText", publicName: "cancelButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", isOpenChange: "isOpenChange", openEvent: "open", closeEvent: "close", activeView: "activeViewChange", activeYear: "activeYearChange", activeMonth: "activeMonthChange", yearSelect: "yearSelect", monthSelect: "monthSelect" }, queries: [{ propertyName: "valueTemplate", first: true, predicate: ArdDateInputValueTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarIconTemplate", first: true, predicate: ArdDateInputCalendarIconTemplateDirective, descendants: true, isSignal: true }, { propertyName: "acceptButtonsTemplate", first: true, predicate: ArdDateInputAcceptButtonsTemplateDirective, descendants: true, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: ArdDateInputPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdDateInputSuffixTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dropdownHost", first: true, predicate: ["dropdownHost"], descendants: true, isSignal: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, isSignal: true }, { propertyName: "dropdownPanel", first: true, predicate: ArdiumDropdownPanelComponent, descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
6269
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.15", type: _AbstractDateInput, isStandalone: true, inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, calendarDisabled: { classPropertyName: "calendarDisabled", publicName: "calendarDisabled", isSignal: true, isRequired: false, transformFunction: null }, calendarHidden: { classPropertyName: "calendarHidden", publicName: "calendarHidden", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, dropdownAppearance: { classPropertyName: "dropdownAppearance", publicName: "dropdownAppearance", isSignal: true, isRequired: false, transformFunction: null }, dropdownVariant: { classPropertyName: "dropdownVariant", publicName: "dropdownVariant", isSignal: true, isRequired: false, transformFunction: null }, activeView: { classPropertyName: "activeView", publicName: "activeView", isSignal: true, isRequired: false, transformFunction: null }, startView: { classPropertyName: "startView", publicName: "startView", isSignal: true, isRequired: false, transformFunction: null }, activeYear: { classPropertyName: "activeYear", publicName: "activeYear", isSignal: true, isRequired: false, transformFunction: null }, activeMonth: { classPropertyName: "activeMonth", publicName: "activeMonth", isSignal: true, isRequired: false, transformFunction: null }, firstWeekday: { classPropertyName: "firstWeekday", publicName: "firstWeekday", isSignal: true, isRequired: false, transformFunction: null }, multipleYearPageChangeModifier: { classPropertyName: "multipleYearPageChangeModifier", publicName: "multipleYearPageChangeModifier", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, UTC: { classPropertyName: "UTC", publicName: "UTC", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, hideFloatingMonth: { classPropertyName: "hideFloatingMonth", publicName: "hideFloatingMonth", isSignal: true, isRequired: false, transformFunction: null }, useAcceptButtonToSelect: { classPropertyName: "useAcceptButtonToSelect", publicName: "useAcceptButtonToSelect", isSignal: true, isRequired: false, transformFunction: null }, calendarDaysViewHeaderDateFormat: { classPropertyName: "calendarDaysViewHeaderDateFormat", publicName: "calendarDaysViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarYearsViewHeaderDateFormat: { classPropertyName: "calendarYearsViewHeaderDateFormat", publicName: "calendarYearsViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarMonthsViewHeaderDateFormat: { classPropertyName: "calendarMonthsViewHeaderDateFormat", publicName: "calendarMonthsViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarWeekdayDateFormat: { classPropertyName: "calendarWeekdayDateFormat", publicName: "calendarWeekdayDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarWeekdayTitleDateFormat: { classPropertyName: "calendarWeekdayTitleDateFormat", publicName: "calendarWeekdayTitleDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarFloatingMonthDateFormat: { classPropertyName: "calendarFloatingMonthDateFormat", publicName: "calendarFloatingMonthDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarFloatingMonthTitleDateFormat: { classPropertyName: "calendarFloatingMonthTitleDateFormat", publicName: "calendarFloatingMonthTitleDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarYearDateFormat: { classPropertyName: "calendarYearDateFormat", publicName: "calendarYearDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarMonthDateFormat: { classPropertyName: "calendarMonthDateFormat", publicName: "calendarMonthDateFormat", isSignal: true, isRequired: false, transformFunction: null }, calendarDayDateFormat: { classPropertyName: "calendarDayDateFormat", publicName: "calendarDayDateFormat", isSignal: true, isRequired: false, transformFunction: null }, acceptButtonText: { classPropertyName: "acceptButtonText", publicName: "acceptButtonText", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonText: { classPropertyName: "cancelButtonText", publicName: "cancelButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", isOpen: "isOpenChange", openEvent: "open", closeEvent: "close", activeView: "activeViewChange", activeYear: "activeYearChange", activeMonth: "activeMonthChange", yearSelect: "yearSelect", monthSelect: "monthSelect" }, queries: [{ propertyName: "valueTemplate", first: true, predicate: ArdDateInputValueTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarIconTemplate", first: true, predicate: ArdDateInputCalendarIconTemplateDirective, descendants: true, isSignal: true }, { propertyName: "acceptButtonsTemplate", first: true, predicate: ArdDateInputAcceptButtonsTemplateDirective, descendants: true, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: ArdDateInputPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdDateInputSuffixTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dropdownHost", first: true, predicate: ["dropdownHost"], descendants: true, isSignal: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, isSignal: true }, { propertyName: "dropdownPanel", first: true, predicate: ArdiumDropdownPanelComponent, descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
6277
6270
  }
6278
6271
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: _AbstractDateInput, decorators: [{
6279
6272
  type: Directive
@@ -6436,6 +6429,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
6436
6429
  args: [{ standalone: true, selector: 'ard-calendar > ng-template[_ard-tmp-repository]' }]
6437
6430
  }], ctorParameters: () => [{ type: i0.TemplateRef }] });
6438
6431
 
6432
+ function isMonthOutOfRange(month, year, min, max) {
6433
+ const dateForMinComparison = new Date(year, month + 1, 0); // last day of month
6434
+ if (isDefined(min) && dateForMinComparison < min)
6435
+ return -1;
6436
+ const dateForMaxComparison = new Date(year, month, 1); // first day of month
6437
+ if (isDefined(max) && dateForMaxComparison > max)
6438
+ return 1;
6439
+ return 0;
6440
+ }
6441
+ function getCalendarMonthsArray(year, min, max) {
6442
+ const months = [];
6443
+ for (let month = 0; month < 12; month++) {
6444
+ const monthData = {
6445
+ value: month,
6446
+ valueDate: new Date(year, month, 2),
6447
+ disabled: !!isMonthOutOfRange(month, year, min, max),
6448
+ };
6449
+ months.push(monthData);
6450
+ }
6451
+ return months;
6452
+ }
6453
+
6439
6454
  /**
6440
6455
  * Generates a layout array to be used to create a calendar page for the given year and month.
6441
6456
  *
@@ -6520,757 +6535,506 @@ function isDayOutOfRange(date, min, max) {
6520
6535
  return 0;
6521
6536
  }
6522
6537
 
6523
- function isMonthOutOfRange(month, year, min, max) {
6524
- const dateForMinComparison = new Date(year, month + 1, 0); // last day of month
6525
- if (isDefined(min) && dateForMinComparison < min)
6526
- return -1;
6527
- const dateForMaxComparison = new Date(year, month, 1); // first day of month
6528
- if (isDefined(max) && dateForMaxComparison > max)
6529
- return 1;
6530
- return 0;
6531
- }
6532
- function getCalendarMonthsArray(year, min, max) {
6533
- const months = [];
6534
- for (let month = 0; month < 12; month++) {
6535
- const monthData = {
6536
- value: month,
6537
- valueDate: new Date(year, month, 2),
6538
- disabled: !!isMonthOutOfRange(month, year, min, max),
6539
- };
6540
- months.push(monthData);
6541
- }
6542
- return months;
6543
- }
6544
-
6545
- function getCalendarYearsArray(startYear, yearCount, min, max) {
6546
- return new Array(yearCount).fill(startYear).map((v, i) => ({ value: v + i, valueDate: new Date(v + i, 1, 1), disabled: !!isYearOutOfRange(v + i, min, max) }));
6547
- }
6548
- function isYearOutOfRange(year, min, max) {
6549
- const dateForMinComparison = new Date(year, 11, 31);
6550
- if (isDefined(min) && dateForMinComparison < min)
6551
- return -1;
6552
- const dateForMaxComparison = new Date(year, 0, 1);
6553
- if (isDefined(max) && dateForMaxComparison > max)
6554
- return 1;
6555
- return 0;
6538
+ const ARD_ICON_BUTTON_DEFAULTS = new InjectionToken('ard-icon-button-defaults', {
6539
+ factory: () => ({ ..._simpleButtonDefaults, ..._focusableComponentDefaults }),
6540
+ });
6541
+ function provideIconButtonDefaults(config) {
6542
+ return { provide: ARD_ICON_BUTTON_DEFAULTS, useValue: { ..._simpleButtonDefaults, ..._focusableComponentDefaults, ...config } };
6556
6543
  }
6557
6544
 
6558
- class _AbstractCalendar extends _FormFieldComponentBase {
6545
+ class ArdiumIconButtonComponent extends _FocusableComponentBase {
6559
6546
  constructor(defaults) {
6560
6547
  super(defaults);
6561
- this.TODAY = computed(() => createDate(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), this.UTC()));
6562
- //! appearance
6548
+ this.wrapperClasses = input('');
6549
+ this.type = input(this._DEFAULTS.type);
6550
+ this.ariaLabel = input('');
6551
+ //! button settings
6563
6552
  this.color = input(this._DEFAULTS.color);
6564
- this.ngClasses = computed(() => [`ard-color-${this.color()}`].join(' '));
6565
- //! active view
6566
- this.activeView = model(this._DEFAULTS.activeView);
6567
- this.activeYear = model(this._DEFAULTS.activeYear);
6568
- this.activeMonth = model(this._DEFAULTS.activeMonth);
6569
- this.activePageChange = output();
6570
- this.firstWeekday = input(this._DEFAULTS.firstWeekday, {
6571
- transform: v => {
6572
- const value = coerceNumberProperty(v, this._DEFAULTS.firstWeekday);
6573
- if (!Number.isInteger(value)) {
6574
- console.error(new Error(`ARD-NF${this.componentId}1A: [firstWeekday] must be a positive integer, got "${value}". Using default value instead.`));
6575
- return this._DEFAULTS.firstWeekday;
6576
- }
6577
- if (value < 0 || value > 6) {
6578
- console.error(new Error(`ARD-NF${this.componentId}1B: [firstWeekday] must be between 0 and 6, got "${value}". Using modulo operator to adjust the value.`));
6579
- }
6580
- return value % 7;
6581
- },
6582
- });
6583
- this.multipleYearPageChangeModifier = input(this._DEFAULTS.multipleYearPageChangeModifier, {
6584
- transform: v => {
6585
- const value = coerceNumberProperty(v, this._DEFAULTS.multipleYearPageChangeModifier);
6586
- if (!Number.isInteger(value) || value < 1) {
6587
- console.error(new Error(`ARD-NF${this.componentId}2: [multipleYearPageChangeModifier] must be a positive integer, got "${value}". Using default value instead.`));
6588
- return this._DEFAULTS.multipleYearPageChangeModifier;
6589
- }
6590
- return value;
6591
- },
6592
- });
6593
- this.multipleYearOffset = input(this._DEFAULTS.multipleYearOffset, {
6594
- transform: v => {
6595
- const value = coerceNumberProperty(v, this._DEFAULTS.multipleYearOffset);
6596
- if (!Number.isInteger(value) || value < 0) {
6597
- console.error(new Error(`ARD-NF${this.componentId}3: [multipleYearOffset] must be a non-negative integer, got "${value}". Using default value instead.`));
6598
- return this._DEFAULTS.multipleYearOffset;
6599
- }
6600
- return value;
6601
- },
6602
- });
6603
- this.multipleYearPageSize = input(this._DEFAULTS.multipleYearPageSize, {
6604
- transform: v => {
6605
- const value = coerceNumberProperty(v, this._DEFAULTS.multipleYearPageSize);
6606
- if (!Number.isInteger(value) || value < 1) {
6607
- console.error(new Error(`ARD-NF${this.componentId}5: [multipleYearPageSize] must be a positive integer, got "${value}". Using default value instead.`));
6608
- return this._DEFAULTS.multipleYearPageSize;
6609
- }
6610
- return value;
6611
- },
6612
- });
6613
- this.multiCalendarLocation = input(this._DEFAULTS.multiCalendarLocation);
6614
- this.autoFocus = input(this._DEFAULTS.autoFocus, { transform: v => coerceBooleanProperty(v) });
6615
- this.staticHeight = input(this._DEFAULTS.staticHeight, { transform: v => coerceBooleanProperty(v) });
6616
- this.hideFloatingMonth = input(this._DEFAULTS.hideFloatingMonth, {
6553
+ this.lightColoring = input(this._DEFAULTS.lightColoring, {
6617
6554
  transform: v => coerceBooleanProperty(v),
6618
6555
  });
6619
- //! value
6620
- this.selectionStart = signal(null);
6621
- this.selectionEnd = signal(null);
6622
- this.yearSelect = output();
6623
- this.monthSelect = output();
6624
- this.min = input(this._DEFAULTS.min, {
6625
- transform: v => (v === null ? null : coerceDateProperty(v, this._DEFAULTS.min)),
6626
- });
6627
- this.max = input(this._DEFAULTS.max, {
6628
- transform: v => (v === null ? null : coerceDateProperty(v, this._DEFAULTS.max)),
6556
+ this.compact = input(this._DEFAULTS.compact, { transform: v => coerceBooleanProperty(v) });
6557
+ this.pointerEventsWhenDisabled = input(this._DEFAULTS.pointerEventsWhenDisabled, {
6558
+ transform: v => coerceBooleanProperty(v),
6629
6559
  });
6630
- this.UTC = input(this._DEFAULTS.UTC, { transform: v => coerceBooleanProperty(v) });
6631
- this._UTCAfterInit = signal(this._DEFAULTS.UTC);
6632
- this.filter = input(this._DEFAULTS.filter);
6633
- this.isDayFilteredOut = computed(() => {
6634
- return (day, month = this.activeMonth(), year = this.activeYear()) => {
6635
- return this.filter()?.(createDate(year, month, day, this.UTC())) ?? false;
6636
- };
6560
+ this.ngClasses = computed(() => [
6561
+ 'ard-appearance-transparent',
6562
+ `ard-color-${this.disabled() ? ComponentColor.None : this.color()}`,
6563
+ this.lightColoring() ? `ard-light-coloring` : '',
6564
+ this.compact() ? 'ard-compact' : '',
6565
+ ].join(' '));
6566
+ }
6567
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumIconButtonComponent, deps: [{ token: ARD_ICON_BUTTON_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
6568
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: ArdiumIconButtonComponent, isStandalone: false, selector: "ard-icon-button", inputs: { wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, lightColoring: { classPropertyName: "lightColoring", publicName: "lightColoring", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, pointerEventsWhenDisabled: { classPropertyName: "pointerEventsWhenDisabled", publicName: "pointerEventsWhenDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ard-button-with-pointer-events-when-disabled": "pointerEventsWhenDisabled()" } }, usesInheritance: true, ngImport: i0, template: "<button\r\n class=\"ard-icon-button\"\r\n [type]=\"type()\"\r\n [ngClass]=\"ngClasses()\"\r\n [tabindex]=\"tabIndex()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n>\r\n <ng-content></ng-content>\r\n</button>\r\n", styles: ["@layer ard-ui{ard-icon-button{display:block}.ard-icon-button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.ard-icon-button .ard-button-content{max-height:100%;display:flex;align-items:center;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
6569
+ }
6570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumIconButtonComponent, decorators: [{
6571
+ type: Component,
6572
+ args: [{ standalone: false, selector: 'ard-icon-button', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
6573
+ '[class.ard-button-with-pointer-events-when-disabled]': 'pointerEventsWhenDisabled()',
6574
+ }, template: "<button\r\n class=\"ard-icon-button\"\r\n [type]=\"type()\"\r\n [ngClass]=\"ngClasses()\"\r\n [tabindex]=\"tabIndex()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n>\r\n <ng-content></ng-content>\r\n</button>\r\n", styles: ["@layer ard-ui{ard-icon-button{display:block}.ard-icon-button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.ard-icon-button .ard-button-content{max-height:100%;display:flex;align-items:center;justify-content:center}}\n"] }]
6575
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
6576
+ type: Inject,
6577
+ args: [ARD_ICON_BUTTON_DEFAULTS]
6578
+ }] }] });
6579
+
6580
+ const TODAY$2 = new Date();
6581
+ class DaysViewComponent {
6582
+ constructor() {
6583
+ this.tabIndex = input.required();
6584
+ this.readOnly = input.required();
6585
+ this.disabled = input.required();
6586
+ this.autoFocus = input.required();
6587
+ this._isUsingKeyboard = input.required();
6588
+ //! active year/month
6589
+ this.activeYear = input.required();
6590
+ this.activeMonth = input.required();
6591
+ this.selectedDate = input.required();
6592
+ this.selectedDateEnd = input.required();
6593
+ this.rangeSelectionMode = input.required();
6594
+ this.UTC = input.required();
6595
+ this.min = input.required();
6596
+ this.max = input.required();
6597
+ this.multiCalendarLocation = input.required();
6598
+ this.isDayFilteredOut = input.required();
6599
+ this.highlightedDay = input.required();
6600
+ this.highlightedDayDate = computed(() => {
6601
+ const day = this.highlightedDay();
6602
+ if (day === null)
6603
+ return null;
6604
+ return createDate(this.activeYear(), this.activeMonth(), day, this.UTC());
6637
6605
  });
6638
- //! highlighting days
6639
- this.highlightedDay = model(null);
6640
- this.highlightDayEvent = output({ alias: 'highlightDay' });
6641
- //! highlighting months
6642
- this._highlightedMonth = signal(null);
6643
- this.highlightedMonth = this._highlightedMonth.asReadonly();
6644
- //! highlighting years
6645
- this.__highlightedYear = signal(null);
6646
- this.highlightedYear = this.__highlightedYear.asReadonly();
6647
- this.currentYearRangeStart = linkedSignal(() => {
6648
- // align to a multiple of 4 and subtract offset
6649
- const rangeStartForCurrentYear = this.TODAY().getFullYear() - (this.TODAY().getFullYear() % 4) - this.multipleYearOffset() * 4;
6650
- const activeYear = this.activeYear();
6651
- const offset = roundToMultiple(activeYear - rangeStartForCurrentYear + 1, this.multipleYearPageSize(), 'up') - this.multipleYearPageSize(); // check how many n-year pages need to be turned
6652
- return rangeStartForCurrentYear + offset;
6606
+ //! focusing
6607
+ this.focusableElement = viewChild.required('focusableElement');
6608
+ //! calendar data
6609
+ this.firstWeekday = input.required();
6610
+ this.staticHeight = input.required();
6611
+ this.hideFloatingMonth = input.required();
6612
+ this.activeCalendarData = computed(() => getCalendarDayData(this.activeYear(), this.activeMonth(), this.firstWeekday(), this.min(), this.max(), this.staticHeight(), !this.hideFloatingMonth()));
6613
+ this.reserveTopRow = computed(() => !this.hideFloatingMonth() && this.activeCalendarData().leadingSpaces < 3);
6614
+ this.weekdayArray = computed(() => getCalendarWeekdayArray(this.firstWeekday()));
6615
+ this.currentAriaLabel = computed(() => {
6616
+ const day = this.highlightedDay();
6617
+ if (day === null) {
6618
+ return '';
6619
+ }
6620
+ return new Date(this.activeYear(), this.activeMonth(), day).toLocaleDateString(undefined, {
6621
+ weekday: 'long',
6622
+ year: 'numeric',
6623
+ month: 'long',
6624
+ day: 'numeric',
6625
+ });
6653
6626
  });
6654
- //! internals
6655
- this._isUsingKeyboard = signal(false);
6627
+ //! outputs
6628
+ this.triggerOpenYearsView = output();
6629
+ this.triggerOpenMonthsView = output();
6630
+ this.triggerSelectDay = output();
6631
+ this.triggerChangeMonth = output();
6632
+ this.triggerChangeYear = output();
6633
+ this.triggerHighlightDay = output();
6634
+ this.triggerHighlightNextDay = output();
6635
+ this.triggerHighlightPreviousDay = output();
6636
+ this.triggerHighlightFirstDay = output();
6637
+ this.triggerHighlightLastDay = output();
6638
+ this.triggerHighlightSameDayPreviousPage = output();
6639
+ this.triggerHighlightSameDayNextPage = output();
6640
+ this.focusEvent = output({ alias: 'focus' });
6641
+ this.blurEvent = output({ alias: 'blur' });
6656
6642
  //! templates
6657
- this.templateRepository = contentChild(_CalendarTemplateRepositoryDirective);
6658
- this.yearsViewHeaderTemplate = contentChild(ArdCalendarYearsViewHeaderTemplateDirective);
6659
- this.monthsViewHeaderTemplate = contentChild(ArdCalendarMonthsViewHeaderTemplateDirective);
6660
- this.daysViewHeaderTemplate = contentChild(ArdCalendarDaysViewHeaderTemplateDirective);
6661
- this.floatingMonthTemplate = contentChild(ArdCalendarFloatingMonthTemplateDirective);
6662
- this.yearTemplate = contentChild(ArdCalendarYearTemplateDirective);
6663
- this.monthTemplate = contentChild(ArdCalendarMonthTemplateDirective);
6664
- this.dayTemplate = contentChild(ArdCalendarDayTemplateDirective);
6665
- this.weekdayTemplate = contentChild(ArdCalendarWeekdayTemplateDirective);
6666
- //! template customizations
6667
- this.daysViewHeaderDateFormat = input(this._DEFAULTS.daysViewHeaderDateFormat); // 'MMM YYYY'
6668
- this.yearsViewHeaderDateFormat = input(this._DEFAULTS.yearsViewHeaderDateFormat); // 'YYYY'
6669
- this.monthsViewHeaderDateFormat = input(this._DEFAULTS.monthsViewHeaderDateFormat); // 'YYYY'
6670
- this.weekdayDateFormat = input(this._DEFAULTS.weekdayDateFormat); // 'EEEEE'
6671
- this.weekdayTitleDateFormat = input(this._DEFAULTS.weekdayTitleDateFormat); // 'EEEE'
6672
- this.floatingMonthDateFormat = input(this._DEFAULTS.floatingMonthDateFormat); // 'LLL'
6673
- this.floatingMonthTitleDateFormat = input(this._DEFAULTS.floatingMonthTitleDateFormat); // 'LLLL'
6674
- this.yearDateFormat = input(this._DEFAULTS.yearDateFormat); // 'YYYY'
6675
- this.monthDateFormat = input(this._DEFAULTS.monthDateFormat); // 'MMM'
6676
- this.dayDateFormat = input(this._DEFAULTS.dayDateFormat); // 'D'
6677
- }
6678
- onTriggerOpenDaysView() {
6679
- this.activeView.set(ArdCalendarView.Days);
6643
+ this.daysViewHeaderTemplate = input.required();
6644
+ this.floatingMonthTemplate = input.required();
6645
+ this.weekdayTemplate = input.required();
6646
+ this.dayTemplate = input.required();
6647
+ //! template customizations
6648
+ this.daysViewHeaderDateFormat = input.required(); // 'MMM YYYY'
6649
+ this.weekdayDateFormat = input.required(); // 'EEEEE'
6650
+ this.weekdayTitleDateFormat = input.required(); // 'EEEE'
6651
+ this.floatingMonthDateFormat = input.required(); // 'LLL'
6652
+ this.floatingMonthTitleDateFormat = input.required(); // 'LLLL'
6653
+ this.dayDateFormat = input.required(); // 'D'
6654
+ //! template contexts
6655
+ this.daysViewHeaderContext = computed(() => ({
6656
+ nextMonth: () => {
6657
+ this.triggerChangeMonth.emit(this.activeMonth() + 1);
6658
+ },
6659
+ prevMonth: () => {
6660
+ this.triggerChangeMonth.emit(this.activeMonth() - 1);
6661
+ },
6662
+ nextYear: () => {
6663
+ this.triggerChangeYear.emit(this.activeYear() + 1);
6664
+ },
6665
+ prevYear: () => {
6666
+ this.triggerChangeYear.emit(this.activeYear() - 1);
6667
+ },
6668
+ openYearsView: () => {
6669
+ this.triggerOpenYearsView.emit();
6670
+ },
6671
+ openMonthsView: () => {
6672
+ this.triggerOpenMonthsView.emit();
6673
+ },
6674
+ onFocus: (event) => {
6675
+ this.focusEvent.emit(event);
6676
+ },
6677
+ onBlur: (event) => {
6678
+ this.blurEvent.emit(event);
6679
+ },
6680
+ canGoToNextPage: !this.isMonthOutOfRange(this.activeMonth() + 1),
6681
+ canGoToPreviousPage: !this.isMonthOutOfRange(this.activeMonth() - 1),
6682
+ hideNextPageButton: this.multiCalendarLocation() === ArdMultiCalendarLocation.Left ||
6683
+ this.multiCalendarLocation() === ArdMultiCalendarLocation.Inner,
6684
+ hidePreviousPageButton: this.multiCalendarLocation() === ArdMultiCalendarLocation.Right ||
6685
+ this.multiCalendarLocation() === ArdMultiCalendarLocation.Inner,
6686
+ year: this.activeYear(),
6687
+ month: this.activeMonth(),
6688
+ $implicit: getUTCDate(this.activeYear(), this.activeMonth(), 2), // second day of month to prevent timezone issues
6689
+ }));
6690
+ this.weekdayContext = computed(() => (dayIndex) => {
6691
+ // create a date object for the given day index (0 = Sunday, 1 = Monday, etc.)
6692
+ // add 4 because January 4, 1970 is a Sunday
6693
+ const date = getUTCDate(1970, 0, 4 + dayIndex);
6694
+ return {
6695
+ dayIndex,
6696
+ date,
6697
+ $implicit: date,
6698
+ };
6699
+ });
6700
+ this.floatingMonthContext = computed(() => {
6701
+ const date = getUTCDate(this.activeYear(), this.activeMonth(), 2); // second day of month to prevent timezone issues
6702
+ return {
6703
+ month: this.activeMonth(),
6704
+ date,
6705
+ $implicit: date,
6706
+ };
6707
+ });
6708
+ this.dayContext = computed(() => (day) => {
6709
+ const date = getUTCDate(this.activeYear(), this.activeMonth(), day);
6710
+ return {
6711
+ value: day,
6712
+ date,
6713
+ $implicit: day,
6714
+ select: (dayOrDate) => {
6715
+ this.triggerSelectDay.emit(dayOrDate instanceof Date ? dayOrDate.getDate() : dayOrDate);
6716
+ },
6717
+ };
6718
+ });
6680
6719
  }
6681
- onTriggerOpenMonthsView() {
6682
- this.activeView.set(ArdCalendarView.Months);
6720
+ onMouseMove() {
6721
+ if (this._isUsingKeyboard())
6722
+ return;
6723
+ if (this.highlightedDay())
6724
+ this.triggerHighlightDay.emit(null);
6683
6725
  }
6684
- onTriggerOpenYearsView() {
6685
- this.activeView.set(ArdCalendarView.Years);
6726
+ ngAfterViewInit() {
6727
+ if (!this.autoFocus())
6728
+ return;
6729
+ this.focus();
6730
+ this.triggerHighlightDay.emit(1);
6686
6731
  }
6687
- _emitChange() {
6688
- this._onChangeRegistered?.(this.value());
6732
+ focus() {
6733
+ this.focusableElement().nativeElement.focus();
6689
6734
  }
6690
- ngOnChanges(changes) {
6691
- if (changes['UTC']) {
6692
- if (changes['UTC'].firstChange) {
6693
- this._UTCAfterInit.set(changes['UTC'].currentValue);
6694
- }
6695
- else {
6696
- console.error(`ARD-NF${this.componentId}4: <ard-${this.componentName}>'s [UTC] attribute should not be changed dynamically. This change will be ignored.`);
6697
- }
6698
- }
6699
- if (changes['value']) {
6700
- this.writeValue(changes['value'].currentValue);
6735
+ isDaySelected(day) {
6736
+ if (day instanceof Date)
6737
+ day = day.getDate();
6738
+ const isStartDateSelected = this.isDaySelectedStart(day);
6739
+ if (this.rangeSelectionMode()) {
6740
+ const isEndDateSelected = this.isDaySelectedEnd(day);
6741
+ return isStartDateSelected || isEndDateSelected;
6701
6742
  }
6743
+ return isStartDateSelected;
6702
6744
  }
6703
- _emitActivePageChange() {
6704
- this.activePageChange.emit({ year: this.activeYear(), month: this.activeMonth() });
6745
+ isDaySelectedStart(day) {
6746
+ if (day instanceof Date)
6747
+ day = day.getDate();
6748
+ const selected = this.selectedDate();
6749
+ const { year, month, date } = getDateComponents(selected, this.UTC());
6750
+ const isStartDateSelected = selected !== null && this.activeYear() === year && this.activeMonth() === month && day === date;
6751
+ return isStartDateSelected;
6705
6752
  }
6706
- _emitHighlightedDate() {
6707
- const day = this.highlightedDay();
6708
- if (!day)
6709
- return;
6710
- const date = createDate(this.activeYear(), this.activeMonth(), day, this.UTC());
6711
- this.highlightDayEvent.emit(date);
6753
+ isDaySelectedEnd(day) {
6754
+ if (day instanceof Date)
6755
+ day = day.getDate();
6756
+ const selected = this.selectedDateEnd();
6757
+ const { year, month, date } = getDateComponents(selected, this.UTC());
6758
+ const isEndDateSelected = selected !== null && this.activeYear() === year && this.activeMonth() === month && day === date;
6759
+ return isEndDateSelected;
6712
6760
  }
6713
- //! selecting days
6714
- isDayOutOfRange(day, month = this.activeMonth(), year = this.activeYear()) {
6715
- const dayDate = new Date(year, month, day);
6716
- return isDayOutOfRange(dayDate, this.min(), this.max());
6761
+ isDayBetweenSelectedRange(day) {
6762
+ if (!this.rangeSelectionMode())
6763
+ return false;
6764
+ if (day instanceof Date)
6765
+ day = day.getDate();
6766
+ const selected = this.selectedDate();
6767
+ const selectedEnd = this.selectedDateEnd();
6768
+ if (selected === null || selectedEnd === null || selected >= selectedEnd)
6769
+ return false;
6770
+ return this._isDayBetweenDates(day, selected, selectedEnd);
6717
6771
  }
6718
- selectDay(day) {
6719
- const startValue = this.selectionStart();
6720
- // reset selection
6721
- if (isNull(day)) {
6722
- if (!isDefined(startValue))
6723
- return;
6724
- this.selectionStart.set(null);
6725
- this.selectionEnd.set(null);
6726
- return;
6727
- }
6772
+ isDayBetweenSelectedHighlighted(day) {
6773
+ if (!this.rangeSelectionMode() || this.selectedDateEnd())
6774
+ return false;
6728
6775
  if (day instanceof Date)
6729
6776
  day = day.getDate();
6730
- // check if day is out of range or filtered out
6731
- if ((day && this.isDayOutOfRange(day)) || this.isDayFilteredOut()(day))
6777
+ const selected = this.selectedDate();
6778
+ const highlightedEnd = this.highlightedDayDate();
6779
+ if (selected === null || highlightedEnd === null || selected >= highlightedEnd)
6780
+ return false;
6781
+ return this._isDayBetweenDates(day, selected, highlightedEnd);
6782
+ }
6783
+ _isDayBetweenDates(day, startDate, endDate) {
6784
+ const date = createDate(this.activeYear(), this.activeMonth(), day, this.UTC());
6785
+ return date >= startDate && date <= endDate;
6786
+ }
6787
+ onCalendarDayMouseover(day) {
6788
+ if (this._isUsingKeyboard())
6732
6789
  return;
6733
- // range selection logic
6734
- const endValue = this.selectionEnd();
6735
- const newDate = createDate(this.activeYear(), this.activeMonth(), day, this.UTC());
6736
- if (this.isRangeSelector) {
6737
- // select end date
6738
- if (isDefined(startValue) && !isDefined(endValue) && newDate > startValue) {
6739
- this.selectionEnd.set(newDate);
6740
- return;
6741
- }
6742
- // reset end date and start a new selection
6743
- this.selectionEnd.set(null);
6744
- }
6745
- // avoid setting the same date again
6746
- if (startValue &&
6747
- startValue.getFullYear() === this.activeYear() &&
6748
- startValue.getMonth() === this.activeMonth() &&
6749
- startValue.getDate() === day) {
6790
+ if (this.disabled() || this.readOnly())
6750
6791
  return;
6751
- }
6752
- this.selectionStart.set(newDate);
6753
- }
6754
- selectCurrentlyHighlightedDay() {
6755
- if (!isDefined(this.highlightedDay()))
6792
+ if (day && this.isDayFilteredOut()(day))
6756
6793
  return;
6757
- this.selectDay(this.highlightedDay());
6794
+ this.triggerHighlightDay.emit(day);
6758
6795
  }
6759
- setHighlightedDay(day, month = this.activeMonth(), year = this.activeYear()) {
6760
- if (isNull(day)) {
6761
- this.highlightedDay.update(() => day);
6762
- this._emitHighlightedDate();
6796
+ onCalendarDayClick(day) {
6797
+ if (this.disabled() || this.readOnly())
6763
6798
  return;
6764
- }
6765
- const date = createDate(year, month, day, this.UTC());
6766
- const outOfRange = this.isDayOutOfRange(day, month, year);
6767
- if (outOfRange === -1) {
6768
- this._highlightMinDay();
6799
+ if (day === null)
6769
6800
  return;
6770
- }
6771
- if (outOfRange === 1) {
6772
- this._highlightMaxDay();
6801
+ if (this.isDayFilteredOut()(day))
6773
6802
  return;
6774
- }
6775
- this.highlightedDay.update(() => date.getDate());
6776
- if (date.getFullYear() !== this.activeYear()) {
6777
- this.activeYear.set(date.getFullYear());
6778
- }
6779
- if (date.getMonth() !== this.activeMonth()) {
6780
- this.activeMonth.set(date.getMonth());
6781
- }
6782
- this._emitHighlightedDate();
6783
- this._emitActivePageChange();
6803
+ this.triggerHighlightDay.emit(day);
6804
+ this.focus();
6805
+ this.triggerSelectDay.emit(day);
6784
6806
  }
6785
- _highlightMinDay() {
6786
- const min = this.min();
6787
- if (!isDefined(min))
6807
+ onDayGridFocus() {
6808
+ if (this.disabled() || this.readOnly())
6788
6809
  return;
6789
- this.activeYear.set(min.getFullYear());
6790
- this.activeMonth.set(min.getMonth());
6791
- this.highlightedDay.set(min.getDate());
6792
- this._emitHighlightedDate();
6793
- this._emitActivePageChange();
6810
+ this.triggerHighlightFirstDay.emit();
6794
6811
  }
6795
- _highlightMaxDay() {
6796
- const max = this.max();
6797
- if (!isDefined(max))
6812
+ onDayGridBlur() {
6813
+ if (this.disabled() || this.readOnly())
6798
6814
  return;
6799
- this.activeYear.set(max.getFullYear());
6800
- this.activeMonth.set(max.getMonth());
6801
- this.highlightedDay.set(max.getDate());
6802
- this._emitHighlightedDate();
6803
- this._emitActivePageChange();
6804
- }
6805
- highlightNextDay(offset = 1) {
6806
- const currentDay = this.highlightedDay();
6807
- const newDay = isDefined(currentDay) ? currentDay + offset : 1;
6808
- this.setHighlightedDay(newDay);
6809
- }
6810
- highlightPreviousDay(offset = 1) {
6811
- this.highlightNextDay(offset * -1);
6812
- }
6813
- highlightFirstDay() {
6814
- this.setHighlightedDay(1);
6815
- }
6816
- highlightLastDay() {
6817
- const daysInMonth = createDate(this.activeYear(), this.activeMonth() + 1, 0, this.UTC()).getDate();
6818
- this.setHighlightedDay(daysInMonth);
6819
- }
6820
- highlightSameDayNextMonth() {
6821
- const month = this.activeMonth();
6822
- const year = this.activeYear();
6823
- const newMonth = month + 1;
6824
- const newYear = year + Math.floor(newMonth / 12);
6825
- this.setHighlightedDay(this.highlightedDay(), newMonth % 12, newYear);
6826
- }
6827
- highlightSameDayPreviousMonth() {
6828
- const month = this.activeMonth();
6829
- const year = this.activeYear();
6830
- const newMonth = month - 1;
6831
- const newYear = year + Math.floor(newMonth / 12);
6832
- this.setHighlightedDay(this.highlightedDay(), newMonth % 12, newYear);
6833
- }
6834
- highlightSameDayNextYear() {
6835
- this.setHighlightedDay(this.highlightedDay(), this.activeMonth(), this.activeYear() + 1);
6836
- }
6837
- highlightSameDayPreviousYear() {
6838
- this.setHighlightedDay(this.highlightedDay(), this.activeMonth(), this.activeYear() - 1);
6839
- }
6840
- //! selecting months
6841
- isMonthSelected(month) {
6842
- if (month instanceof Date)
6843
- month = month.getMonth();
6844
- return (this.selectionStart() !== null &&
6845
- this.activeYear() === this.selectionStart()?.getFullYear() &&
6846
- month === this.selectionStart()?.getMonth());
6847
- }
6848
- isMonthOutOfRange(month, year = this.activeYear()) {
6849
- return isMonthOutOfRange(month, year, this.min(), this.max());
6850
- }
6851
- changeMonth(newMonth) {
6852
- if (isNull(newMonth)) {
6853
- this.activeMonth.set(this.TODAY().getMonth());
6854
- this._emitActivePageChange();
6855
- return true;
6856
- }
6857
- if (this.isMonthOutOfRange(newMonth))
6858
- return false;
6859
- if (newMonth > 11) {
6860
- this.activeYear.update(v => v + 1);
6861
- this.activeMonth.set(0);
6862
- }
6863
- else if (newMonth < 0) {
6864
- this.activeYear.update(v => v - 1);
6865
- this.activeMonth.set(11);
6866
- }
6867
- else {
6868
- this.activeMonth.set(newMonth);
6869
- }
6870
- this._emitActivePageChange();
6871
- return true;
6872
- }
6873
- selectMonth(newMonth) {
6874
- if (isNull(newMonth) || this.isMonthOutOfRange(newMonth))
6875
- return;
6876
- const wasSuccessful = this.changeMonth(newMonth);
6877
- if (!wasSuccessful)
6878
- return;
6879
- this.activeView.set(ArdCalendarView.Days);
6880
- this.monthSelect.emit(newMonth);
6881
- }
6882
- selectCurrentlyHighlightedMonth() {
6883
- if (!isDefined(this.highlightedMonth()))
6884
- return;
6885
- this.selectMonth(this.highlightedMonth());
6886
- }
6887
- setHighlightedMonth(month, year = this.activeYear()) {
6888
- if (isNull(month)) {
6889
- this._highlightedMonth.update(() => month);
6890
- return;
6891
- }
6892
- const date = createDate(year, month, 15, this.UTC());
6893
- const outOfRange = this.isMonthOutOfRange(month, year);
6894
- if (outOfRange === -1) {
6895
- this._highlightMinMonth();
6896
- return;
6897
- }
6898
- if (outOfRange === 1) {
6899
- this._highlightMaxMonth();
6900
- return;
6901
- }
6902
- this._highlightedMonth.update(() => date.getMonth());
6903
- if (date.getFullYear() !== this.activeYear()) {
6904
- this.activeYear.set(date.getFullYear());
6905
- this._emitActivePageChange();
6906
- }
6815
+ this.triggerHighlightDay.emit(null);
6907
6816
  }
6908
- _highlightMinMonth() {
6909
- const min = this.min();
6910
- if (!isDefined(min))
6817
+ onDayGridClick() {
6818
+ if (this.disabled() || this.readOnly())
6911
6819
  return;
6912
- this.activeYear.set(min.getFullYear());
6913
- this._emitActivePageChange();
6914
- this._highlightedMonth.set(min.getMonth());
6915
- }
6916
- _highlightMaxMonth() {
6917
- const max = this.max();
6918
- if (!isDefined(max))
6820
+ if (this.highlightedDay() !== null)
6919
6821
  return;
6920
- this.activeYear.set(max.getFullYear());
6921
- this._emitActivePageChange();
6922
- this._highlightedMonth.set(max.getMonth());
6923
- }
6924
- highlightNextMonth(offset = 1) {
6925
- const currentMonth = this.highlightedMonth();
6926
- const newMonth = isDefined(currentMonth) ? currentMonth + offset : 0;
6927
- this.setHighlightedMonth(newMonth);
6928
- }
6929
- highlightPreviousMonth(offset = 1) {
6930
- this.highlightNextMonth(offset * -1);
6931
- }
6932
- highlightFirstMonth() {
6933
- this.setHighlightedMonth(0);
6934
- }
6935
- highlightLastMonth() {
6936
- this.setHighlightedMonth(11);
6937
- }
6938
- highlightSameMonthNextYear(multiple) {
6939
- this.setHighlightedMonth(this.highlightedMonth(), this.activeYear() + (multiple ? 10 : 1));
6940
- }
6941
- highlightSameMonthPreviousYear(multiple) {
6942
- this.setHighlightedMonth(this.highlightedMonth(), this.activeYear() - (multiple ? 10 : 1));
6943
- }
6944
- //! selecting years
6945
- isYearSelected(year) {
6946
- if (year instanceof Date)
6947
- year = year.getFullYear();
6948
- return this.selectionStart() !== null && year === this.selectionStart()?.getFullYear();
6949
- }
6950
- isYearOutOfRange(year) {
6951
- return isYearOutOfRange(year, this.min(), this.max());
6952
- }
6953
- changeYear(year) {
6954
- if (isNull(year)) {
6955
- this.activeYear.set(this.TODAY().getFullYear());
6956
- this._emitActivePageChange();
6957
- return true;
6958
- }
6959
- if (this.isYearOutOfRange(year))
6960
- return false;
6961
- this.activeYear.set(year);
6962
- this._emitActivePageChange();
6963
- return true;
6822
+ this.triggerHighlightFirstDay.emit();
6964
6823
  }
6965
- selectYear(year) {
6966
- if (isNull(year))
6967
- return;
6968
- if (year instanceof Date)
6969
- year = year.getFullYear();
6970
- const wasSuccessful = this.changeYear(year);
6971
- if (!wasSuccessful)
6972
- return;
6973
- this.activeView.set(ArdCalendarView.Months);
6974
- this.yearSelect.emit(year);
6824
+ //! helpers
6825
+ isDayToday(day) {
6826
+ return this.activeYear() === TODAY$2.getFullYear() && this.activeMonth() === TODAY$2.getMonth() && day === TODAY$2.getDate();
6975
6827
  }
6976
- selectCurrentlyHighlightedYear() {
6977
- if (!isDefined(this.highlightedYear()))
6978
- return;
6979
- this.selectYear(this.highlightedYear());
6828
+ isMonthOutOfRange(month) {
6829
+ return isMonthOutOfRange(month, this.activeYear(), this.min(), this.max());
6980
6830
  }
6981
- setHighlightedYear(year) {
6982
- if (isNull(year)) {
6983
- this.__highlightedYear.update(() => year);
6984
- return;
6985
- }
6986
- const date = createDate(year, 0, 1, this.UTC());
6987
- const outOfRange = this.isYearOutOfRange(year);
6988
- if (outOfRange === -1) {
6989
- this._highlightMinYear();
6990
- return;
6991
- }
6992
- if (outOfRange === 1) {
6993
- this._highlightMaxYear();
6831
+ //! keyboard controls
6832
+ onMainGridKeydown(event) {
6833
+ if (this.disabled() || this.readOnly())
6994
6834
  return;
6835
+ switch (event.code) {
6836
+ case 'Space':
6837
+ case 'Enter':
6838
+ this._onEnterPress(event);
6839
+ break;
6840
+ case 'ArrowUp':
6841
+ this._onArrowUpPress(event);
6842
+ break;
6843
+ case 'ArrowDown':
6844
+ this._onArrowDownPress(event);
6845
+ break;
6846
+ case 'ArrowLeft':
6847
+ this._onArrowLeftPress(event);
6848
+ break;
6849
+ case 'ArrowRight':
6850
+ this._onArrowRightPress(event);
6851
+ break;
6852
+ case 'Home':
6853
+ this._onHomePress(event);
6854
+ break;
6855
+ case 'End':
6856
+ this._onEndPress(event);
6857
+ break;
6858
+ case 'PageUp':
6859
+ this._onPageUpPress(event);
6860
+ break;
6861
+ case 'PageDown':
6862
+ this._onPageDownPress(event);
6863
+ break;
6864
+ default:
6865
+ return;
6995
6866
  }
6996
- const newYear = date.getFullYear();
6997
- this.__highlightedYear.update(() => newYear);
6998
- if (newYear < this.currentYearRangeStart() || newYear >= this.currentYearRangeStart() + this.multipleYearPageSize()) {
6999
- // round the offset away from zero: 0.1 -> 1, -0.1 -> -1
7000
- // this is to ensure the range start is always shifted by n years
7001
- const offset = roundFromZero((newYear - this.currentYearRangeStart()) / this.multipleYearPageSize());
7002
- this.currentYearRangeStart.update(v => v + offset * this.multipleYearPageSize());
7003
- }
7004
- }
7005
- changeYearsViewPage(offset) {
7006
- const newYearRangeStart = this.currentYearRangeStart() + offset * this.multipleYearPageSize();
7007
- this.currentYearRangeStart.set(newYearRangeStart);
7008
- }
7009
- _highlightMinYear() {
7010
- const min = this.min();
7011
- if (!isDefined(min))
7012
- return;
7013
- this.__highlightedYear.set(min.getFullYear());
7014
6867
  }
7015
- _highlightMaxYear() {
7016
- const max = this.max();
7017
- if (!isDefined(max))
7018
- return;
7019
- this.__highlightedYear.set(max.getFullYear());
6868
+ //select currently selected entry
6869
+ _onEnterPress(event) {
6870
+ event.preventDefault();
6871
+ this.triggerSelectDay.emit(this.highlightedDay());
7020
6872
  }
7021
- highlightNextYear(offset = 1) {
7022
- const currentYear = this.highlightedYear();
7023
- const newYear = isDefined(currentYear) ? currentYear + offset : null;
7024
- this.setHighlightedYear(newYear);
6873
+ //highlight the entry one line below
6874
+ _onArrowDownPress(event) {
6875
+ event.preventDefault();
6876
+ this.triggerHighlightNextDay.emit(7);
7025
6877
  }
7026
- highlightPreviousYear(offset = 1) {
7027
- this.highlightNextYear(offset * -1);
6878
+ //highlight the entry one line above
6879
+ _onArrowUpPress(event) {
6880
+ event.preventDefault();
6881
+ this.triggerHighlightPreviousDay.emit(7);
7028
6882
  }
7029
- highlightFirstYear() {
7030
- this.setHighlightedYear(this.currentYearRangeStart());
6883
+ //highlight next entry
6884
+ _onArrowRightPress(event) {
6885
+ event.preventDefault();
6886
+ this.triggerHighlightNextDay.emit(1);
7031
6887
  }
7032
- highlightLastYear() {
7033
- this.setHighlightedYear(this.currentYearRangeStart() + this.multipleYearPageSize() - 1);
6888
+ //highlight previous entry
6889
+ _onArrowLeftPress(event) {
6890
+ event.preventDefault();
6891
+ this.triggerHighlightPreviousDay.emit(1);
7034
6892
  }
7035
- highlightSameYearNextPage(multiple) {
7036
- const year = this.highlightedYear() ?? this.currentYearRangeStart();
7037
- this.setHighlightedYear(year + (multiple ? this.multipleYearPageChangeModifier() : 1) * this.multipleYearPageSize());
6893
+ //highlight first entry on the page
6894
+ _onHomePress(event) {
6895
+ event.preventDefault();
6896
+ this.triggerHighlightFirstDay.emit();
7038
6897
  }
7039
- highlightSameYearPreviousPage(multiple) {
7040
- const year = this.highlightedYear() ?? this.currentYearRangeStart();
7041
- this.setHighlightedYear(year - (multiple ? this.multipleYearPageChangeModifier() : 1) * this.multipleYearPageSize());
6898
+ //highlight last entry on the page
6899
+ _onEndPress(event) {
6900
+ event.preventDefault();
6901
+ this.triggerHighlightLastDay.emit();
7042
6902
  }
7043
- onDocumentMousemove() {
7044
- this._isUsingKeyboard.set(false);
6903
+ //alone: highlight same entry on the next page
6904
+ //with alt: highlight same entry multiple pages after (12 pages)
6905
+ _onPageDownPress(event) {
6906
+ event.preventDefault();
6907
+ this.triggerHighlightSameDayNextPage.emit(event.altKey);
7045
6908
  }
7046
- onDocumentKeydown() {
7047
- this._isUsingKeyboard.set(true);
6909
+ //alone: highlight same entry on the previous page
6910
+ //with alt: highlight same entry multiple pages before (12 pages)
6911
+ _onPageUpPress(event) {
6912
+ event.preventDefault();
6913
+ this.triggerHighlightSameDayPreviousPage.emit(event.altKey);
7048
6914
  }
7049
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: _AbstractCalendar, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
7050
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.15", type: _AbstractCalendar, isStandalone: true, inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, activeView: { classPropertyName: "activeView", publicName: "activeView", isSignal: true, isRequired: false, transformFunction: null }, activeYear: { classPropertyName: "activeYear", publicName: "activeYear", isSignal: true, isRequired: false, transformFunction: null }, activeMonth: { classPropertyName: "activeMonth", publicName: "activeMonth", isSignal: true, isRequired: false, transformFunction: null }, firstWeekday: { classPropertyName: "firstWeekday", publicName: "firstWeekday", isSignal: true, isRequired: false, transformFunction: null }, multipleYearPageChangeModifier: { classPropertyName: "multipleYearPageChangeModifier", publicName: "multipleYearPageChangeModifier", isSignal: true, isRequired: false, transformFunction: null }, multipleYearOffset: { classPropertyName: "multipleYearOffset", publicName: "multipleYearOffset", isSignal: true, isRequired: false, transformFunction: null }, multipleYearPageSize: { classPropertyName: "multipleYearPageSize", publicName: "multipleYearPageSize", isSignal: true, isRequired: false, transformFunction: null }, multiCalendarLocation: { classPropertyName: "multiCalendarLocation", publicName: "multiCalendarLocation", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, staticHeight: { classPropertyName: "staticHeight", publicName: "staticHeight", isSignal: true, isRequired: false, transformFunction: null }, hideFloatingMonth: { classPropertyName: "hideFloatingMonth", publicName: "hideFloatingMonth", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, UTC: { classPropertyName: "UTC", publicName: "UTC", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, highlightedDay: { classPropertyName: "highlightedDay", publicName: "highlightedDay", isSignal: true, isRequired: false, transformFunction: null }, daysViewHeaderDateFormat: { classPropertyName: "daysViewHeaderDateFormat", publicName: "daysViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, yearsViewHeaderDateFormat: { classPropertyName: "yearsViewHeaderDateFormat", publicName: "yearsViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, monthsViewHeaderDateFormat: { classPropertyName: "monthsViewHeaderDateFormat", publicName: "monthsViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, weekdayDateFormat: { classPropertyName: "weekdayDateFormat", publicName: "weekdayDateFormat", isSignal: true, isRequired: false, transformFunction: null }, weekdayTitleDateFormat: { classPropertyName: "weekdayTitleDateFormat", publicName: "weekdayTitleDateFormat", isSignal: true, isRequired: false, transformFunction: null }, floatingMonthDateFormat: { classPropertyName: "floatingMonthDateFormat", publicName: "floatingMonthDateFormat", isSignal: true, isRequired: false, transformFunction: null }, floatingMonthTitleDateFormat: { classPropertyName: "floatingMonthTitleDateFormat", publicName: "floatingMonthTitleDateFormat", isSignal: true, isRequired: false, transformFunction: null }, yearDateFormat: { classPropertyName: "yearDateFormat", publicName: "yearDateFormat", isSignal: true, isRequired: false, transformFunction: null }, monthDateFormat: { classPropertyName: "monthDateFormat", publicName: "monthDateFormat", isSignal: true, isRequired: false, transformFunction: null }, dayDateFormat: { classPropertyName: "dayDateFormat", publicName: "dayDateFormat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeView: "activeViewChange", activeYear: "activeYearChange", activeMonth: "activeMonthChange", activePageChange: "activePageChange", yearSelect: "yearSelect", monthSelect: "monthSelect", highlightedDay: "highlightedDayChange", highlightDayEvent: "highlightDay" }, host: { listeners: { "document:mousemove": "onDocumentMousemove()", "document:keydown": "onDocumentKeydown()" } }, queries: [{ propertyName: "templateRepository", first: true, predicate: _CalendarTemplateRepositoryDirective, descendants: true, isSignal: true }, { propertyName: "yearsViewHeaderTemplate", first: true, predicate: ArdCalendarYearsViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthsViewHeaderTemplate", first: true, predicate: ArdCalendarMonthsViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "daysViewHeaderTemplate", first: true, predicate: ArdCalendarDaysViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "floatingMonthTemplate", first: true, predicate: ArdCalendarFloatingMonthTemplateDirective, descendants: true, isSignal: true }, { propertyName: "yearTemplate", first: true, predicate: ArdCalendarYearTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthTemplate", first: true, predicate: ArdCalendarMonthTemplateDirective, descendants: true, isSignal: true }, { propertyName: "dayTemplate", first: true, predicate: ArdCalendarDayTemplateDirective, descendants: true, isSignal: true }, { propertyName: "weekdayTemplate", first: true, predicate: ArdCalendarWeekdayTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
6915
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DaysViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6916
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: DaysViewComponent, isStandalone: false, selector: "ard-days-view", inputs: { tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: true, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: true, transformFunction: null }, _isUsingKeyboard: { classPropertyName: "_isUsingKeyboard", publicName: "_isUsingKeyboard", isSignal: true, isRequired: true, transformFunction: null }, activeYear: { classPropertyName: "activeYear", publicName: "activeYear", isSignal: true, isRequired: true, transformFunction: null }, activeMonth: { classPropertyName: "activeMonth", publicName: "activeMonth", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDateEnd: { classPropertyName: "selectedDateEnd", publicName: "selectedDateEnd", isSignal: true, isRequired: true, transformFunction: null }, rangeSelectionMode: { classPropertyName: "rangeSelectionMode", publicName: "rangeSelectionMode", isSignal: true, isRequired: true, transformFunction: null }, UTC: { classPropertyName: "UTC", publicName: "UTC", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, multiCalendarLocation: { classPropertyName: "multiCalendarLocation", publicName: "multiCalendarLocation", isSignal: true, isRequired: true, transformFunction: null }, isDayFilteredOut: { classPropertyName: "isDayFilteredOut", publicName: "isDayFilteredOut", isSignal: true, isRequired: true, transformFunction: null }, highlightedDay: { classPropertyName: "highlightedDay", publicName: "highlightedDay", isSignal: true, isRequired: true, transformFunction: null }, firstWeekday: { classPropertyName: "firstWeekday", publicName: "firstWeekday", isSignal: true, isRequired: true, transformFunction: null }, staticHeight: { classPropertyName: "staticHeight", publicName: "staticHeight", isSignal: true, isRequired: true, transformFunction: null }, hideFloatingMonth: { classPropertyName: "hideFloatingMonth", publicName: "hideFloatingMonth", isSignal: true, isRequired: true, transformFunction: null }, daysViewHeaderTemplate: { classPropertyName: "daysViewHeaderTemplate", publicName: "daysViewHeaderTemplate", isSignal: true, isRequired: true, transformFunction: null }, floatingMonthTemplate: { classPropertyName: "floatingMonthTemplate", publicName: "floatingMonthTemplate", isSignal: true, isRequired: true, transformFunction: null }, weekdayTemplate: { classPropertyName: "weekdayTemplate", publicName: "weekdayTemplate", isSignal: true, isRequired: true, transformFunction: null }, dayTemplate: { classPropertyName: "dayTemplate", publicName: "dayTemplate", isSignal: true, isRequired: true, transformFunction: null }, daysViewHeaderDateFormat: { classPropertyName: "daysViewHeaderDateFormat", publicName: "daysViewHeaderDateFormat", isSignal: true, isRequired: true, transformFunction: null }, weekdayDateFormat: { classPropertyName: "weekdayDateFormat", publicName: "weekdayDateFormat", isSignal: true, isRequired: true, transformFunction: null }, weekdayTitleDateFormat: { classPropertyName: "weekdayTitleDateFormat", publicName: "weekdayTitleDateFormat", isSignal: true, isRequired: true, transformFunction: null }, floatingMonthDateFormat: { classPropertyName: "floatingMonthDateFormat", publicName: "floatingMonthDateFormat", isSignal: true, isRequired: true, transformFunction: null }, floatingMonthTitleDateFormat: { classPropertyName: "floatingMonthTitleDateFormat", publicName: "floatingMonthTitleDateFormat", isSignal: true, isRequired: true, transformFunction: null }, dayDateFormat: { classPropertyName: "dayDateFormat", publicName: "dayDateFormat", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { triggerOpenYearsView: "triggerOpenYearsView", triggerOpenMonthsView: "triggerOpenMonthsView", triggerSelectDay: "triggerSelectDay", triggerChangeMonth: "triggerChangeMonth", triggerChangeYear: "triggerChangeYear", triggerHighlightDay: "triggerHighlightDay", triggerHighlightNextDay: "triggerHighlightNextDay", triggerHighlightPreviousDay: "triggerHighlightPreviousDay", triggerHighlightFirstDay: "triggerHighlightFirstDay", triggerHighlightLastDay: "triggerHighlightLastDay", triggerHighlightSameDayPreviousPage: "triggerHighlightSameDayPreviousPage", triggerHighlightSameDayNextPage: "triggerHighlightSameDayNextPage", focusEvent: "focus", blurEvent: "blur" }, host: { listeners: { "mousemove": "onMouseMove()" } }, viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ard-days-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultDaysViewHeaderTemplate\r\n let-currDate\r\n let-nextMonth=\"nextMonth\"\r\n let-prevMonth=\"prevMonth\"\r\n let-canGoToNextMonth=\"canGoToNextPage\"\r\n let-canGoToPreviousMonth=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openYearsView=\"openYearsView\"\r\n let-onFocus=\"onFocus\"\r\n let-onBlur=\"onBlur\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevMonth()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousMonth\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openYearsView()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n >\r\n {{ currDate | date: this.daysViewHeaderDateFormat() | uppercase }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextMonth()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextMonth\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"daysViewHeaderTemplate() || defaultDaysViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"daysViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div class=\"ard-calendar__weekdays\">\r\n <ng-template\r\n #defaultWeekdayTemplate\r\n let-date\r\n >\r\n <div\r\n class=\"ard-calendar__weekday\"\r\n [title]=\"date | date: weekdayTitleDateFormat() | titlecase\"\r\n >\r\n {{ date | date: weekdayDateFormat() | uppercase }}\r\n </div>\r\n </ng-template>\r\n @for (weekdayIndex of weekdayArray(); track weekdayIndex) {\r\n <ng-template\r\n [ngTemplateOutlet]=\"weekdayTemplate() || defaultWeekdayTemplate\"\r\n [ngTemplateOutletContext]=\"weekdayContext()(weekdayIndex)\"\r\n />\r\n }\r\n </div>\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__days-grid\"\r\n [class.ard-reserve-top-row]=\"reserveTopRow()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onDayGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onDayGridBlur()\"\r\n (click)=\"onDayGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @if (!hideFloatingMonth()) {\r\n <div class=\"ard-calendar__floating-month\">\r\n <ng-template\r\n #defaultFloatingMonthTemplate\r\n let-date\r\n >\r\n <div [title]=\"date | date: floatingMonthTitleDateFormat() | titlecase\">\r\n {{ date | date: floatingMonthDateFormat() | uppercase }}\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"floatingMonthTemplate() || defaultFloatingMonthTemplate\"\r\n [ngTemplateOutletContext]=\"floatingMonthContext()\"\r\n />\r\n </div>\r\n }\r\n @for (week of activeCalendarData().array; track $index) {\r\n @for (day of week; track day ? day : activeCalendarData().leadingSpaces - $index) {\r\n @if (day === null) {\r\n <div class=\"ard-calendar__entry ard-calendar__entry-empty\"></div>\r\n } @else {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedDay() === day.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isDayBetweenSelectedHighlighted(day.value)\"\r\n [class.ard-calendar__entry-disabled]=\"day.disabled || isDayFilteredOut()(day.value)\"\r\n [class.ard-calendar__entry-selected]=\"isDaySelected(day.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isDaySelectedStart(day.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isDaySelectedEnd(day.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isDayBetweenSelectedRange(day.value)\"\r\n [class.ard-calendar-today]=\"isDayToday(day.value)\"\r\n (click)=\"onCalendarDayClick(day.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarDayMouseover(day.value)\"\r\n role=\"gridcell\"\r\n >\r\n <div class=\"ard-calendar__entry-button\">\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultDayTemplate\r\n let-date=\"date\"\r\n >\r\n {{ date | date: dayDateFormat() }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"dayTemplate() || defaultDayTemplate\"\r\n [ngTemplateOutletContext]=\"dayContext()(day.value)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-days-view{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumIconButtonComponent, selector: "ard-icon-button", inputs: ["wrapperClasses", "type", "ariaLabel", "color", "lightColoring", "compact", "pointerEventsWhenDisabled"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }, { kind: "component", type: ArdiumButtonComponent, selector: "ard-button", inputs: ["variant", "vertical"], outputs: ["focus", "blur"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7051
6917
  }
7052
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: _AbstractCalendar, decorators: [{
7053
- type: Directive,
7054
- args: [{}]
7055
- }], ctorParameters: () => [{ type: undefined }], propDecorators: { onDocumentMousemove: [{
7056
- type: HostListener,
7057
- args: ['document:mousemove']
7058
- }], onDocumentKeydown: [{
6918
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DaysViewComponent, decorators: [{
6919
+ type: Component,
6920
+ args: [{ standalone: false, selector: 'ard-days-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ard-days-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultDaysViewHeaderTemplate\r\n let-currDate\r\n let-nextMonth=\"nextMonth\"\r\n let-prevMonth=\"prevMonth\"\r\n let-canGoToNextMonth=\"canGoToNextPage\"\r\n let-canGoToPreviousMonth=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openYearsView=\"openYearsView\"\r\n let-onFocus=\"onFocus\"\r\n let-onBlur=\"onBlur\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevMonth()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousMonth\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openYearsView()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n >\r\n {{ currDate | date: this.daysViewHeaderDateFormat() | uppercase }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextMonth()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextMonth\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"daysViewHeaderTemplate() || defaultDaysViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"daysViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div class=\"ard-calendar__weekdays\">\r\n <ng-template\r\n #defaultWeekdayTemplate\r\n let-date\r\n >\r\n <div\r\n class=\"ard-calendar__weekday\"\r\n [title]=\"date | date: weekdayTitleDateFormat() | titlecase\"\r\n >\r\n {{ date | date: weekdayDateFormat() | uppercase }}\r\n </div>\r\n </ng-template>\r\n @for (weekdayIndex of weekdayArray(); track weekdayIndex) {\r\n <ng-template\r\n [ngTemplateOutlet]=\"weekdayTemplate() || defaultWeekdayTemplate\"\r\n [ngTemplateOutletContext]=\"weekdayContext()(weekdayIndex)\"\r\n />\r\n }\r\n </div>\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__days-grid\"\r\n [class.ard-reserve-top-row]=\"reserveTopRow()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onDayGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onDayGridBlur()\"\r\n (click)=\"onDayGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @if (!hideFloatingMonth()) {\r\n <div class=\"ard-calendar__floating-month\">\r\n <ng-template\r\n #defaultFloatingMonthTemplate\r\n let-date\r\n >\r\n <div [title]=\"date | date: floatingMonthTitleDateFormat() | titlecase\">\r\n {{ date | date: floatingMonthDateFormat() | uppercase }}\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"floatingMonthTemplate() || defaultFloatingMonthTemplate\"\r\n [ngTemplateOutletContext]=\"floatingMonthContext()\"\r\n />\r\n </div>\r\n }\r\n @for (week of activeCalendarData().array; track $index) {\r\n @for (day of week; track day ? day : activeCalendarData().leadingSpaces - $index) {\r\n @if (day === null) {\r\n <div class=\"ard-calendar__entry ard-calendar__entry-empty\"></div>\r\n } @else {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedDay() === day.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isDayBetweenSelectedHighlighted(day.value)\"\r\n [class.ard-calendar__entry-disabled]=\"day.disabled || isDayFilteredOut()(day.value)\"\r\n [class.ard-calendar__entry-selected]=\"isDaySelected(day.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isDaySelectedStart(day.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isDaySelectedEnd(day.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isDayBetweenSelectedRange(day.value)\"\r\n [class.ard-calendar-today]=\"isDayToday(day.value)\"\r\n (click)=\"onCalendarDayClick(day.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarDayMouseover(day.value)\"\r\n role=\"gridcell\"\r\n >\r\n <div class=\"ard-calendar__entry-button\">\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultDayTemplate\r\n let-date=\"date\"\r\n >\r\n {{ date | date: dayDateFormat() }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"dayTemplate() || defaultDayTemplate\"\r\n [ngTemplateOutletContext]=\"dayContext()(day.value)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-days-view{display:block}}\n"] }]
6921
+ }], propDecorators: { onMouseMove: [{
7059
6922
  type: HostListener,
7060
- args: ['document:keydown']
6923
+ args: ['mousemove']
7061
6924
  }] } });
7062
6925
 
7063
- const _calendarDefaults = {
7064
- ..._formFieldComponentDefaults,
7065
- color: ComponentColor.Primary,
7066
- activeView: ArdCalendarView.Days,
7067
- activeYear: new Date().getFullYear(),
7068
- activeMonth: new Date().getMonth(),
7069
- firstWeekday: 1,
7070
- multipleYearPageChangeModifier: 5,
7071
- multipleYearOffset: 2,
7072
- multipleYearPageSize: 24,
7073
- staticHeight: false,
7074
- hideFloatingMonth: false,
7075
- autoFocus: false,
7076
- multiCalendarLocation: ArdMultiCalendarLocation.Only,
7077
- min: null,
7078
- max: null,
7079
- filter: null,
7080
- UTC: false,
7081
- // template customizations
7082
- daysViewHeaderDateFormat: 'MMM yyyy',
7083
- yearsViewHeaderDateFormat: 'yyyy',
7084
- monthsViewHeaderDateFormat: 'yyyy',
7085
- weekdayDateFormat: 'EEEEE',
7086
- weekdayTitleDateFormat: 'EEEE',
7087
- floatingMonthDateFormat: 'LLL',
7088
- floatingMonthTitleDateFormat: 'LLLL',
7089
- yearDateFormat: 'yyyy',
7090
- monthDateFormat: 'MMM',
7091
- dayDateFormat: 'd',
7092
- };
7093
- const ARD_CALENDAR_DEFAULTS = new InjectionToken('ard-calendar-defaults', {
7094
- factory: () => ({
7095
- ..._calendarDefaults,
7096
- }),
7097
- });
7098
- function provideCalendarDefaults(config) {
7099
- return { provide: ARD_CALENDAR_DEFAULTS, useValue: { ..._calendarDefaults, ...config } };
7100
- }
7101
-
7102
- const ARD_ICON_BUTTON_DEFAULTS = new InjectionToken('ard-icon-button-defaults', {
7103
- factory: () => ({ ..._simpleButtonDefaults, ..._focusableComponentDefaults }),
7104
- });
7105
- function provideIconButtonDefaults(config) {
7106
- return { provide: ARD_ICON_BUTTON_DEFAULTS, useValue: { ..._simpleButtonDefaults, ..._focusableComponentDefaults, ...config } };
6926
+ function getCalendarYearsArray(startYear, yearCount, min, max) {
6927
+ return new Array(yearCount).fill(startYear).map((v, i) => ({ value: v + i, valueDate: new Date(v + i, 1, 1), disabled: !!isYearOutOfRange(v + i, min, max) }));
7107
6928
  }
7108
-
7109
- class ArdiumIconButtonComponent extends _FocusableComponentBase {
7110
- constructor(defaults) {
7111
- super(defaults);
7112
- this.wrapperClasses = input('');
7113
- this.type = input(this._DEFAULTS.type);
7114
- this.ariaLabel = input('');
7115
- //! button settings
7116
- this.color = input(this._DEFAULTS.color);
7117
- this.lightColoring = input(this._DEFAULTS.lightColoring, {
7118
- transform: v => coerceBooleanProperty(v),
7119
- });
7120
- this.compact = input(this._DEFAULTS.compact, { transform: v => coerceBooleanProperty(v) });
7121
- this.pointerEventsWhenDisabled = input(this._DEFAULTS.pointerEventsWhenDisabled, {
7122
- transform: v => coerceBooleanProperty(v),
7123
- });
7124
- this.ngClasses = computed(() => [
7125
- 'ard-appearance-transparent',
7126
- `ard-color-${this.disabled() ? ComponentColor.None : this.color()}`,
7127
- this.lightColoring() ? `ard-light-coloring` : '',
7128
- this.compact() ? 'ard-compact' : '',
7129
- ].join(' '));
7130
- }
7131
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumIconButtonComponent, deps: [{ token: ARD_ICON_BUTTON_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
7132
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: ArdiumIconButtonComponent, isStandalone: false, selector: "ard-icon-button", inputs: { wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, lightColoring: { classPropertyName: "lightColoring", publicName: "lightColoring", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, pointerEventsWhenDisabled: { classPropertyName: "pointerEventsWhenDisabled", publicName: "pointerEventsWhenDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ard-button-with-pointer-events-when-disabled": "pointerEventsWhenDisabled()" } }, usesInheritance: true, ngImport: i0, template: "<button\r\n class=\"ard-icon-button\"\r\n [type]=\"type()\"\r\n [ngClass]=\"ngClasses()\"\r\n [tabindex]=\"tabIndex()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n>\r\n <ng-content></ng-content>\r\n</button>\r\n", styles: ["@layer ard-ui{ard-icon-button{display:block}.ard-icon-button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.ard-icon-button .ard-button-content{max-height:100%;display:flex;align-items:center;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
6929
+ function isYearOutOfRange(year, min, max) {
6930
+ const dateForMinComparison = new Date(year, 11, 31);
6931
+ if (isDefined(min) && dateForMinComparison < min)
6932
+ return -1;
6933
+ const dateForMaxComparison = new Date(year, 0, 1);
6934
+ if (isDefined(max) && dateForMaxComparison > max)
6935
+ return 1;
6936
+ return 0;
7133
6937
  }
7134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumIconButtonComponent, decorators: [{
7135
- type: Component,
7136
- args: [{ standalone: false, selector: 'ard-icon-button', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
7137
- '[class.ard-button-with-pointer-events-when-disabled]': 'pointerEventsWhenDisabled()',
7138
- }, template: "<button\r\n class=\"ard-icon-button\"\r\n [type]=\"type()\"\r\n [ngClass]=\"ngClasses()\"\r\n [tabindex]=\"tabIndex()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n>\r\n <ng-content></ng-content>\r\n</button>\r\n", styles: ["@layer ard-ui{ard-icon-button{display:block}.ard-icon-button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.ard-icon-button .ard-button-content{max-height:100%;display:flex;align-items:center;justify-content:center}}\n"] }]
7139
- }], ctorParameters: () => [{ type: undefined, decorators: [{
7140
- type: Inject,
7141
- args: [ARD_ICON_BUTTON_DEFAULTS]
7142
- }] }] });
7143
6938
 
7144
- const TODAY$2 = new Date();
7145
- class DaysViewComponent {
6939
+ const TODAY$1 = new Date();
6940
+ class MonthsViewComponent {
7146
6941
  constructor() {
7147
6942
  this.tabIndex = input.required();
7148
6943
  this.readOnly = input.required();
7149
6944
  this.disabled = input.required();
7150
6945
  this.autoFocus = input.required();
7151
6946
  this._isUsingKeyboard = input.required();
7152
- //! active year/month
6947
+ this.color = input.required();
7153
6948
  this.activeYear = input.required();
7154
6949
  this.activeMonth = input.required();
7155
6950
  this.selectedDate = input.required();
7156
- this.selectedDateEnd = input.required();
7157
- this.rangeSelectionMode = input.required();
7158
- this.UTC = input.required();
7159
- this.min = input.required();
7160
- this.max = input.required();
7161
- this.multiCalendarLocation = input.required();
7162
- this.isDayFilteredOut = input.required();
7163
- this.highlightedDay = input.required();
7164
- this.highlightedDayDate = computed(() => {
7165
- const day = this.highlightedDay();
7166
- if (day === null)
7167
- return null;
7168
- return createDate(this.activeYear(), this.activeMonth(), day, this.UTC());
7169
- });
7170
- //! focusing
7171
- this.focusableElement = viewChild.required('focusableElement');
7172
- //! calendar data
7173
- this.firstWeekday = input.required();
7174
- this.staticHeight = input.required();
7175
- this.hideFloatingMonth = input.required();
7176
- this.activeCalendarData = computed(() => getCalendarDayData(this.activeYear(), this.activeMonth(), this.firstWeekday(), this.min(), this.max(), this.staticHeight(), !this.hideFloatingMonth()));
7177
- this.reserveTopRow = computed(() => !this.hideFloatingMonth() && this.activeCalendarData().leadingSpaces < 3);
7178
- this.weekdayArray = computed(() => getCalendarWeekdayArray(this.firstWeekday()));
6951
+ this.selectedDateEnd = input.required();
6952
+ this.rangeSelectionMode = input.required();
6953
+ this.UTC = input.required();
6954
+ this.min = input.required();
6955
+ this.max = input.required();
6956
+ this.multiCalendarLocation = input.required();
6957
+ this.monthsArray = computed(() => getCalendarMonthsArray(this.activeYear(), this.min(), this.max()));
7179
6958
  this.currentAriaLabel = computed(() => {
7180
- const day = this.highlightedDay();
7181
- if (day === null) {
6959
+ const month = this.highlightedMonth();
6960
+ if (month === null) {
7182
6961
  return '';
7183
6962
  }
7184
- return new Date(this.activeYear(), this.activeMonth(), day).toLocaleDateString(undefined, {
7185
- weekday: 'long',
6963
+ return new Date(this.activeYear(), month, 1).toLocaleDateString(undefined, {
7186
6964
  year: 'numeric',
7187
6965
  month: 'long',
7188
- day: 'numeric',
7189
6966
  });
7190
6967
  });
7191
6968
  //! outputs
7192
6969
  this.triggerOpenYearsView = output();
7193
- this.triggerOpenMonthsView = output();
7194
- this.triggerSelectDay = output();
7195
- this.triggerChangeMonth = output();
7196
- this.triggerChangeYear = output();
7197
- this.triggerHighlightDay = output();
7198
- this.triggerHighlightNextDay = output();
7199
- this.triggerHighlightPreviousDay = output();
7200
- this.triggerHighlightFirstDay = output();
7201
- this.triggerHighlightLastDay = output();
7202
- this.triggerHighlightSameDayPreviousPage = output();
7203
- this.triggerHighlightSameDayNextPage = output();
6970
+ this.triggerOpenDaysView = output();
7204
6971
  this.focusEvent = output({ alias: 'focus' });
7205
6972
  this.blurEvent = output({ alias: 'blur' });
6973
+ this.triggerSelectMonth = output();
6974
+ this.triggeChangeYear = output();
6975
+ this.triggerHighlightMonth = output();
6976
+ this.triggerHighlightNextMonth = output();
6977
+ this.triggerHighlightPreviousMonth = output();
6978
+ this.triggerHighlightFirstMonth = output();
6979
+ this.triggerHighlightLastMonth = output();
6980
+ this.triggerHighlightSameMonthPreviousPage = output();
6981
+ this.triggerHighlightSameMonthNextPage = output();
6982
+ //! calendar entry hover & click
6983
+ this.highlightedMonth = input.required();
6984
+ this.highlightedMonthDate = computed(() => {
6985
+ const month = this.highlightedMonth();
6986
+ if (isNull(month))
6987
+ return null;
6988
+ return new Date(this.activeYear(), month, 2);
6989
+ });
6990
+ //! focusing
6991
+ this.focusableElement = viewChild.required('focusableElement');
7206
6992
  //! templates
7207
- this.daysViewHeaderTemplate = input.required();
7208
- this.floatingMonthTemplate = input.required();
7209
- this.weekdayTemplate = input.required();
7210
- this.dayTemplate = input.required();
6993
+ this.monthsViewHeaderTemplate = input.required();
6994
+ this.monthTemplate = input.required();
7211
6995
  //! template customizations
7212
- this.daysViewHeaderDateFormat = input.required(); // 'MMM YYYY'
7213
- this.weekdayDateFormat = input.required(); // 'EEEEE'
7214
- this.weekdayTitleDateFormat = input.required(); // 'EEEE'
7215
- this.floatingMonthDateFormat = input.required(); // 'LLL'
7216
- this.floatingMonthTitleDateFormat = input.required(); // 'LLLL'
7217
- this.dayDateFormat = input.required(); // 'D'
6996
+ this.monthsViewHeaderDateFormat = input.required(); // 'YYYY'
6997
+ this.monthDateFormat = input.required(); // 'MMM'
7218
6998
  //! template contexts
7219
- this.daysViewHeaderContext = computed(() => ({
7220
- nextMonth: () => {
7221
- this.triggerChangeMonth.emit(this.activeMonth() + 1);
7222
- },
7223
- prevMonth: () => {
7224
- this.triggerChangeMonth.emit(this.activeMonth() - 1);
7225
- },
7226
- nextYear: () => {
7227
- this.triggerChangeYear.emit(this.activeYear() + 1);
6999
+ this.monthsViewHeaderContext = computed(() => ({
7000
+ nextPage: () => {
7001
+ this.triggeChangeYear.emit(this.activeYear() + 1);
7228
7002
  },
7229
- prevYear: () => {
7230
- this.triggerChangeYear.emit(this.activeYear() - 1);
7003
+ prevPage: () => {
7004
+ this.triggeChangeYear.emit(this.activeYear() - 1);
7231
7005
  },
7232
7006
  openYearsView: () => {
7233
7007
  this.triggerOpenYearsView.emit();
7234
7008
  },
7235
- openMonthsView: () => {
7236
- this.triggerOpenMonthsView.emit();
7009
+ openDaysView: () => {
7010
+ this.triggerOpenDaysView.emit();
7237
7011
  },
7238
- canGoToNextPage: !this.isMonthOutOfRange(this.activeMonth() + 1),
7239
- canGoToPreviousPage: !this.isMonthOutOfRange(this.activeMonth() - 1),
7012
+ onFocus: (event) => {
7013
+ this.focusEvent.emit(event);
7014
+ },
7015
+ onBlur: (event) => {
7016
+ this.blurEvent.emit(event);
7017
+ },
7018
+ canGoToNextPage: !this.isYearOutOfRange(this.activeYear() + 1),
7019
+ canGoToPreviousPage: !this.isYearOutOfRange(this.activeYear() - 1),
7240
7020
  hideNextPageButton: this.multiCalendarLocation() === ArdMultiCalendarLocation.Left ||
7241
7021
  this.multiCalendarLocation() === ArdMultiCalendarLocation.Inner,
7242
7022
  hidePreviousPageButton: this.multiCalendarLocation() === ArdMultiCalendarLocation.Right ||
7243
7023
  this.multiCalendarLocation() === ArdMultiCalendarLocation.Inner,
7244
7024
  year: this.activeYear(),
7245
- month: this.activeMonth(),
7246
- $implicit: getUTCDate(this.activeYear(), this.activeMonth(), 2), // second day of month to prevent timezone issues
7025
+ date: getUTCDate(this.activeYear(), 0, 2), // second day of month to prevent timezone issues
7026
+ $implicit: this.activeYear(),
7247
7027
  }));
7248
- this.weekdayContext = computed(() => (dayIndex) => {
7249
- // create a date object for the given day index (0 = Sunday, 1 = Monday, etc.)
7250
- // add 4 because January 4, 1970 is a Sunday
7251
- const date = getUTCDate(1970, 0, 4 + dayIndex);
7252
- return {
7253
- dayIndex,
7254
- date,
7255
- $implicit: date,
7256
- };
7257
- });
7258
- this.floatingMonthContext = computed(() => {
7259
- const date = getUTCDate(this.activeYear(), this.activeMonth(), 2); // second day of month to prevent timezone issues
7028
+ this.monthContext = computed(() => (month) => {
7029
+ const date = getUTCDate(this.activeYear(), month, 2); // second day of month to prevent timezone issues
7260
7030
  return {
7261
- month: this.activeMonth(),
7031
+ month,
7262
7032
  date,
7263
7033
  $implicit: date,
7264
- };
7265
- });
7266
- this.dayContext = computed(() => (day) => {
7267
- const date = getUTCDate(this.activeYear(), this.activeMonth(), day);
7268
- return {
7269
- value: day,
7270
- date,
7271
- $implicit: day,
7272
- select: (dayOrDate) => {
7273
- this.triggerSelectDay.emit(dayOrDate instanceof Date ? dayOrDate.getDate() : dayOrDate);
7034
+ select: (month) => {
7035
+ if (month instanceof Date)
7036
+ month = month.getMonth();
7037
+ this.triggerSelectMonth.emit(month);
7274
7038
  },
7275
7039
  };
7276
7040
  });
@@ -7278,113 +7042,411 @@ class DaysViewComponent {
7278
7042
  onMouseMove() {
7279
7043
  if (this._isUsingKeyboard())
7280
7044
  return;
7281
- if (this.highlightedDay())
7282
- this.triggerHighlightDay.emit(null);
7045
+ if (this.highlightedMonth())
7046
+ this.triggerHighlightMonth.emit(null);
7283
7047
  }
7284
7048
  ngAfterViewInit() {
7285
7049
  if (!this.autoFocus())
7286
7050
  return;
7287
7051
  this.focus();
7288
- this.triggerHighlightDay.emit(1);
7052
+ this.triggerHighlightMonth.emit(0);
7053
+ }
7054
+ onCalendarMonthMouseover(month) {
7055
+ if (this._isUsingKeyboard())
7056
+ return;
7057
+ if (this.disabled() || this.readOnly())
7058
+ return;
7059
+ this.triggerHighlightMonth.emit(month);
7060
+ }
7061
+ onCalendarMonthClick(month) {
7062
+ if (this.disabled() || this.readOnly())
7063
+ return;
7064
+ this.triggerSelectMonth.emit(month);
7065
+ }
7066
+ onMonthGridFocus() {
7067
+ if (this.disabled() || this.readOnly())
7068
+ return;
7069
+ this.triggerHighlightMonth.emit(0);
7070
+ }
7071
+ onMonthGridBlur() {
7072
+ if (this.disabled() || this.readOnly())
7073
+ return;
7074
+ this.triggerHighlightMonth.emit(null);
7075
+ }
7076
+ onMonthGridClick() {
7077
+ if (this.disabled() || this.readOnly())
7078
+ return;
7079
+ if (this.highlightedMonth() !== null)
7080
+ return;
7081
+ this.triggerHighlightMonth.emit(0);
7289
7082
  }
7290
7083
  focus() {
7291
7084
  this.focusableElement().nativeElement.focus();
7292
7085
  }
7293
- isDaySelected(day) {
7294
- if (day instanceof Date)
7295
- day = day.getDate();
7296
- const isStartDateSelected = this.isDaySelectedStart(day);
7086
+ //! keyboard controls
7087
+ onMainGridKeydown(event) {
7088
+ if (this.disabled() || this.readOnly())
7089
+ return;
7090
+ switch (event.code) {
7091
+ case 'Space':
7092
+ case 'Enter':
7093
+ this._onEnterPress(event);
7094
+ break;
7095
+ case 'ArrowUp':
7096
+ this._onArrowUpPress(event);
7097
+ break;
7098
+ case 'ArrowDown':
7099
+ this._onArrowDownPress(event);
7100
+ break;
7101
+ case 'ArrowLeft':
7102
+ this._onArrowLeftPress(event);
7103
+ break;
7104
+ case 'ArrowRight':
7105
+ this._onArrowRightPress(event);
7106
+ break;
7107
+ case 'Home':
7108
+ this._onHomePress(event);
7109
+ break;
7110
+ case 'End':
7111
+ this._onEndPress(event);
7112
+ break;
7113
+ case 'PageUp':
7114
+ this._onPageUpPress(event);
7115
+ break;
7116
+ case 'PageDown':
7117
+ this._onPageDownPress(event);
7118
+ break;
7119
+ default:
7120
+ return;
7121
+ }
7122
+ }
7123
+ //select currently selected entry
7124
+ _onEnterPress(event) {
7125
+ event.preventDefault();
7126
+ const month = this.highlightedMonth();
7127
+ if (isNull(month))
7128
+ return;
7129
+ this.triggerSelectMonth.emit(month);
7130
+ }
7131
+ //highlight the entry one line below
7132
+ _onArrowDownPress(event) {
7133
+ event.preventDefault();
7134
+ this.triggerHighlightNextMonth.emit(4); //4 months per line
7135
+ }
7136
+ //highlight the entry one line above
7137
+ _onArrowUpPress(event) {
7138
+ event.preventDefault();
7139
+ this.triggerHighlightPreviousMonth.emit(4); //4 months per line
7140
+ }
7141
+ //highlight next entry
7142
+ _onArrowRightPress(event) {
7143
+ event.preventDefault();
7144
+ this.triggerHighlightNextMonth.emit(1);
7145
+ }
7146
+ //highlight previous entry
7147
+ _onArrowLeftPress(event) {
7148
+ event.preventDefault();
7149
+ this.triggerHighlightPreviousMonth.emit(1);
7150
+ }
7151
+ //highlight first entry on the page
7152
+ _onHomePress(event) {
7153
+ event.preventDefault();
7154
+ this.triggerHighlightFirstMonth.emit();
7155
+ }
7156
+ //highlight last entry on the page
7157
+ _onEndPress(event) {
7158
+ event.preventDefault();
7159
+ this.triggerHighlightLastMonth.emit();
7160
+ }
7161
+ //alone: highlight same entry on the next page
7162
+ //with alt: highlight same entry multiple pages after (10 pages)
7163
+ _onPageDownPress(event) {
7164
+ event.preventDefault();
7165
+ this.triggerHighlightSameMonthNextPage.emit(event.altKey);
7166
+ }
7167
+ //alone: highlight same entry on the previous page
7168
+ //with alt: highlight same entry multiple pages before (10 pages)
7169
+ _onPageUpPress(event) {
7170
+ event.preventDefault();
7171
+ this.triggerHighlightSameMonthPreviousPage.emit(event.altKey);
7172
+ }
7173
+ //! helpers
7174
+ isMonthToday(month) {
7175
+ return this.activeYear() === TODAY$1.getFullYear() && month === TODAY$1.getMonth();
7176
+ }
7177
+ isMonthSelected(month) {
7178
+ if (month instanceof Date)
7179
+ month = month.getMonth();
7180
+ const isStartDateSelected = this.isMonthSelectedStart(month);
7297
7181
  if (this.rangeSelectionMode()) {
7298
- const isEndDateSelected = this.isDaySelectedEnd(day);
7182
+ const isEndDateSelected = this.isMonthSelectedEnd(month);
7299
7183
  return isStartDateSelected || isEndDateSelected;
7300
7184
  }
7301
7185
  return isStartDateSelected;
7302
7186
  }
7303
- isDaySelectedStart(day) {
7304
- if (day instanceof Date)
7305
- day = day.getDate();
7187
+ isMonthSelectedStart(month) {
7188
+ if (month instanceof Date)
7189
+ month = month.getMonth();
7306
7190
  const selected = this.selectedDate();
7307
- const { year, month, date } = getDateComponents(selected, this.UTC());
7308
- const isStartDateSelected = selected !== null && this.activeYear() === year && this.activeMonth() === month && day === date;
7191
+ const { year, month: selectedMonth } = getDateComponents(selected, this.UTC());
7192
+ const isStartDateSelected = selected !== null && this.activeYear() === year && month === selectedMonth;
7309
7193
  return isStartDateSelected;
7310
7194
  }
7311
- isDaySelectedEnd(day) {
7312
- if (day instanceof Date)
7313
- day = day.getDate();
7195
+ isMonthSelectedEnd(month) {
7196
+ if (month instanceof Date)
7197
+ month = month.getMonth();
7314
7198
  const selected = this.selectedDateEnd();
7315
- const { year, month, date } = getDateComponents(selected, this.UTC());
7316
- const isEndDateSelected = selected !== null && this.activeYear() === year && this.activeMonth() === month && day === date;
7199
+ const { year, month: selectedMonth } = getDateComponents(selected, this.UTC());
7200
+ const isEndDateSelected = selected !== null && this.activeYear() === year && month === selectedMonth;
7317
7201
  return isEndDateSelected;
7318
7202
  }
7319
- isDayBetweenSelectedRange(day) {
7203
+ isMonthBetweenSelectedRange(month) {
7320
7204
  if (!this.rangeSelectionMode())
7321
7205
  return false;
7322
- if (day instanceof Date)
7323
- day = day.getDate();
7206
+ if (month instanceof Date)
7207
+ month = month.getMonth();
7324
7208
  const selected = this.selectedDate();
7325
7209
  const selectedEnd = this.selectedDateEnd();
7326
7210
  if (selected === null || selectedEnd === null || selected >= selectedEnd)
7327
7211
  return false;
7328
- return this._isDayBetweenDates(day, selected, selectedEnd);
7212
+ return this._isMonthBetweenDates(month, selected, selectedEnd);
7329
7213
  }
7330
- isDayBetweenSelectedHighlighted(day) {
7214
+ isMonthBetweenSelectedHighlighted(month) {
7331
7215
  if (!this.rangeSelectionMode() || this.selectedDateEnd())
7332
7216
  return false;
7333
- if (day instanceof Date)
7334
- day = day.getDate();
7217
+ if (month instanceof Date)
7218
+ month = month.getMonth();
7335
7219
  const selected = this.selectedDate();
7336
- const highlightedEnd = this.highlightedDayDate();
7220
+ const highlightedEnd = this.highlightedMonthDate();
7337
7221
  if (selected === null || highlightedEnd === null || selected >= highlightedEnd)
7338
7222
  return false;
7339
- return this._isDayBetweenDates(day, selected, highlightedEnd);
7223
+ return this._isMonthBetweenDates(month, selected, highlightedEnd);
7340
7224
  }
7341
- _isDayBetweenDates(day, startDate, endDate) {
7342
- const date = createDate(this.activeYear(), this.activeMonth(), day, this.UTC());
7343
- return date >= startDate && date <= endDate;
7225
+ _isMonthBetweenDates(month, startDate, endDate) {
7226
+ const { year: startYear, month: startMonth } = getDateComponents(startDate, this.UTC());
7227
+ const { year: endYear, month: endMonth } = getDateComponents(endDate, this.UTC());
7228
+ return startYear <= this.activeYear() && startMonth <= month && endYear >= this.activeYear() && endMonth >= month;
7344
7229
  }
7345
- onCalendarDayMouseover(day) {
7230
+ isYearOutOfRange(year) {
7231
+ return isYearOutOfRange(year, this.min(), this.max());
7232
+ }
7233
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MonthsViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7234
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: MonthsViewComponent, isStandalone: false, selector: "ard-months-view", inputs: { tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: true, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: true, transformFunction: null }, _isUsingKeyboard: { classPropertyName: "_isUsingKeyboard", publicName: "_isUsingKeyboard", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: true, transformFunction: null }, activeYear: { classPropertyName: "activeYear", publicName: "activeYear", isSignal: true, isRequired: true, transformFunction: null }, activeMonth: { classPropertyName: "activeMonth", publicName: "activeMonth", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDateEnd: { classPropertyName: "selectedDateEnd", publicName: "selectedDateEnd", isSignal: true, isRequired: true, transformFunction: null }, rangeSelectionMode: { classPropertyName: "rangeSelectionMode", publicName: "rangeSelectionMode", isSignal: true, isRequired: true, transformFunction: null }, UTC: { classPropertyName: "UTC", publicName: "UTC", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, multiCalendarLocation: { classPropertyName: "multiCalendarLocation", publicName: "multiCalendarLocation", isSignal: true, isRequired: true, transformFunction: null }, highlightedMonth: { classPropertyName: "highlightedMonth", publicName: "highlightedMonth", isSignal: true, isRequired: true, transformFunction: null }, monthsViewHeaderTemplate: { classPropertyName: "monthsViewHeaderTemplate", publicName: "monthsViewHeaderTemplate", isSignal: true, isRequired: true, transformFunction: null }, monthTemplate: { classPropertyName: "monthTemplate", publicName: "monthTemplate", isSignal: true, isRequired: true, transformFunction: null }, monthsViewHeaderDateFormat: { classPropertyName: "monthsViewHeaderDateFormat", publicName: "monthsViewHeaderDateFormat", isSignal: true, isRequired: true, transformFunction: null }, monthDateFormat: { classPropertyName: "monthDateFormat", publicName: "monthDateFormat", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { triggerOpenYearsView: "triggerOpenYearsView", triggerOpenDaysView: "triggerOpenDaysView", focusEvent: "focus", blurEvent: "blur", triggerSelectMonth: "triggerSelectMonth", triggeChangeYear: "triggeChangeYear", triggerHighlightMonth: "triggerHighlightMonth", triggerHighlightNextMonth: "triggerHighlightNextMonth", triggerHighlightPreviousMonth: "triggerHighlightPreviousMonth", triggerHighlightFirstMonth: "triggerHighlightFirstMonth", triggerHighlightLastMonth: "triggerHighlightLastMonth", triggerHighlightSameMonthPreviousPage: "triggerHighlightSameMonthPreviousPage", triggerHighlightSameMonthNextPage: "triggerHighlightSameMonthNextPage" }, host: { listeners: { "mousemove": "onMouseMove()" } }, viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ard-months-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultMonthsViewHeaderTemplate\r\n let-date=\"date\"\r\n let-nextPage=\"nextPage\"\r\n let-prevPage=\"prevPage\"\r\n let-canGoToNextPage=\"canGoToNextPage\"\r\n let-canGoToPreviousPage=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openDaysView=\"openDaysView\"\r\n let-onFocus=\"onFocus\"\r\n let-onBlur=\"onBlur\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevPage()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousPage\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [color]=\"color()\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openDaysView()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n >\r\n {{ date | date: monthsViewHeaderDateFormat() }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextPage()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextPage\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"monthsViewHeaderTemplate() || defaultMonthsViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"monthsViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__simple-grid\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onMonthGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onMonthGridBlur()\"\r\n (click)=\"onMonthGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @for (month of monthsArray(); track $index) {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedMonth() === month.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isMonthBetweenSelectedHighlighted(month.value)\"\r\n [class.ard-calendar__entry-disabled]=\"month.disabled\"\r\n [class.ard-calendar__entry-selected]=\"isMonthSelected(month.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isMonthSelectedStart(month.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isMonthSelectedEnd(month.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isMonthBetweenSelectedRange(month.value)\"\r\n [class.ard-calendar-today]=\"isMonthToday(month.value)\"\r\n (click)=\"onCalendarMonthClick(month.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarMonthMouseover(month.value)\"\r\n role=\"gridcell\"\r\n >\r\n <div class=\"ard-calendar__entry-button\">\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultMonthTemplate\r\n let-month\r\n >\r\n {{ month | date: monthDateFormat() : '+0000' | uppercase }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"monthTemplate() || defaultMonthTemplate\"\r\n [ngTemplateOutletContext]=\"monthContext()(month.value)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-months-view{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumIconButtonComponent, selector: "ard-icon-button", inputs: ["wrapperClasses", "type", "ariaLabel", "color", "lightColoring", "compact", "pointerEventsWhenDisabled"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }, { kind: "component", type: ArdiumButtonComponent, selector: "ard-button", inputs: ["variant", "vertical"], outputs: ["focus", "blur"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7235
+ }
7236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MonthsViewComponent, decorators: [{
7237
+ type: Component,
7238
+ args: [{ standalone: false, selector: 'ard-months-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ard-months-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultMonthsViewHeaderTemplate\r\n let-date=\"date\"\r\n let-nextPage=\"nextPage\"\r\n let-prevPage=\"prevPage\"\r\n let-canGoToNextPage=\"canGoToNextPage\"\r\n let-canGoToPreviousPage=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openDaysView=\"openDaysView\"\r\n let-onFocus=\"onFocus\"\r\n let-onBlur=\"onBlur\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevPage()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousPage\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [color]=\"color()\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openDaysView()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n >\r\n {{ date | date: monthsViewHeaderDateFormat() }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextPage()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextPage\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"monthsViewHeaderTemplate() || defaultMonthsViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"monthsViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__simple-grid\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onMonthGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onMonthGridBlur()\"\r\n (click)=\"onMonthGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @for (month of monthsArray(); track $index) {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedMonth() === month.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isMonthBetweenSelectedHighlighted(month.value)\"\r\n [class.ard-calendar__entry-disabled]=\"month.disabled\"\r\n [class.ard-calendar__entry-selected]=\"isMonthSelected(month.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isMonthSelectedStart(month.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isMonthSelectedEnd(month.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isMonthBetweenSelectedRange(month.value)\"\r\n [class.ard-calendar-today]=\"isMonthToday(month.value)\"\r\n (click)=\"onCalendarMonthClick(month.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarMonthMouseover(month.value)\"\r\n role=\"gridcell\"\r\n >\r\n <div class=\"ard-calendar__entry-button\">\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultMonthTemplate\r\n let-month\r\n >\r\n {{ month | date: monthDateFormat() : '+0000' | uppercase }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"monthTemplate() || defaultMonthTemplate\"\r\n [ngTemplateOutletContext]=\"monthContext()(month.value)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-months-view{display:block}}\n"] }]
7239
+ }], propDecorators: { onMouseMove: [{
7240
+ type: HostListener,
7241
+ args: ['mousemove']
7242
+ }] } });
7243
+
7244
+ const TODAY = new Date();
7245
+ class YearsViewComponent {
7246
+ constructor() {
7247
+ this.tabIndex = input.required();
7248
+ this.readOnly = input.required();
7249
+ this.disabled = input.required();
7250
+ this.autoFocus = input.required();
7251
+ this._isUsingKeyboard = input.required();
7252
+ this.selectedDate = input.required();
7253
+ this.selectedDateEnd = input.required();
7254
+ this.rangeSelectionMode = input.required();
7255
+ this.UTC = input.required();
7256
+ this.min = input.required();
7257
+ this.max = input.required();
7258
+ this.multiCalendarLocation = input.required();
7259
+ this.currentYearRangeStart = input.required();
7260
+ this.multipleYearPageSize = input.required();
7261
+ this.yearsArray = computed(() => getCalendarYearsArray(this.currentYearRangeStart(), this.multipleYearPageSize(), this.min(), this.max()));
7262
+ this.currentAriaLabel = computed(() => {
7263
+ return this.highlightedYear()?.toString() ?? '';
7264
+ });
7265
+ //! outputs
7266
+ this.triggerOpenMonthsView = output();
7267
+ this.triggerOpenDaysView = output();
7268
+ this.focusEvent = output({ alias: 'focus' });
7269
+ this.blurEvent = output({ alias: 'blur' });
7270
+ this.triggerSelectYear = output();
7271
+ this.triggerChangeYearsViewPage = output();
7272
+ this.triggerHighlightYear = output();
7273
+ this.triggerHighlightNextYear = output();
7274
+ this.triggerHighlightPreviousYear = output();
7275
+ this.triggerHighlightFirstYear = output();
7276
+ this.triggerHighlightLastYear = output();
7277
+ this.triggerHighlightSameYearPreviousPage = output();
7278
+ this.triggerHighlightSameYearNextPage = output();
7279
+ //! calendar entry hover & click
7280
+ this.highlightedYear = input.required();
7281
+ this.highlightedYearDate = computed(() => {
7282
+ const year = this.highlightedYear();
7283
+ if (isNull(year))
7284
+ return null;
7285
+ return new Date(year, 0, 1);
7286
+ });
7287
+ //! focusing
7288
+ this.focusableElement = viewChild.required('focusableElement');
7289
+ //! templates
7290
+ this.yearsViewHeaderTemplate = input.required();
7291
+ this.yearTemplate = input.required();
7292
+ //! template customizations
7293
+ this.yearsViewHeaderDateFormat = input.required(); // 'YYYY'
7294
+ this.yearDateFormat = input.required(); // 'YYYY'
7295
+ //! template contexts
7296
+ this.yearsViewHeaderContext = computed(() => {
7297
+ const yearRangeStart = this.currentYearRangeStart();
7298
+ const yearRangeEnd = yearRangeStart + 23;
7299
+ const dateRange = new DateRange(getUTCDate(yearRangeStart, 0, 2), // second day of month to prevent timezone issues
7300
+ getUTCDate(yearRangeEnd, 0, 2));
7301
+ const yearRange = {
7302
+ from: yearRangeStart,
7303
+ to: yearRangeEnd,
7304
+ };
7305
+ return {
7306
+ nextPage: () => {
7307
+ this.triggerChangeYearsViewPage.emit(1);
7308
+ },
7309
+ prevPage: () => {
7310
+ this.triggerChangeYearsViewPage.emit(-1);
7311
+ },
7312
+ openMonthsView: () => {
7313
+ this.triggerOpenMonthsView.emit();
7314
+ },
7315
+ openDaysView: () => {
7316
+ this.triggerOpenDaysView.emit();
7317
+ },
7318
+ onFocus: (event) => {
7319
+ this.focusEvent.emit(event);
7320
+ },
7321
+ onBlur: (event) => {
7322
+ this.blurEvent.emit(event);
7323
+ },
7324
+ canGoToNextPage: !this.isYearOutOfRange(yearRangeEnd + 1),
7325
+ canGoToPreviousPage: !this.isYearOutOfRange(yearRangeStart - 1),
7326
+ hideNextPageButton: this.multiCalendarLocation() === ArdMultiCalendarLocation.Left ||
7327
+ this.multiCalendarLocation() === ArdMultiCalendarLocation.Inner,
7328
+ hidePreviousPageButton: this.multiCalendarLocation() === ArdMultiCalendarLocation.Right ||
7329
+ this.multiCalendarLocation() === ArdMultiCalendarLocation.Inner,
7330
+ yearRange: yearRange,
7331
+ dateRange,
7332
+ $implicit: dateRange,
7333
+ };
7334
+ });
7335
+ this.yearContext = computed(() => {
7336
+ return (year) => {
7337
+ const date = getUTCDate(year, 1, 2); // second day of month to prevent timezone issues
7338
+ return {
7339
+ value: year,
7340
+ date,
7341
+ $implicit: date,
7342
+ select: (year) => {
7343
+ this.triggerSelectYear.emit(year);
7344
+ },
7345
+ };
7346
+ };
7347
+ });
7348
+ }
7349
+ onMouseMove() {
7346
7350
  if (this._isUsingKeyboard())
7347
7351
  return;
7348
- if (this.disabled() || this.readOnly())
7352
+ if (this.highlightedYear())
7353
+ this.triggerHighlightYear.emit(null);
7354
+ }
7355
+ ngAfterViewInit() {
7356
+ if (!this.autoFocus())
7349
7357
  return;
7350
- if (day && this.isDayFilteredOut()(day))
7358
+ this.focus();
7359
+ this.triggerHighlightYear.emit(this.currentYearRangeStart());
7360
+ }
7361
+ onCalendarYearMouseover(year) {
7362
+ if (this._isUsingKeyboard() || this.disabled() || this.readOnly())
7351
7363
  return;
7352
- this.triggerHighlightDay.emit(day);
7364
+ this.triggerHighlightYear.emit(year);
7353
7365
  }
7354
- onCalendarDayClick(day) {
7366
+ onCalendarYearClick(year) {
7355
7367
  if (this.disabled() || this.readOnly())
7356
7368
  return;
7357
- if (day === null)
7358
- return;
7359
- if (this.isDayFilteredOut()(day))
7360
- return;
7361
- this.triggerHighlightDay.emit(day);
7362
- this.focus();
7363
- this.triggerSelectDay.emit(day);
7369
+ this.triggerSelectYear.emit(year);
7364
7370
  }
7365
- onDayGridFocus() {
7371
+ onYearGridFocus() {
7366
7372
  if (this.disabled() || this.readOnly())
7367
7373
  return;
7368
- this.triggerHighlightFirstDay.emit();
7374
+ this.triggerHighlightFirstYear.emit();
7369
7375
  }
7370
- onDayGridBlur() {
7376
+ onYearGridBlur() {
7371
7377
  if (this.disabled() || this.readOnly())
7372
7378
  return;
7373
- this.triggerHighlightDay.emit(null);
7379
+ this.triggerHighlightYear.emit(null);
7374
7380
  }
7375
- onDayGridClick() {
7381
+ onYearGridClick() {
7376
7382
  if (this.disabled() || this.readOnly())
7377
7383
  return;
7378
- if (this.highlightedDay() !== null)
7384
+ if (this.highlightedYear() !== null)
7379
7385
  return;
7380
- this.triggerHighlightFirstDay.emit();
7386
+ this.triggerHighlightFirstYear.emit();
7381
7387
  }
7382
7388
  //! helpers
7383
- isDayToday(day) {
7384
- return this.activeYear() === TODAY$2.getFullYear() && this.activeMonth() === TODAY$2.getMonth() && day === TODAY$2.getDate();
7389
+ isYearToday(year) {
7390
+ return year === TODAY.getFullYear();
7391
+ }
7392
+ isYearSelected(year) {
7393
+ if (year instanceof Date)
7394
+ year = year.getFullYear();
7395
+ const isStartDateSelected = this.isYearSelectedStart(year);
7396
+ if (this.rangeSelectionMode()) {
7397
+ const isEndDateSelected = this.isYearSelectedEnd(year);
7398
+ return isStartDateSelected || isEndDateSelected;
7399
+ }
7400
+ return isStartDateSelected;
7401
+ }
7402
+ isYearSelectedStart(year) {
7403
+ if (year instanceof Date)
7404
+ year = year.getFullYear();
7405
+ const selected = this.selectedDate();
7406
+ const { year: selectedYear } = getDateComponents(selected, this.UTC());
7407
+ const isStartDateSelected = selected !== null && year === selectedYear;
7408
+ return isStartDateSelected;
7409
+ }
7410
+ isYearSelectedEnd(year) {
7411
+ if (year instanceof Date)
7412
+ year = year.getFullYear();
7413
+ const selected = this.selectedDateEnd();
7414
+ const { year: selectedYear } = getDateComponents(selected, this.UTC());
7415
+ const isEndDateSelected = selected !== null && year === selectedYear;
7416
+ return isEndDateSelected;
7417
+ }
7418
+ isYearBetweenSelectedRange(year) {
7419
+ if (!this.rangeSelectionMode())
7420
+ return false;
7421
+ if (year instanceof Date)
7422
+ year = year.getFullYear();
7423
+ const selected = this.selectedDate();
7424
+ const selectedEnd = this.selectedDateEnd();
7425
+ if (selected === null || selectedEnd === null || selected >= selectedEnd)
7426
+ return false;
7427
+ return this._isYearBetweenDates(year, selected, selectedEnd);
7428
+ }
7429
+ isYearBetweenSelectedHighlighted(year) {
7430
+ if (!this.rangeSelectionMode() || this.selectedDateEnd())
7431
+ return false;
7432
+ if (year instanceof Date)
7433
+ year = year.getFullYear();
7434
+ const selected = this.selectedDate();
7435
+ const highlightedEnd = this.highlightedYearDate();
7436
+ if (selected === null || highlightedEnd === null || selected >= highlightedEnd)
7437
+ return false;
7438
+ return this._isYearBetweenDates(year, selected, highlightedEnd);
7439
+ }
7440
+ _isYearBetweenDates(year, startDate, endDate) {
7441
+ const { year: startYear } = getDateComponents(startDate, this.UTC());
7442
+ const { year: endYear } = getDateComponents(endDate, this.UTC());
7443
+ return startYear <= year && endYear >= year;
7385
7444
  }
7386
- isMonthOutOfRange(month) {
7387
- return isMonthOutOfRange(month, this.activeYear(), this.min(), this.max());
7445
+ isYearOutOfRange(year) {
7446
+ return isYearOutOfRange(year, this.min(), this.max());
7447
+ }
7448
+ focus() {
7449
+ this.focusableElement().nativeElement.focus();
7388
7450
  }
7389
7451
  //! keyboard controls
7390
7452
  onMainGridKeydown(event) {
@@ -7426,659 +7488,620 @@ class DaysViewComponent {
7426
7488
  //select currently selected entry
7427
7489
  _onEnterPress(event) {
7428
7490
  event.preventDefault();
7429
- this.triggerSelectDay.emit(this.highlightedDay());
7491
+ const year = this.highlightedYear();
7492
+ if (isNull(year))
7493
+ return;
7494
+ this.triggerSelectYear.emit(year);
7430
7495
  }
7431
7496
  //highlight the entry one line below
7432
7497
  _onArrowDownPress(event) {
7433
7498
  event.preventDefault();
7434
- this.triggerHighlightNextDay.emit(7);
7499
+ this.triggerHighlightNextYear.emit(4); //4 years per line
7435
7500
  }
7436
7501
  //highlight the entry one line above
7437
7502
  _onArrowUpPress(event) {
7438
7503
  event.preventDefault();
7439
- this.triggerHighlightPreviousDay.emit(7);
7504
+ this.triggerHighlightPreviousYear.emit(4); //4 years per line
7440
7505
  }
7441
7506
  //highlight next entry
7442
7507
  _onArrowRightPress(event) {
7443
7508
  event.preventDefault();
7444
- this.triggerHighlightNextDay.emit(1);
7509
+ this.triggerHighlightNextYear.emit(1);
7445
7510
  }
7446
7511
  //highlight previous entry
7447
7512
  _onArrowLeftPress(event) {
7448
7513
  event.preventDefault();
7449
- this.triggerHighlightPreviousDay.emit(1);
7514
+ this.triggerHighlightPreviousYear.emit(1);
7450
7515
  }
7451
7516
  //highlight first entry on the page
7452
7517
  _onHomePress(event) {
7453
7518
  event.preventDefault();
7454
- this.triggerHighlightFirstDay.emit();
7519
+ this.triggerHighlightFirstYear.emit();
7455
7520
  }
7456
7521
  //highlight last entry on the page
7457
7522
  _onEndPress(event) {
7458
7523
  event.preventDefault();
7459
- this.triggerHighlightLastDay.emit();
7460
- }
7461
- //alone: highlight same entry on the next page
7462
- //with alt: highlight same entry multiple pages after (12 pages)
7463
- _onPageDownPress(event) {
7464
- event.preventDefault();
7465
- this.triggerHighlightSameDayNextPage.emit(event.altKey);
7524
+ this.triggerHighlightLastYear.emit();
7466
7525
  }
7467
7526
  //alone: highlight same entry on the previous page
7468
- //with alt: highlight same entry multiple pages before (12 pages)
7527
+ //with alt: highlight same entry multiple pages before
7469
7528
  _onPageUpPress(event) {
7470
7529
  event.preventDefault();
7471
- this.triggerHighlightSameDayPreviousPage.emit(event.altKey);
7530
+ this.triggerHighlightSameYearPreviousPage.emit(event.altKey);
7472
7531
  }
7473
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DaysViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7474
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: DaysViewComponent, isStandalone: false, selector: "ard-days-view", inputs: { tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: true, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: true, transformFunction: null }, _isUsingKeyboard: { classPropertyName: "_isUsingKeyboard", publicName: "_isUsingKeyboard", isSignal: true, isRequired: true, transformFunction: null }, activeYear: { classPropertyName: "activeYear", publicName: "activeYear", isSignal: true, isRequired: true, transformFunction: null }, activeMonth: { classPropertyName: "activeMonth", publicName: "activeMonth", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDateEnd: { classPropertyName: "selectedDateEnd", publicName: "selectedDateEnd", isSignal: true, isRequired: true, transformFunction: null }, rangeSelectionMode: { classPropertyName: "rangeSelectionMode", publicName: "rangeSelectionMode", isSignal: true, isRequired: true, transformFunction: null }, UTC: { classPropertyName: "UTC", publicName: "UTC", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, multiCalendarLocation: { classPropertyName: "multiCalendarLocation", publicName: "multiCalendarLocation", isSignal: true, isRequired: true, transformFunction: null }, isDayFilteredOut: { classPropertyName: "isDayFilteredOut", publicName: "isDayFilteredOut", isSignal: true, isRequired: true, transformFunction: null }, highlightedDay: { classPropertyName: "highlightedDay", publicName: "highlightedDay", isSignal: true, isRequired: true, transformFunction: null }, firstWeekday: { classPropertyName: "firstWeekday", publicName: "firstWeekday", isSignal: true, isRequired: true, transformFunction: null }, staticHeight: { classPropertyName: "staticHeight", publicName: "staticHeight", isSignal: true, isRequired: true, transformFunction: null }, hideFloatingMonth: { classPropertyName: "hideFloatingMonth", publicName: "hideFloatingMonth", isSignal: true, isRequired: true, transformFunction: null }, daysViewHeaderTemplate: { classPropertyName: "daysViewHeaderTemplate", publicName: "daysViewHeaderTemplate", isSignal: true, isRequired: true, transformFunction: null }, floatingMonthTemplate: { classPropertyName: "floatingMonthTemplate", publicName: "floatingMonthTemplate", isSignal: true, isRequired: true, transformFunction: null }, weekdayTemplate: { classPropertyName: "weekdayTemplate", publicName: "weekdayTemplate", isSignal: true, isRequired: true, transformFunction: null }, dayTemplate: { classPropertyName: "dayTemplate", publicName: "dayTemplate", isSignal: true, isRequired: true, transformFunction: null }, daysViewHeaderDateFormat: { classPropertyName: "daysViewHeaderDateFormat", publicName: "daysViewHeaderDateFormat", isSignal: true, isRequired: true, transformFunction: null }, weekdayDateFormat: { classPropertyName: "weekdayDateFormat", publicName: "weekdayDateFormat", isSignal: true, isRequired: true, transformFunction: null }, weekdayTitleDateFormat: { classPropertyName: "weekdayTitleDateFormat", publicName: "weekdayTitleDateFormat", isSignal: true, isRequired: true, transformFunction: null }, floatingMonthDateFormat: { classPropertyName: "floatingMonthDateFormat", publicName: "floatingMonthDateFormat", isSignal: true, isRequired: true, transformFunction: null }, floatingMonthTitleDateFormat: { classPropertyName: "floatingMonthTitleDateFormat", publicName: "floatingMonthTitleDateFormat", isSignal: true, isRequired: true, transformFunction: null }, dayDateFormat: { classPropertyName: "dayDateFormat", publicName: "dayDateFormat", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { triggerOpenYearsView: "triggerOpenYearsView", triggerOpenMonthsView: "triggerOpenMonthsView", triggerSelectDay: "triggerSelectDay", triggerChangeMonth: "triggerChangeMonth", triggerChangeYear: "triggerChangeYear", triggerHighlightDay: "triggerHighlightDay", triggerHighlightNextDay: "triggerHighlightNextDay", triggerHighlightPreviousDay: "triggerHighlightPreviousDay", triggerHighlightFirstDay: "triggerHighlightFirstDay", triggerHighlightLastDay: "triggerHighlightLastDay", triggerHighlightSameDayPreviousPage: "triggerHighlightSameDayPreviousPage", triggerHighlightSameDayNextPage: "triggerHighlightSameDayNextPage", focusEvent: "focus", blurEvent: "blur" }, host: { listeners: { "mousemove": "onMouseMove()" } }, viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ard-days-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultDaysViewHeaderTemplate\r\n let-currDate\r\n let-nextMonth=\"nextMonth\"\r\n let-prevMonth=\"prevMonth\"\r\n let-canGoToNextMonth=\"canGoToNextPage\"\r\n let-canGoToPreviousMonth=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openYearsView=\"openYearsView\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevMonth()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousMonth\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openYearsView()\"\r\n >\r\n {{ currDate | date : this.daysViewHeaderDateFormat() | uppercase }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextMonth()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextMonth\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"daysViewHeaderTemplate() || defaultDaysViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"daysViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div class=\"ard-calendar__weekdays\">\r\n <ng-template\r\n #defaultWeekdayTemplate\r\n let-date\r\n >\r\n <div\r\n class=\"ard-calendar__weekday\"\r\n [title]=\"date | date : weekdayTitleDateFormat() | titlecase\"\r\n >\r\n {{ date | date : weekdayDateFormat() | uppercase }}\r\n </div>\r\n </ng-template>\r\n @for (weekdayIndex of weekdayArray(); track weekdayIndex) {\r\n <ng-template\r\n [ngTemplateOutlet]=\"weekdayTemplate() || defaultWeekdayTemplate\"\r\n [ngTemplateOutletContext]=\"weekdayContext()(weekdayIndex)\"\r\n />\r\n }\r\n </div>\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__days-grid\"\r\n [class.ard-reserve-top-row]=\"reserveTopRow()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onDayGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onDayGridBlur()\"\r\n (click)=\"onDayGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @if (!hideFloatingMonth()) {\r\n <div class=\"ard-calendar__floating-month\">\r\n <ng-template\r\n #defaultFloatingMonthTemplate\r\n let-date\r\n >\r\n <div [title]=\"date | date : floatingMonthTitleDateFormat() | titlecase\">\r\n {{ date | date : floatingMonthDateFormat() | uppercase }}\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"floatingMonthTemplate() || defaultFloatingMonthTemplate\"\r\n [ngTemplateOutletContext]=\"floatingMonthContext()\"\r\n />\r\n </div>\r\n } @for (week of activeCalendarData().array; track $index) { @for (day of week; track day ? day :\r\n activeCalendarData().leadingSpaces - $index) { @if (day === null) {\r\n <div class=\"ard-calendar__entry ard-calendar__entry-empty\"></div>\r\n } @else {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedDay() === day.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isDayBetweenSelectedHighlighted(day.value)\"\r\n [class.ard-calendar__entry-disabled]=\"day.disabled || isDayFilteredOut()(day.value)\"\r\n [class.ard-calendar__entry-selected]=\"isDaySelected(day.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isDaySelectedStart(day.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isDaySelectedEnd(day.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isDayBetweenSelectedRange(day.value)\"\r\n [class.ard-calendar-today]=\"isDayToday(day.value)\"\r\n (click)=\"onCalendarDayClick(day.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarDayMouseover(day.value)\"\r\n role=\"gridcell\"\r\n >\r\n <div class=\"ard-calendar__entry-button\">\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultDayTemplate\r\n let-date=\"date\"\r\n >\r\n {{ date | date : dayDateFormat() }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"dayTemplate() || defaultDayTemplate\"\r\n [ngTemplateOutletContext]=\"dayContext()(day.value)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n } } }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-days-view{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumIconButtonComponent, selector: "ard-icon-button", inputs: ["wrapperClasses", "type", "ariaLabel", "color", "lightColoring", "compact", "pointerEventsWhenDisabled"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }, { kind: "component", type: ArdiumButtonComponent, selector: "ard-button", inputs: ["variant", "vertical"], outputs: ["focus", "blur"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7532
+ //alone: highlight same entry on the next page
7533
+ //with alt: highlight same entry multiple pages after
7534
+ _onPageDownPress(event) {
7535
+ event.preventDefault();
7536
+ this.triggerHighlightSameYearNextPage.emit(event.altKey);
7537
+ }
7538
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: YearsViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7539
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: YearsViewComponent, isStandalone: false, selector: "ard-years-view", inputs: { tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: true, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: true, transformFunction: null }, _isUsingKeyboard: { classPropertyName: "_isUsingKeyboard", publicName: "_isUsingKeyboard", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDateEnd: { classPropertyName: "selectedDateEnd", publicName: "selectedDateEnd", isSignal: true, isRequired: true, transformFunction: null }, rangeSelectionMode: { classPropertyName: "rangeSelectionMode", publicName: "rangeSelectionMode", isSignal: true, isRequired: true, transformFunction: null }, UTC: { classPropertyName: "UTC", publicName: "UTC", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, multiCalendarLocation: { classPropertyName: "multiCalendarLocation", publicName: "multiCalendarLocation", isSignal: true, isRequired: true, transformFunction: null }, currentYearRangeStart: { classPropertyName: "currentYearRangeStart", publicName: "currentYearRangeStart", isSignal: true, isRequired: true, transformFunction: null }, multipleYearPageSize: { classPropertyName: "multipleYearPageSize", publicName: "multipleYearPageSize", isSignal: true, isRequired: true, transformFunction: null }, highlightedYear: { classPropertyName: "highlightedYear", publicName: "highlightedYear", isSignal: true, isRequired: true, transformFunction: null }, yearsViewHeaderTemplate: { classPropertyName: "yearsViewHeaderTemplate", publicName: "yearsViewHeaderTemplate", isSignal: true, isRequired: true, transformFunction: null }, yearTemplate: { classPropertyName: "yearTemplate", publicName: "yearTemplate", isSignal: true, isRequired: true, transformFunction: null }, yearsViewHeaderDateFormat: { classPropertyName: "yearsViewHeaderDateFormat", publicName: "yearsViewHeaderDateFormat", isSignal: true, isRequired: true, transformFunction: null }, yearDateFormat: { classPropertyName: "yearDateFormat", publicName: "yearDateFormat", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { triggerOpenMonthsView: "triggerOpenMonthsView", triggerOpenDaysView: "triggerOpenDaysView", focusEvent: "focus", blurEvent: "blur", triggerSelectYear: "triggerSelectYear", triggerChangeYearsViewPage: "triggerChangeYearsViewPage", triggerHighlightYear: "triggerHighlightYear", triggerHighlightNextYear: "triggerHighlightNextYear", triggerHighlightPreviousYear: "triggerHighlightPreviousYear", triggerHighlightFirstYear: "triggerHighlightFirstYear", triggerHighlightLastYear: "triggerHighlightLastYear", triggerHighlightSameYearPreviousPage: "triggerHighlightSameYearPreviousPage", triggerHighlightSameYearNextPage: "triggerHighlightSameYearNextPage" }, host: { listeners: { "mousemove": "onMouseMove()" } }, viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ard-years-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultYearsViewHeaderTemplate\r\n let-dateRange=\"dateRange\"\r\n let-nextPage=\"nextPage\"\r\n let-prevPage=\"prevPage\"\r\n let-canGoToNextPage=\"canGoToNextPage\"\r\n let-canGoToPreviousPage=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openDaysView=\"openDaysView\"\r\n let-onFocus=\"onFocus\"\r\n let-onBlur=\"onBlur\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevPage()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousPage\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openDaysView()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n >\r\n {{ dateRange.from | date: yearsViewHeaderDateFormat() }}\r\n &mdash;\r\n {{ dateRange.to | date: yearsViewHeaderDateFormat() }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextPage()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextPage\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"yearsViewHeaderTemplate() || defaultYearsViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"yearsViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__simple-grid\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onYearGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onYearGridBlur()\"\r\n (click)=\"onYearGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @for (year of yearsArray(); track year) {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedYear() === year.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isYearBetweenSelectedHighlighted(year.value)\"\r\n [class.ard-calendar__entry-disabled]=\"year.disabled\"\r\n [class.ard-calendar__entry-selected]=\"isYearSelected(year.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isYearSelectedStart(year.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isYearSelectedEnd(year.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isYearBetweenSelectedRange(year.value)\"\r\n [class.ard-calendar-today]=\"isYearToday(year.value)\"\r\n (click)=\"onCalendarYearClick(year.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarYearMouseover(year.value)\"\r\n role=\"gridcell\"\r\n >\r\n <div class=\"ard-calendar__entry-button\">\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultYearTemplate\r\n let-year\r\n >\r\n {{ year | date: yearDateFormat() }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"yearTemplate() || defaultYearTemplate\"\r\n [ngTemplateOutletContext]=\"yearContext()(year.value)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-years-view{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumIconButtonComponent, selector: "ard-icon-button", inputs: ["wrapperClasses", "type", "ariaLabel", "color", "lightColoring", "compact", "pointerEventsWhenDisabled"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }, { kind: "component", type: ArdiumButtonComponent, selector: "ard-button", inputs: ["variant", "vertical"], outputs: ["focus", "blur"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7475
7540
  }
7476
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DaysViewComponent, decorators: [{
7541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: YearsViewComponent, decorators: [{
7477
7542
  type: Component,
7478
- args: [{ standalone: false, selector: 'ard-days-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ard-days-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultDaysViewHeaderTemplate\r\n let-currDate\r\n let-nextMonth=\"nextMonth\"\r\n let-prevMonth=\"prevMonth\"\r\n let-canGoToNextMonth=\"canGoToNextPage\"\r\n let-canGoToPreviousMonth=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openYearsView=\"openYearsView\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevMonth()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousMonth\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openYearsView()\"\r\n >\r\n {{ currDate | date : this.daysViewHeaderDateFormat() | uppercase }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextMonth()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextMonth\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"daysViewHeaderTemplate() || defaultDaysViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"daysViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div class=\"ard-calendar__weekdays\">\r\n <ng-template\r\n #defaultWeekdayTemplate\r\n let-date\r\n >\r\n <div\r\n class=\"ard-calendar__weekday\"\r\n [title]=\"date | date : weekdayTitleDateFormat() | titlecase\"\r\n >\r\n {{ date | date : weekdayDateFormat() | uppercase }}\r\n </div>\r\n </ng-template>\r\n @for (weekdayIndex of weekdayArray(); track weekdayIndex) {\r\n <ng-template\r\n [ngTemplateOutlet]=\"weekdayTemplate() || defaultWeekdayTemplate\"\r\n [ngTemplateOutletContext]=\"weekdayContext()(weekdayIndex)\"\r\n />\r\n }\r\n </div>\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__days-grid\"\r\n [class.ard-reserve-top-row]=\"reserveTopRow()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onDayGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onDayGridBlur()\"\r\n (click)=\"onDayGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @if (!hideFloatingMonth()) {\r\n <div class=\"ard-calendar__floating-month\">\r\n <ng-template\r\n #defaultFloatingMonthTemplate\r\n let-date\r\n >\r\n <div [title]=\"date | date : floatingMonthTitleDateFormat() | titlecase\">\r\n {{ date | date : floatingMonthDateFormat() | uppercase }}\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"floatingMonthTemplate() || defaultFloatingMonthTemplate\"\r\n [ngTemplateOutletContext]=\"floatingMonthContext()\"\r\n />\r\n </div>\r\n } @for (week of activeCalendarData().array; track $index) { @for (day of week; track day ? day :\r\n activeCalendarData().leadingSpaces - $index) { @if (day === null) {\r\n <div class=\"ard-calendar__entry ard-calendar__entry-empty\"></div>\r\n } @else {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedDay() === day.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isDayBetweenSelectedHighlighted(day.value)\"\r\n [class.ard-calendar__entry-disabled]=\"day.disabled || isDayFilteredOut()(day.value)\"\r\n [class.ard-calendar__entry-selected]=\"isDaySelected(day.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isDaySelectedStart(day.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isDaySelectedEnd(day.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isDayBetweenSelectedRange(day.value)\"\r\n [class.ard-calendar-today]=\"isDayToday(day.value)\"\r\n (click)=\"onCalendarDayClick(day.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarDayMouseover(day.value)\"\r\n role=\"gridcell\"\r\n >\r\n <div class=\"ard-calendar__entry-button\">\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultDayTemplate\r\n let-date=\"date\"\r\n >\r\n {{ date | date : dayDateFormat() }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"dayTemplate() || defaultDayTemplate\"\r\n [ngTemplateOutletContext]=\"dayContext()(day.value)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n } } }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-days-view{display:block}}\n"] }]
7543
+ args: [{ standalone: false, selector: 'ard-years-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ard-years-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultYearsViewHeaderTemplate\r\n let-dateRange=\"dateRange\"\r\n let-nextPage=\"nextPage\"\r\n let-prevPage=\"prevPage\"\r\n let-canGoToNextPage=\"canGoToNextPage\"\r\n let-canGoToPreviousPage=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openDaysView=\"openDaysView\"\r\n let-onFocus=\"onFocus\"\r\n let-onBlur=\"onBlur\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevPage()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousPage\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openDaysView()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n >\r\n {{ dateRange.from | date: yearsViewHeaderDateFormat() }}\r\n &mdash;\r\n {{ dateRange.to | date: yearsViewHeaderDateFormat() }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextPage()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextPage\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"yearsViewHeaderTemplate() || defaultYearsViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"yearsViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__simple-grid\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onYearGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onYearGridBlur()\"\r\n (click)=\"onYearGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @for (year of yearsArray(); track year) {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedYear() === year.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isYearBetweenSelectedHighlighted(year.value)\"\r\n [class.ard-calendar__entry-disabled]=\"year.disabled\"\r\n [class.ard-calendar__entry-selected]=\"isYearSelected(year.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isYearSelectedStart(year.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isYearSelectedEnd(year.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isYearBetweenSelectedRange(year.value)\"\r\n [class.ard-calendar-today]=\"isYearToday(year.value)\"\r\n (click)=\"onCalendarYearClick(year.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarYearMouseover(year.value)\"\r\n role=\"gridcell\"\r\n >\r\n <div class=\"ard-calendar__entry-button\">\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultYearTemplate\r\n let-year\r\n >\r\n {{ year | date: yearDateFormat() }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"yearTemplate() || defaultYearTemplate\"\r\n [ngTemplateOutletContext]=\"yearContext()(year.value)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-years-view{display:block}}\n"] }]
7479
7544
  }], propDecorators: { onMouseMove: [{
7480
7545
  type: HostListener,
7481
7546
  args: ['mousemove']
7482
7547
  }] } });
7483
7548
 
7484
- const TODAY$1 = new Date();
7485
- class MonthsViewComponent {
7486
- constructor() {
7487
- this.tabIndex = input.required();
7488
- this.readOnly = input.required();
7489
- this.disabled = input.required();
7490
- this.autoFocus = input.required();
7491
- this._isUsingKeyboard = input.required();
7492
- this.color = input.required();
7493
- this.activeYear = input.required();
7494
- this.activeMonth = input.required();
7495
- this.selectedDate = input.required();
7496
- this.selectedDateEnd = input.required();
7497
- this.rangeSelectionMode = input.required();
7498
- this.UTC = input.required();
7499
- this.min = input.required();
7500
- this.max = input.required();
7501
- this.multiCalendarLocation = input.required();
7502
- this.monthsArray = computed(() => getCalendarMonthsArray(this.activeYear(), this.min(), this.max()));
7503
- this.currentAriaLabel = computed(() => {
7504
- const month = this.highlightedMonth();
7505
- if (month === null) {
7506
- return '';
7507
- }
7508
- return new Date(this.activeYear(), month, 1).toLocaleDateString(undefined, {
7509
- year: 'numeric',
7510
- month: 'long',
7511
- });
7512
- });
7513
- //! outputs
7514
- this.triggerOpenYearsView = output();
7515
- this.triggerOpenDaysView = output();
7516
- this.focusEvent = output({ alias: 'focus' });
7517
- this.blurEvent = output({ alias: 'blur' });
7518
- this.triggerSelectMonth = output();
7519
- this.triggeChangeYear = output();
7520
- this.triggerHighlightMonth = output();
7521
- this.triggerHighlightNextMonth = output();
7522
- this.triggerHighlightPreviousMonth = output();
7523
- this.triggerHighlightFirstMonth = output();
7524
- this.triggerHighlightLastMonth = output();
7525
- this.triggerHighlightSameMonthPreviousPage = output();
7526
- this.triggerHighlightSameMonthNextPage = output();
7527
- //! calendar entry hover & click
7528
- this.highlightedMonth = input.required();
7529
- this.highlightedMonthDate = computed(() => {
7530
- const month = this.highlightedMonth();
7531
- if (isNull(month))
7532
- return null;
7533
- return new Date(this.activeYear(), month, 2);
7534
- });
7535
- //! focusing
7536
- this.focusableElement = viewChild.required('focusableElement');
7537
- //! templates
7538
- this.monthsViewHeaderTemplate = input.required();
7539
- this.monthTemplate = input.required();
7540
- //! template customizations
7541
- this.monthsViewHeaderDateFormat = input.required(); // 'YYYY'
7542
- this.monthDateFormat = input.required(); // 'MMM'
7543
- //! template contexts
7544
- this.monthsViewHeaderContext = computed(() => ({
7545
- nextPage: () => {
7546
- this.triggeChangeYear.emit(this.activeYear() + 1);
7549
+ class _AbstractCalendar extends _FormFieldComponentBase {
7550
+ constructor(defaults) {
7551
+ super(defaults);
7552
+ this.TODAY = computed(() => createDate(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), this.UTC()));
7553
+ //! appearance
7554
+ this.color = input(this._DEFAULTS.color);
7555
+ this.ngClasses = computed(() => [`ard-color-${this.color()}`].join(' '));
7556
+ //! active view
7557
+ this.activeView = model(this._DEFAULTS.activeView);
7558
+ this.activeYear = model(this._DEFAULTS.activeYear);
7559
+ this.activeMonth = model(this._DEFAULTS.activeMonth);
7560
+ this.activePageChange = output();
7561
+ this.firstWeekday = input(this._DEFAULTS.firstWeekday, {
7562
+ transform: v => {
7563
+ const value = coerceNumberProperty(v, this._DEFAULTS.firstWeekday);
7564
+ if (!Number.isInteger(value)) {
7565
+ console.error(new Error(`ARD-NF${this.componentId}1A: [firstWeekday] must be a positive integer, got "${value}". Using default value instead.`));
7566
+ return this._DEFAULTS.firstWeekday;
7567
+ }
7568
+ if (value < 0 || value > 6) {
7569
+ console.error(new Error(`ARD-NF${this.componentId}1B: [firstWeekday] must be between 0 and 6, got "${value}". Using modulo operator to adjust the value.`));
7570
+ }
7571
+ return value % 7;
7547
7572
  },
7548
- prevPage: () => {
7549
- this.triggeChangeYear.emit(this.activeYear() - 1);
7573
+ });
7574
+ this.multipleYearPageChangeModifier = input(this._DEFAULTS.multipleYearPageChangeModifier, {
7575
+ transform: v => {
7576
+ const value = coerceNumberProperty(v, this._DEFAULTS.multipleYearPageChangeModifier);
7577
+ if (!Number.isInteger(value) || value < 1) {
7578
+ console.error(new Error(`ARD-NF${this.componentId}2: [multipleYearPageChangeModifier] must be a positive integer, got "${value}". Using default value instead.`));
7579
+ return this._DEFAULTS.multipleYearPageChangeModifier;
7580
+ }
7581
+ return value;
7550
7582
  },
7551
- openYearsView: () => {
7552
- this.triggerOpenYearsView.emit();
7583
+ });
7584
+ this.multipleYearOffset = input(this._DEFAULTS.multipleYearOffset, {
7585
+ transform: v => {
7586
+ const value = coerceNumberProperty(v, this._DEFAULTS.multipleYearOffset);
7587
+ if (!Number.isInteger(value) || value < 0) {
7588
+ console.error(new Error(`ARD-NF${this.componentId}3: [multipleYearOffset] must be a non-negative integer, got "${value}". Using default value instead.`));
7589
+ return this._DEFAULTS.multipleYearOffset;
7590
+ }
7591
+ return value;
7553
7592
  },
7554
- openDaysView: () => {
7555
- this.triggerOpenDaysView.emit();
7593
+ });
7594
+ this.multipleYearPageSize = input(this._DEFAULTS.multipleYearPageSize, {
7595
+ transform: v => {
7596
+ const value = coerceNumberProperty(v, this._DEFAULTS.multipleYearPageSize);
7597
+ if (!Number.isInteger(value) || value < 1) {
7598
+ console.error(new Error(`ARD-NF${this.componentId}5: [multipleYearPageSize] must be a positive integer, got "${value}". Using default value instead.`));
7599
+ return this._DEFAULTS.multipleYearPageSize;
7600
+ }
7601
+ return value;
7556
7602
  },
7557
- canGoToNextPage: !this.isYearOutOfRange(this.activeYear() + 1),
7558
- canGoToPreviousPage: !this.isYearOutOfRange(this.activeYear() - 1),
7559
- hideNextPageButton: this.multiCalendarLocation() === ArdMultiCalendarLocation.Left ||
7560
- this.multiCalendarLocation() === ArdMultiCalendarLocation.Inner,
7561
- hidePreviousPageButton: this.multiCalendarLocation() === ArdMultiCalendarLocation.Right ||
7562
- this.multiCalendarLocation() === ArdMultiCalendarLocation.Inner,
7563
- year: this.activeYear(),
7564
- date: getUTCDate(this.activeYear(), 0, 2), // second day of month to prevent timezone issues
7565
- $implicit: this.activeYear(),
7566
- }));
7567
- this.monthContext = computed(() => (month) => {
7568
- const date = getUTCDate(this.activeYear(), month, 2); // second day of month to prevent timezone issues
7569
- return {
7570
- month,
7571
- date,
7572
- $implicit: date,
7573
- select: (month) => {
7574
- if (month instanceof Date)
7575
- month = month.getMonth();
7576
- this.triggerSelectMonth.emit(month);
7577
- },
7603
+ });
7604
+ this.multiCalendarLocation = input(this._DEFAULTS.multiCalendarLocation);
7605
+ this.autoFocus = input(this._DEFAULTS.autoFocus, { transform: v => coerceBooleanProperty(v) });
7606
+ this.staticHeight = input(this._DEFAULTS.staticHeight, { transform: v => coerceBooleanProperty(v) });
7607
+ this.hideFloatingMonth = input(this._DEFAULTS.hideFloatingMonth, {
7608
+ transform: v => coerceBooleanProperty(v),
7609
+ });
7610
+ this.daysViewComponent = viewChild.required(DaysViewComponent);
7611
+ this.monthsViewComponent = viewChild.required(MonthsViewComponent);
7612
+ this.yearsViewComponent = viewChild.required(YearsViewComponent);
7613
+ //! value
7614
+ this.selectionStart = signal(null);
7615
+ this.selectionEnd = signal(null);
7616
+ this.yearSelect = output();
7617
+ this.monthSelect = output();
7618
+ this.min = input(this._DEFAULTS.min, {
7619
+ transform: v => (v === null ? null : coerceDateProperty(v, this._DEFAULTS.min)),
7620
+ });
7621
+ this.max = input(this._DEFAULTS.max, {
7622
+ transform: v => (v === null ? null : coerceDateProperty(v, this._DEFAULTS.max)),
7623
+ });
7624
+ this.UTC = input(this._DEFAULTS.UTC, { transform: v => coerceBooleanProperty(v) });
7625
+ this._UTCAfterInit = signal(this._DEFAULTS.UTC);
7626
+ this.filter = input(this._DEFAULTS.filter);
7627
+ this.isDayFilteredOut = computed(() => {
7628
+ return (day, month = this.activeMonth(), year = this.activeYear()) => {
7629
+ return this.filter()?.(createDate(year, month, day, this.UTC())) ?? false;
7578
7630
  };
7579
7631
  });
7632
+ //! highlighting days
7633
+ this.highlightedDay = model(null);
7634
+ this.highlightDayEvent = output({ alias: 'highlightDay' });
7635
+ //! highlighting months
7636
+ this._highlightedMonth = signal(null);
7637
+ this.highlightedMonth = this._highlightedMonth.asReadonly();
7638
+ //! highlighting years
7639
+ this.__highlightedYear = signal(null);
7640
+ this.highlightedYear = this.__highlightedYear.asReadonly();
7641
+ this.currentYearRangeStart = linkedSignal(() => {
7642
+ // align to a multiple of 4 and subtract offset
7643
+ const rangeStartForCurrentYear = this.TODAY().getFullYear() - (this.TODAY().getFullYear() % 4) - this.multipleYearOffset() * 4;
7644
+ const activeYear = this.activeYear();
7645
+ const offset = roundToMultiple(activeYear - rangeStartForCurrentYear + 1, this.multipleYearPageSize(), 'up') - this.multipleYearPageSize(); // check how many n-year pages need to be turned
7646
+ return rangeStartForCurrentYear + offset;
7647
+ });
7648
+ //! internals
7649
+ this._isUsingKeyboard = signal(false);
7650
+ //! templates
7651
+ this.templateRepository = contentChild(_CalendarTemplateRepositoryDirective);
7652
+ this.yearsViewHeaderTemplate = contentChild(ArdCalendarYearsViewHeaderTemplateDirective);
7653
+ this.monthsViewHeaderTemplate = contentChild(ArdCalendarMonthsViewHeaderTemplateDirective);
7654
+ this.daysViewHeaderTemplate = contentChild(ArdCalendarDaysViewHeaderTemplateDirective);
7655
+ this.floatingMonthTemplate = contentChild(ArdCalendarFloatingMonthTemplateDirective);
7656
+ this.yearTemplate = contentChild(ArdCalendarYearTemplateDirective);
7657
+ this.monthTemplate = contentChild(ArdCalendarMonthTemplateDirective);
7658
+ this.dayTemplate = contentChild(ArdCalendarDayTemplateDirective);
7659
+ this.weekdayTemplate = contentChild(ArdCalendarWeekdayTemplateDirective);
7660
+ //! template customizations
7661
+ this.daysViewHeaderDateFormat = input(this._DEFAULTS.daysViewHeaderDateFormat); // 'MMM YYYY'
7662
+ this.yearsViewHeaderDateFormat = input(this._DEFAULTS.yearsViewHeaderDateFormat); // 'YYYY'
7663
+ this.monthsViewHeaderDateFormat = input(this._DEFAULTS.monthsViewHeaderDateFormat); // 'YYYY'
7664
+ this.weekdayDateFormat = input(this._DEFAULTS.weekdayDateFormat); // 'EEEEE'
7665
+ this.weekdayTitleDateFormat = input(this._DEFAULTS.weekdayTitleDateFormat); // 'EEEE'
7666
+ this.floatingMonthDateFormat = input(this._DEFAULTS.floatingMonthDateFormat); // 'LLL'
7667
+ this.floatingMonthTitleDateFormat = input(this._DEFAULTS.floatingMonthTitleDateFormat); // 'LLLL'
7668
+ this.yearDateFormat = input(this._DEFAULTS.yearDateFormat); // 'YYYY'
7669
+ this.monthDateFormat = input(this._DEFAULTS.monthDateFormat); // 'MMM'
7670
+ this.dayDateFormat = input(this._DEFAULTS.dayDateFormat); // 'D'
7580
7671
  }
7581
- onMouseMove() {
7582
- if (this._isUsingKeyboard())
7583
- return;
7584
- if (this.highlightedMonth())
7585
- this.triggerHighlightMonth.emit(null);
7672
+ openDaysView() {
7673
+ this.activeView.set(ArdCalendarView.Days);
7674
+ setTimeout(() => {
7675
+ this.daysViewComponent().focus();
7676
+ }, 0);
7586
7677
  }
7587
- ngAfterViewInit() {
7588
- if (!this.autoFocus())
7589
- return;
7590
- this.focus();
7591
- this.triggerHighlightMonth.emit(0);
7678
+ openMonthsView() {
7679
+ this.activeView.set(ArdCalendarView.Months);
7680
+ setTimeout(() => {
7681
+ this.monthsViewComponent().focus();
7682
+ }, 0);
7592
7683
  }
7593
- onCalendarMonthMouseover(month) {
7594
- if (this._isUsingKeyboard())
7595
- return;
7596
- if (this.disabled() || this.readOnly())
7597
- return;
7598
- this.triggerHighlightMonth.emit(month);
7684
+ openYearsView() {
7685
+ this.activeView.set(ArdCalendarView.Years);
7686
+ setTimeout(() => {
7687
+ this.yearsViewComponent().focus();
7688
+ }, 0);
7599
7689
  }
7600
- onCalendarMonthClick(month) {
7601
- if (this.disabled() || this.readOnly())
7602
- return;
7603
- this.triggerSelectMonth.emit(month);
7690
+ _emitChange() {
7691
+ this._onChangeRegistered?.(this.value());
7604
7692
  }
7605
- onMonthGridFocus() {
7606
- if (this.disabled() || this.readOnly())
7607
- return;
7608
- this.triggerHighlightMonth.emit(0);
7693
+ ngOnChanges(changes) {
7694
+ if (changes['UTC']) {
7695
+ if (changes['UTC'].firstChange) {
7696
+ this._UTCAfterInit.set(changes['UTC'].currentValue);
7697
+ }
7698
+ else {
7699
+ console.error(`ARD-NF${this.componentId}4: <ard-${this.componentName}>'s [UTC] attribute should not be changed dynamically. This change will be ignored.`);
7700
+ }
7701
+ }
7702
+ if (changes['value']) {
7703
+ this.writeValue(changes['value'].currentValue);
7704
+ }
7609
7705
  }
7610
- onMonthGridBlur() {
7611
- if (this.disabled() || this.readOnly())
7612
- return;
7613
- this.triggerHighlightMonth.emit(null);
7706
+ _emitActivePageChange() {
7707
+ this.activePageChange.emit({ year: this.activeYear(), month: this.activeMonth() });
7614
7708
  }
7615
- onMonthGridClick() {
7616
- if (this.disabled() || this.readOnly())
7617
- return;
7618
- if (this.highlightedMonth() !== null)
7709
+ _emitHighlightedDate() {
7710
+ const day = this.highlightedDay();
7711
+ if (!day)
7619
7712
  return;
7620
- this.triggerHighlightMonth.emit(0);
7713
+ const date = createDate(this.activeYear(), this.activeMonth(), day, this.UTC());
7714
+ this.highlightDayEvent.emit(date);
7621
7715
  }
7622
- focus() {
7623
- this.focusableElement().nativeElement.focus();
7716
+ //! selecting days
7717
+ isDayOutOfRange(day, month = this.activeMonth(), year = this.activeYear()) {
7718
+ const dayDate = new Date(year, month, day);
7719
+ return isDayOutOfRange(dayDate, this.min(), this.max());
7624
7720
  }
7625
- //! keyboard controls
7626
- onMainGridKeydown(event) {
7627
- if (this.disabled() || this.readOnly())
7721
+ selectDay(day) {
7722
+ const startValue = this.selectionStart();
7723
+ // reset selection
7724
+ if (isNull(day)) {
7725
+ if (!isDefined(startValue))
7726
+ return;
7727
+ this.selectionStart.set(null);
7728
+ this.selectionEnd.set(null);
7628
7729
  return;
7629
- switch (event.code) {
7630
- case 'Space':
7631
- case 'Enter':
7632
- this._onEnterPress(event);
7633
- break;
7634
- case 'ArrowUp':
7635
- this._onArrowUpPress(event);
7636
- break;
7637
- case 'ArrowDown':
7638
- this._onArrowDownPress(event);
7639
- break;
7640
- case 'ArrowLeft':
7641
- this._onArrowLeftPress(event);
7642
- break;
7643
- case 'ArrowRight':
7644
- this._onArrowRightPress(event);
7645
- break;
7646
- case 'Home':
7647
- this._onHomePress(event);
7648
- break;
7649
- case 'End':
7650
- this._onEndPress(event);
7651
- break;
7652
- case 'PageUp':
7653
- this._onPageUpPress(event);
7654
- break;
7655
- case 'PageDown':
7656
- this._onPageDownPress(event);
7657
- break;
7658
- default:
7730
+ }
7731
+ if (day instanceof Date)
7732
+ day = day.getDate();
7733
+ // check if day is out of range or filtered out
7734
+ if ((day && this.isDayOutOfRange(day)) || this.isDayFilteredOut()(day))
7735
+ return;
7736
+ // range selection logic
7737
+ const endValue = this.selectionEnd();
7738
+ const newDate = createDate(this.activeYear(), this.activeMonth(), day, this.UTC());
7739
+ if (this.isRangeSelector) {
7740
+ // select end date
7741
+ if (isDefined(startValue) && !isDefined(endValue) && newDate > startValue) {
7742
+ this.selectionEnd.set(newDate);
7659
7743
  return;
7744
+ }
7745
+ // reset end date and start a new selection
7746
+ this.selectionEnd.set(null);
7660
7747
  }
7661
- }
7662
- //select currently selected entry
7663
- _onEnterPress(event) {
7664
- event.preventDefault();
7665
- const month = this.highlightedMonth();
7666
- if (isNull(month))
7748
+ // avoid setting the same date again
7749
+ if (startValue &&
7750
+ startValue.getFullYear() === this.activeYear() &&
7751
+ startValue.getMonth() === this.activeMonth() &&
7752
+ startValue.getDate() === day) {
7667
7753
  return;
7668
- this.triggerSelectMonth.emit(month);
7669
- }
7670
- //highlight the entry one line below
7671
- _onArrowDownPress(event) {
7672
- event.preventDefault();
7673
- this.triggerHighlightNextMonth.emit(4); //4 months per line
7754
+ }
7755
+ this.selectionStart.set(newDate);
7674
7756
  }
7675
- //highlight the entry one line above
7676
- _onArrowUpPress(event) {
7677
- event.preventDefault();
7678
- this.triggerHighlightPreviousMonth.emit(4); //4 months per line
7757
+ selectCurrentlyHighlightedDay() {
7758
+ if (!isDefined(this.highlightedDay()))
7759
+ return;
7760
+ this.selectDay(this.highlightedDay());
7679
7761
  }
7680
- //highlight next entry
7681
- _onArrowRightPress(event) {
7682
- event.preventDefault();
7683
- this.triggerHighlightNextMonth.emit(1);
7762
+ setHighlightedDay(day, month = this.activeMonth(), year = this.activeYear()) {
7763
+ if (isNull(day)) {
7764
+ this.highlightedDay.update(() => day);
7765
+ this._emitHighlightedDate();
7766
+ return;
7767
+ }
7768
+ const date = createDate(year, month, day, this.UTC());
7769
+ const outOfRange = this.isDayOutOfRange(day, month, year);
7770
+ if (outOfRange === -1) {
7771
+ this._highlightMinDay();
7772
+ return;
7773
+ }
7774
+ if (outOfRange === 1) {
7775
+ this._highlightMaxDay();
7776
+ return;
7777
+ }
7778
+ this.highlightedDay.update(() => date.getDate());
7779
+ if (date.getFullYear() !== this.activeYear()) {
7780
+ this.activeYear.set(date.getFullYear());
7781
+ }
7782
+ if (date.getMonth() !== this.activeMonth()) {
7783
+ this.activeMonth.set(date.getMonth());
7784
+ }
7785
+ this._emitHighlightedDate();
7786
+ this._emitActivePageChange();
7684
7787
  }
7685
- //highlight previous entry
7686
- _onArrowLeftPress(event) {
7687
- event.preventDefault();
7688
- this.triggerHighlightPreviousMonth.emit(1);
7788
+ _highlightMinDay() {
7789
+ const min = this.min();
7790
+ if (!isDefined(min))
7791
+ return;
7792
+ this.activeYear.set(min.getFullYear());
7793
+ this.activeMonth.set(min.getMonth());
7794
+ this.highlightedDay.set(min.getDate());
7795
+ this._emitHighlightedDate();
7796
+ this._emitActivePageChange();
7689
7797
  }
7690
- //highlight first entry on the page
7691
- _onHomePress(event) {
7692
- event.preventDefault();
7693
- this.triggerHighlightFirstMonth.emit();
7798
+ _highlightMaxDay() {
7799
+ const max = this.max();
7800
+ if (!isDefined(max))
7801
+ return;
7802
+ this.activeYear.set(max.getFullYear());
7803
+ this.activeMonth.set(max.getMonth());
7804
+ this.highlightedDay.set(max.getDate());
7805
+ this._emitHighlightedDate();
7806
+ this._emitActivePageChange();
7694
7807
  }
7695
- //highlight last entry on the page
7696
- _onEndPress(event) {
7697
- event.preventDefault();
7698
- this.triggerHighlightLastMonth.emit();
7808
+ highlightNextDay(offset = 1) {
7809
+ const currentDay = this.highlightedDay();
7810
+ const newDay = isDefined(currentDay) ? currentDay + offset : 1;
7811
+ this.setHighlightedDay(newDay);
7699
7812
  }
7700
- //alone: highlight same entry on the next page
7701
- //with alt: highlight same entry multiple pages after (10 pages)
7702
- _onPageDownPress(event) {
7703
- event.preventDefault();
7704
- this.triggerHighlightSameMonthNextPage.emit(event.altKey);
7813
+ highlightPreviousDay(offset = 1) {
7814
+ this.highlightNextDay(offset * -1);
7705
7815
  }
7706
- //alone: highlight same entry on the previous page
7707
- //with alt: highlight same entry multiple pages before (10 pages)
7708
- _onPageUpPress(event) {
7709
- event.preventDefault();
7710
- this.triggerHighlightSameMonthPreviousPage.emit(event.altKey);
7816
+ highlightFirstDay() {
7817
+ this.setHighlightedDay(1);
7711
7818
  }
7712
- //! helpers
7713
- isMonthToday(month) {
7714
- return this.activeYear() === TODAY$1.getFullYear() && month === TODAY$1.getMonth();
7819
+ highlightLastDay() {
7820
+ const daysInMonth = createDate(this.activeYear(), this.activeMonth() + 1, 0, this.UTC()).getDate();
7821
+ this.setHighlightedDay(daysInMonth);
7715
7822
  }
7716
- isMonthSelected(month) {
7717
- if (month instanceof Date)
7718
- month = month.getMonth();
7719
- const isStartDateSelected = this.isMonthSelectedStart(month);
7720
- if (this.rangeSelectionMode()) {
7721
- const isEndDateSelected = this.isMonthSelectedEnd(month);
7722
- return isStartDateSelected || isEndDateSelected;
7723
- }
7724
- return isStartDateSelected;
7823
+ highlightSameDayNextMonth() {
7824
+ const month = this.activeMonth();
7825
+ const year = this.activeYear();
7826
+ const newMonth = month + 1;
7827
+ const newYear = year + Math.floor(newMonth / 12);
7828
+ this.setHighlightedDay(this.highlightedDay(), newMonth % 12, newYear);
7725
7829
  }
7726
- isMonthSelectedStart(month) {
7727
- if (month instanceof Date)
7728
- month = month.getMonth();
7729
- const selected = this.selectedDate();
7730
- const { year, month: selectedMonth } = getDateComponents(selected, this.UTC());
7731
- const isStartDateSelected = selected !== null && this.activeYear() === year && month === selectedMonth;
7732
- return isStartDateSelected;
7830
+ highlightSameDayPreviousMonth() {
7831
+ const month = this.activeMonth();
7832
+ const year = this.activeYear();
7833
+ const newMonth = month - 1;
7834
+ const newYear = year + Math.floor(newMonth / 12);
7835
+ this.setHighlightedDay(this.highlightedDay(), newMonth % 12, newYear);
7733
7836
  }
7734
- isMonthSelectedEnd(month) {
7735
- if (month instanceof Date)
7736
- month = month.getMonth();
7737
- const selected = this.selectedDateEnd();
7738
- const { year, month: selectedMonth } = getDateComponents(selected, this.UTC());
7739
- const isEndDateSelected = selected !== null && this.activeYear() === year && month === selectedMonth;
7740
- return isEndDateSelected;
7837
+ highlightSameDayNextYear() {
7838
+ this.setHighlightedDay(this.highlightedDay(), this.activeMonth(), this.activeYear() + 1);
7741
7839
  }
7742
- isMonthBetweenSelectedRange(month) {
7743
- if (!this.rangeSelectionMode())
7744
- return false;
7745
- if (month instanceof Date)
7746
- month = month.getMonth();
7747
- const selected = this.selectedDate();
7748
- const selectedEnd = this.selectedDateEnd();
7749
- if (selected === null || selectedEnd === null || selected >= selectedEnd)
7750
- return false;
7751
- return this._isMonthBetweenDates(month, selected, selectedEnd);
7840
+ highlightSameDayPreviousYear() {
7841
+ this.setHighlightedDay(this.highlightedDay(), this.activeMonth(), this.activeYear() - 1);
7752
7842
  }
7753
- isMonthBetweenSelectedHighlighted(month) {
7754
- if (!this.rangeSelectionMode() || this.selectedDateEnd())
7755
- return false;
7843
+ //! selecting months
7844
+ isMonthSelected(month) {
7756
7845
  if (month instanceof Date)
7757
7846
  month = month.getMonth();
7758
- const selected = this.selectedDate();
7759
- const highlightedEnd = this.highlightedMonthDate();
7760
- if (selected === null || highlightedEnd === null || selected >= highlightedEnd)
7761
- return false;
7762
- return this._isMonthBetweenDates(month, selected, highlightedEnd);
7763
- }
7764
- _isMonthBetweenDates(month, startDate, endDate) {
7765
- const { year: startYear, month: startMonth } = getDateComponents(startDate, this.UTC());
7766
- const { year: endYear, month: endMonth } = getDateComponents(endDate, this.UTC());
7767
- return startYear <= this.activeYear() && startMonth <= month && endYear >= this.activeYear() && endMonth >= month;
7847
+ return (this.selectionStart() !== null &&
7848
+ this.activeYear() === this.selectionStart()?.getFullYear() &&
7849
+ month === this.selectionStart()?.getMonth());
7768
7850
  }
7769
- isYearOutOfRange(year) {
7770
- return isYearOutOfRange(year, this.min(), this.max());
7851
+ isMonthOutOfRange(month, year = this.activeYear()) {
7852
+ return isMonthOutOfRange(month, year, this.min(), this.max());
7771
7853
  }
7772
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MonthsViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7773
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: MonthsViewComponent, isStandalone: false, selector: "ard-months-view", inputs: { tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: true, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: true, transformFunction: null }, _isUsingKeyboard: { classPropertyName: "_isUsingKeyboard", publicName: "_isUsingKeyboard", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: true, transformFunction: null }, activeYear: { classPropertyName: "activeYear", publicName: "activeYear", isSignal: true, isRequired: true, transformFunction: null }, activeMonth: { classPropertyName: "activeMonth", publicName: "activeMonth", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDateEnd: { classPropertyName: "selectedDateEnd", publicName: "selectedDateEnd", isSignal: true, isRequired: true, transformFunction: null }, rangeSelectionMode: { classPropertyName: "rangeSelectionMode", publicName: "rangeSelectionMode", isSignal: true, isRequired: true, transformFunction: null }, UTC: { classPropertyName: "UTC", publicName: "UTC", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, multiCalendarLocation: { classPropertyName: "multiCalendarLocation", publicName: "multiCalendarLocation", isSignal: true, isRequired: true, transformFunction: null }, highlightedMonth: { classPropertyName: "highlightedMonth", publicName: "highlightedMonth", isSignal: true, isRequired: true, transformFunction: null }, monthsViewHeaderTemplate: { classPropertyName: "monthsViewHeaderTemplate", publicName: "monthsViewHeaderTemplate", isSignal: true, isRequired: true, transformFunction: null }, monthTemplate: { classPropertyName: "monthTemplate", publicName: "monthTemplate", isSignal: true, isRequired: true, transformFunction: null }, monthsViewHeaderDateFormat: { classPropertyName: "monthsViewHeaderDateFormat", publicName: "monthsViewHeaderDateFormat", isSignal: true, isRequired: true, transformFunction: null }, monthDateFormat: { classPropertyName: "monthDateFormat", publicName: "monthDateFormat", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { triggerOpenYearsView: "triggerOpenYearsView", triggerOpenDaysView: "triggerOpenDaysView", focusEvent: "focus", blurEvent: "blur", triggerSelectMonth: "triggerSelectMonth", triggeChangeYear: "triggeChangeYear", triggerHighlightMonth: "triggerHighlightMonth", triggerHighlightNextMonth: "triggerHighlightNextMonth", triggerHighlightPreviousMonth: "triggerHighlightPreviousMonth", triggerHighlightFirstMonth: "triggerHighlightFirstMonth", triggerHighlightLastMonth: "triggerHighlightLastMonth", triggerHighlightSameMonthPreviousPage: "triggerHighlightSameMonthPreviousPage", triggerHighlightSameMonthNextPage: "triggerHighlightSameMonthNextPage" }, host: { listeners: { "mousemove": "onMouseMove()" } }, viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ard-months-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultMonthsViewHeaderTemplate\r\n let-date=\"date\"\r\n let-nextPage=\"nextPage\"\r\n let-prevPage=\"prevPage\"\r\n let-canGoToNextPage=\"canGoToNextPage\"\r\n let-canGoToPreviousPage=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openDaysView=\"openDaysView\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevPage()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousPage\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [color]=\"color()\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openDaysView()\"\r\n >\r\n {{ date | date : monthsViewHeaderDateFormat() }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextPage()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextPage\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"monthsViewHeaderTemplate() || defaultMonthsViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"monthsViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__simple-grid\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onMonthGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onMonthGridBlur()\"\r\n (click)=\"onMonthGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @for (month of monthsArray(); track $index) {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedMonth() === month.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isMonthBetweenSelectedHighlighted(month.value)\"\r\n [class.ard-calendar__entry-disabled]=\"month.disabled\"\r\n [class.ard-calendar__entry-selected]=\"isMonthSelected(month.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isMonthSelectedStart(month.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isMonthSelectedEnd(month.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isMonthBetweenSelectedRange(month.value)\"\r\n [class.ard-calendar-today]=\"isMonthToday(month.value)\"\r\n (click)=\"onCalendarMonthClick(month.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarMonthMouseover(month.value)\"\r\n role=\"gridcell\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"ard-calendar__entry-button\"\r\n tabindex=\"-1\"\r\n >\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultMonthTemplate\r\n let-month\r\n >\r\n {{ month | date : monthDateFormat() : '+0000' | uppercase }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"monthTemplate() || defaultMonthTemplate\"\r\n [ngTemplateOutletContext]=\"monthContext()(month.value)\"\r\n />\r\n </div>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-months-view{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumIconButtonComponent, selector: "ard-icon-button", inputs: ["wrapperClasses", "type", "ariaLabel", "color", "lightColoring", "compact", "pointerEventsWhenDisabled"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }, { kind: "component", type: ArdiumButtonComponent, selector: "ard-button", inputs: ["variant", "vertical"], outputs: ["focus", "blur"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7774
- }
7775
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MonthsViewComponent, decorators: [{
7776
- type: Component,
7777
- args: [{ standalone: false, selector: 'ard-months-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ard-months-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultMonthsViewHeaderTemplate\r\n let-date=\"date\"\r\n let-nextPage=\"nextPage\"\r\n let-prevPage=\"prevPage\"\r\n let-canGoToNextPage=\"canGoToNextPage\"\r\n let-canGoToPreviousPage=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openDaysView=\"openDaysView\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevPage()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousPage\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [color]=\"color()\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openDaysView()\"\r\n >\r\n {{ date | date : monthsViewHeaderDateFormat() }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextPage()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextPage\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"monthsViewHeaderTemplate() || defaultMonthsViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"monthsViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__simple-grid\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onMonthGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onMonthGridBlur()\"\r\n (click)=\"onMonthGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @for (month of monthsArray(); track $index) {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedMonth() === month.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isMonthBetweenSelectedHighlighted(month.value)\"\r\n [class.ard-calendar__entry-disabled]=\"month.disabled\"\r\n [class.ard-calendar__entry-selected]=\"isMonthSelected(month.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isMonthSelectedStart(month.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isMonthSelectedEnd(month.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isMonthBetweenSelectedRange(month.value)\"\r\n [class.ard-calendar-today]=\"isMonthToday(month.value)\"\r\n (click)=\"onCalendarMonthClick(month.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarMonthMouseover(month.value)\"\r\n role=\"gridcell\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"ard-calendar__entry-button\"\r\n tabindex=\"-1\"\r\n >\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultMonthTemplate\r\n let-month\r\n >\r\n {{ month | date : monthDateFormat() : '+0000' | uppercase }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"monthTemplate() || defaultMonthTemplate\"\r\n [ngTemplateOutletContext]=\"monthContext()(month.value)\"\r\n />\r\n </div>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-months-view{display:block}}\n"] }]
7778
- }], propDecorators: { onMouseMove: [{
7779
- type: HostListener,
7780
- args: ['mousemove']
7781
- }] } });
7782
-
7783
- const TODAY = new Date();
7784
- class YearsViewComponent {
7785
- constructor() {
7786
- this.tabIndex = input.required();
7787
- this.readOnly = input.required();
7788
- this.disabled = input.required();
7789
- this.autoFocus = input.required();
7790
- this._isUsingKeyboard = input.required();
7791
- this.selectedDate = input.required();
7792
- this.selectedDateEnd = input.required();
7793
- this.rangeSelectionMode = input.required();
7794
- this.UTC = input.required();
7795
- this.min = input.required();
7796
- this.max = input.required();
7797
- this.multiCalendarLocation = input.required();
7798
- this.currentYearRangeStart = input.required();
7799
- this.multipleYearPageSize = input.required();
7800
- this.yearsArray = computed(() => getCalendarYearsArray(this.currentYearRangeStart(), this.multipleYearPageSize(), this.min(), this.max()));
7801
- this.currentAriaLabel = computed(() => {
7802
- return this.highlightedYear()?.toString() ?? '';
7803
- });
7804
- //! outputs
7805
- this.triggerOpenMonthsView = output();
7806
- this.triggerOpenDaysView = output();
7807
- this.focusEvent = output({ alias: 'focus' });
7808
- this.blurEvent = output({ alias: 'blur' });
7809
- this.triggerSelectYear = output();
7810
- this.triggerChangeYearsViewPage = output();
7811
- this.triggerHighlightYear = output();
7812
- this.triggerHighlightNextYear = output();
7813
- this.triggerHighlightPreviousYear = output();
7814
- this.triggerHighlightFirstYear = output();
7815
- this.triggerHighlightLastYear = output();
7816
- this.triggerHighlightSameYearPreviousPage = output();
7817
- this.triggerHighlightSameYearNextPage = output();
7818
- //! calendar entry hover & click
7819
- this.highlightedYear = input.required();
7820
- this.highlightedYearDate = computed(() => {
7821
- const year = this.highlightedYear();
7822
- if (isNull(year))
7823
- return null;
7824
- return new Date(year, 0, 1);
7825
- });
7826
- //! focusing
7827
- this.focusableElement = viewChild.required('focusableElement');
7828
- //! templates
7829
- this.yearsViewHeaderTemplate = input.required();
7830
- this.yearTemplate = input.required();
7831
- //! template customizations
7832
- this.yearsViewHeaderDateFormat = input.required(); // 'YYYY'
7833
- this.yearDateFormat = input.required(); // 'YYYY'
7834
- //! template contexts
7835
- this.yearsViewHeaderContext = computed(() => {
7836
- const yearRangeStart = this.currentYearRangeStart();
7837
- const yearRangeEnd = yearRangeStart + 23;
7838
- const dateRange = new DateRange(getUTCDate(yearRangeStart, 0, 2), // second day of month to prevent timezone issues
7839
- getUTCDate(yearRangeEnd, 0, 2));
7840
- const yearRange = {
7841
- from: yearRangeStart,
7842
- to: yearRangeEnd,
7843
- };
7844
- return {
7845
- nextPage: () => {
7846
- this.triggerChangeYearsViewPage.emit(1);
7847
- },
7848
- prevPage: () => {
7849
- this.triggerChangeYearsViewPage.emit(-1);
7850
- },
7851
- openMonthsView: () => {
7852
- this.triggerOpenMonthsView.emit();
7853
- },
7854
- openDaysView: () => {
7855
- this.triggerOpenDaysView.emit();
7856
- },
7857
- canGoToNextPage: !this.isYearOutOfRange(yearRangeEnd + 1),
7858
- canGoToPreviousPage: !this.isYearOutOfRange(yearRangeStart - 1),
7859
- hideNextPageButton: this.multiCalendarLocation() === ArdMultiCalendarLocation.Left ||
7860
- this.multiCalendarLocation() === ArdMultiCalendarLocation.Inner,
7861
- hidePreviousPageButton: this.multiCalendarLocation() === ArdMultiCalendarLocation.Right ||
7862
- this.multiCalendarLocation() === ArdMultiCalendarLocation.Inner,
7863
- yearRange: yearRange,
7864
- dateRange,
7865
- $implicit: dateRange,
7866
- };
7867
- });
7868
- this.yearContext = computed(() => {
7869
- return (year) => {
7870
- const date = getUTCDate(year, 1, 2); // second day of month to prevent timezone issues
7871
- return {
7872
- value: year,
7873
- date,
7874
- $implicit: date,
7875
- select: (year) => {
7876
- this.triggerSelectYear.emit(year);
7877
- },
7878
- };
7879
- };
7880
- });
7854
+ changeMonth(newMonth) {
7855
+ if (isNull(newMonth)) {
7856
+ this.activeMonth.set(this.TODAY().getMonth());
7857
+ this._emitActivePageChange();
7858
+ return true;
7859
+ }
7860
+ if (this.isMonthOutOfRange(newMonth))
7861
+ return false;
7862
+ if (newMonth > 11) {
7863
+ this.activeYear.update(v => v + 1);
7864
+ this.activeMonth.set(0);
7865
+ }
7866
+ else if (newMonth < 0) {
7867
+ this.activeYear.update(v => v - 1);
7868
+ this.activeMonth.set(11);
7869
+ }
7870
+ else {
7871
+ this.activeMonth.set(newMonth);
7872
+ }
7873
+ this._emitActivePageChange();
7874
+ return true;
7881
7875
  }
7882
- onMouseMove() {
7883
- if (this._isUsingKeyboard())
7876
+ selectMonth(newMonth) {
7877
+ if (isNull(newMonth) || this.isMonthOutOfRange(newMonth))
7884
7878
  return;
7885
- if (this.highlightedYear())
7886
- this.triggerHighlightYear.emit(null);
7887
- }
7888
- ngAfterViewInit() {
7889
- if (!this.autoFocus())
7879
+ const wasSuccessful = this.changeMonth(newMonth);
7880
+ if (!wasSuccessful)
7890
7881
  return;
7891
- this.focus();
7892
- this.triggerHighlightYear.emit(this.currentYearRangeStart());
7882
+ this.openDaysView();
7883
+ this.monthSelect.emit(newMonth);
7893
7884
  }
7894
- onCalendarYearMouseover(year) {
7895
- if (this._isUsingKeyboard() || this.disabled() || this.readOnly())
7885
+ selectCurrentlyHighlightedMonth() {
7886
+ if (!isDefined(this.highlightedMonth()))
7896
7887
  return;
7897
- this.triggerHighlightYear.emit(year);
7888
+ this.selectMonth(this.highlightedMonth());
7898
7889
  }
7899
- onCalendarYearClick(year) {
7900
- if (this.disabled() || this.readOnly())
7890
+ setHighlightedMonth(month, year = this.activeYear()) {
7891
+ if (isNull(month)) {
7892
+ this._highlightedMonth.update(() => month);
7901
7893
  return;
7902
- this.triggerSelectYear.emit(year);
7903
- }
7904
- onYearGridFocus() {
7905
- if (this.disabled() || this.readOnly())
7894
+ }
7895
+ const date = createDate(year, month, 15, this.UTC());
7896
+ const outOfRange = this.isMonthOutOfRange(month, year);
7897
+ if (outOfRange === -1) {
7898
+ this._highlightMinMonth();
7906
7899
  return;
7907
- this.triggerHighlightFirstYear.emit();
7908
- }
7909
- onYearGridBlur() {
7910
- if (this.disabled() || this.readOnly())
7900
+ }
7901
+ if (outOfRange === 1) {
7902
+ this._highlightMaxMonth();
7911
7903
  return;
7912
- this.triggerHighlightYear.emit(null);
7904
+ }
7905
+ this._highlightedMonth.update(() => date.getMonth());
7906
+ if (date.getFullYear() !== this.activeYear()) {
7907
+ this.activeYear.set(date.getFullYear());
7908
+ this._emitActivePageChange();
7909
+ }
7913
7910
  }
7914
- onYearGridClick() {
7915
- if (this.disabled() || this.readOnly())
7911
+ _highlightMinMonth() {
7912
+ const min = this.min();
7913
+ if (!isDefined(min))
7916
7914
  return;
7917
- if (this.highlightedYear() !== null)
7915
+ this.activeYear.set(min.getFullYear());
7916
+ this._emitActivePageChange();
7917
+ this._highlightedMonth.set(min.getMonth());
7918
+ }
7919
+ _highlightMaxMonth() {
7920
+ const max = this.max();
7921
+ if (!isDefined(max))
7918
7922
  return;
7919
- this.triggerHighlightFirstYear.emit();
7923
+ this.activeYear.set(max.getFullYear());
7924
+ this._emitActivePageChange();
7925
+ this._highlightedMonth.set(max.getMonth());
7920
7926
  }
7921
- //! helpers
7922
- isYearToday(year) {
7923
- return year === TODAY.getFullYear();
7927
+ highlightNextMonth(offset = 1) {
7928
+ const currentMonth = this.highlightedMonth();
7929
+ const newMonth = isDefined(currentMonth) ? currentMonth + offset : 0;
7930
+ this.setHighlightedMonth(newMonth);
7931
+ }
7932
+ highlightPreviousMonth(offset = 1) {
7933
+ this.highlightNextMonth(offset * -1);
7934
+ }
7935
+ highlightFirstMonth() {
7936
+ this.setHighlightedMonth(0);
7937
+ }
7938
+ highlightLastMonth() {
7939
+ this.setHighlightedMonth(11);
7940
+ }
7941
+ highlightSameMonthNextYear(multiple) {
7942
+ this.setHighlightedMonth(this.highlightedMonth(), this.activeYear() + (multiple ? 10 : 1));
7943
+ }
7944
+ highlightSameMonthPreviousYear(multiple) {
7945
+ this.setHighlightedMonth(this.highlightedMonth(), this.activeYear() - (multiple ? 10 : 1));
7924
7946
  }
7947
+ //! selecting years
7925
7948
  isYearSelected(year) {
7926
7949
  if (year instanceof Date)
7927
7950
  year = year.getFullYear();
7928
- const isStartDateSelected = this.isYearSelectedStart(year);
7929
- if (this.rangeSelectionMode()) {
7930
- const isEndDateSelected = this.isYearSelectedEnd(year);
7931
- return isStartDateSelected || isEndDateSelected;
7932
- }
7933
- return isStartDateSelected;
7934
- }
7935
- isYearSelectedStart(year) {
7936
- if (year instanceof Date)
7937
- year = year.getFullYear();
7938
- const selected = this.selectedDate();
7939
- const { year: selectedYear } = getDateComponents(selected, this.UTC());
7940
- const isStartDateSelected = selected !== null && year === selectedYear;
7941
- return isStartDateSelected;
7951
+ return this.selectionStart() !== null && year === this.selectionStart()?.getFullYear();
7942
7952
  }
7943
- isYearSelectedEnd(year) {
7944
- if (year instanceof Date)
7945
- year = year.getFullYear();
7946
- const selected = this.selectedDateEnd();
7947
- const { year: selectedYear } = getDateComponents(selected, this.UTC());
7948
- const isEndDateSelected = selected !== null && year === selectedYear;
7949
- return isEndDateSelected;
7953
+ isYearOutOfRange(year) {
7954
+ return isYearOutOfRange(year, this.min(), this.max());
7950
7955
  }
7951
- isYearBetweenSelectedRange(year) {
7952
- if (!this.rangeSelectionMode())
7953
- return false;
7954
- if (year instanceof Date)
7955
- year = year.getFullYear();
7956
- const selected = this.selectedDate();
7957
- const selectedEnd = this.selectedDateEnd();
7958
- if (selected === null || selectedEnd === null || selected >= selectedEnd)
7956
+ changeYear(year) {
7957
+ if (isNull(year)) {
7958
+ this.activeYear.set(this.TODAY().getFullYear());
7959
+ this._emitActivePageChange();
7960
+ return true;
7961
+ }
7962
+ if (this.isYearOutOfRange(year))
7959
7963
  return false;
7960
- return this._isYearBetweenDates(year, selected, selectedEnd);
7964
+ this.activeYear.set(year);
7965
+ this._emitActivePageChange();
7966
+ return true;
7961
7967
  }
7962
- isYearBetweenSelectedHighlighted(year) {
7963
- if (!this.rangeSelectionMode() || this.selectedDateEnd())
7964
- return false;
7968
+ selectYear(year) {
7969
+ if (isNull(year))
7970
+ return;
7965
7971
  if (year instanceof Date)
7966
7972
  year = year.getFullYear();
7967
- const selected = this.selectedDate();
7968
- const highlightedEnd = this.highlightedYearDate();
7969
- if (selected === null || highlightedEnd === null || selected >= highlightedEnd)
7970
- return false;
7971
- return this._isYearBetweenDates(year, selected, highlightedEnd);
7973
+ const wasSuccessful = this.changeYear(year);
7974
+ if (!wasSuccessful)
7975
+ return;
7976
+ this.openMonthsView();
7977
+ this.yearSelect.emit(year);
7972
7978
  }
7973
- _isYearBetweenDates(year, startDate, endDate) {
7974
- const { year: startYear } = getDateComponents(startDate, this.UTC());
7975
- const { year: endYear } = getDateComponents(endDate, this.UTC());
7976
- return startYear <= year && endYear >= year;
7979
+ selectCurrentlyHighlightedYear() {
7980
+ if (!isDefined(this.highlightedYear()))
7981
+ return;
7982
+ this.selectYear(this.highlightedYear());
7977
7983
  }
7978
- isYearOutOfRange(year) {
7979
- return isYearOutOfRange(year, this.min(), this.max());
7984
+ setHighlightedYear(year) {
7985
+ if (isNull(year)) {
7986
+ this.__highlightedYear.update(() => year);
7987
+ return;
7988
+ }
7989
+ const date = createDate(year, 0, 1, this.UTC());
7990
+ const outOfRange = this.isYearOutOfRange(year);
7991
+ if (outOfRange === -1) {
7992
+ this._highlightMinYear();
7993
+ return;
7994
+ }
7995
+ if (outOfRange === 1) {
7996
+ this._highlightMaxYear();
7997
+ return;
7998
+ }
7999
+ const newYear = date.getFullYear();
8000
+ this.__highlightedYear.update(() => newYear);
8001
+ if (newYear < this.currentYearRangeStart() || newYear >= this.currentYearRangeStart() + this.multipleYearPageSize()) {
8002
+ // round the offset away from zero: 0.1 -> 1, -0.1 -> -1
8003
+ // this is to ensure the range start is always shifted by n years
8004
+ const offset = roundFromZero((newYear - this.currentYearRangeStart()) / this.multipleYearPageSize());
8005
+ this.currentYearRangeStart.update(v => v + offset * this.multipleYearPageSize());
8006
+ }
7980
8007
  }
7981
- focus() {
7982
- this.focusableElement().nativeElement.focus();
8008
+ changeYearsViewPage(offset) {
8009
+ const newYearRangeStart = this.currentYearRangeStart() + offset * this.multipleYearPageSize();
8010
+ this.currentYearRangeStart.set(newYearRangeStart);
7983
8011
  }
7984
- //! keyboard controls
7985
- onMainGridKeydown(event) {
7986
- if (this.disabled() || this.readOnly())
8012
+ _highlightMinYear() {
8013
+ const min = this.min();
8014
+ if (!isDefined(min))
7987
8015
  return;
7988
- switch (event.code) {
7989
- case 'Space':
7990
- case 'Enter':
7991
- this._onEnterPress(event);
7992
- break;
7993
- case 'ArrowUp':
7994
- this._onArrowUpPress(event);
7995
- break;
7996
- case 'ArrowDown':
7997
- this._onArrowDownPress(event);
7998
- break;
7999
- case 'ArrowLeft':
8000
- this._onArrowLeftPress(event);
8001
- break;
8002
- case 'ArrowRight':
8003
- this._onArrowRightPress(event);
8004
- break;
8005
- case 'Home':
8006
- this._onHomePress(event);
8007
- break;
8008
- case 'End':
8009
- this._onEndPress(event);
8010
- break;
8011
- case 'PageUp':
8012
- this._onPageUpPress(event);
8013
- break;
8014
- case 'PageDown':
8015
- this._onPageDownPress(event);
8016
- break;
8017
- default:
8018
- return;
8019
- }
8016
+ this.__highlightedYear.set(min.getFullYear());
8020
8017
  }
8021
- //select currently selected entry
8022
- _onEnterPress(event) {
8023
- event.preventDefault();
8024
- const year = this.highlightedYear();
8025
- if (isNull(year))
8018
+ _highlightMaxYear() {
8019
+ const max = this.max();
8020
+ if (!isDefined(max))
8026
8021
  return;
8027
- this.triggerSelectYear.emit(year);
8022
+ this.__highlightedYear.set(max.getFullYear());
8028
8023
  }
8029
- //highlight the entry one line below
8030
- _onArrowDownPress(event) {
8031
- event.preventDefault();
8032
- this.triggerHighlightNextYear.emit(4); //4 years per line
8024
+ highlightNextYear(offset = 1) {
8025
+ const currentYear = this.highlightedYear();
8026
+ const newYear = isDefined(currentYear) ? currentYear + offset : null;
8027
+ this.setHighlightedYear(newYear);
8033
8028
  }
8034
- //highlight the entry one line above
8035
- _onArrowUpPress(event) {
8036
- event.preventDefault();
8037
- this.triggerHighlightPreviousYear.emit(4); //4 years per line
8029
+ highlightPreviousYear(offset = 1) {
8030
+ this.highlightNextYear(offset * -1);
8038
8031
  }
8039
- //highlight next entry
8040
- _onArrowRightPress(event) {
8041
- event.preventDefault();
8042
- this.triggerHighlightNextYear.emit(1);
8032
+ highlightFirstYear() {
8033
+ this.setHighlightedYear(this.currentYearRangeStart());
8043
8034
  }
8044
- //highlight previous entry
8045
- _onArrowLeftPress(event) {
8046
- event.preventDefault();
8047
- this.triggerHighlightPreviousYear.emit(1);
8035
+ highlightLastYear() {
8036
+ this.setHighlightedYear(this.currentYearRangeStart() + this.multipleYearPageSize() - 1);
8048
8037
  }
8049
- //highlight first entry on the page
8050
- _onHomePress(event) {
8051
- event.preventDefault();
8052
- this.triggerHighlightFirstYear.emit();
8038
+ highlightSameYearNextPage(multiple) {
8039
+ const year = this.highlightedYear() ?? this.currentYearRangeStart();
8040
+ this.setHighlightedYear(year + (multiple ? this.multipleYearPageChangeModifier() : 1) * this.multipleYearPageSize());
8053
8041
  }
8054
- //highlight last entry on the page
8055
- _onEndPress(event) {
8056
- event.preventDefault();
8057
- this.triggerHighlightLastYear.emit();
8042
+ highlightSameYearPreviousPage(multiple) {
8043
+ const year = this.highlightedYear() ?? this.currentYearRangeStart();
8044
+ this.setHighlightedYear(year - (multiple ? this.multipleYearPageChangeModifier() : 1) * this.multipleYearPageSize());
8058
8045
  }
8059
- //alone: highlight same entry on the previous page
8060
- //with alt: highlight same entry multiple pages before
8061
- _onPageUpPress(event) {
8062
- event.preventDefault();
8063
- this.triggerHighlightSameYearPreviousPage.emit(event.altKey);
8046
+ onDocumentMousemove() {
8047
+ this._isUsingKeyboard.set(false);
8064
8048
  }
8065
- //alone: highlight same entry on the next page
8066
- //with alt: highlight same entry multiple pages after
8067
- _onPageDownPress(event) {
8068
- event.preventDefault();
8069
- this.triggerHighlightSameYearNextPage.emit(event.altKey);
8049
+ onDocumentKeydown() {
8050
+ this._isUsingKeyboard.set(true);
8070
8051
  }
8071
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: YearsViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8072
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: YearsViewComponent, isStandalone: false, selector: "ard-years-view", inputs: { tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: true, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: true, transformFunction: null }, _isUsingKeyboard: { classPropertyName: "_isUsingKeyboard", publicName: "_isUsingKeyboard", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDateEnd: { classPropertyName: "selectedDateEnd", publicName: "selectedDateEnd", isSignal: true, isRequired: true, transformFunction: null }, rangeSelectionMode: { classPropertyName: "rangeSelectionMode", publicName: "rangeSelectionMode", isSignal: true, isRequired: true, transformFunction: null }, UTC: { classPropertyName: "UTC", publicName: "UTC", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, multiCalendarLocation: { classPropertyName: "multiCalendarLocation", publicName: "multiCalendarLocation", isSignal: true, isRequired: true, transformFunction: null }, currentYearRangeStart: { classPropertyName: "currentYearRangeStart", publicName: "currentYearRangeStart", isSignal: true, isRequired: true, transformFunction: null }, multipleYearPageSize: { classPropertyName: "multipleYearPageSize", publicName: "multipleYearPageSize", isSignal: true, isRequired: true, transformFunction: null }, highlightedYear: { classPropertyName: "highlightedYear", publicName: "highlightedYear", isSignal: true, isRequired: true, transformFunction: null }, yearsViewHeaderTemplate: { classPropertyName: "yearsViewHeaderTemplate", publicName: "yearsViewHeaderTemplate", isSignal: true, isRequired: true, transformFunction: null }, yearTemplate: { classPropertyName: "yearTemplate", publicName: "yearTemplate", isSignal: true, isRequired: true, transformFunction: null }, yearsViewHeaderDateFormat: { classPropertyName: "yearsViewHeaderDateFormat", publicName: "yearsViewHeaderDateFormat", isSignal: true, isRequired: true, transformFunction: null }, yearDateFormat: { classPropertyName: "yearDateFormat", publicName: "yearDateFormat", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { triggerOpenMonthsView: "triggerOpenMonthsView", triggerOpenDaysView: "triggerOpenDaysView", focusEvent: "focus", blurEvent: "blur", triggerSelectYear: "triggerSelectYear", triggerChangeYearsViewPage: "triggerChangeYearsViewPage", triggerHighlightYear: "triggerHighlightYear", triggerHighlightNextYear: "triggerHighlightNextYear", triggerHighlightPreviousYear: "triggerHighlightPreviousYear", triggerHighlightFirstYear: "triggerHighlightFirstYear", triggerHighlightLastYear: "triggerHighlightLastYear", triggerHighlightSameYearPreviousPage: "triggerHighlightSameYearPreviousPage", triggerHighlightSameYearNextPage: "triggerHighlightSameYearNextPage" }, host: { listeners: { "mousemove": "onMouseMove()" } }, viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ard-years-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultYearsViewHeaderTemplate\r\n let-dateRange=\"dateRange\"\r\n let-nextPage=\"nextPage\"\r\n let-prevPage=\"prevPage\"\r\n let-canGoToNextPage=\"canGoToNextPage\"\r\n let-canGoToPreviousPage=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openDaysView=\"openDaysView\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevPage()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousPage\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openDaysView()\"\r\n >\r\n {{ dateRange.from | date : yearsViewHeaderDateFormat() }}\r\n &mdash;\r\n {{ dateRange.to | date : yearsViewHeaderDateFormat() }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextPage()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextPage\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"yearsViewHeaderTemplate() || defaultYearsViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"yearsViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__simple-grid\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onYearGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onYearGridBlur()\"\r\n (click)=\"onYearGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @for (year of yearsArray(); track year) {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedYear() === year.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isYearBetweenSelectedHighlighted(year.value)\"\r\n [class.ard-calendar__entry-disabled]=\"year.disabled\"\r\n [class.ard-calendar__entry-selected]=\"isYearSelected(year.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isYearSelectedStart(year.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isYearSelectedEnd(year.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isYearBetweenSelectedRange(year.value)\"\r\n [class.ard-calendar-today]=\"isYearToday(year.value)\"\r\n (click)=\"onCalendarYearClick(year.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarYearMouseover(year.value)\"\r\n role=\"gridcell\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"ard-calendar__entry-button\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n >\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultYearTemplate\r\n let-year\r\n >\r\n {{ year | date : yearDateFormat() }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"yearTemplate() || defaultYearTemplate\"\r\n [ngTemplateOutletContext]=\"yearContext()(year.value)\"\r\n />\r\n </div>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-years-view{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumIconButtonComponent, selector: "ard-icon-button", inputs: ["wrapperClasses", "type", "ariaLabel", "color", "lightColoring", "compact", "pointerEventsWhenDisabled"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }, { kind: "component", type: ArdiumButtonComponent, selector: "ard-button", inputs: ["variant", "vertical"], outputs: ["focus", "blur"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8052
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: _AbstractCalendar, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
8053
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.15", type: _AbstractCalendar, isStandalone: true, inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, activeView: { classPropertyName: "activeView", publicName: "activeView", isSignal: true, isRequired: false, transformFunction: null }, activeYear: { classPropertyName: "activeYear", publicName: "activeYear", isSignal: true, isRequired: false, transformFunction: null }, activeMonth: { classPropertyName: "activeMonth", publicName: "activeMonth", isSignal: true, isRequired: false, transformFunction: null }, firstWeekday: { classPropertyName: "firstWeekday", publicName: "firstWeekday", isSignal: true, isRequired: false, transformFunction: null }, multipleYearPageChangeModifier: { classPropertyName: "multipleYearPageChangeModifier", publicName: "multipleYearPageChangeModifier", isSignal: true, isRequired: false, transformFunction: null }, multipleYearOffset: { classPropertyName: "multipleYearOffset", publicName: "multipleYearOffset", isSignal: true, isRequired: false, transformFunction: null }, multipleYearPageSize: { classPropertyName: "multipleYearPageSize", publicName: "multipleYearPageSize", isSignal: true, isRequired: false, transformFunction: null }, multiCalendarLocation: { classPropertyName: "multiCalendarLocation", publicName: "multiCalendarLocation", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, staticHeight: { classPropertyName: "staticHeight", publicName: "staticHeight", isSignal: true, isRequired: false, transformFunction: null }, hideFloatingMonth: { classPropertyName: "hideFloatingMonth", publicName: "hideFloatingMonth", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, UTC: { classPropertyName: "UTC", publicName: "UTC", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, highlightedDay: { classPropertyName: "highlightedDay", publicName: "highlightedDay", isSignal: true, isRequired: false, transformFunction: null }, daysViewHeaderDateFormat: { classPropertyName: "daysViewHeaderDateFormat", publicName: "daysViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, yearsViewHeaderDateFormat: { classPropertyName: "yearsViewHeaderDateFormat", publicName: "yearsViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, monthsViewHeaderDateFormat: { classPropertyName: "monthsViewHeaderDateFormat", publicName: "monthsViewHeaderDateFormat", isSignal: true, isRequired: false, transformFunction: null }, weekdayDateFormat: { classPropertyName: "weekdayDateFormat", publicName: "weekdayDateFormat", isSignal: true, isRequired: false, transformFunction: null }, weekdayTitleDateFormat: { classPropertyName: "weekdayTitleDateFormat", publicName: "weekdayTitleDateFormat", isSignal: true, isRequired: false, transformFunction: null }, floatingMonthDateFormat: { classPropertyName: "floatingMonthDateFormat", publicName: "floatingMonthDateFormat", isSignal: true, isRequired: false, transformFunction: null }, floatingMonthTitleDateFormat: { classPropertyName: "floatingMonthTitleDateFormat", publicName: "floatingMonthTitleDateFormat", isSignal: true, isRequired: false, transformFunction: null }, yearDateFormat: { classPropertyName: "yearDateFormat", publicName: "yearDateFormat", isSignal: true, isRequired: false, transformFunction: null }, monthDateFormat: { classPropertyName: "monthDateFormat", publicName: "monthDateFormat", isSignal: true, isRequired: false, transformFunction: null }, dayDateFormat: { classPropertyName: "dayDateFormat", publicName: "dayDateFormat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeView: "activeViewChange", activeYear: "activeYearChange", activeMonth: "activeMonthChange", activePageChange: "activePageChange", yearSelect: "yearSelect", monthSelect: "monthSelect", highlightedDay: "highlightedDayChange", highlightDayEvent: "highlightDay" }, host: { listeners: { "document:mousemove": "onDocumentMousemove()", "document:keydown": "onDocumentKeydown()" } }, queries: [{ propertyName: "templateRepository", first: true, predicate: _CalendarTemplateRepositoryDirective, descendants: true, isSignal: true }, { propertyName: "yearsViewHeaderTemplate", first: true, predicate: ArdCalendarYearsViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthsViewHeaderTemplate", first: true, predicate: ArdCalendarMonthsViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "daysViewHeaderTemplate", first: true, predicate: ArdCalendarDaysViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "floatingMonthTemplate", first: true, predicate: ArdCalendarFloatingMonthTemplateDirective, descendants: true, isSignal: true }, { propertyName: "yearTemplate", first: true, predicate: ArdCalendarYearTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthTemplate", first: true, predicate: ArdCalendarMonthTemplateDirective, descendants: true, isSignal: true }, { propertyName: "dayTemplate", first: true, predicate: ArdCalendarDayTemplateDirective, descendants: true, isSignal: true }, { propertyName: "weekdayTemplate", first: true, predicate: ArdCalendarWeekdayTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "daysViewComponent", first: true, predicate: DaysViewComponent, descendants: true, isSignal: true }, { propertyName: "monthsViewComponent", first: true, predicate: MonthsViewComponent, descendants: true, isSignal: true }, { propertyName: "yearsViewComponent", first: true, predicate: YearsViewComponent, descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
8073
8054
  }
8074
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: YearsViewComponent, decorators: [{
8075
- type: Component,
8076
- args: [{ standalone: false, selector: 'ard-years-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ard-years-view\">\r\n @if (!readOnly()) {\r\n <div class=\"ard-calendar__top-toolbar\">\r\n <ng-template\r\n #defaultYearsViewHeaderTemplate\r\n let-dateRange=\"dateRange\"\r\n let-nextPage=\"nextPage\"\r\n let-prevPage=\"prevPage\"\r\n let-canGoToNextPage=\"canGoToNextPage\"\r\n let-canGoToPreviousPage=\"canGoToPreviousPage\"\r\n let-hideNextPageButton=\"hideNextPageButton\"\r\n let-hidePreviousPageButton=\"hidePreviousPageButton\"\r\n let-openDaysView=\"openDaysView\"\r\n >\r\n <div class=\"ard-calendar__calendar-header\">\r\n <div>\r\n @if (!hidePreviousPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"prevPage()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToPreviousPage\"\r\n >\r\n <ard-icon>chevron_left</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n <ard-button\r\n class=\"ard-calendar__header-button\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n variant=\"pill\"\r\n [tabIndex]=\"tabIndex()\"\r\n (click)=\"openDaysView()\"\r\n >\r\n {{ dateRange.from | date : yearsViewHeaderDateFormat() }}\r\n &mdash;\r\n {{ dateRange.to | date : yearsViewHeaderDateFormat() }}\r\n <div class=\"ard-dropdown-arrow\"></div>\r\n </ard-button>\r\n <div>\r\n @if (!hideNextPageButton) {\r\n <ard-icon-button\r\n size=\"small\"\r\n appearance=\"transparent\"\r\n color=\"none\"\r\n (click)=\"nextPage()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [disabled]=\"!canGoToNextPage\"\r\n >\r\n <ard-icon>chevron_right</ard-icon>\r\n </ard-icon-button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"yearsViewHeaderTemplate() || defaultYearsViewHeaderTemplate\"\r\n [ngTemplateOutletContext]=\"yearsViewHeaderContext()\"\r\n />\r\n </div>\r\n }\r\n <div\r\n #focusableElement\r\n class=\"ard-calendar__simple-grid\"\r\n [tabindex]=\"tabIndex()\"\r\n [ariaLabel]=\"currentAriaLabel()\"\r\n (focus)=\"focusEvent.emit($event)\"\r\n (focus)=\"onYearGridFocus()\"\r\n (blur)=\"blurEvent.emit($event)\"\r\n (blur)=\"onYearGridBlur()\"\r\n (click)=\"onYearGridClick()\"\r\n (keydown)=\"onMainGridKeydown($event)\"\r\n role=\"grid\"\r\n >\r\n @for (year of yearsArray(); track year) {\r\n <div\r\n class=\"ard-calendar__entry\"\r\n [class.ard-calendar__entry-highlighted]=\"highlightedYear() === year.value\"\r\n [class.ard-calendar__entry-highlighted-in-range]=\"isYearBetweenSelectedHighlighted(year.value)\"\r\n [class.ard-calendar__entry-disabled]=\"year.disabled\"\r\n [class.ard-calendar__entry-selected]=\"isYearSelected(year.value)\"\r\n [class.ard-calendar__entry-selected-start]=\"isYearSelectedStart(year.value)\"\r\n [class.ard-calendar__entry-selected-end]=\"isYearSelectedEnd(year.value)\"\r\n [class.ard-calendar__entry-selected-in-range]=\"isYearBetweenSelectedRange(year.value)\"\r\n [class.ard-calendar-today]=\"isYearToday(year.value)\"\r\n (click)=\"onCalendarYearClick(year.value)\"\r\n (mousemove)=\"$event.stopPropagation()\"\r\n (mouseover)=\"onCalendarYearMouseover(year.value)\"\r\n role=\"gridcell\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"ard-calendar__entry-button\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n >\r\n <div class=\"ard-range-overlay\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <ng-template\r\n #defaultYearTemplate\r\n let-year\r\n >\r\n {{ year | date : yearDateFormat() }}\r\n </ng-template>\r\n <ng-template\r\n [ngTemplateOutlet]=\"yearTemplate() || defaultYearTemplate\"\r\n [ngTemplateOutletContext]=\"yearContext()(year.value)\"\r\n />\r\n </div>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: ["@layer ard-ui{ard-years-view{display:block}}\n"] }]
8077
- }], propDecorators: { onMouseMove: [{
8055
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: _AbstractCalendar, decorators: [{
8056
+ type: Directive,
8057
+ args: [{}]
8058
+ }], ctorParameters: () => [{ type: undefined }], propDecorators: { onDocumentMousemove: [{
8078
8059
  type: HostListener,
8079
- args: ['mousemove']
8060
+ args: ['document:mousemove']
8061
+ }], onDocumentKeydown: [{
8062
+ type: HostListener,
8063
+ args: ['document:keydown']
8080
8064
  }] } });
8081
8065
 
8066
+ const _calendarDefaults = {
8067
+ ..._formFieldComponentDefaults,
8068
+ color: ComponentColor.Primary,
8069
+ activeView: ArdCalendarView.Days,
8070
+ activeYear: new Date().getFullYear(),
8071
+ activeMonth: new Date().getMonth(),
8072
+ firstWeekday: 1,
8073
+ multipleYearPageChangeModifier: 5,
8074
+ multipleYearOffset: 2,
8075
+ multipleYearPageSize: 24,
8076
+ staticHeight: false,
8077
+ hideFloatingMonth: false,
8078
+ autoFocus: false,
8079
+ multiCalendarLocation: ArdMultiCalendarLocation.Only,
8080
+ min: null,
8081
+ max: null,
8082
+ filter: null,
8083
+ UTC: false,
8084
+ // template customizations
8085
+ daysViewHeaderDateFormat: 'MMM yyyy',
8086
+ yearsViewHeaderDateFormat: 'yyyy',
8087
+ monthsViewHeaderDateFormat: 'yyyy',
8088
+ weekdayDateFormat: 'EEEEE',
8089
+ weekdayTitleDateFormat: 'EEEE',
8090
+ floatingMonthDateFormat: 'LLL',
8091
+ floatingMonthTitleDateFormat: 'LLLL',
8092
+ yearDateFormat: 'yyyy',
8093
+ monthDateFormat: 'MMM',
8094
+ dayDateFormat: 'd',
8095
+ };
8096
+ const ARD_CALENDAR_DEFAULTS = new InjectionToken('ard-calendar-defaults', {
8097
+ factory: () => ({
8098
+ ..._calendarDefaults,
8099
+ }),
8100
+ });
8101
+ function provideCalendarDefaults(config) {
8102
+ return { provide: ARD_CALENDAR_DEFAULTS, useValue: { ..._calendarDefaults, ...config } };
8103
+ }
8104
+
8082
8105
  class ArdiumCalendarComponent extends _AbstractCalendar {
8083
8106
  constructor(defaults) {
8084
8107
  super(defaults);
@@ -8118,7 +8141,7 @@ class ArdiumCalendarComponent extends _AbstractCalendar {
8118
8141
  provide: ARD_FORM_FIELD_CONTROL,
8119
8142
  useExisting: ArdiumCalendarComponent,
8120
8143
  },
8121
- ], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"ard-calendar\"\r\n [ngClass]=\"ngClasses()\"\r\n>\r\n @switch (activeView()) { @case ('days') {\r\n <ard-days-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [staticHeight]=\"staticHeight()\"\r\n [highlightedDay]=\"highlightedDay()\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n [isDayFilteredOut]=\"isDayFilteredOut()\"\r\n [daysViewHeaderTemplate]=\"daysViewHeaderTemplate()?.template ?? templateRepository()?.daysViewHeaderTmp()?.template\"\r\n [floatingMonthTemplate]=\"floatingMonthTemplate()?.template ?? templateRepository()?.floatingMonthTmp()?.template\"\r\n [weekdayTemplate]=\"weekdayTemplate()?.template ?? templateRepository()?.weekdayTmp()?.template\"\r\n [dayTemplate]=\"dayTemplate()?.template ?? templateRepository()?.dayTmp()?.template\"\r\n [daysViewHeaderDateFormat]=\"daysViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"weekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"weekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"floatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"floatingMonthTitleDateFormat()\"\r\n [dayDateFormat]=\"dayDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenMonthsView)=\"onTriggerOpenMonthsView()\"\r\n (triggerOpenYearsView)=\"onTriggerOpenYearsView()\"\r\n (triggerChangeMonth)=\"changeMonth($event)\"\r\n (triggerChangeYear)=\"changeYear($event)\"\r\n (triggerHighlightDay)=\"setHighlightedDay($event)\"\r\n (triggerHighlightFirstDay)=\"highlightFirstDay()\"\r\n (triggerHighlightLastDay)=\"highlightLastDay()\"\r\n (triggerHighlightNextDay)=\"highlightNextDay($event)\"\r\n (triggerHighlightPreviousDay)=\"highlightPreviousDay($event)\"\r\n (triggerHighlightSameDayNextPage)=\"$event ? highlightSameDayNextYear() : highlightSameDayNextMonth()\"\r\n (triggerHighlightSameDayPreviousPage)=\"$event ? highlightSameDayPreviousYear() : highlightSameDayPreviousMonth()\"\r\n (triggerSelectDay)=\"selectDay($event)\"\r\n />\r\n } @case ('months') {\r\n <ard-months-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [color]=\"color()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [highlightedMonth]=\"highlightedMonth()\"\r\n [monthsViewHeaderTemplate]=\"monthsViewHeaderTemplate()?.template ?? templateRepository()?.monthsViewHeaderTmp()?.template\"\r\n [monthTemplate]=\"monthTemplate()?.template ?? templateRepository()?.monthTmp()?.template\"\r\n [monthsViewHeaderDateFormat]=\"monthsViewHeaderDateFormat()\"\r\n [monthDateFormat]=\"monthDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"onTriggerOpenDaysView()\"\r\n (triggerOpenYearsView)=\"onTriggerOpenYearsView()\"\r\n (triggeChangeYear)=\"changeYear($event)\"\r\n (triggerSelectMonth)=\"selectMonth($event)\"\r\n (triggerHighlightMonth)=\"setHighlightedMonth($event)\"\r\n (triggerHighlightFirstMonth)=\"highlightFirstMonth()\"\r\n (triggerHighlightLastMonth)=\"highlightLastMonth()\"\r\n (triggerHighlightNextMonth)=\"highlightNextMonth($event)\"\r\n (triggerHighlightPreviousMonth)=\"highlightPreviousMonth($event)\"\r\n (triggerHighlightSameMonthNextPage)=\"highlightSameMonthNextYear($event)\"\r\n (triggerHighlightSameMonthPreviousPage)=\"highlightSameMonthPreviousYear($event)\"\r\n />\r\n } @case ('years') {\r\n <ard-years-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [highlightedYear]=\"highlightedYear()\"\r\n [currentYearRangeStart]=\"currentYearRangeStart()\"\r\n [multipleYearPageSize]=\"multipleYearPageSize()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [yearsViewHeaderTemplate]=\"yearsViewHeaderTemplate()?.template ?? templateRepository()?.yearsViewHeaderTmp()?.template\"\r\n [yearTemplate]=\"yearTemplate()?.template ?? templateRepository()?.yearTmp()?.template\"\r\n [yearsViewHeaderDateFormat]=\"yearsViewHeaderDateFormat()\"\r\n [yearDateFormat]=\"yearDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"onTriggerOpenDaysView()\"\r\n (triggerOpenMonthsView)=\"onTriggerOpenMonthsView()\"\r\n (triggerSelectYear)=\"selectYear($event)\"\r\n (triggerChangeYearsViewPage)=\"changeYearsViewPage($event)\"\r\n (triggerHighlightYear)=\"setHighlightedYear($event)\"\r\n (triggerHighlightFirstYear)=\"highlightFirstYear()\"\r\n (triggerHighlightLastYear)=\"highlightLastYear()\"\r\n (triggerHighlightNextYear)=\"highlightNextYear($event)\"\r\n (triggerHighlightPreviousYear)=\"highlightPreviousYear($event)\"\r\n (triggerHighlightSameYearNextPage)=\"highlightSameYearNextPage($event)\"\r\n (triggerHighlightSameYearPreviousPage)=\"highlightSameYearPreviousPage($event)\"\r\n />\r\n } }\r\n</div>\r\n", styles: ["@layer ard-ui{ard-calendar,ard-range-calendar{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DaysViewComponent, selector: "ard-days-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "activeYear", "activeMonth", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "isDayFilteredOut", "highlightedDay", "firstWeekday", "staticHeight", "hideFloatingMonth", "daysViewHeaderTemplate", "floatingMonthTemplate", "weekdayTemplate", "dayTemplate", "daysViewHeaderDateFormat", "weekdayDateFormat", "weekdayTitleDateFormat", "floatingMonthDateFormat", "floatingMonthTitleDateFormat", "dayDateFormat"], outputs: ["triggerOpenYearsView", "triggerOpenMonthsView", "triggerSelectDay", "triggerChangeMonth", "triggerChangeYear", "triggerHighlightDay", "triggerHighlightNextDay", "triggerHighlightPreviousDay", "triggerHighlightFirstDay", "triggerHighlightLastDay", "triggerHighlightSameDayPreviousPage", "triggerHighlightSameDayNextPage", "focus", "blur"] }, { kind: "component", type: MonthsViewComponent, selector: "ard-months-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "color", "activeYear", "activeMonth", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "highlightedMonth", "monthsViewHeaderTemplate", "monthTemplate", "monthsViewHeaderDateFormat", "monthDateFormat"], outputs: ["triggerOpenYearsView", "triggerOpenDaysView", "focus", "blur", "triggerSelectMonth", "triggeChangeYear", "triggerHighlightMonth", "triggerHighlightNextMonth", "triggerHighlightPreviousMonth", "triggerHighlightFirstMonth", "triggerHighlightLastMonth", "triggerHighlightSameMonthPreviousPage", "triggerHighlightSameMonthNextPage"] }, { kind: "component", type: YearsViewComponent, selector: "ard-years-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "currentYearRangeStart", "multipleYearPageSize", "highlightedYear", "yearsViewHeaderTemplate", "yearTemplate", "yearsViewHeaderDateFormat", "yearDateFormat"], outputs: ["triggerOpenMonthsView", "triggerOpenDaysView", "focus", "blur", "triggerSelectYear", "triggerChangeYearsViewPage", "triggerHighlightYear", "triggerHighlightNextYear", "triggerHighlightPreviousYear", "triggerHighlightFirstYear", "triggerHighlightLastYear", "triggerHighlightSameYearPreviousPage", "triggerHighlightSameYearNextPage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
8144
+ ], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"ard-calendar\"\r\n [ngClass]=\"ngClasses()\"\r\n>\r\n @switch (activeView()) { @case ('days') {\r\n <ard-days-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [staticHeight]=\"staticHeight()\"\r\n [highlightedDay]=\"highlightedDay()\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n [isDayFilteredOut]=\"isDayFilteredOut()\"\r\n [daysViewHeaderTemplate]=\"daysViewHeaderTemplate()?.template ?? templateRepository()?.daysViewHeaderTmp()?.template\"\r\n [floatingMonthTemplate]=\"floatingMonthTemplate()?.template ?? templateRepository()?.floatingMonthTmp()?.template\"\r\n [weekdayTemplate]=\"weekdayTemplate()?.template ?? templateRepository()?.weekdayTmp()?.template\"\r\n [dayTemplate]=\"dayTemplate()?.template ?? templateRepository()?.dayTmp()?.template\"\r\n [daysViewHeaderDateFormat]=\"daysViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"weekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"weekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"floatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"floatingMonthTitleDateFormat()\"\r\n [dayDateFormat]=\"dayDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenMonthsView)=\"openMonthsView()\"\r\n (triggerOpenYearsView)=\"openYearsView()\"\r\n (triggerChangeMonth)=\"changeMonth($event)\"\r\n (triggerChangeYear)=\"changeYear($event)\"\r\n (triggerHighlightDay)=\"setHighlightedDay($event)\"\r\n (triggerHighlightFirstDay)=\"highlightFirstDay()\"\r\n (triggerHighlightLastDay)=\"highlightLastDay()\"\r\n (triggerHighlightNextDay)=\"highlightNextDay($event)\"\r\n (triggerHighlightPreviousDay)=\"highlightPreviousDay($event)\"\r\n (triggerHighlightSameDayNextPage)=\"$event ? highlightSameDayNextYear() : highlightSameDayNextMonth()\"\r\n (triggerHighlightSameDayPreviousPage)=\"$event ? highlightSameDayPreviousYear() : highlightSameDayPreviousMonth()\"\r\n (triggerSelectDay)=\"selectDay($event)\"\r\n />\r\n } @case ('months') {\r\n <ard-months-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [color]=\"color()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [highlightedMonth]=\"highlightedMonth()\"\r\n [monthsViewHeaderTemplate]=\"monthsViewHeaderTemplate()?.template ?? templateRepository()?.monthsViewHeaderTmp()?.template\"\r\n [monthTemplate]=\"monthTemplate()?.template ?? templateRepository()?.monthTmp()?.template\"\r\n [monthsViewHeaderDateFormat]=\"monthsViewHeaderDateFormat()\"\r\n [monthDateFormat]=\"monthDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"openDaysView()\"\r\n (triggerOpenYearsView)=\"openYearsView()\"\r\n (triggeChangeYear)=\"changeYear($event)\"\r\n (triggerSelectMonth)=\"selectMonth($event)\"\r\n (triggerHighlightMonth)=\"setHighlightedMonth($event)\"\r\n (triggerHighlightFirstMonth)=\"highlightFirstMonth()\"\r\n (triggerHighlightLastMonth)=\"highlightLastMonth()\"\r\n (triggerHighlightNextMonth)=\"highlightNextMonth($event)\"\r\n (triggerHighlightPreviousMonth)=\"highlightPreviousMonth($event)\"\r\n (triggerHighlightSameMonthNextPage)=\"highlightSameMonthNextYear($event)\"\r\n (triggerHighlightSameMonthPreviousPage)=\"highlightSameMonthPreviousYear($event)\"\r\n />\r\n } @case ('years') {\r\n <ard-years-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [highlightedYear]=\"highlightedYear()\"\r\n [currentYearRangeStart]=\"currentYearRangeStart()\"\r\n [multipleYearPageSize]=\"multipleYearPageSize()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [yearsViewHeaderTemplate]=\"yearsViewHeaderTemplate()?.template ?? templateRepository()?.yearsViewHeaderTmp()?.template\"\r\n [yearTemplate]=\"yearTemplate()?.template ?? templateRepository()?.yearTmp()?.template\"\r\n [yearsViewHeaderDateFormat]=\"yearsViewHeaderDateFormat()\"\r\n [yearDateFormat]=\"yearDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"openDaysView()\"\r\n (triggerOpenMonthsView)=\"openMonthsView()\"\r\n (triggerSelectYear)=\"selectYear($event)\"\r\n (triggerChangeYearsViewPage)=\"changeYearsViewPage($event)\"\r\n (triggerHighlightYear)=\"setHighlightedYear($event)\"\r\n (triggerHighlightFirstYear)=\"highlightFirstYear()\"\r\n (triggerHighlightLastYear)=\"highlightLastYear()\"\r\n (triggerHighlightNextYear)=\"highlightNextYear($event)\"\r\n (triggerHighlightPreviousYear)=\"highlightPreviousYear($event)\"\r\n (triggerHighlightSameYearNextPage)=\"highlightSameYearNextPage($event)\"\r\n (triggerHighlightSameYearPreviousPage)=\"highlightSameYearPreviousPage($event)\"\r\n />\r\n } }\r\n</div>\r\n", styles: ["@layer ard-ui{ard-calendar,ard-range-calendar{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DaysViewComponent, selector: "ard-days-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "activeYear", "activeMonth", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "isDayFilteredOut", "highlightedDay", "firstWeekday", "staticHeight", "hideFloatingMonth", "daysViewHeaderTemplate", "floatingMonthTemplate", "weekdayTemplate", "dayTemplate", "daysViewHeaderDateFormat", "weekdayDateFormat", "weekdayTitleDateFormat", "floatingMonthDateFormat", "floatingMonthTitleDateFormat", "dayDateFormat"], outputs: ["triggerOpenYearsView", "triggerOpenMonthsView", "triggerSelectDay", "triggerChangeMonth", "triggerChangeYear", "triggerHighlightDay", "triggerHighlightNextDay", "triggerHighlightPreviousDay", "triggerHighlightFirstDay", "triggerHighlightLastDay", "triggerHighlightSameDayPreviousPage", "triggerHighlightSameDayNextPage", "focus", "blur"] }, { kind: "component", type: MonthsViewComponent, selector: "ard-months-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "color", "activeYear", "activeMonth", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "highlightedMonth", "monthsViewHeaderTemplate", "monthTemplate", "monthsViewHeaderDateFormat", "monthDateFormat"], outputs: ["triggerOpenYearsView", "triggerOpenDaysView", "focus", "blur", "triggerSelectMonth", "triggeChangeYear", "triggerHighlightMonth", "triggerHighlightNextMonth", "triggerHighlightPreviousMonth", "triggerHighlightFirstMonth", "triggerHighlightLastMonth", "triggerHighlightSameMonthPreviousPage", "triggerHighlightSameMonthNextPage"] }, { kind: "component", type: YearsViewComponent, selector: "ard-years-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "currentYearRangeStart", "multipleYearPageSize", "highlightedYear", "yearsViewHeaderTemplate", "yearTemplate", "yearsViewHeaderDateFormat", "yearDateFormat"], outputs: ["triggerOpenMonthsView", "triggerOpenDaysView", "focus", "blur", "triggerSelectYear", "triggerChangeYearsViewPage", "triggerHighlightYear", "triggerHighlightNextYear", "triggerHighlightPreviousYear", "triggerHighlightFirstYear", "triggerHighlightLastYear", "triggerHighlightSameYearPreviousPage", "triggerHighlightSameYearNextPage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
8122
8145
  }
8123
8146
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumCalendarComponent, decorators: [{
8124
8147
  type: Component,
@@ -8132,7 +8155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
8132
8155
  provide: ARD_FORM_FIELD_CONTROL,
8133
8156
  useExisting: ArdiumCalendarComponent,
8134
8157
  },
8135
- ], template: "<div\r\n class=\"ard-calendar\"\r\n [ngClass]=\"ngClasses()\"\r\n>\r\n @switch (activeView()) { @case ('days') {\r\n <ard-days-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [staticHeight]=\"staticHeight()\"\r\n [highlightedDay]=\"highlightedDay()\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n [isDayFilteredOut]=\"isDayFilteredOut()\"\r\n [daysViewHeaderTemplate]=\"daysViewHeaderTemplate()?.template ?? templateRepository()?.daysViewHeaderTmp()?.template\"\r\n [floatingMonthTemplate]=\"floatingMonthTemplate()?.template ?? templateRepository()?.floatingMonthTmp()?.template\"\r\n [weekdayTemplate]=\"weekdayTemplate()?.template ?? templateRepository()?.weekdayTmp()?.template\"\r\n [dayTemplate]=\"dayTemplate()?.template ?? templateRepository()?.dayTmp()?.template\"\r\n [daysViewHeaderDateFormat]=\"daysViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"weekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"weekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"floatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"floatingMonthTitleDateFormat()\"\r\n [dayDateFormat]=\"dayDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenMonthsView)=\"onTriggerOpenMonthsView()\"\r\n (triggerOpenYearsView)=\"onTriggerOpenYearsView()\"\r\n (triggerChangeMonth)=\"changeMonth($event)\"\r\n (triggerChangeYear)=\"changeYear($event)\"\r\n (triggerHighlightDay)=\"setHighlightedDay($event)\"\r\n (triggerHighlightFirstDay)=\"highlightFirstDay()\"\r\n (triggerHighlightLastDay)=\"highlightLastDay()\"\r\n (triggerHighlightNextDay)=\"highlightNextDay($event)\"\r\n (triggerHighlightPreviousDay)=\"highlightPreviousDay($event)\"\r\n (triggerHighlightSameDayNextPage)=\"$event ? highlightSameDayNextYear() : highlightSameDayNextMonth()\"\r\n (triggerHighlightSameDayPreviousPage)=\"$event ? highlightSameDayPreviousYear() : highlightSameDayPreviousMonth()\"\r\n (triggerSelectDay)=\"selectDay($event)\"\r\n />\r\n } @case ('months') {\r\n <ard-months-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [color]=\"color()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [highlightedMonth]=\"highlightedMonth()\"\r\n [monthsViewHeaderTemplate]=\"monthsViewHeaderTemplate()?.template ?? templateRepository()?.monthsViewHeaderTmp()?.template\"\r\n [monthTemplate]=\"monthTemplate()?.template ?? templateRepository()?.monthTmp()?.template\"\r\n [monthsViewHeaderDateFormat]=\"monthsViewHeaderDateFormat()\"\r\n [monthDateFormat]=\"monthDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"onTriggerOpenDaysView()\"\r\n (triggerOpenYearsView)=\"onTriggerOpenYearsView()\"\r\n (triggeChangeYear)=\"changeYear($event)\"\r\n (triggerSelectMonth)=\"selectMonth($event)\"\r\n (triggerHighlightMonth)=\"setHighlightedMonth($event)\"\r\n (triggerHighlightFirstMonth)=\"highlightFirstMonth()\"\r\n (triggerHighlightLastMonth)=\"highlightLastMonth()\"\r\n (triggerHighlightNextMonth)=\"highlightNextMonth($event)\"\r\n (triggerHighlightPreviousMonth)=\"highlightPreviousMonth($event)\"\r\n (triggerHighlightSameMonthNextPage)=\"highlightSameMonthNextYear($event)\"\r\n (triggerHighlightSameMonthPreviousPage)=\"highlightSameMonthPreviousYear($event)\"\r\n />\r\n } @case ('years') {\r\n <ard-years-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [highlightedYear]=\"highlightedYear()\"\r\n [currentYearRangeStart]=\"currentYearRangeStart()\"\r\n [multipleYearPageSize]=\"multipleYearPageSize()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [yearsViewHeaderTemplate]=\"yearsViewHeaderTemplate()?.template ?? templateRepository()?.yearsViewHeaderTmp()?.template\"\r\n [yearTemplate]=\"yearTemplate()?.template ?? templateRepository()?.yearTmp()?.template\"\r\n [yearsViewHeaderDateFormat]=\"yearsViewHeaderDateFormat()\"\r\n [yearDateFormat]=\"yearDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"onTriggerOpenDaysView()\"\r\n (triggerOpenMonthsView)=\"onTriggerOpenMonthsView()\"\r\n (triggerSelectYear)=\"selectYear($event)\"\r\n (triggerChangeYearsViewPage)=\"changeYearsViewPage($event)\"\r\n (triggerHighlightYear)=\"setHighlightedYear($event)\"\r\n (triggerHighlightFirstYear)=\"highlightFirstYear()\"\r\n (triggerHighlightLastYear)=\"highlightLastYear()\"\r\n (triggerHighlightNextYear)=\"highlightNextYear($event)\"\r\n (triggerHighlightPreviousYear)=\"highlightPreviousYear($event)\"\r\n (triggerHighlightSameYearNextPage)=\"highlightSameYearNextPage($event)\"\r\n (triggerHighlightSameYearPreviousPage)=\"highlightSameYearPreviousPage($event)\"\r\n />\r\n } }\r\n</div>\r\n", styles: ["@layer ard-ui{ard-calendar,ard-range-calendar{display:block}}\n"] }]
8158
+ ], template: "<div\r\n class=\"ard-calendar\"\r\n [ngClass]=\"ngClasses()\"\r\n>\r\n @switch (activeView()) { @case ('days') {\r\n <ard-days-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [staticHeight]=\"staticHeight()\"\r\n [highlightedDay]=\"highlightedDay()\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n [isDayFilteredOut]=\"isDayFilteredOut()\"\r\n [daysViewHeaderTemplate]=\"daysViewHeaderTemplate()?.template ?? templateRepository()?.daysViewHeaderTmp()?.template\"\r\n [floatingMonthTemplate]=\"floatingMonthTemplate()?.template ?? templateRepository()?.floatingMonthTmp()?.template\"\r\n [weekdayTemplate]=\"weekdayTemplate()?.template ?? templateRepository()?.weekdayTmp()?.template\"\r\n [dayTemplate]=\"dayTemplate()?.template ?? templateRepository()?.dayTmp()?.template\"\r\n [daysViewHeaderDateFormat]=\"daysViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"weekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"weekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"floatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"floatingMonthTitleDateFormat()\"\r\n [dayDateFormat]=\"dayDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenMonthsView)=\"openMonthsView()\"\r\n (triggerOpenYearsView)=\"openYearsView()\"\r\n (triggerChangeMonth)=\"changeMonth($event)\"\r\n (triggerChangeYear)=\"changeYear($event)\"\r\n (triggerHighlightDay)=\"setHighlightedDay($event)\"\r\n (triggerHighlightFirstDay)=\"highlightFirstDay()\"\r\n (triggerHighlightLastDay)=\"highlightLastDay()\"\r\n (triggerHighlightNextDay)=\"highlightNextDay($event)\"\r\n (triggerHighlightPreviousDay)=\"highlightPreviousDay($event)\"\r\n (triggerHighlightSameDayNextPage)=\"$event ? highlightSameDayNextYear() : highlightSameDayNextMonth()\"\r\n (triggerHighlightSameDayPreviousPage)=\"$event ? highlightSameDayPreviousYear() : highlightSameDayPreviousMonth()\"\r\n (triggerSelectDay)=\"selectDay($event)\"\r\n />\r\n } @case ('months') {\r\n <ard-months-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [color]=\"color()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [highlightedMonth]=\"highlightedMonth()\"\r\n [monthsViewHeaderTemplate]=\"monthsViewHeaderTemplate()?.template ?? templateRepository()?.monthsViewHeaderTmp()?.template\"\r\n [monthTemplate]=\"monthTemplate()?.template ?? templateRepository()?.monthTmp()?.template\"\r\n [monthsViewHeaderDateFormat]=\"monthsViewHeaderDateFormat()\"\r\n [monthDateFormat]=\"monthDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"openDaysView()\"\r\n (triggerOpenYearsView)=\"openYearsView()\"\r\n (triggeChangeYear)=\"changeYear($event)\"\r\n (triggerSelectMonth)=\"selectMonth($event)\"\r\n (triggerHighlightMonth)=\"setHighlightedMonth($event)\"\r\n (triggerHighlightFirstMonth)=\"highlightFirstMonth()\"\r\n (triggerHighlightLastMonth)=\"highlightLastMonth()\"\r\n (triggerHighlightNextMonth)=\"highlightNextMonth($event)\"\r\n (triggerHighlightPreviousMonth)=\"highlightPreviousMonth($event)\"\r\n (triggerHighlightSameMonthNextPage)=\"highlightSameMonthNextYear($event)\"\r\n (triggerHighlightSameMonthPreviousPage)=\"highlightSameMonthPreviousYear($event)\"\r\n />\r\n } @case ('years') {\r\n <ard-years-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [highlightedYear]=\"highlightedYear()\"\r\n [currentYearRangeStart]=\"currentYearRangeStart()\"\r\n [multipleYearPageSize]=\"multipleYearPageSize()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [yearsViewHeaderTemplate]=\"yearsViewHeaderTemplate()?.template ?? templateRepository()?.yearsViewHeaderTmp()?.template\"\r\n [yearTemplate]=\"yearTemplate()?.template ?? templateRepository()?.yearTmp()?.template\"\r\n [yearsViewHeaderDateFormat]=\"yearsViewHeaderDateFormat()\"\r\n [yearDateFormat]=\"yearDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"openDaysView()\"\r\n (triggerOpenMonthsView)=\"openMonthsView()\"\r\n (triggerSelectYear)=\"selectYear($event)\"\r\n (triggerChangeYearsViewPage)=\"changeYearsViewPage($event)\"\r\n (triggerHighlightYear)=\"setHighlightedYear($event)\"\r\n (triggerHighlightFirstYear)=\"highlightFirstYear()\"\r\n (triggerHighlightLastYear)=\"highlightLastYear()\"\r\n (triggerHighlightNextYear)=\"highlightNextYear($event)\"\r\n (triggerHighlightPreviousYear)=\"highlightPreviousYear($event)\"\r\n (triggerHighlightSameYearNextPage)=\"highlightSameYearNextPage($event)\"\r\n (triggerHighlightSameYearPreviousPage)=\"highlightSameYearPreviousPage($event)\"\r\n />\r\n } }\r\n</div>\r\n", styles: ["@layer ard-ui{ard-calendar,ard-range-calendar{display:block}}\n"] }]
8136
8159
  }], ctorParameters: () => [{ type: undefined, decorators: [{
8137
8160
  type: Inject,
8138
8161
  args: [ARD_CALENDAR_DEFAULTS]
@@ -8277,7 +8300,7 @@ class ArdiumRangeCalendarComponent extends _AbstractCalendar {
8277
8300
  provide: ARD_FORM_FIELD_CONTROL,
8278
8301
  useExisting: ArdiumRangeCalendarComponent,
8279
8302
  },
8280
- ], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"ard-calendar\"\r\n [ngClass]=\"ngClasses()\"\r\n>\r\n @switch (activeView()) { @case ('days') {\r\n <ard-days-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [staticHeight]=\"staticHeight()\"\r\n [highlightedDay]=\"highlightedDay()\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n [isDayFilteredOut]=\"isDayFilteredOut()\"\r\n [daysViewHeaderTemplate]=\"daysViewHeaderTemplate()?.template ?? templateRepository()?.daysViewHeaderTmp()?.template\"\r\n [floatingMonthTemplate]=\"floatingMonthTemplate()?.template ?? templateRepository()?.floatingMonthTmp()?.template\"\r\n [weekdayTemplate]=\"weekdayTemplate()?.template ?? templateRepository()?.weekdayTmp()?.template\"\r\n [dayTemplate]=\"dayTemplate()?.template ?? templateRepository()?.dayTmp()?.template\"\r\n [daysViewHeaderDateFormat]=\"daysViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"weekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"weekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"floatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"floatingMonthTitleDateFormat()\"\r\n [dayDateFormat]=\"dayDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenMonthsView)=\"onTriggerOpenMonthsView()\"\r\n (triggerOpenYearsView)=\"onTriggerOpenYearsView()\"\r\n (triggerChangeMonth)=\"changeMonth($event)\"\r\n (triggerChangeYear)=\"changeYear($event)\"\r\n (triggerHighlightDay)=\"setHighlightedDay($event)\"\r\n (triggerHighlightFirstDay)=\"highlightFirstDay()\"\r\n (triggerHighlightLastDay)=\"highlightLastDay()\"\r\n (triggerHighlightNextDay)=\"highlightNextDay($event)\"\r\n (triggerHighlightPreviousDay)=\"highlightPreviousDay($event)\"\r\n (triggerHighlightSameDayNextPage)=\"$event ? highlightSameDayNextYear() : highlightSameDayNextMonth()\"\r\n (triggerHighlightSameDayPreviousPage)=\"$event ? highlightSameDayPreviousYear() : highlightSameDayPreviousMonth()\"\r\n (triggerSelectDay)=\"selectDay($event)\"\r\n />\r\n } @case ('months') {\r\n <ard-months-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [color]=\"color()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [highlightedMonth]=\"highlightedMonth()\"\r\n [monthsViewHeaderTemplate]=\"monthsViewHeaderTemplate()?.template ?? templateRepository()?.monthsViewHeaderTmp()?.template\"\r\n [monthTemplate]=\"monthTemplate()?.template ?? templateRepository()?.monthTmp()?.template\"\r\n [monthsViewHeaderDateFormat]=\"monthsViewHeaderDateFormat()\"\r\n [monthDateFormat]=\"monthDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"onTriggerOpenDaysView()\"\r\n (triggerOpenYearsView)=\"onTriggerOpenYearsView()\"\r\n (triggeChangeYear)=\"changeYear($event)\"\r\n (triggerSelectMonth)=\"selectMonth($event)\"\r\n (triggerHighlightMonth)=\"setHighlightedMonth($event)\"\r\n (triggerHighlightFirstMonth)=\"highlightFirstMonth()\"\r\n (triggerHighlightLastMonth)=\"highlightLastMonth()\"\r\n (triggerHighlightNextMonth)=\"highlightNextMonth($event)\"\r\n (triggerHighlightPreviousMonth)=\"highlightPreviousMonth($event)\"\r\n (triggerHighlightSameMonthNextPage)=\"highlightSameMonthNextYear($event)\"\r\n (triggerHighlightSameMonthPreviousPage)=\"highlightSameMonthPreviousYear($event)\"\r\n />\r\n } @case ('years') {\r\n <ard-years-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [highlightedYear]=\"highlightedYear()\"\r\n [currentYearRangeStart]=\"currentYearRangeStart()\"\r\n [multipleYearPageSize]=\"multipleYearPageSize()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [yearsViewHeaderTemplate]=\"yearsViewHeaderTemplate()?.template ?? templateRepository()?.yearsViewHeaderTmp()?.template\"\r\n [yearTemplate]=\"yearTemplate()?.template ?? templateRepository()?.yearTmp()?.template\"\r\n [yearsViewHeaderDateFormat]=\"yearsViewHeaderDateFormat()\"\r\n [yearDateFormat]=\"yearDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"onTriggerOpenDaysView()\"\r\n (triggerOpenMonthsView)=\"onTriggerOpenMonthsView()\"\r\n (triggerSelectYear)=\"selectYear($event)\"\r\n (triggerChangeYearsViewPage)=\"changeYearsViewPage($event)\"\r\n (triggerHighlightYear)=\"setHighlightedYear($event)\"\r\n (triggerHighlightFirstYear)=\"highlightFirstYear()\"\r\n (triggerHighlightLastYear)=\"highlightLastYear()\"\r\n (triggerHighlightNextYear)=\"highlightNextYear($event)\"\r\n (triggerHighlightPreviousYear)=\"highlightPreviousYear($event)\"\r\n (triggerHighlightSameYearNextPage)=\"highlightSameYearNextPage($event)\"\r\n (triggerHighlightSameYearPreviousPage)=\"highlightSameYearPreviousPage($event)\"\r\n />\r\n } }\r\n</div>\r\n", styles: ["@layer ard-ui{ard-calendar,ard-range-calendar{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DaysViewComponent, selector: "ard-days-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "activeYear", "activeMonth", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "isDayFilteredOut", "highlightedDay", "firstWeekday", "staticHeight", "hideFloatingMonth", "daysViewHeaderTemplate", "floatingMonthTemplate", "weekdayTemplate", "dayTemplate", "daysViewHeaderDateFormat", "weekdayDateFormat", "weekdayTitleDateFormat", "floatingMonthDateFormat", "floatingMonthTitleDateFormat", "dayDateFormat"], outputs: ["triggerOpenYearsView", "triggerOpenMonthsView", "triggerSelectDay", "triggerChangeMonth", "triggerChangeYear", "triggerHighlightDay", "triggerHighlightNextDay", "triggerHighlightPreviousDay", "triggerHighlightFirstDay", "triggerHighlightLastDay", "triggerHighlightSameDayPreviousPage", "triggerHighlightSameDayNextPage", "focus", "blur"] }, { kind: "component", type: MonthsViewComponent, selector: "ard-months-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "color", "activeYear", "activeMonth", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "highlightedMonth", "monthsViewHeaderTemplate", "monthTemplate", "monthsViewHeaderDateFormat", "monthDateFormat"], outputs: ["triggerOpenYearsView", "triggerOpenDaysView", "focus", "blur", "triggerSelectMonth", "triggeChangeYear", "triggerHighlightMonth", "triggerHighlightNextMonth", "triggerHighlightPreviousMonth", "triggerHighlightFirstMonth", "triggerHighlightLastMonth", "triggerHighlightSameMonthPreviousPage", "triggerHighlightSameMonthNextPage"] }, { kind: "component", type: YearsViewComponent, selector: "ard-years-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "currentYearRangeStart", "multipleYearPageSize", "highlightedYear", "yearsViewHeaderTemplate", "yearTemplate", "yearsViewHeaderDateFormat", "yearDateFormat"], outputs: ["triggerOpenMonthsView", "triggerOpenDaysView", "focus", "blur", "triggerSelectYear", "triggerChangeYearsViewPage", "triggerHighlightYear", "triggerHighlightNextYear", "triggerHighlightPreviousYear", "triggerHighlightFirstYear", "triggerHighlightLastYear", "triggerHighlightSameYearPreviousPage", "triggerHighlightSameYearNextPage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
8303
+ ], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"ard-calendar\"\r\n [ngClass]=\"ngClasses()\"\r\n>\r\n @switch (activeView()) { @case ('days') {\r\n <ard-days-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [staticHeight]=\"staticHeight()\"\r\n [highlightedDay]=\"highlightedDay()\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n [isDayFilteredOut]=\"isDayFilteredOut()\"\r\n [daysViewHeaderTemplate]=\"daysViewHeaderTemplate()?.template ?? templateRepository()?.daysViewHeaderTmp()?.template\"\r\n [floatingMonthTemplate]=\"floatingMonthTemplate()?.template ?? templateRepository()?.floatingMonthTmp()?.template\"\r\n [weekdayTemplate]=\"weekdayTemplate()?.template ?? templateRepository()?.weekdayTmp()?.template\"\r\n [dayTemplate]=\"dayTemplate()?.template ?? templateRepository()?.dayTmp()?.template\"\r\n [daysViewHeaderDateFormat]=\"daysViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"weekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"weekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"floatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"floatingMonthTitleDateFormat()\"\r\n [dayDateFormat]=\"dayDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenMonthsView)=\"openMonthsView()\"\r\n (triggerOpenYearsView)=\"openYearsView()\"\r\n (triggerChangeMonth)=\"changeMonth($event)\"\r\n (triggerChangeYear)=\"changeYear($event)\"\r\n (triggerHighlightDay)=\"setHighlightedDay($event)\"\r\n (triggerHighlightFirstDay)=\"highlightFirstDay()\"\r\n (triggerHighlightLastDay)=\"highlightLastDay()\"\r\n (triggerHighlightNextDay)=\"highlightNextDay($event)\"\r\n (triggerHighlightPreviousDay)=\"highlightPreviousDay($event)\"\r\n (triggerHighlightSameDayNextPage)=\"$event ? highlightSameDayNextYear() : highlightSameDayNextMonth()\"\r\n (triggerHighlightSameDayPreviousPage)=\"$event ? highlightSameDayPreviousYear() : highlightSameDayPreviousMonth()\"\r\n (triggerSelectDay)=\"selectDay($event)\"\r\n />\r\n } @case ('months') {\r\n <ard-months-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [color]=\"color()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [highlightedMonth]=\"highlightedMonth()\"\r\n [monthsViewHeaderTemplate]=\"monthsViewHeaderTemplate()?.template ?? templateRepository()?.monthsViewHeaderTmp()?.template\"\r\n [monthTemplate]=\"monthTemplate()?.template ?? templateRepository()?.monthTmp()?.template\"\r\n [monthsViewHeaderDateFormat]=\"monthsViewHeaderDateFormat()\"\r\n [monthDateFormat]=\"monthDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"openDaysView()\"\r\n (triggerOpenYearsView)=\"openYearsView()\"\r\n (triggeChangeYear)=\"changeYear($event)\"\r\n (triggerSelectMonth)=\"selectMonth($event)\"\r\n (triggerHighlightMonth)=\"setHighlightedMonth($event)\"\r\n (triggerHighlightFirstMonth)=\"highlightFirstMonth()\"\r\n (triggerHighlightLastMonth)=\"highlightLastMonth()\"\r\n (triggerHighlightNextMonth)=\"highlightNextMonth($event)\"\r\n (triggerHighlightPreviousMonth)=\"highlightPreviousMonth($event)\"\r\n (triggerHighlightSameMonthNextPage)=\"highlightSameMonthNextYear($event)\"\r\n (triggerHighlightSameMonthPreviousPage)=\"highlightSameMonthPreviousYear($event)\"\r\n />\r\n } @case ('years') {\r\n <ard-years-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [highlightedYear]=\"highlightedYear()\"\r\n [currentYearRangeStart]=\"currentYearRangeStart()\"\r\n [multipleYearPageSize]=\"multipleYearPageSize()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [yearsViewHeaderTemplate]=\"yearsViewHeaderTemplate()?.template ?? templateRepository()?.yearsViewHeaderTmp()?.template\"\r\n [yearTemplate]=\"yearTemplate()?.template ?? templateRepository()?.yearTmp()?.template\"\r\n [yearsViewHeaderDateFormat]=\"yearsViewHeaderDateFormat()\"\r\n [yearDateFormat]=\"yearDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"openDaysView()\"\r\n (triggerOpenMonthsView)=\"openMonthsView()\"\r\n (triggerSelectYear)=\"selectYear($event)\"\r\n (triggerChangeYearsViewPage)=\"changeYearsViewPage($event)\"\r\n (triggerHighlightYear)=\"setHighlightedYear($event)\"\r\n (triggerHighlightFirstYear)=\"highlightFirstYear()\"\r\n (triggerHighlightLastYear)=\"highlightLastYear()\"\r\n (triggerHighlightNextYear)=\"highlightNextYear($event)\"\r\n (triggerHighlightPreviousYear)=\"highlightPreviousYear($event)\"\r\n (triggerHighlightSameYearNextPage)=\"highlightSameYearNextPage($event)\"\r\n (triggerHighlightSameYearPreviousPage)=\"highlightSameYearPreviousPage($event)\"\r\n />\r\n } }\r\n</div>\r\n", styles: ["@layer ard-ui{ard-calendar,ard-range-calendar{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DaysViewComponent, selector: "ard-days-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "activeYear", "activeMonth", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "isDayFilteredOut", "highlightedDay", "firstWeekday", "staticHeight", "hideFloatingMonth", "daysViewHeaderTemplate", "floatingMonthTemplate", "weekdayTemplate", "dayTemplate", "daysViewHeaderDateFormat", "weekdayDateFormat", "weekdayTitleDateFormat", "floatingMonthDateFormat", "floatingMonthTitleDateFormat", "dayDateFormat"], outputs: ["triggerOpenYearsView", "triggerOpenMonthsView", "triggerSelectDay", "triggerChangeMonth", "triggerChangeYear", "triggerHighlightDay", "triggerHighlightNextDay", "triggerHighlightPreviousDay", "triggerHighlightFirstDay", "triggerHighlightLastDay", "triggerHighlightSameDayPreviousPage", "triggerHighlightSameDayNextPage", "focus", "blur"] }, { kind: "component", type: MonthsViewComponent, selector: "ard-months-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "color", "activeYear", "activeMonth", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "highlightedMonth", "monthsViewHeaderTemplate", "monthTemplate", "monthsViewHeaderDateFormat", "monthDateFormat"], outputs: ["triggerOpenYearsView", "triggerOpenDaysView", "focus", "blur", "triggerSelectMonth", "triggeChangeYear", "triggerHighlightMonth", "triggerHighlightNextMonth", "triggerHighlightPreviousMonth", "triggerHighlightFirstMonth", "triggerHighlightLastMonth", "triggerHighlightSameMonthPreviousPage", "triggerHighlightSameMonthNextPage"] }, { kind: "component", type: YearsViewComponent, selector: "ard-years-view", inputs: ["tabIndex", "readOnly", "disabled", "autoFocus", "_isUsingKeyboard", "selectedDate", "selectedDateEnd", "rangeSelectionMode", "UTC", "min", "max", "multiCalendarLocation", "currentYearRangeStart", "multipleYearPageSize", "highlightedYear", "yearsViewHeaderTemplate", "yearTemplate", "yearsViewHeaderDateFormat", "yearDateFormat"], outputs: ["triggerOpenMonthsView", "triggerOpenDaysView", "focus", "blur", "triggerSelectYear", "triggerChangeYearsViewPage", "triggerHighlightYear", "triggerHighlightNextYear", "triggerHighlightPreviousYear", "triggerHighlightFirstYear", "triggerHighlightLastYear", "triggerHighlightSameYearPreviousPage", "triggerHighlightSameYearNextPage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
8281
8304
  }
8282
8305
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumRangeCalendarComponent, decorators: [{
8283
8306
  type: Component,
@@ -8291,7 +8314,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
8291
8314
  provide: ARD_FORM_FIELD_CONTROL,
8292
8315
  useExisting: ArdiumRangeCalendarComponent,
8293
8316
  },
8294
- ], template: "<div\r\n class=\"ard-calendar\"\r\n [ngClass]=\"ngClasses()\"\r\n>\r\n @switch (activeView()) { @case ('days') {\r\n <ard-days-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [staticHeight]=\"staticHeight()\"\r\n [highlightedDay]=\"highlightedDay()\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n [isDayFilteredOut]=\"isDayFilteredOut()\"\r\n [daysViewHeaderTemplate]=\"daysViewHeaderTemplate()?.template ?? templateRepository()?.daysViewHeaderTmp()?.template\"\r\n [floatingMonthTemplate]=\"floatingMonthTemplate()?.template ?? templateRepository()?.floatingMonthTmp()?.template\"\r\n [weekdayTemplate]=\"weekdayTemplate()?.template ?? templateRepository()?.weekdayTmp()?.template\"\r\n [dayTemplate]=\"dayTemplate()?.template ?? templateRepository()?.dayTmp()?.template\"\r\n [daysViewHeaderDateFormat]=\"daysViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"weekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"weekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"floatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"floatingMonthTitleDateFormat()\"\r\n [dayDateFormat]=\"dayDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenMonthsView)=\"onTriggerOpenMonthsView()\"\r\n (triggerOpenYearsView)=\"onTriggerOpenYearsView()\"\r\n (triggerChangeMonth)=\"changeMonth($event)\"\r\n (triggerChangeYear)=\"changeYear($event)\"\r\n (triggerHighlightDay)=\"setHighlightedDay($event)\"\r\n (triggerHighlightFirstDay)=\"highlightFirstDay()\"\r\n (triggerHighlightLastDay)=\"highlightLastDay()\"\r\n (triggerHighlightNextDay)=\"highlightNextDay($event)\"\r\n (triggerHighlightPreviousDay)=\"highlightPreviousDay($event)\"\r\n (triggerHighlightSameDayNextPage)=\"$event ? highlightSameDayNextYear() : highlightSameDayNextMonth()\"\r\n (triggerHighlightSameDayPreviousPage)=\"$event ? highlightSameDayPreviousYear() : highlightSameDayPreviousMonth()\"\r\n (triggerSelectDay)=\"selectDay($event)\"\r\n />\r\n } @case ('months') {\r\n <ard-months-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [color]=\"color()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [highlightedMonth]=\"highlightedMonth()\"\r\n [monthsViewHeaderTemplate]=\"monthsViewHeaderTemplate()?.template ?? templateRepository()?.monthsViewHeaderTmp()?.template\"\r\n [monthTemplate]=\"monthTemplate()?.template ?? templateRepository()?.monthTmp()?.template\"\r\n [monthsViewHeaderDateFormat]=\"monthsViewHeaderDateFormat()\"\r\n [monthDateFormat]=\"monthDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"onTriggerOpenDaysView()\"\r\n (triggerOpenYearsView)=\"onTriggerOpenYearsView()\"\r\n (triggeChangeYear)=\"changeYear($event)\"\r\n (triggerSelectMonth)=\"selectMonth($event)\"\r\n (triggerHighlightMonth)=\"setHighlightedMonth($event)\"\r\n (triggerHighlightFirstMonth)=\"highlightFirstMonth()\"\r\n (triggerHighlightLastMonth)=\"highlightLastMonth()\"\r\n (triggerHighlightNextMonth)=\"highlightNextMonth($event)\"\r\n (triggerHighlightPreviousMonth)=\"highlightPreviousMonth($event)\"\r\n (triggerHighlightSameMonthNextPage)=\"highlightSameMonthNextYear($event)\"\r\n (triggerHighlightSameMonthPreviousPage)=\"highlightSameMonthPreviousYear($event)\"\r\n />\r\n } @case ('years') {\r\n <ard-years-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [highlightedYear]=\"highlightedYear()\"\r\n [currentYearRangeStart]=\"currentYearRangeStart()\"\r\n [multipleYearPageSize]=\"multipleYearPageSize()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [yearsViewHeaderTemplate]=\"yearsViewHeaderTemplate()?.template ?? templateRepository()?.yearsViewHeaderTmp()?.template\"\r\n [yearTemplate]=\"yearTemplate()?.template ?? templateRepository()?.yearTmp()?.template\"\r\n [yearsViewHeaderDateFormat]=\"yearsViewHeaderDateFormat()\"\r\n [yearDateFormat]=\"yearDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"onTriggerOpenDaysView()\"\r\n (triggerOpenMonthsView)=\"onTriggerOpenMonthsView()\"\r\n (triggerSelectYear)=\"selectYear($event)\"\r\n (triggerChangeYearsViewPage)=\"changeYearsViewPage($event)\"\r\n (triggerHighlightYear)=\"setHighlightedYear($event)\"\r\n (triggerHighlightFirstYear)=\"highlightFirstYear()\"\r\n (triggerHighlightLastYear)=\"highlightLastYear()\"\r\n (triggerHighlightNextYear)=\"highlightNextYear($event)\"\r\n (triggerHighlightPreviousYear)=\"highlightPreviousYear($event)\"\r\n (triggerHighlightSameYearNextPage)=\"highlightSameYearNextPage($event)\"\r\n (triggerHighlightSameYearPreviousPage)=\"highlightSameYearPreviousPage($event)\"\r\n />\r\n } }\r\n</div>\r\n", styles: ["@layer ard-ui{ard-calendar,ard-range-calendar{display:block}}\n"] }]
8317
+ ], template: "<div\r\n class=\"ard-calendar\"\r\n [ngClass]=\"ngClasses()\"\r\n>\r\n @switch (activeView()) { @case ('days') {\r\n <ard-days-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [staticHeight]=\"staticHeight()\"\r\n [highlightedDay]=\"highlightedDay()\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n [isDayFilteredOut]=\"isDayFilteredOut()\"\r\n [daysViewHeaderTemplate]=\"daysViewHeaderTemplate()?.template ?? templateRepository()?.daysViewHeaderTmp()?.template\"\r\n [floatingMonthTemplate]=\"floatingMonthTemplate()?.template ?? templateRepository()?.floatingMonthTmp()?.template\"\r\n [weekdayTemplate]=\"weekdayTemplate()?.template ?? templateRepository()?.weekdayTmp()?.template\"\r\n [dayTemplate]=\"dayTemplate()?.template ?? templateRepository()?.dayTmp()?.template\"\r\n [daysViewHeaderDateFormat]=\"daysViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"weekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"weekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"floatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"floatingMonthTitleDateFormat()\"\r\n [dayDateFormat]=\"dayDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenMonthsView)=\"openMonthsView()\"\r\n (triggerOpenYearsView)=\"openYearsView()\"\r\n (triggerChangeMonth)=\"changeMonth($event)\"\r\n (triggerChangeYear)=\"changeYear($event)\"\r\n (triggerHighlightDay)=\"setHighlightedDay($event)\"\r\n (triggerHighlightFirstDay)=\"highlightFirstDay()\"\r\n (triggerHighlightLastDay)=\"highlightLastDay()\"\r\n (triggerHighlightNextDay)=\"highlightNextDay($event)\"\r\n (triggerHighlightPreviousDay)=\"highlightPreviousDay($event)\"\r\n (triggerHighlightSameDayNextPage)=\"$event ? highlightSameDayNextYear() : highlightSameDayNextMonth()\"\r\n (triggerHighlightSameDayPreviousPage)=\"$event ? highlightSameDayPreviousYear() : highlightSameDayPreviousMonth()\"\r\n (triggerSelectDay)=\"selectDay($event)\"\r\n />\r\n } @case ('months') {\r\n <ard-months-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [color]=\"color()\"\r\n [activeMonth]=\"activeMonth()\"\r\n [activeYear]=\"activeYear()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [highlightedMonth]=\"highlightedMonth()\"\r\n [monthsViewHeaderTemplate]=\"monthsViewHeaderTemplate()?.template ?? templateRepository()?.monthsViewHeaderTmp()?.template\"\r\n [monthTemplate]=\"monthTemplate()?.template ?? templateRepository()?.monthTmp()?.template\"\r\n [monthsViewHeaderDateFormat]=\"monthsViewHeaderDateFormat()\"\r\n [monthDateFormat]=\"monthDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"openDaysView()\"\r\n (triggerOpenYearsView)=\"openYearsView()\"\r\n (triggeChangeYear)=\"changeYear($event)\"\r\n (triggerSelectMonth)=\"selectMonth($event)\"\r\n (triggerHighlightMonth)=\"setHighlightedMonth($event)\"\r\n (triggerHighlightFirstMonth)=\"highlightFirstMonth()\"\r\n (triggerHighlightLastMonth)=\"highlightLastMonth()\"\r\n (triggerHighlightNextMonth)=\"highlightNextMonth($event)\"\r\n (triggerHighlightPreviousMonth)=\"highlightPreviousMonth($event)\"\r\n (triggerHighlightSameMonthNextPage)=\"highlightSameMonthNextYear($event)\"\r\n (triggerHighlightSameMonthPreviousPage)=\"highlightSameMonthPreviousYear($event)\"\r\n />\r\n } @case ('years') {\r\n <ard-years-view\r\n [tabIndex]=\"tabIndex()\"\r\n [readOnly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [autoFocus]=\"autoFocus()\"\r\n [_isUsingKeyboard]=\"_isUsingKeyboard()\"\r\n [highlightedYear]=\"highlightedYear()\"\r\n [currentYearRangeStart]=\"currentYearRangeStart()\"\r\n [multipleYearPageSize]=\"multipleYearPageSize()\"\r\n [selectedDate]=\"selectionStart()\"\r\n [selectedDateEnd]=\"endDate()\"\r\n [rangeSelectionMode]=\"isRangeSelector\"\r\n [UTC]=\"UTC()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [multiCalendarLocation]=\"multiCalendarLocation()\"\r\n [yearsViewHeaderTemplate]=\"yearsViewHeaderTemplate()?.template ?? templateRepository()?.yearsViewHeaderTmp()?.template\"\r\n [yearTemplate]=\"yearTemplate()?.template ?? templateRepository()?.yearTmp()?.template\"\r\n [yearsViewHeaderDateFormat]=\"yearsViewHeaderDateFormat()\"\r\n [yearDateFormat]=\"yearDateFormat()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (triggerOpenDaysView)=\"openDaysView()\"\r\n (triggerOpenMonthsView)=\"openMonthsView()\"\r\n (triggerSelectYear)=\"selectYear($event)\"\r\n (triggerChangeYearsViewPage)=\"changeYearsViewPage($event)\"\r\n (triggerHighlightYear)=\"setHighlightedYear($event)\"\r\n (triggerHighlightFirstYear)=\"highlightFirstYear()\"\r\n (triggerHighlightLastYear)=\"highlightLastYear()\"\r\n (triggerHighlightNextYear)=\"highlightNextYear($event)\"\r\n (triggerHighlightPreviousYear)=\"highlightPreviousYear($event)\"\r\n (triggerHighlightSameYearNextPage)=\"highlightSameYearNextPage($event)\"\r\n (triggerHighlightSameYearPreviousPage)=\"highlightSameYearPreviousPage($event)\"\r\n />\r\n } }\r\n</div>\r\n", styles: ["@layer ard-ui{ard-calendar,ard-range-calendar{display:block}}\n"] }]
8295
8318
  }], ctorParameters: () => [{ type: undefined, decorators: [{
8296
8319
  type: Inject,
8297
8320
  args: [ARD_CALENDAR_DEFAULTS]
@@ -8657,7 +8680,6 @@ class ArdiumDateInputComponent extends _AbstractDateInput {
8657
8680
  this._processDateInputText(this.dateInputValue());
8658
8681
  if (!this.isDateInputFocused())
8659
8682
  return;
8660
- this._onTouched();
8661
8683
  this.isDateInputFocused.set(false);
8662
8684
  }
8663
8685
  onDateInputEnter(event) {
@@ -8727,7 +8749,7 @@ class ArdiumDateInputComponent extends _AbstractDateInput {
8727
8749
  provide: ARD_FORM_FIELD_CONTROL,
8728
8750
  useExisting: ArdiumDateInputComponent,
8729
8751
  },
8730
- ], queries: [{ propertyName: "calendarDaysViewHeaderTemplate", first: true, predicate: ArdDateInputDaysViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarYearsViewHeaderTemplate", first: true, predicate: ArdDateInputYearsViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarMonthsViewHeaderTemplate", first: true, predicate: ArdDateInputMonthsViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarWeekdayTemplate", first: true, predicate: ArdDateInputWeekdayTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarFloatingMonthTemplate", first: true, predicate: ArdDateInputFloatingMonthTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarYearTemplate", first: true, predicate: ArdDateInputYearTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarMonthTemplate", first: true, predicate: ArdDateInputMonthTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarDayTemplate", first: true, predicate: ArdDateInputDayTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dateInput", first: true, predicate: ["dateInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [readonly]=\"readonly()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-date-input\"\r\n #dropdownHost\r\n (click)=\"onGeneralClick($event)\"\r\n [class.ard-has-value]=\"!!value()\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-date-input__date-input-focused]=\"isDateInputFocused()\"\r\n >\r\n <div class=\"ard-date-input__value-container ard-input-container\">\r\n <div\r\n class=\"ard-date-input__placeholder ard-placeholder\"\r\n [class.ard-date-input__placeholder-hidden]=\"!shouldDisplayPlaceholder()\"\r\n >\r\n {{ placeholder() }}\r\n </div>\r\n <div\r\n class=\"ard-date-input__value\"\r\n [class.ard-date-input__value-hidden]=\"!shouldDisplayValue()\"\r\n >\r\n <ng-template\r\n #defaultValueTemplate\r\n let-date\r\n >\r\n {{ date }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"valueTemplate()?.template || defaultValueTemplate\"\r\n [ngTemplateOutletContext]=\"valueContext()\"\r\n />\r\n </div>\r\n <div\r\n class=\"ard-date-input__input-container\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-owns]=\"isOpen() ? htmlId() : null\"\r\n [class.ard-date-input__input-container-hidden]=\"!shouldDisplayDateInput()\"\r\n >\r\n <input\r\n #dateInput\r\n #focusableElement\r\n type=\"text\"\r\n class=\"ard-date-input__input\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [value]=\"dateInputValue()\"\r\n [attr.aria-controls]=\"isOpen() ? htmlId() : null\"\r\n (input)=\"onDateInputInput($event)\"\r\n (change)=\"$event.stopPropagation()\"\r\n (focus)=\"onDateInputFocus($event)\"\r\n (blur)=\"onDateInputBlur($event)\"\r\n (keydown)=\"onDateInputEnter($event)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (!calendarHidden()) {\r\n <ard-icon-button\r\n color=\"none\"\r\n [disabled]=\"calendarDisabled()\"\r\n (click)=\"onCalendarButtonClick($event)\"\r\n >\r\n <ng-template\r\n #defaultCalendarIconTemplate\r\n let-date\r\n >\r\n <ard-icon filled>today</ard-icon>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"calendarIconTemplate()?.template || defaultCalendarIconTemplate\" />\r\n </ard-icon-button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #dropdownTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-date-input__dropdown-panel\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"true\"\r\n [panelId]=\"htmlId()\"\r\n [compact]=\"compact()\"\r\n (ardClickOutside)=\"onOutsideClick($event)\"\r\n >\r\n <ard-calendar\r\n class=\"ard-date-input__calendar\"\r\n [(activeMonth)]=\"activeMonth\"\r\n [(activeYear)]=\"activeYear\"\r\n [(activeView)]=\"activeView\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [UTC]=\"_UTCAfterInit()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n autoFocus\r\n staticHeight\r\n [multipleYearPageChangeModifier]=\"multipleYearPageChangeModifier()\"\r\n [color]=\"color()\"\r\n [disabled]=\"disabled() || calendarDisabled()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [value]=\"value()\"\r\n [daysViewHeaderDateFormat]=\"calendarDaysViewHeaderDateFormat()\"\r\n [yearsViewHeaderDateFormat]=\"calendarYearsViewHeaderDateFormat()\"\r\n [monthsViewHeaderDateFormat]=\"calendarMonthsViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"calendarWeekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"calendarWeekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"calendarFloatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"calendarFloatingMonthTitleDateFormat()\"\r\n [yearDateFormat]=\"calendarYearDateFormat()\"\r\n [monthDateFormat]=\"calendarMonthDateFormat()\"\r\n [dayDateFormat]=\"calendarDayDateFormat()\"\r\n (valueChange)=\"onCalendarSelectedChange($event)\"\r\n (yearSelect)=\"yearSelect.emit($event)\"\r\n (monthSelect)=\"monthSelect.emit($event)\"\r\n >\r\n <ng-template\r\n _ard-tmp-repository\r\n [daysViewHeaderTmp]=\"calendarDaysViewHeaderTemplate()\"\r\n [yearsViewHeaderTmp]=\"calendarYearsViewHeaderTemplate()\"\r\n [monthsViewHeaderTmp]=\"calendarMonthsViewHeaderTemplate()\"\r\n [weekdayTmp]=\"calendarWeekdayTemplate()\"\r\n [floatingMonthTmp]=\"calendarFloatingMonthTemplate()\"\r\n [yearTmp]=\"calendarYearTemplate()\"\r\n [monthTmp]=\"calendarMonthTemplate()\"\r\n [dayTmp]=\"calendarDayTemplate()\"\r\n />\r\n </ard-calendar>\r\n @if (useAcceptButtonToSelect()) {\r\n <div class=\"ard-date-input__accept-buttons-container\">\r\n <ng-template\r\n #defaultAcceptButtonsTemplate\r\n let-accept=\"accept\"\r\n let-cancel=\"cancel\"\r\n let-disabled=\"disabled\"\r\n >\r\n <ard-button\r\n appearance=\"outlined\"\r\n color=\"none\"\r\n [disabled]=\"disabled\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ cancelButtonText() }}\r\n </ard-button>\r\n <ard-button\r\n appearance=\"raised\"\r\n [color]=\"color()\"\r\n [disabled]=\"disabled\"\r\n (click)=\"accept()\"\r\n >\r\n {{ acceptButtonText() }}\r\n </ard-button>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"acceptButtonsTemplate()?.template || defaultAcceptButtonsTemplate\"\r\n [ngTemplateOutletContext]=\"acceptButtonsContext()\"\r\n />\r\n </div>\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: ["@layer ard-ui{ard-date-input{display:block}.ard-date-input .ard-input-container .ard-date-input__placeholder.ard-date-input__placeholder-hidden,.ard-date-input .ard-input-container .ard-date-input__value.ard-date-input__value-hidden{display:none}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isSuccess", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: ArdiumDropdownPanelComponent, selector: "ard-dropdown-panel", inputs: ["panelId", "headerTemplate", "footerTemplate", "filterValue", "appearance", "variant", "compact", "isOpen"], outputs: ["scroll", "scrollToEnd"] }, { kind: "directive", type: i4.ArdiumClickOutsideDirective, selector: "[ardClickOutside]", outputs: ["ardClickOutside"] }, { kind: "component", type: ArdiumCalendarComponent, selector: "ard-calendar", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: ArdiumIconButtonComponent, selector: "ard-icon-button", inputs: ["wrapperClasses", "type", "ariaLabel", "color", "lightColoring", "compact", "pointerEventsWhenDisabled"] }, { kind: "component", type: ArdiumButtonComponent, selector: "ard-button", inputs: ["variant", "vertical"], outputs: ["focus", "blur"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }, { kind: "directive", type: _CalendarTemplateRepositoryDirective, selector: "ard-calendar > ng-template[_ard-tmp-repository]", inputs: ["daysViewHeaderTmp", "yearsViewHeaderTmp", "monthsViewHeaderTmp", "weekdayTmp", "floatingMonthTmp", "yearTmp", "monthTmp", "dayTmp"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
8752
+ ], queries: [{ propertyName: "calendarDaysViewHeaderTemplate", first: true, predicate: ArdDateInputDaysViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarYearsViewHeaderTemplate", first: true, predicate: ArdDateInputYearsViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarMonthsViewHeaderTemplate", first: true, predicate: ArdDateInputMonthsViewHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarWeekdayTemplate", first: true, predicate: ArdDateInputWeekdayTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarFloatingMonthTemplate", first: true, predicate: ArdDateInputFloatingMonthTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarYearTemplate", first: true, predicate: ArdDateInputYearTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarMonthTemplate", first: true, predicate: ArdDateInputMonthTemplateDirective, descendants: true, isSignal: true }, { propertyName: "calendarDayTemplate", first: true, predicate: ArdDateInputDayTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dateInput", first: true, predicate: ["dateInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [readonly]=\"readonly()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-date-input\"\r\n #dropdownHost\r\n (click)=\"onGeneralClick($event)\"\r\n [class.ard-has-value]=\"!!value()\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-date-input__date-input-focused]=\"isDateInputFocused()\"\r\n >\r\n <div class=\"ard-date-input__value-container ard-input-container\">\r\n <div\r\n class=\"ard-date-input__placeholder ard-placeholder\"\r\n [class.ard-date-input__placeholder-hidden]=\"!shouldDisplayPlaceholder()\"\r\n >\r\n {{ placeholder() }}\r\n </div>\r\n <div\r\n class=\"ard-date-input__value\"\r\n [class.ard-date-input__value-hidden]=\"!shouldDisplayValue()\"\r\n >\r\n <ng-template\r\n #defaultValueTemplate\r\n let-date\r\n >\r\n {{ date }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"valueTemplate()?.template || defaultValueTemplate\"\r\n [ngTemplateOutletContext]=\"valueContext()\"\r\n />\r\n </div>\r\n <div\r\n class=\"ard-date-input__input-container\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-owns]=\"isOpen() ? htmlId() : null\"\r\n [class.ard-date-input__input-container-hidden]=\"!shouldDisplayDateInput()\"\r\n >\r\n <input\r\n #dateInput\r\n #focusableElement\r\n type=\"text\"\r\n class=\"ard-date-input__input\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [value]=\"dateInputValue()\"\r\n [attr.aria-controls]=\"isOpen() ? htmlId() : null\"\r\n (input)=\"onDateInputInput($event)\"\r\n (change)=\"$event.stopPropagation()\"\r\n (focus)=\"onDateInputFocus($event)\"\r\n (blur)=\"onDateInputBlur($event)\"\r\n (keydown)=\"onDateInputEnter($event)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (!calendarHidden()) {\r\n <ard-icon-button\r\n color=\"none\"\r\n [disabled]=\"calendarDisabled()\"\r\n (click)=\"onCalendarButtonClick($event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n >\r\n <ng-template\r\n #defaultCalendarIconTemplate\r\n let-date\r\n >\r\n <ard-icon filled>today</ard-icon>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"calendarIconTemplate()?.template || defaultCalendarIconTemplate\" />\r\n </ard-icon-button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #dropdownTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-date-input__dropdown-panel\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"true\"\r\n [panelId]=\"htmlId()\"\r\n [compact]=\"compact()\"\r\n (ardClickOutside)=\"onOutsideClick($event)\"\r\n >\r\n <ard-calendar\r\n class=\"ard-date-input__calendar\"\r\n [(activeMonth)]=\"activeMonth\"\r\n [(activeYear)]=\"activeYear\"\r\n [(activeView)]=\"activeView\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [UTC]=\"_UTCAfterInit()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n autoFocus\r\n staticHeight\r\n [multipleYearPageChangeModifier]=\"multipleYearPageChangeModifier()\"\r\n [color]=\"color()\"\r\n [disabled]=\"disabled() || calendarDisabled()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [value]=\"value()\"\r\n [daysViewHeaderDateFormat]=\"calendarDaysViewHeaderDateFormat()\"\r\n [yearsViewHeaderDateFormat]=\"calendarYearsViewHeaderDateFormat()\"\r\n [monthsViewHeaderDateFormat]=\"calendarMonthsViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"calendarWeekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"calendarWeekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"calendarFloatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"calendarFloatingMonthTitleDateFormat()\"\r\n [yearDateFormat]=\"calendarYearDateFormat()\"\r\n [monthDateFormat]=\"calendarMonthDateFormat()\"\r\n [dayDateFormat]=\"calendarDayDateFormat()\"\r\n (valueChange)=\"onCalendarSelectedChange($event)\"\r\n (yearSelect)=\"yearSelect.emit($event)\"\r\n (monthSelect)=\"monthSelect.emit($event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n >\r\n <ng-template\r\n _ard-tmp-repository\r\n [daysViewHeaderTmp]=\"calendarDaysViewHeaderTemplate()\"\r\n [yearsViewHeaderTmp]=\"calendarYearsViewHeaderTemplate()\"\r\n [monthsViewHeaderTmp]=\"calendarMonthsViewHeaderTemplate()\"\r\n [weekdayTmp]=\"calendarWeekdayTemplate()\"\r\n [floatingMonthTmp]=\"calendarFloatingMonthTemplate()\"\r\n [yearTmp]=\"calendarYearTemplate()\"\r\n [monthTmp]=\"calendarMonthTemplate()\"\r\n [dayTmp]=\"calendarDayTemplate()\"\r\n />\r\n </ard-calendar>\r\n @if (useAcceptButtonToSelect()) {\r\n <div class=\"ard-date-input__accept-buttons-container\">\r\n <ng-template\r\n #defaultAcceptButtonsTemplate\r\n let-accept=\"accept\"\r\n let-cancel=\"cancel\"\r\n let-disabled=\"disabled\"\r\n >\r\n <ard-button\r\n appearance=\"outlined\"\r\n color=\"none\"\r\n [disabled]=\"disabled\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ cancelButtonText() }}\r\n </ard-button>\r\n <ard-button\r\n appearance=\"raised\"\r\n [color]=\"color()\"\r\n [disabled]=\"disabled\"\r\n (click)=\"accept()\"\r\n >\r\n {{ acceptButtonText() }}\r\n </ard-button>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"acceptButtonsTemplate()?.template || defaultAcceptButtonsTemplate\"\r\n [ngTemplateOutletContext]=\"acceptButtonsContext()\"\r\n />\r\n </div>\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: ["@layer ard-ui{ard-date-input{display:block}.ard-date-input .ard-input-container .ard-date-input__placeholder.ard-date-input__placeholder-hidden,.ard-date-input .ard-input-container .ard-date-input__value.ard-date-input__value-hidden{display:none}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isSuccess", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: ArdiumDropdownPanelComponent, selector: "ard-dropdown-panel", inputs: ["panelId", "headerTemplate", "footerTemplate", "filterValue", "appearance", "variant", "compact", "isOpen"], outputs: ["scroll", "scrollToEnd"] }, { kind: "directive", type: i4.ArdiumClickOutsideDirective, selector: "[ardClickOutside]", outputs: ["ardClickOutside"] }, { kind: "component", type: ArdiumCalendarComponent, selector: "ard-calendar", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: ArdiumIconButtonComponent, selector: "ard-icon-button", inputs: ["wrapperClasses", "type", "ariaLabel", "color", "lightColoring", "compact", "pointerEventsWhenDisabled"] }, { kind: "component", type: ArdiumButtonComponent, selector: "ard-button", inputs: ["variant", "vertical"], outputs: ["focus", "blur"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }, { kind: "directive", type: _CalendarTemplateRepositoryDirective, selector: "ard-calendar > ng-template[_ard-tmp-repository]", inputs: ["daysViewHeaderTmp", "yearsViewHeaderTmp", "monthsViewHeaderTmp", "weekdayTmp", "floatingMonthTmp", "yearTmp", "monthTmp", "dayTmp"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
8731
8753
  }
8732
8754
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumDateInputComponent, decorators: [{
8733
8755
  type: Component,
@@ -8741,7 +8763,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
8741
8763
  provide: ARD_FORM_FIELD_CONTROL,
8742
8764
  useExisting: ArdiumDateInputComponent,
8743
8765
  },
8744
- ], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [readonly]=\"readonly()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-date-input\"\r\n #dropdownHost\r\n (click)=\"onGeneralClick($event)\"\r\n [class.ard-has-value]=\"!!value()\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-date-input__date-input-focused]=\"isDateInputFocused()\"\r\n >\r\n <div class=\"ard-date-input__value-container ard-input-container\">\r\n <div\r\n class=\"ard-date-input__placeholder ard-placeholder\"\r\n [class.ard-date-input__placeholder-hidden]=\"!shouldDisplayPlaceholder()\"\r\n >\r\n {{ placeholder() }}\r\n </div>\r\n <div\r\n class=\"ard-date-input__value\"\r\n [class.ard-date-input__value-hidden]=\"!shouldDisplayValue()\"\r\n >\r\n <ng-template\r\n #defaultValueTemplate\r\n let-date\r\n >\r\n {{ date }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"valueTemplate()?.template || defaultValueTemplate\"\r\n [ngTemplateOutletContext]=\"valueContext()\"\r\n />\r\n </div>\r\n <div\r\n class=\"ard-date-input__input-container\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-owns]=\"isOpen() ? htmlId() : null\"\r\n [class.ard-date-input__input-container-hidden]=\"!shouldDisplayDateInput()\"\r\n >\r\n <input\r\n #dateInput\r\n #focusableElement\r\n type=\"text\"\r\n class=\"ard-date-input__input\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [value]=\"dateInputValue()\"\r\n [attr.aria-controls]=\"isOpen() ? htmlId() : null\"\r\n (input)=\"onDateInputInput($event)\"\r\n (change)=\"$event.stopPropagation()\"\r\n (focus)=\"onDateInputFocus($event)\"\r\n (blur)=\"onDateInputBlur($event)\"\r\n (keydown)=\"onDateInputEnter($event)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (!calendarHidden()) {\r\n <ard-icon-button\r\n color=\"none\"\r\n [disabled]=\"calendarDisabled()\"\r\n (click)=\"onCalendarButtonClick($event)\"\r\n >\r\n <ng-template\r\n #defaultCalendarIconTemplate\r\n let-date\r\n >\r\n <ard-icon filled>today</ard-icon>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"calendarIconTemplate()?.template || defaultCalendarIconTemplate\" />\r\n </ard-icon-button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #dropdownTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-date-input__dropdown-panel\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"true\"\r\n [panelId]=\"htmlId()\"\r\n [compact]=\"compact()\"\r\n (ardClickOutside)=\"onOutsideClick($event)\"\r\n >\r\n <ard-calendar\r\n class=\"ard-date-input__calendar\"\r\n [(activeMonth)]=\"activeMonth\"\r\n [(activeYear)]=\"activeYear\"\r\n [(activeView)]=\"activeView\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [UTC]=\"_UTCAfterInit()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n autoFocus\r\n staticHeight\r\n [multipleYearPageChangeModifier]=\"multipleYearPageChangeModifier()\"\r\n [color]=\"color()\"\r\n [disabled]=\"disabled() || calendarDisabled()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [value]=\"value()\"\r\n [daysViewHeaderDateFormat]=\"calendarDaysViewHeaderDateFormat()\"\r\n [yearsViewHeaderDateFormat]=\"calendarYearsViewHeaderDateFormat()\"\r\n [monthsViewHeaderDateFormat]=\"calendarMonthsViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"calendarWeekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"calendarWeekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"calendarFloatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"calendarFloatingMonthTitleDateFormat()\"\r\n [yearDateFormat]=\"calendarYearDateFormat()\"\r\n [monthDateFormat]=\"calendarMonthDateFormat()\"\r\n [dayDateFormat]=\"calendarDayDateFormat()\"\r\n (valueChange)=\"onCalendarSelectedChange($event)\"\r\n (yearSelect)=\"yearSelect.emit($event)\"\r\n (monthSelect)=\"monthSelect.emit($event)\"\r\n >\r\n <ng-template\r\n _ard-tmp-repository\r\n [daysViewHeaderTmp]=\"calendarDaysViewHeaderTemplate()\"\r\n [yearsViewHeaderTmp]=\"calendarYearsViewHeaderTemplate()\"\r\n [monthsViewHeaderTmp]=\"calendarMonthsViewHeaderTemplate()\"\r\n [weekdayTmp]=\"calendarWeekdayTemplate()\"\r\n [floatingMonthTmp]=\"calendarFloatingMonthTemplate()\"\r\n [yearTmp]=\"calendarYearTemplate()\"\r\n [monthTmp]=\"calendarMonthTemplate()\"\r\n [dayTmp]=\"calendarDayTemplate()\"\r\n />\r\n </ard-calendar>\r\n @if (useAcceptButtonToSelect()) {\r\n <div class=\"ard-date-input__accept-buttons-container\">\r\n <ng-template\r\n #defaultAcceptButtonsTemplate\r\n let-accept=\"accept\"\r\n let-cancel=\"cancel\"\r\n let-disabled=\"disabled\"\r\n >\r\n <ard-button\r\n appearance=\"outlined\"\r\n color=\"none\"\r\n [disabled]=\"disabled\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ cancelButtonText() }}\r\n </ard-button>\r\n <ard-button\r\n appearance=\"raised\"\r\n [color]=\"color()\"\r\n [disabled]=\"disabled\"\r\n (click)=\"accept()\"\r\n >\r\n {{ acceptButtonText() }}\r\n </ard-button>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"acceptButtonsTemplate()?.template || defaultAcceptButtonsTemplate\"\r\n [ngTemplateOutletContext]=\"acceptButtonsContext()\"\r\n />\r\n </div>\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: ["@layer ard-ui{ard-date-input{display:block}.ard-date-input .ard-input-container .ard-date-input__placeholder.ard-date-input__placeholder-hidden,.ard-date-input .ard-input-container .ard-date-input__value.ard-date-input__value-hidden{display:none}}\n"] }]
8766
+ ], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [readonly]=\"readonly()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-date-input\"\r\n #dropdownHost\r\n (click)=\"onGeneralClick($event)\"\r\n [class.ard-has-value]=\"!!value()\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-date-input__date-input-focused]=\"isDateInputFocused()\"\r\n >\r\n <div class=\"ard-date-input__value-container ard-input-container\">\r\n <div\r\n class=\"ard-date-input__placeholder ard-placeholder\"\r\n [class.ard-date-input__placeholder-hidden]=\"!shouldDisplayPlaceholder()\"\r\n >\r\n {{ placeholder() }}\r\n </div>\r\n <div\r\n class=\"ard-date-input__value\"\r\n [class.ard-date-input__value-hidden]=\"!shouldDisplayValue()\"\r\n >\r\n <ng-template\r\n #defaultValueTemplate\r\n let-date\r\n >\r\n {{ date }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"valueTemplate()?.template || defaultValueTemplate\"\r\n [ngTemplateOutletContext]=\"valueContext()\"\r\n />\r\n </div>\r\n <div\r\n class=\"ard-date-input__input-container\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-owns]=\"isOpen() ? htmlId() : null\"\r\n [class.ard-date-input__input-container-hidden]=\"!shouldDisplayDateInput()\"\r\n >\r\n <input\r\n #dateInput\r\n #focusableElement\r\n type=\"text\"\r\n class=\"ard-date-input__input\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [value]=\"dateInputValue()\"\r\n [attr.aria-controls]=\"isOpen() ? htmlId() : null\"\r\n (input)=\"onDateInputInput($event)\"\r\n (change)=\"$event.stopPropagation()\"\r\n (focus)=\"onDateInputFocus($event)\"\r\n (blur)=\"onDateInputBlur($event)\"\r\n (keydown)=\"onDateInputEnter($event)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (!calendarHidden()) {\r\n <ard-icon-button\r\n color=\"none\"\r\n [disabled]=\"calendarDisabled()\"\r\n (click)=\"onCalendarButtonClick($event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n >\r\n <ng-template\r\n #defaultCalendarIconTemplate\r\n let-date\r\n >\r\n <ard-icon filled>today</ard-icon>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"calendarIconTemplate()?.template || defaultCalendarIconTemplate\" />\r\n </ard-icon-button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #dropdownTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-date-input__dropdown-panel\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"true\"\r\n [panelId]=\"htmlId()\"\r\n [compact]=\"compact()\"\r\n (ardClickOutside)=\"onOutsideClick($event)\"\r\n >\r\n <ard-calendar\r\n class=\"ard-date-input__calendar\"\r\n [(activeMonth)]=\"activeMonth\"\r\n [(activeYear)]=\"activeYear\"\r\n [(activeView)]=\"activeView\"\r\n [firstWeekday]=\"firstWeekday()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [UTC]=\"_UTCAfterInit()\"\r\n [hideFloatingMonth]=\"hideFloatingMonth()\"\r\n autoFocus\r\n staticHeight\r\n [multipleYearPageChangeModifier]=\"multipleYearPageChangeModifier()\"\r\n [color]=\"color()\"\r\n [disabled]=\"disabled() || calendarDisabled()\"\r\n [tabIndex]=\"tabIndex()\"\r\n [value]=\"value()\"\r\n [daysViewHeaderDateFormat]=\"calendarDaysViewHeaderDateFormat()\"\r\n [yearsViewHeaderDateFormat]=\"calendarYearsViewHeaderDateFormat()\"\r\n [monthsViewHeaderDateFormat]=\"calendarMonthsViewHeaderDateFormat()\"\r\n [weekdayDateFormat]=\"calendarWeekdayDateFormat()\"\r\n [weekdayTitleDateFormat]=\"calendarWeekdayTitleDateFormat()\"\r\n [floatingMonthDateFormat]=\"calendarFloatingMonthDateFormat()\"\r\n [floatingMonthTitleDateFormat]=\"calendarFloatingMonthTitleDateFormat()\"\r\n [yearDateFormat]=\"calendarYearDateFormat()\"\r\n [monthDateFormat]=\"calendarMonthDateFormat()\"\r\n [dayDateFormat]=\"calendarDayDateFormat()\"\r\n (valueChange)=\"onCalendarSelectedChange($event)\"\r\n (yearSelect)=\"yearSelect.emit($event)\"\r\n (monthSelect)=\"monthSelect.emit($event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n >\r\n <ng-template\r\n _ard-tmp-repository\r\n [daysViewHeaderTmp]=\"calendarDaysViewHeaderTemplate()\"\r\n [yearsViewHeaderTmp]=\"calendarYearsViewHeaderTemplate()\"\r\n [monthsViewHeaderTmp]=\"calendarMonthsViewHeaderTemplate()\"\r\n [weekdayTmp]=\"calendarWeekdayTemplate()\"\r\n [floatingMonthTmp]=\"calendarFloatingMonthTemplate()\"\r\n [yearTmp]=\"calendarYearTemplate()\"\r\n [monthTmp]=\"calendarMonthTemplate()\"\r\n [dayTmp]=\"calendarDayTemplate()\"\r\n />\r\n </ard-calendar>\r\n @if (useAcceptButtonToSelect()) {\r\n <div class=\"ard-date-input__accept-buttons-container\">\r\n <ng-template\r\n #defaultAcceptButtonsTemplate\r\n let-accept=\"accept\"\r\n let-cancel=\"cancel\"\r\n let-disabled=\"disabled\"\r\n >\r\n <ard-button\r\n appearance=\"outlined\"\r\n color=\"none\"\r\n [disabled]=\"disabled\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ cancelButtonText() }}\r\n </ard-button>\r\n <ard-button\r\n appearance=\"raised\"\r\n [color]=\"color()\"\r\n [disabled]=\"disabled\"\r\n (click)=\"accept()\"\r\n >\r\n {{ acceptButtonText() }}\r\n </ard-button>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"acceptButtonsTemplate()?.template || defaultAcceptButtonsTemplate\"\r\n [ngTemplateOutletContext]=\"acceptButtonsContext()\"\r\n />\r\n </div>\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: ["@layer ard-ui{ard-date-input{display:block}.ard-date-input .ard-input-container .ard-date-input__placeholder.ard-date-input__placeholder-hidden,.ard-date-input .ard-input-container .ard-date-input__value.ard-date-input__value-hidden{display:none}}\n"] }]
8745
8767
  }], ctorParameters: () => [{ type: undefined, decorators: [{
8746
8768
  type: Inject,
8747
8769
  args: [ARD_DATE_INPUT_DEFAULTS]