@kris701/ez-ui 1.1.12 → 1.1.14
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.
|
@@ -7,7 +7,7 @@ import { FormsModule } from '@angular/forms';
|
|
|
7
7
|
import * as i3$1 from '@taiga-ui/core';
|
|
8
8
|
import { TuiIcon, TuiInput, TuiButton, TuiDropdown, TuiOption, TuiGroup, TuiScrollbar, TuiSelectLike, TuiDataList, TuiTextfield, TuiHint, TuiLoader, 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, TuiBadge, TuiStatus, TuiDataListWrapper, TuiBadgeNotification, TuiBadgedContent, TuiButtonSelect, TuiStringifyContentPipe, TUI_CONFIRM } 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';
|
|
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';
|
|
@@ -3059,6 +3059,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
3059
3059
|
type: Output
|
|
3060
3060
|
}] } });
|
|
3061
3061
|
|
|
3062
|
+
class EzUISelect {
|
|
3063
|
+
icon = '';
|
|
3064
|
+
label = '';
|
|
3065
|
+
size = 'm';
|
|
3066
|
+
optionLabel = undefined;
|
|
3067
|
+
optionValue = undefined;
|
|
3068
|
+
options = [];
|
|
3069
|
+
disabled = false;
|
|
3070
|
+
selected = undefined;
|
|
3071
|
+
selectedChange = new EventEmitter();
|
|
3072
|
+
ngOnChanges(changes) {
|
|
3073
|
+
if (changes['selected'] && changes['selected'].currentValue != changes['selected'].previousValue) {
|
|
3074
|
+
this.selected = changes['selected'].currentValue;
|
|
3075
|
+
}
|
|
3076
|
+
}
|
|
3077
|
+
stringify = (value) => this.getOptionLabel(this.options.find((item) => this.getOptionValue(item) === value));
|
|
3078
|
+
getOptionLabel(item) {
|
|
3079
|
+
if (!item)
|
|
3080
|
+
return "";
|
|
3081
|
+
if (this.optionLabel == undefined || this.optionLabel == '')
|
|
3082
|
+
return item;
|
|
3083
|
+
return item[this.optionLabel];
|
|
3084
|
+
}
|
|
3085
|
+
getOptionValue(item) {
|
|
3086
|
+
if (!item)
|
|
3087
|
+
return "";
|
|
3088
|
+
if (this.optionValue == undefined || this.optionValue == '')
|
|
3089
|
+
return item;
|
|
3090
|
+
return item[this.optionValue];
|
|
3091
|
+
}
|
|
3092
|
+
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">
|
|
3095
|
+
@if(label != ''){
|
|
3096
|
+
<label tuiLabel>{{label}}</label>
|
|
3097
|
+
}
|
|
3098
|
+
<input tuiSelect [(ngModel)]="selected" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
|
|
3099
|
+
<tui-data-list *tuiDropdown >
|
|
3100
|
+
@for (item of options; track getOptionValue(item)) {
|
|
3101
|
+
<button tuiOption [value]="getOptionValue(item)">
|
|
3102
|
+
{{ getOptionLabel(item) }}
|
|
3103
|
+
</button>
|
|
3104
|
+
}
|
|
3105
|
+
</tui-data-list>
|
|
3106
|
+
</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"] }] });
|
|
3108
|
+
}
|
|
3109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUISelect, decorators: [{
|
|
3110
|
+
type: Component,
|
|
3111
|
+
args: [{ selector: 'ezui-select', imports: [
|
|
3112
|
+
FormsModule,
|
|
3113
|
+
CommonModule,
|
|
3114
|
+
TuiSelect,
|
|
3115
|
+
TuiDataList,
|
|
3116
|
+
TuiTextfield,
|
|
3117
|
+
TuiDropdown,
|
|
3118
|
+
TuiChevron,
|
|
3119
|
+
TuiInput
|
|
3120
|
+
], template: `
|
|
3121
|
+
<tui-textfield tuiChevron [stringify]="stringify" [tuiTextfieldSize]="size" [iconStart]="icon">
|
|
3122
|
+
@if(label != ''){
|
|
3123
|
+
<label tuiLabel>{{label}}</label>
|
|
3124
|
+
}
|
|
3125
|
+
<input tuiSelect [(ngModel)]="selected" (ngModelChange)="selectedChange.emit(this.selected)" [disabled]="disabled"/>
|
|
3126
|
+
<tui-data-list *tuiDropdown >
|
|
3127
|
+
@for (item of options; track getOptionValue(item)) {
|
|
3128
|
+
<button tuiOption [value]="getOptionValue(item)">
|
|
3129
|
+
{{ getOptionLabel(item) }}
|
|
3130
|
+
</button>
|
|
3131
|
+
}
|
|
3132
|
+
</tui-data-list>
|
|
3133
|
+
</tui-textfield>
|
|
3134
|
+
` }]
|
|
3135
|
+
}], propDecorators: { icon: [{
|
|
3136
|
+
type: Input
|
|
3137
|
+
}], label: [{
|
|
3138
|
+
type: Input
|
|
3139
|
+
}], size: [{
|
|
3140
|
+
type: Input
|
|
3141
|
+
}], optionLabel: [{
|
|
3142
|
+
type: Input
|
|
3143
|
+
}], optionValue: [{
|
|
3144
|
+
type: Input
|
|
3145
|
+
}], options: [{
|
|
3146
|
+
type: Input
|
|
3147
|
+
}], disabled: [{
|
|
3148
|
+
type: Input
|
|
3149
|
+
}], selected: [{
|
|
3150
|
+
type: Input
|
|
3151
|
+
}], selectedChange: [{
|
|
3152
|
+
type: Output
|
|
3153
|
+
}] } });
|
|
3154
|
+
|
|
3062
3155
|
class EzUITablePresets {
|
|
3063
3156
|
table;
|
|
3064
3157
|
storageKey = null;
|
|
@@ -5295,5 +5388,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
5295
5388
|
* Generated bundle index. Do not edit.
|
|
5296
5389
|
*/
|
|
5297
5390
|
|
|
5298
|
-
export { BaseCRUDInterface, BaseListInterface, EzUIBooleanInput, EzUIDateInput, EzUIDateTimeInput, EzUIFileInput, EzUIFilterHelpers, EzUIIconSelector, EzUILayout, EzUILayoutService, EzUIMarkdownEditor, EzUIMenuBar, EzUIMenuBarSubDataList, EzUIMultiSelect, EzUINumberInput, EzUIPasswordInput, EzUITTableSortableColumn, EzUITable, EzUITableBooleanFilter, EzUITableDateFilter, EzUITableFilterService, EzUITableSelectFilter, EzUITableTextFilter, EzUITextInput, compressImage };
|
|
5391
|
+
export { BaseCRUDInterface, BaseListInterface, EzUIBooleanInput, EzUIDateInput, EzUIDateTimeInput, EzUIFileInput, EzUIFilterHelpers, EzUIIconSelector, EzUILayout, EzUILayoutService, EzUIMarkdownEditor, EzUIMenuBar, EzUIMenuBarSubDataList, EzUIMultiSelect, EzUINumberInput, EzUIPasswordInput, EzUISelect, EzUITTableSortableColumn, EzUITable, EzUITableBooleanFilter, EzUITableDateFilter, EzUITableFilterService, EzUITableSelectFilter, EzUITableTextFilter, EzUITextInput, compressImage };
|
|
5299
5392
|
//# sourceMappingURL=kris701-ez-ui.mjs.map
|