@kris701/ez-ui 1.2.17 → 1.2.18

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.
@@ -19,6 +19,7 @@ import * as i4$2 from '@taiga-ui/layout';
19
19
  import { TuiHeader, TuiElasticContainer, TuiBlockStatus, TuiNavigation, TuiAsideGroupComponent } from '@taiga-ui/layout';
20
20
  import { marked } from 'marked';
21
21
  import Compressor from 'compressorjs';
22
+ import { TuiAutoFocus } from '@taiga-ui/cdk';
22
23
  import * as i7 from '@taiga-ui/cdk/directives/item';
23
24
  import * as i3$2 from '@taiga-ui/addon-table';
24
25
  import { TuiTablePagination, TuiTable } from '@taiga-ui/addon-table';
@@ -2957,9 +2958,9 @@ class EzUIMultiSelect {
2957
2958
  disabled = false;
2958
2959
  selected = undefined;
2959
2960
  selectedChange = new EventEmitter();
2960
- appearanceMap = {
2961
- "b": "negative"
2962
- };
2961
+ appearanceMap = {};
2962
+ enableSearch = false;
2963
+ searchValue = "";
2963
2964
  ngOnChanges(changes) {
2964
2965
  if (changes['selected'] && changes['selected'].currentValue != changes['selected'].previousValue) {
2965
2966
  this.selected = changes['selected'].currentValue;
@@ -2981,26 +2982,33 @@ class EzUIMultiSelect {
2981
2982
  return item[this.optionValue];
2982
2983
  }
2983
2984
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIMultiSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
2984
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUIMultiSelect, isStandalone: true, selector: "ezui-multiselect", inputs: { icon: "icon", label: "label", size: "size", optionLabel: "optionLabel", optionValue: "optionValue", options: "options", disabled: "disabled", selected: "selected", appearanceMap: "appearanceMap" }, outputs: { selectedChange: "selectedChange" }, usesOnChanges: true, ngImport: i0, template: `
2985
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUIMultiSelect, isStandalone: true, selector: "ezui-multiselect", inputs: { icon: "icon", label: "label", size: "size", optionLabel: "optionLabel", optionValue: "optionValue", options: "options", disabled: "disabled", selected: "selected", appearanceMap: "appearanceMap", enableSearch: "enableSearch" }, outputs: { selectedChange: "selectedChange" }, usesOnChanges: true, ngImport: i0, template: `
2985
2986
  <tui-textfield multi tuiChevron [stringify]="stringify" [tuiTextfieldSize]="size" [iconStart]="icon">
2986
- @if(label != ''){
2987
+ @if(label != '' && size != 's'){
2987
2988
  <label tuiLabel>{{label}}</label>
2988
2989
  }
2989
- <input tuiInputChip tuiSelectLike [(ngModel)]="selected" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
2990
+ <input tuiInputChip tuiSelectLike [(ngModel)]="selected" [placeholder]="size == 's' ? label : ''" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
2990
2991
  <tui-input-chip
2991
2992
  *tuiItem="let context"
2992
2993
  [appearance]="appearanceMap[context.item] ? appearanceMap[context.item] : 'neutral'"/>
2993
2994
  <tui-data-list *tuiDropdown tuiMultiSelectGroup >
2995
+ @if(enableSearch){
2996
+ <tui-textfield tuiTextfieldSize="s" iconStart="search" (click)="field.focus()">
2997
+ <input tuiInput tuiAutoFocus #field [(ngModel)]="searchValue"/>
2998
+ </tui-textfield>
2999
+ }
2994
3000
  @for (item of options; track getOptionValue(item)) {
2995
- @let value = getOptionValue(item);
2996
3001
  @let label = getOptionLabel(item);
2997
- <button tuiOption [value]="value" >
2998
- <span tuiChip size="xs" [appearance]="appearanceMap[value] ? appearanceMap[value] : 'neutral'">{{label}}</span>
2999
- </button>
3002
+ @if(!enableSearch || (searchValue == '' || label.includes(searchValue))){
3003
+ @let value = getOptionValue(item);
3004
+ <button tuiOption [value]="value" >
3005
+ <span tuiChip size="xs" [appearance]="appearanceMap[value] ? appearanceMap[value] : 'neutral'">{{label}}</span>
3006
+ </button>
3007
+ }
3000
3008
  }
3001
3009
  </tui-data-list>
3002
3010
  </tui-textfield>
3003
- `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4$1.TuiMultiSelectGroupDirective, selector: "[tuiMultiSelectGroup]" }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "directive", type: i3.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: i3$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$1.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i3$1.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "directive", type: i7.TuiItem, selector: "[tuiItem]" }, { kind: "component", type: i3$1.TuiTextfieldMultiComponent, selector: "tui-textfield[multi]", inputs: ["rows"] }, { kind: "directive", type: i4$1.TuiInputChipDirective, selector: "input[tuiInputChip]", inputs: ["separator", "unique"] }, { kind: "component", type: i4$1.TuiInputChipComponent, selector: "tui-input-chip", inputs: ["editable"] }, { kind: "directive", type: TuiSelectLike, selector: "[tuiSelectLike]" }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "directive", type: TuiChip, selector: "[tuiChip]", inputs: ["size"] }] });
3011
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4$1.TuiMultiSelectGroupDirective, selector: "[tuiMultiSelectGroup]" }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler", "invalid", "tuiAppearanceFocus", "tuiAppearanceState"] }, { kind: "directive", type: i3.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: i3$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$1.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i3$1.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "directive", type: i7.TuiItem, selector: "[tuiItem]" }, { kind: "component", type: i3$1.TuiTextfieldMultiComponent, selector: "tui-textfield[multi]", inputs: ["rows"] }, { kind: "directive", type: i4$1.TuiInputChipDirective, selector: "input[tuiInputChip]", inputs: ["separator", "unique"] }, { kind: "component", type: i4$1.TuiInputChipComponent, selector: "tui-input-chip", inputs: ["editable"] }, { kind: "directive", type: TuiSelectLike, selector: "[tuiSelectLike]" }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "directive", type: TuiChip, selector: "[tuiChip]", inputs: ["size"] }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "directive", type: i3$1.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "readonly", "invalid", "focused", "state"] }] });
3004
3012
  }
3005
3013
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIMultiSelect, decorators: [{
3006
3014
  type: Component,
@@ -3016,23 +3024,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
3016
3024
  TuiMultiSelect,
3017
3025
  TuiDropdown,
3018
3026
  TuiChevron,
3019
- TuiChip
3027
+ TuiChip,
3028
+ TuiAutoFocus,
3029
+ TuiInput
3020
3030
  ], template: `
3021
3031
  <tui-textfield multi tuiChevron [stringify]="stringify" [tuiTextfieldSize]="size" [iconStart]="icon">
3022
- @if(label != ''){
3032
+ @if(label != '' && size != 's'){
3023
3033
  <label tuiLabel>{{label}}</label>
3024
3034
  }
3025
- <input tuiInputChip tuiSelectLike [(ngModel)]="selected" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
3035
+ <input tuiInputChip tuiSelectLike [(ngModel)]="selected" [placeholder]="size == 's' ? label : ''" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
3026
3036
  <tui-input-chip
3027
3037
  *tuiItem="let context"
3028
3038
  [appearance]="appearanceMap[context.item] ? appearanceMap[context.item] : 'neutral'"/>
3029
3039
  <tui-data-list *tuiDropdown tuiMultiSelectGroup >
3040
+ @if(enableSearch){
3041
+ <tui-textfield tuiTextfieldSize="s" iconStart="search" (click)="field.focus()">
3042
+ <input tuiInput tuiAutoFocus #field [(ngModel)]="searchValue"/>
3043
+ </tui-textfield>
3044
+ }
3030
3045
  @for (item of options; track getOptionValue(item)) {
3031
- @let value = getOptionValue(item);
3032
3046
  @let label = getOptionLabel(item);
3033
- <button tuiOption [value]="value" >
3034
- <span tuiChip size="xs" [appearance]="appearanceMap[value] ? appearanceMap[value] : 'neutral'">{{label}}</span>
3035
- </button>
3047
+ @if(!enableSearch || (searchValue == '' || label.includes(searchValue))){
3048
+ @let value = getOptionValue(item);
3049
+ <button tuiOption [value]="value" >
3050
+ <span tuiChip size="xs" [appearance]="appearanceMap[value] ? appearanceMap[value] : 'neutral'">{{label}}</span>
3051
+ </button>
3052
+ }
3036
3053
  }
3037
3054
  </tui-data-list>
3038
3055
  </tui-textfield>
@@ -3057,6 +3074,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
3057
3074
  type: Output
3058
3075
  }], appearanceMap: [{
3059
3076
  type: Input
3077
+ }], enableSearch: [{
3078
+ type: Input
3060
3079
  }] } });
