@recursyve/nice-ui-kit.v2 13.2.0-beta.97 → 13.2.0-beta.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/esm2020/lib/components/alert/alert.component.mjs +22 -10
  2. package/esm2020/lib/components/alert/alert.types.mjs +1 -1
  3. package/esm2020/lib/components/async-typeahead/async-typeahead.component.mjs +9 -5
  4. package/esm2020/lib/components/base-form/base-form.component.mjs +14 -3
  5. package/esm2020/lib/components/toast/toast.component.mjs +1 -1
  6. package/esm2020/lib/directives/chip-async-typeahead/chip-async-typeahead.directive.mjs +39 -0
  7. package/esm2020/lib/directives/chip-async-typeahead/index.mjs +2 -0
  8. package/esm2020/lib/directives/chip-async-typeahead/public-api.mjs +2 -0
  9. package/esm2020/lib/directives/chip-list/chip-list-items/chip-list-item-label.directive.mjs +14 -0
  10. package/esm2020/lib/directives/chip-list/chip-list-items/chip-list-items.component.mjs +32 -0
  11. package/esm2020/lib/directives/chip-list/chip-list.directive.mjs +100 -0
  12. package/esm2020/lib/directives/chip-list/chip-list.module.mjs +21 -0
  13. package/esm2020/lib/directives/chip-list/index.mjs +2 -0
  14. package/esm2020/lib/directives/chip-list/public-api.mjs +5 -0
  15. package/esm2020/lib/directives/public-api.mjs +3 -2
  16. package/fesm2015/recursyve-nice-ui-kit.v2.mjs +210 -16
  17. package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
  18. package/fesm2020/recursyve-nice-ui-kit.v2.mjs +217 -16
  19. package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
  20. package/lib/components/alert/alert.component.d.ts +3 -2
  21. package/lib/components/alert/alert.types.d.ts +1 -0
  22. package/lib/components/async-typeahead/async-typeahead.component.d.ts +3 -2
  23. package/lib/components/base-form/base-form.component.d.ts +1 -0
  24. package/lib/directives/chip-async-typeahead/chip-async-typeahead.directive.d.ts +14 -0
  25. package/lib/directives/chip-async-typeahead/index.d.ts +1 -0
  26. package/lib/directives/chip-async-typeahead/public-api.d.ts +1 -0
  27. package/lib/directives/chip-list/chip-list-items/chip-list-item-label.directive.d.ts +8 -0
  28. package/lib/directives/chip-list/chip-list-items/chip-list-items.component.d.ts +14 -0
  29. package/lib/directives/chip-list/chip-list.directive.d.ts +27 -0
  30. package/lib/directives/chip-list/chip-list.module.d.ts +11 -0
  31. package/lib/directives/chip-list/index.d.ts +1 -0
  32. package/lib/directives/chip-list/public-api.d.ts +4 -0
  33. package/lib/directives/public-api.d.ts +2 -1
  34. package/package.json +1 -1
  35. package/src/lib/components/chip-list/chip-list.theme.scss +14 -0
  36. package/src/lib/components/chip-list/components/item-list/item-list.theme.scss +37 -0
  37. package/src/lib/directives/chip-list/chip-list-items/chip-list-items.theme.scss +35 -0
  38. package/src/lib/nice.theme.scss +5 -0
@@ -2,7 +2,7 @@ import * as i1$7 from '@angular/animations';
2
2
  import { animation, style, animate, trigger, transition, useAnimation, state, keyframes } from '@angular/animations';
3
3
  import { HttpContextToken, HttpResponse, HttpContext, HttpParams } from '@angular/common/http';
4
4
  import * as i0 from '@angular/core';
5
- import { Injectable, NgModule, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, HostBinding, InjectionToken, Directive, HostListener, forwardRef, Optional, Inject, ViewChild, ViewChildren, Self, Pipe, ElementRef, PLATFORM_ID, TemplateRef, ContentChildren, SkipSelf } from '@angular/core';
5
+ import { Injectable, NgModule, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, HostBinding, InjectionToken, Directive, HostListener, forwardRef, Optional, Inject, ViewChild, ViewChildren, Self, Pipe, ElementRef, PLATFORM_ID, TemplateRef, ContentChildren, ContentChild, SkipSelf } from '@angular/core';
6
6
  import { plainToInstance } from 'class-transformer';
7
7
  import { map, filter, takeUntil, tap, take, debounceTime as debounceTime$1, delay, switchMap } from 'rxjs/operators';
8
8
  import { catchError, ReplaySubject, Subject, BehaviorSubject, mergeMap, from, isObservable, firstValueFrom, debounceTime, distinctUntilChanged, startWith, tap as tap$1, Observable, combineLatest, fromEvent, merge as merge$1 } from 'rxjs';
@@ -796,14 +796,7 @@ class NiceAlertComponent {
796
796
  * Host binding for component classes
797
797
  */
798
798
  get classList() {
799
- return {
800
- "nice-alert-appearance-border": this.appearance === "border",
801
- "nice-alert-appearance-fill": this.appearance === "fill",
802
- "nice-alert-appearance-outline": this.appearance === "outline",
803
- "nice-alert-appearance-soft": this.appearance === "soft",
804
- "nice-alert-dismissed": this.dismissed,
805
- "nice-alert-dismissible": this.dismissible,
806
- "nice-alert-show-icon": this.showIcon,
799
+ let types = {
807
800
  "nice-alert-type-primary": this.type === "primary",
808
801
  "nice-alert-type-accent": this.type === "accent",
809
802
  "nice-alert-type-warn": this.type === "warn",
@@ -813,6 +806,23 @@ class NiceAlertComponent {
813
806
  "nice-alert-type-warning": this.type === "warning",
814
807
  "nice-alert-type-error": this.type === "error"
815
808
  };
809
+ if (this.color) {
810
+ types = {
811
+ "nice-alert-type-primary": this.color === "primary",
812
+ "nice-alert-type-accent": this.color === "accent",
813
+ "nice-alert-type-warn": this.color === "warn"
814
+ };
815
+ }
816
+ return {
817
+ "nice-alert-appearance-border": this.appearance === "border",
818
+ "nice-alert-appearance-fill": this.appearance === "fill",
819
+ "nice-alert-appearance-outline": this.appearance === "outline",
820
+ "nice-alert-appearance-soft": this.appearance === "soft",
821
+ "nice-alert-dismissed": this.dismissed,
822
+ "nice-alert-dismissible": this.dismissible,
823
+ "nice-alert-show-icon": this.showIcon,
824
+ ...types
825
+ };
816
826
  }
817
827
  // -----------------------------------------------------------------------------------------------------
818
828
  // @ Lifecycle hooks
@@ -921,7 +931,7 @@ class NiceAlertComponent {
921
931
  }
922
932
  }
923
933
  NiceAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceAlertComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: NiceAlertService }, { token: NiceUtilsService }], target: i0.ɵɵFactoryTarget.Component });
