zek 19.0.18 → 19.0.21

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.
package/fesm2022/zek.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, InjectionToken, Inject, Directive, EventEmitter, Input, Output, ViewChild, HostListener, Pipe, Component, forwardRef, NgModule, ViewEncapsulation, ChangeDetectionStrategy, Optional } from '@angular/core';
2
+ import { Injectable, inject, InjectionToken, Inject, Directive, EventEmitter, Input, Output, ViewChild, HostListener, Pipe, Component, forwardRef, NgModule, Optional, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
3
3
  import * as i1 from '@angular/router';
4
4
  import { Router, NavigationStart, ActivatedRoute, RouterModule } from '@angular/router';
5
5
  import { Subject, of, tap, catchError, firstValueFrom, interval, BehaviorSubject, timer } from 'rxjs';
@@ -2673,8 +2673,9 @@ class EditFormComponent extends BaseComponent {
2673
2673
  this.model = await this.getModel();
2674
2674
  }
2675
2675
  else {
2676
- this.initCreate();
2676
+ await this.initCreate();
2677
2677
  }
2678
+ this.onBindModelCompleted();
2678
2679
  }
2679
2680
  initCreate() {
2680
2681
  this.model = {};
@@ -3078,6 +3079,7 @@ class ListBaseComponent extends BaseComponent {
3078
3079
  const tmp = StorageHelper.get('filter');
3079
3080
  if (tmp && tmp.url && tmp.url === this.url && tmp.filter) {
3080
3081
  this.filter = Object.assign({}, tmp.filter);
3082
+ //this.filter = { ...tmp.filter };
3081
3083
  //we dont need this.assignFilter(); because after initStoredFilter(); will be assigned.
3082
3084
  }
3083
3085
  else {
@@ -6047,22 +6049,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImpor
6047
6049
  }] } });
6048
6050
 
