aeb-ui-kit 10.0.0-preview.1200 → 10.0.0-preview.1204

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, viewChild, input, computed, effect, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule, Directive, inject, ElementRef, contentChild, output, forwardRef, Input, EnvironmentInjector, ApplicationRef, RendererFactory2, createComponent, Injectable, Renderer2, DestroyRef, Pipe, viewChildren, LOCALE_ID, contentChildren, TemplateRef, Injector } from '@angular/core';
2
+ import { signal, viewChild, input, computed, effect, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule, Directive, inject, ElementRef, contentChild, output, forwardRef, Input, EnvironmentInjector, ApplicationRef, RendererFactory2, createComponent, Injectable, Renderer2, DestroyRef, Pipe, viewChildren, LOCALE_ID, contentChildren, TemplateRef, ChangeDetectorRef, Injector } from '@angular/core';
3
3
  import { NgClass, DOCUMENT, TitleCasePipe, DatePipe, NgStyle, NgTemplateOutlet, DecimalPipe, formatDate, formatNumber } from '@angular/common';
4
4
  import * as i1 from '@angular/forms';
5
5
  import { NG_VALUE_ACCESSOR, FormBuilder, FormControl, Validators, FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
@@ -2095,8 +2095,9 @@ class Datepicker {
2095
2095
  if (!erase) {
2096
2096
  this.inputValue = targetDate;
2097
2097
  this.lastValidInput = this.inputValue;
2098
- this.writeValue(new Date(this.woDaysYear, this.woDaysMonth, 1));
2099
- this._onChange(new Date(this.woDaysYear, this.woDaysMonth, 1));
2098
+ const date = new Date(this.woDaysYear, this.woDaysMonth, 1);
2099
+ this.writeValue(date);
2100
+ this.emitDateChange(date);
2100
2101
  }
2101
2102
  }
2102
2103
  woDaysYearSet(value) {
@@ -2124,8 +2125,9 @@ class Datepicker {
2124
2125
  if (!erase) {
2125
2126
  this.inputValue = targetDate;
2126
2127
  this.lastValidInput = this.inputValue;
2127
- this.writeValue(new Date(this.woDaysYear, this.woDaysMonth, 1));
2128
- this._onChange(new Date(this.woDaysYear, this.woDaysMonth, 1));
2128
+ const date = new Date(this.woDaysYear, this.woDaysMonth, 1);
2129
+ this.writeValue(date);
2130
+ this.emitDateChange(date);
2129
2131
  }
2130
2132
  }
2131
2133
  isExcluded(date) {
@@ -2145,7 +2147,7 @@ class Datepicker {
2145
2147
  // Handle empty input
2146
2148
  if (!eventValue || eventValue.trim() === '') {
2147
2149
  this.writeValue(null);
2148
- this._onChange(null);
2150
+ this.emitDateChange(null);
2149
2151
  this.core()?.setMonth(this._utils.getMonth(new Date()), true);
2150
2152
  this.core()?.setYear(this._utils.getYear(new Date()), true);
2151
2153
  return;
@@ -2183,7 +2185,7 @@ class Datepicker {
2183
2185
  this.core()?.setYear(this._utils.getYear(parsedDate));
2184
2186
  // Emit the change
2185
2187
  this.writeValue(parsedDate);
2186
- this._onChange(parsedDate);
2188
+ this.emitDateChange(parsedDate);
2187
2189
  }
2188
2190
  handleOpen() {
2189
2191
  this.isOpen = !this.isOpen;
@@ -2197,7 +2199,7 @@ class Datepicker {
2197
2199
  this.lastValidInput = this.inputValue;
2198
2200
  this.internalDate = date;
2199
2201
  this.writeValue(date);
2200
- this._onChange(date);
2202
+ this.emitDateChange(date);
2201
2203
  if (this.collapseOnChange()) {
2202
2204
  this.isOpen = false;
2203
2205
  }
@@ -2229,6 +2231,10 @@ class Datepicker {
2229
2231
  setDisabledState(disabled) {
2230
2232
  this.disabled = disabled;
2231
2233
  }
2234
+ emitDateChange(value) {
2235
+ this._onChange(value);
2236
+ this.dateChange.emit(value);
2237
+ }
2232
2238
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: Datepicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2233
2239
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.12", type: Datepicker, isStandalone: true, selector: "aeb-datepicker", inputs: { hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, excludedDates: { classPropertyName: "excludedDates", publicName: "excludedDates", isSignal: true, isRequired: false, transformFunction: null }, minYear: { classPropertyName: "minYear", publicName: "minYear", isSignal: true, isRequired: false, transformFunction: null }, maxYear: { classPropertyName: "maxYear", publicName: "maxYear", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, collapseOnChange: { classPropertyName: "collapseOnChange", publicName: "collapseOnChange", isSignal: true, isRequired: false, transformFunction: null }, withoutDays: { classPropertyName: "withoutDays", publicName: "withoutDays", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange" }, host: { listeners: { "clickOutside": "clickOutsideHandler()" }, properties: { "class.aeb-datepicker": "true", "class.aeb-datepicker--disabled": "disabled" } }, providers: [
2234
2240
  {
@@ -4913,6 +4919,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
4913
4919
 
4914
4920
  class Tabs {
4915
4921
  constructor() {
4922
+ this.changeDetectorRef = inject(ChangeDetectorRef);
4916
4923
  this.tabs = contentChildren(TabDirective, ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
4917
4924
  this.templateTabs = viewChildren('rtab', ...(ngDevMode ? [{ debugName: "templateTabs" }] : /* istanbul ignore next */ []));
4918
4925
  this.thumb = viewChild('thumb', ...(ngDevMode ? [{ debugName: "thumb" }] : /* istanbul ignore next */ []));
@@ -4951,6 +4958,7 @@ class Tabs {
4951
4958
  const tab = this.tab();
4952
4959
  if (String(tab) && !this.collapsed()) {
4953
4960
  this.switchTab(tab);
4961
+ this.changeDetectorRef.markForCheck();
4954
4962
  }
4955
4963
  });
4956
4964
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aeb-ui-kit",
3
- "version": "10.0.0-preview.1200",
3
+ "version": "10.0.0-preview.1204",
4
4
  "exports": {
5
5
  "./styles.css": {
6
6
  "default": "./styles.css"
@@ -693,6 +693,7 @@ declare class TabDirective {
693
693
  }
694
694
 
695
695
  declare class Tabs implements AfterViewInit, OnChanges {
696
+ private readonly changeDetectorRef;
696
697
  readonly tabs: _angular_core.Signal<readonly TabDirective[]>;
697
698
  readonly templateTabs: _angular_core.Signal<readonly ElementRef<HTMLDivElement>[]>;
698
699
  readonly thumb: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
@@ -926,6 +927,7 @@ declare class Datepicker implements OnInit, ControlValueAccessor {
926
927
  registerOnTouched(fn: () => void): void;
927
928
  registerOnChange(fn: (_: Date | null) => void): void;
928
929
  setDisabledState(disabled: boolean): void;
930
+ private emitDateChange;
929
931
  private _onTouch;
930
932
  private _onChange;
931
933
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Datepicker, never>;