924
- NiceAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceAlertComponent, selector: "nice-alert", inputs: { appearance: "appearance", dismissed: "dismissed", dismissible: "dismissible", disableAnimation: "disableAnimation", name: "name", showIcon: "showIcon", type: "type" }, outputs: { dismissedChanged: "dismissedChanged" }, host: { properties: { "class": "this.classList" } }, exportAs: ["niceAlert"], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"nice-alert-container\"\n *ngIf=\"!dismissible || dismissible && !dismissed\"\n [@fadeIn]=\"!dismissed && !disableAnimation\"\n [@fadeOut]=\"!dismissed && !disableAnimation\">\n\n <!-- Border -->\n <div\n class=\"nice-alert-border\"\n *ngIf=\"appearance === 'border'\"></div>\n\n <!-- Icon -->\n <div\n class=\"nice-alert-icon\"\n *ngIf=\"showIcon\">\n\n <!-- Custom icon -->\n <div class=\"nice-alert-custom-icon\">\n <ng-content select=\"[niceAlertIcon]\"></ng-content>\n </div>\n\n <!-- Default icons -->\n <div class=\"nice-alert-default-icon\">\n\n <mat-icon\n *ngIf=\"type === 'primary'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'accent'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'warn'\"\n [svgIcon]=\"'heroicons_solid:x-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'basic'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'info'\"\n [svgIcon]=\"'heroicons_solid:information-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'success'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'warning'\"\n [svgIcon]=\"'heroicons_solid:exclamation'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'error'\"\n [svgIcon]=\"'heroicons_solid:x-circle'\"></mat-icon>\n\n </div>\n\n </div>\n\n <!-- Content -->\n <div class=\"nice-alert-content\">\n\n <div class=\"nice-alert-title\">\n <ng-content select=\"[niceAlertTitle]\"></ng-content>\n </div>\n\n <div class=\"nice-alert-message\">\n <ng-content></ng-content>\n </div>\n\n </div>\n\n <!-- Dismiss button -->\n <button\n class=\"nice-alert-dismiss-button\"\n mat-icon-button\n (click)=\"dismiss()\">\n <mat-icon [svgIcon]=\"'heroicons_solid:x'\"></mat-icon>\n </button>\n\n</div>\n", components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: niceAnimations, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
934
+ NiceAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceAlertComponent, selector: "nice-alert", inputs: { appearance: "appearance", dismissed: "dismissed", dismissible: "dismissible", disableAnimation: "disableAnimation", name: "name", showIcon: "showIcon", type: "type", color: "color" }, outputs: { dismissedChanged: "dismissedChanged" }, host: { properties: { "class": "this.classList" } }, exportAs: ["niceAlert"], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"nice-alert-container\"\n *ngIf=\"!dismissible || dismissible && !dismissed\"\n [@fadeIn]=\"!dismissed && !disableAnimation\"\n [@fadeOut]=\"!dismissed && !disableAnimation\">\n\n <!-- Border -->\n <div\n class=\"nice-alert-border\"\n *ngIf=\"appearance === 'border'\"></div>\n\n <!-- Icon -->\n <div\n class=\"nice-alert-icon\"\n *ngIf=\"showIcon\">\n\n <!-- Custom icon -->\n <div class=\"nice-alert-custom-icon\">\n <ng-content select=\"[niceAlertIcon]\"></ng-content>\n </div>\n\n <!-- Default icons -->\n <div class=\"nice-alert-default-icon\">\n\n <mat-icon\n *ngIf=\"type === 'primary'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'accent'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'warn'\"\n [svgIcon]=\"'heroicons_solid:x-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'basic'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'info'\"\n [svgIcon]=\"'heroicons_solid:information-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'success'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'warning'\"\n [svgIcon]=\"'heroicons_solid:exclamation'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'error'\"\n [svgIcon]=\"'heroicons_solid:x-circle'\"></mat-icon>\n\n </div>\n\n </div>\n\n <!-- Content -->\n <div class=\"nice-alert-content\">\n\n <div class=\"nice-alert-title\">\n <ng-content select=\"[niceAlertTitle]\"></ng-content>\n </div>\n\n <div class=\"nice-alert-message\">\n <ng-content></ng-content>\n </div>\n\n </div>\n\n <!-- Dismiss button -->\n <button\n class=\"nice-alert-dismiss-button\"\n mat-icon-button\n (click)=\"dismiss()\">\n <mat-icon [svgIcon]=\"'heroicons_solid:x'\"></mat-icon>\n </button>\n\n</div>\n", components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: niceAnimations, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
925
935
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceAlertComponent, decorators: [{
926
936
  type: Component,
927
937
  args: [{ selector: "nice-alert", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: niceAnimations, exportAs: "niceAlert", template: "<div\n class=\"nice-alert-container\"\n *ngIf=\"!dismissible || dismissible && !dismissed\"\n [@fadeIn]=\"!dismissed && !disableAnimation\"\n [@fadeOut]=\"!dismissed && !disableAnimation\">\n\n <!-- Border -->\n <div\n class=\"nice-alert-border\"\n *ngIf=\"appearance === 'border'\"></div>\n\n <!-- Icon -->\n <div\n class=\"nice-alert-icon\"\n *ngIf=\"showIcon\">\n\n <!-- Custom icon -->\n <div class=\"nice-alert-custom-icon\">\n <ng-content select=\"[niceAlertIcon]\"></ng-content>\n </div>\n\n <!-- Default icons -->\n <div class=\"nice-alert-default-icon\">\n\n <mat-icon\n *ngIf=\"type === 'primary'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'accent'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'warn'\"\n [svgIcon]=\"'heroicons_solid:x-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'basic'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'info'\"\n [svgIcon]=\"'heroicons_solid:information-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'success'\"\n [svgIcon]=\"'heroicons_solid:check-circle'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'warning'\"\n [svgIcon]=\"'heroicons_solid:exclamation'\"></mat-icon>\n\n <mat-icon\n *ngIf=\"type === 'error'\"\n [svgIcon]=\"'heroicons_solid:x-circle'\"></mat-icon>\n\n </div>\n\n </div>\n\n <!-- Content -->\n <div class=\"nice-alert-content\">\n\n <div class=\"nice-alert-title\">\n <ng-content select=\"[niceAlertTitle]\"></ng-content>\n </div>\n\n <div class=\"nice-alert-message\">\n <ng-content></ng-content>\n </div>\n\n </div>\n\n <!-- Dismiss button -->\n <button\n class=\"nice-alert-dismiss-button\"\n mat-icon-button\n (click)=\"dismiss()\">\n <mat-icon [svgIcon]=\"'heroicons_solid:x'\"></mat-icon>\n </button>\n\n</div>\n" }]
@@ -939,6 +949,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
939
949
  type: Input
940
950
  }], type: [{
941
951
  type: Input
952
+ }], color: [{
953
+ type: Input
942
954
  }], dismissedChanged: [{
943
955
  type: Output
944
956
  }], classList: [{
@@ -2779,6 +2791,7 @@ class NiceAsyncTypeaheadComponent extends _BaseAsyncTypeaheadComponent {
2779
2791
  this.allowNotFoundItems = false;
2780
2792
  this.panelClass = [];
2781
2793
  this.bindValue = "id";
2794
+ this.selected = new EventEmitter();
2782
2795
  this._disabled = false;
2783
2796
  this.id = uuid.v4();
2784
2797
  this.describedBy = "";
@@ -2825,6 +2838,7 @@ class NiceAsyncTypeaheadComponent extends _BaseAsyncTypeaheadComponent {
2825
2838
  this._value = value;
2826
2839
  this.propagate(value);
2827
2840
  this.stateChanges.next();
2841
+ this.selected.emit(value);
2828
2842
  }
2829
2843
  }
2830
2844
  get value() {
@@ -3063,13 +3077,13 @@ class NiceAsyncTypeaheadComponent extends _BaseAsyncTypeaheadComponent {
3063
3077
  }
3064
3078
  }
3065
3079
  NiceAsyncTypeaheadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceAsyncTypeaheadComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i1$2.NgForm, optional: true }, { token: i1$2.FormGroupDirective, optional: true }, { token: i2$2.ErrorStateMatcher }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: NiceAsyncTypeaheadService }], target: i0.ɵɵFactoryTarget.Component });