6049
6051
  class ZekFieldValidator {
6052
+ parentForm;
6053
+ parentFormGroup;
6050
6054
  field;
6055
+ _log = false;
6056
+ get log() {
6057
+ return this._log;
6058
+ }
6059
+ set log(value) {
6060
+ const v = Convert.toBooleanProperty(value);
6061
+ if (this._log !== v) {
6062
+ this._log = v;
6063
+ }
6064
+ }
6065
+ constructor(parentForm, parentFormGroup) {
6066
+ this.parentForm = parentForm;
6067
+ this.parentFormGroup = parentFormGroup;
6068
+ }
6051
6069
  get hasErrors() {
6052
- return !!this.field &&
6053
- this.field.invalid &&
6054
- this.field.errors &&
6055
- (this.field.dirty || this.field.touched || this.field.formDirective?.submitted);
6070
+ if (!this.field)
6071
+ return false;
6072
+ const errors = this.field.errors;
6073
+ const invalid = this.field.invalid;
6074
+ // Check for specific error object existence
6075
+ if (!invalid || !errors)
6076
+ return false;
6077
+ // 1. Check if field is touched or dirty
6078
+ const isInteract = this.field.dirty || this.field.touched;
6079
+ // 2. Check if parent form is submitted (Works for both Reactive and Template)
6080
+ const isSubmitted = (this.parentForm && this.parentForm.submitted) ||
6081
+ (this.parentFormGroup && this.parentFormGroup.submitted) ||
6082
+ (this.field.formDirective && this.field.formDirective.submitted);
6083
+ return isInteract || isSubmitted;
6056
6084
  }
6057
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekFieldValidator, deps: [], target: i0.ɵɵFactoryTarget.Component });
6058
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ZekFieldValidator, isStandalone: true, selector: "zek-field-validator, [zek-field-validator]", inputs: { field: "field" }, host: { properties: { "class.invalid-tooltip": "hasErrors" } }, ngImport: i0, template: "<ng-container *ngIf=\"hasErrors\">\r\n <ng-container *ngIf=\"field.errors.required\">{{ 'Validation.Required' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.minlength\">{{ 'Validation.MinLengthFormat' | translate:{ value: field.errors.minlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.maxlength\">{{ 'Validation.MaxLengthFormat' | translate:{ value: field.errors.maxlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.min\">{{ 'Validation.Min' | translate:{ value: field.errors.min.min } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.max\">{{ 'Validation.Max' | translate:{ value: field.errors.min.max } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.email\">{{ 'Validation.Pattern' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.pattern\">{{ 'Validation.Pattern' | translate }}</ng-container><!-- {{ field.errors.pattern.requiredPattern }} -->\r\n <ng-container *ngIf=\"field.errors.mismatch\">{{ 'Validation.Mismatch' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.server\">{{field.errors.server}}</ng-container>\r\n</ng-container>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
6085
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekFieldValidator, deps: [{ token: i2$1.NgForm, optional: true }, { token: i2$1.FormGroupDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
6086
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ZekFieldValidator, isStandalone: true, selector: "zek-field-validator, [zek-field-validator]", inputs: { field: "field", log: "log" }, host: { properties: { "class.invalid-tooltip": "hasErrors" } }, ngImport: i0, template: "<ng-container *ngIf=\"hasErrors\" [ngSwitch]=\"true\">\r\n\r\n <ng-container *ngSwitchCase=\"field.errors.required\">\r\n {{ 'Validation.Required' | translate }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.minlength\">\r\n {{ 'Validation.MinLengthFormat' | translate:{ value: field.errors.minlength.requiredLength } }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.maxlength\">\r\n {{ 'Validation.MaxLengthFormat' | translate:{ value: field.errors.maxlength.requiredLength } }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.min\">\r\n {{ 'Validation.Min' | translate:{ value: field.errors.min.min } }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.max\">\r\n {{ 'Validation.Max' | translate:{ value: field.errors.max.max } }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.email\">\r\n {{ 'Validation.Pattern' | translate }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.pattern\">\r\n {{ 'Validation.Pattern' | translate }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.mismatch\">\r\n {{ 'Validation.Mismatch' | translate }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.server\">\r\n {{ field.errors.server }}\r\n </ng-container>\r\n\r\n</ng-container>\r\n\r\n<div *ngIf=\"log\" class=\"bg-dark text-light p-2 mt-2 rounded small\">\r\n <strong>Debug:</strong>\r\n <pre class=\"text-light m-0\">{{ field?.errors | json }}</pre>\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
6059
6087
  }
6060
6088
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekFieldValidator, decorators: [{
6061
6089
  type: Component,
6062
6090
  args: [{ standalone: true, selector: 'zek-field-validator, [zek-field-validator]', host: {
6063
6091
  '[class.invalid-tooltip]': 'hasErrors'
6064
- }, imports: [CommonModule, TranslateModule], template: "<ng-container *ngIf=\"hasErrors\">\r\n <ng-container *ngIf=\"field.errors.required\">{{ 'Validation.Required' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.minlength\">{{ 'Validation.MinLengthFormat' | translate:{ value: field.errors.minlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.maxlength\">{{ 'Validation.MaxLengthFormat' | translate:{ value: field.errors.maxlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.min\">{{ 'Validation.Min' | translate:{ value: field.errors.min.min } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.max\">{{ 'Validation.Max' | translate:{ value: field.errors.min.max } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.email\">{{ 'Validation.Pattern' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.pattern\">{{ 'Validation.Pattern' | translate }}</ng-container><!-- {{ field.errors.pattern.requiredPattern }} -->\r\n <ng-container *ngIf=\"field.errors.mismatch\">{{ 'Validation.Mismatch' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.server\">{{field.errors.server}}</ng-container>\r\n</ng-container>" }]
6065
- }], propDecorators: { field: [{
6092
+ }, imports: [CommonModule, TranslateModule], template: "<ng-container *ngIf=\"hasErrors\" [ngSwitch]=\"true\">\r\n\r\n <ng-container *ngSwitchCase=\"field.errors.required\">\r\n {{ 'Validation.Required' | translate }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.minlength\">\r\n {{ 'Validation.MinLengthFormat' | translate:{ value: field.errors.minlength.requiredLength } }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.maxlength\">\r\n {{ 'Validation.MaxLengthFormat' | translate:{ value: field.errors.maxlength.requiredLength } }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.min\">\r\n {{ 'Validation.Min' | translate:{ value: field.errors.min.min } }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.max\">\r\n {{ 'Validation.Max' | translate:{ value: field.errors.max.max } }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.email\">\r\n {{ 'Validation.Pattern' | translate }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.pattern\">\r\n {{ 'Validation.Pattern' | translate }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.mismatch\">\r\n {{ 'Validation.Mismatch' | translate }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"!!field.errors.server\">\r\n {{ field.errors.server }}\r\n </ng-container>\r\n\r\n</ng-container>\r\n\r\n<div *ngIf=\"log\" class=\"bg-dark text-light p-2 mt-2 rounded small\">\r\n <strong>Debug:</strong>\r\n <pre class=\"text-light m-0\">{{ field?.errors | json }}</pre>\r\n</div>" }]
6093
+ }], ctorParameters: () => [{ type: i2$1.NgForm, decorators: [{
6094
+ type: Optional
6095
+ }] }, { type: i2$1.FormGroupDirective, decorators: [{
6096
+ type: Optional
6097
+ }] }], propDecorators: { field: [{
6098
+ type: Input
6099
+ }], log: [{
6066
6100
  type: Input
6067
6101
  }] } });
