@acrodata/gui 0.5.0 → 1.1.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/README.md +26 -14
- package/button-toggle/button-toggle.d.ts +1 -1
- package/button-toggle/button-toggle.scss +1 -0
- package/button-toggle/icon.d.ts +1 -1
- package/esm2022/button-toggle/button-toggle.mjs +23 -15
- package/esm2022/button-toggle/icon.mjs +16 -11
- package/esm2022/field-group/field-group.mjs +7 -8
- package/esm2022/field-label/field-label.mjs +6 -7
- package/esm2022/file-uploader/file-uploader-config.mjs +9 -6
- package/esm2022/file-uploader/file-uploader.mjs +27 -15
- package/esm2022/fill/fill.mjs +25 -14
- package/esm2022/gui-form.mjs +57 -29
- package/esm2022/gui-icons.mjs +40 -10
- package/esm2022/gui-module.mjs +35 -35
- package/esm2022/gui-utils.mjs +10 -8
- package/esm2022/image-select/image-select.mjs +23 -14
- package/esm2022/inline-group/inline-group.mjs +6 -7
- package/esm2022/input-number/input-number.mjs +21 -13
- package/esm2022/input-text/input-text.mjs +21 -13
- package/esm2022/public-api.mjs +2 -1
- package/esm2022/select/select.mjs +23 -14
- package/esm2022/slider/slider.mjs +25 -14
- package/esm2022/switch/switch.mjs +12 -13
- package/esm2022/textarea/textarea.mjs +21 -13
- package/fesm2022/acrodata-gui.mjs +592 -443
- package/fesm2022/acrodata-gui.mjs.map +1 -1
- package/field-group/field-group.d.ts +1 -1
- package/field-label/field-label.d.ts +1 -1
- package/file-uploader/file-uploader.d.ts +4 -3
- package/fill/fill.d.ts +1 -1
- package/gui-form.d.ts +3 -1
- package/gui-form.scss +1 -2
- package/gui-icons.d.ts +28 -1
- package/gui-module.d.ts +32 -35
- package/gui-utils.d.ts +2 -2
- package/image-select/image-select.d.ts +1 -1
- package/image-select/image-select.scss +2 -0
- package/inline-group/inline-group.d.ts +1 -1
- package/input-number/input-number.d.ts +1 -1
- package/input-text/input-text.d.ts +1 -1
- package/package.json +8 -8
- package/public-api.d.ts +1 -0
- package/select/select.d.ts +1 -1
- package/slider/slider.d.ts +1 -1
- package/switch/switch.d.ts +1 -1
- package/switch/switch.scss +7 -7
- package/textarea/textarea.d.ts +1 -1
|
@@ -1,41 +1,28 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, forwardRef,
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
9
|
-
import * as i4 from '@angular/material/input';
|
|
10
|
-
import { MatInputModule } from '@angular/material/input';
|
|
2
|
+
import { Pipe, Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, forwardRef, Injectable, InjectionToken, Optional, Inject, EventEmitter, ViewChild, Output, NgModule } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule, FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
6
|
+
import { MatHint, MatFormField, MatPrefix, MatSuffix, MatFormFieldModule } from '@angular/material/form-field';
|
|
7
|
+
import { MatInput, MatInputModule } from '@angular/material/input';
|
|
11
8
|
import * as i1$2 from '@angular/material/icon';
|
|
12
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import * as i5$3 from '@angular/material/tabs';
|
|
24
|
-
import { MatTabsModule } from '@angular/material/tabs';
|
|
25
|
-
import * as i6 from '@angular/material/expansion';
|
|
26
|
-
import { MatExpansionModule } from '@angular/material/expansion';
|
|
27
|
-
import * as i2 from '@angular/material/tooltip';
|
|
28
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
29
|
-
import * as i5$2 from '@ng-matero/extensions/colorpicker';
|
|
30
|
-
import { MtxColorpickerModule } from '@ng-matero/extensions/colorpicker';
|
|
31
|
-
import * as i4$4 from '@ng-matero/extensions/select';
|
|
32
|
-
import { MtxSelect, MtxSelectModule } from '@ng-matero/extensions/select';
|
|
9
|
+
import { MatIcon, MatIconModule } from '@angular/material/icon';
|
|
10
|
+
import { MatSelect, MatSelectModule } from '@angular/material/select';
|
|
11
|
+
import { MatSlider, MatSliderThumb, MatSliderRangeThumb, MatSliderModule } from '@angular/material/slider';
|
|
12
|
+
import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
13
|
+
import { MatButtonToggleGroup, MatButtonToggle, MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
14
|
+
import { MatIconButton, MatButtonModule } from '@angular/material/button';
|
|
15
|
+
import { MatTabGroup, MatTab, MatTabLabel, MatTabContent, MatTabsModule } from '@angular/material/tabs';
|
|
16
|
+
import { MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelContent, MatExpansionModule } from '@angular/material/expansion';
|
|
17
|
+
import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
|
|
18
|
+
import { MtxColorpickerInput, MtxColorpicker, MtxColorpickerToggle, MtxColorpickerModule } from '@ng-matero/extensions/colorpicker';
|
|
19
|
+
import { MtxSelect, MtxSelectLabelTemplate, MtxSelectOptionTemplate, MtxSelectModule } from '@ng-matero/extensions/select';
|
|
33
20
|
import { of, Subscription, mergeWith } from 'rxjs';
|
|
34
|
-
import * as i5 from '@angular/material/core';
|
|
35
21
|
import * as i1$1 from '@angular/common/http';
|
|
36
22
|
import { HttpResponse } from '@angular/common/http';
|
|
37
23
|
import { catchError, finalize } from 'rxjs/operators';
|
|
38
|
-
import * as i2
|
|
24
|
+
import * as i2 from '@angular/platform-browser';
|
|
25
|
+
import { MatOption } from '@angular/material/core';
|
|
39
26
|
|
|
40
27
|
/**
|
|
41
28
|
* Lightweight EJS template engine
|
|
@@ -80,13 +67,14 @@ class GuiEjsPipe {
|
|
|
80
67
|
transform(value, data = {}) {
|
|
81
68
|
return ejsTmpl(value, data);
|
|
82
69
|
}
|
|
83
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
84
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
70
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiEjsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
71
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.6", ngImport: i0, type: GuiEjsPipe, isStandalone: true, name: "ejs" }); }
|
|
85
72
|
}
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiEjsPipe, decorators: [{
|
|
87
74
|
type: Pipe,
|
|
88
75
|
args: [{
|
|
89
76
|
name: 'ejs',
|
|
77
|
+
standalone: true,
|
|
90
78
|
}]
|
|
91
79
|
}] });
|
|
92
80
|
class GuiFlexDirective {
|
|
@@ -98,15 +86,16 @@ class GuiFlexDirective {
|
|
|
98
86
|
this.el.nativeElement.style.flex = `1 1 ${this.flex}%`;
|
|
99
87
|
this.el.nativeElement.style.maxWidth = `${this.flex}%`;
|
|
100
88
|
}
|
|
101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
102
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
89
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFlexDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
90
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.6", type: GuiFlexDirective, isStandalone: true, selector: "[flex]", inputs: { flex: "flex" }, ngImport: i0 }); }
|
|
103
91
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFlexDirective, decorators: [{
|
|
105
93
|
type: Directive,
|
|
106
94
|
args: [{
|
|
107
95
|
selector: '[flex]',
|
|
96
|
+
standalone: true,
|
|
108
97
|
}]
|
|
109
|
-
}], ctorParameters:
|
|
98
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { flex: [{
|
|
110
99
|
type: Input
|
|
111
100
|
}] } });
|
|
112
101
|
function compareValues(a, b, operator) {
|
|
@@ -149,22 +138,53 @@ class GuiFieldLabel {
|
|
|
149
138
|
this.styless =
|
|
150
139
|
(parentType === 'inline' && type !== 'inline') || type === 'group' || type === 'tabs';
|
|
151
140
|
}
|
|
152
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFieldLabel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
142
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiFieldLabel, isStandalone: true, selector: "gui-field-label", inputs: { config: "config", index: "index" }, host: { properties: { "class.gui-field-label": "!styless", "title": "title" } }, usesOnChanges: true, ngImport: i0, template: "@if (!config.description) {\n <span>{{title}}</span>\n} @else {\n <span\n [class.gui-field-label-with-description]=\"config.description\"\n [matTooltip]=\"config.description\"\n matTooltipPosition=\"above\"\n matTooltipClass=\"gui-field-label-tooltip\">{{title}}</span>\n}\n", styles: [".gui-field-label{display:inline-block;width:64px;height:24px;padding:0 4px;line-height:24px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.gui-field-label-with-description{text-decoration:underline dotted;cursor:help}\n"], dependencies: [{ kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
154
143
|
}
|
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFieldLabel, decorators: [{
|
|
156
145
|
type: Component,
|
|
157
146
|
args: [{ selector: 'gui-field-label', host: {
|
|
158
147
|
'[class.gui-field-label]': '!styless',
|
|
159
148
|
'[title]': 'title',
|
|
160
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "
|
|
149
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatTooltip], template: "@if (!config.description) {\n <span>{{title}}</span>\n} @else {\n <span\n [class.gui-field-label-with-description]=\"config.description\"\n [matTooltip]=\"config.description\"\n matTooltipPosition=\"above\"\n matTooltipClass=\"gui-field-label-tooltip\">{{title}}</span>\n}\n", styles: [".gui-field-label{display:inline-block;width:64px;height:24px;padding:0 4px;line-height:24px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.gui-field-label-with-description{text-decoration:underline dotted;cursor:help}\n"] }]
|
|
161
150
|
}], propDecorators: { config: [{
|
|
162
151
|
type: Input
|
|
163
152
|
}], index: [{
|
|
164
153
|
type: Input
|
|
165
154
|
}] } });
|
|
166
155
|
|
|
167
|
-
class
|
|
156
|
+
class GuiIcon {
|
|
157
|
+
constructor() {
|
|
158
|
+
this.src = '';
|
|
159
|
+
}
|
|
160
|
+
isUrl() {
|
|
161
|
+
return /^(https?:\/\/|\.?\/)\w+/.test(this.src);
|
|
162
|
+
}
|
|
163
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
164
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiIcon, isStandalone: true, selector: "gui-icon", inputs: { src: "src" }, host: { classAttribute: "gui-icon" }, ngImport: i0, template: `
|
|
165
|
+
@if (isUrl()) {
|
|
166
|
+
<img [src]="src" />
|
|
167
|
+
} @else {
|
|
168
|
+
<i [class]="src"></i>
|
|
169
|
+
}
|
|
170
|
+
`, isInline: true, styles: [".gui-icon{display:inline-flex}.gui-icon img,.gui-icon i{display:block;width:var(--mat-standard-button-toggle-height);height:var(--mat-standard-button-toggle-height);line-height:var(--mat-standard-button-toggle-height)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
171
|
+
}
|
|
172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiIcon, decorators: [{
|
|
173
|
+
type: Component,
|
|
174
|
+
args: [{ selector: 'gui-icon', template: `
|
|
175
|
+
@if (isUrl()) {
|
|
176
|
+
<img [src]="src" />
|
|
177
|
+
} @else {
|
|
178
|
+
<i [class]="src"></i>
|
|
179
|
+
}
|
|
180
|
+
`, host: {
|
|
181
|
+
class: 'gui-icon',
|
|
182
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [".gui-icon{display:inline-flex}.gui-icon img,.gui-icon i{display:block;width:var(--mat-standard-button-toggle-height);height:var(--mat-standard-button-toggle-height);line-height:var(--mat-standard-button-toggle-height)}\n"] }]
|
|
183
|
+
}], propDecorators: { src: [{
|
|
184
|
+
type: Input
|
|
185
|
+
}] } });
|
|
186
|
+
|
|
187
|
+
class GuiButtonToggle {
|
|
168
188
|
constructor(cdr) {
|
|
169
189
|
this.cdr = cdr;
|
|
170
190
|
this.config = {};
|
|
@@ -190,42 +210,200 @@ class GuiInputText {
|
|
|
190
210
|
onValueChange() {
|
|
191
211
|
this.onChange(this.value);
|
|
192
212
|
}
|
|
193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
194
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
213
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiButtonToggle, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
214
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiButtonToggle, isStandalone: true, selector: "gui-button-toggle", inputs: { config: "config", disabled: "disabled" }, host: { classAttribute: "gui-field gui-button-toggle" }, providers: [
|
|
195
215
|
{
|
|
196
216
|
provide: NG_VALUE_ACCESSOR,
|
|
197
|
-
useExisting: forwardRef(() =>
|
|
217
|
+
useExisting: forwardRef(() => GuiButtonToggle),
|
|
198
218
|
multi: true,
|
|
199
219
|
},
|
|
200
|
-
], ngImport: i0, template: "<mat-
|
|
220
|
+
], ngImport: i0, template: "<mat-button-toggle-group [(ngModel)]=\"value\" [disabled]=\"disabled\" [multiple]=\"config.multiple\"\n (change)=\"onValueChange()\" hideSingleSelectionIndicator hideMultipleSelectionIndicator>\n @for (opt of config.options; track opt) {\n <mat-button-toggle 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 @if (config.useIcon) {\n <gui-icon [src]=\"opt.src!\" />\n } @else {\n {{opt.label}}\n }\n </mat-button-toggle>\n }\n</mat-button-toggle-group>\n@if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n}\n", styles: [".gui-button-toggle{--mat-standard-button-toggle-height: 24px;--mat-standard-button-toggle-label-text-size: 12px}.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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: GuiFlexDirective, selector: "[flex]", inputs: ["flex"] }, { kind: "component", type: GuiIcon, selector: "gui-icon", inputs: ["src"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
201
221
|
}
|
|
202
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiButtonToggle, decorators: [{
|
|
203
223
|
type: Component,
|
|
204
|
-
args: [{ selector: 'gui-
|
|
205
|
-
class: 'gui-field gui-
|
|
224
|
+
args: [{ selector: 'gui-button-toggle', host: {
|
|
225
|
+
class: 'gui-field gui-button-toggle',
|
|
206
226
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
207
227
|
{
|
|
208
228
|
provide: NG_VALUE_ACCESSOR,
|
|
209
|
-
useExisting: forwardRef(() =>
|
|
229
|
+
useExisting: forwardRef(() => GuiButtonToggle),
|
|
210
230
|
multi: true,
|
|
211
231
|
},
|
|
212
|
-
],
|
|
213
|
-
|
|
232
|
+
], standalone: true, imports: [
|
|
233
|
+
ReactiveFormsModule,
|
|
234
|
+
FormsModule,
|
|
235
|
+
MatButtonToggleGroup,
|
|
236
|
+
MatButtonToggle,
|
|
237
|
+
MatHint,
|
|
238
|
+
GuiFlexDirective,
|
|
239
|
+
GuiIcon,
|
|
240
|
+
GuiFieldLabel,
|
|
241
|
+
], template: "<mat-button-toggle-group [(ngModel)]=\"value\" [disabled]=\"disabled\" [multiple]=\"config.multiple\"\n (change)=\"onValueChange()\" hideSingleSelectionIndicator hideMultipleSelectionIndicator>\n @for (opt of config.options; track opt) {\n <mat-button-toggle 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 @if (config.useIcon) {\n <gui-icon [src]=\"opt.src!\" />\n } @else {\n {{opt.label}}\n }\n </mat-button-toggle>\n }\n</mat-button-toggle-group>\n@if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n}\n", styles: [".gui-button-toggle{--mat-standard-button-toggle-height: 24px;--mat-standard-button-toggle-label-text-size: 12px}.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"] }]
|
|
242
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
214
243
|
type: Input
|
|
215
244
|
}], disabled: [{
|
|
216
245
|
type: Input
|
|
217
246
|
}] } });
|
|
218
247
|
|
|
219
|
-
class
|
|
220
|
-
constructor(cdr) {
|
|
248
|
+
class GuiFieldGroup {
|
|
249
|
+
constructor(differs, cdr) {
|
|
250
|
+
this.differs = differs;
|
|
251
|
+
this.cdr = cdr;
|
|
252
|
+
this.config = {};
|
|
253
|
+
}
|
|
254
|
+
ngOnInit() {
|
|
255
|
+
this.configDiffer = this.differs.find(this.config).create();
|
|
256
|
+
}
|
|
257
|
+
ngDoCheck() {
|
|
258
|
+
const changes = this.configDiffer?.diff(this.config);
|
|
259
|
+
changes?.forEachChangedItem(record => {
|
|
260
|
+
this.cdr.markForCheck();
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFieldGroup, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
264
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiFieldGroup, isStandalone: true, selector: "gui-field-group", inputs: { config: "config" }, host: { classAttribute: "gui-field-group" }, ngImport: i0, template: "@if (config.parentType!=='inline' && config.name) {\n <gui-field-label [config]=\"config\" [index]=\"config.index\" />\n}\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: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
265
|
+
}
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFieldGroup, decorators: [{
|
|
267
|
+
type: Component,
|
|
268
|
+
args: [{ selector: 'gui-field-group', host: {
|
|
269
|
+
class: 'gui-field-group',
|
|
270
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [GuiFieldLabel], template: "@if (config.parentType!=='inline' && config.name) {\n <gui-field-label [config]=\"config\" [index]=\"config.index\" />\n}\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"] }]
|
|
271
|
+
}], ctorParameters: () => [{ type: i0.KeyValueDiffers }, { type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
272
|
+
type: Input
|
|
273
|
+
}] } });
|
|
274
|
+
|
|
275
|
+
class GuiFileUploaderConfig {
|
|
276
|
+
constructor(http) {
|
|
277
|
+
this.http = http;
|
|
278
|
+
/**
|
|
279
|
+
* The file upload URL
|
|
280
|
+
*/
|
|
281
|
+
this.url = '';
|
|
282
|
+
/**
|
|
283
|
+
* The file upload params
|
|
284
|
+
*/
|
|
285
|
+
this.params = {};
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* The File upload API
|
|
289
|
+
*
|
|
290
|
+
* @param file file data
|
|
291
|
+
* @returns
|
|
292
|
+
*/
|
|
293
|
+
upload(file) {
|
|
294
|
+
return this.http.post(this.url, file, {
|
|
295
|
+
reportProgress: true,
|
|
296
|
+
observe: 'events',
|
|
297
|
+
params: this.params,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFileUploaderConfig, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
301
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFileUploaderConfig, providedIn: 'root' }); }
|
|
302
|
+
}
|
|
303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFileUploaderConfig, decorators: [{
|
|
304
|
+
type: Injectable,
|
|
305
|
+
args: [{
|
|
306
|
+
providedIn: 'root',
|
|
307
|
+
}]
|
|
308
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }] });
|
|
309
|
+
|
|
310
|
+
const svgIcons = {
|
|
311
|
+
horizontal: `
|
|
312
|
+
<svg viewBox="0 0 24 24">
|
|
313
|
+
<path d="M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"></path>
|
|
314
|
+
</svg>
|
|
315
|
+
`,
|
|
316
|
+
vertical: `
|
|
317
|
+
<svg viewBox="0 0 24 24">
|
|
318
|
+
<path d="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"></path>
|
|
319
|
+
</svg>
|
|
320
|
+
`,
|
|
321
|
+
add: `
|
|
322
|
+
<svg viewBox="0 0 24 24">
|
|
323
|
+
<path d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"></path>
|
|
324
|
+
</svg>
|
|
325
|
+
`,
|
|
326
|
+
delete: `
|
|
327
|
+
<svg viewBox="0 0 24 24">
|
|
328
|
+
<path d="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"></path>
|
|
329
|
+
</svg>
|
|
330
|
+
`,
|
|
331
|
+
copy: `
|
|
332
|
+
<svg viewBox="0 0 24 24">
|
|
333
|
+
<path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path>
|
|
334
|
+
</svg>
|
|
335
|
+
`,
|
|
336
|
+
link: `
|
|
337
|
+
<svg viewBox="0 0 24 24">
|
|
338
|
+
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path>
|
|
339
|
+
</svg>
|
|
340
|
+
`,
|
|
341
|
+
clear: `
|
|
342
|
+
<svg viewBox="0 0 24 24">
|
|
343
|
+
<path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
|
|
344
|
+
</svg>
|
|
345
|
+
`,
|
|
346
|
+
file: `
|
|
347
|
+
<svg viewBox="0 0 24 24">
|
|
348
|
+
<path d="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z" />
|
|
349
|
+
</svg>
|
|
350
|
+
`,
|
|
351
|
+
upload: `
|
|
352
|
+
<svg viewBox="0 0 24 24">
|
|
353
|
+
<path d="M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 2L6.46 7.46L7.88 8.88L11 5.75V15H13V5.75L16.13 8.88L17.55 7.45L12 2Z" />
|
|
354
|
+
</svg>
|
|
355
|
+
`,
|
|
356
|
+
};
|
|
357
|
+
/** Injection token that can be used to provide the default icons. */
|
|
358
|
+
const GUI_ICONS_CONFIG = new InjectionToken('gui-icons-config');
|
|
359
|
+
class GuiIconsRegistry {
|
|
360
|
+
constructor(_iconRegistry, _sanitizer, _defaultIcons) {
|
|
361
|
+
this._iconRegistry = _iconRegistry;
|
|
362
|
+
this._sanitizer = _sanitizer;
|
|
363
|
+
this._defaultIcons = _defaultIcons;
|
|
364
|
+
}
|
|
365
|
+
add(...iconNames) {
|
|
366
|
+
const icons = Object.assign(svgIcons, this._defaultIcons);
|
|
367
|
+
iconNames.forEach(k => {
|
|
368
|
+
this._iconRegistry.addSvgIconLiteral(k, this._sanitizer.bypassSecurityTrustHtml(icons[k]));
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiIconsRegistry, deps: [{ token: i1$2.MatIconRegistry }, { token: i2.DomSanitizer }, { token: GUI_ICONS_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
372
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiIconsRegistry, providedIn: 'root' }); }
|
|
373
|
+
}
|
|
374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiIconsRegistry, decorators: [{
|
|
375
|
+
type: Injectable,
|
|
376
|
+
args: [{ providedIn: 'root' }]
|
|
377
|
+
}], ctorParameters: () => [{ type: i1$2.MatIconRegistry }, { type: i2.DomSanitizer }, { type: undefined, decorators: [{
|
|
378
|
+
type: Optional
|
|
379
|
+
}, {
|
|
380
|
+
type: Inject,
|
|
381
|
+
args: [GUI_ICONS_CONFIG]
|
|
382
|
+
}] }] });
|
|
383
|
+
|
|
384
|
+
class GuiFileUploader {
|
|
385
|
+
constructor(fileUploaderCfg, cdr, iconsRegistry) {
|
|
386
|
+
this.fileUploaderCfg = fileUploaderCfg;
|
|
221
387
|
this.cdr = cdr;
|
|
222
388
|
this.config = {};
|
|
223
389
|
this.disabled = false;
|
|
390
|
+
this.type = '*';
|
|
391
|
+
this.name = '';
|
|
392
|
+
this.accept = '';
|
|
393
|
+
this.fileChange = new EventEmitter();
|
|
394
|
+
// media src
|
|
395
|
+
this.url = '';
|
|
224
396
|
this.onChange = () => { };
|
|
225
397
|
this.onTouched = () => { };
|
|
398
|
+
iconsRegistry.add('link', 'clear', 'file', 'upload');
|
|
399
|
+
}
|
|
400
|
+
ngOnChanges(changes) {
|
|
401
|
+
if (changes['type']) {
|
|
402
|
+
this.accept = this.type + '/*';
|
|
403
|
+
}
|
|
226
404
|
}
|
|
227
405
|
writeValue(value) {
|
|
228
|
-
this.
|
|
406
|
+
this.url = value;
|
|
229
407
|
this.cdr.markForCheck();
|
|
230
408
|
}
|
|
231
409
|
registerOnChange(fn) {
|
|
@@ -238,36 +416,99 @@ class GuiInputNumber {
|
|
|
238
416
|
this.disabled = isDisabled;
|
|
239
417
|
this.cdr.markForCheck();
|
|
240
418
|
}
|
|
241
|
-
|
|
242
|
-
|
|
419
|
+
upload(file) {
|
|
420
|
+
const formData = new FormData();
|
|
421
|
+
formData.append('file', file.data || '');
|
|
422
|
+
file.inProgress = true;
|
|
423
|
+
this.fileUploaderCfg
|
|
424
|
+
.upload(formData)
|
|
425
|
+
.pipe(catchError((error) => {
|
|
426
|
+
file.inProgress = false;
|
|
427
|
+
return of(`${file.data?.name || 'File'} upload failed.`);
|
|
428
|
+
}), finalize(() => { }))
|
|
429
|
+
.subscribe(res => {
|
|
430
|
+
if (res instanceof HttpResponse && res.body) {
|
|
431
|
+
this.url = res.body.data;
|
|
432
|
+
this.onChange(this.url);
|
|
433
|
+
this.onTouched();
|
|
434
|
+
this.fileChange.emit(this.url);
|
|
435
|
+
}
|
|
436
|
+
this.cdr.detectChanges();
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
onUrlChange(e) {
|
|
440
|
+
this.url = e.target.value;
|
|
441
|
+
this.onChange(this.url);
|
|
442
|
+
this.fileChange.emit(this.url);
|
|
443
|
+
}
|
|
444
|
+
onFileChange(e) {
|
|
445
|
+
this.file = {
|
|
446
|
+
data: e.target.files[0],
|
|
447
|
+
inProgress: false,
|
|
448
|
+
progress: 0,
|
|
449
|
+
};
|
|
450
|
+
this.upload(this.file);
|
|
451
|
+
// reset input value
|
|
452
|
+
e.target.value = '';
|
|
453
|
+
}
|
|
454
|
+
onBlur() {
|
|
455
|
+
this.onTouched();
|
|
456
|
+
}
|
|
457
|
+
onClear() {
|
|
458
|
+
this.url = '';
|
|
459
|
+
this.onChange(this.url);
|
|
460
|
+
this.onTouched();
|
|
461
|
+
this.fileChange.emit(this.url);
|
|
243
462
|
}
|
|
244
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
245
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
463
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFileUploader, deps: [{ token: GuiFileUploaderConfig }, { token: i0.ChangeDetectorRef }, { token: GuiIconsRegistry }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
464
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiFileUploader, isStandalone: true, 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: [
|
|
246
465
|
{
|
|
247
466
|
provide: NG_VALUE_ACCESSOR,
|
|
248
|
-
useExisting: forwardRef(() =>
|
|
467
|
+
useExisting: forwardRef(() => GuiFileUploader),
|
|
249
468
|
multi: true,
|
|
250
469
|
},
|
|
251
|
-
], ngImport: i0, template: "<mat-form-field>\n <
|
|
470
|
+
], 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 @if (url) {\n <button matSuffix mat-icon-button color=\"warn\" [disabled]=\"disabled\" (click)=\"onClear()\">\n <mat-icon svgIcon=\"clear\" />\n </button>\n }\n</mat-form-field>\n\n<figure class=\"gui-file-content\">\n @if (url) {\n @switch (type) {\n @case ('image') {\n <img [src]=\"url\" />\n }\n @case ('video') {\n <video [src]=\"url\"></video>\n }\n @case ('audio') {\n <audio [src]=\"url\" controls></audio>\n }\n @default {\n <mat-icon svgIcon=\"file\" />\n }\n }\n } @else {\n <div class=\"gui-file-placeholder\">\n <mat-icon svgIcon=\"upload\" />\n </div>\n }\n\n <input #fileInput type=\"file\" [accept]=\"accept\" [name]=\"name\"\n [disabled]=\"disabled\" (change)=\"onFileChange($event)\">\n</figure>\n\n@if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n}\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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: 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: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
252
471
|
}
|
|
253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFileUploader, decorators: [{
|
|
254
473
|
type: Component,
|
|
255
|
-
args: [{ selector: 'gui-
|
|
256
|
-
class: 'gui-field gui-
|
|
474
|
+
args: [{ selector: 'gui-file-uploader', host: {
|
|
475
|
+
class: 'gui-field gui-file-uploader',
|
|
257
476
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
258
477
|
{
|
|
259
478
|
provide: NG_VALUE_ACCESSOR,
|
|
260
|
-
useExisting: forwardRef(() =>
|
|
479
|
+
useExisting: forwardRef(() => GuiFileUploader),
|
|
261
480
|
multi: true,
|
|
262
481
|
},
|
|
263
|
-
],
|
|
264
|
-
|
|
482
|
+
], standalone: true, imports: [
|
|
483
|
+
ReactiveFormsModule,
|
|
484
|
+
FormsModule,
|
|
485
|
+
MatFormField,
|
|
486
|
+
MatIcon,
|
|
487
|
+
MatPrefix,
|
|
488
|
+
MatInput,
|
|
489
|
+
MatIconButton,
|
|
490
|
+
MatSuffix,
|
|
491
|
+
MatHint,
|
|
492
|
+
GuiFieldLabel,
|
|
493
|
+
], 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 @if (url) {\n <button matSuffix mat-icon-button color=\"warn\" [disabled]=\"disabled\" (click)=\"onClear()\">\n <mat-icon svgIcon=\"clear\" />\n </button>\n }\n</mat-form-field>\n\n<figure class=\"gui-file-content\">\n @if (url) {\n @switch (type) {\n @case ('image') {\n <img [src]=\"url\" />\n }\n @case ('video') {\n <video [src]=\"url\"></video>\n }\n @case ('audio') {\n <audio [src]=\"url\" controls></audio>\n }\n @default {\n <mat-icon svgIcon=\"file\" />\n }\n }\n } @else {\n <div class=\"gui-file-placeholder\">\n <mat-icon svgIcon=\"upload\" />\n </div>\n }\n\n <input #fileInput type=\"file\" [accept]=\"accept\" [name]=\"name\"\n [disabled]=\"disabled\" (change)=\"onFileChange($event)\">\n</figure>\n\n@if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n}\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"] }]
|
|
494
|
+
}], ctorParameters: () => [{ type: GuiFileUploaderConfig }, { type: i0.ChangeDetectorRef }, { type: GuiIconsRegistry }], propDecorators: { fileInput: [{
|
|
495
|
+
type: ViewChild,
|
|
496
|
+
args: ['fileInput']
|
|
497
|
+
}], config: [{
|
|
265
498
|
type: Input
|
|
266
499
|
}], disabled: [{
|
|
267
500
|
type: Input
|
|
501
|
+
}], type: [{
|
|
502
|
+
type: Input
|
|
503
|
+
}], name: [{
|
|
504
|
+
type: Input
|
|
505
|
+
}], accept: [{
|
|
506
|
+
type: Input
|
|
507
|
+
}], fileChange: [{
|
|
508
|
+
type: Output
|
|
268
509
|
}] } });
|
|
269
510
|
|
|
270
|
-
class
|
|
511
|
+
class GuiFill {
|
|
271
512
|
constructor(cdr) {
|
|
272
513
|
this.cdr = cdr;
|
|
273
514
|
this.config = {};
|
|
@@ -293,41 +534,58 @@ class GuiSelect {
|
|
|
293
534
|
onValueChange() {
|
|
294
535
|
this.onChange(this.value);
|
|
295
536
|
}
|
|
296
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
297
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
537
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFill, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
538
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiFill, isStandalone: true, selector: "gui-fill", inputs: { config: "config", disabled: "disabled" }, host: { classAttribute: "gui-field gui-fill" }, providers: [
|
|
298
539
|
{
|
|
299
540
|
provide: NG_VALUE_ACCESSOR,
|
|
300
|
-
useExisting: forwardRef(() =>
|
|
541
|
+
useExisting: forwardRef(() => GuiFill),
|
|
301
542
|
multi: true,
|
|
302
543
|
},
|
|
303
|
-
], ngImport: i0, template: "<mat-form-field>\n <span
|
|
544
|
+
], 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\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\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: 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: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MtxColorpickerInput, selector: "input[mtxColorpicker]", inputs: ["mtxColorpicker", "disabled", "value", "format"], outputs: ["colorChange", "colorInput"], exportAs: ["mtxColorpickerInput"] }, { kind: "component", type: MtxColorpicker, selector: "mtx-colorpicker", inputs: ["content", "disabled", "xPosition", "yPosition", "restoreFocus", "opened", "color", "format"], outputs: ["opened", "closed"], exportAs: ["mtxColorpicker"] }, { kind: "component", type: 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 }); }
|
|
304
545
|
}
|
|
305
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
546
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiFill, decorators: [{
|
|
306
547
|
type: Component,
|
|
307
|
-
args: [{ selector: 'gui-
|
|
308
|
-
class: 'gui-field gui-
|
|
548
|
+
args: [{ selector: 'gui-fill', host: {
|
|
549
|
+
class: 'gui-field gui-fill',
|
|
309
550
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
310
551
|
{
|
|
311
552
|
provide: NG_VALUE_ACCESSOR,
|
|
312
|
-
useExisting: forwardRef(() =>
|
|
553
|
+
useExisting: forwardRef(() => GuiFill),
|
|
313
554
|
multi: true,
|
|
314
555
|
},
|
|
315
|
-
],
|
|
316
|
-
|
|
556
|
+
], standalone: true, imports: [
|
|
557
|
+
ReactiveFormsModule,
|
|
558
|
+
FormsModule,
|
|
559
|
+
MatFormField,
|
|
560
|
+
MatPrefix,
|
|
561
|
+
MatInput,
|
|
562
|
+
MatSuffix,
|
|
563
|
+
MatHint,
|
|
564
|
+
MtxColorpickerInput,
|
|
565
|
+
MtxColorpicker,
|
|
566
|
+
MtxColorpickerToggle,
|
|
567
|
+
GuiFieldLabel,
|
|
568
|
+
], 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\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\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\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"] }]
|
|
569
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
317
570
|
type: Input
|
|
318
571
|
}], disabled: [{
|
|
319
572
|
type: Input
|
|
320
573
|
}] } });
|
|
321
574
|
|
|
322
|
-
class
|
|
575
|
+
class GuiImageSelect {
|
|
323
576
|
constructor(cdr) {
|
|
324
577
|
this.cdr = cdr;
|
|
325
578
|
this.config = {};
|
|
326
579
|
this.disabled = false;
|
|
327
|
-
this.
|
|
580
|
+
this.appendTo = 'body';
|
|
328
581
|
this.onChange = () => { };
|
|
329
582
|
this.onTouched = () => { };
|
|
330
583
|
}
|
|
584
|
+
ngAfterViewInit() {
|
|
585
|
+
// Add additional class for ng-select's dropdown panel
|
|
586
|
+
const { ngSelect } = this.mtxSelect;
|
|
587
|
+
ngSelect.classes = (ngSelect.classes || '') + ' gui-image-select';
|
|
588
|
+
}
|
|
331
589
|
writeValue(value) {
|
|
332
590
|
this.value = value;
|
|
333
591
|
this.cdr.markForCheck();
|
|
@@ -345,33 +603,65 @@ class GuiSwitch {
|
|
|
345
603
|
onValueChange() {
|
|
346
604
|
this.onChange(this.value);
|
|
347
605
|
}
|
|
348
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
349
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
606
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiImageSelect, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
607
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiImageSelect, isStandalone: true, selector: "gui-image-select", inputs: { config: "config", disabled: "disabled", appendTo: "appendTo" }, host: { classAttribute: "gui-field gui-image-select" }, providers: [
|
|
350
608
|
{
|
|
351
609
|
provide: NG_VALUE_ACCESSOR,
|
|
352
|
-
useExisting: forwardRef(() =>
|
|
610
|
+
useExisting: forwardRef(() => GuiImageSelect),
|
|
353
611
|
multi: true,
|
|
354
612
|
},
|
|
355
|
-
], ngImport: i0, template: "<mat-
|
|
613
|
+
], viewQueries: [{ propertyName: "mtxSelect", first: true, predicate: MtxSelect, descendants: true }], ngImport: i0, template: "<mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\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{--mat-form-field-container-vertical-padding: 0}.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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: MtxSelect, selector: "mtx-select", inputs: ["addTag", "addTagText", "appearance", "appendTo", "bindLabel", "bindValue", "closeOnSelect", "clearAllText", "clearable", "clearOnBackspace", "compareWith", "dropdownPosition", "groupBy", "groupValue", "bufferAmount", "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", "disabled", "required", "errorStateMatcher", "aria-label", "aria-labelledby"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["mtxSelect"] }, { kind: "directive", type: MtxSelectLabelTemplate, selector: "[ng-label-tmp]" }, { kind: "directive", type: MtxSelectOptionTemplate, selector: "[ng-option-tmp]" }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
356
614
|
}
|
|
357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiImageSelect, decorators: [{
|
|
358
616
|
type: Component,
|
|
359
|
-
args: [{ selector: 'gui-
|
|
360
|
-
class: 'gui-field gui-
|
|
617
|
+
args: [{ selector: 'gui-image-select', host: {
|
|
618
|
+
class: 'gui-field gui-image-select',
|
|
361
619
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
362
620
|
{
|
|
363
621
|
provide: NG_VALUE_ACCESSOR,
|
|
364
|
-
useExisting: forwardRef(() =>
|
|
622
|
+
useExisting: forwardRef(() => GuiImageSelect),
|
|
365
623
|
multi: true,
|
|
366
624
|
},
|
|
367
|
-
],
|
|
368
|
-
|
|
625
|
+
], standalone: true, imports: [
|
|
626
|
+
ReactiveFormsModule,
|
|
627
|
+
FormsModule,
|
|
628
|
+
MatFormField,
|
|
629
|
+
MatPrefix,
|
|
630
|
+
MatSuffix,
|
|
631
|
+
MatHint,
|
|
632
|
+
MtxSelect,
|
|
633
|
+
MtxSelectLabelTemplate,
|
|
634
|
+
MtxSelectOptionTemplate,
|
|
635
|
+
GuiFieldLabel,
|
|
636
|
+
], template: "<mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\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{--mat-form-field-container-vertical-padding: 0}.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"] }]
|
|
637
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { mtxSelect: [{
|
|
638
|
+
type: ViewChild,
|
|
639
|
+
args: [MtxSelect]
|
|
640
|
+
}], config: [{
|
|
369
641
|
type: Input
|
|
370
642
|
}], disabled: [{
|
|
371
643
|
type: Input
|
|
644
|
+
}], appendTo: [{
|
|
645
|
+
type: Input
|
|
372
646
|
}] } });
|
|
373
647
|
|
|
374
|
-
class
|
|
648
|
+
class GuiInlineGroup {
|
|
649
|
+
constructor() {
|
|
650
|
+
this.config = {};
|
|
651
|
+
}
|
|
652
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiInlineGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
653
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiInlineGroup, isStandalone: true, selector: "gui-inline-group", inputs: { config: "config" }, host: { classAttribute: "gui-inline-group" }, ngImport: i0, template: "@if (config.name) {\n <gui-field-label [config]=\"config\" />\n}\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: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
654
|
+
}
|
|
655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiInlineGroup, decorators: [{
|
|
656
|
+
type: Component,
|
|
657
|
+
args: [{ selector: 'gui-inline-group', host: {
|
|
658
|
+
class: 'gui-inline-group',
|
|
659
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [GuiFieldLabel], template: "@if (config.name) {\n <gui-field-label [config]=\"config\" />\n}\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"] }]
|
|
660
|
+
}], propDecorators: { config: [{
|
|
661
|
+
type: Input
|
|
662
|
+
}] } });
|
|
663
|
+
|
|
664
|
+
class GuiInputNumber {
|
|
375
665
|
constructor(cdr) {
|
|
376
666
|
this.cdr = cdr;
|
|
377
667
|
this.config = {};
|
|
@@ -381,7 +671,6 @@ class GuiSlider {
|
|
|
381
671
|
}
|
|
382
672
|
writeValue(value) {
|
|
383
673
|
this.value = value;
|
|
384
|
-
this.setInputValue();
|
|
385
674
|
this.cdr.markForCheck();
|
|
386
675
|
}
|
|
387
676
|
registerOnChange(fn) {
|
|
@@ -397,72 +686,42 @@ class GuiSlider {
|
|
|
397
686
|
onValueChange() {
|
|
398
687
|
this.onChange(this.value);
|
|
399
688
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
this.onValueChange();
|
|
403
|
-
}
|
|
404
|
-
onRangeInputChange() {
|
|
405
|
-
this.value = [this.minValue, this.maxValue];
|
|
406
|
-
this.onValueChange();
|
|
407
|
-
}
|
|
408
|
-
setInputValue() {
|
|
409
|
-
if (Array.isArray(this.value)) {
|
|
410
|
-
this.minValue = this.value[0];
|
|
411
|
-
this.maxValue = this.value[1];
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiSlider, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
415
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiSlider, selector: "gui-slider", inputs: { config: "config", disabled: "disabled" }, host: { classAttribute: "gui-field gui-slider" }, providers: [
|
|
689
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiInputNumber, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
690
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiInputNumber, isStandalone: true, selector: "gui-input-number", inputs: { config: "config", disabled: "disabled" }, host: { classAttribute: "gui-field gui-input-number" }, providers: [
|
|
416
691
|
{
|
|
417
692
|
provide: NG_VALUE_ACCESSOR,
|
|
418
|
-
useExisting: forwardRef(() =>
|
|
693
|
+
useExisting: forwardRef(() => GuiInputNumber),
|
|
419
694
|
multi: true,
|
|
420
695
|
},
|
|
421
|
-
], ngImport: i0, template: "
|
|
696
|
+
], ngImport: i0, template: "<mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: 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: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
422
697
|
}
|
|
423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiInputNumber, decorators: [{
|
|
424
699
|
type: Component,
|
|
425
|
-
args: [{ selector: 'gui-
|
|
426
|
-
class: 'gui-field gui-
|
|
700
|
+
args: [{ selector: 'gui-input-number', host: {
|
|
701
|
+
class: 'gui-field gui-input-number',
|
|
427
702
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
428
703
|
{
|
|
429
704
|
provide: NG_VALUE_ACCESSOR,
|
|
430
|
-
useExisting: forwardRef(() =>
|
|
705
|
+
useExisting: forwardRef(() => GuiInputNumber),
|
|
431
706
|
multi: true,
|
|
432
707
|
},
|
|
433
|
-
],
|
|
434
|
-
|
|
708
|
+
], standalone: true, imports: [
|
|
709
|
+
ReactiveFormsModule,
|
|
710
|
+
FormsModule,
|
|
711
|
+
MatFormField,
|
|
712
|
+
MatPrefix,
|
|
713
|
+
MatInput,
|
|
714
|
+
MatSuffix,
|
|
715
|
+
MatHint,
|
|
716
|
+
GuiFieldLabel,
|
|
717
|
+
], template: "<mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\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"] }]
|
|
718
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
435
719
|
type: Input
|
|
436
720
|
}], disabled: [{
|
|
437
721
|
type: Input
|
|
438
722
|
}] } });
|
|
439
723
|
|
|
440
|
-
class
|
|
441
|
-
constructor() {
|
|
442
|
-
this.src = '';
|
|
443
|
-
}
|
|
444
|
-
isUrl() {
|
|
445
|
-
return /^(https?:\/\/|\.?\/)\w+/.test(this.src);
|
|
446
|
-
}
|
|
447
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
448
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: GuiIcon, selector: "gui-icon", inputs: { src: "src" }, host: { classAttribute: "gui-icon" }, ngImport: i0, template: `
|
|
449
|
-
<img *ngIf="isUrl()" [src]="src" />
|
|
450
|
-
<i *ngIf="!isUrl()" [class]="src"></i>
|
|
451
|
-
`, isInline: true, styles: [".gui-icon{display:inline-flex}.gui-icon img,.gui-icon i{display:block;width:var(--mat-standard-button-toggle-height);height:var(--mat-standard-button-toggle-height);line-height:var(--mat-standard-button-toggle-height)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
452
|
-
}
|
|
453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiIcon, decorators: [{
|
|
454
|
-
type: Component,
|
|
455
|
-
args: [{ selector: 'gui-icon', template: `
|
|
456
|
-
<img *ngIf="isUrl()" [src]="src" />
|
|
457
|
-
<i *ngIf="!isUrl()" [class]="src"></i>
|
|
458
|
-
`, host: {
|
|
459
|
-
class: 'gui-icon',
|
|
460
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".gui-icon{display:inline-flex}.gui-icon img,.gui-icon i{display:block;width:var(--mat-standard-button-toggle-height);height:var(--mat-standard-button-toggle-height);line-height:var(--mat-standard-button-toggle-height)}\n"] }]
|
|
461
|
-
}], propDecorators: { src: [{
|
|
462
|
-
type: Input
|
|
463
|
-
}] } });
|
|
464
|
-
|
|
465
|
-
class GuiButtonToggle {
|
|
724
|
+
class GuiInputText {
|
|
466
725
|
constructor(cdr) {
|
|
467
726
|
this.cdr = cdr;
|
|
468
727
|
this.config = {};
|
|
@@ -488,33 +747,42 @@ class GuiButtonToggle {
|
|
|
488
747
|
onValueChange() {
|
|
489
748
|
this.onChange(this.value);
|
|
490
749
|
}
|
|
491
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
492
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
750
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiInputText, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
751
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiInputText, isStandalone: true, selector: "gui-input-text", inputs: { config: "config", disabled: "disabled" }, host: { classAttribute: "gui-field gui-input-text" }, providers: [
|
|
493
752
|
{
|
|
494
753
|
provide: NG_VALUE_ACCESSOR,
|
|
495
|
-
useExisting: forwardRef(() =>
|
|
754
|
+
useExisting: forwardRef(() => GuiInputText),
|
|
496
755
|
multi: true,
|
|
497
756
|
},
|
|
498
|
-
], ngImport: i0, template: "<mat-
|
|
757
|
+
], ngImport: i0, template: "<mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\n <input matInput type=\"text\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n (change)=\"onValueChange()\">\n @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\n</mat-form-field>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: 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: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
499
758
|
}
|
|
500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiInputText, decorators: [{
|
|
501
760
|
type: Component,
|
|
502
|
-
args: [{ selector: 'gui-
|
|
503
|
-
class: 'gui-field gui-
|
|
761
|
+
args: [{ selector: 'gui-input-text', host: {
|
|
762
|
+
class: 'gui-field gui-input-text',
|
|
504
763
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
505
764
|
{
|
|
506
765
|
provide: NG_VALUE_ACCESSOR,
|
|
507
|
-
useExisting: forwardRef(() =>
|
|
766
|
+
useExisting: forwardRef(() => GuiInputText),
|
|
508
767
|
multi: true,
|
|
509
768
|
},
|
|
510
|
-
],
|
|
511
|
-
|
|
769
|
+
], standalone: true, imports: [
|
|
770
|
+
ReactiveFormsModule,
|
|
771
|
+
FormsModule,
|
|
772
|
+
MatFormField,
|
|
773
|
+
MatPrefix,
|
|
774
|
+
MatInput,
|
|
775
|
+
MatSuffix,
|
|
776
|
+
MatHint,
|
|
777
|
+
GuiFieldLabel,
|
|
778
|
+
], template: "<mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\n <input matInput type=\"text\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n (change)=\"onValueChange()\">\n @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\n</mat-form-field>\n" }]
|
|
779
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
512
780
|
type: Input
|
|
513
781
|
}], disabled: [{
|
|
514
782
|
type: Input
|
|
515
783
|
}] } });
|
|
516
784
|
|
|
517
|
-
class
|
|
785
|
+
class GuiSelect {
|
|
518
786
|
constructor(cdr) {
|
|
519
787
|
this.cdr = cdr;
|
|
520
788
|
this.config = {};
|
|
@@ -540,91 +808,53 @@ class GuiFill {
|
|
|
540
808
|
onValueChange() {
|
|
541
809
|
this.onChange(this.value);
|
|
542
810
|
}
|
|
543
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
544
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
811
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiSelect, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
812
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiSelect, isStandalone: true, selector: "gui-select", inputs: { config: "config", disabled: "disabled" }, host: { classAttribute: "gui-field gui-select" }, providers: [
|
|
545
813
|
{
|
|
546
814
|
provide: NG_VALUE_ACCESSOR,
|
|
547
|
-
useExisting: forwardRef(() =>
|
|
815
|
+
useExisting: forwardRef(() => GuiSelect),
|
|
548
816
|
multi: true,
|
|
549
817
|
},
|
|
550
|
-
], ngImport: i0, template: "<mat-form-field>\n
|
|
818
|
+
], ngImport: i0, template: "<mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @for (opt of config.options; track opt) {\n <mat-option [value]=\"opt.value\" [disabled]=\"opt.disabled\">\n <span [style.font-family]=\"config.useFont ? opt.value : ''\">{{opt.label}}</span>\n </mat-option>\n }\n </mat-select>\n @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
551
819
|
}
|
|
552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
820
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiSelect, decorators: [{
|
|
553
821
|
type: Component,
|
|
554
|
-
args: [{ selector: 'gui-
|
|
555
|
-
class: 'gui-field gui-
|
|
822
|
+
args: [{ selector: 'gui-select', host: {
|
|
823
|
+
class: 'gui-field gui-select',
|
|
556
824
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
557
825
|
{
|
|
558
826
|
provide: NG_VALUE_ACCESSOR,
|
|
559
|
-
useExisting: forwardRef(() =>
|
|
827
|
+
useExisting: forwardRef(() => GuiSelect),
|
|
560
828
|
multi: true,
|
|
561
829
|
},
|
|
562
|
-
],
|
|
563
|
-
|
|
830
|
+
], standalone: true, imports: [
|
|
831
|
+
ReactiveFormsModule,
|
|
832
|
+
FormsModule,
|
|
833
|
+
MatFormField,
|
|
834
|
+
MatPrefix,
|
|
835
|
+
MatSelect,
|
|
836
|
+
MatOption,
|
|
837
|
+
MatSuffix,
|
|
838
|
+
MatHint,
|
|
839
|
+
GuiFieldLabel,
|
|
840
|
+
], template: "<mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @for (opt of config.options; track opt) {\n <mat-option [value]=\"opt.value\" [disabled]=\"opt.disabled\">\n <span [style.font-family]=\"config.useFont ? opt.value : ''\">{{opt.label}}</span>\n </mat-option>\n }\n </mat-select>\n @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\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"] }]
|
|
841
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
564
842
|
type: Input
|
|
565
843
|
}], disabled: [{
|
|
566
844
|
type: Input
|
|
567
845
|
}] } });
|
|
568
846
|
|
|
569
|
-
class
|
|
570
|
-
constructor(differs, cdr) {
|
|
571
|
-
this.differs = differs;
|
|
572
|
-
this.cdr = cdr;
|
|
573
|
-
this.config = {};
|
|
574
|
-
}
|
|
575
|
-
ngOnInit() {
|
|
576
|
-
this.configDiffer = this.differs.find(this.config).create();
|
|
577
|
-
}
|
|
578
|
-
ngDoCheck() {
|
|
579
|
-
const changes = this.configDiffer?.diff(this.config);
|
|
580
|
-
changes?.forEachChangedItem(record => {
|
|
581
|
-
this.cdr.markForCheck();
|
|
582
|
-
});
|
|
583
|
-
}
|
|
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\" />\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
|
-
}
|
|
587
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiFieldGroup, decorators: [{
|
|
588
|
-
type: Component,
|
|
589
|
-
args: [{ selector: 'gui-field-group', host: {
|
|
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\" />\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
|
-
}], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
593
|
-
type: Input
|
|
594
|
-
}] } });
|
|
595
|
-
|
|
596
|
-
class GuiInlineGroup {
|
|
597
|
-
constructor() {
|
|
598
|
-
this.config = {};
|
|
599
|
-
}
|
|
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 *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
|
-
}
|
|
603
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiInlineGroup, decorators: [{
|
|
604
|
-
type: Component,
|
|
605
|
-
args: [{ selector: 'gui-inline-group', host: {
|
|
606
|
-
class: 'gui-inline-group',
|
|
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
|
-
}], propDecorators: { config: [{
|
|
609
|
-
type: Input
|
|
610
|
-
}] } });
|
|
611
|
-
|
|
612
|
-
class GuiImageSelect {
|
|
847
|
+
class GuiSlider {
|
|
613
848
|
constructor(cdr) {
|
|
614
849
|
this.cdr = cdr;
|
|
615
|
-
this.config = {};
|
|
616
|
-
this.disabled = false;
|
|
617
|
-
this.
|
|
618
|
-
this.
|
|
619
|
-
this.onTouched = () => { };
|
|
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';
|
|
850
|
+
this.config = {};
|
|
851
|
+
this.disabled = false;
|
|
852
|
+
this.onChange = () => { };
|
|
853
|
+
this.onTouched = () => { };
|
|
625
854
|
}
|
|
626
855
|
writeValue(value) {
|
|
627
856
|
this.value = value;
|
|
857
|
+
this.setInputValue();
|
|
628
858
|
this.cdr.markForCheck();
|
|
629
859
|
}
|
|
630
860
|
registerOnChange(fn) {
|
|
@@ -640,43 +870,64 @@ class GuiImageSelect {
|
|
|
640
870
|
onValueChange() {
|
|
641
871
|
this.onChange(this.value);
|
|
642
872
|
}
|
|
643
|
-
|
|
644
|
-
|
|
873
|
+
onRangeSliderChange() {
|
|
874
|
+
this.setInputValue();
|
|
875
|
+
this.onValueChange();
|
|
876
|
+
}
|
|
877
|
+
onRangeInputChange() {
|
|
878
|
+
this.value = [this.minValue, this.maxValue];
|
|
879
|
+
this.onValueChange();
|
|
880
|
+
}
|
|
881
|
+
setInputValue() {
|
|
882
|
+
if (Array.isArray(this.value)) {
|
|
883
|
+
this.minValue = this.value[0];
|
|
884
|
+
this.maxValue = this.value[1];
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiSlider, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
888
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiSlider, isStandalone: true, selector: "gui-slider", inputs: { config: "config", disabled: "disabled" }, host: { classAttribute: "gui-field gui-slider" }, providers: [
|
|
645
889
|
{
|
|
646
890
|
provide: NG_VALUE_ACCESSOR,
|
|
647
|
-
useExisting: forwardRef(() =>
|
|
891
|
+
useExisting: forwardRef(() => GuiSlider),
|
|
648
892
|
multi: true,
|
|
649
893
|
},
|
|
650
|
-
],
|
|
894
|
+
], ngImport: i0, template: "@if (config.mode!=='range') {\n <!-- normal slider -->\n <mat-slider [disabled]=\"disabled\" [step]=\"config.step\" [min]=\"config.min\" [max]=\"config.max\">\n <input matSliderThumb [(ngModel)]=\"value\" (valueChange)=\"onValueChange()\">\n </mat-slider>\n <mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n </mat-form-field>\n} @else {\n <!-- range slider -->\n <mat-slider [disabled]=\"disabled\" [step]=\"config.step\" [min]=\"config.min\" [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 @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n </mat-form-field>\n <mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n </mat-form-field>\n}\n\n@if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n}\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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: 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: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatSliderRangeThumb, selector: "input[matSliderStartThumb], input[matSliderEndThumb]", exportAs: ["matSliderRangeThumb"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
651
895
|
}
|
|
652
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiSlider, decorators: [{
|
|
653
897
|
type: Component,
|
|
654
|
-
args: [{ selector: 'gui-
|
|
655
|
-
class: 'gui-field gui-
|
|
898
|
+
args: [{ selector: 'gui-slider', host: {
|
|
899
|
+
class: 'gui-field gui-slider',
|
|
656
900
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
657
901
|
{
|
|
658
902
|
provide: NG_VALUE_ACCESSOR,
|
|
659
|
-
useExisting: forwardRef(() =>
|
|
903
|
+
useExisting: forwardRef(() => GuiSlider),
|
|
660
904
|
multi: true,
|
|
661
905
|
},
|
|
662
|
-
],
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
906
|
+
], standalone: true, imports: [
|
|
907
|
+
ReactiveFormsModule,
|
|
908
|
+
FormsModule,
|
|
909
|
+
MatSlider,
|
|
910
|
+
MatSliderThumb,
|
|
911
|
+
MatFormField,
|
|
912
|
+
MatPrefix,
|
|
913
|
+
MatInput,
|
|
914
|
+
MatSuffix,
|
|
915
|
+
MatSliderRangeThumb,
|
|
916
|
+
MatHint,
|
|
917
|
+
GuiFieldLabel,
|
|
918
|
+
], template: "@if (config.mode!=='range') {\n <!-- normal slider -->\n <mat-slider [disabled]=\"disabled\" [step]=\"config.step\" [min]=\"config.min\" [max]=\"config.max\">\n <input matSliderThumb [(ngModel)]=\"value\" (valueChange)=\"onValueChange()\">\n </mat-slider>\n <mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n </mat-form-field>\n} @else {\n <!-- range slider -->\n <mat-slider [disabled]=\"disabled\" [step]=\"config.step\" [min]=\"config.min\" [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 @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n </mat-form-field>\n <mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\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 @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n </mat-form-field>\n}\n\n@if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n}\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"] }]
|
|
919
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
667
920
|
type: Input
|
|
668
921
|
}], disabled: [{
|
|
669
922
|
type: Input
|
|
670
|
-
}], appendTo: [{
|
|
671
|
-
type: Input
|
|
672
923
|
}] } });
|
|
673
924
|
|
|
674
|
-
class
|
|
925
|
+
class GuiSwitch {
|
|
675
926
|
constructor(cdr) {
|
|
676
927
|
this.cdr = cdr;
|
|
677
928
|
this.config = {};
|
|
678
929
|
this.disabled = false;
|
|
679
|
-
this.value =
|
|
930
|
+
this.value = false;
|
|
680
931
|
this.onChange = () => { };
|
|
681
932
|
this.onTouched = () => { };
|
|
682
933
|
}
|
|
@@ -697,86 +948,43 @@ class GuiTextarea {
|
|
|
697
948
|
onValueChange() {
|
|
698
949
|
this.onChange(this.value);
|
|
699
950
|
}
|
|
700
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
701
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
951
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiSwitch, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
952
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiSwitch, isStandalone: true, selector: "gui-switch", inputs: { config: "config", disabled: "disabled" }, host: { classAttribute: "gui-field gui-switch" }, providers: [
|
|
702
953
|
{
|
|
703
954
|
provide: NG_VALUE_ACCESSOR,
|
|
704
|
-
useExisting: forwardRef(() =>
|
|
955
|
+
useExisting: forwardRef(() => GuiSwitch),
|
|
705
956
|
multi: true,
|
|
706
957
|
},
|
|
707
|
-
], ngImport: i0, template: "<mat-
|
|
958
|
+
], ngImport: i0, template: "<mat-slide-toggle [(ngModel)]=\"value\" [disabled]=\"disabled\" hideIcon (change)=\"onValueChange()\" />\n@if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n}\n", styles: [".gui-switch{--mat-switch-unselected-handle-size: 14px;--mat-switch-selected-handle-size: 14px;--mat-switch-pressed-handle-size: 14px;--mdc-switch-track-width: 28px;--mdc-switch-handle-width: 14px;--mdc-switch-state-layer-size: 24px}.gui-switch .mat-mdc-slide-toggle{line-height:var(--mdc-switch-state-layer-size)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
708
959
|
}
|
|
709
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
960
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiSwitch, decorators: [{
|
|
710
961
|
type: Component,
|
|
711
|
-
args: [{ selector: 'gui-
|
|
712
|
-
class: 'gui-field gui-
|
|
962
|
+
args: [{ selector: 'gui-switch', host: {
|
|
963
|
+
class: 'gui-field gui-switch',
|
|
713
964
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
714
965
|
{
|
|
715
966
|
provide: NG_VALUE_ACCESSOR,
|
|
716
|
-
useExisting: forwardRef(() =>
|
|
967
|
+
useExisting: forwardRef(() => GuiSwitch),
|
|
717
968
|
multi: true,
|
|
718
969
|
},
|
|
719
|
-
], template: "<mat-
|
|
720
|
-
}], ctorParameters:
|
|
970
|
+
], standalone: true, imports: [ReactiveFormsModule, FormsModule, MatSlideToggle, MatHint, GuiFieldLabel], template: "<mat-slide-toggle [(ngModel)]=\"value\" [disabled]=\"disabled\" hideIcon (change)=\"onValueChange()\" />\n@if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n}\n", styles: [".gui-switch{--mat-switch-unselected-handle-size: 14px;--mat-switch-selected-handle-size: 14px;--mat-switch-pressed-handle-size: 14px;--mdc-switch-track-width: 28px;--mdc-switch-handle-width: 14px;--mdc-switch-state-layer-size: 24px}.gui-switch .mat-mdc-slide-toggle{line-height:var(--mdc-switch-state-layer-size)}\n"] }]
|
|
971
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
721
972
|
type: Input
|
|
722
973
|
}], disabled: [{
|
|
723
974
|
type: Input
|
|
724
975
|
}] } });
|
|
725
976
|
|
|
726
|
-
class
|
|
727
|
-
constructor(
|
|
728
|
-
this.http = http;
|
|
729
|
-
/**
|
|
730
|
-
* The file upload URL
|
|
731
|
-
*/
|
|
732
|
-
this.url = '';
|
|
733
|
-
/**
|
|
734
|
-
* The file upload params
|
|
735
|
-
*/
|
|
736
|
-
this.params = {};
|
|
737
|
-
}
|
|
738
|
-
/**
|
|
739
|
-
* The File upload API
|
|
740
|
-
*
|
|
741
|
-
* @param file file data
|
|
742
|
-
* @returns
|
|
743
|
-
*/
|
|
744
|
-
upload(file) {
|
|
745
|
-
return this.http.post(this.url, file, {
|
|
746
|
-
reportProgress: true,
|
|
747
|
-
observe: 'events',
|
|
748
|
-
params: this.params,
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiFileUploaderConfig, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
752
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiFileUploaderConfig }); }
|
|
753
|
-
}
|
|
754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: GuiFileUploaderConfig, decorators: [{
|
|
755
|
-
type: Injectable
|
|
756
|
-
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
|
757
|
-
|
|
758
|
-
class GuiFileUploader {
|
|
759
|
-
constructor(fileUploaderCfg, cdr) {
|
|
760
|
-
this.fileUploaderCfg = fileUploaderCfg;
|
|
977
|
+
class GuiTextarea {
|
|
978
|
+
constructor(cdr) {
|
|
761
979
|
this.cdr = cdr;
|
|
762
980
|
this.config = {};
|
|
763
981
|
this.disabled = false;
|
|
764
|
-
this.
|
|
765
|
-
this.name = '';
|
|
766
|
-
this.accept = '';
|
|
767
|
-
this.fileChange = new EventEmitter();
|
|
768
|
-
// media src
|
|
769
|
-
this.url = '';
|
|
982
|
+
this.value = '';
|
|
770
983
|
this.onChange = () => { };
|
|
771
984
|
this.onTouched = () => { };
|
|
772
985
|
}
|
|
773
|
-
ngOnChanges(changes) {
|
|
774
|
-
if (changes['type']) {
|
|
775
|
-
this.accept = this.type + '/*';
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
986
|
writeValue(value) {
|
|
779
|
-
this.
|
|
987
|
+
this.value = value;
|
|
780
988
|
this.cdr.markForCheck();
|
|
781
989
|
}
|
|
782
990
|
registerOnChange(fn) {
|
|
@@ -789,90 +997,47 @@ class GuiFileUploader {
|
|
|
789
997
|
this.disabled = isDisabled;
|
|
790
998
|
this.cdr.markForCheck();
|
|
791
999
|
}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
formData.append('file', file.data || '');
|
|
795
|
-
file.inProgress = true;
|
|
796
|
-
this.fileUploaderCfg
|
|
797
|
-
.upload(formData)
|
|
798
|
-
.pipe(catchError((error) => {
|
|
799
|
-
file.inProgress = false;
|
|
800
|
-
return of(`${file.data?.name || 'File'} upload failed.`);
|
|
801
|
-
}), finalize(() => { }))
|
|
802
|
-
.subscribe(res => {
|
|
803
|
-
if (res instanceof HttpResponse && res.body) {
|
|
804
|
-
this.url = res.body.data;
|
|
805
|
-
this.onChange(this.url);
|
|
806
|
-
this.onTouched();
|
|
807
|
-
this.fileChange.emit(this.url);
|
|
808
|
-
}
|
|
809
|
-
this.cdr.detectChanges();
|
|
810
|
-
});
|
|
811
|
-
}
|
|
812
|
-
onUrlChange(e) {
|
|
813
|
-
this.url = e.target.value;
|
|
814
|
-
this.onChange(this.url);
|
|
815
|
-
this.fileChange.emit(this.url);
|
|
816
|
-
}
|
|
817
|
-
onFileChange(e) {
|
|
818
|
-
this.file = {
|
|
819
|
-
data: e.target.files[0],
|
|
820
|
-
inProgress: false,
|
|
821
|
-
progress: 0,
|
|
822
|
-
};
|
|
823
|
-
this.upload(this.file);
|
|
824
|
-
// reset input value
|
|
825
|
-
e.target.value = '';
|
|
826
|
-
}
|
|
827
|
-
onBlur() {
|
|
828
|
-
this.onTouched();
|
|
829
|
-
}
|
|
830
|
-
onClear() {
|
|
831
|
-
this.url = '';
|
|
832
|
-
this.onChange(this.url);
|
|
833
|
-
this.onTouched();
|
|
834
|
-
this.fileChange.emit(this.url);
|
|
1000
|
+
onValueChange() {
|
|
1001
|
+
this.onChange(this.value);
|
|
835
1002
|
}
|
|
836
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
837
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1003
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiTextarea, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1004
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiTextarea, isStandalone: true, selector: "gui-textarea", inputs: { config: "config", disabled: "disabled" }, host: { classAttribute: "gui-field gui-textarea" }, providers: [
|
|
838
1005
|
{
|
|
839
1006
|
provide: NG_VALUE_ACCESSOR,
|
|
840
|
-
useExisting: forwardRef(() =>
|
|
1007
|
+
useExisting: forwardRef(() => GuiTextarea),
|
|
841
1008
|
multi: true,
|
|
842
1009
|
},
|
|
843
|
-
],
|
|
1010
|
+
], ngImport: i0, template: "<mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\n <textarea matInput\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [rows]=\"config.rows\"\n (change)=\"onValueChange()\"></textarea>\n @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: 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: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
844
1011
|
}
|
|
845
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiTextarea, decorators: [{
|
|
846
1013
|
type: Component,
|
|
847
|
-
args: [{ selector: 'gui-
|
|
848
|
-
class: 'gui-field gui-
|
|
1014
|
+
args: [{ selector: 'gui-textarea', host: {
|
|
1015
|
+
class: 'gui-field gui-textarea',
|
|
849
1016
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
850
1017
|
{
|
|
851
1018
|
provide: NG_VALUE_ACCESSOR,
|
|
852
|
-
useExisting: forwardRef(() =>
|
|
1019
|
+
useExisting: forwardRef(() => GuiTextarea),
|
|
853
1020
|
multi: true,
|
|
854
1021
|
},
|
|
855
|
-
],
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
1022
|
+
], standalone: true, imports: [
|
|
1023
|
+
ReactiveFormsModule,
|
|
1024
|
+
FormsModule,
|
|
1025
|
+
MatFormField,
|
|
1026
|
+
MatPrefix,
|
|
1027
|
+
MatInput,
|
|
1028
|
+
MatSuffix,
|
|
1029
|
+
MatHint,
|
|
1030
|
+
GuiFieldLabel,
|
|
1031
|
+
], template: "<mat-form-field>\n @if (config.prefix) {\n <span matPrefix>{{config.prefix}}</span>\n }\n <textarea matInput\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder||''\"\n [rows]=\"config.rows\"\n (change)=\"onValueChange()\"></textarea>\n @if (config.suffix) {\n <span matSuffix>{{config.suffix}}</span>\n }\n @if (config.parentType==='inline') {\n <mat-hint>\n <gui-field-label [config]=\"config\" />\n </mat-hint>\n }\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"] }]
|
|
1032
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
860
1033
|
type: Input
|
|
861
1034
|
}], disabled: [{
|
|
862
1035
|
type: Input
|
|
863
|
-
}], type: [{
|
|
864
|
-
type: Input
|
|
865
|
-
}], name: [{
|
|
866
|
-
type: Input
|
|
867
|
-
}], accept: [{
|
|
868
|
-
type: Input
|
|
869
|
-
}], fileChange: [{
|
|
870
|
-
type: Output
|
|
871
1036
|
}] } });
|
|
872
1037
|
|
|
873
1038
|
let nextUniqueId = 0;
|
|
874
1039
|
class GuiForm {
|
|
875
|
-
constructor() {
|
|
1040
|
+
constructor(iconsRegistry) {
|
|
876
1041
|
/**
|
|
877
1042
|
* The form instance which allow to track model value and validation status.
|
|
878
1043
|
*/
|
|
@@ -894,6 +1059,7 @@ class GuiForm {
|
|
|
894
1059
|
this.controlSubscriptions = [];
|
|
895
1060
|
// Unique id for this form
|
|
896
1061
|
this.uid = `gui-form-${nextUniqueId++}`;
|
|
1062
|
+
iconsRegistry.add('horizontal', 'vertical', 'copy', 'add', 'delete');
|
|
897
1063
|
}
|
|
898
1064
|
ngOnChanges(changes) {
|
|
899
1065
|
if (changes['config']) {
|
|
@@ -939,7 +1105,7 @@ class GuiForm {
|
|
|
939
1105
|
parentType,
|
|
940
1106
|
model: model[key],
|
|
941
1107
|
default: defaultValue?.[key],
|
|
942
|
-
index: Number(key),
|
|
1108
|
+
index: Number(key), // the string key will be `NaN`
|
|
943
1109
|
show: true,
|
|
944
1110
|
...config[key],
|
|
945
1111
|
};
|
|
@@ -1096,16 +1262,43 @@ class GuiForm {
|
|
|
1096
1262
|
e.stopPropagation();
|
|
1097
1263
|
tabs.mode = mode;
|
|
1098
1264
|
}
|
|
1099
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
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 }); }
|
|
1265
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiForm, deps: [{ token: GuiIconsRegistry }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1266
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.6", type: GuiForm, isStandalone: true, 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 @for (item of formFields; track item) {\n <div>\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: item, formGroup: form}\">\n </ng-template>\n </div>\n }\n</form>\n\n<ng-template #controlType let-item let-parent=\"parent\" let-form=\"formGroup\">\n @if (item.show) {\n <ng-container [formGroup]=\"form\">\n @switch (item.type) {\n @case ('text') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-input-text [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('number') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-input-number [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('select') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-select [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('switch') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-switch [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('slider') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-slider [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('buttonToggle') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-button-toggle [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('fill') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-fill [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('file') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('image') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"image\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('video') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"video\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('audio') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"audio\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('imageSelect') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-image-select [formControlName]=\"item.key\" [config]=\"item\" [appendTo]=\"'#'+uid\" />\n </gui-field-group>\n }\n @case ('textarea') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-textarea [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('hidden') {\n <input type=\"hidden\" [formControlName]=\"item.key\">\n }\n @case ('inline') {\n <gui-inline-group [config]=\"item\" [formGroupName]=\"item.key\">\n @for (child of item.children; track child) {\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n }\n </gui-inline-group>\n }\n @case ('group') {\n <mat-expansion-panel [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 @for (child of item.children; track child) {\n <div>\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n </div>\n }\n </ng-template>\n </mat-expansion-panel>\n }\n @case ('tabs') {\n <mat-expansion-panel [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 @if (item.expanded) {\n <button mat-icon-button type=\"button\" [color]=\"item.mode!=='list'?'primary':''\"\n (click)=\"changeTabsMode($event, item, 'normal')\">\n <mat-icon svgIcon=\"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=\"vertical\" />\n </button>\n @if (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=\"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=\"add\" />\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 }\n }\n </mat-expansion-panel-header>\n <!-- Lazy rendering -->\n <ng-template matExpansionPanelContent>\n @if (item.mode!=='list') {\n <!-- Horizontal mode -->\n <mat-tab-group class=\"gui-tabs\" disableRipple\n [mat-stretch-tabs]=\"false\" [(selectedIndex)]=\"item.selectedIndex\">\n @for (tab of item.children; track tab; let i = $index) {\n <mat-tab [disabled]=\"tab.disabled\">\n <ng-template mat-tab-label>\n <div>{{tab.name | ejs:{i} }}</div>\n </ng-template>\n <!-- FormControl & FormArray -->\n @if (!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 }\n <!-- FormGroup -->\n @if (tab.children?.length>0 && tab.type!=='tabs') {\n @for (child of tab.children; track child) {\n <div>\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n }\n }\n </mat-tab>\n }\n </mat-tab-group>\n } @else {\n <!-- Vertical mode -->\n <div class=\"gui-list\">\n @for (tab of item.children; track tab; let i = $index) {\n <div class=\"gui-list-item\"\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 @if (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=\"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=\"add\" />\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 }\n </div>\n <div class=\"gui-list-item-content\">\n <!-- FormControl & FormArray -->\n @if (!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 }\n <!-- FormGroup -->\n @if (tab.children?.length>0 && tab.type!=='tabs') {\n @for (child of tab.children; track child) {\n <div>\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n }\n </ng-template>\n </mat-expansion-panel>\n }\n @case ('menu') {\n <mat-tab-group class=\"gui-menu\" [formGroupName]=\"item.key\" disableRipple>\n @for (menuChild of item.children; track menuChild) {\n <mat-tab [label]=\"menuChild.name\"\n [disabled]=\"menuChild.disabled\">\n <ng-template matTabContent>\n @if (menuChild.type==='menuItem') {\n <!-- Must wrap with div -->\n @for (controlItem of menuChild.children; track controlItem) {\n <div [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 }\n }\n <!-- Support for unlimited nesting -->\n @if (menuChild.type==='menu') {\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: menuChild, formGroup: form.get(item.key)}\">\n </ng-template>\n }\n </ng-template>\n </mat-tab>\n }\n </mat-tab-group>\n }\n }\n </ng-container>\n }\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;--mat-expansion-container-shape: 0;position:relative;display:block;font-size:12px}.gui-form .mat-expansion-panel{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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "directive", type: MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "directive", type: MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: GuiFieldGroup, selector: "gui-field-group", inputs: ["config"] }, { kind: "directive", type: GuiFlexDirective, selector: "[flex]", inputs: ["flex"] }, { 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: GuiFileUploader, selector: "gui-file-uploader", inputs: ["config", "disabled", "type", "name", "accept"], outputs: ["fileChange"] }, { 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: GuiInlineGroup, selector: "gui-inline-group", inputs: ["config"] }, { kind: "component", type: GuiFieldLabel, selector: "gui-field-label", inputs: ["config", "index"] }, { kind: "pipe", type: GuiEjsPipe, name: "ejs" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1101
1267
|
}
|
|
1102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiForm, decorators: [{
|
|
1103
1269
|
type: Component,
|
|
1104
1270
|
args: [{ selector: 'gui-form', host: {
|
|
1105
1271
|
'[attr.id]': 'uid',
|
|
1106
1272
|
'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"] }]
|
|
1108
|
-
|
|
1273
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
1274
|
+
ReactiveFormsModule,
|
|
1275
|
+
NgTemplateOutlet,
|
|
1276
|
+
MatExpansionPanel,
|
|
1277
|
+
MatExpansionPanelHeader,
|
|
1278
|
+
MatExpansionPanelContent,
|
|
1279
|
+
MatIconButton,
|
|
1280
|
+
MatIcon,
|
|
1281
|
+
MatTabGroup,
|
|
1282
|
+
MatTab,
|
|
1283
|
+
MatTabLabel,
|
|
1284
|
+
MatTabContent,
|
|
1285
|
+
GuiFieldGroup,
|
|
1286
|
+
GuiFlexDirective,
|
|
1287
|
+
GuiInputText,
|
|
1288
|
+
GuiInputNumber,
|
|
1289
|
+
GuiSelect,
|
|
1290
|
+
GuiSwitch,
|
|
1291
|
+
GuiSlider,
|
|
1292
|
+
GuiButtonToggle,
|
|
1293
|
+
GuiFill,
|
|
1294
|
+
GuiFileUploader,
|
|
1295
|
+
GuiImageSelect,
|
|
1296
|
+
GuiTextarea,
|
|
1297
|
+
GuiInlineGroup,
|
|
1298
|
+
GuiFieldLabel,
|
|
1299
|
+
GuiEjsPipe,
|
|
1300
|
+
], template: "<form [formGroup]=\"form\">\n @for (item of formFields; track item) {\n <div>\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: item, formGroup: form}\">\n </ng-template>\n </div>\n }\n</form>\n\n<ng-template #controlType let-item let-parent=\"parent\" let-form=\"formGroup\">\n @if (item.show) {\n <ng-container [formGroup]=\"form\">\n @switch (item.type) {\n @case ('text') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-input-text [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('number') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-input-number [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('select') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-select [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('switch') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-switch [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('slider') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-slider [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('buttonToggle') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-button-toggle [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('fill') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-fill [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('file') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('image') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"image\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('video') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"video\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('audio') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-file-uploader type=\"audio\" [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('imageSelect') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-image-select [formControlName]=\"item.key\" [config]=\"item\" [appendTo]=\"'#'+uid\" />\n </gui-field-group>\n }\n @case ('textarea') {\n <gui-field-group [config]=\"item\" [flex]=\"item.col\">\n <gui-textarea [formControlName]=\"item.key\" [config]=\"item\" />\n </gui-field-group>\n }\n @case ('hidden') {\n <input type=\"hidden\" [formControlName]=\"item.key\">\n }\n @case ('inline') {\n <gui-inline-group [config]=\"item\" [formGroupName]=\"item.key\">\n @for (child of item.children; track child) {\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n }\n </gui-inline-group>\n }\n @case ('group') {\n <mat-expansion-panel [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 @for (child of item.children; track child) {\n <div>\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get(item.key)}\">\n </ng-template>\n </div>\n }\n </ng-template>\n </mat-expansion-panel>\n }\n @case ('tabs') {\n <mat-expansion-panel [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 @if (item.expanded) {\n <button mat-icon-button type=\"button\" [color]=\"item.mode!=='list'?'primary':''\"\n (click)=\"changeTabsMode($event, item, 'normal')\">\n <mat-icon svgIcon=\"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=\"vertical\" />\n </button>\n @if (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=\"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=\"add\" />\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 }\n }\n </mat-expansion-panel-header>\n <!-- Lazy rendering -->\n <ng-template matExpansionPanelContent>\n @if (item.mode!=='list') {\n <!-- Horizontal mode -->\n <mat-tab-group class=\"gui-tabs\" disableRipple\n [mat-stretch-tabs]=\"false\" [(selectedIndex)]=\"item.selectedIndex\">\n @for (tab of item.children; track tab; let i = $index) {\n <mat-tab [disabled]=\"tab.disabled\">\n <ng-template mat-tab-label>\n <div>{{tab.name | ejs:{i} }}</div>\n </ng-template>\n <!-- FormControl & FormArray -->\n @if (!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 }\n <!-- FormGroup -->\n @if (tab.children?.length>0 && tab.type!=='tabs') {\n @for (child of tab.children; track child) {\n <div>\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n }\n }\n </mat-tab>\n }\n </mat-tab-group>\n } @else {\n <!-- Vertical mode -->\n <div class=\"gui-list\">\n @for (tab of item.children; track tab; let i = $index) {\n <div class=\"gui-list-item\"\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 @if (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=\"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=\"add\" />\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 }\n </div>\n <div class=\"gui-list-item-content\">\n <!-- FormControl & FormArray -->\n @if (!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 }\n <!-- FormGroup -->\n @if (tab.children?.length>0 && tab.type!=='tabs') {\n @for (child of tab.children; track child) {\n <div>\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: child, parent: item, formGroup: form.get([item.key, i])}\">\n </ng-template>\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n }\n </ng-template>\n </mat-expansion-panel>\n }\n @case ('menu') {\n <mat-tab-group class=\"gui-menu\" [formGroupName]=\"item.key\" disableRipple>\n @for (menuChild of item.children; track menuChild) {\n <mat-tab [label]=\"menuChild.name\"\n [disabled]=\"menuChild.disabled\">\n <ng-template matTabContent>\n @if (menuChild.type==='menuItem') {\n <!-- Must wrap with div -->\n @for (controlItem of menuChild.children; track controlItem) {\n <div [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 }\n }\n <!-- Support for unlimited nesting -->\n @if (menuChild.type==='menu') {\n <ng-template [ngTemplateOutlet]=\"controlType\"\n [ngTemplateOutletContext]=\"{$implicit: menuChild, formGroup: form.get(item.key)}\">\n </ng-template>\n }\n </ng-template>\n </mat-tab>\n }\n </mat-tab-group>\n }\n }\n </ng-container>\n }\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;--mat-expansion-container-shape: 0;position:relative;display:block;font-size:12px}.gui-form .mat-expansion-panel{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"] }]
|
|
1301
|
+
}], ctorParameters: () => [{ type: GuiIconsRegistry }], propDecorators: { form: [{
|
|
1109
1302
|
type: Input
|
|
1110
1303
|
}], config: [{
|
|
1111
1304
|
type: Input
|
|
@@ -1115,62 +1308,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
1115
1308
|
type: Output
|
|
1116
1309
|
}] } });
|
|
1117
1310
|
|
|
1118
|
-
const svgIcons = {
|
|
1119
|
-
dots_horizontal: `
|
|
1120
|
-
<svg viewBox="0 0 24 24">
|
|
1121
|
-
<path d="M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"></path>
|
|
1122
|
-
</svg>
|
|
1123
|
-
`,
|
|
1124
|
-
dots_vertical: `
|
|
1125
|
-
<svg viewBox="0 0 24 24">
|
|
1126
|
-
<path d="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"></path>
|
|
1127
|
-
</svg>
|
|
1128
|
-
`,
|
|
1129
|
-
plus: `
|
|
1130
|
-
<svg viewBox="0 0 24 24">
|
|
1131
|
-
<path d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"></path>
|
|
1132
|
-
</svg>
|
|
1133
|
-
`,
|
|
1134
|
-
delete: `
|
|
1135
|
-
<svg viewBox="0 0 24 24">
|
|
1136
|
-
<path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"></path>
|
|
1137
|
-
</svg>
|
|
1138
|
-
`,
|
|
1139
|
-
content_copy: `
|
|
1140
|
-
<svg viewBox="0 0 24 24">
|
|
1141
|
-
<path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path>
|
|
1142
|
-
</svg>
|
|
1143
|
-
`,
|
|
1144
|
-
link: `
|
|
1145
|
-
<svg viewBox="0 0 24 24">
|
|
1146
|
-
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path>
|
|
1147
|
-
</svg>
|
|
1148
|
-
`,
|
|
1149
|
-
close: `
|
|
1150
|
-
<svg viewBox="0 0 24 24">
|
|
1151
|
-
<path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
|
|
1152
|
-
</svg>
|
|
1153
|
-
`,
|
|
1154
|
-
file_outline: `
|
|
1155
|
-
<svg viewBox="0 0 24 24">
|
|
1156
|
-
<path d="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z" />
|
|
1157
|
-
</svg>
|
|
1158
|
-
`,
|
|
1159
|
-
file_upload: `
|
|
1160
|
-
<svg viewBox="0 0 24 24">
|
|
1161
|
-
<path d="M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 2L6.46 7.46L7.88 8.88L11 5.75V15H13V5.75L16.13 8.88L17.55 7.45L12 2Z" />
|
|
1162
|
-
</svg>
|
|
1163
|
-
`,
|
|
1164
|
-
};
|
|
1165
|
-
|
|
1166
1311
|
class GuiModule {
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1312
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1313
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.6", ngImport: i0, type: GuiModule, imports: [CommonModule,
|
|
1314
|
+
ReactiveFormsModule,
|
|
1315
|
+
FormsModule,
|
|
1316
|
+
MatFormFieldModule,
|
|
1317
|
+
MatInputModule,
|
|
1318
|
+
MatSelectModule,
|
|
1319
|
+
MatSliderModule,
|
|
1320
|
+
MatSlideToggleModule,
|
|
1321
|
+
MatButtonToggleModule,
|
|
1322
|
+
MatIconModule,
|
|
1323
|
+
MatButtonModule,
|
|
1324
|
+
MatTabsModule,
|
|
1325
|
+
MatExpansionModule,
|
|
1326
|
+
MatTooltipModule,
|
|
1327
|
+
MtxColorpickerModule,
|
|
1328
|
+
MtxSelectModule,
|
|
1329
|
+
GuiForm,
|
|
1174
1330
|
GuiInputText,
|
|
1175
1331
|
GuiInputNumber,
|
|
1176
1332
|
GuiSelect,
|
|
@@ -1186,22 +1342,7 @@ class GuiModule {
|
|
|
1186
1342
|
GuiTextarea,
|
|
1187
1343
|
GuiFileUploader,
|
|
1188
1344
|
GuiEjsPipe,
|
|
1189
|
-
GuiFlexDirective],
|
|
1190
|
-
ReactiveFormsModule,
|
|
1191
|
-
FormsModule,
|
|
1192
|
-
MatFormFieldModule,
|
|
1193
|
-
MatInputModule,
|
|
1194
|
-
MatSelectModule,
|
|
1195
|
-
MatSliderModule,
|
|
1196
|
-
MatSlideToggleModule,
|
|
1197
|
-
MatButtonToggleModule,
|
|
1198
|
-
MatIconModule,
|
|
1199
|
-
MatButtonModule,
|
|
1200
|
-
MatTabsModule,
|
|
1201
|
-
MatExpansionModule,
|
|
1202
|
-
MatTooltipModule,
|
|
1203
|
-
MtxColorpickerModule,
|
|
1204
|
-
MtxSelectModule], exports: [GuiForm,
|
|
1345
|
+
GuiFlexDirective], exports: [GuiForm,
|
|
1205
1346
|
GuiInputText,
|
|
1206
1347
|
GuiInputNumber,
|
|
1207
1348
|
GuiSelect,
|
|
@@ -1218,7 +1359,7 @@ class GuiModule {
|
|
|
1218
1359
|
GuiFileUploader,
|
|
1219
1360
|
GuiEjsPipe,
|
|
1220
1361
|
GuiFlexDirective] }); }
|
|
1221
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1362
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiModule, imports: [CommonModule,
|
|
1222
1363
|
ReactiveFormsModule,
|
|
1223
1364
|
FormsModule,
|
|
1224
1365
|
MatFormFieldModule,
|
|
@@ -1233,9 +1374,20 @@ class GuiModule {
|
|
|
1233
1374
|
MatExpansionModule,
|
|
1234
1375
|
MatTooltipModule,
|
|
1235
1376
|
MtxColorpickerModule,
|
|
1236
|
-
MtxSelectModule
|
|
1377
|
+
MtxSelectModule,
|
|
1378
|
+
GuiForm,
|
|
1379
|
+
GuiInputText,
|
|
1380
|
+
GuiInputNumber,
|
|
1381
|
+
GuiSelect,
|
|
1382
|
+
GuiSwitch,
|
|
1383
|
+
GuiSlider,
|
|
1384
|
+
GuiButtonToggle,
|
|
1385
|
+
GuiFill,
|
|
1386
|
+
GuiImageSelect,
|
|
1387
|
+
GuiTextarea,
|
|
1388
|
+
GuiFileUploader] }); }
|
|
1237
1389
|
}
|
|
1238
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: GuiModule, decorators: [{
|
|
1239
1391
|
type: NgModule,
|
|
1240
1392
|
args: [{
|
|
1241
1393
|
imports: [
|
|
@@ -1255,8 +1407,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
1255
1407
|
MatTooltipModule,
|
|
1256
1408
|
MtxColorpickerModule,
|
|
1257
1409
|
MtxSelectModule,
|
|
1258
|
-
],
|
|
1259
|
-
declarations: [
|
|
1260
1410
|
GuiForm,
|
|
1261
1411
|
GuiInputText,
|
|
1262
1412
|
GuiInputNumber,
|
|
@@ -1294,9 +1444,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
1294
1444
|
GuiEjsPipe,
|
|
1295
1445
|
GuiFlexDirective,
|
|
1296
1446
|
],
|
|
1297
|
-
providers: [GuiFileUploaderConfig],
|
|
1298
1447
|
}]
|
|
1299
|
-
}]
|
|
1448
|
+
}] });
|
|
1300
1449
|
|
|
1301
1450
|
/*
|
|
1302
1451
|
* Public API Surface of gui
|
|
@@ -1306,5 +1455,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.8", ngImpor
|
|
|
1306
1455
|
* Generated bundle index. Do not edit.
|
|
1307
1456
|
*/
|
|
1308
1457
|
|
|
1309
|
-
export { GuiButtonToggle, GuiEjsPipe, GuiFieldGroup, GuiFieldLabel, GuiFileUploader, GuiFileUploaderConfig, GuiFill, GuiFlexDirective, GuiForm, GuiIcon, GuiImageSelect, GuiInlineGroup, GuiInputNumber, GuiInputText, GuiModule, GuiSelect, GuiSlider, GuiSwitch, GuiTextarea, compareValues, ejsTmpl, getValueByPath };
|
|
1458
|
+
export { GUI_ICONS_CONFIG, GuiButtonToggle, GuiEjsPipe, GuiFieldGroup, GuiFieldLabel, GuiFileUploader, GuiFileUploaderConfig, GuiFill, GuiFlexDirective, GuiForm, GuiIcon, GuiIconsRegistry, GuiImageSelect, GuiInlineGroup, GuiInputNumber, GuiInputText, GuiModule, GuiSelect, GuiSlider, GuiSwitch, GuiTextarea, compareValues, ejsTmpl, getValueByPath, svgIcons };
|
|
1310
1459
|
//# sourceMappingURL=acrodata-gui.mjs.map
|