aeb-ui-kit 10.0.0-preview.1198 → 10.0.0-preview.1202

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';
@@ -2484,10 +2484,6 @@ class Dropdown {
2484
2484
  return;
2485
2485
  }
2486
2486
  this._value.set(value);
2487
- const selected = this._selectedOption();
2488
- if (selected) {
2489
- this.optionSelect.emit(selected);
2490
- }
2491
2487
  }
2492
2488
  registerOnChange(fn) {
2493
2489
  this.onChange = fn;
@@ -2707,11 +2703,11 @@ class Dropdown {
2707
2703
  }
2708
2704
  selectOption(optionValue) {
2709
2705
  const match = this.options().find((item) => item.value === optionValue);
2710
- if (match) {
2711
- this.valueLabel.set(match.label);
2712
- }
2713
- this._value.set(optionValue);
2714
- this.onChange(this._selectedOption());
2706
+ this._value.set(match.value);
2707
+ this.valueLabel.set(match.label);
2708
+ this._selectedOption.set(match);
2709
+ this.onChange(match);
2710
+ this.optionSelect.emit(match);
2715
2711
  this.dropdownIsOpen.set(false);
2716
2712
  }
2717
2713
  handleValueWithOptions(fieldValue, options) {
@@ -2746,7 +2742,7 @@ class Dropdown {
2746
2742
  onChange(_) { }
2747
2743
  onTouch() { }
2748
2744
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: Dropdown, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2749
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.12", type: Dropdown, isStandalone: true, selector: "aeb-dropdown", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, errorMessageText: { classPropertyName: "errorMessageText", publicName: "errorMessageText", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, validateOnDirty: { classPropertyName: "validateOnDirty", publicName: "validateOnDirty", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { optionSelect: "optionSelect", inputChange: "inputChange" }, host: { listeners: { "keydown.tab": "keydownTabHandler()", "clickOutside": "clickOutsideHandler()" }, classAttribute: "aeb-dropdown" }, viewQueries: [{ propertyName: "_formFieldRef", first: true, predicate: FormField, descendants: true, isSignal: true }, { propertyName: "_dropdownMenuRef", first: true, predicate: DropdownMenu, descendants: true, isSignal: true }], hostDirectives: [{ directive: ClickOutsideDirective, outputs: ["clickOutside", "clickOutside"] }], ngImport: i0, template: "<aeb-form-field [isInvalid]=\"hasError()\" [disabled]=\"disabled()\">\n <label aebLabel>{{ label() }}</label>\n <input\n aebInput\n type=\"text\"\n [ngModel]=\"valueLabel()\"\n (ngModelChange)=\"valueLabel.set($event)\"\n (input)=\"inputHandler($event)\"\n (keydown)=\"onInputKeyDown($event)\"\n (keydown.tab)=\"clickInput()\"\n (focus)=\"clickInput()\"\n />\n <aeb-dropdown-menu\n [options]=\"filteredOptions()\"\n [isOpen]=\"dropdownIsOpen()\"\n (optionSelect)=\"selectHandler($event)\"\n ></aeb-dropdown-menu>\n <label [errorMessage]>{{ errorMessageText() }}</label>\n</aeb-form-field>\n\n<div\n class=\"aeb-dropdown__icon\"\n [ngClass]=\"{\n 'aeb-dropdown__icon--is-open': dropdownIsOpen()\n }\"\n (click)=\"openHandler()\"\n>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 10L11.9293 13.9293C11.9683 13.9683 12.0317 13.9683 12.0707 13.9293L16 10\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n", styles: [".aeb-dropdown{position:relative;width:100%}.aeb-dropdown__icon{position:absolute;top:16px;right:16px;display:flex;align-items:center;justify-content:center;cursor:pointer}.aeb-dropdown__icon svg{transition:transform,.2s}.aeb-dropdown__icon--is-open svg{transform:rotate(180deg)}\n"], dependencies: [{ kind: "component", type: FormField, selector: "aeb-form-field", inputs: ["showDescription", "showErrorMessage", "disabled", "isInvalid", "showIcon", "validateOnDirty"] }, { kind: "directive", type: LabelDirective, selector: "[aebLabel]", inputs: ["aebLabel"] }, { kind: "directive", type: FormFieldDirective, selector: "input[aebInput], textarea[aebTextarea]", inputs: ["value"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownMenu, selector: "aeb-dropdown-menu", inputs: ["isOpen", "direction", "maxShownOptions", "optionSize", "options", "selectedOption"], outputs: ["outsideClick", "optionSelect"] }, { kind: "directive", type: ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2745
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.12", type: Dropdown, isStandalone: true, selector: "aeb-dropdown", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, errorMessageText: { classPropertyName: "errorMessageText", publicName: "errorMessageText", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, validateOnDirty: { classPropertyName: "validateOnDirty", publicName: "validateOnDirty", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { optionSelect: "optionSelect", inputChange: "inputChange" }, host: { listeners: { "keydown.tab": "keydownTabHandler()", "clickOutside": "clickOutsideHandler()" }, classAttribute: "aeb-dropdown" }, viewQueries: [{ propertyName: "_formFieldRef", first: true, predicate: FormField, descendants: true, isSignal: true }, { propertyName: "_dropdownMenuRef", first: true, predicate: DropdownMenu, descendants: true, isSignal: true }], hostDirectives: [{ directive: ClickOutsideDirective, outputs: ["clickOutside", "clickOutside"] }], ngImport: i0, template: "<aeb-form-field [isInvalid]=\"hasError()\" [disabled]=\"disabled()\">\n <label aebLabel>{{ label() }}</label>\n <input\n aebInput\n type=\"text\"\n [readonly]=\"!filter()\"\n [ngModel]=\"valueLabel()\"\n (ngModelChange)=\"valueLabel.set($event)\"\n (input)=\"inputHandler($event)\"\n (keydown)=\"onInputKeyDown($event)\"\n (keydown.tab)=\"clickInput()\"\n (focus)=\"clickInput()\"\n />\n <aeb-dropdown-menu\n [options]=\"filteredOptions()\"\n [isOpen]=\"dropdownIsOpen()\"\n (optionSelect)=\"selectHandler($event)\"\n ></aeb-dropdown-menu>\n <label [errorMessage]>{{ errorMessageText() }}</label>\n</aeb-form-field>\n\n<div\n class=\"aeb-dropdown__icon\"\n [ngClass]=\"{\n 'aeb-dropdown__icon--is-open': dropdownIsOpen()\n }\"\n (click)=\"openHandler()\"\n>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 10L11.9293 13.9293C11.9683 13.9683 12.0317 13.9683 12.0707 13.9293L16 10\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n", styles: [".aeb-dropdown{position:relative;width:100%}.aeb-dropdown__icon{position:absolute;top:16px;right:16px;display:flex;align-items:center;justify-content:center;cursor:pointer}.aeb-dropdown__icon svg{transition:transform,.2s}.aeb-dropdown__icon--is-open svg{transform:rotate(180deg)}\n"], dependencies: [{ kind: "component", type: FormField, selector: "aeb-form-field", inputs: ["showDescription", "showErrorMessage", "disabled", "isInvalid", "showIcon", "validateOnDirty"] }, { kind: "directive", type: LabelDirective, selector: "[aebLabel]", inputs: ["aebLabel"] }, { kind: "directive", type: FormFieldDirective, selector: "input[aebInput], textarea[aebTextarea]", inputs: ["value"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownMenu, selector: "aeb-dropdown-menu", inputs: ["isOpen", "direction", "maxShownOptions", "optionSize", "options", "selectedOption"], outputs: ["outsideClick", "optionSelect"] }, { kind: "directive", type: ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2750
2746
  }
2751
2747
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: Dropdown, decorators: [{
2752
2748
  type: Component,
@@ -2767,7 +2763,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
2767
2763
  class: 'aeb-dropdown',
2768
2764
  '(keydown.tab)': 'keydownTabHandler()',
2769
2765
  '(clickOutside)': 'clickOutsideHandler()'
2770
- }, template: "<aeb-form-field [isInvalid]=\"hasError()\" [disabled]=\"disabled()\">\n <label aebLabel>{{ label() }}</label>\n <input\n aebInput\n type=\"text\"\n [ngModel]=\"valueLabel()\"\n (ngModelChange)=\"valueLabel.set($event)\"\n (input)=\"inputHandler($event)\"\n (keydown)=\"onInputKeyDown($event)\"\n (keydown.tab)=\"clickInput()\"\n (focus)=\"clickInput()\"\n />\n <aeb-dropdown-menu\n [options]=\"filteredOptions()\"\n [isOpen]=\"dropdownIsOpen()\"\n (optionSelect)=\"selectHandler($event)\"\n ></aeb-dropdown-menu>\n <label [errorMessage]>{{ errorMessageText() }}</label>\n</aeb-form-field>\n\n<div\n class=\"aeb-dropdown__icon\"\n [ngClass]=\"{\n 'aeb-dropdown__icon--is-open': dropdownIsOpen()\n }\"\n (click)=\"openHandler()\"\n>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 10L11.9293 13.9293C11.9683 13.9683 12.0317 13.9683 12.0707 13.9293L16 10\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n", styles: [".aeb-dropdown{position:relative;width:100%}.aeb-dropdown__icon{position:absolute;top:16px;right:16px;display:flex;align-items:center;justify-content:center;cursor:pointer}.aeb-dropdown__icon svg{transition:transform,.2s}.aeb-dropdown__icon--is-open svg{transform:rotate(180deg)}\n"] }]
2766
+ }, template: "<aeb-form-field [isInvalid]=\"hasError()\" [disabled]=\"disabled()\">\n <label aebLabel>{{ label() }}</label>\n <input\n aebInput\n type=\"text\"\n [readonly]=\"!filter()\"\n [ngModel]=\"valueLabel()\"\n (ngModelChange)=\"valueLabel.set($event)\"\n (input)=\"inputHandler($event)\"\n (keydown)=\"onInputKeyDown($event)\"\n (keydown.tab)=\"clickInput()\"\n (focus)=\"clickInput()\"\n />\n <aeb-dropdown-menu\n [options]=\"filteredOptions()\"\n [isOpen]=\"dropdownIsOpen()\"\n (optionSelect)=\"selectHandler($event)\"\n ></aeb-dropdown-menu>\n <label [errorMessage]>{{ errorMessageText() }}</label>\n</aeb-form-field>\n\n<div\n class=\"aeb-dropdown__icon\"\n [ngClass]=\"{\n 'aeb-dropdown__icon--is-open': dropdownIsOpen()\n }\"\n (click)=\"openHandler()\"\n>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 10L11.9293 13.9293C11.9683 13.9683 12.0317 13.9683 12.0707 13.9293L16 10\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n", styles: [".aeb-dropdown{position:relative;width:100%}.aeb-dropdown__icon{position:absolute;top:16px;right:16px;display:flex;align-items:center;justify-content:center;cursor:pointer}.aeb-dropdown__icon svg{transition:transform,.2s}.aeb-dropdown__icon--is-open svg{transform:rotate(180deg)}\n"] }]
2771
2767
  }], ctorParameters: () => [], propDecorators: { _formFieldRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FormField), { isSignal: true }] }], _dropdownMenuRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DropdownMenu), { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], errorMessageText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessageText", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], hasError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasError", required: false }] }], validateOnDirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "validateOnDirty", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], optionSelect: [{ type: i0.Output, args: ["optionSelect"] }], inputChange: [{ type: i0.Output, args: ["inputChange"] }] } });
2772
2768
 
2773
2769
  class DropdownModule {
@@ -4917,6 +4913,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
4917
4913
 
4918
4914
  class Tabs {
4919
4915
  constructor() {
4916
+ this.changeDetectorRef = inject(ChangeDetectorRef);
4920
4917
  this.tabs = contentChildren(TabDirective, ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
4921
4918
  this.templateTabs = viewChildren('rtab', ...(ngDevMode ? [{ debugName: "templateTabs" }] : /* istanbul ignore next */ []));
4922
4919
  this.thumb = viewChild('thumb', ...(ngDevMode ? [{ debugName: "thumb" }] : /* istanbul ignore next */ []));
@@ -4955,6 +4952,7 @@ class Tabs {
4955
4952
  const tab = this.tab();
4956
4953
  if (String(tab) && !this.collapsed()) {
4957
4954
  this.switchTab(tab);
4955
+ this.changeDetectorRef.markForCheck();
4958
4956
  }
4959
4957
  });
4960
4958
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aeb-ui-kit",
3
- "version": "10.0.0-preview.1198",
3
+ "version": "10.0.0-preview.1202",
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>;