@kris701/ez-ui 1.2.4 → 1.2.6

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,13 +1,13 @@
1
1
  import * as i2$1 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, Output, Input, Component, signal, ViewChild, ContentChild, Directive, inject, viewChild } from '@angular/core';
4
+ import { EventEmitter, Output, Input, Component, signal, ContentChild, ViewChild, Directive, inject, viewChild } from '@angular/core';
5
5
  import * as i1 from '@angular/forms';
6
6
  import { FormsModule } from '@angular/forms';
7
7
  import * as i3$1 from '@taiga-ui/core';
8
- import { TuiIcon, TuiInput, TuiButton, TuiDropdown, TuiOption, TuiGroup, TuiScrollbar, TuiSelectLike, TuiDataList, TuiTextfield, TuiLink, TuiHint, TuiLoader, TuiCheckbox, TUI_DARK_MODE, TuiRoot } from '@taiga-ui/core';
8
+ import { TuiIcon, TuiInput, TuiButton, TuiTitle, TuiLoader, TuiDialog, TuiDropdown, TuiOption, TuiGroup, TuiScrollbar, TuiSelectLike, TuiDataList, TuiTextfield, TuiLink, TuiHint, TuiCheckbox, TUI_DARK_MODE, TuiRoot } from '@taiga-ui/core';
9
9
  import * as i4$1 from '@taiga-ui/kit';
10
- import { TuiBlock, TuiSwitch, TuiInputDate, TuiInputDateTime, TuiFiles, TuiChevron, TuiTextarea, TuiMultiSelect, TuiInputNumber, TuiInputChip, TuiPassword, TuiSelect, TuiBadge, TuiStatus, TuiDataListWrapper, TuiBadgeNotification, TuiBadgedContent, TuiButtonSelect, TuiStringifyContentPipe, TUI_CONFIRM } from '@taiga-ui/kit';
10
+ import { TuiBlock, TuiSwitch, TuiInputDate, TuiInputDateTime, TuiFiles, TuiChevron, TuiTextarea, TuiChip, TuiMultiSelect, TuiInputNumber, TuiInputChip, TuiPassword, TuiSelect, TuiBadge, TuiStatus, TuiDataListWrapper, TuiBadgeNotification, TuiBadgedContent, TuiButtonSelect, TuiStringifyContentPipe, TUI_CONFIRM } from '@taiga-ui/kit';
11
11
  import * as i3$3 from '@taiga-ui/addon-mobile';
12
12
  import { TuiDropdownSheet } from '@taiga-ui/addon-mobile';
13
13
  import { TuiDay, TuiTime } from '@taiga-ui/cdk/date-time';
@@ -15,11 +15,11 @@ import * as i2 from '@taiga-ui/core/components/label';
15
15
  import * as i3 from '@taiga-ui/core/components/textfield';
16
16
  import * as i4 from '@taiga-ui/core/portals/dropdown';
17
17
  import * as i6 from '@taiga-ui/core/components/calendar';
18
+ import * as i4$2 from '@taiga-ui/layout';
19
+ import { TuiHeader, TuiElasticContainer, TuiBlockStatus, TuiNavigation, TuiAsideGroupComponent } from '@taiga-ui/layout';
18
20
  import { marked } from 'marked';
19
21
  import Compressor from 'compressorjs';
20
22
  import * as i7 from '@taiga-ui/cdk/directives/item';
21
- import * as i4$2 from '@taiga-ui/layout';
22
- import { TuiElasticContainer, TuiBlockStatus, TuiNavigation, TuiAsideGroupComponent } from '@taiga-ui/layout';
23
23
  import * as i3$2 from '@taiga-ui/addon-table';
24
24
  import { TuiTablePagination, TuiTable } from '@taiga-ui/addon-table';
25
25
  import { v4 } from 'uuid';
@@ -368,6 +368,103 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
368
368
  type: Output
369
369
  }] } });
370
370
 
