@kris701/ez-ui 1.2.14 → 1.2.15
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.
|
@@ -3449,71 +3449,67 @@ class EzUITablePresets {
|
|
|
3449
3449
|
this.table.applyFilter();
|
|
3450
3450
|
}
|
|
3451
3451
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUITablePresets, deps: [{ token: EzUITable }], target: i0.ɵɵFactoryTarget.Component });
|
|
3452
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUITablePresets, isStandalone: true, selector: "ezui-table-presets", inputs: { storageKey: "storageKey" }, outputs: { onPresetChange: "onPresetChange" }, host: { styleAttribute: "display:flex;flex-direction: row;gap:10px;width:100
|
|
3452
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUITablePresets, isStandalone: true, selector: "ezui-table-presets", inputs: { storageKey: "storageKey" }, outputs: { onPresetChange: "onPresetChange" }, host: { styleAttribute: "display:flex;flex-direction: row;gap:10px;width:100%;flex-wrap:wrap;" }, usesOnChanges: true, ngImport: i0, template: `
|
|
3453
3453
|
<button tuiButton iconStart="plus" size="s" appearance="secondary" (click)="createPreset()" tuiHint="Create new preset from current filters"></button>
|
|
3454
3454
|
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
@if(
|
|
3461
|
-
|
|
3462
|
-
<
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
<button style="flex: 0 0 auto;" tuiButton iconStart="save" size="s" appearance="info" (click)="preset.edit = false;saveCurrentPreset()" tuiHint="Save"></button>
|
|
3466
|
-
}
|
|
3467
|
-
@else {
|
|
3468
|
-
<div style="height:100%" appearance="positive" tuiBadge tuiStatus>
|
|
3469
|
-
{{preset.name}}
|
|
3470
|
-
</div>
|
|
3471
|
-
<button style="flex: 0 0 auto;" tuiButton iconStart="square-pen" size="s" appearance="info" (click)="preset.edit = true" tuiHint="Edit"></button>
|
|
3472
|
-
}
|
|
3473
|
-
<button style="flex: 0 0 auto;" tuiButton iconStart="x" size="s" appearance="negative" (click)="removePreset(preset.id)" tuiHint="Delete"></button>
|
|
3455
|
+
@let current = currentPreset();
|
|
3456
|
+
@for(preset of presets(); track preset.id){
|
|
3457
|
+
<div tuiGroup class="preset-group" [collapsed]="true" [rounded]="true">
|
|
3458
|
+
@let isActive = current?.id == preset.id;
|
|
3459
|
+
@if(isActive){
|
|
3460
|
+
@if(preset.edit){
|
|
3461
|
+
<tui-textfield style="width:10rem" tuiTextfieldSize="s" (keydown.enter)="preset.edit = false;saveCurrentPreset()">
|
|
3462
|
+
<input tuiInput [(ngModel)]="preset.name"/>
|
|
3463
|
+
</tui-textfield>
|
|
3464
|
+
<button style="flex: 0 0 auto;" tuiButton iconStart="save" size="s" appearance="info" (click)="preset.edit = false;saveCurrentPreset()" tuiHint="Save"></button>
|
|
3474
3465
|
}
|
|
3475
3466
|
@else {
|
|
3476
|
-
<button style="flex: 0 0 auto;" tuiButton
|
|
3467
|
+
<button style="flex: 0 0 auto;" tuiButton iconStart="square-pen" size="s" appearance="info" (click)="preset.edit = true" tuiHint="Edit"></button>
|
|
3468
|
+
<div class="preset-name" appearance="positive" tuiBadge tuiStatus>
|
|
3469
|
+
{{preset.name}}
|
|
3470
|
+
</div>
|
|
3471
|
+
<button style="flex: 0 0 auto;" tuiButton iconStart="x" size="s" appearance="negative" (click)="removePreset(preset.id)" tuiHint="Delete"></button>
|
|
3477
3472
|
}
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3473
|
+
}
|
|
3474
|
+
@else {
|
|
3475
|
+
<button style="flex: 0 0 auto;" class="preset-name" tuiButton appearance="secondary" size="s" (click)="selectPreset(preset.id)">{{preset.name}}</button>
|
|
3476
|
+
}
|
|
3477
|
+
</div>
|
|
3478
|
+
}
|
|
3479
|
+
`, isInline: true, styles: [".preset-group{max-width:25vw}.preset-group .preset-name{height:100%;display:inline;text-overflow:ellipsis;align-content:center}\n"], 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: TuiButton, selector: "a[tuiButton],button[tuiButton],label[tuiButton],a[tuiIconButton],button[tuiIconButton],label[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiGroup, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "collapsed", "rounded", "size"] }, { kind: "directive", type: TuiBadge, selector: "[tuiBadge],tui-icon[tuiBadge]", inputs: ["size"] }, { kind: "directive", type: TuiStatus, selector: "[tuiStatus]", inputs: ["tuiStatus"] }, { 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: i3$1.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "readonly", "invalid", "focused", "state"] }, { kind: "directive", type: i3$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"], outputs: ["tuiHintVisible"] }] });
|
|
3482
3480
|
}
|
|
3483
3481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUITablePresets, decorators: [{
|
|
3484
3482
|
type: Component,
|
|
3485
|
-
args: [{ selector: 'ezui-table-presets', imports: [FormsModule, CommonModule,
|
|
3483
|
+
args: [{ selector: 'ezui-table-presets', imports: [FormsModule, CommonModule, TuiButton, TuiGroup, TuiBadge, TuiStatus, TuiInput, TuiHint], template: `
|
|
3486
3484
|
<button tuiButton iconStart="plus" size="s" appearance="secondary" (click)="createPreset()" tuiHint="Create new preset from current filters"></button>
|
|
3487
3485
|
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
@if(
|
|
3494
|
-
|
|
3495
|
-
<
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
<button style="flex: 0 0 auto;" tuiButton iconStart="save" size="s" appearance="info" (click)="preset.edit = false;saveCurrentPreset()" tuiHint="Save"></button>
|
|
3499
|
-
}
|
|
3500
|
-
@else {
|
|
3501
|
-
<div style="height:100%" appearance="positive" tuiBadge tuiStatus>
|
|
3502
|
-
{{preset.name}}
|
|
3503
|
-
</div>
|
|
3504
|
-
<button style="flex: 0 0 auto;" tuiButton iconStart="square-pen" size="s" appearance="info" (click)="preset.edit = true" tuiHint="Edit"></button>
|
|
3505
|
-
}
|
|
3506
|
-
<button style="flex: 0 0 auto;" tuiButton iconStart="x" size="s" appearance="negative" (click)="removePreset(preset.id)" tuiHint="Delete"></button>
|
|
3486
|
+
@let current = currentPreset();
|
|
3487
|
+
@for(preset of presets(); track preset.id){
|
|
3488
|
+
<div tuiGroup class="preset-group" [collapsed]="true" [rounded]="true">
|
|
3489
|
+
@let isActive = current?.id == preset.id;
|
|
3490
|
+
@if(isActive){
|
|
3491
|
+
@if(preset.edit){
|
|
3492
|
+
<tui-textfield style="width:10rem" tuiTextfieldSize="s" (keydown.enter)="preset.edit = false;saveCurrentPreset()">
|
|
3493
|
+
<input tuiInput [(ngModel)]="preset.name"/>
|
|
3494
|
+
</tui-textfield>
|
|
3495
|
+
<button style="flex: 0 0 auto;" tuiButton iconStart="save" size="s" appearance="info" (click)="preset.edit = false;saveCurrentPreset()" tuiHint="Save"></button>
|
|
3507
3496
|
}
|
|
3508
3497
|
@else {
|
|
3509
|
-
<button style="flex: 0 0 auto;" tuiButton
|
|
3498
|
+
<button style="flex: 0 0 auto;" tuiButton iconStart="square-pen" size="s" appearance="info" (click)="preset.edit = true" tuiHint="Edit"></button>
|
|
3499
|
+
<div class="preset-name" appearance="positive" tuiBadge tuiStatus>
|
|
3500
|
+
{{preset.name}}
|
|
3501
|
+
</div>
|
|
3502
|
+
<button style="flex: 0 0 auto;" tuiButton iconStart="x" size="s" appearance="negative" (click)="removePreset(preset.id)" tuiHint="Delete"></button>
|
|
3510
3503
|
}
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3504
|
+
}
|
|
3505
|
+
@else {
|
|
3506
|
+
<button style="flex: 0 0 auto;" class="preset-name" tuiButton appearance="secondary" size="s" (click)="selectPreset(preset.id)">{{preset.name}}</button>
|
|
3507
|
+
}
|
|
3508
|
+
</div>
|
|
3509
|
+
}
|
|
3514
3510
|
`, host: {
|
|
3515
|
-
style: 'display:flex;flex-direction: row;gap:10px;width:100
|
|
3516
|
-
}, styles: ["
|
|
3511
|
+
style: 'display:flex;flex-direction: row;gap:10px;width:100%;flex-wrap:wrap;'
|
|
3512
|
+
}, styles: [".preset-group{max-width:25vw}.preset-group .preset-name{height:100%;display:inline;text-overflow:ellipsis;align-content:center}\n"] }]
|
|
3517
3513
|
}], ctorParameters: () => [{ type: EzUITable }], propDecorators: { storageKey: [{
|
|
3518
3514
|
type: Input
|
|
3519
3515
|
}], onPresetChange: [{
|