@coreui/angular-pro 4.5.6 → 4.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, NgModule, HostBinding, Injectable, Component, EventEmitter, Output, ContentChildren, HostListener, Pipe, ViewChildren, Inject, ViewChild, forwardRef, Optional, ElementRef, ContentChild, ChangeDetectionStrategy, inject, DestroyRef, signal, PLATFORM_ID, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { Directive, Input, NgModule, HostBinding, Injectable, Component, EventEmitter, Output, ContentChildren, HostListener, Pipe, ViewChildren, Inject, ViewChild, forwardRef, Optional, ElementRef, ContentChild, ChangeDetectionStrategy, inject, DestroyRef, signal, effect, PLATFORM_ID, TemplateRef, ViewContainerRef } from '@angular/core';
3
3
  import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
4
4
  import * as i1$2 from '@angular/common';
5
5
  import { NgTemplateOutlet, NgIf, NgClass, NgForOf, AsyncPipe, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, DOCUMENT, CommonModule, I18nPluralPipe, isPlatformBrowser } from '@angular/common';
@@ -9,7 +9,7 @@ import * as i1$1 from '@angular/router';
9
9
  import { RouterModule, NavigationEnd, RouterLink } from '@angular/router';
10
10
  import { BehaviorSubject, Observable, fromEvent, zipWith, withLatestFrom, Subject, distinctUntilChanged as distinctUntilChanged$1, map as map$1, debounceTime as debounceTime$1 } from 'rxjs';
11
11
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
12
- import { filter, tap, combineLatestWith, distinctUntilChanged, delay, debounceTime, map, take } from 'rxjs/operators';
12
+ import { filter, distinctUntilChanged, tap, debounceTime, map, delay, combineLatestWith, take } from 'rxjs/operators';
13
13
  import { isValid, format } from 'date-fns';
14
14
  import * as i1$3 from '@angular/forms';
15
15
  import { FormGroup, FormControl, Validators, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
@@ -8393,9 +8393,6 @@ class MultiSelectOptionComponent {
8393
8393
  this.focusMonitor = focusMonitor;
8394
8394
  this.multiSelectService = multiSelectService;
8395
8395
  this.#destroyRef = inject(DestroyRef);
8396
- this.#active$ = new Subject();
8397
- this.#selected$ = new Subject();
8398
- this.#value$ = new Subject();
8399
8396
  /**
8400
8397
  * Option style
8401
8398
  * @type ('checkbox' | 'text')
@@ -8409,24 +8406,37 @@ class MultiSelectOptionComponent {
8409
8406
  */
8410
8407
  this.visible = true;
8411
8408
  this.#disabled = false;
8412
- this.#selected = false;
8409
+ this.#selected = signal(undefined);
8410
+ this.#selectedEffect = effect(() => {
8411
+ const value = this.#value();
8412
+ const selected = this.#selected();
8413
+ if (value && selected !== undefined) {
8414
+ selected ? this.multiSelectService.selectionModel?.select(value) : this.multiSelectService.selectionModel?.deselect(value);
8415
+ this.ariaSelected = selected;
8416
+ this.selectedChange.emit(selected);
8417
+ this.changeDetectorRef.markForCheck();
8418
+ }
8419
+ });
8413
8420
  /**
8414
8421
  * Emits option selected change
8415
8422
  * @type boolean
8416
8423
  */
8417
8424
  this.selectedChange = new EventEmitter();
8425
+ this.#value = signal(undefined);
8418
8426
  this.hasContent = true;
8419
- this.#dropdownVisible = false;
8420
- this.#active = false;
8427
+ this.#dropdownVisible = signal(false);
8428
+ // get active() {
8429
+ // return this.#active() && this.visible;
8430
+ // }
8431
+ this.#active = signal(false);
8432
+ this.#activeEffect = effect(() => {
8433
+ this.tabIndex = this.#active() && this.visible ? 0 : -1;
8434
+ });
8421
8435
  this.#focused = false;
8422
8436
  this.focusChange = new EventEmitter();
8423
8437
  this.#tabIndex = -1;
8424
8438
  this.#ariaSelected = undefined;
8425
- this.setSubscriptions();
8426
8439
  }