371
+ class EzUIDialog {
372
+ layoutService;
373
+ content;
374
+ size = 'm';
375
+ title = '';
376
+ isLoading = signal(false, /* @ts-ignore */
377
+ ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
378
+ showDialog = signal(false, /* @ts-ignore */
379
+ ...(ngDevMode ? [{ debugName: "showDialog" }] : /* istanbul ignore next */ []));
380
+ showSave = false;
381
+ showDelete = false;
382
+ onSaveItem = new EventEmitter();
383
+ onDeleteItem = new EventEmitter();
384
+ constructor(layoutService) {
385
+ this.layoutService = layoutService;
386
+ }
387
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIDialog, deps: [{ token: EzUILayoutService }], target: i0.ɵɵFactoryTarget.Component });
388
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUIDialog, isStandalone: true, selector: "ezui-dialog", inputs: { size: "size", title: "title", isLoading: "isLoading", showDialog: "showDialog", showSave: "showSave", showDelete: "showDelete" }, outputs: { onSaveItem: "onSaveItem", onDeleteItem: "onDeleteItem" }, queries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: `
389
+ <ng-template let-id="id" [tuiDialogOptions]="{size: size, appearance: layoutService.isDesktop() ? 'taiga compact' : 'fullscreen'}" [(tuiDialog)]="showDialog">
390
+ <header tuiHeader>
391
+ <hgroup tuiTitle>
392
+ <h2 [id]="id">{{title}}</h2>
393
+ </hgroup>
394
+ </header>
395
+
396
+ <tui-loader [overlay]="true" [loading]="isLoading()">
397
+ <ng-container [ngTemplateOutlet]="content"></ng-container>
398
+ </tui-loader>
399
+
400
+ @if(!isLoading() && (showSave || showDelete)){
401
+ <footer class="dialog-footer">
402
+ @if(showSave){
403
+ <button tuiButton iconStart="save" size="s" (click)="onSaveItem.emit()">Save</button>
404
+ }
405
+ @if(showDelete){
406
+ <button tuiButton iconStart="x" size="s" appearance="negative" (click)="onDeleteItem.emit()">Delete</button>
407
+ }
408
+ </footer>
409
+ }
410
+ </ng-template>
411
+ `, isInline: true, styles: [".dialog-footer{display:flex!important;flex-direction:row!important;gap:5px!important;margin-top:auto!important;margin-block-start:auto!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiHeader, selector: "[tuiHeader]", inputs: ["tuiHeader"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }, { kind: "directive", type: TuiDialog, selector: "ng-template[tuiDialog]", inputs: ["tuiDialogOptions"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }] });
412
+ }
413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIDialog, decorators: [{
414
+ type: Component,
415
+ args: [{ selector: 'ezui-dialog', imports: [
416
+ FormsModule,
417
+ CommonModule,
418
+ TuiHeader,
419
+ TuiTitle,
420
+ TuiLoader,
421
+ TuiDialog,
422
+ TuiButton
423
+ ], template: `
424
+ <ng-template let-id="id" [tuiDialogOptions]="{size: size, appearance: layoutService.isDesktop() ? 'taiga compact' : 'fullscreen'}" [(tuiDialog)]="showDialog">
425
+ <header tuiHeader>
426
+ <hgroup tuiTitle>
427
+ <h2 [id]="id">{{title}}</h2>
428
+ </hgroup>
429
+ </header>
430
+
431
+ <tui-loader [overlay]="true" [loading]="isLoading()">
432
+ <ng-container [ngTemplateOutlet]="content"></ng-container>
433
+ </tui-loader>
434
+
435
+ @if(!isLoading() && (showSave || showDelete)){
436
+ <footer class="dialog-footer">
437
+ @if(showSave){
438
+ <button tuiButton iconStart="save" size="s" (click)="onSaveItem.emit()">Save</button>
439
+ }
440
+ @if(showDelete){
441
+ <button tuiButton iconStart="x" size="s" appearance="negative" (click)="onDeleteItem.emit()">Delete</button>
442
+ }
443
+ </footer>
444
+ }
445
+ </ng-template>
446
+ `, styles: [".dialog-footer{display:flex!important;flex-direction:row!important;gap:5px!important;margin-top:auto!important;margin-block-start:auto!important}\n"] }]
447
+ }], ctorParameters: () => [{ type: EzUILayoutService }], propDecorators: { content: [{
448
+ type: ContentChild,
449
+ args: ['content', { static: false }]
450
+ }], size: [{
451
+ type: Input
452
+ }], title: [{
453
+ type: Input
454
+ }], isLoading: [{
455
+ type: Input
456
+ }], showDialog: [{
457
+ type: Input
458
+ }], showSave: [{
459
+ type: Input
460
+ }], showDelete: [{
461
+ type: Input
462
+ }], onSaveItem: [{
463
+ type: Output
464
+ }], onDeleteItem: [{
465
+ type: Output
466
+ }] } });
467
+
371
468
  class EzUIFileInput {
372
469
  files = signal([], /* @ts-ignore */
373
470
  ...(ngDevMode ? [{ debugName: "files" }] : /* istanbul ignore next */ []));
@@ -2860,6 +2957,7 @@ class EzUIMultiSelect {
2860
2957
  disabled = false;
2861
2958
  selected = undefined;
2862
2959
  selectedChange = new EventEmitter();
2960
+ appearanceMap = {};
2863
2961
  ngOnChanges(changes) {
2864
2962
  if (changes['selected'] && changes['selected'].currentValue != changes['selected'].previousValue) {
2865
2963
  this.selected = changes['selected'].currentValue;
@@ -2881,22 +2979,26 @@ class EzUIMultiSelect {
2881
2979
  return item[this.optionValue];
2882
2980
  }
2883
2981
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIMultiSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
2884
- 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" }, outputs: { selectedChange: "selectedChange" }, usesOnChanges: true, ngImport: i0, template: `
2982
+ 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: `
2885
2983
  <tui-textfield multi tuiChevron [stringify]="stringify" [tuiTextfieldSize]="size" [iconStart]="icon">
2886
2984
  @if(label != ''){
2887
2985
  <label tuiLabel>{{label}}</label>
2888
2986
  }
2889
2987
  <input tuiInputChip tuiSelectLike [(ngModel)]="selected" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
2890
- <tui-input-chip *tuiItem />
2988
+ <tui-input-chip
2989
+ *tuiItem="let context"
2990
+ [appearance]="appearanceMap[getOptionValue(context.item)] ? appearanceMap[getOptionValue(context.item)] : 'neutral'"/>
2891
2991
  <tui-data-list *tuiDropdown tuiMultiSelectGroup >
2892
2992
  @for (item of options; track getOptionValue(item)) {
2893
- <button tuiOption [value]="getOptionValue(item)">
2894
- {{ getOptionLabel(item) }}
2993
+ @let value = getOptionValue(item);
2994
+ @let label = getOptionLabel(item);
2995
+ <button tuiOption [value]="value" >
2996
+ <span tuiChip size="xs" [appearance]="appearanceMap[value]">{{label}}</span>
2895
2997
  </button>
2896
2998
  }
2897
2999
  </tui-data-list>
2898
3000
  </tui-textfield>
2899
- `, 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"] }] });
3001
+ `, 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"] }] });
2900
3002
  }
2901
3003
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIMultiSelect, decorators: [{
2902
3004
  type: Component,
@@ -2911,18 +3013,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
2911
3013
  TuiSelectLike,
2912
3014
  TuiMultiSelect,
2913
3015
  TuiDropdown,
2914
- TuiChevron
3016
+ TuiChevron,
3017
+ TuiChip
2915
3018
  ], template: `
2916
3019
  <tui-textfield multi tuiChevron [stringify]="stringify" [tuiTextfieldSize]="size" [iconStart]="icon">
2917
3020
  @if(label != ''){
2918
3021
  <label tuiLabel>{{label}}</label>
2919
3022
  }
2920
3023
  <input tuiInputChip tuiSelectLike [(ngModel)]="selected" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
2921
- <tui-input-chip *tuiItem />
3024
+ <tui-input-chip
3025
+ *tuiItem="let context"
3026
+ [appearance]="appearanceMap[getOptionValue(context.item)] ? appearanceMap[getOptionValue(context.item)] : 'neutral'"/>
2922
3027
  <tui-data-list *tuiDropdown tuiMultiSelectGroup >
2923
3028
  @for (item of options; track getOptionValue(item)) {
2924
- <button tuiOption [value]="getOptionValue(item)">
2925
- {{ getOptionLabel(item) }}
3029
+ @let value = getOptionValue(item);
3030
+ @let label = getOptionLabel(item);
3031
+ <button tuiOption [value]="value" >
3032
+ <span tuiChip size="xs" [appearance]="appearanceMap[value]">{{label}}</span>
2926
3033
  </button>
2927
3034
  }
2928
3035
  </tui-data-list>
@@ -2946,6 +3053,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
2946
3053
  type: Input
2947
3054
  }], selectedChange: [{
2948
3055
  type: Output
3056
+ }], appearanceMap: [{
3057
+ type: Input
2949
3058
  }] } });
