ecabs-components 1.0.13 → 1.0.14

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.
@@ -15,7 +15,7 @@ import * as i3$1 from '@angular/material/form-field';
15
15
  import { MatFormFieldModule } from '@angular/material/form-field';
16
16
  import * as i7 from 'ngx-mat-select-search';
17
17
  import { MatSelectSearchComponent, NgxMatSelectSearchModule } from 'ngx-mat-select-search';
18
- import { ReplaySubject, Subscription, combineLatest, map, debounceTime, Subject, takeUntil } from 'rxjs';
18
+ import { BehaviorSubject, Subscription, combineLatest, map, debounceTime, Subject, takeUntil } from 'rxjs';
19
19
  import * as i4$1 from '@angular/material/select';
20
20
  import { MatSelectModule, MAT_SELECT_SCROLL_STRATEGY } from '@angular/material/select';
21
21
  import * as i2 from '@angular/material/core';
@@ -749,10 +749,12 @@ class EcabsSelectComponent extends ElementBaseComponent {
749
749
  this.othersLabel = 'Others';
750
750
  this.updateFilterItems = new EventEmitter();
751
751
  this.selectionChange = new EventEmitter();
752
- this.filteredItems$ = new ReplaySubject(1);
752
+ this.filteredItems$ = new BehaviorSubject([]);
753
753
  this.itemFilterCtrl = new UntypedFormControl();
754
754
  this.isClearAll = false;
755
755
  this.showFilteredAllOption = true;
756
+ this.selectedItems = [];
757
+ this.notSelectedItems = [];
756
758
  this.subscriptions = new Subscription();
757
759
  // eslint-disable-next-line @typescript-eslint/no-empty-function
758
760
  this.onChange = () => { };
@@ -765,23 +767,21 @@ class EcabsSelectComponent extends ElementBaseComponent {
765
767
  set value(val) {
766
768
  if (this.val !== val) {
767
769
  this.val = val;
770
+ this.setSelectedItems();
768
771
  this.onChange(val);
769
772
  this.onTouch(val);
770
773
  }
771
774
  }
772
775
  ngOnChanges(changes) {
773
776
  var _a;
774
- if (changes['items'] && changes['items'].currentValue) {
775
- this.filteredItems$.next(changes['items'].currentValue.slice());
777
+ const { items } = changes;
778
+ if (items && items.currentValue) {
776
779
  this.filterItems();
777
- if (this.multiple &&
778
- this.useSelectAllOption &&
779
- ((_a = this.allSelected) === null || _a === void 0 ? void 0 : _a.selected)) {
780
+ if (this.multiple && this.useSelectAllOption && ((_a = this.allSelected) === null || _a === void 0 ? void 0 : _a.selected)) {
780
781
  setTimeout(() => {
781
- this.control.patchValue([
782
- ...this.items.map((item) => item.value),
783
- this.selectAllValue,
784
- ], { emitEvent: false });
782
+ this.control.patchValue([...this.filteredItems$.value.map((item) => item.value), this.selectAllValue], {
783
+ emitEvent: false,
784
+ });
785
785
  }, 100);
786
786
  }
787
787
  }
@@ -807,17 +807,19 @@ class EcabsSelectComponent extends ElementBaseComponent {
807
807
  this.filterItems();
808
808
  this.updateFilterItems.emit(value);
809
809
  if (this.isClearAll) {
810
- this.control.patchValue([]);
810
+ this.control.patchValue([], { emitEvent: false });
811
811
  this.isClearAll = false;
812
812
  }
813
813
  }));
814
814
  }
815
815
  toggleAllSelection() {
816
816
  if (this.allSelected.selected) {
817
- this.control.patchValue([
818
- ...this.items.map((item) => item.value),
819
- this.selectAllValue,
820
- ]);
817
+ if (this.useSearchOption) {
818
+ this.control.patchValue([...this.filteredItems$.value.map((item) => item.value), this.selectAllValue]);
819
+ }
820
+ else {
821
+ this.control.patchValue([...this.items.map((item) => item.value), this.selectAllValue]);
822
+ }
821
823
  }
822
824
  else {
823
825
  this.control.patchValue([]);
@@ -839,20 +841,31 @@ class EcabsSelectComponent extends ElementBaseComponent {
839
841
  });
840
842
  this.isClearAll = false;
841
843
  }
844
+ toggleNone() {
845
+ this.selectedItems = [];
846
+ }
842
847
  getAllSelectedChecked() {
843
848
  return this.allSelected !== undefined && this.allSelected.selected;
844
849
  }
845
850
  getLabel(val) {
846
851
  var _a;
847
- if (this.useSelectAllOption &&
848
- ((_a = this.allSelected) === null || _a === void 0 ? void 0 : _a.selected) &&
849
- this.items &&
850
- this.items.length > 0) {
852
+ if (this.useSelectAllOption && ((_a = this.allSelected) === null || _a === void 0 ? void 0 : _a.selected) && this.items && this.items.length > 0) {
851
853
  return this.items[0].label;
852
854
  }
853
- if (val !== undefined && this.items && this.items.length > 0) {
854
- // eslint-disable-next-line @typescript-eslint/no-shadow
855
- const item = this.items.find((item) => item.value === val);
855
+ let item;
856
+ if (val !== undefined) {
857
+ if (this.useSearchOption) {
858
+ if (this.selectedItems && this.selectedItems.length > 0) {
859
+ // eslint-disable-next-line @typescript-eslint/no-shadow
860
+ item = this.selectedItems.find((item) => item.value === val);
861
+ }
862
+ }
863
+ else {
864
+ if (this.items && this.items.length > 0) {
865
+ // eslint-disable-next-line @typescript-eslint/no-shadow
866
+ item = this.items.find((item) => item.value === val);
867
+ }
868
+ }
856
869
  return item ? item.label : '';
857
870
  }
858
871
  return '';
@@ -873,25 +886,91 @@ class EcabsSelectComponent extends ElementBaseComponent {
873
886
  this.selectionChange.emit($event);
874
887
  }
875
888
  filterItems() {
889
+ var _a, _b, _c;
890
+ this.setSelectedItems();
876
891
  if (!this.items) {
877
892
  return;
878
893
  }
879
894
  // get the search keyword
880
895
  let search = this.itemFilterCtrl.value;
881
896
  if (!search || search === '') {
882
- this.filteredItems$.next(this.items.slice());
897
+ if (this.useSearchOption) {
898
+ this.filteredItems$.next([...this.selectedItems]);
899
+ }
900
+ else {
901
+ this.filteredItems$.next((_a = this.items) === null || _a === void 0 ? void 0 : _a.slice());
902
+ }
883
903
  this.showFilteredAllOption = true;
884
904
  return;
885
905
  }
886
906
  search = search.toLowerCase();
887
- this.showFilteredAllOption = this.allLabel.toLowerCase().includes(search.toLowerCase());
907
+ this.showFilteredAllOption =
908
+ this.allLabel.toLowerCase().includes(search.toLowerCase()) ||
909
+ (this.value instanceof Array && this.value.includes(this.selectAllValue)) ||
910
+ (!(this.value instanceof Array) && this.value === this.selectAllValue);
888
911
  this.changeDetectorRef.detectChanges();
889
- this.filteredItems$.next(this.items && this.items.length > 0
890
- ? this.items.filter((item) => item.label.toLowerCase().includes(search.toLowerCase()))
891
- : []);
892
- this.filteredItems$.next(this.items && this.items.length > 0
893
- ? this.items.filter((item) => item.label.toLowerCase().includes(search.toLowerCase()))
894
- : []);
912
+ if (this.useSearchOption) {
913
+ const filteredItems = ((_b = this.notSelectedItems) === null || _b === void 0 ? void 0 : _b.length) > 0
914
+ ? this.notSelectedItems.filter((item) => item.label.toLowerCase().includes(search.toLowerCase()))
915
+ : [];
916
+ this.filteredItems$.next([...this.selectedItems, ...filteredItems]);
917
+ }
918
+ else {
919
+ this.filteredItems$.next(((_c = this.items) === null || _c === void 0 ? void 0 : _c.length) > 0
920
+ ? this.items.filter((item) => item.label.toLowerCase().includes(search.toLowerCase()))
921
+ : []);
922
+ }
923
+ }
924
+ setSelectedItems() {
925
+ var _a, _b;
926
+ if (this.useSearchOption) {
927
+ const selectedItems = [];
928
+ if (this.value) {
929
+ if (this.value instanceof Array) {
930
+ const skipSteps = this.value.includes(this.selectAllValue);
931
+ if (!skipSteps) {
932
+ this.value.forEach((value) => {
933
+ const index = this.selectedItems.findIndex((selectedItem) => selectedItem.value === value);
934
+ if (index !== -1) {
935
+ selectedItems.push(this.selectedItems[index]);
936
+ }
937
+ else {
938
+ // eslint-disable-next-line @typescript-eslint/no-shadow
939
+ const item = this.items.find((item) => item.value === value);
940
+ if (item) {
941
+ selectedItems.push(item);
942
+ }
943
+ }
944
+ });
945
+ this.selectedItems.forEach((selectedItem) => {
946
+ const index = this.value.find((value) => selectedItem.value === value);
947
+ if (index === -1) {
948
+ selectedItems.splice(index, 1);
949
+ }
950
+ });
951
+ }
952
+ }
953
+ else {
954
+ const index = this.selectedItems.findIndex((selectedItem) => selectedItem.value === this.value);
955
+ if (index !== -1) {
956
+ selectedItems.push(this.selectedItems[index]);
957
+ }
958
+ else {
959
+ // eslint-disable-next-line @typescript-eslint/no-shadow
960
+ const item = this.items.find((item) => item.value === this.value);
961
+ // eslint-disable-next-line max-depth
962
+ if (item) {
963
+ selectedItems.push(item);
964
+ }
965
+ }
966
+ }
967
+ this.selectedItems = [...selectedItems];
968
+ this.notSelectedItems = (_a = this.items) === null || _a === void 0 ? void 0 : _a.filter((item) => this.selectedItems.findIndex((selectedItem) => selectedItem.value === item.value) === -1);
969
+ }
970
+ else {
971
+ this.notSelectedItems = (_b = this.items) === null || _b === void 0 ? void 0 : _b.slice();
972
+ }
973
+ }
895
974
  }
896
975
  }
897
976
  EcabsSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EcabsSelectComponent, deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
@@ -901,7 +980,7 @@ EcabsSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
901
980
  useExisting: EcabsSelectComponent,
902
981
  multi: true,
903
982
  },
904
- ], viewQueries: [{ propertyName: "allSelected", first: true, predicate: ["allSelected"], descendants: true }, { propertyName: "matSelectSearchComponent", first: true, predicate: MatSelectSearchComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<app-element-wrapper [data]=\"getData()\">\r\n <mat-form-field [ngClass]=\"{ disabled: useOnlyDisabledClass }\">\r\n <mat-select\r\n class=\"form-field__select\"\r\n [(ngModel)]=\"value\"\r\n (closed)=\"onTouch()\"\r\n [id]=\"name\"\r\n appearance=\"outline\"\r\n [multiple]=\"multiple\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n [disableRipple]=\"true\"\r\n (selectionChange)=\"onSelectionChanged($event)\"\r\n >\r\n <mat-select-trigger>\r\n <span *ngIf=\"getAllSelectedChecked()\">{{ allLabel }}</span>\r\n <span *ngIf=\"!getAllSelectedChecked()\"\r\n >{{ val && multiple ? getLabel(val[0]) : getLabel(val) }}\r\n <span *ngIf=\"multiple && value?.length > 1\" class=\"additional-selection\">\r\n (+{{ useSelectAllOption && this.allSelected?.selected ? value?.length - 2 : value?.length - 1 }}\r\n {{ (value?.length === 2 ? otherLabel : othersLabel) }})\r\n </span>\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngIf=\"useSearchOption\">\r\n <ngx-mat-select-search\r\n [formControl]=\"itemFilterCtrl\"\r\n [placeholderLabel]=\"searchFieldPlaceholder\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n ></ngx-mat-select-search>\r\n </mat-option>\r\n <mat-option *ngIf=\"useNoneOption\">{{ noneLabel }}</mat-option>\r\n <mat-option\r\n #allSelected\r\n *ngIf=\"useSelectAllOption && showFilteredAllOption\"\r\n (click)=\"toggleAllSelection()\"\r\n [value]=\"selectAllValue\">{{\r\n allLabel\r\n }}</mat-option>\r\n <mat-option *ngFor=\"let item of filteredItems$ | async\" [value]=\"item.value\" (click)=\"togglePerOne()\">\r\n {{ item.label }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n</app-element-wrapper>\r\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ElementWrapperComponent, selector: "app-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i4$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "indexAndLengthScreenReaderText", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toogleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
983
+ ], viewQueries: [{ propertyName: "allSelected", first: true, predicate: ["allSelected"], descendants: true }, { propertyName: "matSelectSearchComponent", first: true, predicate: MatSelectSearchComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<app-element-wrapper [data]=\"getData()\">\r\n <mat-form-field [ngClass]=\"{ disabled: useOnlyDisabledClass }\">\r\n <mat-select\r\n class=\"form-field__select\"\r\n [(ngModel)]=\"value\"\r\n (closed)=\"onTouch()\"\r\n [id]=\"name\"\r\n appearance=\"outline\"\r\n [multiple]=\"multiple\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n [disableRipple]=\"true\"\r\n (selectionChange)=\"onSelectionChanged($event)\"\r\n >\r\n <mat-select-trigger>\r\n <span *ngIf=\"getAllSelectedChecked()\">{{ allLabel }}</span>\r\n <span *ngIf=\"!getAllSelectedChecked()\"\r\n >{{ val && multiple ? getLabel(val[0]) : getLabel(val) }}\r\n <span *ngIf=\"multiple && value?.length > 1\" class=\"additional-selection\">\r\n (+{{ useSelectAllOption && this.allSelected?.selected ? value?.length - 2 : value?.length - 1 }}\r\n {{ (value?.length === 2 ? otherLabel : othersLabel) }})\r\n </span>\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngIf=\"useSearchOption\">\r\n <ngx-mat-select-search\r\n [formControl]=\"itemFilterCtrl\"\r\n [placeholderLabel]=\"searchFieldPlaceholder\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n ></ngx-mat-select-search>\r\n </mat-option>\r\n <mat-option *ngIf=\"useNoneOption\" (click)=\"toggleNone()\">{{ noneLabel }}</mat-option>\r\n <mat-option\r\n #allSelected\r\n *ngIf=\"useSelectAllOption && showFilteredAllOption\"\r\n (click)=\"toggleAllSelection()\"\r\n [value]=\"selectAllValue\">{{\r\n allLabel\r\n }}</mat-option>\r\n <mat-option *ngFor=\"let item of filteredItems$ | async\" [value]=\"item.value\" (click)=\"togglePerOne()\">\r\n {{ item.label }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n</app-element-wrapper>\r\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ElementWrapperComponent, selector: "app-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i4$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "indexAndLengthScreenReaderText", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toogleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
905
984
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EcabsSelectComponent, decorators: [{
906
985
  type: Component,
907
986
  args: [{ selector: 'ecabs-select', providers: [
@@ -910,7 +989,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
910
989
  useExisting: EcabsSelectComponent,
911
990
  multi: true,
912
991
  },
913
- ], template: "<app-element-wrapper [data]=\"getData()\">\r\n <mat-form-field [ngClass]=\"{ disabled: useOnlyDisabledClass }\">\r\n <mat-select\r\n class=\"form-field__select\"\r\n [(ngModel)]=\"value\"\r\n (closed)=\"onTouch()\"\r\n [id]=\"name\"\r\n appearance=\"outline\"\r\n [multiple]=\"multiple\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n [disableRipple]=\"true\"\r\n (selectionChange)=\"onSelectionChanged($event)\"\r\n >\r\n <mat-select-trigger>\r\n <span *ngIf=\"getAllSelectedChecked()\">{{ allLabel }}</span>\r\n <span *ngIf=\"!getAllSelectedChecked()\"\r\n >{{ val && multiple ? getLabel(val[0]) : getLabel(val) }}\r\n <span *ngIf=\"multiple && value?.length > 1\" class=\"additional-selection\">\r\n (+{{ useSelectAllOption && this.allSelected?.selected ? value?.length - 2 : value?.length - 1 }}\r\n {{ (value?.length === 2 ? otherLabel : othersLabel) }})\r\n </span>\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngIf=\"useSearchOption\">\r\n <ngx-mat-select-search\r\n [formControl]=\"itemFilterCtrl\"\r\n [placeholderLabel]=\"searchFieldPlaceholder\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n ></ngx-mat-select-search>\r\n </mat-option>\r\n <mat-option *ngIf=\"useNoneOption\">{{ noneLabel }}</mat-option>\r\n <mat-option\r\n #allSelected\r\n *ngIf=\"useSelectAllOption && showFilteredAllOption\"\r\n (click)=\"toggleAllSelection()\"\r\n [value]=\"selectAllValue\">{{\r\n allLabel\r\n }}</mat-option>\r\n <mat-option *ngFor=\"let item of filteredItems$ | async\" [value]=\"item.value\" (click)=\"togglePerOne()\">\r\n {{ item.label }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n</app-element-wrapper>\r\n" }]
992
+ ], template: "<app-element-wrapper [data]=\"getData()\">\r\n <mat-form-field [ngClass]=\"{ disabled: useOnlyDisabledClass }\">\r\n <mat-select\r\n class=\"form-field__select\"\r\n [(ngModel)]=\"value\"\r\n (closed)=\"onTouch()\"\r\n [id]=\"name\"\r\n appearance=\"outline\"\r\n [multiple]=\"multiple\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n [disableRipple]=\"true\"\r\n (selectionChange)=\"onSelectionChanged($event)\"\r\n >\r\n <mat-select-trigger>\r\n <span *ngIf=\"getAllSelectedChecked()\">{{ allLabel }}</span>\r\n <span *ngIf=\"!getAllSelectedChecked()\"\r\n >{{ val && multiple ? getLabel(val[0]) : getLabel(val) }}\r\n <span *ngIf=\"multiple && value?.length > 1\" class=\"additional-selection\">\r\n (+{{ useSelectAllOption && this.allSelected?.selected ? value?.length - 2 : value?.length - 1 }}\r\n {{ (value?.length === 2 ? otherLabel : othersLabel) }})\r\n </span>\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngIf=\"useSearchOption\">\r\n <ngx-mat-select-search\r\n [formControl]=\"itemFilterCtrl\"\r\n [placeholderLabel]=\"searchFieldPlaceholder\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n ></ngx-mat-select-search>\r\n </mat-option>\r\n <mat-option *ngIf=\"useNoneOption\" (click)=\"toggleNone()\">{{ noneLabel }}</mat-option>\r\n <mat-option\r\n #allSelected\r\n *ngIf=\"useSelectAllOption && showFilteredAllOption\"\r\n (click)=\"toggleAllSelection()\"\r\n [value]=\"selectAllValue\">{{\r\n allLabel\r\n }}</mat-option>\r\n <mat-option *ngFor=\"let item of filteredItems$ | async\" [value]=\"item.value\" (click)=\"togglePerOne()\">\r\n {{ item.label }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n</app-element-wrapper>\r\n" }]
914
993
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { items: [{
915
994
  type: Input
916
995
  }], multiple: [{