8427
- #active$;
8428
- #selected$;
8429
- #value$;
8430
8440
  /**
8431
8441
  * Option disabled.
8432
8442
  * @type boolean
@@ -8445,43 +8455,44 @@ class MultiSelectOptionComponent {
8445
8455
  * @default false
8446
8456
  */
8447
8457
  set selected(value) {
8448
- const selected = coerceBooleanProperty(value);
8449
- if (this.#selected !== selected) {
8450
- this.#selected = selected;
8451
- this.#selected$.next(selected);
8458
+ if (value !== undefined) {
8459
+ const selected = coerceBooleanProperty(value);
8460
+ if (this.#selected() !== selected) {
8461
+ this.#selected.set(selected);
8462
+ }
8452
8463
  }
8453
8464
  }
8454
8465
  get selected() {
8455
- return this.#selected;
8466
+ return this.#selected();
8456
8467
  }
8457
8468
  #selected;
8469
+ #selectedEffect;
8458
8470
  /**
8459
8471
  * Option value.
8460
8472
  * @type string
8461
8473
  * @default undefined
8462
8474
  */
8463
8475
  set value(value) {
8464
- if (this.#value !== value) {
8465
- this.#value = value;
8466
- this.#value$.next(value);
8476
+ if (this.#value() !== value) {
8477
+ this.#value.set(value);
8467
8478
  }
8468
8479
  }
8469
8480
  get value() {
8470
- return this.#value;
8481
+ return this.#value();
8471
8482
  }
8472
8483
  #value;
8473
8484
  #dropdownVisible;
8474
8485
  set active(value) {
8475
8486
  const active = coerceBooleanProperty(value) && this.visible && !this.disabled;
8476
- if (this.#active !== active) {
8477
- this.#active = active;
8478
- this.#active$.next(active);
8487
+ if (this.#active() !== active) {
8488
+ this.#active.set(active);
8479
8489
  }
8480
8490
  }
8481
- get active() {
8482
- return this.#active && this.visible;
8483
- }
8491
+ // get active() {
8492
+ // return this.#active() && this.visible;
8493
+ // }
8484
8494
  #active;
8495
+ #activeEffect;
8485
8496
  #focused;
8486
8497
  get role() {
8487
8498
  return 'option';
@@ -8489,11 +8500,11 @@ class MultiSelectOptionComponent {
8489
8500
  get hostClasses() {
8490
8501
  return {
8491
8502
  'form-multi-select-option': true,
8492
- 'form-multi-selected': this.selected,
8503
+ 'form-multi-selected': this.#selected(),
8493
8504
  [`form-multi-select-option-with-${this.optionsStyle}`]: !!this.optionsStyle,
8494
8505
  disabled: this.disabled,
8495
8506
  'd-none': !this.visible,
8496
- active: this.active,
8507
+ active: this.#active(),
8497
8508
  focused: this.#focused
8498
8509
  };
8499
8510
  }
@@ -8502,7 +8513,9 @@ class MultiSelectOptionComponent {
8502
8513
  return (this.disabled || !this.visible) ? -1 : this.#tabIndex;
8503
8514
  }
8504
8515
  set tabIndex(tabindex) {
8505
- this.#tabIndex = tabindex;
8516
+ setTimeout(() => {
8517
+ this.#tabIndex = tabindex;
8518
+ });
8506
8519
  }
8507
8520
  #tabIndex;
8508
8521
  get ariaDisabled() {
@@ -8532,21 +8545,22 @@ class MultiSelectOptionComponent {
8532
8545
  this.#focused = true;
8533
8546
  }
8534
8547
  onKeyUp($event) {
8535
- if (this.#dropdownVisible) {
8548
+ if (this.#dropdownVisible()) {
8536
8549
  if (['Enter', 'Space'].includes($event.code)) {
8537
8550
  $event.stopImmediatePropagation();
8538
8551
  $event.preventDefault();
8539
- this.selected = this.disabled ? this.selected : !this.selected;
8552
+ this.selected = this.disabled ? this.#selected() : !this.#selected();
8540
8553
  this.focus('keyboard');
8541
8554
  }
8542
8555
  }
8543
8556
  }
8544
8557
  onClick($event) {
8545
8558
  $event.stopPropagation();
8546
- this.selected = this.disabled ? this.selected : !this.selected;
8559
+ this.selected = this.disabled ? this.#selected() : !this.#selected();
8547
8560
  this.focus('mouse');
8548
8561
  }
8549
8562
  ngAfterViewInit() {
8563
+ this.setSubscriptions();
8550
8564
  setTimeout(() => {
8551
8565
  this.hasContent = !!this.contentDiv?.nativeElement.childNodes.length;
8552
8566
  if (!this.hasContent) {
@@ -8563,17 +8577,19 @@ class MultiSelectOptionComponent {
8563
8577
  if (this.value === undefined) {
8564
8578
  this.value = this.label?.trim() || '...';
8565
8579
  }
8566
- setTimeout(() => {
8580
+ if (!this.changeDetectorRef.destroyed) {
8581
+ // setTimeout(() => {
8567
8582
  this.selected = this.isSelected(this.value);
8568
8583
  this.changeDetectorRef.markForCheck();
8569
- });
8584
+ // });
8585
+ }
8570
8586
  }
8571
8587
  /** Get the label for this element which is required by the FocusableOption interface. */
8572
8588
  getLabel() {
8573
8589
  return (this.label ?? this.value);
8574
8590
  }
8575
8591
  focus(origin = 'program') {
8576
- if (this.#dropdownVisible && !this.disabled) {
8592
+ if (this.#dropdownVisible() && !this.disabled) {
8577
8593
  this.focusMonitor.focusVia(this.elementRef.nativeElement, origin, { preventScroll: false });
8578
8594
  this.multiSelectService.focusChange(this);
8579
8595
  this.changeDetectorRef.markForCheck();
@@ -8582,70 +8598,24 @@ class MultiSelectOptionComponent {
8582
8598
  }
8583
8599
  setSubscriptions() {
8584
8600
  this.multiSelectService.multiSelectVisible$
8585
- .pipe(takeUntilDestroyed())
8586
- .subscribe(visible => {
8587
- this.#dropdownVisible = visible;
8588
- });
8589
- this.#selected$
8590
- .pipe(tap(selected => {
8591
- if (selected) {
8592
- if (this.value && !this.isSelected(this.value)) {
8593
- this.multiSelectService.selectionModel?.select(this.value);
8594
- }
8595
- }
8596
- else {
8597
- if (this.value && this.isSelected(this.value)) {
8598
- this.multiSelectService.selectionModel?.deselect(this.value);
8599
- }
8600
- }
8601
- }),
8602
- // delay(0),
8603
- combineLatestWith(this.#value$), takeUntilDestroyed())
8604
- .subscribe(([selected, value]) => {
8605
- if (selected) {
8606
- if (!this.isSelected(this.value)) {
8607
- this.multiSelectService.selectionModel?.select(this.value);
8608
- }
8609
- }
8610
- else {
8611
- if (this.isSelected(this.value)) {
8612
- this.multiSelectService.selectionModel?.deselect(this.value);
8613
- }
8614
- }
8615
- this.ariaSelected = selected;
8616
- this.selectedChange.emit(selected);
8617
- this.changeDetectorRef.markForCheck();
8618
- });
8619
- setTimeout(() => {
8620
- if (!this.changeDetectorRef.destroyed) {
8621
- this.multiSelectService.selectionModel.changed
8622
- .pipe(filter(change => {
8623
- return change.added.includes(this.value) || change.removed.includes(this.value);
8624
- }), tap(change => {
8625
- this.#selected = change.added.includes(this.value);
8626
- this.changeDetectorRef.markForCheck();
8627
- }), takeUntilDestroyed(this.#destroyRef))
8628
- .subscribe();
8629
- }
8630
- });
8601
+ .pipe(takeUntilDestroyed(this.#destroyRef))
8602
+ .subscribe(this.#dropdownVisible.set);
8631
8603
  this.multiSelectService.multiSelectFocus$
8632
- .pipe(distinctUntilChanged(), takeUntilDestroyed())
8604
+ .pipe(distinctUntilChanged(), takeUntilDestroyed(this.#destroyRef))
8633
8605
  .subscribe((option) => {
8634
8606
  this.active = this.value === option.value;
8635
8607
  });
8636
- this.#active$
8637
- .pipe(distinctUntilChanged(), delay(0), takeUntilDestroyed())
8638
- .subscribe(active => {
8639
- this.tabIndex = active ? 0 : -1;
8640
- });
8641
- this.#value$
8642
- .pipe(distinctUntilChanged(), delay(0), takeUntilDestroyed())
8643
- .subscribe(value => {
8644
- this.#selected = this.isSelected(value);
8645
- });
8608
+ if (!this.changeDetectorRef.destroyed) {
8609
+ this.multiSelectService.selectionModel.changed
8610
+ .pipe(filter(change => change.added.includes(this.value) || change.removed.includes(this.value)), tap(change => {
8611
+ this.selected = change.added.includes(this.value);
8612
+ this.changeDetectorRef.markForCheck();
8613
+ }), takeUntilDestroyed(this.#destroyRef))
8614
+ .subscribe();
8615
+ }
8646
8616
  }
8647
8617
  isSelected(value = this.value) {
8648
- return this.multiSelectService.selectionModel?.isSelected(value) ?? this.selected ?? false;
8618
+ return (this.#selected() || this.multiSelectService.selectionModel?.isSelected(value)) ?? false;
8649
8619
  }
8650
8620
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: MultiSelectOptionComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$5.FocusMonitor }, { token: MultiSelectService }], target: i0.ɵɵFactoryTarget.Component }); }
8651
8621
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: MultiSelectOptionComponent, isStandalone: true, selector: "c-multi-select-option", inputs: { optionsStyle: "optionsStyle", label: "label", text: "text", visible: "visible", disabled: "disabled", selected: "selected", value: "value", active: "active", role: "role" }, outputs: { selectedChange: "selectedChange", focusChange: "focusChange" }, host: { listeners: { "keydown": "onKeyDown($event)", "blur": "onBlur()", "focus": "onFocus()", "keyup": "onKeyUp($event)", "click": "onClick($event)" }, properties: { "role": "this.role", "class": "this.hostClasses", "attr.tabindex": "this.tabIndex", "attr.disabled": "this.ariaDisabled", "attr.aria-disabled": "this.ariaDisabled", "attr.aria-selected": "this.ariaSelected" } }, viewQueries: [{ propertyName: "contentDiv", first: true, predicate: ["contentDiv"], descendants: true }], exportAs: ["cMultiSelectOption"], ngImport: i0, template: "<div #contentDiv>\n <ng-content></ng-content>\n</div>\n<div *ngIf=\"!hasContent\">\n {{text ?? label ?? value}}\n</div>\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none;white-space:nowrap;overflow:hidden}:host.active{border-radius:var(--cui-form-multi-select-option-indicator-border-radius, .375rem);box-shadow:0 0 .125rem 0 var(--cui-gray-400)}:host.focused,:host :focus-visible{box-shadow:0 0 0 .125rem #321fdb40;outline:none}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -8804,11 +8774,11 @@ class MultiSelectTagComponent {
8804
8774
  }
8805
8775
  }
8806
8776
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: MultiSelectTagComponent, deps: [{ token: MultiSelectService }], target: i0.ɵɵFactoryTarget.Component }); }
8807
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: MultiSelectTagComponent, isStandalone: true, selector: "c-multi-select-tag", inputs: { option: "option", disabled: "disabled", label: "label", value: "value" }, outputs: { remove: "remove" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<!--<ng-template [ngIfElse]=\"elseContent\"-->\n<!-- [ngIf]=\"!!option\">{{label ?? value ?? '???'}}-->\n<!--</ng-template>-->\n<!--<ng-template #elseContent>-->\n<!-- <ng-content></ng-content>-->\n<!--</ng-template>-->\n{{label ?? value ?? '???'}}\n<button (click)=\"handleRemove($event)\" *ngIf=\"!disabled\"\n [disabled]=\"((multiselectVisible$ | async) ?? true) === false\" aria-label=\"Clear\"\n class=\"form-multi-select-tag-delete close\" type=\"button\">\n <span aria-hidden=\"true\">\u00D7</span>\n</button>\n", styles: [":host .btn-xs{padding-left:.125rem;padding-right:.125rem;font-size:.575rem;border-radius:.2rem}:host.form-multi-select-tag{-webkit-user-select:none;user-select:none;pointer-events:all}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
8777
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: MultiSelectTagComponent, isStandalone: true, selector: "c-multi-select-tag", inputs: { option: "option", disabled: "disabled", label: "label", value: "value" }, outputs: { remove: "remove" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "{{label ?? value ?? '???'}}\n<button (click)=\"handleRemove($event)\" *ngIf=\"!disabled\"\n [disabled]=\"((multiselectVisible$ | async) ?? true) === false\" aria-label=\"Clear\"\n class=\"form-multi-select-tag-delete close\" type=\"button\">\n <span aria-hidden=\"true\">\u00D7</span>\n</button>\n", styles: [":host .btn-xs{padding-left:.125rem;padding-right:.125rem;font-size:.575rem;border-radius:.2rem}:host.form-multi-select-tag{-webkit-user-select:none;user-select:none;pointer-events:all}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
8808
8778
  }
8809
8779
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: MultiSelectTagComponent, decorators: [{
8810
8780
  type: Component,
8811
- args: [{ selector: 'c-multi-select-tag', standalone: true, imports: [NgIf, AsyncPipe], template: "<!--<ng-template [ngIfElse]=\"elseContent\"-->\n<!-- [ngIf]=\"!!option\">{{label ?? value ?? '???'}}-->\n<!--</ng-template>-->\n<!--<ng-template #elseContent>-->\n<!-- <ng-content></ng-content>-->\n<!--</ng-template>-->\n{{label ?? value ?? '???'}}\n<button (click)=\"handleRemove($event)\" *ngIf=\"!disabled\"\n [disabled]=\"((multiselectVisible$ | async) ?? true) === false\" aria-label=\"Clear\"\n class=\"form-multi-select-tag-delete close\" type=\"button\">\n <span aria-hidden=\"true\">\u00D7</span>\n</button>\n", styles: [":host .btn-xs{padding-left:.125rem;padding-right:.125rem;font-size:.575rem;border-radius:.2rem}:host.form-multi-select-tag{-webkit-user-select:none;user-select:none;pointer-events:all}\n"] }]
8781
+ args: [{ selector: 'c-multi-select-tag', standalone: true, imports: [NgIf, AsyncPipe], template: "{{label ?? value ?? '???'}}\n<button (click)=\"handleRemove($event)\" *ngIf=\"!disabled\"\n [disabled]=\"((multiselectVisible$ | async) ?? true) === false\" aria-label=\"Clear\"\n class=\"form-multi-select-tag-delete close\" type=\"button\">\n <span aria-hidden=\"true\">\u00D7</span>\n</button>\n", styles: [":host .btn-xs{padding-left:.125rem;padding-right:.125rem;font-size:.575rem;border-radius:.2rem}:host.form-multi-select-tag{-webkit-user-select:none;user-select:none;pointer-events:all}\n"] }]
8812
8782
  }], ctorParameters: function () { return [{ type: MultiSelectService }]; }, propDecorators: { option: [{
8813
8783
  type: Input
8814
8784
  }], disabled: [{
@@ -9056,6 +9026,7 @@ class MultiSelectComponent {
9056
9026
  this._subtreeFocused = this.focusOrigin(null);
9057
9027
  this.activeOption = null;
9058
9028
  this.differ = this.iterableDiffers.find(this.#value).create();
9029
+ this.multiSelectService.setSelectionModel(this.multiple);
9059
9030
  }
9060
9031
  #destroy$;
9061
9032
  #optionsReady$;
@@ -9124,6 +9095,7 @@ class MultiSelectComponent {
9124
9095
  */
9125
9096
  set multiple(value) {
9126
9097
  this._multiple = coerceBooleanProperty(value);
9098
+ this.multiSelectService.setSelectionModel(this._multiple);
9127
9099
  }
9128
9100
  get multiple() {
9129
9101
  return this._multiple;
@@ -9395,7 +9367,6 @@ class MultiSelectComponent {
9395
9367
  return !!origin;
9396
9368
  }
9397
9369
  ngOnInit() {
9398
- this.multiSelectService.setSelectionModel(this.multiple);
9399
9370
  this.multiSelectService.selectionModel.changed
9400
9371
  .pipe(filter(() => !this.multiple), delay(0), tap(change => {
9401
9372
  if (change.added.length) {
@@ -9827,7 +9798,7 @@ class MultiSelectComponent {
9827
9798
  {
9828
9799
  provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MultiSelectComponent), multi: true
9829
9800
  }
9830
- ], queries: [{ propertyName: "multiSelectOptionsContent", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], viewQueries: [{ propertyName: "optionsElementRef", first: true, predicate: ["options"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true }, { propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }, { propertyName: "dropdownToggle", first: true, predicate: DropdownToggleDirective, descendants: true, read: ElementRef }, { propertyName: "multiSelectOptionsView", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "scrollViewportView", predicate: ["scrollViewport"], descendants: true }], exportAs: ["cMultiSelect"], usesOnChanges: true, ngImport: i0, template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperjsOptions\"\n class=\"picker\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle>\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <ng-container *ngIf=\"(optionsSelected$ | async) as optionTags\">\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n *ngFor=\"let option of optionTags; index as i\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label ?? option.value\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-container>\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 (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"optionsSelected.size === 0 && selectionType !== 'counter' ? placeholder : null\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"3\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && optionsSelected.size > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" *ngIf=\"!disabled\" [visible]=\"dropdown.visible\" cDropdownMenu>\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"(visibleOptions() && options.length > 0) || loading\">\n <button (click)=\"selectAllOptions()\"\n *ngIf=\"selectAll && multiple && !virtualScroller\"\n class=\"form-multi-select-all\"\n tabindex=\"0\"\n >\n {{ selectAllLabel }}\n </button>\n <ng-container *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\" />\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n <ng-template [ngIf]=\"loading\">\n <c-element-cover [ngStyle]=\"{'border-radius': '6px', 'z-index': 2}\" />\n </ng-template>\n </div>\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n *ngIf=\"optionsArray$ | async as optionsArray\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden' } : { 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n class=\"form-multi-select-options\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n >\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{option.text}}\n </c-multi-select-option>\n</ng-template>\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-block}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPluralPipe, name: "i18nPlural" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MultiSelectTagComponent, selector: "c-multi-select-tag", inputs: ["option", "disabled", "label", "value"], outputs: ["remove"] }, { kind: "component", type: MultiSelectOptionComponent, selector: "c-multi-select-option", inputs: ["optionsStyle", "label", "text", "visible", "disabled", "selected", "value", "active", "role"], outputs: ["selectedChange", "focusChange"], exportAs: ["cMultiSelectOption"] }, { kind: "directive", type: MultiSelectSearchDirective, selector: "[cMultiSelectSearch]", inputs: ["delay", "value"], outputs: ["valueChange"], exportAs: ["cMultiSelectSearch"] }, { 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: ElementCoverComponent, selector: "c-element-cover, [cElementCover]", inputs: ["boundaries", "opacity"] }] }); }
9801
+ ], queries: [{ propertyName: "multiSelectOptionsContent", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], viewQueries: [{ propertyName: "optionsElementRef", first: true, predicate: ["options"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true }, { propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }, { propertyName: "dropdownToggle", first: true, predicate: DropdownToggleDirective, descendants: true, read: ElementRef }, { propertyName: "multiSelectOptionsView", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "scrollViewportView", predicate: ["scrollViewport"], descendants: true }], exportAs: ["cMultiSelect"], usesOnChanges: true, ngImport: i0, template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperjsOptions\"\n class=\"picker\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle>\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <ng-container *ngIf=\"(optionsSelected$ | async) as optionTags\">\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n *ngFor=\"let option of optionTags; index as i\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label ?? option.value\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-container>\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 (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"optionsSelected.size === 0 && selectionType !== 'counter' ? placeholder : null\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"3\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && optionsSelected.size > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" *ngIf=\"!disabled\" [visible]=\"dropdown.visible\" cDropdownMenu>\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"(visibleOptions() && options.length > 0) || loading\">\n <button (click)=\"selectAllOptions()\"\n *ngIf=\"selectAll && multiple && !virtualScroller\"\n class=\"form-multi-select-all\"\n tabindex=\"0\"\n >\n {{ selectAllLabel }}\n </button>\n <ng-container *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\" />\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n <ng-template [ngIf]=\"loading\">\n <c-element-cover [ngStyle]=\"{'border-radius': '6px', 'z-index': 2}\" />\n </ng-template>\n </div>\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n *ngIf=\"optionsArray$ | async as optionsArray\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden' } : { 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n class=\"form-multi-select-options\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n >\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{option.text}}\n </c-multi-select-option>\n</ng-template>\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-block}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host .dropdown-menu{--cui-dropdown-padding-y: 0}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPluralPipe, name: "i18nPlural" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MultiSelectTagComponent, selector: "c-multi-select-tag", inputs: ["option", "disabled", "label", "value"], outputs: ["remove"] }, { kind: "component", type: MultiSelectOptionComponent, selector: "c-multi-select-option", inputs: ["optionsStyle", "label", "text", "visible", "disabled", "selected", "value", "active", "role"], outputs: ["selectedChange", "focusChange"], exportAs: ["cMultiSelectOption"] }, { kind: "directive", type: MultiSelectSearchDirective, selector: "[cMultiSelectSearch]", inputs: ["delay", "value"], outputs: ["valueChange"], exportAs: ["cMultiSelectSearch"] }, { 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: ElementCoverComponent, selector: "c-element-cover, [cElementCover]", inputs: ["boundaries", "opacity"] }] }); }
9831
9802
  }
9832
9803
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: MultiSelectComponent, decorators: [{
9833
9804
  type: Component,
@@ -9855,7 +9826,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
9855
9826
  DropdownToggleDirective,
9856
9827
  DropdownMenuDirective,
9857
9828
  ElementCoverComponent
9858
- ], template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperjsOptions\"\n class=\"picker\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle>\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <ng-container *ngIf=\"(optionsSelected$ | async) as optionTags\">\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n *ngFor=\"let option of optionTags; index as i\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label ?? option.value\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-container>\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 (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"optionsSelected.size === 0 && selectionType !== 'counter' ? placeholder : null\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"3\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && optionsSelected.size > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" *ngIf=\"!disabled\" [visible]=\"dropdown.visible\" cDropdownMenu>\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"(visibleOptions() && options.length > 0) || loading\">\n <button (click)=\"selectAllOptions()\"\n *ngIf=\"selectAll && multiple && !virtualScroller\"\n class=\"form-multi-select-all\"\n tabindex=\"0\"\n >\n {{ selectAllLabel }}\n </button>\n <ng-container *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\" />\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n <ng-template [ngIf]=\"loading\">\n <c-element-cover [ngStyle]=\"{'border-radius': '6px', 'z-index': 2}\" />\n </ng-template>\n </div>\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n *ngIf=\"optionsArray$ | async as optionsArray\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden' } : { 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n class=\"form-multi-select-options\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n >\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{option.text}}\n </c-multi-select-option>\n</ng-template>\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-block}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"] }]
9829
+ ], template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperjsOptions\"\n class=\"picker\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle>\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <ng-container *ngIf=\"(optionsSelected$ | async) as optionTags\">\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n *ngFor=\"let option of optionTags; index as i\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label ?? option.value\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-container>\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 (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"optionsSelected.size === 0 && selectionType !== 'counter' ? placeholder : null\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"3\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && optionsSelected.size > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" *ngIf=\"!disabled\" [visible]=\"dropdown.visible\" cDropdownMenu>\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"(visibleOptions() && options.length > 0) || loading\">\n <button (click)=\"selectAllOptions()\"\n *ngIf=\"selectAll && multiple && !virtualScroller\"\n class=\"form-multi-select-all\"\n tabindex=\"0\"\n >\n {{ selectAllLabel }}\n </button>\n <ng-container *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\" />\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n <ng-template [ngIf]=\"loading\">\n <c-element-cover [ngStyle]=\"{'border-radius': '6px', 'z-index': 2}\" />\n </ng-template>\n </div>\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n *ngIf=\"optionsArray$ | async as optionsArray\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden' } : { 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n class=\"form-multi-select-options\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n >\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{option.text}}\n </c-multi-select-option>\n</ng-template>\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-block}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host .dropdown-menu{--cui-dropdown-padding-y: 0}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"] }]
9859
9830
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: i1$5.FocusMonitor }, { type: MultiSelectService }, { type: i0.IterableDiffers }]; }, propDecorators: { allowCreateOptions: [{
9860
9831
  type: Input
9861
9832
  }], cleaner: [{