3066
- NiceAsyncTypeaheadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceAsyncTypeaheadComponent, selector: "nice-async-typeahead", inputs: { resource: "resource", searchOptions: "searchOptions", preloadResource: "preloadResource", allowNotFoundItems: "allowNotFoundItems", panelClass: "panelClass", bindValue: "bindValue", bindLabel: "bindLabel", placeholder: "placeholder", emptyPlaceholder: "emptyPlaceholder", optionTemplate: "optionTemplate", filterFn: "filterFn", labelFormatFn: "labelFormatFn", disabled: "disabled", value: "value", required: "required" }, host: { properties: { "class.floating": "this.shouldLabelFloat", "id": "this.id", "attr.aria-describedby": "this.describedBy" } }, providers: [
3080
+ NiceAsyncTypeaheadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceAsyncTypeaheadComponent, selector: "nice-async-typeahead", inputs: { resource: "resource", searchOptions: "searchOptions", preloadResource: "preloadResource", allowNotFoundItems: "allowNotFoundItems", panelClass: "panelClass", bindValue: "bindValue", bindLabel: "bindLabel", placeholder: "placeholder", emptyPlaceholder: "emptyPlaceholder", optionTemplate: "optionTemplate", filterFn: "filterFn", labelFormatFn: "labelFormatFn", disabled: "disabled", value: "value", required: "required" }, outputs: { selected: "selected" }, host: { properties: { "class.floating": "this.shouldLabelFloat", "id": "this.id", "attr.aria-describedby": "this.describedBy" } }, providers: [
3067
3081
  {
3068
3082
  provide: MatFormFieldControl,
3069
3083
  useExisting: NiceAsyncTypeaheadComponent
3070
3084
  },
3071
3085
  NiceAsyncTypeaheadService
3072
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["searchInput"], descendants: true, static: true }, { propertyName: "options", predicate: MatOption, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"{ loading: service.loading$ | async, loadingPage: service.loadingPage$ | async, values: service.filteredItems$ | async } as ctx\">\n <div class=\"flex\" *ngIf=\"!disabled; else disable\">\n <input\n #searchInput\n matInput\n class=\"flex-auto\"\n type=\"text\"\n name=\"mat-autocomplete\"\n [disabled]=\"$any(disabled)\"\n [placeholder]=\"placeholder\"\n [formControl]=\"searchControl\"\n [matAutocomplete]=\"auto\"\n [required]=\"$any(required)\"\n (focus)=\"focusChanged(true)\"\n />\n <mat-icon *ngIf=\"value && !ctx.loading\" matSuffix class=\"close-button secondary-text\" (click)=\"onRemove($event)\">\n close\n </mat-icon>\n\n <mat-spinner class=\"self-center\" [diameter]=\"16\" *ngIf=\"ctx.loading\"></mat-spinner>\n </div>\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [panelWidth]=\"panelWidth\"\n [class]=\"panelClass\"\n (optionActivated)=\"onOptionActivated($event)\"\n (optionSelected)=\"onOptionSelected($event)\"\n (closed)=\"updateState(false)\"\n (opened)=\"updateState(true)\"\n (optionsScroll)=\"onEndScroll()\"\n autoActiveFirstOption\n >\n <mat-progress-bar *ngIf=\"open && ctx.loading\" mode=\"indeterminate\" color=\"primary\"></mat-progress-bar>\n <mat-option *ngFor=\"let option of ctx.values\" [value]=\"option\">\n <ng-container\n *ngIf=\"optionTemplate; else format\"\n [ngTemplateOutlet]=\"optionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option }\">\n </ng-container>\n <ng-template #format>\n {{ formatLabel(option) }}\n </ng-template>\n </mat-option>\n <mat-option *ngIf=\"!ctx.values?.length && !allowNotFoundItems\" disabled>\n <ng-container *ngIf=\"emptyPlaceholder; else defaultEmptyPlaceholder\">\n {{ emptyPlaceholder }}\n </ng-container>\n <ng-template #defaultEmptyPlaceholder>\n {{ \"components.typeahead.no_item_found\" | translate }}\n </ng-template>\n </mat-option>\n <mat-option *ngIf=\"!ctx.values?.length && allowNotFoundItems\" id=\"new-value-option\" [value]=\"searchControl.value\">\n <span class=\"italic\">{{ searchControl.value }}</span>\n </mat-option>\n <mat-progress-bar *ngIf=\"open && ctx.loadingPage\" mode=\"indeterminate\" color=\"primary\"></mat-progress-bar>\n </mat-autocomplete>\n</ng-container>\n\n<ng-template #disable>\n <input\n matInput\n class=\"disabled-input\"\n type=\"text\"\n [disabled]=\"true\"\n [placeholder]=\"placeholder\"\n [formControl]=\"searchControl\"\n [required]=\"$any(required)\"\n />\n</ng-template>\n", styles: ["nice-async-typeahead{width:100%}nice-async-typeahead .close-button{flex:1 1 18px;cursor:pointer;min-height:18px!important;min-width:18px!important;height:18px!important;width:18px!important;font-size:18px!important;align-self:center}nice-async-typeahead .disabled-input{flex:1 1 95%}nice-async-typeahead .arrow-container{display:flex;bottom:7px;align-self:flex-end;position:relative;text-align:center;-webkit-user-select:none;user-select:none}nice-async-typeahead .arrow{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px;color:#0000008a}.italic{font-style:italic}\n"], components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: i1$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i6.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i2$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.MatSuffix, selector: "[matSuffix]" }, { type: OptionsScrollDirective, selector: "mat-autocomplete[optionsScroll]", inputs: ["thresholdPercent"], outputs: ["optionsScroll"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i4.AsyncPipe, "translate": i1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
3086
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "options", predicate: MatOption, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"{ loading: service.loading$ | async, loadingPage: service.loadingPage$ | async, values: service.filteredItems$ | async } as ctx\">\n <div class=\"flex\" *ngIf=\"!disabled; else disable\">\n <input\n #searchInput\n matInput\n class=\"flex-auto\"\n type=\"text\"\n name=\"mat-autocomplete\"\n [disabled]=\"$any(disabled)\"\n [placeholder]=\"placeholder\"\n [formControl]=\"searchControl\"\n [matAutocomplete]=\"auto\"\n [required]=\"$any(required)\"\n (focus)=\"focusChanged(true)\"\n />\n <mat-icon *ngIf=\"value && !ctx.loading\" matSuffix class=\"close-button secondary-text\" (click)=\"onRemove($event)\">\n close\n </mat-icon>\n\n <mat-spinner class=\"self-center\" [diameter]=\"16\" *ngIf=\"ctx.loading\"></mat-spinner>\n </div>\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [panelWidth]=\"panelWidth\"\n [class]=\"panelClass\"\n (optionActivated)=\"onOptionActivated($event)\"\n (optionSelected)=\"onOptionSelected($event)\"\n (closed)=\"updateState(false)\"\n (opened)=\"updateState(true)\"\n (optionsScroll)=\"onEndScroll()\"\n autoActiveFirstOption\n >\n <mat-progress-bar *ngIf=\"open && ctx.loading\" mode=\"indeterminate\" color=\"primary\"></mat-progress-bar>\n <mat-option *ngFor=\"let option of ctx.values\" [value]=\"option\">\n <ng-container\n *ngIf=\"optionTemplate; else format\"\n [ngTemplateOutlet]=\"optionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option }\">\n </ng-container>\n <ng-template #format>\n {{ formatLabel(option) }}\n </ng-template>\n </mat-option>\n <mat-option *ngIf=\"!ctx.values?.length && !allowNotFoundItems\" disabled>\n <ng-container *ngIf=\"emptyPlaceholder; else defaultEmptyPlaceholder\">\n {{ emptyPlaceholder }}\n </ng-container>\n <ng-template #defaultEmptyPlaceholder>\n {{ \"components.typeahead.no_item_found\" | translate }}\n </ng-template>\n </mat-option>\n <mat-option *ngIf=\"!ctx.values?.length && allowNotFoundItems\" id=\"new-value-option\" [value]=\"searchControl.value\">\n <span class=\"italic\">{{ searchControl.value }}</span>\n </mat-option>\n <mat-progress-bar *ngIf=\"open && ctx.loadingPage\" mode=\"indeterminate\" color=\"primary\"></mat-progress-bar>\n </mat-autocomplete>\n</ng-container>\n\n<ng-template #disable>\n <input\n matInput\n class=\"disabled-input\"\n type=\"text\"\n [disabled]=\"true\"\n [placeholder]=\"placeholder\"\n [formControl]=\"searchControl\"\n [required]=\"$any(required)\"\n />\n</ng-template>\n", styles: ["nice-async-typeahead{width:100%}nice-async-typeahead .close-button{flex:1 1 18px;cursor:pointer;min-height:18px!important;min-width:18px!important;height:18px!important;width:18px!important;font-size:18px!important;align-self:center}nice-async-typeahead .disabled-input{flex:1 1 95%}nice-async-typeahead .arrow-container{display:flex;bottom:7px;align-self:flex-end;position:relative;text-align:center;-webkit-user-select:none;user-select:none}nice-async-typeahead .arrow{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px;color:#0000008a}.italic{font-style:italic}\n"], components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: i1$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i6.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i2$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.MatSuffix, selector: "[matSuffix]" }, { type: OptionsScrollDirective, selector: "mat-autocomplete[optionsScroll]", inputs: ["thresholdPercent"], outputs: ["optionsScroll"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i4.AsyncPipe, "translate": i1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
3073
3087
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceAsyncTypeaheadComponent, decorators: [{
3074
3088
  type: Component,
3075
3089
  args: [{ selector: "nice-async-typeahead", encapsulation: ViewEncapsulation.None, providers: [
@@ -3089,7 +3103,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
3089
3103
  type: Optional
3090
3104
  }] }, { type: i2$2.ErrorStateMatcher }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: NiceAsyncTypeaheadService }]; }, propDecorators: { input: [{
3091
3105
  type: ViewChild,
3092
- args: ["searchInput", { static: true }]
3106
+ args: ["searchInput"]
3093
3107
  }], options: [{
3094
3108
  type: ViewChildren,
3095
3109
  args: [MatOption]
@@ -3115,6 +3129,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
3115
3129
  type: Input
3116
3130
  }], filterFn: [{
3117
3131
  type: Input
3132
+ }], selected: [{
3133
+ type: Output
3118
3134
  }], labelFormatFn: [{
3119
3135
  type: Input
3120
3136
  }], disabled: [{
@@ -3195,6 +3211,13 @@ class NiceBaseFormComponent {
3195
3211
  this.unsubscribeAll$ = new Subject();
3196
3212
  this.propagate = () => { };
3197
3213
  }
3214
+ onChange(event) {
3215
+ if (event) {
3216
+ if (event.code === KeyboardCodes.Enter) {
3217
+ this.clickSubmit();
3218
+ }
3219
+ }
3220
+ }
3198
3221
  ngOnInit() {
3199
3222
  this.formGroup.valueChanges.pipe(takeUntil(this.unsubscribeAll$)).subscribe(() => {
3200
3223
  this.onValueChange(this.formGroup.getRawValue());
@@ -3255,7 +3278,7 @@ class NiceBaseFormComponent {
3255
3278
  }
3256
3279
  }
3257
3280
  NiceBaseFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceBaseFormComponent, deps: [{ token: i1$3.GeneratedFormGroup }], target: i0.ɵɵFactoryTarget.Component });
3258
- NiceBaseFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceBaseFormComponent, selector: "ng-component", inputs: { loading: "loading" }, outputs: { submit: "submit" }, viewQueries: [{ propertyName: "stepper", first: true, predicate: CdkStepper, descendants: true }], ngImport: i0, template: ``, isInline: true });
3281
+ NiceBaseFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceBaseFormComponent, selector: "ng-component", inputs: { loading: "loading" }, outputs: { submit: "submit" }, host: { listeners: { "keyup": "onChange($event)" } }, viewQueries: [{ propertyName: "stepper", first: true, predicate: CdkStepper, descendants: true }], ngImport: i0, template: ``, isInline: true });
3259
3282
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceBaseFormComponent, decorators: [{
3260
3283
  type: Component,
3261
3284
  args: [{
@@ -3268,6 +3291,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
3268
3291
  type: Input
3269
3292
  }], submit: [{
3270
3293
  type: Output
3294
+ }], onChange: [{
3295
+ type: HostListener,
3296
+ args: ["keyup", ["$event"]]
3271
3297
  }] } });
3272
3298
 
3273
3299
  class NiceFormSubmitDirective {
@@ -8407,7 +8433,7 @@ class NiceToastComponent {
8407
8433
  }
8408
8434
  }
8409
8435
  NiceToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceToastComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i1$c.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component });
