@colijnit/corecomponents_v12 262.1.11 → 262.1.13

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.
@@ -7196,6 +7196,9 @@ class InputTextComponent extends BaseInputComponent {
7196
7196
  get isDate() {
7197
7197
  return this.type === "date";
7198
7198
  }
7199
+ get hasValue() {
7200
+ return super.hasValue || (this.placeholder !== '' && this.placeholder !== null && this.placeholder !== undefined);
7201
+ }
7199
7202
  leftIconClick = new EventEmitter();
7200
7203
  leftIconMouseDown = new EventEmitter();
7201
7204
  leftIconMouseUp = new EventEmitter();
@@ -7266,6 +7269,15 @@ class InputTextComponent extends BaseInputComponent {
7266
7269
  this.elementRef = elementRef;
7267
7270
  super._markAsOnPush();
7268
7271
  }
7272
+ ngAfterViewInit() {
7273
+ // label was not correctly being used, so this is a legacy issue fix
7274
+ // if you want to use a placeholder (as a placeholder is meant to be used) then you need to set the label as well
7275
+ if (!this.label) {
7276
+ this.label = this.placeholder;
7277
+ this.placeholder = '';
7278
+ }
7279
+ super.ngAfterViewInit();
7280
+ }
7269
7281
  handleLeftIconClick(event) {
7270
7282
  event.preventDefault();
7271
7283
  event.stopPropagation();
@@ -7458,7 +7470,7 @@ class InputTextComponent extends BaseInputComponent {
7458
7470
  <div class="input-wrapper">
7459
7471
  @if (showPlaceholderOnFocus || (!showPlaceholderOnFocus && !hasValue && !focused)) {
7460
7472
  <label
7461
- [textContent]="placeholder"></label>
7473
+ [textContent]="label"></label>
7462
7474
  }
7463
7475
  @if (!focused && !useContent && formatPipe) {
7464
7476
  <span class="input-text-formatted"
@@ -7472,7 +7484,7 @@ class InputTextComponent extends BaseInputComponent {
7472
7484
  [class.input-input-hidden]="useContent"
7473
7485
  [ngClass]="align"
7474
7486
  [type]="isWeekInputMode ? 'text' : (isFocusedOnDate || (hasValue && emptyPlace)) ? 'date' : (digitsOnly ? 'number' : (type === 'date' ? 'text' : type))"
7475
- [placeholder]="type === 'date' && !isFocusedOnDate ? '' : ''"
7487
+ [placeholder]="type === 'date' && !isFocusedOnDate ? '' : placeholder"
7476
7488
  [pattern]="type === 'date' ? pattern : undefined"
7477
7489
  [ngModel]="model"
7478
7490
  [min]="(type === 'number' || type === 'date') && this.min ? this.min : undefined"
@@ -7534,7 +7546,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
7534
7546
  <div class="input-wrapper">
7535
7547
  @if (showPlaceholderOnFocus || (!showPlaceholderOnFocus && !hasValue && !focused)) {
7536
7548
  <label
7537
- [textContent]="placeholder"></label>
7549
+ [textContent]="label"></label>
7538
7550
  }
7539
7551
  @if (!focused && !useContent && formatPipe) {
7540
7552
  <span class="input-text-formatted"
@@ -7548,7 +7560,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
7548
7560
  [class.input-input-hidden]="useContent"
7549
7561
  [ngClass]="align"
7550
7562
  [type]="isWeekInputMode ? 'text' : (isFocusedOnDate || (hasValue && emptyPlace)) ? 'date' : (digitsOnly ? 'number' : (type === 'date' ? 'text' : type))"
7551
- [placeholder]="type === 'date' && !isFocusedOnDate ? '' : ''"
7563
+ [placeholder]="type === 'date' && !isFocusedOnDate ? '' : placeholder"
7552
7564
  [pattern]="type === 'date' ? pattern : undefined"
7553
7565
  [ngModel]="model"
7554
7566
  [min]="(type === 'number' || type === 'date') && this.min ? this.min : undefined"
@@ -13602,12 +13614,38 @@ class LovUtils {
13602
13614
  .filter(val => val != null && val !== '')
13603
13615
  .join(' - ');
13604
13616
  }
13617
+ static getHighlightParts(value, term) {
13618
+ const text = value ?? '';
13619
+ if (!text || !term) {
13620
+ return [{ text: text, match: false }];
13621
+ }
13622
+ const regex = new RegExp(LovUtils._escapeRegExp(term), 'gi');
13623
+ const parts = [];
13624
+ let lastIndex = 0;
13625
+ let match;
13626
+ while ((match = regex.exec(text)) !== null) {
13627
+ if (match.index > lastIndex) {
13628
+ parts.push({ text: text.slice(lastIndex, match.index), match: false });
13629
+ }
13630
+ parts.push({ text: match[0], match: true });
13631
+ lastIndex = match.index + match[0].length;
13632
+ if (match.index === regex.lastIndex) {
13633
+ regex.lastIndex++;
13634
+ }
13635
+ }
13636
+ if (lastIndex < text.length) {
13637
+ parts.push({ text: text.slice(lastIndex), match: false });
13638
+ }
13639
+ return parts;
13640
+ }
13641
+ static _escapeRegExp(value) {
13642
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
13643
+ }
13605
13644
  }
13606
13645
 
13607
13646
  class ListOfValuesPopupComponent {
13608
13647
  iconCacheService;
13609
13648
  _elementRef;
13610
- lovUtils = LovUtils;
13611
13649
  set lovItems(children) {
13612
13650
  this._lovItems = children.toArray();
13613
13651
  this._scrollIntoView();
@@ -13725,7 +13763,11 @@ class ListOfValuesPopupComponent {
13725
13763
  }
13726
13764
  }
13727
13765
  selectModelByViewModel(viewModel, closePopup = true) {
13728
- this.model = this.viewModelsMain.find(vm => vm === viewModel).model;
13766
+ const found = this.viewModelsMain.find(vm => vm === viewModel);
13767
+ if (!found) {
13768
+ return;
13769
+ }
13770
+ this.model = found.model;
13729
13771
  this.modelChange.emit(this.model);
13730
13772
  this._scrollIntoView();
13731
13773
  if (closePopup) {
@@ -13758,6 +13800,9 @@ class ListOfValuesPopupComponent {
13758
13800
  this.modelChange.emit(this.model);
13759
13801
  }
13760
13802
  selectNextOption(back = false) {
13803
+ if (this.viewModels.length === 0) {
13804
+ return;
13805
+ }
13761
13806
  let nextModel;
13762
13807
  if (!this.highLightModel) {
13763
13808
  nextModel = this.viewModels[back ? this.viewModels.length - 1 : 0];
@@ -13833,6 +13878,9 @@ class ListOfValuesPopupComponent {
13833
13878
  }
13834
13879
  });
13835
13880
  });
13881
+ this.viewModels.forEach((vm) => {
13882
+ vm.highlightParts = LovUtils.getHighlightParts(LovUtils.getDisplayValue(vm.model, this.displayField), this.searchTerm);
13883
+ });
13836
13884
  }
13837
13885
  _scrollIntoView() {
13838
13886
  const activeIndex = this.viewModels.findIndex(vmm => vmm === this.highLightModel);
@@ -13894,18 +13942,30 @@ class ListOfValuesPopupComponent {
13894
13942
  <co-icon class="input-text-left-icon" [iconData]="iconCacheService.getIcon(viewModel.model[optionIcon])">
13895
13943
  </co-icon>
13896
13944
  }
13897
- <span class="lov-options-text" [textContent]="lovUtils.getDisplayValue(viewModel.model, displayField)"></span>
13945
+ <ng-container [ngTemplateOutlet]="optionText" [ngTemplateOutletContext]="{parts: viewModel.highlightParts}"></ng-container>
13898
13946
  }
13899
13947
  @if (multiselect) {
13900
13948
  <co-input-checkbox [model]="viewModel.checked"
13901
13949
  (modelChange)="selectViewModel(viewModel, false)"></co-input-checkbox>
13902
- <span class="lov-options-text" [textContent]="lovUtils.getDisplayValue(viewModel.model, displayField)"></span>
13950
+ <ng-container [ngTemplateOutlet]="optionText" [ngTemplateOutletContext]="{parts: viewModel.highlightParts}"></ng-container>
13903
13951
  }
13904
13952
  </li>
13905
13953
  }
13906
13954
  </ul>
13907
13955
  </div>
13908
- `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: InputCheckboxComponent, selector: "co-input-checkbox", inputs: ["cssClass", "clickableLabel"], outputs: ["modelChange"] }, { kind: "directive", type: OverlayDirective, selector: "[overlay]", inputs: ["overlay", "view", "inline", "keepInView", "inheritWidth", "rightAlign", "fullSize"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutside", "alwaysTrigger"], outputs: ["clickOutside"], exportAs: ["clickOutside"] }, { kind: "component", type: IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: InputSearchComponent, selector: "co-input-search", inputs: ["placeholder", "handleKeydown", "useLeftIcon", "useRightIcon", "leftIconData", "rightIconData", "centerLabel"], outputs: ["search", "isFocused", "leftIconClick", "rightIconClick"] }, { kind: "pipe", type: CoreLocalizePipe, name: "coreLocalize" }], encapsulation: i0.ViewEncapsulation.None });
13956
+
13957
+ <ng-template #optionText let-parts="parts">
13958
+ <span class="lov-options-text">
13959
+ @for (part of parts; track $index) {
13960
+ @if (part.match) {
13961
+ <mark class="lov-highlight" [textContent]="part.text"></mark>
13962
+ } @else {
13963
+ <span [textContent]="part.text"></span>
13964
+ }
13965
+ }
13966
+ </span>
13967
+ </ng-template>
13968
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: InputCheckboxComponent, selector: "co-input-checkbox", inputs: ["cssClass", "clickableLabel"], outputs: ["modelChange"] }, { kind: "directive", type: OverlayDirective, selector: "[overlay]", inputs: ["overlay", "view", "inline", "keepInView", "inheritWidth", "rightAlign", "fullSize"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutside", "alwaysTrigger"], outputs: ["clickOutside"], exportAs: ["clickOutside"] }, { kind: "component", type: IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: InputSearchComponent, selector: "co-input-search", inputs: ["placeholder", "handleKeydown", "useLeftIcon", "useRightIcon", "leftIconData", "rightIconData", "centerLabel"], outputs: ["search", "isFocused", "leftIconClick", "rightIconClick"] }, { kind: "pipe", type: CoreLocalizePipe, name: "coreLocalize" }], encapsulation: i0.ViewEncapsulation.None });
13909
13969
  }
13910
13970
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ListOfValuesPopupComponent, decorators: [{
13911
13971
  type: Component,
@@ -13945,17 +14005,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
13945
14005
  <co-icon class="input-text-left-icon" [iconData]="iconCacheService.getIcon(viewModel.model[optionIcon])">
13946
14006
  </co-icon>
13947
14007
  }
13948
- <span class="lov-options-text" [textContent]="lovUtils.getDisplayValue(viewModel.model, displayField)"></span>
14008
+ <ng-container [ngTemplateOutlet]="optionText" [ngTemplateOutletContext]="{parts: viewModel.highlightParts}"></ng-container>
13949
14009
  }
13950
14010
  @if (multiselect) {
13951
14011
  <co-input-checkbox [model]="viewModel.checked"
13952
14012
  (modelChange)="selectViewModel(viewModel, false)"></co-input-checkbox>
13953
- <span class="lov-options-text" [textContent]="lovUtils.getDisplayValue(viewModel.model, displayField)"></span>
14013
+ <ng-container [ngTemplateOutlet]="optionText" [ngTemplateOutletContext]="{parts: viewModel.highlightParts}"></ng-container>
13954
14014
  }
13955
14015
  </li>
13956
14016
  }
13957
14017
  </ul>
13958
14018
  </div>
14019
+
14020
+ <ng-template #optionText let-parts="parts">
14021
+ <span class="lov-options-text">
14022
+ @for (part of parts; track $index) {
14023
+ @if (part.match) {
14024
+ <mark class="lov-highlight" [textContent]="part.text"></mark>
14025
+ } @else {
14026
+ <span [textContent]="part.text"></span>
14027
+ }
14028
+ }
14029
+ </span>
14030
+ </ng-template>
13959
14031
  `,
13960
14032
  encapsulation: ViewEncapsulation.None,
13961
14033
  standalone: false
@@ -14053,6 +14125,7 @@ class ListOfValuesComponent extends BaseInputComponent {
14053
14125
  isLoading = false;
14054
14126
  _collection = [];
14055
14127
  debounceTimeout;
14128
+ _filterRequestId = 0;
14056
14129
  _lovPopupComponentRef;
14057
14130
  constructor(formComponent, iconCacheService, changeDetector, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) {
14058
14131
  super(changeDetector, overlayService, formUserChangeListener, ngZoneWrapper, elementRef);
@@ -14069,6 +14142,25 @@ class ListOfValuesComponent extends BaseInputComponent {
14069
14142
  super.ngOnInit();
14070
14143
  this._setSelectedModel();
14071
14144
  }
14145
+ // Value shown in the input: the search text while fetching (largeCollection), otherwise the
14146
+ // selected model(s). Lets a single <co-input-text> serve both modes without a template split.
14147
+ get inputModel() {
14148
+ if (this.largeCollection) {
14149
+ return this.filterText;
14150
+ }
14151
+ if (this.multiselect) {
14152
+ return (!this.selectedModels || this.selectedModels.length === 0) ? null : this.selectedModels;
14153
+ }
14154
+ return this.selectedModel;
14155
+ }
14156
+ handleModelChange(model) {
14157
+ if (this.largeCollection) {
14158
+ this.onModelChange(model);
14159
+ }
14160
+ else {
14161
+ this.handleInputModelChange(model);
14162
+ }
14163
+ }
14072
14164
  handleInputModelChange(model) {
14073
14165
  if (this._lovPopupComponentRef) {
14074
14166
  this._lovPopupComponentRef.instance.searchTerm = model;
@@ -14083,26 +14175,33 @@ class ListOfValuesComponent extends BaseInputComponent {
14083
14175
  }
14084
14176
  onModelChange(model) {
14085
14177
  this.isLoading = true;
14178
+ // Mark this keystroke as the latest request immediately, so an older in-flight
14179
+ // request that resolves within the debounce window is still discarded.
14180
+ const requestId = ++this._filterRequestId;
14086
14181
  clearTimeout(this.debounceTimeout);
14087
14182
  this.debounceTimeout = setTimeout(() => {
14088
- this.applyFilter(model);
14183
+ this.applyFilter(model, requestId);
14089
14184
  }, 300);
14090
14185
  }
14091
- async applyFilter(text) {
14186
+ async applyFilter(text, requestId = ++this._filterRequestId) {
14187
+ await new Promise(resolve => setTimeout(resolve, 300));
14188
+ if (requestId !== this._filterRequestId) {
14189
+ return;
14190
+ }
14092
14191
  if (text?.length < 3) {
14093
- await new Promise(resolve => setTimeout(resolve, 300));
14094
14192
  this.collection = undefined;
14193
+ this.filterText = text;
14194
+ this.closePopup();
14195
+ this.isLoading = false;
14196
+ this.changeDetector.detectChanges();
14197
+ return;
14095
14198
  }
14096
- else {
14097
- await new Promise(resolve => setTimeout(resolve, 300));
14098
- this.collection = await this.collectionLoadFn(text);
14199
+ const loaded = await this.collectionLoadFn(text);
14200
+ if (requestId !== this._filterRequestId) {
14201
+ return;
14099
14202
  }
14203
+ this.collection = loaded;
14100
14204
  this.filterText = text;
14101
- if (!this.collection) {
14102
- this.changeDetector.detectChanges();
14103
- this.isLoading = false;
14104
- return [];
14105
- }
14106
14205
  this.filteredCollection = this.collection?.filter((item) => {
14107
14206
  if (this.collectionLoadFnProp && this.collectionLoadFnProp.length > 0) {
14108
14207
  return item[this.collectionLoadFnProp] && item[this.collectionLoadFnProp].toLowerCase().includes(text.toLowerCase());
@@ -14111,12 +14210,19 @@ class ListOfValuesComponent extends BaseInputComponent {
14111
14210
  return true;
14112
14211
  }
14113
14212
  });
14114
- (this.filteredCollection?.length > 0 && this.filterText?.length > 2) ? this.openPopup() : this.closePopup();
14213
+ if (this.filteredCollection?.length > 0 && this.filterText?.length > 2) {
14214
+ this.openPopup(); // no-op when already open
14215
+ if (this._lovPopupComponentRef) {
14216
+ // Refresh the open popup in place; no re-create, so no flicker.
14217
+ this._lovPopupComponentRef.instance.collection = this.collection;
14218
+ this._lovPopupComponentRef.instance.searchTerm = text;
14219
+ }
14220
+ }
14221
+ else {
14222
+ this.closePopup();
14223
+ }
14115
14224
  this.isLoading = false;
14116
14225
  this.changeDetector.detectChanges();
14117
- if (this._lovPopupComponentRef) {
14118
- this._lovPopupComponentRef.instance.searchTerm = text;
14119
- }
14120
14226
  }
14121
14227
  handleInputKeyDown(event) {
14122
14228
  if (event) {
@@ -14161,6 +14267,11 @@ class ListOfValuesComponent extends BaseInputComponent {
14161
14267
  if (this.readonly) {
14162
14268
  return;
14163
14269
  }
14270
+ // Idempotent: keep the existing popup so continued typing refreshes it in place
14271
+ // instead of re-creating it (which would replay the open animation / flicker).
14272
+ if (this._lovPopupComponentRef) {
14273
+ return;
14274
+ }
14164
14275
  this.isSelectOpen = true;
14165
14276
  this._lovPopupComponentRef = this.overlayService.createComponent(ListOfValuesPopupComponent, {
14166
14277
  parentForOverlay: this.elementRef,
@@ -14219,6 +14330,11 @@ class ListOfValuesComponent extends BaseInputComponent {
14219
14330
  this.focused = false;
14220
14331
  }
14221
14332
  checkModel() {
14333
+ if (this.largeCollection) {
14334
+ // The input holds the search text (not a to-be-resolved value) and selection happens via the
14335
+ // popup, so blur must not try to match/clear the model here.
14336
+ return;
14337
+ }
14222
14338
  if (!this.multiselect && this.selectedModel && this.collection) {
14223
14339
  const model = this.collection.find(c => LovUtils.getDisplayValue(c, this.displayField) === this.selectedModel);
14224
14340
  if (model) {
@@ -14251,6 +14367,7 @@ class ListOfValuesComponent extends BaseInputComponent {
14251
14367
  }
14252
14368
  else {
14253
14369
  this.selectedModel = '';
14370
+ this.filterText = '';
14254
14371
  }
14255
14372
  }
14256
14373
  }
@@ -14262,59 +14379,47 @@ class ListOfValuesComponent extends BaseInputComponent {
14262
14379
  useExisting: forwardRef(() => ListOfValuesComponent)
14263
14380
  }
14264
14381
  ], viewQueries: [{ propertyName: "parentForOverlay", first: true, predicate: ["parentForOverlay"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: `
14265
- @if (!largeCollection) {
14266
- <co-input-text
14267
- aria-haspopup="listbox"
14268
- [attr.aria-expanded]="isSelectOpen"
14269
- aria-controls="lov-popup"
14270
- role="combobox"
14271
- class="no-focus-line"
14272
- overlayParent
14273
- #parentForOverlay="overlayParent"
14274
- type="text"
14275
- [id]="label"
14276
- [model]="multiselect ? ((!selectedModels || selectedModels.length === 0) ? null : selectedModels ) : selectedModel"
14277
- [placeholder]="label"
14278
- [myFormInputInstance]="this"
14279
- [readonly]="readonly"
14280
- [disabled]="disabled"
14281
- [required]="required"
14282
- [noClickFocus]="false"
14283
- [leftIconData]=" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : leftIconData"
14284
- [rightIcon]="isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular"
14285
- [showClearButton]="true"
14286
- [useContent]="multiselect"
14287
- [customHeight]="multiselect"
14288
- [keepFocussed]="keepFocussed"
14289
- (modelChange)="handleInputModelChange($event)"
14290
- (click)="openPopup()"
14291
- (rightIconClick)="toggleSelect()"
14292
- (keydown)="handleInputKeyDown($event)"
14293
- (clearIconClick)="clearModel($event)"
14294
- (blur)="checkModel()">
14295
- @if (multiselect && showChips) {
14296
- <div class="multiselect-chips-wrapper">
14297
- @for (chip of model; track chip) {
14298
- <div class="chips">
14299
- <span class="chips-description" [textContent]="lovUtils.getDisplayValue(chip, displayField)"></span>
14300
- <co-icon class="remove-chip-icon" [icon]="icons.CrossSkinny" (click)="removeOptionFromModel(chip)"></co-icon>
14301
- </div>
14302
- }
14303
- </div>
14304
- }
14305
- </co-input-text>
14306
- }
14307
-
14308
- @if (largeCollection) {
14309
- <co-input-text
14310
- [model]="filterText"
14311
- [placeholder]="label"
14312
- [required]="required"
14313
- [disabled]="disabled"
14314
- [readonly]="readonly"
14315
- (modelChange)="onModelChange($event)">
14316
- </co-input-text>
14317
- }
14382
+ <co-input-text
14383
+ aria-haspopup="listbox"
14384
+ [attr.aria-expanded]="isSelectOpen"
14385
+ aria-controls="lov-popup"
14386
+ role="combobox"
14387
+ class="no-focus-line"
14388
+ overlayParent
14389
+ #parentForOverlay="overlayParent"
14390
+ type="text"
14391
+ [id]="label"
14392
+ [model]="inputModel"
14393
+ [label]="label"
14394
+ [placeholder]="searchPlaceholder"
14395
+ [myFormInputInstance]="this"
14396
+ [readonly]="readonly"
14397
+ [disabled]="disabled"
14398
+ [required]="required"
14399
+ [noClickFocus]="false"
14400
+ [leftIconData]=" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : leftIconData"
14401
+ [rightIcon]="isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular"
14402
+ [showClearButton]="true"
14403
+ [useContent]="multiselect"
14404
+ [customHeight]="multiselect"
14405
+ [keepFocussed]="keepFocussed"
14406
+ (modelChange)="handleModelChange($event)"
14407
+ (click)="openPopup()"
14408
+ (rightIconClick)="toggleSelect()"
14409
+ (keydown)="handleInputKeyDown($event)"
14410
+ (clearIconClick)="clearModel($event)"
14411
+ (blur)="checkModel()">
14412
+ @if (multiselect && showChips) {
14413
+ <div class="multiselect-chips-wrapper">
14414
+ @for (chip of model; track chip) {
14415
+ <div class="chips">
14416
+ <span class="chips-description" [textContent]="lovUtils.getDisplayValue(chip, displayField)"></span>
14417
+ <co-icon class="remove-chip-icon" [icon]="icons.CrossSkinny" (click)="removeOptionFromModel(chip)"></co-icon>
14418
+ </div>
14419
+ }
14420
+ </div>
14421
+ }
14422
+ </co-input-text>
14318
14423
  @if (isLoading) {
14319
14424
  <div class="filter-loader"><span></span></div>
14320
14425
  }
@@ -14326,59 +14431,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
14326
14431
  args: [{
14327
14432
  selector: 'co-list-of-values',
14328
14433
  template: `
14329
- @if (!largeCollection) {
14330
- <co-input-text
14331
- aria-haspopup="listbox"
14332
- [attr.aria-expanded]="isSelectOpen"
14333
- aria-controls="lov-popup"
14334
- role="combobox"
14335
- class="no-focus-line"
14336
- overlayParent
14337
- #parentForOverlay="overlayParent"
14338
- type="text"
14339
- [id]="label"
14340
- [model]="multiselect ? ((!selectedModels || selectedModels.length === 0) ? null : selectedModels ) : selectedModel"
14341
- [placeholder]="label"
14342
- [myFormInputInstance]="this"
14343
- [readonly]="readonly"
14344
- [disabled]="disabled"
14345
- [required]="required"
14346
- [noClickFocus]="false"
14347
- [leftIconData]=" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : leftIconData"
14348
- [rightIcon]="isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular"
14349
- [showClearButton]="true"
14350
- [useContent]="multiselect"
14351
- [customHeight]="multiselect"
14352
- [keepFocussed]="keepFocussed"
14353
- (modelChange)="handleInputModelChange($event)"
14354
- (click)="openPopup()"
14355
- (rightIconClick)="toggleSelect()"
14356
- (keydown)="handleInputKeyDown($event)"
14357
- (clearIconClick)="clearModel($event)"
14358
- (blur)="checkModel()">
14359
- @if (multiselect && showChips) {
14360
- <div class="multiselect-chips-wrapper">
14361
- @for (chip of model; track chip) {
14362
- <div class="chips">
14363
- <span class="chips-description" [textContent]="lovUtils.getDisplayValue(chip, displayField)"></span>
14364
- <co-icon class="remove-chip-icon" [icon]="icons.CrossSkinny" (click)="removeOptionFromModel(chip)"></co-icon>
14365
- </div>
14366
- }
14367
- </div>
14368
- }
14369
- </co-input-text>
14370
- }
14371
-
14372
- @if (largeCollection) {
14373
- <co-input-text
14374
- [model]="filterText"
14375
- [placeholder]="label"
14376
- [required]="required"
14377
- [disabled]="disabled"
14378
- [readonly]="readonly"
14379
- (modelChange)="onModelChange($event)">
14380
- </co-input-text>
14381
- }
14434
+ <co-input-text
14435
+ aria-haspopup="listbox"
14436
+ [attr.aria-expanded]="isSelectOpen"
14437
+ aria-controls="lov-popup"
14438
+ role="combobox"
14439
+ class="no-focus-line"
14440
+ overlayParent
14441
+ #parentForOverlay="overlayParent"
14442
+ type="text"
14443
+ [id]="label"
14444
+ [model]="inputModel"
14445
+ [label]="label"
14446
+ [placeholder]="searchPlaceholder"
14447
+ [myFormInputInstance]="this"
14448
+ [readonly]="readonly"
14449
+ [disabled]="disabled"
14450
+ [required]="required"
14451
+ [noClickFocus]="false"
14452
+ [leftIconData]=" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : leftIconData"
14453
+ [rightIcon]="isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular"
14454
+ [showClearButton]="true"
14455
+ [useContent]="multiselect"
14456
+ [customHeight]="multiselect"
14457
+ [keepFocussed]="keepFocussed"
14458
+ (modelChange)="handleModelChange($event)"
14459
+ (click)="openPopup()"
14460
+ (rightIconClick)="toggleSelect()"
14461
+ (keydown)="handleInputKeyDown($event)"
14462
+ (clearIconClick)="clearModel($event)"
14463
+ (blur)="checkModel()">
14464
+ @if (multiselect && showChips) {
14465
+ <div class="multiselect-chips-wrapper">
14466
+ @for (chip of model; track chip) {
14467
+ <div class="chips">
14468
+ <span class="chips-description" [textContent]="lovUtils.getDisplayValue(chip, displayField)"></span>
14469
+ <co-icon class="remove-chip-icon" [icon]="icons.CrossSkinny" (click)="removeOptionFromModel(chip)"></co-icon>
14470
+ </div>
14471
+ }
14472
+ </div>
14473
+ }
14474
+ </co-input-text>
14382
14475
  @if (isLoading) {
14383
14476
  <div class="filter-loader"><span></span></div>
14384
14477
  }