@kris701/ez-ui 1.2.16 → 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.
|
@@ -7,10 +7,10 @@ import { FormsModule } from '@angular/forms';
|
|
|
7
7
|
import * as i3$1 from '@taiga-ui/core';
|
|
8
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, TuiChip, TuiMultiSelect, TuiInputNumber, TuiInputChip, TuiPassword, TuiSelect, TuiBadge, TuiStatus, TuiDataListWrapper, TuiBadgeNotification, TuiBadgedContent, TuiButtonSelect, TuiInputDateDirective, 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, tuiCreateDefaultDayRangePeriods, TuiButtonSelect, TuiInputDateDirective, TuiCalendarRange, 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
|
-
import { TuiDay, TuiTime } from '@taiga-ui/cdk/date-time';
|
|
13
|
+
import { TuiDay, TuiTime, TuiDayRange } from '@taiga-ui/cdk/date-time';
|
|
14
14
|
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';
|
|
@@ -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
|
-
|
|
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
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
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
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
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
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
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
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
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 {
|
|
@@ -3654,6 +3692,15 @@ class EzUITableFilterService {
|
|
|
3654
3692
|
return i.getTime() > normal.getTime();
|
|
3655
3693
|
}, column)
|
|
3656
3694
|
},
|
|
3695
|
+
{
|
|
3696
|
+
key: 'dat',
|
|
3697
|
+
action: 'wit',
|
|
3698
|
+
filter: (values, column, value) => EzUIFilterHelpers.dateFilter(values, (i) => {
|
|
3699
|
+
let from = value.from.toLocalNativeDate();
|
|
3700
|
+
let to = value.to.toLocalNativeDate();
|
|
3701
|
+
return i.getTime() >= from.getTime() && i.getTime() < to.getTime();
|
|
3702
|
+
}, column)
|
|
3703
|
+
},
|
|
3657
3704
|
// Boolean filters
|
|
3658
3705
|
{
|
|
3659
3706
|
key: 'bol',
|
|
@@ -4271,6 +4318,7 @@ class EzUITableDateFilter {
|
|
|
4271
4318
|
filterType = signal({}, /* @ts-ignore */
|
|
4272
4319
|
...(ngDevMode ? [{ debugName: "filterType" }] : /* istanbul ignore next */ []));
|
|
4273
4320
|
filterTypes;
|
|
4321
|
+
rangeItems = tuiCreateDefaultDayRangePeriods();
|
|
4274
4322
|
stringify = (item) => `${item.label}`;
|
|
4275
4323
|
constructor(table) {
|
|
4276
4324
|
this.table = table;
|
|
@@ -4282,6 +4330,10 @@ class EzUITableDateFilter {
|
|
|
4282
4330
|
{
|
|
4283
4331
|
label: 'Before',
|
|
4284
4332
|
expression: 'dat;bef'
|
|
4333
|
+
},
|
|
4334
|
+
{
|
|
4335
|
+
label: 'Within',
|
|
4336
|
+
expression: 'dat;wit'
|
|
4285
4337
|
}
|
|
4286
4338
|
];
|
|
4287
4339
|
this.filterType.set(this.filterTypes[0]);
|
|
@@ -4308,12 +4360,21 @@ class EzUITableDateFilter {
|
|
|
4308
4360
|
}
|
|
4309
4361
|
this.filterType.set(type);
|
|
4310
4362
|
let forceReapply = false;
|
|
4311
|
-
if (
|
|
4312
|
-
|
|
4313
|
-
|
|
4363
|
+
if (type.expression == "dat;wit") {
|
|
4364
|
+
if (typeof filter.value.from == 'string') {
|
|
4365
|
+
this.value = new TuiDayRange(TuiDay.jsonParse(filter.value.from), TuiDay.jsonParse(filter.value.to));
|
|
4366
|
+
forceReapply = true;
|
|
4367
|
+
}
|
|
4368
|
+
else
|
|
4369
|
+
this.value = filter.value;
|
|
4314
4370
|
}
|
|
4315
4371
|
else {
|
|
4316
|
-
|
|
4372
|
+
if (typeof filter.value == 'string') {
|
|
4373
|
+
this.value = TuiDay.jsonParse(filter.value);
|
|
4374
|
+
forceReapply = true;
|
|
4375
|
+
}
|
|
4376
|
+
else
|
|
4377
|
+
this.value = filter.value;
|
|
4317
4378
|
}
|
|
4318
4379
|
this.filterApplied.set(true);
|
|
4319
4380
|
if (forceReapply) {
|
|
@@ -4355,6 +4416,7 @@ class EzUITableDateFilter {
|
|
|
4355
4416
|
style="opacity:0.72"
|
|
4356
4417
|
[tuiDropdown]="filterPop"
|
|
4357
4418
|
[(tuiDropdownOpen)]="filterVisible"
|
|
4419
|
+
[tuiDropdownMaxHeight]="500"
|
|
4358
4420
|
(click)="filterVisible.set(true)"
|
|
4359
4421
|
></button>
|
|
4360
4422
|
</tui-badged-content>
|
|
@@ -4377,14 +4439,20 @@ class EzUITableDateFilter {
|
|
|
4377
4439
|
/>
|
|
4378
4440
|
</button>
|
|
4379
4441
|
|
|
4380
|
-
|
|
4381
|
-
<
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4442
|
+
@if(filter.expression == 'dat;wit'){
|
|
4443
|
+
<tui-calendar-range [items]="rangeItems" [(value)]="value" />
|
|
4444
|
+
}
|
|
4445
|
+
@else {
|
|
4446
|
+
<tui-textfield (keydown.enter)="applyFilter(filter.expression)">
|
|
4447
|
+
<label tuiLabel>Choose a date</label>
|
|
4448
|
+
<input
|
|
4449
|
+
tuiInputDate
|
|
4450
|
+
[(ngModel)]="value"
|
|
4451
|
+
/>
|
|
4452
|
+
<tui-calendar *tuiDropdown />
|
|
4453
|
+
</tui-textfield>
|
|
4454
|
+
}
|
|
4455
|
+
|
|
4388
4456
|
<button
|
|
4389
4457
|
tuiButton size="s"
|
|
4390
4458
|
iconStart="funnel"
|
|
@@ -4408,11 +4476,11 @@ class EzUITableDateFilter {
|
|
|
4408
4476
|
</div>
|
|
4409
4477
|
</ng-template>
|
|
4410
4478
|
}
|
|
4411
|
-
`, isInline: true, styles: [".filterPopContainer{display:flex;flex-direction:column;gap:10px;padding:10px;min-width:20rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "directive", type: i3$1.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { kind: "directive", type: i3$1.TuiDropdownOpen, selector: "[tuiDropdown][tuiDropdownAuto],[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]", inputs: ["tuiDropdownEnabled", "tuiDropdownOpen"], outputs: ["tuiDropdownOpenChange"] }, { kind: "directive", type: i3$1.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: i4$1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],label[tuiButton],a[tuiIconButton],button[tuiIconButton],label[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiButtonSelect, selector: "button[tuiButtonSelect]" }, { kind: "component", type: TuiBadgeNotification, selector: "tui-badge-notification", inputs: ["size"] }, { kind: "directive", type: i4$1.TuiBadgedContentDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "component", type: i4$1.TuiBadgedContentComponent, selector: "tui-badged-content" }, { 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: "component", type: i6.TuiCalendar, selector: "tui-calendar:not([new]):not([months])", inputs: ["minViewedMonth", "maxViewedMonth", "showAdjacent", "markerHandler", "initialView", "hoveredItem"], outputs: ["hoveredItemChange", "dayClick"] }, { kind: "directive", type: TuiInputDateDirective, selector: "input[tuiInputDate]", inputs: ["max", "min"] }, { kind: "pipe", type: TuiStringifyContentPipe, name: "tuiStringifyContent" }] });
|
|
4479
|
+
`, isInline: true, styles: [".filterPopContainer{display:flex;flex-direction:column;gap:10px;padding:10px;min-width:20rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "directive", type: i3$1.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: ["tuiDropdownAlign", "tuiDropdownAppearance", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownOffset"] }, { kind: "directive", type: i3$1.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { kind: "directive", type: i3$1.TuiDropdownOpen, selector: "[tuiDropdown][tuiDropdownAuto],[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]", inputs: ["tuiDropdownEnabled", "tuiDropdownOpen"], outputs: ["tuiDropdownOpenChange"] }, { kind: "directive", type: i3$1.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: i4$1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],label[tuiButton],a[tuiIconButton],button[tuiIconButton],label[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiButtonSelect, selector: "button[tuiButtonSelect]" }, { kind: "component", type: TuiBadgeNotification, selector: "tui-badge-notification", inputs: ["size"] }, { kind: "directive", type: i4$1.TuiBadgedContentDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "component", type: i4$1.TuiBadgedContentComponent, selector: "tui-badged-content" }, { 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: "component", type: i6.TuiCalendar, selector: "tui-calendar:not([new]):not([months])", inputs: ["minViewedMonth", "maxViewedMonth", "showAdjacent", "markerHandler", "initialView", "hoveredItem"], outputs: ["hoveredItemChange", "dayClick"] }, { kind: "directive", type: TuiInputDateDirective, selector: "input[tuiInputDate]", inputs: ["max", "min"] }, { kind: "component", type: TuiCalendarRange, selector: "tui-calendar-range", inputs: ["minLength", "maxLength", "items", "listSize", "defaultViewedMonth", "markerHandler", "item"], outputs: ["itemChange"] }, { kind: "pipe", type: TuiStringifyContentPipe, name: "tuiStringifyContent" }] });
|
|
4412
4480
|
}
|
|
4413
4481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUITableDateFilter, decorators: [{
|
|
4414
4482
|
type: Component,
|
|
4415
|
-
args: [{ selector: 'ezui-table-datefilter', imports: [CommonModule, FormsModule, TuiDropdown, TuiDataListWrapper, TuiButton, TuiButtonSelect, TuiStringifyContentPipe, TuiBadgeNotification, TuiBadgedContent, TuiInput, TuiInputDateTime, TuiInputDateDirective], template: `
|
|
4483
|
+
args: [{ selector: 'ezui-table-datefilter', imports: [CommonModule, FormsModule, TuiDropdown, TuiDataListWrapper, TuiButton, TuiButtonSelect, TuiStringifyContentPipe, TuiBadgeNotification, TuiBadgedContent, TuiInput, TuiInputDateTime, TuiInputDateDirective, TuiCalendarRange], template: `
|
|
4416
4484
|
@if(column){
|
|
4417
4485
|
<tui-badged-content>
|
|
4418
4486
|
@if(filterApplied()){
|
|
@@ -4430,6 +4498,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
4430
4498
|
style="opacity:0.72"
|
|
4431
4499
|
[tuiDropdown]="filterPop"
|
|
4432
4500
|
[(tuiDropdownOpen)]="filterVisible"
|
|
4501
|
+
[tuiDropdownMaxHeight]="500"
|
|
4433
4502
|
(click)="filterVisible.set(true)"
|
|
4434
4503
|
></button>
|
|
4435
4504
|
</tui-badged-content>
|
|
@@ -4452,14 +4521,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
4452
4521
|
/>
|
|
4453
4522
|
</button>
|
|
4454
4523
|
|
|
4455
|
-
|
|
4456
|
-
<
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4524
|
+
@if(filter.expression == 'dat;wit'){
|
|
4525
|
+
<tui-calendar-range [items]="rangeItems" [(value)]="value" />
|
|
4526
|
+
}
|
|
4527
|
+
@else {
|
|
4528
|
+
<tui-textfield (keydown.enter)="applyFilter(filter.expression)">
|
|
4529
|
+
<label tuiLabel>Choose a date</label>
|
|
4530
|
+
<input
|
|
4531
|
+
tuiInputDate
|
|
4532
|
+
[(ngModel)]="value"
|
|
4533
|
+
/>
|
|
4534
|
+
<tui-calendar *tuiDropdown />
|
|
4535
|
+
</tui-textfield>
|
|
4536
|
+
}
|
|
4537
|
+
|
|
4463
4538
|
<button
|
|
4464
4539
|
tuiButton size="s"
|
|
4465
4540
|
iconStart="funnel"
|