2950
3059
 
2951
3060
  class EzUINumberInput {
@@ -3069,6 +3178,7 @@ class EzUISelect {
3069
3178
  disabled = false;
3070
3179
  selected = undefined;
3071
3180
  selectedChange = new EventEmitter();
3181
+ appearanceMap = {};
3072
3182
  ngOnChanges(changes) {
3073
3183
  if (changes['selected'] && changes['selected'].currentValue != changes['selected'].previousValue) {
3074
3184
  this.selected = changes['selected'].currentValue;
@@ -3090,21 +3200,27 @@ class EzUISelect {
3090
3200
  return item[this.optionValue];
3091
3201
  }
3092
3202
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUISelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
3093
- 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" }, outputs: { selectedChange: "selectedChange" }, usesOnChanges: true, ngImport: i0, template: `
3094
- <tui-textfield tuiChevron [stringify]="stringify" [tuiTextfieldSize]="size" [iconStart]="icon">
3203
+ 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: `
3204
+ <tui-textfield tuiChevron [content]="selected && content" [tuiTextfieldSize]="size" [iconStart]="icon">
3095
3205
  @if(label != ''){
3096
3206
  <label tuiLabel>{{label}}</label>
3097
3207
  }
3098
3208
  <input tuiSelect [(ngModel)]="selected" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
3099
3209
  <tui-data-list *tuiDropdown >
3100
3210
  @for (item of options; track getOptionValue(item)) {
3101
- <button tuiOption [value]="getOptionValue(item)">
3102
- {{ getOptionLabel(item) }}
3211
+ @let value = getOptionValue(item);
3212
+ @let label = getOptionLabel(item);
3213
+ <button tuiOption [value]="value" >
3214
+ <span tuiChip size="xs" [appearance]="appearanceMap[value]">{{label}}</span>
3103
3215
  </button>
3104
3216
  }
3105
3217
  </tui-data-list>
3106
3218
  </tui-textfield>
3107
- `, 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"] }, { 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"] }] });
3219
+
3220
+ <ng-template #content>
3221
+ <span tuiChip [size]="size == 's' ? 'xxs' : 'xs'" [appearance]="appearanceMap[selected]">{{stringify(selected)}}</span>
3222
+ </ng-template>
3223
+ `, 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"] }, { 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"] }] });
3108
3224
  }
3109
3225
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUISelect, decorators: [{
3110
3226
  type: Component,
@@ -3116,21 +3232,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
3116
3232
  TuiTextfield,
3117
3233
  TuiDropdown,
3118
3234
  TuiChevron,
3119
- TuiInput
3235
+ TuiInput,
3236
+ TuiChip
3120
3237
  ], template: `
