@acrodata/gui 0.4.1 → 0.5.0
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.
- package/esm2022/button-toggle/button-toggle.mjs +3 -3
- package/esm2022/field-group/field-group.mjs +3 -3
- package/esm2022/file-uploader/file-uploader.mjs +5 -5
- package/esm2022/fill/fill.mjs +3 -3
- package/esm2022/gui-form.mjs +8 -4
- package/esm2022/image-select/image-select.mjs +18 -7
- package/esm2022/inline-group/inline-group.mjs +5 -4
- package/esm2022/input-number/input-number.mjs +3 -3
- package/esm2022/input-text/input-text.mjs +3 -3
- package/esm2022/select/select.mjs +3 -3
- package/esm2022/slider/slider.mjs +3 -3
- package/esm2022/switch/switch.mjs +3 -3
- package/esm2022/textarea/textarea.mjs +3 -3
- package/fesm2022/acrodata-gui.mjs +48 -34
- package/fesm2022/acrodata-gui.mjs.map +1 -1
- package/field-group/field-group.scss +49 -0
- package/file-uploader/file-uploader.scss +0 -1
- package/gui-form.d.ts +1 -0
- package/gui-form.scss +4 -33
- package/image-select/image-select.d.ts +7 -4
- package/image-select/image-select.scss +1 -3
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, forwardRef, Injectable, EventEmitter,
|
|
2
|
+
import { Pipe, Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, forwardRef, ViewChild, Injectable, EventEmitter, Output, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i2$1 from '@angular/forms';
|
|
@@ -29,7 +29,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
|
|
|
29
29
|
import * as i5$2 from '@ng-matero/extensions/colorpicker';
|
|
30
30
|
import { MtxColorpickerModule } from '@ng-matero/extensions/colorpicker';
|
|
31
31
|
import * as i4$4 from '@ng-matero/extensions/select';
|
|
32
|
-
import { MtxSelectModule } from '@ng-matero/extensions/select';
|
|
32
|
+
import { MtxSelect, MtxSelectModule } from '@ng-matero/extensions/select';
|
|
33
33
|
import { of, Subscription, mergeWith } from 'rxjs';
|
|
34
34
|
import * as i5 from '@angular/material/core';
|
|
35
35
|
import * as i1$1 from '@angular/common/http';
|
|
@@ -197,7 +197,7 @@ class GuiInputText {
|
|
|
197
197
|
useExisting: forwardRef(() => GuiInputText),
|
|
198
198
|
multi: true,
|
|
199
199
|
},
|
|
200
|
-
], ngImport: i0, template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"text\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\"
|
|
200
|
+
], ngImport: i0, template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"text\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
201
201
|
}
|
|
202
202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiInputText, decorators: [{
|
|
203
203
|
type: Component,
|
|
@@ -209,7 +209,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
209
209
|
useExisting: forwardRef(() => GuiInputText),
|
|
210
210
|
multi: true,
|
|
211
211
|
},
|
|
212
|
-
], template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"text\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\"
|
|
212
|
+
], template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"text\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n" }]
|
|
213
213
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
214
214
|
type: Input
|
|
215
215
|
}], disabled: [{
|
|
@@ -248,7 +248,7 @@ class GuiInputNumber {
|
|
|
248
248
|
useExisting: forwardRef(() => GuiInputNumber),
|
|
249
249
|
multi: true,
|
|
250
250
|
},
|
|
251
|
-
], ngImport: i0, template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\"
|
|
251
|
+
], ngImport: i0, template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [".gui-input-number .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .gui-input-number .mat-mdc-text-field-wrapper{padding-left:0}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
252
252
|
}
|
|
253
253
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiInputNumber, decorators: [{
|
|
254
254
|
type: Component,
|
|
@@ -260,7 +260,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
260
260
|
useExisting: forwardRef(() => GuiInputNumber),
|
|
261
261
|
multi: true,
|
|
262
262
|
},
|
|
263
|
-
], template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\"
|
|
263
|
+
], template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [".gui-input-number .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .gui-input-number .mat-mdc-text-field-wrapper{padding-left:0}\n"] }]
|
|
264
264
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
265
265
|
type: Input
|
|
266
266
|
}], disabled: [{
|
|
@@ -300,7 +300,7 @@ class GuiSelect {
|
|
|
300
300
|
useExisting: forwardRef(() => GuiSelect),
|
|
301
301
|
multi: true,
|
|
302
302
|
},
|
|
303
|
-
], ngImport: i0, template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <mat-select panelClass=\"gui-select\" hideSingleSelectionIndicator disableRipple\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [multiple]=\"config.multiple || false\"\n (selectionChange)=\"onValueChange()\">\n <mat-option *ngFor=\"let opt of config.options\" [value]=\"opt.value\" [disabled]=\"opt.disabled\">\n <span [style]=\"{fontFamily: config.useFont ? opt.value : ''}\">{{opt.label}}</span>\n </mat-option>\n </mat-select>\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\"
|
|
303
|
+
], ngImport: i0, template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <mat-select panelClass=\"gui-select\" hideSingleSelectionIndicator disableRipple\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [multiple]=\"config.multiple || false\"\n (selectionChange)=\"onValueChange()\">\n <mat-option *ngFor=\"let opt of config.options\" [value]=\"opt.value\" [disabled]=\"opt.disabled\">\n <span [style]=\"{fontFamily: config.useFont ? opt.value : ''}\">{{opt.label}}</span>\n </mat-option>\n </mat-select>\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [".gui-select{--mat-select-trigger-text-size: 12px;--mat-option-label-text-size: 12px}.gui-select .mat-mdc-option{min-height:var(--mat-option-label-text-line-height);padding:0 8px!important}.gui-select .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:8px}[dir=rtl] .gui-select .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:8px}.gui-select .mat-pseudo-checkbox{width:16px;height:16px;border-width:1px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
304
304
|
}
|
|
305
305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiSelect, decorators: [{
|
|
306
306
|
type: Component,
|
|
@@ -312,7 +312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
312
312
|
useExisting: forwardRef(() => GuiSelect),
|
|
313
313
|
multi: true,
|
|
314
314
|
},
|
|
315
|
-
], template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <mat-select panelClass=\"gui-select\" hideSingleSelectionIndicator disableRipple\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [multiple]=\"config.multiple || false\"\n (selectionChange)=\"onValueChange()\">\n <mat-option *ngFor=\"let opt of config.options\" [value]=\"opt.value\" [disabled]=\"opt.disabled\">\n <span [style]=\"{fontFamily: config.useFont ? opt.value : ''}\">{{opt.label}}</span>\n </mat-option>\n </mat-select>\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\"
|
|
315
|
+
], template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <mat-select panelClass=\"gui-select\" hideSingleSelectionIndicator disableRipple\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [multiple]=\"config.multiple || false\"\n (selectionChange)=\"onValueChange()\">\n <mat-option *ngFor=\"let opt of config.options\" [value]=\"opt.value\" [disabled]=\"opt.disabled\">\n <span [style]=\"{fontFamily: config.useFont ? opt.value : ''}\">{{opt.label}}</span>\n </mat-option>\n </mat-select>\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [".gui-select{--mat-select-trigger-text-size: 12px;--mat-option-label-text-size: 12px}.gui-select .mat-mdc-option{min-height:var(--mat-option-label-text-line-height);padding:0 8px!important}.gui-select .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:8px}[dir=rtl] .gui-select .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:8px}.gui-select .mat-pseudo-checkbox{width:16px;height:16px;border-width:1px}\n"] }]
|
|
316
316
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
317
317
|
type: Input
|
|
318
318
|
}], disabled: [{
|
|
@@ -352,7 +352,7 @@ class GuiSwitch {
|
|
|
352
352
|
useExisting: forwardRef(() => GuiSwitch),
|
|
353
353
|
multi: true,
|
|
354
354
|
},
|
|
355
|
-
], ngImport: i0, template: "<mat-slide-toggle [(ngModel)]=\"value\" [disabled]=\"disabled\" hideIcon\n (change)=\"onValueChange()\"
|
|
355
|
+
], ngImport: i0, template: "<mat-slide-toggle [(ngModel)]=\"value\" [disabled]=\"disabled\" hideIcon\n (change)=\"onValueChange()\" />\n<mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n</mat-hint>\n", styles: [".gui-switch .mdc-switch{--mdc-switch-track-width: 28px;--mdc-switch-handle-width: 14px;--mdc-switch-handle-height: 14px;--mdc-switch-state-layer-size: 24px}.gui-switch .mat-mdc-slide-toggle{line-height:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i4$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
356
356
|
}
|
|
357
357
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiSwitch, decorators: [{
|
|
358
358
|
type: Component,
|
|
@@ -364,7 +364,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
364
364
|
useExisting: forwardRef(() => GuiSwitch),
|
|
365
365
|
multi: true,
|
|
366
366
|
},
|
|
367
|
-
], template: "<mat-slide-toggle [(ngModel)]=\"value\" [disabled]=\"disabled\" hideIcon\n (change)=\"onValueChange()\"
|
|
367
|
+
], template: "<mat-slide-toggle [(ngModel)]=\"value\" [disabled]=\"disabled\" hideIcon\n (change)=\"onValueChange()\" />\n<mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n</mat-hint>\n", styles: [".gui-switch .mdc-switch{--mdc-switch-track-width: 28px;--mdc-switch-handle-width: 14px;--mdc-switch-handle-height: 14px;--mdc-switch-state-layer-size: 24px}.gui-switch .mat-mdc-slide-toggle{line-height:24px}\n"] }]
|
|
368
368
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
369
369
|
type: Input
|
|
370
370
|
}], disabled: [{
|
|
@@ -418,7 +418,7 @@ class GuiSlider {
|
|
|
418
418
|
useExisting: forwardRef(() => GuiSlider),
|
|
419
419
|
multi: true,
|
|
420
420
|
},
|
|
421
|
-
], ngImport: i0, template: "<!-- \u666E\u901A\u6ED1\u5757 -->\n<ng-container *ngIf=\"config.mode!=='range'\">\n <mat-slider [disabled]=\"disabled\"\n [step]=\"config.step\"\n [min]=\"config.min\"\n [max]=\"config.max\">\n <input matSliderThumb [(ngModel)]=\"value\" (valueChange)=\"onValueChange()\">\n </mat-slider>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n</ng-container>\n\n<!-- \u533A\u95F4\u6ED1\u5757 -->\n<ng-container *ngIf=\"config.mode==='range'\">\n <mat-slider [disabled]=\"disabled\"\n [step]=\"config.step\"\n [min]=\"config.min\"\n [max]=\"config.max\">\n <input matSliderStartThumb [(ngModel)]=\"minValue\" (valueChange)=\"onRangeInputChange()\">\n <input matSliderEndThumb [(ngModel)]=\"maxValue\" (valueChange)=\"onRangeInputChange()\">\n </mat-slider>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"minValue\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onRangeInputChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"maxValue\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onRangeInputChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n</ng-container>\n\n<!-- \u5E95\u90E8\u6807\u7B7E -->\n<mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\"
|
|
421
|
+
], ngImport: i0, template: "<!-- \u666E\u901A\u6ED1\u5757 -->\n<ng-container *ngIf=\"config.mode!=='range'\">\n <mat-slider [disabled]=\"disabled\"\n [step]=\"config.step\"\n [min]=\"config.min\"\n [max]=\"config.max\">\n <input matSliderThumb [(ngModel)]=\"value\" (valueChange)=\"onValueChange()\">\n </mat-slider>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n</ng-container>\n\n<!-- \u533A\u95F4\u6ED1\u5757 -->\n<ng-container *ngIf=\"config.mode==='range'\">\n <mat-slider [disabled]=\"disabled\"\n [step]=\"config.step\"\n [min]=\"config.min\"\n [max]=\"config.max\">\n <input matSliderStartThumb [(ngModel)]=\"minValue\" (valueChange)=\"onRangeInputChange()\">\n <input matSliderEndThumb [(ngModel)]=\"maxValue\" (valueChange)=\"onRangeInputChange()\">\n </mat-slider>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"minValue\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onRangeInputChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"maxValue\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onRangeInputChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n</ng-container>\n\n<!-- \u5E95\u90E8\u6807\u7B7E -->\n<mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n</mat-hint>\n", styles: [".gui-slider .mat-mdc-slider{--mdc-slider-handle-width: 12px;--mdc-slider-handle-height: 12px;--mdc-slider-inactive-track-height: 2px;--mdc-slider-active-track-height: 2px;flex:3;min-width:auto;height:calc(var(--mdc-slider-handle-width) * 2);margin:0 calc(var(--mdc-slider-handle-width) / 2)}.gui-slider .mat-mdc-slider+.mat-mdc-form-field{flex:2}.gui-slider .mat-mdc-slider.mdc-slider--range+.mat-mdc-form-field,.gui-slider .mat-mdc-slider.mdc-slider--range+.mat-mdc-form-field+.mat-mdc-form-field{flex:1.5}.gui-slider .mat-mdc-slider .mdc-slider__input{top:0;height:calc(var(--mdc-slider-handle-width) * 2)}.gui-slider .mat-mdc-slider .mdc-slider__thumb{left:calc(var(--mdc-slider-handle-width) * -1);width:calc(var(--mdc-slider-handle-width) * 2);height:calc(var(--mdc-slider-handle-width) * 2);border-radius:50%;overflow:hidden}.gui-slider .mat-mdc-form-field{margin-left:6px}[dir=rtl] .gui-slider .mat-mdc-form-field{margin-left:0;margin-right:6px}.gui-slider .mat-mdc-form-field input::-webkit-outer-spin-button,.gui-slider .mat-mdc-form-field input::-webkit-inner-spin-button{appearance:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5$1.MatSlider, selector: "mat-slider", inputs: ["color", "disableRipple", "disabled", "discrete", "showTickMarks", "min", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i5$1.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "directive", type: i5$1.MatSliderRangeThumb, selector: "input[matSliderStartThumb], input[matSliderEndThumb]", exportAs: ["matSliderRangeThumb"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
422
422
|
}
|
|
423
423
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiSlider, decorators: [{
|
|
424
424
|
type: Component,
|
|
@@ -430,7 +430,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
430
430
|
useExisting: forwardRef(() => GuiSlider),
|
|
431
431
|
multi: true,
|
|
432
432
|
},
|
|
433
|
-
], template: "<!-- \u666E\u901A\u6ED1\u5757 -->\n<ng-container *ngIf=\"config.mode!=='range'\">\n <mat-slider [disabled]=\"disabled\"\n [step]=\"config.step\"\n [min]=\"config.min\"\n [max]=\"config.max\">\n <input matSliderThumb [(ngModel)]=\"value\" (valueChange)=\"onValueChange()\">\n </mat-slider>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n</ng-container>\n\n<!-- \u533A\u95F4\u6ED1\u5757 -->\n<ng-container *ngIf=\"config.mode==='range'\">\n <mat-slider [disabled]=\"disabled\"\n [step]=\"config.step\"\n [min]=\"config.min\"\n [max]=\"config.max\">\n <input matSliderStartThumb [(ngModel)]=\"minValue\" (valueChange)=\"onRangeInputChange()\">\n <input matSliderEndThumb [(ngModel)]=\"maxValue\" (valueChange)=\"onRangeInputChange()\">\n </mat-slider>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"minValue\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onRangeInputChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"maxValue\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onRangeInputChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n</ng-container>\n\n<!-- \u5E95\u90E8\u6807\u7B7E -->\n<mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\"
|
|
433
|
+
], template: "<!-- \u666E\u901A\u6ED1\u5757 -->\n<ng-container *ngIf=\"config.mode!=='range'\">\n <mat-slider [disabled]=\"disabled\"\n [step]=\"config.step\"\n [min]=\"config.min\"\n [max]=\"config.max\">\n <input matSliderThumb [(ngModel)]=\"value\" (valueChange)=\"onValueChange()\">\n </mat-slider>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onValueChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n</ng-container>\n\n<!-- \u533A\u95F4\u6ED1\u5757 -->\n<ng-container *ngIf=\"config.mode==='range'\">\n <mat-slider [disabled]=\"disabled\"\n [step]=\"config.step\"\n [min]=\"config.min\"\n [max]=\"config.max\">\n <input matSliderStartThumb [(ngModel)]=\"minValue\" (valueChange)=\"onRangeInputChange()\">\n <input matSliderEndThumb [(ngModel)]=\"maxValue\" (valueChange)=\"onRangeInputChange()\">\n </mat-slider>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"minValue\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onRangeInputChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n <mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <input matInput type=\"number\"\n [(ngModel)]=\"maxValue\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [step]=\"config.step\"\n [min]=\"config.min!\"\n [max]=\"config.max!\"\n (change)=\"onRangeInputChange()\">\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n </mat-form-field>\n</ng-container>\n\n<!-- \u5E95\u90E8\u6807\u7B7E -->\n<mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n</mat-hint>\n", styles: [".gui-slider .mat-mdc-slider{--mdc-slider-handle-width: 12px;--mdc-slider-handle-height: 12px;--mdc-slider-inactive-track-height: 2px;--mdc-slider-active-track-height: 2px;flex:3;min-width:auto;height:calc(var(--mdc-slider-handle-width) * 2);margin:0 calc(var(--mdc-slider-handle-width) / 2)}.gui-slider .mat-mdc-slider+.mat-mdc-form-field{flex:2}.gui-slider .mat-mdc-slider.mdc-slider--range+.mat-mdc-form-field,.gui-slider .mat-mdc-slider.mdc-slider--range+.mat-mdc-form-field+.mat-mdc-form-field{flex:1.5}.gui-slider .mat-mdc-slider .mdc-slider__input{top:0;height:calc(var(--mdc-slider-handle-width) * 2)}.gui-slider .mat-mdc-slider .mdc-slider__thumb{left:calc(var(--mdc-slider-handle-width) * -1);width:calc(var(--mdc-slider-handle-width) * 2);height:calc(var(--mdc-slider-handle-width) * 2);border-radius:50%;overflow:hidden}.gui-slider .mat-mdc-form-field{margin-left:6px}[dir=rtl] .gui-slider .mat-mdc-form-field{margin-left:0;margin-right:6px}.gui-slider .mat-mdc-form-field input::-webkit-outer-spin-button,.gui-slider .mat-mdc-form-field input::-webkit-inner-spin-button{appearance:none}\n"] }]
|
|
434
434
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
435
435
|
type: Input
|
|
436
436
|
}], disabled: [{
|
|
@@ -495,7 +495,7 @@ class GuiButtonToggle {
|
|
|
495
495
|
useExisting: forwardRef(() => GuiButtonToggle),
|
|
496
496
|
multi: true,
|
|
497
497
|
},
|
|
498
|
-
], ngImport: i0, template: "<mat-button-toggle-group [(ngModel)]=\"value\" [disabled]=\"disabled\" [multiple]=\"config.multiple\"\n (change)=\"onValueChange()\">\n <mat-button-toggle *ngFor=\"let opt of config.options\" disableRipple\n [class]=\"{'gui-icon-toggle': config.useIcon}\"\n [flex]=\"opt.col\"\n [value]=\"opt.value\"\n [disabled]=\"opt.disabled\"\n [title]=\"config.useIcon ? opt.label : ''\">\n <gui-icon *ngIf=\"config.useIcon; else textLabel\" [src]=\"opt.src!\"
|
|
498
|
+
], ngImport: i0, template: "<mat-button-toggle-group [(ngModel)]=\"value\" [disabled]=\"disabled\" [multiple]=\"config.multiple\"\n (change)=\"onValueChange()\">\n <mat-button-toggle *ngFor=\"let opt of config.options\" disableRipple\n [class]=\"{'gui-icon-toggle': config.useIcon}\"\n [flex]=\"opt.col\"\n [value]=\"opt.value\"\n [disabled]=\"opt.disabled\"\n [title]=\"config.useIcon ? opt.label : ''\">\n <gui-icon *ngIf=\"config.useIcon; else textLabel\" [src]=\"opt.src!\" />\n <ng-template #textLabel>{{opt.label}}</ng-template>\n </mat-button-toggle>\n</mat-button-toggle-group>\n<mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n</mat-hint>\n", styles: [".gui-button-toggle{--mat-standard-button-toggle-height: 24px}.gui-button-toggle .mat-button-toggle-group{flex-wrap:wrap;border-width:0}.gui-button-toggle .mat-button-toggle-appearance-standard{border-width:0!important;background-color:var(--mdc-filled-text-field-container-color)}.gui-button-toggle .mat-button-toggle-appearance-standard.mat-button-toggle-checked{background-color:var(--mat-standard-button-toggle-selected-state-background-color)}.gui-icon-toggle.mat-button-toggle .mat-button-toggle-label-content{padding:0;line-height:normal}.gui-icon-toggle.mat-button-toggle-checked img{opacity:.64}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4$3.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i4$3.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: GuiIcon, selector: "gui-icon", inputs: ["src"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }, { kind: "directive", type: GuiFlexDirective, selector: "[flex]", inputs: ["flex"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
499
499
|
}
|
|
500
500
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiButtonToggle, decorators: [{
|
|
501
501
|
type: Component,
|
|
@@ -507,7 +507,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
507
507
|
useExisting: forwardRef(() => GuiButtonToggle),
|
|
508
508
|
multi: true,
|
|
509
509
|
},
|
|
510
|
-
], template: "<mat-button-toggle-group [(ngModel)]=\"value\" [disabled]=\"disabled\" [multiple]=\"config.multiple\"\n (change)=\"onValueChange()\">\n <mat-button-toggle *ngFor=\"let opt of config.options\" disableRipple\n [class]=\"{'gui-icon-toggle': config.useIcon}\"\n [flex]=\"opt.col\"\n [value]=\"opt.value\"\n [disabled]=\"opt.disabled\"\n [title]=\"config.useIcon ? opt.label : ''\">\n <gui-icon *ngIf=\"config.useIcon; else textLabel\" [src]=\"opt.src!\"
|
|
510
|
+
], template: "<mat-button-toggle-group [(ngModel)]=\"value\" [disabled]=\"disabled\" [multiple]=\"config.multiple\"\n (change)=\"onValueChange()\">\n <mat-button-toggle *ngFor=\"let opt of config.options\" disableRipple\n [class]=\"{'gui-icon-toggle': config.useIcon}\"\n [flex]=\"opt.col\"\n [value]=\"opt.value\"\n [disabled]=\"opt.disabled\"\n [title]=\"config.useIcon ? opt.label : ''\">\n <gui-icon *ngIf=\"config.useIcon; else textLabel\" [src]=\"opt.src!\" />\n <ng-template #textLabel>{{opt.label}}</ng-template>\n </mat-button-toggle>\n</mat-button-toggle-group>\n<mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n</mat-hint>\n", styles: [".gui-button-toggle{--mat-standard-button-toggle-height: 24px}.gui-button-toggle .mat-button-toggle-group{flex-wrap:wrap;border-width:0}.gui-button-toggle .mat-button-toggle-appearance-standard{border-width:0!important;background-color:var(--mdc-filled-text-field-container-color)}.gui-button-toggle .mat-button-toggle-appearance-standard.mat-button-toggle-checked{background-color:var(--mat-standard-button-toggle-selected-state-background-color)}.gui-icon-toggle.mat-button-toggle .mat-button-toggle-label-content{padding:0;line-height:normal}.gui-icon-toggle.mat-button-toggle-checked img{opacity:.64}\n"] }]
|
|
511
511
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
512
512
|
type: Input
|
|
513
513
|
}], disabled: [{
|
|
@@ -547,7 +547,7 @@ class GuiFill {
|
|
|
547
547
|
useExisting: forwardRef(() => GuiFill),
|
|
548
548
|
multi: true,
|
|
549
549
|
},
|
|
550
|
-
], ngImport: i0, template: "<mat-form-field>\n <ng-container matPrefix>\n <span class=\"gui-color-block-empty\"></span>\n <span class=\"gui-color-block\" [style]=\"{background: value}\"></span>\n </ng-container>\n <input matInput\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [mtxColorpicker]=\"cp\"\n (colorChange)=\"onValueChange()\">\n <mtx-colorpicker #cp
|
|
550
|
+
], ngImport: i0, template: "<mat-form-field>\n <ng-container matPrefix>\n <span class=\"gui-color-block-empty\"></span>\n <span class=\"gui-color-block\" [style]=\"{background: value}\"></span>\n </ng-container>\n <input matInput\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [mtxColorpicker]=\"cp\"\n (colorChange)=\"onValueChange()\">\n <mtx-colorpicker #cp />\n <mtx-colorpicker-toggle matSuffix [for]=\"cp\" />\n <mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [".gui-color-block,.gui-color-block-empty{position:relative;display:inline-block;width:24px;height:24px}.gui-color-block-empty{position:absolute;background-color:#fff;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-position:0 0,0 4px,4px -4px,-4px 0;background-size:8px 8px}.gui-color-block:after{display:inline-block;width:100%;height:100%;border:1px solid currentColor;border-top-left-radius:var(--mdc-filled-text-field-container-shape);border-bottom-left-radius:var(--mdc-filled-text-field-container-shape);opacity:.12;content:\"\"}[dir=rtl] .gui-color-block:after{border-radius:0;border-top-right-radius:var(--mdc-filled-text-field-container-shape);border-bottom-right-radius:var(--mdc-filled-text-field-container-shape)}.gui-fill .mat-mdc-icon-button{display:inline-flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5$2.MtxColorpicker, selector: "mtx-colorpicker", inputs: ["content", "disabled", "xPosition", "yPosition", "restoreFocus", "opened", "color", "format"], outputs: ["opened", "closed"], exportAs: ["mtxColorpicker"] }, { kind: "directive", type: i5$2.MtxColorpickerInput, selector: "input[mtxColorpicker]", inputs: ["mtxColorpicker", "disabled", "value", "format"], outputs: ["colorChange", "colorInput"], exportAs: ["mtxColorpickerInput"] }, { kind: "component", type: i5$2.MtxColorpickerToggle, selector: "mtx-colorpicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["mtxColorpickerToggle"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
551
551
|
}
|
|
552
552
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiFill, decorators: [{
|
|
553
553
|
type: Component,
|
|
@@ -559,7 +559,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
559
559
|
useExisting: forwardRef(() => GuiFill),
|
|
560
560
|
multi: true,
|
|
561
561
|
},
|
|
562
|
-
], template: "<mat-form-field>\n <ng-container matPrefix>\n <span class=\"gui-color-block-empty\"></span>\n <span class=\"gui-color-block\" [style]=\"{background: value}\"></span>\n </ng-container>\n <input matInput\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [mtxColorpicker]=\"cp\"\n (colorChange)=\"onValueChange()\">\n <mtx-colorpicker #cp
|
|
562
|
+
], template: "<mat-form-field>\n <ng-container matPrefix>\n <span class=\"gui-color-block-empty\"></span>\n <span class=\"gui-color-block\" [style]=\"{background: value}\"></span>\n </ng-container>\n <input matInput\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [mtxColorpicker]=\"cp\"\n (colorChange)=\"onValueChange()\">\n <mtx-colorpicker #cp />\n <mtx-colorpicker-toggle matSuffix [for]=\"cp\" />\n <mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [".gui-color-block,.gui-color-block-empty{position:relative;display:inline-block;width:24px;height:24px}.gui-color-block-empty{position:absolute;background-color:#fff;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-position:0 0,0 4px,4px -4px,-4px 0;background-size:8px 8px}.gui-color-block:after{display:inline-block;width:100%;height:100%;border:1px solid currentColor;border-top-left-radius:var(--mdc-filled-text-field-container-shape);border-bottom-left-radius:var(--mdc-filled-text-field-container-shape);opacity:.12;content:\"\"}[dir=rtl] .gui-color-block:after{border-radius:0;border-top-right-radius:var(--mdc-filled-text-field-container-shape);border-bottom-right-radius:var(--mdc-filled-text-field-container-shape)}.gui-fill .mat-mdc-icon-button{display:inline-flex;justify-content:center;align-items:center}\n"] }]
|
|
563
563
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
564
564
|
type: Input
|
|
565
565
|
}], disabled: [{
|
|
@@ -582,13 +582,13 @@ class GuiFieldGroup {
|
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
584
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiFieldGroup, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
585
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiFieldGroup, selector: "gui-field-group", inputs: { config: "config" }, host: { classAttribute: "gui-field-group" }, ngImport: i0, template: "<gui-field-label *ngIf=\"config.parentType !== 'inline' && config.name\"\n [config]=\"config\" [index]=\"config.index\"
|
|
585
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiFieldGroup, selector: "gui-field-group", inputs: { config: "config" }, host: { classAttribute: "gui-field-group" }, ngImport: i0, template: "<gui-field-label *ngIf=\"config.parentType !== 'inline' && config.name\"\n [config]=\"config\" [index]=\"config.index\" />\n<ng-content></ng-content>\n", styles: [".gui-field-group{display:flex;padding:4px 8px}.gui-field{--mat-form-field-container-text-size: 12px;display:inline-flex;flex:1;flex-wrap:wrap}.gui-field>.mat-mdc-form-field{flex:1;width:0;max-width:100%}.gui-field .mat-mdc-text-field-wrapper,.gui-field .mat-mdc-form-field-hint-wrapper{position:relative;padding:0 8px;border-radius:var(--mdc-filled-text-field-container-shape)}[dir=rtl] .gui-field .mat-mdc-text-field-wrapper,[dir=rtl] .gui-field .mat-mdc-form-field-hint-wrapper{padding:0 8px}.gui-field .mat-mdc-form-field-infix{min-height:auto;padding:0!important}.gui-field .mat-mdc-form-field-hint-spacer,.gui-field .mat-mdc-form-field-bottom-align:before,.gui-field .mdc-line-ripple{display:none}.gui-field .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 24px;--mdc-icon-button-icon-size: 14px;padding:0}.gui-field .mat-mdc-icon-button .mat-mdc-button-touch-target{width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size)}.gui-field .mat-icon{display:inline-flex;justify-content:center;align-items:center;padding:0!important}.gui-field .mat-icon svg{width:14px;height:14px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
586
586
|
}
|
|
587
587
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiFieldGroup, decorators: [{
|
|
588
588
|
type: Component,
|
|
589
589
|
args: [{ selector: 'gui-field-group', host: {
|
|
590
590
|
class: 'gui-field-group',
|
|
591
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<gui-field-label *ngIf=\"config.parentType !== 'inline' && config.name\"\n [config]=\"config\" [index]=\"config.index\"
|
|
591
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<gui-field-label *ngIf=\"config.parentType !== 'inline' && config.name\"\n [config]=\"config\" [index]=\"config.index\" />\n<ng-content></ng-content>\n", styles: [".gui-field-group{display:flex;padding:4px 8px}.gui-field{--mat-form-field-container-text-size: 12px;display:inline-flex;flex:1;flex-wrap:wrap}.gui-field>.mat-mdc-form-field{flex:1;width:0;max-width:100%}.gui-field .mat-mdc-text-field-wrapper,.gui-field .mat-mdc-form-field-hint-wrapper{position:relative;padding:0 8px;border-radius:var(--mdc-filled-text-field-container-shape)}[dir=rtl] .gui-field .mat-mdc-text-field-wrapper,[dir=rtl] .gui-field .mat-mdc-form-field-hint-wrapper{padding:0 8px}.gui-field .mat-mdc-form-field-infix{min-height:auto;padding:0!important}.gui-field .mat-mdc-form-field-hint-spacer,.gui-field .mat-mdc-form-field-bottom-align:before,.gui-field .mdc-line-ripple{display:none}.gui-field .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 24px;--mdc-icon-button-icon-size: 14px;padding:0}.gui-field .mat-mdc-icon-button .mat-mdc-button-touch-target{width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size)}.gui-field .mat-icon{display:inline-flex;justify-content:center;align-items:center;padding:0!important}.gui-field .mat-icon svg{width:14px;height:14px}\n"] }]
|
|
592
592
|
}], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
593
593
|
type: Input
|
|
594
594
|
}] } });
|
|
@@ -598,13 +598,13 @@ class GuiInlineGroup {
|
|
|
598
598
|
this.config = {};
|
|
599
599
|
}
|
|
600
600
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiInlineGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
601
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiInlineGroup, selector: "gui-inline-group", inputs: { config: "config" }, host: { classAttribute: "gui-inline-group" }, ngImport: i0, template: "<gui-field-label [config]=\"config\"
|
|
601
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiInlineGroup, selector: "gui-inline-group", inputs: { config: "config" }, host: { classAttribute: "gui-inline-group" }, ngImport: i0, template: "<gui-field-label *ngIf=\"config.name\" [config]=\"config\" />\n<div class=\"gui-inline-group-content\">\n <ng-content></ng-content>\n</div>\n", styles: [".gui-inline-group{display:flex;padding:4px 8px}.gui-inline-group mat-hint{width:100%;line-height:var(--mat-form-field-subscript-text-line-height);-webkit-font-smoothing:antialiased}.gui-inline-group-content{display:inline-flex;flex:1;flex-flow:row wrap;margin:0 -4px}.gui-inline-group-content>.gui-field-group,.gui-inline-group-content>.gui-inline-group,.gui-inline-group-content>.mat-expansion-panel,.gui-inline-group-content>.gui-menu{width:100%;padding:0 4px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
602
602
|
}
|
|
603
603
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiInlineGroup, decorators: [{
|
|
604
604
|
type: Component,
|
|
605
605
|
args: [{ selector: 'gui-inline-group', host: {
|
|
606
606
|
class: 'gui-inline-group',
|
|
607
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<gui-field-label [config]=\"config\"
|
|
607
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<gui-field-label *ngIf=\"config.name\" [config]=\"config\" />\n<div class=\"gui-inline-group-content\">\n <ng-content></ng-content>\n</div>\n", styles: [".gui-inline-group{display:flex;padding:4px 8px}.gui-inline-group mat-hint{width:100%;line-height:var(--mat-form-field-subscript-text-line-height);-webkit-font-smoothing:antialiased}.gui-inline-group-content{display:inline-flex;flex:1;flex-flow:row wrap;margin:0 -4px}.gui-inline-group-content>.gui-field-group,.gui-inline-group-content>.gui-inline-group,.gui-inline-group-content>.mat-expansion-panel,.gui-inline-group-content>.gui-menu{width:100%;padding:0 4px}\n"] }]
|
|
608
608
|
}], propDecorators: { config: [{
|
|
609
609
|
type: Input
|
|
610
610
|
}] } });
|
|
@@ -614,9 +614,15 @@ class GuiImageSelect {
|
|
|
614
614
|
this.cdr = cdr;
|
|
615
615
|
this.config = {};
|
|
616
616
|
this.disabled = false;
|
|
617
|
+
this.appendTo = 'body';
|
|
617
618
|
this.onChange = () => { };
|
|
618
619
|
this.onTouched = () => { };
|
|
619
620
|
}
|
|
621
|
+
ngAfterViewInit() {
|
|
622
|
+
// Add additional class for ng-select's dropdown panel
|
|
623
|
+
const { ngSelect } = this.mtxSelect;
|
|
624
|
+
ngSelect.classes = (ngSelect.classes || '') + ' gui-image-select';
|
|
625
|
+
}
|
|
620
626
|
writeValue(value) {
|
|
621
627
|
this.value = value;
|
|
622
628
|
this.cdr.markForCheck();
|
|
@@ -634,15 +640,14 @@ class GuiImageSelect {
|
|
|
634
640
|
onValueChange() {
|
|
635
641
|
this.onChange(this.value);
|
|
636
642
|
}
|
|
637
|
-
onPanelOpened() { }
|
|
638
643
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiImageSelect, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
639
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiImageSelect, selector: "gui-image-select", inputs: { config: "config", disabled: "disabled" }, host: { classAttribute: "gui-field gui-image-select" }, providers: [
|
|
644
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiImageSelect, selector: "gui-image-select", inputs: { config: "config", disabled: "disabled", appendTo: "appendTo" }, host: { classAttribute: "gui-field gui-image-select" }, providers: [
|
|
640
645
|
{
|
|
641
646
|
provide: NG_VALUE_ACCESSOR,
|
|
642
647
|
useExisting: forwardRef(() => GuiImageSelect),
|
|
643
648
|
multi: true,
|
|
644
649
|
},
|
|
645
|
-
], ngImport: i0, template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <mtx-select [items]=\"config.options||[]\" appendTo=\"
|
|
650
|
+
], viewQueries: [{ propertyName: "mtxSelect", first: true, predicate: MtxSelect, descendants: true }], ngImport: i0, template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <mtx-select [items]=\"config.options||[]\" [appendTo]=\"appendTo\" bindValue=\"value\"\n [(ngModel)]=\"value\" [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n (change)=\"onValueChange()\">\n <ng-template ng-label-tmp let-opt=\"item\">\n <img [src]=\"opt.src\" [alt]=\"opt.label\" />\n <span>{{opt.label}}</span>\n </ng-template>\n <ng-template ng-option-tmp let-opt=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n <img [src]=\"opt.src\" [alt]=\"opt.label\" />\n <span>{{opt.label}}</span>\n </ng-template>\n </mtx-select>\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [".gui-image-select.ng-dropdown-panel .ng-dropdown-panel-items .ng-option img,.gui-image-select .ng-select .ng-value img{height:100%;max-width:120px;object-fit:contain;border-radius:4px;background-color:var(--mat-option-hover-state-layer-color)}.gui-image-select .ng-select{padding:0 8px;margin:0 -8px}.gui-image-select .ng-select .ng-value-container{height:64px}.gui-image-select .ng-select .ng-value{display:inline-flex;align-items:center;gap:8px;height:100%;padding:8px 0}.gui-image-select.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;gap:8px;height:64px;padding:8px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4$4.MtxSelect, selector: "mtx-select", inputs: ["disabled", "addTag", "addTagText", "appearance", "appendTo", "bindLabel", "bindValue", "closeOnSelect", "clearAllText", "clearable", "clearOnBackspace", "compareWith", "dropdownPosition", "groupBy", "groupValue", "selectableGroup", "selectableGroupAsModel", "hideSelected", "isOpen", "loading", "loadingText", "labelForId", "markFirst", "maxSelectedItems", "multiple", "notFoundText", "searchable", "readonly", "searchFn", "searchWhileComposing", "selectOnTab", "trackByFn", "inputAttrs", "tabIndex", "openOnEnter", "minTermLength", "editableSearchTerm", "keyDownFn", "virtualScroll", "typeToSearchText", "typeahead", "clearSearchOnAdd", "items", "value", "id", "placeholder", "required", "errorStateMatcher", "aria-label", "aria-labelledby"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["mtxSelect"] }, { kind: "directive", type: i4$4.MtxSelectOptionTemplate, selector: "[ng-option-tmp]" }, { kind: "directive", type: i4$4.MtxSelectLabelTemplate, selector: "[ng-label-tmp]" }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
646
651
|
}
|
|
647
652
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiImageSelect, decorators: [{
|
|
648
653
|
type: Component,
|
|
@@ -654,11 +659,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
654
659
|
useExisting: forwardRef(() => GuiImageSelect),
|
|
655
660
|
multi: true,
|
|
656
661
|
},
|
|
657
|
-
], template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <mtx-select [items]=\"config.options||[]\" appendTo=\"
|
|
658
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: {
|
|
662
|
+
], template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <mtx-select [items]=\"config.options||[]\" [appendTo]=\"appendTo\" bindValue=\"value\"\n [(ngModel)]=\"value\" [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n (change)=\"onValueChange()\">\n <ng-template ng-label-tmp let-opt=\"item\">\n <img [src]=\"opt.src\" [alt]=\"opt.label\" />\n <span>{{opt.label}}</span>\n </ng-template>\n <ng-template ng-option-tmp let-opt=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n <img [src]=\"opt.src\" [alt]=\"opt.label\" />\n <span>{{opt.label}}</span>\n </ng-template>\n </mtx-select>\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [".gui-image-select.ng-dropdown-panel .ng-dropdown-panel-items .ng-option img,.gui-image-select .ng-select .ng-value img{height:100%;max-width:120px;object-fit:contain;border-radius:4px;background-color:var(--mat-option-hover-state-layer-color)}.gui-image-select .ng-select{padding:0 8px;margin:0 -8px}.gui-image-select .ng-select .ng-value-container{height:64px}.gui-image-select .ng-select .ng-value{display:inline-flex;align-items:center;gap:8px;height:100%;padding:8px 0}.gui-image-select.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;gap:8px;height:64px;padding:8px}\n"] }]
|
|
663
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { mtxSelect: [{
|
|
664
|
+
type: ViewChild,
|
|
665
|
+
args: [MtxSelect]
|
|
666
|
+
}], config: [{
|
|
659
667
|
type: Input
|
|
660
668
|
}], disabled: [{
|
|
661
669
|
type: Input
|
|
670
|
+
}], appendTo: [{
|
|
671
|
+
type: Input
|
|
662
672
|
}] } });
|
|
663
673
|
|
|
664
674
|
class GuiTextarea {
|
|
@@ -694,7 +704,7 @@ class GuiTextarea {
|
|
|
694
704
|
useExisting: forwardRef(() => GuiTextarea),
|
|
695
705
|
multi: true,
|
|
696
706
|
},
|
|
697
|
-
], ngImport: i0, template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <textarea matInput\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [rows]=\"config.rows\"\n (change)=\"onValueChange()\"></textarea>\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\"
|
|
707
|
+
], ngImport: i0, template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <textarea matInput\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [rows]=\"config.rows\"\n (change)=\"onValueChange()\"></textarea>\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [".gui-textarea .mat-mdc-text-field-wrapper{padding:0}.gui-textarea .mat-mdc-form-field-textarea-control{padding:0 8px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
698
708
|
}
|
|
699
709
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiTextarea, decorators: [{
|
|
700
710
|
type: Component,
|
|
@@ -706,7 +716,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
706
716
|
useExisting: forwardRef(() => GuiTextarea),
|
|
707
717
|
multi: true,
|
|
708
718
|
},
|
|
709
|
-
], template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <textarea matInput\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [rows]=\"config.rows\"\n (change)=\"onValueChange()\"></textarea>\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\"
|
|
719
|
+
], template: "<mat-form-field>\n <span *ngIf=\"config.prefix\" matPrefix>{{config.prefix}}</span>\n <textarea matInput\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [rows]=\"config.rows\"\n (change)=\"onValueChange()\"></textarea>\n <span *ngIf=\"config.suffix\" matSuffix>{{config.suffix}}</span>\n <mat-hint *ngIf=\"config.parentType === 'inline'\">\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n</mat-form-field>\n", styles: [".gui-textarea .mat-mdc-text-field-wrapper{padding:0}.gui-textarea .mat-mdc-form-field-textarea-control{padding:0 8px}\n"] }]
|
|
710
720
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
711
721
|
type: Input
|
|
712
722
|
}], disabled: [{
|
|
@@ -824,25 +834,25 @@ class GuiFileUploader {
|
|
|
824
834
|
this.fileChange.emit(this.url);
|
|
825
835
|
}
|
|
826
836
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiFileUploader, deps: [{ token: GuiFileUploaderConfig }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
827
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiFileUploader, selector: "gui-file-uploader", inputs: { config: "config", disabled: "disabled", type: "type", name: "name", accept: "accept" }, outputs: { fileChange: "fileChange" }, host: { classAttribute: "gui-file-uploader" }, providers: [
|
|
837
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiFileUploader, selector: "gui-file-uploader", inputs: { config: "config", disabled: "disabled", type: "type", name: "name", accept: "accept" }, outputs: { fileChange: "fileChange" }, host: { classAttribute: "gui-field gui-file-uploader" }, providers: [
|
|
828
838
|
{
|
|
829
839
|
provide: NG_VALUE_ACCESSOR,
|
|
830
840
|
useExisting: forwardRef(() => GuiFileUploader),
|
|
831
841
|
multi: true,
|
|
832
842
|
},
|
|
833
|
-
], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mat-form-field>\n <mat-icon matPrefix svgIcon=\"link\"
|
|
843
|
+
], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mat-form-field>\n <mat-icon matPrefix svgIcon=\"link\" />\n\n <input matInput type=\"text\" [ngModel]=\"url\" [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n (change)=\"onUrlChange($event)\" (blur)=\"onBlur()\">\n\n <button *ngIf=\"url\" matSuffix mat-icon-button color=\"warn\"\n [disabled]=\"disabled\" (click)=\"onClear()\">\n <mat-icon svgIcon=\"close\" />\n </button>\n</mat-form-field>\n\n<figure class=\"gui-file-content\">\n <ng-container *ngIf=\"url\" [ngSwitch]=\"type\">\n <img *ngSwitchCase=\"'image'\" [src]=\"url\" />\n\n <video *ngSwitchCase=\"'video'\" [src]=\"url\"></video>\n\n <audio *ngSwitchCase=\"'audio'\" [src]=\"url\" controls></audio>\n\n <mat-icon *ngSwitchDefault svgIcon=\"file_outline\" />\n </ng-container>\n\n <div *ngIf=\"!url\" class=\"gui-file-placeholder\">\n <mat-icon svgIcon=\"file_upload\" />\n </div>\n\n <input #fileInput type=\"file\" [accept]=\"accept\" [name]=\"name\"\n [disabled]=\"disabled\" (change)=\"onFileChange($event)\">\n</figure>\n\n<mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n</mat-hint>\n", styles: [".gui-file-uploader{display:block;overflow:auto}.gui-file-uploader .mat-mdc-form-field{width:100%}.gui-file-uploader .gui-file-content{position:relative;display:flex;align-items:center;justify-content:center;height:120px;margin:4px 0 0;padding:4px;background-color:var(--mdc-filled-text-field-container-color);border:1px solid transparent;border-radius:4px}.gui-file-uploader .gui-file-content:hover,.gui-file-uploader .gui-file-content:focus-within{border-color:currentColor}.gui-file-uploader .gui-file-content img,.gui-file-uploader .gui-file-content video{width:100%;height:100%;object-fit:contain}.gui-file-uploader .gui-file-content input[type=file]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.gui-file-uploader .gui-file-content .mat-icon svg{width:24px;height:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
834
844
|
}
|
|
835
845
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiFileUploader, decorators: [{
|
|
836
846
|
type: Component,
|
|
837
847
|
args: [{ selector: 'gui-file-uploader', host: {
|
|
838
|
-
class: 'gui-file-uploader',
|
|
848
|
+
class: 'gui-field gui-file-uploader',
|
|
839
849
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
840
850
|
{
|
|
841
851
|
provide: NG_VALUE_ACCESSOR,
|
|
842
852
|
useExisting: forwardRef(() => GuiFileUploader),
|
|
843
853
|
multi: true,
|
|
844
854
|
},
|
|
845
|
-
], template: "<mat-form-field>\n <mat-icon matPrefix svgIcon=\"link\"
|
|
855
|
+
], template: "<mat-form-field>\n <mat-icon matPrefix svgIcon=\"link\" />\n\n <input matInput type=\"text\" [ngModel]=\"url\" [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n (change)=\"onUrlChange($event)\" (blur)=\"onBlur()\">\n\n <button *ngIf=\"url\" matSuffix mat-icon-button color=\"warn\"\n [disabled]=\"disabled\" (click)=\"onClear()\">\n <mat-icon svgIcon=\"close\" />\n </button>\n</mat-form-field>\n\n<figure class=\"gui-file-content\">\n <ng-container *ngIf=\"url\" [ngSwitch]=\"type\">\n <img *ngSwitchCase=\"'image'\" [src]=\"url\" />\n\n <video *ngSwitchCase=\"'video'\" [src]=\"url\"></video>\n\n <audio *ngSwitchCase=\"'audio'\" [src]=\"url\" controls></audio>\n\n <mat-icon *ngSwitchDefault svgIcon=\"file_outline\" />\n </ng-container>\n\n <div *ngIf=\"!url\" class=\"gui-file-placeholder\">\n <mat-icon svgIcon=\"file_upload\" />\n </div>\n\n <input #fileInput type=\"file\" [accept]=\"accept\" [name]=\"name\"\n [disabled]=\"disabled\" (change)=\"onFileChange($event)\">\n</figure>\n\n<mat-hint *ngIf=\"config.parentType==='inline'\">\n <gui-field-label [config]=\"config\" />\n</mat-hint>\n", styles: [".gui-file-uploader{display:block;overflow:auto}.gui-file-uploader .mat-mdc-form-field{width:100%}.gui-file-uploader .gui-file-content{position:relative;display:flex;align-items:center;justify-content:center;height:120px;margin:4px 0 0;padding:4px;background-color:var(--mdc-filled-text-field-container-color);border:1px solid transparent;border-radius:4px}.gui-file-uploader .gui-file-content:hover,.gui-file-uploader .gui-file-content:focus-within{border-color:currentColor}.gui-file-uploader .gui-file-content img,.gui-file-uploader .gui-file-content video{width:100%;height:100%;object-fit:contain}.gui-file-uploader .gui-file-content input[type=file]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.gui-file-uploader .gui-file-content .mat-icon svg{width:24px;height:24px}\n"] }]
|
|
846
856
|
}], ctorParameters: function () { return [{ type: GuiFileUploaderConfig }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { fileInput: [{
|
|
847
857
|
type: ViewChild,
|
|
848
858
|
args: ['fileInput']
|
|
@@ -860,6 +870,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
860
870
|
type: Output
|
|
861
871
|
}] } });
|
|
862
872
|
|
|
873
|
+
let nextUniqueId = 0;
|
|
863
874
|
class GuiForm {
|
|
864
875
|
constructor() {
|
|
865
876
|
/**
|
|
@@ -881,6 +892,8 @@ class GuiForm {
|
|
|
881
892
|
this.formFields = [];
|
|
882
893
|
this.formSubscription = Subscription.EMPTY;
|
|
883
894
|
this.controlSubscriptions = [];
|
|
895
|
+
// Unique id for this form
|
|
896
|
+
this.uid = `gui-form-${nextUniqueId++}`;
|
|
884
897
|
}
|
|
885
898
|
ngOnChanges(changes) {
|
|
886
899
|
if (changes['config']) {
|
|
@@ -1084,13 +1097,14 @@ class GuiForm {
|
|
|
1084
1097
|
tabs.mode = mode;
|
|
1085
1098
|
}
|
|
1086
1099
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiForm, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1087
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiForm, selector: "gui-form", inputs: { form: "form", config: "config", model: "model" }, outputs: { modelChange: "modelChange" }, host: { classAttribute: "gui-form" }, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <div *ngFor=\"let item of formFields\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: item, formGroup: form}\">\n </ng-template>\n </div>\n</form>\n\n<ng-template #controlType let-item let-parent=\"parent\" let-form=\"formGroup\">\n <ng-container *ngIf=\"item.show\" [ngSwitch]=\"item.type\" [formGroup]=\"form\">\n <!-- Text -->\n <gui-field-group *ngSwitchCase=\"'text'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-input-text [formControlName]=\"item.key\" [config]=\"item\"></gui-input-text>\n </gui-field-group>\n <!-- Number -->\n <gui-field-group *ngSwitchCase=\"'number'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-input-number [formControlName]=\"item.key\" [config]=\"item\"></gui-input-number>\n </gui-field-group>\n <!-- Select -->\n <gui-field-group *ngSwitchCase=\"'select'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-select [formControlName]=\"item.key\" [config]=\"item\"></gui-select>\n </gui-field-group>\n <!-- Switch -->\n <gui-field-group *ngSwitchCase=\"'switch'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-switch [formControlName]=\"item.key\" [config]=\"item\"></gui-switch>\n </gui-field-group>\n <!-- Slider -->\n <gui-field-group *ngSwitchCase=\"'slider'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-slider [formControlName]=\"item.key\" [config]=\"item\"></gui-slider>\n </gui-field-group>\n <!-- Button Toggle -->\n <gui-field-group *ngSwitchCase=\"'buttonToggle'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-button-toggle [formControlName]=\"item.key\" [config]=\"item\"></gui-button-toggle>\n </gui-field-group>\n <!-- Fill -->\n <gui-field-group *ngSwitchCase=\"'fill'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-fill [formControlName]=\"item.key\" [config]=\"item\"></gui-fill>\n </gui-field-group>\n <!-- File -->\n <gui-field-group *ngSwitchCase=\"'file'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader [formControlName]=\"item.key\" [config]=\"item\"></gui-file-uploader>\n </gui-field-group>\n <!-- Image -->\n <gui-field-group *ngSwitchCase=\"'image'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"image\"\n [formControlName]=\"item.key\" [config]=\"item\"></gui-file-uploader>\n </gui-field-group>\n <!-- Video -->\n <gui-field-group *ngSwitchCase=\"'video'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"video\"\n [formControlName]=\"item.key\" [config]=\"item\"></gui-file-uploader>\n </gui-field-group>\n <!-- Audio -->\n <gui-field-group *ngSwitchCase=\"'audio'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"audio\"\n [formControlName]=\"item.key\" [config]=\"item\"></gui-file-uploader>\n </gui-field-group>\n <!-- Image Select -->\n <gui-field-group *ngSwitchCase=\"'imageSelect'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-image-select [formControlName]=\"item.key\" [config]=\"item\"></gui-image-select>\n </gui-field-group>\n <!-- Textarea -->\n <gui-field-group *ngSwitchCase=\"'textarea'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-textarea [formControlName]=\"item.key\" [config]=\"item\"></gui-textarea>\n </gui-field-group>\n <!-- Hidden Input -->\n <input *ngSwitchCase=\"'hidden'\" type=\"hidden\" [formControlName]=\"item.key\">\n\n <!-- Inline Group -->\n <gui-inline-group *ngSwitchCase=\"'inline'\" [config]=\"item\" [formGroupName]=\"item.key\">\n <ng-container *ngFor=\"let child of item.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n </ng-container>\n </gui-inline-group>\n\n <!-- Group -->\n <mat-expansion-panel *ngSwitchCase=\"'group'\" [formGroupName]=\"item.key\"\n [(expanded)]=\"item.expanded\" [disabled]=\"item.disabled\">\n <mat-expansion-panel-header>\n <gui-field-label [config]=\"item\"></gui-field-label>\n </mat-expansion-panel-header>\n <!-- Lazy rendering -->\n <ng-template matExpansionPanelContent>\n <div *ngFor=\"let child of item.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <!-- Tabs -->\n <mat-expansion-panel *ngSwitchCase=\"'tabs'\" [formArrayName]=\"item.key\"\n [(expanded)]=\"item.expanded\" [disabled]=\"item.disabled\">\n <mat-expansion-panel-header>\n <gui-field-label [config]=\"item\"></gui-field-label>\n <!-- Show operation buttons after panel opened -->\n <ng-container *ngIf=\"item.expanded\">\n <button mat-icon-button type=\"button\" [color]=\"item.mode!=='list'?'primary':''\"\n (click)=\"changeTabsMode($event, item, 'normal')\">\n <mat-icon svgIcon=\"dots_horizontal\"></mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [color]=\"item.mode==='list'?'primary':''\"\n (click)=\"changeTabsMode($event, item, 'list')\">\n <mat-icon svgIcon=\"dots_vertical\"></mat-icon>\n </button>\n <ng-container *ngIf=\"item.template && (item.addable || item.addable===undefined)\">\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, true)\">\n <mat-icon svgIcon=\"content_copy\"></mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item)\">\n <mat-icon svgIcon=\"plus\"></mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"removeTab($event, form.get(item.key), item)\">\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </ng-container>\n </ng-container>\n </mat-expansion-panel-header>\n <!-- Lazy rendering -->\n <ng-template matExpansionPanelContent>\n <!-- Horizontal mode -->\n <mat-tab-group *ngIf=\"item.mode!=='list'\" class=\"gui-tabs\" disableRipple\n [mat-stretch-tabs]=\"false\" [(selectedIndex)]=\"item.selectedIndex\">\n <mat-tab *ngFor=\"let tab of item.children; index as i\" [disabled]=\"tab.disabled\">\n <ng-template mat-tab-label>\n <div>{{tab.name | ejs:{i} }}</div>\n </ng-template>\n <!-- FormControl & FormArray -->\n <ng-container *ngIf=\"!tab.children || tab.children.length===0 || tab.type==='tabs'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: tab, parent: item, formGroup: form.get([item.key])}\">\n </ng-template>\n </ng-container>\n <!-- FormGroup -->\n <ng-container *ngIf=\"tab.children?.length>0 && tab.type!=='tabs'\">\n <div *ngFor=\"let child of tab.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n </ng-container>\n </mat-tab>\n </mat-tab-group>\n\n <!-- Vertical mode -->\n <div class=\"gui-list\" *ngIf=\"item.mode==='list'\">\n <div class=\"gui-list-item\" *ngFor=\"let tab of item.children; index as i\"\n [class.gui-list-item-active]=\"item.selectedIndex===i\">\n <div class=\"gui-list-item-heading\">\n <span class=\"gui-list-item-title\"\n (click)=\"item.selectedIndex=i\">{{tab.name | ejs:{i} }}</span>\n <ng-container *ngIf=\"item.template && (item.addable || item.addable===undefined)\">\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, true, i)\">\n <mat-icon svgIcon=\"content_copy\"></mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, false, i)\">\n <mat-icon svgIcon=\"plus\"></mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"removeTab($event, form.get(item.key), item, i)\">\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"gui-list-item-content\">\n <!-- FormControl & FormArray -->\n <ng-container *ngIf=\"!tab.children || tab.children.length===0 || tab.type==='tabs'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: tab, parent: item, formGroup: form.get([item.key])}\">\n </ng-template>\n </ng-container>\n <!-- FormGroup -->\n <ng-container *ngIf=\"tab.children?.length>0 && tab.type!=='tabs'\">\n <div *ngFor=\"let child of tab.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <!-- Menu -->\n <mat-tab-group class=\"gui-menu\" *ngSwitchCase=\"'menu'\" [formGroupName]=\"item.key\" disableRipple>\n <mat-tab *ngFor=\"let menuChild of item.children\" [label]=\"menuChild.name\"\n [disabled]=\"menuChild.disabled\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"menuChild.type==='menuItem'\">\n <!-- Must wrap with div -->\n <div *ngFor=\"let controlItem of menuChild.children\" [formGroupName]=\"menuChild.key\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: controlItem, formGroup: form.get([item.key, menuChild.key])}\">\n </ng-template>\n </div>\n </ng-container>\n <!-- Support for unlimited nesting -->\n <ng-container *ngIf=\"menuChild.type==='menu'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: menuChild, formGroup: form.get(item.key)}\">\n </ng-template>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </ng-container>\n</ng-template>\n", styles: [".gui-form{--mat-form-field-container-text-size: 12px;--mat-expansion-header-text-size: 12px;--mat-expansion-container-text-size: 12px;--mat-expansion-header-collapsed-state-height: 32px;--mat-expansion-header-expanded-state-height: 32px;position:relative;display:block;font-size:12px}.gui-form .mat-expansion-panel{--mat-expansion-container-shape: 0;box-shadow:none!important}.gui-form .mat-expansion-panel-body{padding:0}.gui-form .mat-expansion-panel-header{padding:0 12px}.gui-form .mat-expansion-panel-header .mat-content{align-items:center;padding-right:8px}[dir=rtl] .gui-form .mat-expansion-panel-header .mat-content{padding-right:0;padding-left:8px}.gui-form .mat-expansion-panel-header .mat-content gui-field-label{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.gui-form .mat-expansion-indicator:after{vertical-align:2px}.gui-form .mat-mdc-tab-header{--mat-tab-header-label-text-size: 12px;--mdc-secondary-navigation-tab-container-height: 24px}.gui-form .mat-mdc-tab-header-pagination{min-width:var(--mdc-secondary-navigation-tab-container-height)}.gui-form .mat-mdc-tab{min-width:auto;padding:0 12px}.gui-form .mat-icon{display:inline-flex;justify-content:center;align-items:center;padding:0!important}.gui-form .mat-icon svg{width:14px;height:14px}.gui-form .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 24px;--mdc-icon-button-icon-size: 14px;padding:0}.gui-form .mat-mdc-icon-button .mat-mdc-button-touch-target{width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size)}.gui-form .mat-mdc-text-field-wrapper,.gui-form .mat-mdc-form-field-hint-wrapper{position:relative;padding:0 8px;border-radius:var(--mdc-filled-text-field-container-shape)}[dir=rtl] .gui-form .mat-mdc-text-field-wrapper,[dir=rtl] .gui-form .mat-mdc-form-field-hint-wrapper{padding:0 8px}.gui-form .mat-mdc-form-field-infix{min-height:auto;padding:0!important}.gui-form .mat-mdc-form-field-hint-spacer,.gui-form .mat-mdc-form-field-bottom-align:before,.gui-form .mdc-line-ripple{display:none}.gui-list-item-heading{display:flex;align-items:center;position:relative;padding:0 12px;line-height:24px}.gui-list-item-heading:before{position:absolute;left:0;width:2px;height:16px;background-color:var(--mat-expansion-header-text-color);content:\"\"}[dir=rtl] .gui-list-item-heading:before{left:auto;right:0}.gui-list-item-title{flex:1;cursor:pointer}.gui-list-item-active .gui-list-item-title{font-weight:700}.gui-menu .mat-mdc-tab-header{--mdc-tab-indicator-active-indicator-shape: 4px;padding:4px;background-color:var(--mdc-filled-text-field-container-color)}.gui-menu .mat-mdc-tab-header .mdc-tab__ripple:before{border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.gui-menu .mat-mdc-tab-labels{gap:4px}.gui-menu .mdc-tab-indicator .mdc-tab-indicator__content{height:100%;border-width:0;border-radius:var(--mdc-tab-indicator-active-indicator-shape);background-color:var(--mdc-tab-indicator-active-indicator-color)}.gui-menu .mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:.24}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i1$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5$3.MatTabContent, selector: "[matTabContent]" }, { kind: "directive", type: i5$3.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i5$3.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i5$3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "component", type: i6.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i6.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i6.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }, { kind: "component", type: GuiInputText, selector: "gui-input-text", inputs: ["config", "disabled"] }, { kind: "component", type: GuiInputNumber, selector: "gui-input-number", inputs: ["config", "disabled"] }, { kind: "component", type: GuiSelect, selector: "gui-select", inputs: ["config", "disabled"] }, { kind: "component", type: GuiSwitch, selector: "gui-switch", inputs: ["config", "disabled"] }, { kind: "component", type: GuiSlider, selector: "gui-slider", inputs: ["config", "disabled"] }, { kind: "component", type: GuiButtonToggle, selector: "gui-button-toggle", inputs: ["config", "disabled"] }, { kind: "component", type: GuiFill, selector: "gui-fill", inputs: ["config", "disabled"] }, { kind: "component", type: GuiFieldGroup, selector: "gui-field-group", inputs: ["config"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }, { kind: "component", type: GuiInlineGroup, selector: "gui-inline-group", inputs: ["config"] }, { kind: "component", type: GuiImageSelect, selector: "gui-image-select", inputs: ["config", "disabled"] }, { kind: "component", type: GuiTextarea, selector: "gui-textarea", inputs: ["config", "disabled"] }, { kind: "component", type: GuiFileUploader, selector: "gui-file-uploader", inputs: ["config", "disabled", "type", "name", "accept"], outputs: ["fileChange"] }, { kind: "directive", type: GuiFlexDirective, selector: "[flex]", inputs: ["flex"] }, { kind: "pipe", type: GuiEjsPipe, name: "ejs" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1100
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiForm, selector: "gui-form", inputs: { form: "form", config: "config", model: "model" }, outputs: { modelChange: "modelChange" }, host: { properties: { "attr.id": "uid" }, classAttribute: "gui-form" }, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <div *ngFor=\"let item of formFields\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: item, formGroup: form}\">\n </ng-template>\n </div>\n</form>\n\n<ng-template #controlType let-item let-parent=\"parent\" let-form=\"formGroup\">\n <ng-container *ngIf=\"item.show\" [ngSwitch]=\"item.type\" [formGroup]=\"form\">\n <!-- Text -->\n <gui-field-group *ngSwitchCase=\"'text'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-input-text [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Number -->\n <gui-field-group *ngSwitchCase=\"'number'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-input-number [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Select -->\n <gui-field-group *ngSwitchCase=\"'select'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-select [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Switch -->\n <gui-field-group *ngSwitchCase=\"'switch'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-switch [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Slider -->\n <gui-field-group *ngSwitchCase=\"'slider'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-slider [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Button Toggle -->\n <gui-field-group *ngSwitchCase=\"'buttonToggle'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-button-toggle [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Fill -->\n <gui-field-group *ngSwitchCase=\"'fill'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-fill [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- File -->\n <gui-field-group *ngSwitchCase=\"'file'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Image -->\n <gui-field-group *ngSwitchCase=\"'image'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"image\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Video -->\n <gui-field-group *ngSwitchCase=\"'video'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"video\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Audio -->\n <gui-field-group *ngSwitchCase=\"'audio'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"audio\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Image Select -->\n <gui-field-group *ngSwitchCase=\"'imageSelect'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-image-select [formControlName]=\"item.key\" [config]=\"item\" [appendTo]=\"'#'+uid\" />\n </gui-field-group>\n <!-- Textarea -->\n <gui-field-group *ngSwitchCase=\"'textarea'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-textarea [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Hidden Input -->\n <input *ngSwitchCase=\"'hidden'\" type=\"hidden\" [formControlName]=\"item.key\">\n\n <!-- Inline Group -->\n <gui-inline-group *ngSwitchCase=\"'inline'\" [config]=\"item\" [formGroupName]=\"item.key\">\n <ng-container *ngFor=\"let child of item.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n </ng-container>\n </gui-inline-group>\n\n <!-- Group -->\n <mat-expansion-panel *ngSwitchCase=\"'group'\" [formGroupName]=\"item.key\"\n [(expanded)]=\"item.expanded\" [disabled]=\"item.disabled\">\n <mat-expansion-panel-header>\n <gui-field-label [config]=\"item\" />\n </mat-expansion-panel-header>\n <!-- Lazy rendering -->\n <ng-template matExpansionPanelContent>\n <div *ngFor=\"let child of item.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <!-- Tabs -->\n <mat-expansion-panel *ngSwitchCase=\"'tabs'\" [formArrayName]=\"item.key\"\n [(expanded)]=\"item.expanded\" [disabled]=\"item.disabled\">\n <mat-expansion-panel-header>\n <gui-field-label [config]=\"item\" />\n <!-- Show operation buttons when panel opened -->\n <ng-container *ngIf=\"item.expanded\">\n <button mat-icon-button type=\"button\" [color]=\"item.mode!=='list'?'primary':''\"\n (click)=\"changeTabsMode($event, item, 'normal')\">\n <mat-icon svgIcon=\"dots_horizontal\" />\n </button>\n <button mat-icon-button type=\"button\" [color]=\"item.mode==='list'?'primary':''\"\n (click)=\"changeTabsMode($event, item, 'list')\">\n <mat-icon svgIcon=\"dots_vertical\" />\n </button>\n <ng-container *ngIf=\"item.template && (item.addable || item.addable===undefined)\">\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, true)\">\n <mat-icon svgIcon=\"content_copy\" />\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item)\">\n <mat-icon svgIcon=\"plus\" />\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"removeTab($event, form.get(item.key), item)\">\n <mat-icon svgIcon=\"delete\" />\n </button>\n </ng-container>\n </ng-container>\n </mat-expansion-panel-header>\n <!-- Lazy rendering -->\n <ng-template matExpansionPanelContent>\n <!-- Horizontal mode -->\n <mat-tab-group *ngIf=\"item.mode!=='list'\" class=\"gui-tabs\" disableRipple\n [mat-stretch-tabs]=\"false\" [(selectedIndex)]=\"item.selectedIndex\">\n <mat-tab *ngFor=\"let tab of item.children; index as i\" [disabled]=\"tab.disabled\">\n <ng-template mat-tab-label>\n <div>{{tab.name | ejs:{i} }}</div>\n </ng-template>\n <!-- FormControl & FormArray -->\n <ng-container *ngIf=\"!tab.children || tab.children.length===0 || tab.type==='tabs'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: tab, parent: item, formGroup: form.get([item.key])}\">\n </ng-template>\n </ng-container>\n <!-- FormGroup -->\n <ng-container *ngIf=\"tab.children?.length>0 && tab.type!=='tabs'\">\n <div *ngFor=\"let child of tab.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n </ng-container>\n </mat-tab>\n </mat-tab-group>\n\n <!-- Vertical mode -->\n <div class=\"gui-list\" *ngIf=\"item.mode==='list'\">\n <div class=\"gui-list-item\" *ngFor=\"let tab of item.children; index as i\"\n [class.gui-list-item-active]=\"item.selectedIndex===i\">\n <div class=\"gui-list-item-heading\">\n <span class=\"gui-list-item-title\"\n (click)=\"item.selectedIndex=i\">{{tab.name | ejs:{i} }}</span>\n <ng-container *ngIf=\"item.template && (item.addable || item.addable===undefined)\">\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, true, i)\">\n <mat-icon svgIcon=\"content_copy\" />\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, false, i)\">\n <mat-icon svgIcon=\"plus\" />\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"removeTab($event, form.get(item.key), item, i)\">\n <mat-icon svgIcon=\"delete\" />\n </button>\n </ng-container>\n </div>\n <div class=\"gui-list-item-content\">\n <!-- FormControl & FormArray -->\n <ng-container *ngIf=\"!tab.children || tab.children.length===0 || tab.type==='tabs'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: tab, parent: item, formGroup: form.get([item.key])}\">\n </ng-template>\n </ng-container>\n <!-- FormGroup -->\n <ng-container *ngIf=\"tab.children?.length>0 && tab.type!=='tabs'\">\n <div *ngFor=\"let child of tab.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <!-- Menu -->\n <mat-tab-group class=\"gui-menu\" *ngSwitchCase=\"'menu'\" [formGroupName]=\"item.key\" disableRipple>\n <mat-tab *ngFor=\"let menuChild of item.children\" [label]=\"menuChild.name\"\n [disabled]=\"menuChild.disabled\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"menuChild.type==='menuItem'\">\n <!-- Must wrap with div -->\n <div *ngFor=\"let controlItem of menuChild.children\" [formGroupName]=\"menuChild.key\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: controlItem, formGroup: form.get([item.key, menuChild.key])}\">\n </ng-template>\n </div>\n </ng-container>\n <!-- Support for unlimited nesting -->\n <ng-container *ngIf=\"menuChild.type==='menu'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: menuChild, formGroup: form.get(item.key)}\">\n </ng-template>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </ng-container>\n</ng-template>\n", styles: [".gui-form{--mat-expansion-header-text-size: 12px;--mat-expansion-container-text-size: 12px;--mat-expansion-header-collapsed-state-height: 32px;--mat-expansion-header-expanded-state-height: 32px;position:relative;display:block;font-size:12px}.gui-form .mat-expansion-panel{--mat-expansion-container-shape: 0;box-shadow:none!important}.gui-form .mat-expansion-panel-body{padding:0}.gui-form .mat-expansion-panel-header{padding:0 12px}.gui-form .mat-expansion-panel-header .mat-content{align-items:center;padding-right:8px}[dir=rtl] .gui-form .mat-expansion-panel-header .mat-content{padding-right:0;padding-left:8px}.gui-form .mat-expansion-panel-header .mat-content gui-field-label{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.gui-form .mat-expansion-indicator:after{vertical-align:2px}.gui-form .mat-mdc-tab-header{--mat-tab-header-label-text-size: 12px;--mdc-secondary-navigation-tab-container-height: 24px}.gui-form .mat-mdc-tab-header-pagination{min-width:var(--mdc-secondary-navigation-tab-container-height)}.gui-form .mat-mdc-tab{min-width:auto;padding:0 12px}.gui-form .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 24px;--mdc-icon-button-icon-size: 14px;padding:0}.gui-form .mat-mdc-icon-button .mat-mdc-button-touch-target{width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size)}.gui-form .mat-mdc-icon-button .mat-icon{display:inline-flex;justify-content:center;align-items:center}.gui-list-item-heading{display:flex;align-items:center;position:relative;padding:0 12px;line-height:24px}.gui-list-item-heading:before{position:absolute;left:0;width:2px;height:16px;background-color:var(--mat-expansion-header-text-color);content:\"\"}[dir=rtl] .gui-list-item-heading:before{left:auto;right:0}.gui-list-item-title{flex:1;cursor:pointer}.gui-list-item-active .gui-list-item-title{font-weight:700}.gui-menu .mat-mdc-tab-header{--mdc-tab-indicator-active-indicator-shape: 4px;padding:4px;background-color:var(--mdc-filled-text-field-container-color)}.gui-menu .mat-mdc-tab-header .mdc-tab__ripple:before{border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.gui-menu .mat-mdc-tab-labels{gap:4px}.gui-menu .mdc-tab-indicator .mdc-tab-indicator__content{height:100%;border-width:0;border-radius:var(--mdc-tab-indicator-active-indicator-shape);background-color:var(--mdc-tab-indicator-active-indicator-color)}.gui-menu .mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:.24}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i1$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5$3.MatTabContent, selector: "[matTabContent]" }, { kind: "directive", type: i5$3.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i5$3.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i5$3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "component", type: i6.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i6.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i6.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }, { kind: "component", type: GuiInputText, selector: "gui-input-text", inputs: ["config", "disabled"] }, { kind: "component", type: GuiInputNumber, selector: "gui-input-number", inputs: ["config", "disabled"] }, { kind: "component", type: GuiSelect, selector: "gui-select", inputs: ["config", "disabled"] }, { kind: "component", type: GuiSwitch, selector: "gui-switch", inputs: ["config", "disabled"] }, { kind: "component", type: GuiSlider, selector: "gui-slider", inputs: ["config", "disabled"] }, { kind: "component", type: GuiButtonToggle, selector: "gui-button-toggle", inputs: ["config", "disabled"] }, { kind: "component", type: GuiFill, selector: "gui-fill", inputs: ["config", "disabled"] }, { kind: "component", type: GuiFieldGroup, selector: "gui-field-group", inputs: ["config"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }, { kind: "component", type: GuiInlineGroup, selector: "gui-inline-group", inputs: ["config"] }, { kind: "component", type: GuiImageSelect, selector: "gui-image-select", inputs: ["config", "disabled", "appendTo"] }, { kind: "component", type: GuiTextarea, selector: "gui-textarea", inputs: ["config", "disabled"] }, { kind: "component", type: GuiFileUploader, selector: "gui-file-uploader", inputs: ["config", "disabled", "type", "name", "accept"], outputs: ["fileChange"] }, { kind: "directive", type: GuiFlexDirective, selector: "[flex]", inputs: ["flex"] }, { kind: "pipe", type: GuiEjsPipe, name: "ejs" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1088
1101
|
}
|
|
1089
1102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiForm, decorators: [{
|
|
1090
1103
|
type: Component,
|
|
1091
1104
|
args: [{ selector: 'gui-form', host: {
|
|
1092
|
-
|
|
1093
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\">\n <div *ngFor=\"let item of formFields\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: item, formGroup: form}\">\n </ng-template>\n </div>\n</form>\n\n<ng-template #controlType let-item let-parent=\"parent\" let-form=\"formGroup\">\n <ng-container *ngIf=\"item.show\" [ngSwitch]=\"item.type\" [formGroup]=\"form\">\n <!-- Text -->\n <gui-field-group *ngSwitchCase=\"'text'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-input-text [formControlName]=\"item.key\" [config]=\"item\"></gui-input-text>\n </gui-field-group>\n <!-- Number -->\n <gui-field-group *ngSwitchCase=\"'number'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-input-number [formControlName]=\"item.key\" [config]=\"item\"></gui-input-number>\n </gui-field-group>\n <!-- Select -->\n <gui-field-group *ngSwitchCase=\"'select'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-select [formControlName]=\"item.key\" [config]=\"item\"></gui-select>\n </gui-field-group>\n <!-- Switch -->\n <gui-field-group *ngSwitchCase=\"'switch'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-switch [formControlName]=\"item.key\" [config]=\"item\"></gui-switch>\n </gui-field-group>\n <!-- Slider -->\n <gui-field-group *ngSwitchCase=\"'slider'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-slider [formControlName]=\"item.key\" [config]=\"item\"></gui-slider>\n </gui-field-group>\n <!-- Button Toggle -->\n <gui-field-group *ngSwitchCase=\"'buttonToggle'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-button-toggle [formControlName]=\"item.key\" [config]=\"item\"></gui-button-toggle>\n </gui-field-group>\n <!-- Fill -->\n <gui-field-group *ngSwitchCase=\"'fill'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-fill [formControlName]=\"item.key\" [config]=\"item\"></gui-fill>\n </gui-field-group>\n <!-- File -->\n <gui-field-group *ngSwitchCase=\"'file'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader [formControlName]=\"item.key\" [config]=\"item\"></gui-file-uploader>\n </gui-field-group>\n <!-- Image -->\n <gui-field-group *ngSwitchCase=\"'image'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"image\"\n [formControlName]=\"item.key\" [config]=\"item\"></gui-file-uploader>\n </gui-field-group>\n <!-- Video -->\n <gui-field-group *ngSwitchCase=\"'video'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"video\"\n [formControlName]=\"item.key\" [config]=\"item\"></gui-file-uploader>\n </gui-field-group>\n <!-- Audio -->\n <gui-field-group *ngSwitchCase=\"'audio'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"audio\"\n [formControlName]=\"item.key\" [config]=\"item\"></gui-file-uploader>\n </gui-field-group>\n <!-- Image Select -->\n <gui-field-group *ngSwitchCase=\"'imageSelect'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-image-select [formControlName]=\"item.key\" [config]=\"item\"></gui-image-select>\n </gui-field-group>\n <!-- Textarea -->\n <gui-field-group *ngSwitchCase=\"'textarea'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-textarea [formControlName]=\"item.key\" [config]=\"item\"></gui-textarea>\n </gui-field-group>\n <!-- Hidden Input -->\n <input *ngSwitchCase=\"'hidden'\" type=\"hidden\" [formControlName]=\"item.key\">\n\n <!-- Inline Group -->\n <gui-inline-group *ngSwitchCase=\"'inline'\" [config]=\"item\" [formGroupName]=\"item.key\">\n <ng-container *ngFor=\"let child of item.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n </ng-container>\n </gui-inline-group>\n\n <!-- Group -->\n <mat-expansion-panel *ngSwitchCase=\"'group'\" [formGroupName]=\"item.key\"\n [(expanded)]=\"item.expanded\" [disabled]=\"item.disabled\">\n <mat-expansion-panel-header>\n <gui-field-label [config]=\"item\"></gui-field-label>\n </mat-expansion-panel-header>\n <!-- Lazy rendering -->\n <ng-template matExpansionPanelContent>\n <div *ngFor=\"let child of item.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <!-- Tabs -->\n <mat-expansion-panel *ngSwitchCase=\"'tabs'\" [formArrayName]=\"item.key\"\n [(expanded)]=\"item.expanded\" [disabled]=\"item.disabled\">\n <mat-expansion-panel-header>\n <gui-field-label [config]=\"item\"></gui-field-label>\n <!-- Show operation buttons after panel opened -->\n <ng-container *ngIf=\"item.expanded\">\n <button mat-icon-button type=\"button\" [color]=\"item.mode!=='list'?'primary':''\"\n (click)=\"changeTabsMode($event, item, 'normal')\">\n <mat-icon svgIcon=\"dots_horizontal\"></mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [color]=\"item.mode==='list'?'primary':''\"\n (click)=\"changeTabsMode($event, item, 'list')\">\n <mat-icon svgIcon=\"dots_vertical\"></mat-icon>\n </button>\n <ng-container *ngIf=\"item.template && (item.addable || item.addable===undefined)\">\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, true)\">\n <mat-icon svgIcon=\"content_copy\"></mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item)\">\n <mat-icon svgIcon=\"plus\"></mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"removeTab($event, form.get(item.key), item)\">\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </ng-container>\n </ng-container>\n </mat-expansion-panel-header>\n <!-- Lazy rendering -->\n <ng-template matExpansionPanelContent>\n <!-- Horizontal mode -->\n <mat-tab-group *ngIf=\"item.mode!=='list'\" class=\"gui-tabs\" disableRipple\n [mat-stretch-tabs]=\"false\" [(selectedIndex)]=\"item.selectedIndex\">\n <mat-tab *ngFor=\"let tab of item.children; index as i\" [disabled]=\"tab.disabled\">\n <ng-template mat-tab-label>\n <div>{{tab.name | ejs:{i} }}</div>\n </ng-template>\n <!-- FormControl & FormArray -->\n <ng-container *ngIf=\"!tab.children || tab.children.length===0 || tab.type==='tabs'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: tab, parent: item, formGroup: form.get([item.key])}\">\n </ng-template>\n </ng-container>\n <!-- FormGroup -->\n <ng-container *ngIf=\"tab.children?.length>0 && tab.type!=='tabs'\">\n <div *ngFor=\"let child of tab.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n </ng-container>\n </mat-tab>\n </mat-tab-group>\n\n <!-- Vertical mode -->\n <div class=\"gui-list\" *ngIf=\"item.mode==='list'\">\n <div class=\"gui-list-item\" *ngFor=\"let tab of item.children; index as i\"\n [class.gui-list-item-active]=\"item.selectedIndex===i\">\n <div class=\"gui-list-item-heading\">\n <span class=\"gui-list-item-title\"\n (click)=\"item.selectedIndex=i\">{{tab.name | ejs:{i} }}</span>\n <ng-container *ngIf=\"item.template && (item.addable || item.addable===undefined)\">\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, true, i)\">\n <mat-icon svgIcon=\"content_copy\"></mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, false, i)\">\n <mat-icon svgIcon=\"plus\"></mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"removeTab($event, form.get(item.key), item, i)\">\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"gui-list-item-content\">\n <!-- FormControl & FormArray -->\n <ng-container *ngIf=\"!tab.children || tab.children.length===0 || tab.type==='tabs'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: tab, parent: item, formGroup: form.get([item.key])}\">\n </ng-template>\n </ng-container>\n <!-- FormGroup -->\n <ng-container *ngIf=\"tab.children?.length>0 && tab.type!=='tabs'\">\n <div *ngFor=\"let child of tab.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <!-- Menu -->\n <mat-tab-group class=\"gui-menu\" *ngSwitchCase=\"'menu'\" [formGroupName]=\"item.key\" disableRipple>\n <mat-tab *ngFor=\"let menuChild of item.children\" [label]=\"menuChild.name\"\n [disabled]=\"menuChild.disabled\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"menuChild.type==='menuItem'\">\n <!-- Must wrap with div -->\n <div *ngFor=\"let controlItem of menuChild.children\" [formGroupName]=\"menuChild.key\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: controlItem, formGroup: form.get([item.key, menuChild.key])}\">\n </ng-template>\n </div>\n </ng-container>\n <!-- Support for unlimited nesting -->\n <ng-container *ngIf=\"menuChild.type==='menu'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: menuChild, formGroup: form.get(item.key)}\">\n </ng-template>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </ng-container>\n</ng-template>\n", styles: [".gui-form{--mat-form-field-container-text-size: 12px;--mat-expansion-header-text-size: 12px;--mat-expansion-container-text-size: 12px;--mat-expansion-header-collapsed-state-height: 32px;--mat-expansion-header-expanded-state-height: 32px;position:relative;display:block;font-size:12px}.gui-form .mat-expansion-panel{--mat-expansion-container-shape: 0;box-shadow:none!important}.gui-form .mat-expansion-panel-body{padding:0}.gui-form .mat-expansion-panel-header{padding:0 12px}.gui-form .mat-expansion-panel-header .mat-content{align-items:center;padding-right:8px}[dir=rtl] .gui-form .mat-expansion-panel-header .mat-content{padding-right:0;padding-left:8px}.gui-form .mat-expansion-panel-header .mat-content gui-field-label{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.gui-form .mat-expansion-indicator:after{vertical-align:2px}.gui-form .mat-mdc-tab-header{--mat-tab-header-label-text-size: 12px;--mdc-secondary-navigation-tab-container-height: 24px}.gui-form .mat-mdc-tab-header-pagination{min-width:var(--mdc-secondary-navigation-tab-container-height)}.gui-form .mat-mdc-tab{min-width:auto;padding:0 12px}.gui-form .mat-icon{display:inline-flex;justify-content:center;align-items:center;padding:0!important}.gui-form .mat-icon svg{width:14px;height:14px}.gui-form .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 24px;--mdc-icon-button-icon-size: 14px;padding:0}.gui-form .mat-mdc-icon-button .mat-mdc-button-touch-target{width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size)}.gui-form .mat-mdc-text-field-wrapper,.gui-form .mat-mdc-form-field-hint-wrapper{position:relative;padding:0 8px;border-radius:var(--mdc-filled-text-field-container-shape)}[dir=rtl] .gui-form .mat-mdc-text-field-wrapper,[dir=rtl] .gui-form .mat-mdc-form-field-hint-wrapper{padding:0 8px}.gui-form .mat-mdc-form-field-infix{min-height:auto;padding:0!important}.gui-form .mat-mdc-form-field-hint-spacer,.gui-form .mat-mdc-form-field-bottom-align:before,.gui-form .mdc-line-ripple{display:none}.gui-list-item-heading{display:flex;align-items:center;position:relative;padding:0 12px;line-height:24px}.gui-list-item-heading:before{position:absolute;left:0;width:2px;height:16px;background-color:var(--mat-expansion-header-text-color);content:\"\"}[dir=rtl] .gui-list-item-heading:before{left:auto;right:0}.gui-list-item-title{flex:1;cursor:pointer}.gui-list-item-active .gui-list-item-title{font-weight:700}.gui-menu .mat-mdc-tab-header{--mdc-tab-indicator-active-indicator-shape: 4px;padding:4px;background-color:var(--mdc-filled-text-field-container-color)}.gui-menu .mat-mdc-tab-header .mdc-tab__ripple:before{border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.gui-menu .mat-mdc-tab-labels{gap:4px}.gui-menu .mdc-tab-indicator .mdc-tab-indicator__content{height:100%;border-width:0;border-radius:var(--mdc-tab-indicator-active-indicator-shape);background-color:var(--mdc-tab-indicator-active-indicator-color)}.gui-menu .mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:.24}\n"] }]
|
|
1105
|
+
'[attr.id]': 'uid',
|
|
1106
|
+
'class': 'gui-form',
|
|
1107
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\">\n <div *ngFor=\"let item of formFields\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: item, formGroup: form}\">\n </ng-template>\n </div>\n</form>\n\n<ng-template #controlType let-item let-parent=\"parent\" let-form=\"formGroup\">\n <ng-container *ngIf=\"item.show\" [ngSwitch]=\"item.type\" [formGroup]=\"form\">\n <!-- Text -->\n <gui-field-group *ngSwitchCase=\"'text'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-input-text [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Number -->\n <gui-field-group *ngSwitchCase=\"'number'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-input-number [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Select -->\n <gui-field-group *ngSwitchCase=\"'select'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-select [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Switch -->\n <gui-field-group *ngSwitchCase=\"'switch'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-switch [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Slider -->\n <gui-field-group *ngSwitchCase=\"'slider'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-slider [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Button Toggle -->\n <gui-field-group *ngSwitchCase=\"'buttonToggle'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-button-toggle [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Fill -->\n <gui-field-group *ngSwitchCase=\"'fill'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-fill [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- File -->\n <gui-field-group *ngSwitchCase=\"'file'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Image -->\n <gui-field-group *ngSwitchCase=\"'image'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"image\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Video -->\n <gui-field-group *ngSwitchCase=\"'video'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"video\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Audio -->\n <gui-field-group *ngSwitchCase=\"'audio'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"audio\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Image Select -->\n <gui-field-group *ngSwitchCase=\"'imageSelect'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-image-select [formControlName]=\"item.key\" [config]=\"item\" [appendTo]=\"'#'+uid\" />\n </gui-field-group>\n <!-- Textarea -->\n <gui-field-group *ngSwitchCase=\"'textarea'\" [config]=\"item\" [flex]=\"item.col\">\n <gui-textarea [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n <!-- Hidden Input -->\n <input *ngSwitchCase=\"'hidden'\" type=\"hidden\" [formControlName]=\"item.key\">\n\n <!-- Inline Group -->\n <gui-inline-group *ngSwitchCase=\"'inline'\" [config]=\"item\" [formGroupName]=\"item.key\">\n <ng-container *ngFor=\"let child of item.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n </ng-container>\n </gui-inline-group>\n\n <!-- Group -->\n <mat-expansion-panel *ngSwitchCase=\"'group'\" [formGroupName]=\"item.key\"\n [(expanded)]=\"item.expanded\" [disabled]=\"item.disabled\">\n <mat-expansion-panel-header>\n <gui-field-label [config]=\"item\" />\n </mat-expansion-panel-header>\n <!-- Lazy rendering -->\n <ng-template matExpansionPanelContent>\n <div *ngFor=\"let child of item.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <!-- Tabs -->\n <mat-expansion-panel *ngSwitchCase=\"'tabs'\" [formArrayName]=\"item.key\"\n [(expanded)]=\"item.expanded\" [disabled]=\"item.disabled\">\n <mat-expansion-panel-header>\n <gui-field-label [config]=\"item\" />\n <!-- Show operation buttons when panel opened -->\n <ng-container *ngIf=\"item.expanded\">\n <button mat-icon-button type=\"button\" [color]=\"item.mode!=='list'?'primary':''\"\n (click)=\"changeTabsMode($event, item, 'normal')\">\n <mat-icon svgIcon=\"dots_horizontal\" />\n </button>\n <button mat-icon-button type=\"button\" [color]=\"item.mode==='list'?'primary':''\"\n (click)=\"changeTabsMode($event, item, 'list')\">\n <mat-icon svgIcon=\"dots_vertical\" />\n </button>\n <ng-container *ngIf=\"item.template && (item.addable || item.addable===undefined)\">\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, true)\">\n <mat-icon svgIcon=\"content_copy\" />\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item)\">\n <mat-icon svgIcon=\"plus\" />\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"removeTab($event, form.get(item.key), item)\">\n <mat-icon svgIcon=\"delete\" />\n </button>\n </ng-container>\n </ng-container>\n </mat-expansion-panel-header>\n <!-- Lazy rendering -->\n <ng-template matExpansionPanelContent>\n <!-- Horizontal mode -->\n <mat-tab-group *ngIf=\"item.mode!=='list'\" class=\"gui-tabs\" disableRipple\n [mat-stretch-tabs]=\"false\" [(selectedIndex)]=\"item.selectedIndex\">\n <mat-tab *ngFor=\"let tab of item.children; index as i\" [disabled]=\"tab.disabled\">\n <ng-template mat-tab-label>\n <div>{{tab.name | ejs:{i} }}</div>\n </ng-template>\n <!-- FormControl & FormArray -->\n <ng-container *ngIf=\"!tab.children || tab.children.length===0 || tab.type==='tabs'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: tab, parent: item, formGroup: form.get([item.key])}\">\n </ng-template>\n </ng-container>\n <!-- FormGroup -->\n <ng-container *ngIf=\"tab.children?.length>0 && tab.type!=='tabs'\">\n <div *ngFor=\"let child of tab.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n </ng-container>\n </mat-tab>\n </mat-tab-group>\n\n <!-- Vertical mode -->\n <div class=\"gui-list\" *ngIf=\"item.mode==='list'\">\n <div class=\"gui-list-item\" *ngFor=\"let tab of item.children; index as i\"\n [class.gui-list-item-active]=\"item.selectedIndex===i\">\n <div class=\"gui-list-item-heading\">\n <span class=\"gui-list-item-title\"\n (click)=\"item.selectedIndex=i\">{{tab.name | ejs:{i} }}</span>\n <ng-container *ngIf=\"item.template && (item.addable || item.addable===undefined)\">\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, true, i)\">\n <mat-icon svgIcon=\"content_copy\" />\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"addTab($event, form.get(item.key), item, false, i)\">\n <mat-icon svgIcon=\"plus\" />\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"item.disabled\"\n (click)=\"removeTab($event, form.get(item.key), item, i)\">\n <mat-icon svgIcon=\"delete\" />\n </button>\n </ng-container>\n </div>\n <div class=\"gui-list-item-content\">\n <!-- FormControl & FormArray -->\n <ng-container *ngIf=\"!tab.children || tab.children.length===0 || tab.type==='tabs'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: tab, parent: item, formGroup: form.get([item.key])}\">\n </ng-template>\n </ng-container>\n <!-- FormGroup -->\n <ng-container *ngIf=\"tab.children?.length>0 && tab.type!=='tabs'\">\n <div *ngFor=\"let child of tab.children\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <!-- Menu -->\n <mat-tab-group class=\"gui-menu\" *ngSwitchCase=\"'menu'\" [formGroupName]=\"item.key\" disableRipple>\n <mat-tab *ngFor=\"let menuChild of item.children\" [label]=\"menuChild.name\"\n [disabled]=\"menuChild.disabled\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"menuChild.type==='menuItem'\">\n <!-- Must wrap with div -->\n <div *ngFor=\"let controlItem of menuChild.children\" [formGroupName]=\"menuChild.key\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: controlItem, formGroup: form.get([item.key, menuChild.key])}\">\n </ng-template>\n </div>\n </ng-container>\n <!-- Support for unlimited nesting -->\n <ng-container *ngIf=\"menuChild.type==='menu'\">\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: menuChild, formGroup: form.get(item.key)}\">\n </ng-template>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </ng-container>\n</ng-template>\n", styles: [".gui-form{--mat-expansion-header-text-size: 12px;--mat-expansion-container-text-size: 12px;--mat-expansion-header-collapsed-state-height: 32px;--mat-expansion-header-expanded-state-height: 32px;position:relative;display:block;font-size:12px}.gui-form .mat-expansion-panel{--mat-expansion-container-shape: 0;box-shadow:none!important}.gui-form .mat-expansion-panel-body{padding:0}.gui-form .mat-expansion-panel-header{padding:0 12px}.gui-form .mat-expansion-panel-header .mat-content{align-items:center;padding-right:8px}[dir=rtl] .gui-form .mat-expansion-panel-header .mat-content{padding-right:0;padding-left:8px}.gui-form .mat-expansion-panel-header .mat-content gui-field-label{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.gui-form .mat-expansion-indicator:after{vertical-align:2px}.gui-form .mat-mdc-tab-header{--mat-tab-header-label-text-size: 12px;--mdc-secondary-navigation-tab-container-height: 24px}.gui-form .mat-mdc-tab-header-pagination{min-width:var(--mdc-secondary-navigation-tab-container-height)}.gui-form .mat-mdc-tab{min-width:auto;padding:0 12px}.gui-form .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 24px;--mdc-icon-button-icon-size: 14px;padding:0}.gui-form .mat-mdc-icon-button .mat-mdc-button-touch-target{width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size)}.gui-form .mat-mdc-icon-button .mat-icon{display:inline-flex;justify-content:center;align-items:center}.gui-list-item-heading{display:flex;align-items:center;position:relative;padding:0 12px;line-height:24px}.gui-list-item-heading:before{position:absolute;left:0;width:2px;height:16px;background-color:var(--mat-expansion-header-text-color);content:\"\"}[dir=rtl] .gui-list-item-heading:before{left:auto;right:0}.gui-list-item-title{flex:1;cursor:pointer}.gui-list-item-active .gui-list-item-title{font-weight:700}.gui-menu .mat-mdc-tab-header{--mdc-tab-indicator-active-indicator-shape: 4px;padding:4px;background-color:var(--mdc-filled-text-field-container-color)}.gui-menu .mat-mdc-tab-header .mdc-tab__ripple:before{border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.gui-menu .mat-mdc-tab-labels{gap:4px}.gui-menu .mdc-tab-indicator .mdc-tab-indicator__content{height:100%;border-width:0;border-radius:var(--mdc-tab-indicator-active-indicator-shape);background-color:var(--mdc-tab-indicator-active-indicator-color)}.gui-menu .mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:.24}\n"] }]
|
|
1094
1108
|
}], propDecorators: { form: [{
|
|
1095
1109
|
type: Input
|
|
1096
1110
|
}], config: [{
|