3061
3080
 
3062
3081
  class EzUINumberInput {
@@ -3181,6 +3200,8 @@ class EzUISelect {
3181
3200
  selected = undefined;
3182
3201
  selectedChange = new EventEmitter();
3183
3202
  appearanceMap = {};
3203
+ enableSearch = false;
3204
+ searchValue = "";
3184
3205
  ngOnChanges(changes) {
3185
3206
  if (changes['selected'] && changes['selected'].currentValue != changes['selected'].previousValue) {
3186
3207
  this.selected = changes['selected'].currentValue;
@@ -3202,19 +3223,26 @@ class EzUISelect {
3202
3223
  return item[this.optionValue];
3203
3224
  }
3204
3225
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUISelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
3205
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUISelect, isStandalone: true, selector: "ezui-select", inputs: { icon: "icon", label: "label", size: "size", optionLabel: "optionLabel", optionValue: "optionValue", options: "options", disabled: "disabled", selected: "selected", appearanceMap: "appearanceMap" }, outputs: { selectedChange: "selectedChange" }, usesOnChanges: true, ngImport: i0, template: `
3226
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUISelect, isStandalone: true, selector: "ezui-select", inputs: { icon: "icon", label: "label", size: "size", optionLabel: "optionLabel", optionValue: "optionValue", options: "options", disabled: "disabled", selected: "selected", appearanceMap: "appearanceMap", enableSearch: "enableSearch" }, outputs: { selectedChange: "selectedChange" }, usesOnChanges: true, ngImport: i0, template: `
3206
3227
  <tui-textfield tuiChevron [content]="content" [tuiTextfieldSize]="size" [iconStart]="icon">
3207
- @if(label != ''){
3228
+ @if(label != '' && size != 's'){
3208
3229
  <label tuiLabel>{{label}}</label>
3209
3230
  }
3210
- <input tuiSelect [(ngModel)]="selected" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
3231
+ <input tuiSelect [(ngModel)]="selected" [placeholder]="size == 's' ? label : ''" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
3211
3232
  <tui-data-list *tuiDropdown >
3233
+ @if(enableSearch){
3234
+ <tui-textfield tuiTextfieldSize="s" iconStart="search">
3235
+ <input tuiInput tuiAutoFocus #field [(ngModel)]="searchValue" (click)="field.focus()"/>
3236
+ </tui-textfield>
3237
+ }
3212
3238
  @for (item of options; track getOptionValue(item)) {
3213
- @let value = getOptionValue(item);
3214
3239
  @let label = getOptionLabel(item);
3215
- <button tuiOption [value]="value" >
3216
- <span tuiChip size="xs" [appearance]="appearanceMap[value]">{{label}}</span>
3217
- </button>
3240
+ @if(!enableSearch || (searchValue == '' || label.includes(searchValue))){
3241
+ @let value = getOptionValue(item);
3242
+ <button tuiOption [value]="value" >
3243
+ <span tuiChip size="xs" [appearance]="appearanceMap[value]">{{label}}</span>
3244
+ </button>
3245
+ }
3218
3246
  }
3219
3247
  </tui-data-list>
3220
3248
  </tui-textfield>
@@ -3222,7 +3250,7 @@ class EzUISelect {
3222
3250
  <ng-template #content>
3223
3251
  <span tuiChip [size]="label != '' ? 'xxs' : 'xs'" [appearance]="appearanceMap[selected]">{{stringify(selected)}}</span>
3224
3252
  </ng-template>
3225
- `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler", "invalid", "tuiAppearanceFocus", "tuiAppearanceState"] }, { kind: "directive", type: i3.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: i3$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$1.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i3$1.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "directive", type: TuiChip, selector: "[tuiChip]", inputs: ["size"] }] });
3253
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler", "invalid", "tuiAppearanceFocus", "tuiAppearanceState"] }, { kind: "directive", type: i3.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: i3$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$1.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i3$1.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "directive", type: i3$1.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "readonly", "invalid", "focused", "state"] }, { kind: "directive", type: TuiChip, selector: "[tuiChip]", inputs: ["size"] }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }] });
3226
3254
  }
3227
3255
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUISelect, decorators: [{
3228
3256
  type: Component,
@@ -3235,20 +3263,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
3235
3263
  TuiDropdown,
3236
3264
  TuiChevron,
3237
3265
  TuiInput,
3238
- TuiChip
3266
+ TuiChip,
3267
+ TuiAutoFocus
3239
3268
  ], template: `
3240
3269
  <tui-textfield tuiChevron [content]="content" [tuiTextfieldSize]="size" [iconStart]="icon">
3241
- @if(label != ''){
3270
+ @if(label != '' && size != 's'){
3242
3271
  <label tuiLabel>{{label}}</label>
3243
3272
  }
3244
- <input tuiSelect [(ngModel)]="selected" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
3273
+ <input tuiSelect [(ngModel)]="selected" [placeholder]="size == 's' ? label : ''" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
3245
3274
  <tui-data-list *tuiDropdown >
3275
+ @if(enableSearch){
3276
+ <tui-textfield tuiTextfieldSize="s" iconStart="search">
3277
+ <input tuiInput tuiAutoFocus #field [(ngModel)]="searchValue" (click)="field.focus()"/>
3278
+ </tui-textfield>
3279
+ }
3246
3280
  @for (item of options; track getOptionValue(item)) {
3247
- @let value = getOptionValue(item);
3248
3281
  @let label = getOptionLabel(item);
3249
- <button tuiOption [value]="value" >
3250
- <span tuiChip size="xs" [appearance]="appearanceMap[value]">{{label}}</span>
3251
- </button>
3282
+ @if(!enableSearch || (searchValue == '' || label.includes(searchValue))){
3283
+ @let value = getOptionValue(item);
3284
+ <button tuiOption [value]="value" >
3285
+ <span tuiChip size="xs" [appearance]="appearanceMap[value]">{{label}}</span>
3286
+ </button>
3287
+ }
3252
3288
  }
3253
3289
  </tui-data-list>
3254
3290
  </tui-textfield>
@@ -3277,6 +3313,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
3277
3313
  type: Output
3278
3314
  }], appearanceMap: [{
3279
3315
  type: Input
3316
+ }], enableSearch: [{
3317
+ type: Input
3280
3318
  }] } });
3281
3319
 
3282
3320
  class EzUIShowMoreText {