8410
- NiceToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceToastComponent, selector: "nice-toast", ngImport: i0, template: "<nice-alert disableAnimation [type]=\"data.type\" [appearance]=\"data.appearance || 'outline'\" (click)=\"dismiss()\">\n <span niceAlertTitle *ngIf=\"data.title\">{{ data.title }}</span>\n <span [innerHtml]=\"data.message\" *ngIf=\"data.message\"></span>\n</nice-alert>\n", styles: [".message-box{background-color:transparent!important;box-shadow:none!important}\n"], components: [{ type: NiceAlertComponent, selector: "nice-alert", inputs: ["appearance", "dismissed", "dismissible", "disableAnimation", "name", "showIcon", "type"], outputs: ["dismissedChanged"], exportAs: ["niceAlert"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
8436
+ NiceToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceToastComponent, selector: "nice-toast", ngImport: i0, template: "<nice-alert disableAnimation [type]=\"data.type\" [appearance]=\"data.appearance || 'outline'\" (click)=\"dismiss()\">\n <span niceAlertTitle *ngIf=\"data.title\">{{ data.title }}</span>\n <span [innerHtml]=\"data.message\" *ngIf=\"data.message\"></span>\n</nice-alert>\n", styles: [".message-box{background-color:transparent!important;box-shadow:none!important}\n"], components: [{ type: NiceAlertComponent, selector: "nice-alert", inputs: ["appearance", "dismissed", "dismissible", "disableAnimation", "name", "showIcon", "type", "color"], outputs: ["dismissedChanged"], exportAs: ["niceAlert"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
8411
8437
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceToastComponent, decorators: [{
8412
8438
  type: Component,
8413
8439
  args: [{ selector: "nice-toast", encapsulation: ViewEncapsulation.None, template: "<nice-alert disableAnimation [type]=\"data.type\" [appearance]=\"data.appearance || 'outline'\" (click)=\"dismiss()\">\n <span niceAlertTitle *ngIf=\"data.title\">{{ data.title }}</span>\n <span [innerHtml]=\"data.message\" *ngIf=\"data.message\"></span>\n</nice-alert>\n", styles: [".message-box{background-color:transparent!important;box-shadow:none!important}\n"] }]
@@ -8837,6 +8863,181 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
8837
8863
  }]
8838
8864
  }] });
8839
8865
 
8866
+ class NiceChipAsyncTypeaheadDirective {
8867
+ constructor(typeahead, elementRef) {
8868
+ this.typeahead = typeahead;
8869
+ this.elementRef = elementRef;
8870
+ this.niceChipAsyncTypeaheadTokenEnd = new EventEmitter();
8871
+ this.unsubscribeAll$ = new Subject();
8872
+ }
8873
+ ngOnInit() {
8874
+ this.typeahead.selected
8875
+ .pipe(takeUntil(this.unsubscribeAll$), filter((selected) => selected))
8876
+ .subscribe((_) => {
8877
+ this.niceChipAsyncTypeaheadTokenEnd.emit(this.typeahead.getActive());
8878
+ this.typeahead.writeValue(null);
8879
+ });
8880
+ this.elementRef.nativeElement.classList.add("nice-chip-async-typeahead");
8881
+ }
8882
+ ngOnDestroy() {
8883
+ this.unsubscribeAll$.next(null);
8884
+ this.unsubscribeAll$.complete();
8885
+ }
8886
+ }
8887
+ NiceChipAsyncTypeaheadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipAsyncTypeaheadDirective, deps: [{ token: NiceAsyncTypeaheadComponent }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
8888
+ NiceChipAsyncTypeaheadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: NiceChipAsyncTypeaheadDirective, selector: "[niceChipAsyncTypeahead]", outputs: { niceChipAsyncTypeaheadTokenEnd: "niceChipAsyncTypeaheadTokenEnd" }, exportAs: ["niceChipAsyncTypeahead"], ngImport: i0 });
8889
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipAsyncTypeaheadDirective, decorators: [{
8890
+ type: Directive,
8891
+ args: [{
8892
+ selector: "[niceChipAsyncTypeahead]",
8893
+ exportAs: "niceChipAsyncTypeahead",
8894
+ }]
8895
+ }], ctorParameters: function () { return [{ type: NiceAsyncTypeaheadComponent }, { type: i0.ElementRef }]; }, propDecorators: { niceChipAsyncTypeaheadTokenEnd: [{
8896
+ type: Output
8897
+ }] } });
8898
+
8899
+ class ChipListItemLabelDirective {
8900
+ constructor(template) {
8901
+ this.template = template;
8902
+ }
8903
+ }
8904
+ ChipListItemLabelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ChipListItemLabelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
8905
+ ChipListItemLabelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: ChipListItemLabelDirective, selector: "[niceChipListItemLabel]", ngImport: i0 });
8906
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ChipListItemLabelDirective, decorators: [{
8907
+ type: Directive,
8908
+ args: [{ selector: "[niceChipListItemLabel]" }]
8909
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
8910
+
8911
+ class NiceChipListItemsComponent {
8912
+ constructor() {
8913
+ this.color = "primary";
8914
+ this.removeChip = new EventEmitter();
8915
+ this.defaultColor = "primary";
8916
+ }
8917
+ remove(index) {
8918
+ this.removeChip.next(index);
8919
+ }
8920
+ }
8921
+ NiceChipListItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8922
+ NiceChipListItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceChipListItemsComponent, selector: "nice-chip-list-items", inputs: { color: "color", items$: "items$" }, outputs: { removeChip: "removeChip" }, queries: [{ propertyName: "itemLabel", first: true, predicate: ChipListItemLabelDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "<div class=\"nice-items-row\" *ngIf=\"(items$ | async)?.length\">\n <div\n class=\"nice-chip\"\n *ngFor=\"let value of items$ | async; let i = index\"\n [ngClass]=\"color\"\n >\n <span *ngIf=\"!itemLabel\">{{ value }}</span>\n <ng-container *ngIf=\"itemLabel\">\n <ng-container *ngTemplateOutlet=\"itemLabel; context: { $implicit: value }\"></ng-container>\n </ng-container>\n <button (click)=\"remove(i)\">\n <mat-icon class=\"close-icon\">cancel</mat-icon>\n </button>\n </div>\n</div>\n", components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
8923
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListItemsComponent, decorators: [{
8924
+ type: Component,
8925
+ args: [{ selector: "nice-chip-list-items", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"nice-items-row\" *ngIf=\"(items$ | async)?.length\">\n <div\n class=\"nice-chip\"\n *ngFor=\"let value of items$ | async; let i = index\"\n [ngClass]=\"color\"\n >\n <span *ngIf=\"!itemLabel\">{{ value }}</span>\n <ng-container *ngIf=\"itemLabel\">\n <ng-container *ngTemplateOutlet=\"itemLabel; context: { $implicit: value }\"></ng-container>\n </ng-container>\n <button (click)=\"remove(i)\">\n <mat-icon class=\"close-icon\">cancel</mat-icon>\n </button>\n </div>\n</div>\n" }]
8926
+ }], propDecorators: { itemLabel: [{
8927
+ type: ContentChild,
8928
+ args: [ChipListItemLabelDirective, { read: TemplateRef }]
8929
+ }], color: [{
8930
+ type: Input
8931
+ }], removeChip: [{
8932
+ type: Output
8933
+ }], items$: [{
8934
+ type: Input
8935
+ }] } });
8936
+
8937
+ class NiceChipListDirective {
8938
+ constructor(asyncTypeahead, ngControl, elementRef) {
8939
+ this.asyncTypeahead = asyncTypeahead;
8940
+ this.ngControl = ngControl;
8941
+ this.elementRef = elementRef;
8942
+ this.unsubscribeAll$ = new Subject();
8943
+ this.values$ = new BehaviorSubject([]);
8944
+ this._values = [];
8945
+ this.propagateChanges = (value) => { };
8946
+ if (this.ngControl) {
8947
+ this.ngControl.valueAccessor = this;
8948
+ }
8949
+ }
8950
+ get values() {
8951
+ return this._values;
8952
+ }
8953
+ onKeyDown(event) {
8954
+ if (this.asyncTypeahead) {
8955
+ return;
8956
+ }
8957
+ if (event.code === KeyboardCodes.Enter) {
8958
+ if (!this.elementRef.nativeElement.validity.valid) {
8959
+ return;
8960
+ }
8961
+ this.addValue(this.elementRef.nativeElement.value);
8962
+ this.elementRef.nativeElement.value = "";
8963
+ return;
8964
+ }
8965
+ }
8966
+ ngOnInit() {
8967
+ if (this.asyncTypeahead) {
8968
+ this.setupAsyncTypeahead();
8969
+ }
8970
+ if (this.elementRef.nativeElement.parentElement.classList.contains("mat-form-field-infix")) {
8971
+ this.elementRef.nativeElement.parentElement.style.alignItems = "flex-start";
8972
+ this.elementRef.nativeElement.parentElement.style.flexDirection = "column-reverse";
8973
+ }
8974
+ }
8975
+ ngOnChanges(changes) {
8976
+ if ("withItemList" in changes) {
8977
+ this.withItemList.items$ = this.values$;
8978
+ this.withItemList.removeChip.pipe(takeUntil(this.unsubscribeAll$)).subscribe(x => {
8979
+ this._values.splice(x, 1);
8980
+ this.propagateChanges(this._values);
8981
+ this.values$.next(this._values);
8982
+ });
8983
+ }
8984
+ }
8985
+ writeValue(obj) {
8986
+ this._values = [];
8987
+ }
8988
+ registerOnChange(fn) {
8989
+ this.propagateChanges = fn;
8990
+ }
8991
+ registerOnTouched(fn) { }
8992
+ setupAsyncTypeahead() {
8993
+ this.asyncTypeahead.selected
8994
+ .pipe(takeUntil(this.unsubscribeAll$), filter((selected) => selected))
8995
+ .subscribe((_) => {
8996
+ this.addValue(this.asyncTypeahead.getActive());
8997
+ this.asyncTypeahead.writeValue(null);
8998
+ });
8999
+ }
9000
+ addValue(value) {
9001
+ if (this._values.includes(value)) {
9002
+ return;
9003
+ }
9004
+ this._values.push(value);
9005
+ this.propagateChanges(this._values);
9006
+ this.values$.next(this._values);
9007
+ }
9008
+ }
9009
+ NiceChipListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListDirective, deps: [{ token: NiceAsyncTypeaheadComponent, optional: true }, { token: i1$2.NgControl, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
9010
+ NiceChipListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: NiceChipListDirective, selector: "input[niceChipList], nice-async-typeahead[niceChipList]", inputs: { withItemList: "withItemList" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, usesOnChanges: true, ngImport: i0 });
9011
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListDirective, decorators: [{
9012
+ type: Directive,
9013
+ args: [{
9014
+ selector: "input[niceChipList], nice-async-typeahead[niceChipList]"
9015
+ }]
9016
+ }], ctorParameters: function () { return [{ type: NiceAsyncTypeaheadComponent, decorators: [{
9017
+ type: Optional
9018
+ }] }, { type: i1$2.NgControl, decorators: [{
9019
+ type: Optional
9020
+ }] }, { type: i0.ElementRef }]; }, propDecorators: { withItemList: [{
9021
+ type: Input
9022
+ }], onKeyDown: [{
9023
+ type: HostListener,
9024
+ args: ["keydown", ["$event"]]
9025
+ }] } });
9026
+
9027
+ class NiceChipListDirectiveModule {
9028
+ }
9029
+ NiceChipListDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9030
+ NiceChipListDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListDirectiveModule, declarations: [NiceChipListDirective, NiceChipListItemsComponent, ChipListItemLabelDirective], imports: [CommonModule, MatIconModule], exports: [NiceChipListDirective, NiceChipListItemsComponent, ChipListItemLabelDirective] });
9031
+ NiceChipListDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListDirectiveModule, imports: [[CommonModule, MatIconModule]] });
9032
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListDirectiveModule, decorators: [{
9033
+ type: NgModule,
9034
+ args: [{
9035
+ imports: [CommonModule, MatIconModule],
9036
+ declarations: [NiceChipListDirective, NiceChipListItemsComponent, ChipListItemLabelDirective],
9037
+ exports: [NiceChipListDirective, NiceChipListItemsComponent, ChipListItemLabelDirective]
9038
+ }]
9039
+ }] });
9040
+
8840
9041
  class NiceImageErrorPlaceholderDirective {
8841
9042
  constructor(elementRef, viewContainerRef) {
8842
9043
  this.elementRef = elementRef;
@@ -9688,5 +9889,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
9688
9889
  * Generated bundle index. Do not edit.
9689
9890
  */
9690
9891
 
9691
- export { ArrayUtils, BooleanPipe, CapitalizeFirstLetterPipe, CarouselComponent, CaseUtils, CeilPipe, ColorsUtils, DateUtils, DefaultExportBottomSheetService, EntriesPipe, ExportBottomSheetComponent, ExportBottomSheetService, FileUtils, FindByKeyPipe, FirstLetterPipe, FloorPipe, FontAwesomeUtils, FormDataUtils, HttpStatusCodes, ImgCropperConfig, ImgCropperError, ImgResolution, JoinPipe, KeyboardCodes, LinkPipe, LocalizedBooleanPipe, LocalizedCurrencyPipe, LocalizedDateOnlyPipe, LocalizedDatePipe, MinutesToTimePipe, ModalMode, NiceAlertComponent, NiceAlertModule, NiceAlertService, NiceApiException, NiceAssetsCarouselComponent, NiceAssetsCarouselModule, NiceAsyncTypeaheadComponent, NiceAsyncTypeaheadModule, NiceAsyncTypeaheadProvider, NiceAutofocusDirective, NiceAutofocusDirectiveModule, NiceAutogrowDirective, NiceAutogrowModule, NiceBaseForm, NiceBaseFormComponent, NiceBaseFormModule, NiceCardComponent, NiceCardModule, NiceCarouselModule, NiceClickStopPropagationDirective, NiceConfigModule, NiceConfigService, NiceControlStatusDirective, NiceCropperAreaComponent, NiceDrawerComponent, NiceDrawerModule, NiceDrawerService, NiceDropzoneDirective, NiceDropzoneModule, NiceExportBottomSheetModule, NiceFormErrorComponent, NiceFormErrorModule, NiceFormSubmitDirective, NiceHorizontalNavigationBasicItemComponent, NiceHorizontalNavigationBranchItemComponent, NiceHorizontalNavigationComponent, NiceHorizontalNavigationDividerItemComponent, NiceHorizontalNavigationSpacerItemComponent, NiceHorizontalStepperComponent, NiceHorizontalStepperModule, NiceHttpExceptionFactory, NiceImageCropperComponent, NiceImageCropperModule, NiceImageErrorPlaceholderDirective, NiceImageErrorPlaceholderDirectiveModule, NiceLayoutComponent, NiceLayoutModule, NiceLoadingDirective, NiceLoadingSpinnerComponent, NiceLoadingSpinnerModule, NiceLottieComponent, NiceLottieModule, NiceMaterialModule, NiceMaterialStyleDirective, NiceMediaWatcherModule, NiceMediaWatcherService, NiceModalOnClickDirective, NiceModalOpenerDirective, NiceModule, NiceNavigationComponent, NiceNavigationModule, NiceNavigationService, NicePipesModule, NicePreventCloseWindowDirective, NiceRoundedStyleDirective, NiceScrollResetDirective, NiceScrollResetModule, NiceScrollbarDirective, NiceScrollbarModule, NiceSearchBarComponent, NiceSearchBarModule, NiceSplashScreenModule, NiceSplashScreenService, NiceStepComponent, NiceStopPropagationModule, NiceSweetAlertComponent, NiceSweetAlertModule, NiceSweetAlertService, NiceToastComponent, NiceToastModule, NiceToastService, NiceToggleButtonGroupModule, NiceTransformResponseInterceptor, NiceTypeaheadComponent, NiceTypeaheadModule, NiceTypeaheadNewValue, NiceUtilsModule, NiceUtilsService, NiceVerticalNavigationAsideItemComponent, NiceVerticalNavigationBasicItemComponent, NiceVerticalNavigationCollapsableItemComponent, NiceVerticalNavigationComponent, NiceVerticalNavigationDividerItemComponent, NiceVerticalNavigationGroupItemComponent, NiceVerticalNavigationSpacerItemComponent, NiceWindowDirectiveModule, NumberToOrdinalIndicatorPipe, NumberUtils, ObjectUtils, OptionsScrollDirective, PadPipe, PhonePipe, PictureModalComponent, PictureModalService, PostalCodePipe, PromiseUtils, QueryParamsUtils, RangePipe, RegexUtils, RoundPipe, SanitizeBypassPipe, SecondsToTimePipe, TRANSFORM_TYPE, ToggleButtonComponent, ToggleButtonGroupComponent, TypeUtils, UrlUtils, _normalizeDegrees, isNotNullOrUndefined, isNullOrUndefined, mergeDeep, mixinNiceApi, niceAnimations, round };
9892
+ export { ArrayUtils, BooleanPipe, CapitalizeFirstLetterPipe, CarouselComponent, CaseUtils, CeilPipe, ChipListItemLabelDirective, ColorsUtils, DateUtils, DefaultExportBottomSheetService, EntriesPipe, ExportBottomSheetComponent, ExportBottomSheetService, FileUtils, FindByKeyPipe, FirstLetterPipe, FloorPipe, FontAwesomeUtils, FormDataUtils, HttpStatusCodes, ImgCropperConfig, ImgCropperError, ImgResolution, JoinPipe, KeyboardCodes, LinkPipe, LocalizedBooleanPipe, LocalizedCurrencyPipe, LocalizedDateOnlyPipe, LocalizedDatePipe, MinutesToTimePipe, ModalMode, NiceAlertComponent, NiceAlertModule, NiceAlertService, NiceApiException, NiceAssetsCarouselComponent, NiceAssetsCarouselModule, NiceAsyncTypeaheadComponent, NiceAsyncTypeaheadModule, NiceAsyncTypeaheadProvider, NiceAutofocusDirective, NiceAutofocusDirectiveModule, NiceAutogrowDirective, NiceAutogrowModule, NiceBaseForm, NiceBaseFormComponent, NiceBaseFormModule, NiceCardComponent, NiceCardModule, NiceCarouselModule, NiceChipAsyncTypeaheadDirective, NiceChipListDirective, NiceChipListDirectiveModule, NiceChipListItemsComponent, NiceClickStopPropagationDirective, NiceConfigModule, NiceConfigService, NiceControlStatusDirective, NiceCropperAreaComponent, NiceDrawerComponent, NiceDrawerModule, NiceDrawerService, NiceExportBottomSheetModule, NiceFormErrorComponent, NiceFormErrorModule, NiceFormSubmitDirective, NiceHorizontalNavigationBasicItemComponent, NiceHorizontalNavigationBranchItemComponent, NiceHorizontalNavigationComponent, NiceHorizontalNavigationDividerItemComponent, NiceHorizontalNavigationSpacerItemComponent, NiceHorizontalStepperComponent, NiceHorizontalStepperModule, NiceHttpExceptionFactory, NiceImageCropperComponent, NiceImageCropperModule, NiceImageErrorPlaceholderDirective, NiceImageErrorPlaceholderDirectiveModule, NiceLayoutComponent, NiceLayoutModule, NiceLoadingDirective, NiceLoadingSpinnerComponent, NiceLoadingSpinnerModule, NiceLottieComponent, NiceLottieModule, NiceMaterialModule, NiceMaterialStyleDirective, NiceMediaWatcherModule, NiceMediaWatcherService, NiceModalOnClickDirective, NiceModalOpenerDirective, NiceModule, NiceNavigationComponent, NiceNavigationModule, NiceNavigationService, NicePipesModule, NicePreventCloseWindowDirective, NiceRoundedStyleDirective, NiceScrollResetDirective, NiceScrollResetModule, NiceScrollbarDirective, NiceScrollbarModule, NiceSearchBarComponent, NiceSearchBarModule, NiceSplashScreenModule, NiceSplashScreenService, NiceStepComponent, NiceStopPropagationModule, NiceSweetAlertComponent, NiceSweetAlertModule, NiceSweetAlertService, NiceToastComponent, NiceToastModule, NiceToastService, NiceToggleButtonGroupModule, NiceTransformResponseInterceptor, NiceTypeaheadComponent, NiceTypeaheadModule, NiceTypeaheadNewValue, NiceUtilsModule, NiceUtilsService, NiceVerticalNavigationAsideItemComponent, NiceVerticalNavigationBasicItemComponent, NiceVerticalNavigationCollapsableItemComponent, NiceVerticalNavigationComponent, NiceVerticalNavigationDividerItemComponent, NiceVerticalNavigationGroupItemComponent, NiceVerticalNavigationSpacerItemComponent, NiceWindowDirectiveModule, NumberToOrdinalIndicatorPipe, NumberUtils, ObjectUtils, OptionsScrollDirective, PadPipe, PhonePipe, PictureModalComponent, PictureModalService, PostalCodePipe, PromiseUtils, QueryParamsUtils, RangePipe, RegexUtils, RoundPipe, SanitizeBypassPipe, SecondsToTimePipe, TRANSFORM_TYPE, ToggleButtonComponent, ToggleButtonGroupComponent, TypeUtils, UrlUtils, _normalizeDegrees, isNotNullOrUndefined, isNullOrUndefined, mergeDeep, mixinNiceApi, niceAnimations, round };
9692
9893
  //# sourceMappingURL=recursyve-nice-ui-kit.v2.mjs.map