@coreui/angular-pro 4.2.18 → 4.2.20

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.
@@ -8421,9 +8421,9 @@ class MultiSelectOptionComponent {
8421
8421
  var _a;
8422
8422
  return ((_a = this.label) !== null && _a !== void 0 ? _a : this.value);
8423
8423
  }
8424
- focus(origin) {
8424
+ focus(origin = 'program') {
8425
8425
  if (this.dropdownVisible) {
8426
- this.focusMonitor.focusVia(this.elementRef, origin !== null && origin !== void 0 ? origin : 'program', { preventScroll: false });
8426
+ this.focusMonitor.focusVia(this.elementRef, origin, { preventScroll: false });
8427
8427
  this.changeDetectorRef.markForCheck();
8428
8428
  }
8429
8429
  }
@@ -8785,20 +8785,20 @@ class MultiSelectComponent {
8785
8785
  if ($event.key === 'Escape') {
8786
8786
  this.visible = false;
8787
8787
  this.searchValue = '';
8788
- this.setFocus();
8788
+ this.setFocus('keyboard', 'onKeyUp');
8789
8789
  return;
8790
8790
  }
8791
8791
  if (['Enter', ' ', 'ArrowDown'].includes($event.key) && [(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.nativeElement, this.elementRef.nativeElement].includes($event.target)) {
8792
8792
  this.visible = true;
8793
8793
  if (!this.search) {
8794
- this.setFocus();
8794
+ this.setFocus('keyboard', 'onKeyUp');
8795
8795
  }
8796
8796
  return;
8797
8797
  }
8798
8798
  if ($event.key === 'Tab' && $event.target === this.elementRef.nativeElement) {
8799
8799
  this.visible = true;
8800
8800
  if (!this.search) {
8801
- this.setFocus();
8801
+ this.setFocus('keyboard', 'onKeyUp');
8802
8802
  }
8803
8803
  return;
8804
8804
  }
@@ -8816,11 +8816,11 @@ class MultiSelectComponent {
8816
8816
  return;
8817
8817
  if (!this.visible) {
8818
8818
  this.visible = true;
8819
- this.setFocus();
8819
+ this.setFocus('mouse', 'onClick');
8820
8820
  }
8821
8821
  else if ([this.dropdown.nativeElement].includes($event.target)) {
8822
8822
  this.visible = false;
8823
- this.setFocus();
8823
+ this.setFocus('mouse', 'onClick');
8824
8824
  }
8825
8825
  }
8826
8826
  set searchValue(value) {
@@ -8854,15 +8854,13 @@ class MultiSelectComponent {
8854
8854
  this.setFocusMonitor(false);
8855
8855
  }
8856
8856
  ngOnChanges(changes) {
8857
- var _a;
8858
8857
  if (changes['value']) {
8859
- if (changes['value'].currentValue.length === 0) {
8858
+ const valueChanges = changes['value'];
8859
+ if (valueChanges.currentValue.length === 0) {
8860
8860
  this.clearAllOptions();
8861
8861
  }
8862
8862
  else {
8863
- (_a = this.multiSelectOptions) === null || _a === void 0 ? void 0 : _a.forEach((option, index) => {
8864
- this.selectOption(option, changes['value'].currentValue.includes(option.value));
8865
- });
8863
+ this.selectOptions();
8866
8864
  }
8867
8865
  this.selectedOptionsUpdate();
8868
8866
  }
@@ -8887,6 +8885,7 @@ class MultiSelectComponent {
8887
8885
  var _a, _b, _c;
8888
8886
  if (subscribe) {
8889
8887
  this.multiSelectOptionsSubscription = this.multiSelectOptions.changes.subscribe(change => {
8888
+ // console.log('multiSelectOptions change', change)
8890
8889
  this.selectOptions();
8891
8890
  });
8892
8891
  this.multiselectVisibleSubscription = this.multiSelectService.multiSelectVisible$.subscribe((visible) => {
@@ -8904,7 +8903,7 @@ class MultiSelectComponent {
8904
8903
  // close dropdown for single select (!multiple)
8905
8904
  this.visible = false;
8906
8905
  this.searchValue = '';
8907
- this.setFocus();
8906
+ this.setFocus('program', 'multiselectSubscribe');
8908
8907
  }
8909
8908
  // todo?
8910
8909
  // if (!!option) {
@@ -8922,7 +8921,7 @@ class MultiSelectComponent {
8922
8921
  var _a;
8923
8922
  (_a = this.multiSelectOptions) === null || _a === void 0 ? void 0 : _a.forEach((option, index) => {
8924
8923
  option.optionsStyle = this.optionsStyle;
8925
- option.selected = option.value !== undefined ? this.value.includes(option.value) || option.selected : option.selected;
8924
+ option.selected = option.value !== undefined ? this.value.includes(option.value) : !!option.selected;
8926
8925
  });
8927
8926
  }
8928
8927
  clearAllOptions($event) {
@@ -8931,7 +8930,10 @@ class MultiSelectComponent {
8931
8930
  option.selected = false;
8932
8931
  });
8933
8932
  this.selectedOptionsUpdate();
8934
- this.setFocus();
8933
+ if ($event) {
8934
+ this.searchValue = '';
8935
+ this.setFocus('program', 'clearAllOptions');
8936
+ }
8935
8937
  }
8936
8938
  selectAllOptions() {
8937
8939
  this.multiSelectOptions.forEach((option, index) => {
@@ -8941,13 +8943,16 @@ class MultiSelectComponent {
8941
8943
  this.selectedOptionsUpdate();
8942
8944
  }
8943
8945
  handleTagRemove($event) {
8944
- this.setFocus();
8946
+ this.setFocus('program', 'handleTagRemove');
8945
8947
  }
8946
- setFocus() {
8948
+ setFocus(origin = 'program', methodName) {
8947
8949
  var _a, _b;
8948
8950
  if (this.disabled)
8949
8951
  return;
8950
- (_a = this.focusMonitor) === null || _a === void 0 ? void 0 : _a.focusVia((_b = this.inputElement) !== null && _b !== void 0 ? _b : this.elementRef, 'program');
8952
+ const element = (_a = this.inputElement) !== null && _a !== void 0 ? _a : this.elementRef;
8953
+ const preventScroll = origin === 'program';
8954
+ (_b = this.focusMonitor) === null || _b === void 0 ? void 0 : _b.focusVia(element, origin, { preventScroll: preventScroll });
8955
+ // console.log('setFocus', origin, methodName, 'preventScroll:', preventScroll );
8951
8956
  }
8952
8957
  filterOptions(value) {
8953
8958
  var _a, _b, _c;
@@ -9002,11 +9007,7 @@ class MultiSelectComponent {
9002
9007
  }
9003
9008
  }
9004
9009
  selectOption(option, selected) {
9005
- this.multiSelectOptions.forEach(item => {
9006
- if (item === option) {
9007
- option.selected = selected;
9008
- }
9009
- });
9010
+ option.selected = selected;
9010
9011
  this.selectedOptionsUpdate();
9011
9012
  }
9012
9013
  selectedOptionsUpdate() {
@@ -9022,6 +9023,7 @@ class MultiSelectComponent {
9022
9023
  var _a, _b, _c;
9023
9024
  if (monitor && !this.disabled) {
9024
9025
  this.focusMonitorSubscription = (_a = this.focusMonitor) === null || _a === void 0 ? void 0 : _a.monitor(this.elementRef, true).subscribe((origin) => {
9026
+ // console.log('focusMonitorSubscription', this.elementRef, origin);
9025
9027
  this.ngZone.run(() => {
9026
9028
  var _a;
9027
9029
  this.subtreeFocused = this.focusOrigin(origin);
@@ -9041,7 +9043,7 @@ MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
9041
9043
  {
9042
9044
  provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MultiSelectComponent), multi: true
9043
9045
  }
9044
- ], queries: [{ propertyName: "multiSelectOptions", predicate: MultiSelectOptionComponent, descendants: true }], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true }, { propertyName: "dropdownToggle", first: true, predicate: DropdownToggleDirective, descendants: true }, { propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }], exportAs: ["cMultiSelect"], usesOnChanges: true, ngImport: i0, template: "<c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" class=\"picker\" [ngClass]=\"multiselectClasses\"\n [(visible)]=\"visible\" [popperOptions]=\"popperjsOptions\">\n <div [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle #dropdownToggle=\"cDropdownToggle\">\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <c-multi-select-tag *ngFor=\"let option of selectedOptions; index as i\"\n (remove)=\"handleTagRemove($event)\"\n [option]=\"option\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'counter'\">\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\n <ng-template #pluralMap>\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\n </ng-template>\n </ng-template>\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\n <!-- </ng-template>-->\n </div>\n\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n [(ngModel)]=\"searchValue\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [attr.placeholder]=\"selectedOptions.length === 0 && selectionType !== 'counter' ? placeholder : null\"\n autocomplete=\"off\"\n tabindex=\"{{ disabled ? '-1' : '0' }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && selectedOptions.length > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n\n <div *ngIf=\"!disabled\" class=\"\" cDropdownMenu #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible\">\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0\">\n <button (click)=\"selectAllOptions()\" *ngIf=\"selectAll && multiple\" class=\"form-multi-select-all\">\n {{ selectAllLabel }}\n </button>\n <div #multiselectOptionsDiv\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflow: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n </div>\n</c-dropdown>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "dark", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible", "dark"], exportAs: ["cDropdownMenu"] }, { kind: "component", type: MultiSelectTagComponent, selector: "c-multi-select-tag", inputs: ["option"], outputs: ["remove"] }, { kind: "pipe", type: i1$1.I18nPluralPipe, name: "i18nPlural" }] });
9046
+ ], queries: [{ propertyName: "multiSelectOptions", predicate: MultiSelectOptionComponent, descendants: true }], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true }, { propertyName: "dropdownToggle", first: true, predicate: DropdownToggleDirective, descendants: true }, { propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }], exportAs: ["cMultiSelect"], usesOnChanges: true, ngImport: i0, template: "<c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" class=\"picker\" [ngClass]=\"multiselectClasses\"\r\n [(visible)]=\"visible\" [popperOptions]=\"popperjsOptions\">\r\n <div [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle #dropdownToggle=\"cDropdownToggle\">\r\n <div class=\"form-multi-select-selection\">\r\n <ng-template [ngIf]=\"selectionType === 'tags'\">\r\n <c-multi-select-tag *ngFor=\"let option of selectedOptions; index as i\"\r\n (remove)=\"handleTagRemove($event)\"\r\n [option]=\"option\"\r\n tabindex=\"-1\">\r\n </c-multi-select-tag>\r\n </ng-template>\r\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\r\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\r\n </ng-template>\r\n <ng-template [ngIf]=\"selectionType === 'counter'\">\r\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\r\n <ng-template #pluralMap>\r\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\r\n </ng-template>\r\n </ng-template>\r\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\r\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\r\n <!-- </ng-template>-->\r\n </div>\r\n\r\n <input\r\n #inputElement\r\n (keydown)=\"handleSearchKeyDown($event)\"\r\n [(ngModel)]=\"searchValue\"\r\n [disabled]=\"disabled || !search\"\r\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\r\n [attr.placeholder]=\"selectedOptions.length === 0 && selectionType !== 'counter' ? placeholder : null\"\r\n autocomplete=\"off\"\r\n tabindex=\"{{ disabled ? '-1' : '0' }}\"\r\n type=\"text\"\r\n >\r\n\r\n <button\r\n (click)=\"clearAllOptions($event)\"\r\n *ngIf=\"cleaner && selectedOptions.length > 0 && !disabled\"\r\n [disabled]=\"disabled || !isDropdownVisible\"\r\n aria-label=\"Clear all\"\r\n class=\"form-multi-select-selection-cleaner\"\r\n ></button>\r\n </div>\r\n\r\n <div *ngIf=\"!disabled\" class=\"\" cDropdownMenu #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible\">\r\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0\">\r\n <button (click)=\"selectAllOptions()\" *ngIf=\"selectAll && multiple\" class=\"form-multi-select-all\">\r\n {{ selectAllLabel }}\r\n </button>\r\n <div #multiselectOptionsDiv\r\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflow: 'scroll' } : {}\"\r\n class=\"form-multi-select-options\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n <ng-template #optionsEmpty>\r\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\r\n </ng-template>\r\n </div>\r\n</c-dropdown>\r\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "dark", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible", "dark"], exportAs: ["cDropdownMenu"] }, { kind: "component", type: MultiSelectTagComponent, selector: "c-multi-select-tag", inputs: ["option"], outputs: ["remove"] }, { kind: "pipe", type: i1$1.I18nPluralPipe, name: "i18nPlural" }] });
9045
9047
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MultiSelectComponent, decorators: [{
9046
9048
  type: Component,
9047
9049
  args: [{ selector: 'c-multi-select', exportAs: 'cMultiSelect', providers: [
@@ -9049,7 +9051,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
9049
9051
  {
9050
9052
  provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MultiSelectComponent), multi: true
9051
9053
  }
9052
- ], template: "<c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" class=\"picker\" [ngClass]=\"multiselectClasses\"\n [(visible)]=\"visible\" [popperOptions]=\"popperjsOptions\">\n <div [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle #dropdownToggle=\"cDropdownToggle\">\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <c-multi-select-tag *ngFor=\"let option of selectedOptions; index as i\"\n (remove)=\"handleTagRemove($event)\"\n [option]=\"option\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'counter'\">\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\n <ng-template #pluralMap>\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\n </ng-template>\n </ng-template>\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\n <!-- </ng-template>-->\n </div>\n\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n [(ngModel)]=\"searchValue\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [attr.placeholder]=\"selectedOptions.length === 0 && selectionType !== 'counter' ? placeholder : null\"\n autocomplete=\"off\"\n tabindex=\"{{ disabled ? '-1' : '0' }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && selectedOptions.length > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n\n <div *ngIf=\"!disabled\" class=\"\" cDropdownMenu #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible\">\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0\">\n <button (click)=\"selectAllOptions()\" *ngIf=\"selectAll && multiple\" class=\"form-multi-select-all\">\n {{ selectAllLabel }}\n </button>\n <div #multiselectOptionsDiv\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflow: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n </div>\n</c-dropdown>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"] }]
9054
+ ], template: "<c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" class=\"picker\" [ngClass]=\"multiselectClasses\"\r\n [(visible)]=\"visible\" [popperOptions]=\"popperjsOptions\">\r\n <div [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle #dropdownToggle=\"cDropdownToggle\">\r\n <div class=\"form-multi-select-selection\">\r\n <ng-template [ngIf]=\"selectionType === 'tags'\">\r\n <c-multi-select-tag *ngFor=\"let option of selectedOptions; index as i\"\r\n (remove)=\"handleTagRemove($event)\"\r\n [option]=\"option\"\r\n tabindex=\"-1\">\r\n </c-multi-select-tag>\r\n </ng-template>\r\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\r\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\r\n </ng-template>\r\n <ng-template [ngIf]=\"selectionType === 'counter'\">\r\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\r\n <ng-template #pluralMap>\r\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\r\n </ng-template>\r\n </ng-template>\r\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\r\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\r\n <!-- </ng-template>-->\r\n </div>\r\n\r\n <input\r\n #inputElement\r\n (keydown)=\"handleSearchKeyDown($event)\"\r\n [(ngModel)]=\"searchValue\"\r\n [disabled]=\"disabled || !search\"\r\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\r\n [attr.placeholder]=\"selectedOptions.length === 0 && selectionType !== 'counter' ? placeholder : null\"\r\n autocomplete=\"off\"\r\n tabindex=\"{{ disabled ? '-1' : '0' }}\"\r\n type=\"text\"\r\n >\r\n\r\n <button\r\n (click)=\"clearAllOptions($event)\"\r\n *ngIf=\"cleaner && selectedOptions.length > 0 && !disabled\"\r\n [disabled]=\"disabled || !isDropdownVisible\"\r\n aria-label=\"Clear all\"\r\n class=\"form-multi-select-selection-cleaner\"\r\n ></button>\r\n </div>\r\n\r\n <div *ngIf=\"!disabled\" class=\"\" cDropdownMenu #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible\">\r\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0\">\r\n <button (click)=\"selectAllOptions()\" *ngIf=\"selectAll && multiple\" class=\"form-multi-select-all\">\r\n {{ selectAllLabel }}\r\n </button>\r\n <div #multiselectOptionsDiv\r\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflow: 'scroll' } : {}\"\r\n class=\"form-multi-select-options\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n <ng-template #optionsEmpty>\r\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\r\n </ng-template>\r\n </div>\r\n</c-dropdown>\r\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"] }]
9053
9055
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: i1$3.FocusMonitor }, { type: MultiSelectService }, { type: i0.IterableDiffers }]; }, propDecorators: { cleaner: [{
9054
9056
  type: Input
9055
9057
  }], disabled: [{