6068
6102
 
@@ -6087,7 +6121,7 @@ class ZekPassword {
6087
6121
  this._type = this._type === 'password' ? 'text' : 'password';
6088
6122
  }
6089
6123
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekPassword, deps: [], target: i0.ɵɵFactoryTarget.Component });
6090
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ZekPassword, isStandalone: true, selector: "zek-password", inputs: { name: "name", required: "required", minlength: "minlength", maxlength: "maxlength", model: "model" }, outputs: { onChange: "modelChange" }, ngImport: i0, template: "<div class=\"input-group has-validation\">\r\n <input type=\"{{type}}\" class=\"form-control\" name=\"{{name}}\" id=\"{{name}}\" [attr.aria-describedby]=\"name+'-show'\"\r\n [required]=\"required\" [minlength]=\"minlength\" [maxlength]=\"maxlength\"\r\n [ngModel]=\"model\" (ngModelChange)=\"onChange.emit($event)\"\r\n #password=\"ngModel\"\r\n >\r\n <button class=\"btn btn-outline-secondary\" type=\"button\" id=\"{{name}}-show\" (click)=\"showHide()\"><i class=\"fa-solid fa-eye\"></i></button>\r\n <div zek-field-validator [field]=\"password\"></div>\r\n</div>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ZekFieldValidator, selector: "zek-field-validator, [zek-field-validator]", inputs: ["field"] }] });
6124
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ZekPassword, isStandalone: true, selector: "zek-password", inputs: { name: "name", required: "required", minlength: "minlength", maxlength: "maxlength", model: "model" }, outputs: { onChange: "modelChange" }, ngImport: i0, template: "<div class=\"input-group has-validation\">\r\n <input type=\"{{type}}\" class=\"form-control\" name=\"{{name}}\" id=\"{{name}}\" [attr.aria-describedby]=\"name+'-show'\"\r\n [required]=\"required\" [minlength]=\"minlength\" [maxlength]=\"maxlength\"\r\n [ngModel]=\"model\" (ngModelChange)=\"onChange.emit($event)\"\r\n #password=\"ngModel\"\r\n >\r\n <button class=\"btn btn-outline-secondary\" type=\"button\" id=\"{{name}}-show\" (click)=\"showHide()\"><i class=\"fa-solid fa-eye\"></i></button>\r\n <div zek-field-validator [field]=\"password\"></div>\r\n</div>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ZekFieldValidator, selector: "zek-field-validator, [zek-field-validator]", inputs: ["field", "log"] }] });
6091
6125
  }
6092
6126
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekPassword, decorators: [{
6093
6127
  type: Component,
@@ -6719,10 +6753,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImpor
6719
6753
  type: Input
6720
6754
  }] } });
6721
6755
 