3121
- <tui-textfield tuiChevron [stringify]="stringify" [tuiTextfieldSize]="size" [iconStart]="icon">
3238
+ <tui-textfield tuiChevron [content]="selected && content" [tuiTextfieldSize]="size" [iconStart]="icon">
3122
3239
  @if(label != ''){
3123
3240
  <label tuiLabel>{{label}}</label>
3124
3241
  }
3125
3242
  <input tuiSelect [(ngModel)]="selected" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
3126
3243
  <tui-data-list *tuiDropdown >
3127
3244
  @for (item of options; track getOptionValue(item)) {
3128
- <button tuiOption [value]="getOptionValue(item)">
3129
- {{ getOptionLabel(item) }}
3245
+ @let value = getOptionValue(item);
3246
+ @let label = getOptionLabel(item);
3247
+ <button tuiOption [value]="value" >
3248
+ <span tuiChip size="xs" [appearance]="appearanceMap[value]">{{label}}</span>
3130
3249
  </button>
3131
3250
  }
3132
3251
  </tui-data-list>
3133
3252
  </tui-textfield>
3253
+
3254
+ <ng-template #content>
3255
+ <span tuiChip [size]="size == 's' ? 'xxs' : 'xs'" [appearance]="appearanceMap[selected]">{{stringify(selected)}}</span>
3256
+ </ng-template>
3134
3257
  ` }]
3135
3258
  }], propDecorators: { icon: [{
3136
3259
  type: Input
@@ -3150,6 +3273,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
3150
3273
  type: Input
3151
3274
  }], selectedChange: [{
3152
3275
  type: Output
3276
+ }], appearanceMap: [{
3277
+ type: Input
3153
3278
  }] } });
3154
3279
 
3155
3280
  class EzUIShowMoreText {
@@ -5715,5 +5840,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
5715
5840
  * Generated bundle index. Do not edit.
5716
5841
  */
5717
5842
 
5718
- export { BaseCRUDInterface, BaseListInterface, EzUIBooleanInput, EzUIDateInput, EzUIDateTimeInput, EzUIFileInput, EzUIFilterHelpers, EzUIIconSelector, EzUILayout, EzUILayoutService, EzUIMarkdownEditor, EzUIMenuBar, EzUIMenuBarSubDataList, EzUIMultiSelect, EzUINumberInput, EzUIPasswordInput, EzUISelect, EzUIShowMoreText, EzUITTableSortableColumn, EzUITable, EzUITableBooleanFilter, EzUITableDateFilter, EzUITableFilterService, EzUITableNumberFilter, EzUITableSelectFilter, EzUITableTextFilter, EzUITextInput, compressImage };
5843
+ export { BaseCRUDInterface, BaseListInterface, EzUIBooleanInput, EzUIDateInput, EzUIDateTimeInput, EzUIDialog, EzUIFileInput, EzUIFilterHelpers, EzUIIconSelector, EzUILayout, EzUILayoutService, EzUIMarkdownEditor, EzUIMenuBar, EzUIMenuBarSubDataList, EzUIMultiSelect, EzUINumberInput, EzUIPasswordInput, EzUISelect, EzUIShowMoreText, EzUITTableSortableColumn, EzUITable, EzUITableBooleanFilter, EzUITableDateFilter, EzUITableFilterService, EzUITableNumberFilter, EzUITableSelectFilter, EzUITableTextFilter, EzUITextInput, compressImage };
5719
5844
  //# sourceMappingURL=kris701-ez-ui.mjs.map