6722
- class ZekSelect2 {
6756
+ class ZekSelect2 extends CoreComponent {
6723
6757
  filter;
6724
6758
  text;
6725
- elementId = RandomHelper.randomHex();
6759
+ _disabled = false;
6760
+ get disabled() {
6761
+ return this._disabled;
6762
+ }
6763
+ set disabled(value) {
6764
+ const v = Convert.toBooleanProperty(value);
6765
+ if (this._disabled !== v) {
6766
+ this._disabled = v;
6767
+ this.onDisabledChanged();
6768
+ }
6769
+ }
6770
+ onDisabledChanged() { }
6726
6771
  _data = [];
6727
6772
  get data() {
6728
6773
  return this._data;
@@ -6778,10 +6823,6 @@ class ZekSelect2 {
6778
6823
  // public set dropdown(v: any) {
6779
6824
  // this._dropdown = v;
6780
6825
  // }
6781
- ngOnDestroy() {
6782
- // this.dropdown?.dispose();
6783
- // this.dropdown = null;
6784
- }
6785
6826
  onTextChange(text) {
6786
6827
  this.filter = StringHelper.tryTrim(text);
6787
6828
  this.filterData();
@@ -6866,13 +6907,15 @@ class ZekSelect2 {
6866
6907
  }
6867
6908
  }
6868
6909
  }
6869
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekSelect2, deps: [], target: i0.ɵɵFactoryTarget.Component });
6870
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ZekSelect2, isStandalone: true, selector: "zek-select2,[zek-select2]", inputs: { data: "data", textField: "textField", valueField: "valueField", placeholder: "placeholder", value: "value" }, outputs: { selectedItemChange: "selectedItemChange", valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"input-group position-relative\" id=\"dropdown-menu-container-{{elementId}}\">\r\n <input type=\"text\" class=\"form-control\" placeholder=\"{{placeholder}}\" data-bs-toggle=\"dropdown\" id=\"input-{{elementId}}\" [(ngModel)]=\"text\" (ngModelChange)=\"onTextChange($event)\" (focus)=\"onFocus($event)\" (blur)=\"inputUnfocused()\">\r\n <button class=\"btn btn-outline-secondary dropdown-toggle\" id=\"btn-{{elementId}}\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\" data-bs-reference=\"parent\"></button>\r\n <ul class=\"dropdown-menu dropdown-menu-start w-100 scrollable-menu\" id=\"dropdown-menu-{{elementId}}\">\r\n <ng-container *ngIf=\"textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(entry)\" class=\"dropdown-item\">{{entry[textField]}}</a>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(entry)\" class=\"dropdown-item\">{{textField}}</a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>\r\n<!-- <kendo-autocomplete\r\n [data]=\"data\"\r\n [filterable]=\"true\"\r\n (valueChange)=\"valueChange($event)\"\r\n (filterChange)=\"filterChange($event)\"\r\n (open)=\"open()\"\r\n (close)=\"close()\"\r\n (focus)=\"focus()\"\r\n (blur)=\"blur()\">\r\n</kendo-autocomplete> -->", styles: [".scrollable-menu{max-height:400px;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
6910
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekSelect2, deps: null, target: i0.ɵɵFactoryTarget.Component });
6911
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ZekSelect2, isStandalone: true, selector: "zek-select2,[zek-select2]", inputs: { disabled: "disabled", data: "data", textField: "textField", valueField: "valueField", placeholder: "placeholder", value: "value" }, outputs: { selectedItemChange: "selectedItemChange", valueChange: "valueChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"input-group position-relative\" id=\"dropdown-menu-container-{{uniqueId}}\">\r\n <input type=\"text\" class=\"form-control\" placeholder=\"{{placeholder}}\" data-bs-toggle=\"dropdown\"\r\n id=\"input-{{uniqueId}}\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"text\"\r\n (ngModelChange)=\"onTextChange($event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"inputUnfocused()\">\r\n <button [disabled]=\"disabled\" class=\"btn btn-outline-secondary dropdown-toggle\" id=\"btn-{{uniqueId}}\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\" data-bs-reference=\"parent\"></button>\r\n <ul class=\"dropdown-menu dropdown-menu-start w-100 scrollable-menu\" id=\"dropdown-menu-{{uniqueId}}\">\r\n <ng-container *ngIf=\"textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(entry)\" class=\"dropdown-item\">{{entry[textField]}}</a>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(entry)\" class=\"dropdown-item\">{{textField}}</a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>\r\n<!-- <kendo-autocomplete\r\n [data]=\"data\"\r\n [filterable]=\"true\"\r\n (valueChange)=\"valueChange($event)\"\r\n (filterChange)=\"filterChange($event)\"\r\n (open)=\"open()\"\r\n (close)=\"close()\"\r\n (focus)=\"focus()\"\r\n (blur)=\"blur()\">\r\n</kendo-autocomplete> -->", styles: [".scrollable-menu{max-height:400px;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
6871
6912
  }
6872
6913
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekSelect2, decorators: [{
6873
6914
  type: Component,
6874
- args: [{ standalone: true, selector: 'zek-select2,[zek-select2]', imports: [CommonModule, FormsModule], template: "<div class=\"input-group position-relative\" id=\"dropdown-menu-container-{{elementId}}\">\r\n <input type=\"text\" class=\"form-control\" placeholder=\"{{placeholder}}\" data-bs-toggle=\"dropdown\" id=\"input-{{elementId}}\" [(ngModel)]=\"text\" (ngModelChange)=\"onTextChange($event)\" (focus)=\"onFocus($event)\" (blur)=\"inputUnfocused()\">\r\n <button class=\"btn btn-outline-secondary dropdown-toggle\" id=\"btn-{{elementId}}\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\" data-bs-reference=\"parent\"></button>\r\n <ul class=\"dropdown-menu dropdown-menu-start w-100 scrollable-menu\" id=\"dropdown-menu-{{elementId}}\">\r\n <ng-container *ngIf=\"textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(entry)\" class=\"dropdown-item\">{{entry[textField]}}</a>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(entry)\" class=\"dropdown-item\">{{textField}}</a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>\r\n<!-- <kendo-autocomplete\r\n [data]=\"data\"\r\n [filterable]=\"true\"\r\n (valueChange)=\"valueChange($event)\"\r\n (filterChange)=\"filterChange($event)\"\r\n (open)=\"open()\"\r\n (close)=\"close()\"\r\n (focus)=\"focus()\"\r\n (blur)=\"blur()\">\r\n</kendo-autocomplete> -->", styles: [".scrollable-menu{max-height:400px;overflow-y:auto}\n"] }]
6875
- }], propDecorators: { data: [{
6915
+ args: [{ standalone: true, selector: 'zek-select2,[zek-select2]', imports: [CommonModule, FormsModule], template: "<div class=\"input-group position-relative\" id=\"dropdown-menu-container-{{uniqueId}}\">\r\n <input type=\"text\" class=\"form-control\" placeholder=\"{{placeholder}}\" data-bs-toggle=\"dropdown\"\r\n id=\"input-{{uniqueId}}\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"text\"\r\n (ngModelChange)=\"onTextChange($event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"inputUnfocused()\">\r\n <button [disabled]=\"disabled\" class=\"btn btn-outline-secondary dropdown-toggle\" id=\"btn-{{uniqueId}}\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\" data-bs-reference=\"parent\"></button>\r\n <ul class=\"dropdown-menu dropdown-menu-start w-100 scrollable-menu\" id=\"dropdown-menu-{{uniqueId}}\">\r\n <ng-container *ngIf=\"textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(entry)\" class=\"dropdown-item\">{{entry[textField]}}</a>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(entry)\" class=\"dropdown-item\">{{textField}}</a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>\r\n<!-- <kendo-autocomplete\r\n [data]=\"data\"\r\n [filterable]=\"true\"\r\n (valueChange)=\"valueChange($event)\"\r\n (filterChange)=\"filterChange($event)\"\r\n (open)=\"open()\"\r\n (close)=\"close()\"\r\n (focus)=\"focus()\"\r\n (blur)=\"blur()\">\r\n</kendo-autocomplete> -->", styles: [".scrollable-menu{max-height:400px;overflow-y:auto}\n"] }]
6916
+ }], propDecorators: { disabled: [{
6917
+ type: Input
6918
+ }], data: [{
6876
6919
  type: Input
6877
6920
  }], textField: [{
6878
6921
  type: Input