@olafvv/ngx-dynamic-form 0.0.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +21 -15
- package/esm2022/lib/components/dynamic-form-field/dynamic-form-field.component.mjs +22 -4
- package/esm2022/lib/controls/button/dynamic-button.component.mjs +3 -3
- package/esm2022/lib/controls/button-toggles/dynamic-button-toggles.component.mjs +28 -0
- package/esm2022/lib/controls/button-toggles/dynamic-button-toggles.model.mjs +13 -0
- package/esm2022/lib/controls/checkbox/dynamic-checkbox.component.mjs +5 -11
- package/esm2022/lib/controls/controls.mjs +9 -0
- package/esm2022/lib/controls/input/dynamic-input.component.mjs +12 -11
- package/esm2022/lib/controls/input/dynamic-input.model.mjs +2 -1
- package/esm2022/lib/controls/radio-group/dynamic-radio-group.component.mjs +27 -0
- package/esm2022/lib/controls/radio-group/dynamic-radio-group.model.mjs +11 -0
- package/esm2022/lib/controls/readonly/dynamic-readonly.component.mjs +3 -3
- package/esm2022/lib/controls/select/dynamic-select.component.mjs +5 -11
- package/esm2022/lib/controls/textarea/dynamic-textarea.component.mjs +12 -11
- package/esm2022/lib/models/classes/dynamic-form-field-base.mjs +28 -0
- package/esm2022/lib/models/classes/dynamic-form-field-model.mjs +1 -1
- package/esm2022/lib/models/constants/dynamic-relations.const.mjs +2 -15
- package/esm2022/lib/models/index.mjs +4 -3
- package/esm2022/lib/models/interfaces/dynamic-form-field-config.interface.mjs +1 -1
- package/esm2022/lib/models/interfaces/dynamic-form-field-event.interface.mjs +2 -0
- package/esm2022/lib/models/interfaces/dynamic-form-field-relation.interface.mjs +15 -0
- package/esm2022/lib/services/dynamic-form-relations.service.mjs +3 -2
- package/esm2022/lib/services/dynamic-form.service.mjs +12 -8
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/olafvv-ngx-dynamic-form.mjs +223 -148
- package/fesm2022/olafvv-ngx-dynamic-form.mjs.map +1 -1
- package/lib/components/dynamic-form/dynamic-form.component.d.ts +15 -9
- package/lib/components/dynamic-form-field/dynamic-form-field.component.d.ts +6 -2
- package/lib/controls/button/dynamic-button.component.d.ts +2 -2
- package/lib/controls/button-toggles/dynamic-button-toggles.component.d.ts +13 -0
- package/lib/controls/button-toggles/dynamic-button-toggles.model.d.ts +20 -0
- package/lib/controls/checkbox/dynamic-checkbox.component.d.ts +3 -5
- package/lib/controls/{index.d.ts → controls.d.ts} +2 -0
- package/lib/controls/input/dynamic-input.component.d.ts +6 -6
- package/lib/controls/input/dynamic-input.model.d.ts +2 -0
- package/lib/controls/radio-group/dynamic-radio-group.component.d.ts +13 -0
- package/lib/controls/radio-group/dynamic-radio-group.model.d.ts +14 -0
- package/lib/controls/readonly/dynamic-readonly.component.d.ts +2 -2
- package/lib/controls/select/dynamic-select.component.d.ts +5 -6
- package/lib/controls/textarea/dynamic-textarea.component.d.ts +6 -6
- package/lib/models/classes/{dynamic-form-field-base-component.d.ts → dynamic-form-field-base.d.ts} +2 -8
- package/lib/models/classes/dynamic-form-field-model.d.ts +2 -3
- package/lib/models/constants/dynamic-relations.const.d.ts +1 -29
- package/lib/models/index.d.ts +3 -2
- package/lib/models/interfaces/dynamic-form-field-config.interface.d.ts +4 -5
- package/lib/models/interfaces/dynamic-form-field-event.interface.d.ts +10 -0
- package/lib/models/interfaces/dynamic-form-field-relation.interface.d.ts +29 -0
- package/lib/services/dynamic-form.service.d.ts +12 -8
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/esm2022/lib/controls/index.mjs +0 -7
- package/esm2022/lib/models/classes/dynamic-form-field-base-component.mjs +0 -34
- package/esm2022/lib/models/types/dynamic-form-hook.type.mjs +0 -2
- package/lib/models/types/dynamic-form-hook.type.d.ts +0 -1
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { NgIf,
|
|
1
|
+
import { NgFor, NgIf, NgClass, AsyncPipe } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, Injectable, Inject, Optional, Component, Input,
|
|
3
|
+
import { InjectionToken, Injectable, Inject, Optional, EventEmitter, Component, Input, Output, ViewChild, inject, Injector, ViewContainerRef, ChangeDetectionStrategy } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { UntypedFormControl, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
6
6
|
import { map, BehaviorSubject, of, isObservable, startWith, distinctUntilChanged, Subscription } from 'rxjs';
|
|
7
|
-
import * as i1$1 from '@angular/material/button';
|
|
7
|
+
import * as i1$1 from '@angular/material/button-toggle';
|
|
8
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
9
|
+
import * as i1$3 from '@angular/material/form-field';
|
|
10
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
11
|
+
import * as i1$2 from '@angular/material/button';
|
|
8
12
|
import { MatButtonModule } from '@angular/material/button';
|
|
9
13
|
import * as i2 from '@angular/material/checkbox';
|
|
10
14
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
11
|
-
import * as i1$2 from '@angular/material/form-field';
|
|
12
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
13
15
|
import * as i5 from '@angular/material/icon';
|
|
14
16
|
import { MatIconModule } from '@angular/material/icon';
|
|
15
17
|
import * as i3 from '@angular/material/input';
|
|
16
18
|
import { MatInput, MatInputModule } from '@angular/material/input';
|
|
19
|
+
import * as i2$1 from '@angular/material/radio';
|
|
20
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
17
21
|
import * as i4 from '@angular/material/core';
|
|
18
22
|
import { MatOptionModule } from '@angular/material/core';
|
|
19
23
|
import * as i3$1 from '@angular/material/select';
|
|
@@ -74,8 +78,8 @@ class DynamicFormService {
|
|
|
74
78
|
/**
|
|
75
79
|
* Create a FormGroup from the provided form configuration.
|
|
76
80
|
* Returns a FormGroup.
|
|
77
|
-
* @param config
|
|
78
|
-
* @returns
|
|
81
|
+
* @param {DynamicFormConfig} config Configuration object of a form
|
|
82
|
+
* @returns {UntypedFormGroup}
|
|
79
83
|
*/
|
|
80
84
|
createFormGroup(config) {
|
|
81
85
|
const group = this.fb.group({});
|
|
@@ -94,12 +98,16 @@ class DynamicFormService {
|
|
|
94
98
|
}
|
|
95
99
|
/**
|
|
96
100
|
* Transform any list (Observable) to a list of DynamicFormFieldOption which is used in any Dynamic Form Field with options (e.g. DynamicSelect).
|
|
101
|
+
* Possible to provide the method with Type definitions to define the provided list type and desired option value type:
|
|
102
|
+
*
|
|
103
|
+
* `dynamicFormService.toDynamicOptionList<T, K>(...)`
|
|
104
|
+
*
|
|
97
105
|
* Generic types:
|
|
98
|
-
* T = The type of the items in the provided list
|
|
99
|
-
* K = The type of the value inside an DynamicFormFieldOption
|
|
100
|
-
* @param listObs
|
|
101
|
-
* @param labelCb
|
|
102
|
-
* @param valueCb
|
|
106
|
+
* - T = The type of the items in the provided list
|
|
107
|
+
* - K = The type of the value inside an DynamicFormFieldOption. Default is 'string'
|
|
108
|
+
* @param listObs An Observable of a list of items of type T
|
|
109
|
+
* @param labelCb Callback to define the label of the options in the template
|
|
110
|
+
* @param valueCb Callback to define the value of the options. Must return a value of type K (default string)
|
|
103
111
|
* @returns
|
|
104
112
|
*/
|
|
105
113
|
toDynamicOptionListObs(listObs, labelCb, valueCb) {
|
|
@@ -127,7 +135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
127
135
|
type: Optional
|
|
128
136
|
}] }, { type: i1.FormBuilder }, { type: DynamicFormValidationsService }]; } });
|
|
129
137
|
|
|
130
|
-
class
|
|
138
|
+
class DynamicFormFieldBase {
|
|
131
139
|
get id() {
|
|
132
140
|
return this.model.id ?? this.model.name;
|
|
133
141
|
}
|
|
@@ -144,14 +152,8 @@ class DynamicFormFieldBaseComponent {
|
|
|
144
152
|
get isInvalid() {
|
|
145
153
|
return this.control.invalid;
|
|
146
154
|
}
|
|
147
|
-
|
|
148
|
-
this.
|
|
149
|
-
}
|
|
150
|
-
onChange(ev) {
|
|
151
|
-
this.change.emit(ev);
|
|
152
|
-
}
|
|
153
|
-
onFocus(ev) {
|
|
154
|
-
this.focus.emit(ev);
|
|
155
|
+
onChange(event) {
|
|
156
|
+
this.change.emit(event);
|
|
155
157
|
}
|
|
156
158
|
resetControl() {
|
|
157
159
|
this.group.get(this.model.name)?.reset();
|
|
@@ -161,20 +163,23 @@ class DynamicFormFieldBaseComponent {
|
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
|
|
164
|
-
class
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
class DynamicButtonTogglesComponent extends DynamicFormFieldBase {
|
|
167
|
+
constructor() {
|
|
168
|
+
super(...arguments);
|
|
169
|
+
this.change = new EventEmitter();
|
|
167
170
|
}
|
|
168
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type:
|
|
169
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type:
|
|
171
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicButtonTogglesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
172
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicButtonTogglesComponent, isStandalone: true, selector: "dynamic-button-toggles", inputs: { model: "model", group: "group" }, outputs: { change: "change" }, usesInheritance: true, ngImport: i0, template: "<div class=\"dynamic-button-toggles-wrapper\"\n [formGroup]=\"group\">\n <label *ngIf=\"model.label\"\n [ngClass]=\"model.fieldLabelPosition\">{{model.label}}</label>\n <mat-button-toggle-group [id]=\"id\"\n [formControlName]=\"model.name\"\n [multiple]=\"model.multiple\"\n [vertical]=\"model.vertical\"\n (change)=\"onChange($event)\">\n <mat-button-toggle *ngFor=\"let option of model.options$ | async\"\n [value]=\"option.value\">{{option.label}}</mat-button-toggle>\n </mat-button-toggle-group>\n</div>", styles: [".dynamic-button-toggles-wrapper label{font-size:var(--mdc-typography-body2-font-size, 14px)}.dynamic-button-toggles-wrapper label.above{display:block;margin-bottom:8px}.dynamic-button-toggles-wrapper label.before{display:inline-block;margin-right:8px}\n"], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i1$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatFormFieldModule }] }); }
|
|
170
173
|
}
|
|
171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type:
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicButtonTogglesComponent, decorators: [{
|
|
172
175
|
type: Component,
|
|
173
|
-
args: [{ standalone: true, imports: [NgIf,
|
|
176
|
+
args: [{ standalone: true, imports: [NgFor, NgIf, NgClass, MatButtonToggleModule, ReactiveFormsModule, AsyncPipe, MatFormFieldModule], selector: 'dynamic-button-toggles', template: "<div class=\"dynamic-button-toggles-wrapper\"\n [formGroup]=\"group\">\n <label *ngIf=\"model.label\"\n [ngClass]=\"model.fieldLabelPosition\">{{model.label}}</label>\n <mat-button-toggle-group [id]=\"id\"\n [formControlName]=\"model.name\"\n [multiple]=\"model.multiple\"\n [vertical]=\"model.vertical\"\n (change)=\"onChange($event)\">\n <mat-button-toggle *ngFor=\"let option of model.options$ | async\"\n [value]=\"option.value\">{{option.label}}</mat-button-toggle>\n </mat-button-toggle-group>\n</div>", styles: [".dynamic-button-toggles-wrapper label{font-size:var(--mdc-typography-body2-font-size, 14px)}.dynamic-button-toggles-wrapper label.above{display:block;margin-bottom:8px}.dynamic-button-toggles-wrapper label.before{display:inline-block;margin-right:8px}\n"] }]
|
|
174
177
|
}], propDecorators: { model: [{
|
|
175
178
|
type: Input
|
|
176
179
|
}], group: [{
|
|
177
180
|
type: Input
|
|
181
|
+
}], change: [{
|
|
182
|
+
type: Output
|
|
178
183
|
}] } });
|
|
179
184
|
|
|
180
185
|
class DynamicFormFieldModel {
|
|
@@ -200,6 +205,102 @@ class DynamicFormFieldModel {
|
|
|
200
205
|
}
|
|
201
206
|
}
|
|
202
207
|
|
|
208
|
+
class DynamicFormFieldValueModel extends DynamicFormFieldModel {
|
|
209
|
+
constructor(config) {
|
|
210
|
+
super(config);
|
|
211
|
+
this._defaultValue = config.defaultValue ?? null;
|
|
212
|
+
this._value = config.value ?? null;
|
|
213
|
+
this._value$ = new BehaviorSubject(this._value);
|
|
214
|
+
this.valueChanges = this._value$.asObservable();
|
|
215
|
+
}
|
|
216
|
+
get defaultValue() {
|
|
217
|
+
return this._defaultValue;
|
|
218
|
+
}
|
|
219
|
+
set defaultValue(val) {
|
|
220
|
+
this._defaultValue = val;
|
|
221
|
+
}
|
|
222
|
+
get value() {
|
|
223
|
+
return this._value$.getValue();
|
|
224
|
+
}
|
|
225
|
+
set value(val) {
|
|
226
|
+
this._value$.next(val);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Base class for any DynamicFormField with options (e.g. DynamicSelect or DynamicAutocomplete)
|
|
232
|
+
*/
|
|
233
|
+
class DynamicFormFieldOptionModel extends DynamicFormFieldValueModel {
|
|
234
|
+
constructor(config) {
|
|
235
|
+
super(config);
|
|
236
|
+
this._options = [];
|
|
237
|
+
this._groupedOptions = [];
|
|
238
|
+
if (!config.options && !config.groupedOptions) {
|
|
239
|
+
console.error(`No options or groupedOptions provided for ${this.name}`);
|
|
240
|
+
}
|
|
241
|
+
if (config.options) {
|
|
242
|
+
this.options$ = this.setOptions(config.options);
|
|
243
|
+
}
|
|
244
|
+
else if (config.groupedOptions) {
|
|
245
|
+
this.groupedOptions$ = this.setGroupedOptions(config.groupedOptions);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
setOptions(options) {
|
|
249
|
+
if (Array.isArray(options)) {
|
|
250
|
+
this._options = options;
|
|
251
|
+
return of(this._options);
|
|
252
|
+
}
|
|
253
|
+
if (isObservable(options)) {
|
|
254
|
+
return options.pipe(map((o) => {
|
|
255
|
+
this._options = o;
|
|
256
|
+
return this._options;
|
|
257
|
+
}));
|
|
258
|
+
}
|
|
259
|
+
return of([]);
|
|
260
|
+
}
|
|
261
|
+
setGroupedOptions(groupedOptions) {
|
|
262
|
+
if (Array.isArray(groupedOptions)) {
|
|
263
|
+
this._groupedOptions = groupedOptions;
|
|
264
|
+
return of(this._groupedOptions);
|
|
265
|
+
}
|
|
266
|
+
if (isObservable(groupedOptions)) {
|
|
267
|
+
return groupedOptions.pipe(map((o) => {
|
|
268
|
+
this._groupedOptions = o;
|
|
269
|
+
return this._groupedOptions;
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
272
|
+
return of([]);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const DYNAMIC_FORM_FIELD_BUTTON_TOGGLES = 'button-toggles';
|
|
277
|
+
class DynamicButtonToggles extends DynamicFormFieldOptionModel {
|
|
278
|
+
constructor(config) {
|
|
279
|
+
super(config);
|
|
280
|
+
this.type = DYNAMIC_FORM_FIELD_BUTTON_TOGGLES;
|
|
281
|
+
this.multiple = config.multiple ?? false;
|
|
282
|
+
this.vertical = config.vertical ?? false;
|
|
283
|
+
this.showLabel = config.showLabel ?? false;
|
|
284
|
+
this.fieldLabelPosition = config.fieldLabelPosition ?? 'above';
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
class DynamicButtonComponent extends DynamicFormFieldBase {
|
|
289
|
+
onClick() {
|
|
290
|
+
this.model.onClick();
|
|
291
|
+
}
|
|
292
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
293
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicButtonComponent, isStandalone: true, selector: "dynamic-button", inputs: { model: "model", group: "group" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"model.raised else stroked\">\n <button mat-raised-button\n color=\"primary\"\n [id]=\"id\"\n (click)=\"onClick()\">\n <span>{{model.text}}</span>\n </button>\n</ng-container>\n\n<ng-template #stroked>\n <button mat-stroked-button\n color=\"primary\"\n [id]=\"id\"\n (click)=\"onClick()\">\n <span>{{model.text}}</span>\n </button>\n</ng-template>", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] }); }
|
|
294
|
+
}
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicButtonComponent, decorators: [{
|
|
296
|
+
type: Component,
|
|
297
|
+
args: [{ standalone: true, imports: [NgIf, MatButtonModule], selector: 'dynamic-button', template: "<ng-container *ngIf=\"model.raised else stroked\">\n <button mat-raised-button\n color=\"primary\"\n [id]=\"id\"\n (click)=\"onClick()\">\n <span>{{model.text}}</span>\n </button>\n</ng-container>\n\n<ng-template #stroked>\n <button mat-stroked-button\n color=\"primary\"\n [id]=\"id\"\n (click)=\"onClick()\">\n <span>{{model.text}}</span>\n </button>\n</ng-template>" }]
|
|
298
|
+
}], propDecorators: { model: [{
|
|
299
|
+
type: Input
|
|
300
|
+
}], group: [{
|
|
301
|
+
type: Input
|
|
302
|
+
}] } });
|
|
303
|
+
|
|
203
304
|
const DYNAMIC_FORM_FIELD_BUTTON = 'button';
|
|
204
305
|
class DynamicButton extends DynamicFormFieldModel {
|
|
205
306
|
constructor(config) {
|
|
@@ -211,53 +312,25 @@ class DynamicButton extends DynamicFormFieldModel {
|
|
|
211
312
|
}
|
|
212
313
|
}
|
|
213
314
|
|
|
214
|
-
class DynamicCheckboxComponent extends
|
|
315
|
+
class DynamicCheckboxComponent extends DynamicFormFieldBase {
|
|
215
316
|
constructor() {
|
|
216
317
|
super(...arguments);
|
|
217
|
-
this.blur = new EventEmitter();
|
|
218
318
|
this.change = new EventEmitter();
|
|
219
|
-
this.focus = new EventEmitter();
|
|
220
319
|
}
|
|
221
320
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
222
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicCheckboxComponent, isStandalone: true, selector: "dynamic-checkbox", inputs: { model: "model", group: "group" }, outputs: {
|
|
321
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicCheckboxComponent, isStandalone: true, selector: "dynamic-checkbox", inputs: { model: "model", group: "group" }, outputs: { change: "change" }, usesInheritance: true, ngImport: i0, template: "<ng-container [formGroup]=\"group\">\n <mat-checkbox [checked]=\"model.checked\"\n [formControlName]=\"model.name\"\n [indeterminate]=\"model.indeterminate\"\n [labelPosition]=\"model.labelPosition\"\n [name]=\"model.name\"\n [id]=\"id\"\n (change)=\"onChange($event)\">\n\n <span class=\"checkbox-label\">{{model.label}}</span>\n </mat-checkbox>\n</ng-container>", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] }); }
|
|
223
322
|
}
|
|
224
323
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicCheckboxComponent, decorators: [{
|
|
225
324
|
type: Component,
|
|
226
|
-
args: [{ selector: 'dynamic-checkbox', standalone: true, imports: [ReactiveFormsModule, MatCheckboxModule], template: "<ng-container [formGroup]=\"group\">\n <mat-checkbox [checked]=\"model.checked\"\n [formControlName]=\"model.name\"\n [indeterminate]=\"model.indeterminate\"\n [labelPosition]=\"model.labelPosition\"\n [name]=\"model.name\"\n [id]=\"id\"\n (
|
|
325
|
+
args: [{ selector: 'dynamic-checkbox', standalone: true, imports: [ReactiveFormsModule, MatCheckboxModule], template: "<ng-container [formGroup]=\"group\">\n <mat-checkbox [checked]=\"model.checked\"\n [formControlName]=\"model.name\"\n [indeterminate]=\"model.indeterminate\"\n [labelPosition]=\"model.labelPosition\"\n [name]=\"model.name\"\n [id]=\"id\"\n (change)=\"onChange($event)\">\n\n <span class=\"checkbox-label\">{{model.label}}</span>\n </mat-checkbox>\n</ng-container>" }]
|
|
227
326
|
}], propDecorators: { model: [{
|
|
228
327
|
type: Input
|
|
229
328
|
}], group: [{
|
|
230
329
|
type: Input
|
|
231
|
-
}], blur: [{
|
|
232
|
-
type: Output
|
|
233
330
|
}], change: [{
|
|
234
331
|
type: Output
|
|
235
|
-
}], focus: [{
|
|
236
|
-
type: Output
|
|
237
332
|
}] } });
|
|
238
333
|
|
|
239
|
-
class DynamicFormFieldValueModel extends DynamicFormFieldModel {
|
|
240
|
-
constructor(config) {
|
|
241
|
-
super(config);
|
|
242
|
-
this._defaultValue = config.defaultValue ?? null;
|
|
243
|
-
this._value = config.value ?? null;
|
|
244
|
-
this._value$ = new BehaviorSubject(this._value);
|
|
245
|
-
this.valueChanges = this._value$.asObservable();
|
|
246
|
-
}
|
|
247
|
-
get defaultValue() {
|
|
248
|
-
return this._defaultValue;
|
|
249
|
-
}
|
|
250
|
-
set defaultValue(val) {
|
|
251
|
-
this._defaultValue = val;
|
|
252
|
-
}
|
|
253
|
-
get value() {
|
|
254
|
-
return this._value$.getValue();
|
|
255
|
-
}
|
|
256
|
-
set value(val) {
|
|
257
|
-
this._value$.next(val);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
334
|
const DYNAMIC_FORM_FIELD_CHECKBOX = 'checkbox';
|
|
262
335
|
class DynamicCheckbox extends DynamicFormFieldValueModel {
|
|
263
336
|
constructor(config) {
|
|
@@ -278,12 +351,10 @@ class DynamicCheckbox extends DynamicFormFieldValueModel {
|
|
|
278
351
|
}
|
|
279
352
|
}
|
|
280
353
|
|
|
281
|
-
class DynamicInputComponent extends
|
|
354
|
+
class DynamicInputComponent extends DynamicFormFieldBase {
|
|
282
355
|
constructor() {
|
|
283
356
|
super(...arguments);
|
|
284
|
-
this.blur = new EventEmitter();
|
|
285
357
|
this.change = new EventEmitter();
|
|
286
|
-
this.focus = new EventEmitter();
|
|
287
358
|
}
|
|
288
359
|
get valueCount() {
|
|
289
360
|
return this.input?.value ? this.input.value.length : 0;
|
|
@@ -294,12 +365,19 @@ class DynamicInputComponent extends DynamicFormFieldBaseComponent {
|
|
|
294
365
|
get showClear() {
|
|
295
366
|
return !!this.control.value && !this.control.disabled;
|
|
296
367
|
}
|
|
368
|
+
onChange(event) {
|
|
369
|
+
// Ignore the native HTML 5 change event
|
|
370
|
+
if (event instanceof Event) {
|
|
371
|
+
event.stopPropagation();
|
|
372
|
+
}
|
|
373
|
+
this.change.emit(event);
|
|
374
|
+
}
|
|
297
375
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
298
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicInputComponent, isStandalone: true, selector: "dynamic-input", inputs: { model: "model", group: "group" }, outputs: {
|
|
376
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicInputComponent, isStandalone: true, selector: "dynamic-input", inputs: { model: "model", group: "group" }, outputs: { change: "change" }, viewQueries: [{ propertyName: "input", first: true, predicate: MatInput, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field [formGroup]=\"group\"\n [id]=\"id\"\n color=\"primary\">\n <mat-label *ngIf=\"model.label\">{{model.label}}</mat-label>\n\n <span matTextPrefix\n *ngIf=\"model.prefix\">{{model.prefix}}</span>\n\n <input matInput\n [type]=\"model.inputType\"\n [formControlName]=\"model.name\"\n [attr.min]=\"model.min\"\n [attr.max]=\"model.max\"\n [attr.minLength]=\"model.minLength\"\n [attr.maxLength]=\"model.maxLength\"\n [pattern]=\"model.pattern\"\n [autocomplete]=\"model.autocomplete\"\n (change)=\"onChange($event)\" />\n\n <button matSuffix\n mat-icon-button\n *ngIf=\"showClear\"\n (click)=\"resetControl()\">\n <mat-icon fontIcon=\"clear\"></mat-icon>\n </button>\n\n <mat-hint *ngIf=\"model.hint\"\n align=\"start\">{{model.hint}}</mat-hint>\n\n <mat-hint *ngIf=\"model.maxLength\"\n align=\"end\">{{maxCountText}}</mat-hint>\n\n <ng-container *ngFor=\"let validator of model.validators\"\n ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"hasError(validator.name)\">{{validator.message}}</mat-error>\n </ng-container>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { 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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
299
377
|
}
|
|
300
378
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicInputComponent, decorators: [{
|
|
301
379
|
type: Component,
|
|
302
|
-
args: [{ selector: 'dynamic-input', standalone: true, imports: [NgIf, NgFor, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatButtonModule, MatIconModule], template: "<mat-form-field [formGroup]=\"group\"\n [id]=\"id\"\n color=\"primary\">\n <mat-label *ngIf=\"model.label\">{{model.label}}</mat-label>\n\n <span
|
|
380
|
+
args: [{ selector: 'dynamic-input', standalone: true, imports: [NgIf, NgFor, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatButtonModule, MatIconModule], template: "<mat-form-field [formGroup]=\"group\"\n [id]=\"id\"\n color=\"primary\">\n <mat-label *ngIf=\"model.label\">{{model.label}}</mat-label>\n\n <span matTextPrefix\n *ngIf=\"model.prefix\">{{model.prefix}}</span>\n\n <input matInput\n [type]=\"model.inputType\"\n [formControlName]=\"model.name\"\n [attr.min]=\"model.min\"\n [attr.max]=\"model.max\"\n [attr.minLength]=\"model.minLength\"\n [attr.maxLength]=\"model.maxLength\"\n [pattern]=\"model.pattern\"\n [autocomplete]=\"model.autocomplete\"\n (change)=\"onChange($event)\" />\n\n <button matSuffix\n mat-icon-button\n *ngIf=\"showClear\"\n (click)=\"resetControl()\">\n <mat-icon fontIcon=\"clear\"></mat-icon>\n </button>\n\n <mat-hint *ngIf=\"model.hint\"\n align=\"start\">{{model.hint}}</mat-hint>\n\n <mat-hint *ngIf=\"model.maxLength\"\n align=\"end\">{{maxCountText}}</mat-hint>\n\n <ng-container *ngFor=\"let validator of model.validators\"\n ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"hasError(validator.name)\">{{validator.message}}</mat-error>\n </ng-container>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
|
|
303
381
|
}], propDecorators: { input: [{
|
|
304
382
|
type: ViewChild,
|
|
305
383
|
args: [MatInput, { static: true }]
|
|
@@ -307,12 +385,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
307
385
|
type: Input
|
|
308
386
|
}], group: [{
|
|
309
387
|
type: Input
|
|
310
|
-
}], blur: [{
|
|
311
|
-
type: Output
|
|
312
388
|
}], change: [{
|
|
313
389
|
type: Output
|
|
314
|
-
}], focus: [{
|
|
315
|
-
type: Output
|
|
316
390
|
}] } });
|
|
317
391
|
|
|
318
392
|
const DYNAMIC_FORM_FIELD_INPUT = 'input';
|
|
@@ -329,10 +403,40 @@ class DynamicInput extends DynamicFormFieldValueModel {
|
|
|
329
403
|
this.pattern = config.pattern ?? '';
|
|
330
404
|
this.autocomplete = config.autocomplete ?? 'off';
|
|
331
405
|
this.prefix = config.prefix ?? null;
|
|
406
|
+
this.hideClearIcon = config.hideClearIcon ?? false;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
class DymamicRadioGroupComponent extends DynamicFormFieldBase {
|
|
411
|
+
constructor() {
|
|
412
|
+
super(...arguments);
|
|
413
|
+
this.change = new EventEmitter();
|
|
414
|
+
}
|
|
415
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DymamicRadioGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
416
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DymamicRadioGroupComponent, isStandalone: true, selector: "dynamic-radio-group", inputs: { model: "model", group: "group" }, outputs: { change: "change" }, usesInheritance: true, ngImport: i0, template: "<div class=\"dynamic-radio-group-wrapper\"\n [formGroup]=\"group\">\n <label *ngIf=\"model.label\">{{model.label}}</label>\n <mat-radio-group [formControlName]=\"model.name\"\n class=\"radio-group\"\n [ngClass]=\"{'inline': model.inline}\"\n (change)=\"onChange($event)\">\n <mat-radio-button *ngFor=\"let option of model.options$ | async\"\n [value]=\"option.value\"\n [labelPosition]=\"model.labelPosition\">\n {{option.label}}\n </mat-radio-button>\n </mat-radio-group>\n</div>", styles: [".dynamic-radio-group-wrapper label{display:block;font-size:var(--mdc-typography-body2-font-size, 14px);margin-bottom:8px}.dynamic-radio-group-wrapper .radio-group:not(.inline){display:flex;flex-direction:column;align-items:flex-start}\n"], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i2$1.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
417
|
+
}
|
|
418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DymamicRadioGroupComponent, decorators: [{
|
|
419
|
+
type: Component,
|
|
420
|
+
args: [{ standalone: true, imports: [NgFor, NgIf, NgClass, ReactiveFormsModule, MatRadioModule, AsyncPipe], selector: 'dynamic-radio-group', template: "<div class=\"dynamic-radio-group-wrapper\"\n [formGroup]=\"group\">\n <label *ngIf=\"model.label\">{{model.label}}</label>\n <mat-radio-group [formControlName]=\"model.name\"\n class=\"radio-group\"\n [ngClass]=\"{'inline': model.inline}\"\n (change)=\"onChange($event)\">\n <mat-radio-button *ngFor=\"let option of model.options$ | async\"\n [value]=\"option.value\"\n [labelPosition]=\"model.labelPosition\">\n {{option.label}}\n </mat-radio-button>\n </mat-radio-group>\n</div>", styles: [".dynamic-radio-group-wrapper label{display:block;font-size:var(--mdc-typography-body2-font-size, 14px);margin-bottom:8px}.dynamic-radio-group-wrapper .radio-group:not(.inline){display:flex;flex-direction:column;align-items:flex-start}\n"] }]
|
|
421
|
+
}], propDecorators: { model: [{
|
|
422
|
+
type: Input
|
|
423
|
+
}], group: [{
|
|
424
|
+
type: Input
|
|
425
|
+
}], change: [{
|
|
426
|
+
type: Output
|
|
427
|
+
}] } });
|
|
428
|
+
|
|
429
|
+
const DYNAMIC_FORM_FIELD_RADIO_GROUP = 'radio-group';
|
|
430
|
+
class DynamicRadioGroup extends DynamicFormFieldOptionModel {
|
|
431
|
+
constructor(config) {
|
|
432
|
+
super(config);
|
|
433
|
+
this.type = DYNAMIC_FORM_FIELD_RADIO_GROUP;
|
|
434
|
+
this.labelPosition = config.labelPosition ?? 'after';
|
|
435
|
+
this.inline = config.inline ?? false;
|
|
332
436
|
}
|
|
333
437
|
}
|
|
334
438
|
|
|
335
|
-
class DynamicReadonlyComponent extends
|
|
439
|
+
class DynamicReadonlyComponent extends DynamicFormFieldBase {
|
|
336
440
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicReadonlyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
337
441
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicReadonlyComponent, isStandalone: true, selector: "dynamic-readonly", inputs: { model: "model", group: "group" }, usesInheritance: true, ngImport: i0, template: "<div class=\"dynamic-form-field-readonly\"\n [formGroup]=\"group\"\n [id]=\"id\">\n <div class=\"label\">{{model.label}}</div>\n <span>{{model.value}}</span>\n</div>", styles: [".dynamic-form-field-readonly{width:100%;margin:8px 0;color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.dynamic-form-field-readonly .label{font-size:var(--mdc-typography-body2-font-size, 14px);line-height:var(--mdc-typography-body2-line-height, 20px);margin-bottom:8px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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"] }] }); }
|
|
338
442
|
}
|
|
@@ -353,80 +457,28 @@ class DynamicReadonly extends DynamicFormFieldValueModel {
|
|
|
353
457
|
}
|
|
354
458
|
}
|
|
355
459
|
|
|
356
|
-
class DynamicSelectComponent extends
|
|
460
|
+
class DynamicSelectComponent extends DynamicFormFieldBase {
|
|
357
461
|
constructor() {
|
|
358
462
|
super(...arguments);
|
|
359
|
-
this.blur = new EventEmitter();
|
|
360
463
|
this.change = new EventEmitter();
|
|
361
|
-
this.focus = new EventEmitter();
|
|
362
464
|
}
|
|
363
465
|
trackByFn(index, option) {
|
|
364
466
|
return option.value;
|
|
365
467
|
}
|
|
366
468
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
367
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicSelectComponent, isStandalone: true, selector: "dynamic-select", inputs: { model: "model", group: "group" }, outputs: {
|
|
469
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicSelectComponent, isStandalone: true, selector: "dynamic-select", inputs: { model: "model", group: "group" }, outputs: { change: "change" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field [formGroup]=\"group\"\n [id]=\"id\"\n color=\"primary\">\n <mat-label>{{model.label}}</mat-label>\n\n <!-- Template for select without grouped options -->\n <ng-container *ngIf=\"model.options$ | async as options\">\n <ng-container *ngIf=\"!model.native else nativeSelect\">\n <mat-select [formControlName]=\"model.name\"\n [multiple]=\"model.multiple\"\n (selectionChange)=\"onChange($event)\">\n <mat-option *ngFor=\"let option of options; trackBy: trackByFn\"\n [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n </mat-select>\n </ng-container>\n\n <ng-template #nativeSelect>\n <select matNativeControl\n (selectionchange)=\"onChange($event)\">\n <option *ngFor=\"let option of options\"\n [value]=\"option.value\">\n {{option.label}}\n </option>\n </select>\n </ng-template>\n </ng-container>\n\n <!-- Template for select with grouped options -->\n <ng-container *ngIf=\"model.groupedOptions$ | async as groupedOptions\">\n <ng-container *ngIf=\"!model.native else nativeSelectGrouped\">\n <mat-select [formControlName]=\"model.name\"\n (selectionChange)=\"onChange($event)\">\n <mat-optgroup *ngFor=\"let group of groupedOptions\"\n [label]=\"group.name\">\n <mat-option *ngFor=\"let option of group.options; trackBy: trackByFn\"\n [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n </mat-optgroup>\n </mat-select>\n </ng-container>\n\n <ng-template #nativeSelectGrouped>\n <select matNativeControl\n (selectionchange)=\"onChange($event)\">\n <optgroup *ngFor=\"let group of groupedOptions\"\n [label]=\"group.name\">\n <option *ngFor=\"let option of group.options\"\n [value]=\"option.value\">\n {{option.label}}\n </option>\n </optgroup>\n </select>\n </ng-template>\n </ng-container>\n\n <mat-hint *ngIf=\"model.hint\"\n align=\"start\">{{model.hint}}</mat-hint>\n\n <ng-container *ngFor=\"let validator of model.validators\"\n ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"hasError(validator.name)\">{{validator.message}}</mat-error>\n </ng-container>\n</mat-form-field>", styles: ["mat-form-field{width:100%}mat-option{padding-top:8px;padding-bottom:8px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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"] }] }); }
|
|
368
470
|
}
|
|
369
471
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicSelectComponent, decorators: [{
|
|
370
472
|
type: Component,
|
|
371
|
-
args: [{ standalone: true, imports: [NgIf, NgFor, MatFormFieldModule, ReactiveFormsModule, MatSelectModule, MatOptionModule, AsyncPipe, MatInputModule], selector: 'dynamic-select', template: "<mat-form-field [formGroup]=\"group\"\n [id]=\"id\"\n color=\"primary\">\n <mat-label>{{model.label}}</mat-label>\n\n <!-- Template for select without grouped options -->\n <ng-container *ngIf=\"model.options$ | async as options\">\n <ng-container *ngIf=\"!model.native else nativeSelect\">\n <mat-select [formControlName]=\"model.name\"\n [multiple]=\"model.multiple\">\n <mat-option *ngFor=\"let option of options; trackBy: trackByFn\"\n [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n </mat-select>\n </ng-container>\n\n <ng-template #nativeSelect>\n <select matNativeControl>\n <option *ngFor=\"let option of options\"\n [value]=\"option.value\">\n {{option.label}}\n </option>\n </select>\n </ng-template>\n </ng-container>\n\n <!-- Template for select with grouped options -->\n <ng-container *ngIf=\"model.groupedOptions$ | async as groupedOptions\">\n <ng-container *ngIf=\"!model.native else nativeSelectGrouped\">\n <mat-select [formControlName]=\"model.name\">\n <mat-optgroup *ngFor=\"let group of groupedOptions\"\n [label]=\"group.name\">\n <mat-option *ngFor=\"let option of group.options; trackBy: trackByFn\"\n [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n </mat-optgroup>\n </mat-select>\n </ng-container>\n\n <ng-template #nativeSelectGrouped>\n <select matNativeControl>\n <optgroup *ngFor=\"let group of groupedOptions\"\n [label]=\"group.name\">\n <option *ngFor=\"let option of group.options\"\n [value]=\"option.value\">\n {{option.label}}\n </option>\n </optgroup>\n </select>\n </ng-template>\n </ng-container>\n\n <mat-hint *ngIf=\"model.hint\"\n align=\"start\">{{model.hint}}</mat-hint>\n\n <ng-container *ngFor=\"let validator of model.validators\"\n ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"hasError(validator.name)\">{{validator.message}}</mat-error>\n </ng-container>\n</mat-form-field>", styles: ["mat-form-field{width:100%}mat-option{padding-top:8px;padding-bottom:8px}\n"] }]
|
|
473
|
+
args: [{ standalone: true, imports: [NgIf, NgFor, MatFormFieldModule, ReactiveFormsModule, MatSelectModule, MatOptionModule, AsyncPipe, MatInputModule], selector: 'dynamic-select', template: "<mat-form-field [formGroup]=\"group\"\n [id]=\"id\"\n color=\"primary\">\n <mat-label>{{model.label}}</mat-label>\n\n <!-- Template for select without grouped options -->\n <ng-container *ngIf=\"model.options$ | async as options\">\n <ng-container *ngIf=\"!model.native else nativeSelect\">\n <mat-select [formControlName]=\"model.name\"\n [multiple]=\"model.multiple\"\n (selectionChange)=\"onChange($event)\">\n <mat-option *ngFor=\"let option of options; trackBy: trackByFn\"\n [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n </mat-select>\n </ng-container>\n\n <ng-template #nativeSelect>\n <select matNativeControl\n (selectionchange)=\"onChange($event)\">\n <option *ngFor=\"let option of options\"\n [value]=\"option.value\">\n {{option.label}}\n </option>\n </select>\n </ng-template>\n </ng-container>\n\n <!-- Template for select with grouped options -->\n <ng-container *ngIf=\"model.groupedOptions$ | async as groupedOptions\">\n <ng-container *ngIf=\"!model.native else nativeSelectGrouped\">\n <mat-select [formControlName]=\"model.name\"\n (selectionChange)=\"onChange($event)\">\n <mat-optgroup *ngFor=\"let group of groupedOptions\"\n [label]=\"group.name\">\n <mat-option *ngFor=\"let option of group.options; trackBy: trackByFn\"\n [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n </mat-optgroup>\n </mat-select>\n </ng-container>\n\n <ng-template #nativeSelectGrouped>\n <select matNativeControl\n (selectionchange)=\"onChange($event)\">\n <optgroup *ngFor=\"let group of groupedOptions\"\n [label]=\"group.name\">\n <option *ngFor=\"let option of group.options\"\n [value]=\"option.value\">\n {{option.label}}\n </option>\n </optgroup>\n </select>\n </ng-template>\n </ng-container>\n\n <mat-hint *ngIf=\"model.hint\"\n align=\"start\">{{model.hint}}</mat-hint>\n\n <ng-container *ngFor=\"let validator of model.validators\"\n ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"hasError(validator.name)\">{{validator.message}}</mat-error>\n </ng-container>\n</mat-form-field>", styles: ["mat-form-field{width:100%}mat-option{padding-top:8px;padding-bottom:8px}\n"] }]
|
|
372
474
|
}], propDecorators: { model: [{
|
|
373
475
|
type: Input
|
|
374
476
|
}], group: [{
|
|
375
477
|
type: Input
|
|
376
|
-
}], blur: [{
|
|
377
|
-
type: Output
|
|
378
478
|
}], change: [{
|
|
379
479
|
type: Output
|
|
380
|
-
}], focus: [{
|
|
381
|
-
type: Output
|
|
382
480
|
}] } });
|
|
383
481
|
|
|
384
|
-
/**
|
|
385
|
-
* Base class for any DynamicFormField with options (e.g. DynamicSelect or DynamicAutocomplete)
|
|
386
|
-
*/
|
|
387
|
-
class DynamicFormFieldOptionModel extends DynamicFormFieldValueModel {
|
|
388
|
-
constructor(config) {
|
|
389
|
-
super(config);
|
|
390
|
-
this._options = [];
|
|
391
|
-
this._groupedOptions = [];
|
|
392
|
-
if (!config.options && !config.groupedOptions) {
|
|
393
|
-
console.error(`No options or groupedOptions provided for ${this.name}`);
|
|
394
|
-
}
|
|
395
|
-
if (config.options) {
|
|
396
|
-
this.options$ = this.setOptions(config.options);
|
|
397
|
-
}
|
|
398
|
-
else if (config.groupedOptions) {
|
|
399
|
-
this.groupedOptions$ = this.setGroupedOptions(config.groupedOptions);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
setOptions(options) {
|
|
403
|
-
if (Array.isArray(options)) {
|
|
404
|
-
this._options = options;
|
|
405
|
-
return of(this._options);
|
|
406
|
-
}
|
|
407
|
-
if (isObservable(options)) {
|
|
408
|
-
return options.pipe(map((o) => {
|
|
409
|
-
this._options = o;
|
|
410
|
-
return this._options;
|
|
411
|
-
}));
|
|
412
|
-
}
|
|
413
|
-
return of([]);
|
|
414
|
-
}
|
|
415
|
-
setGroupedOptions(groupedOptions) {
|
|
416
|
-
if (Array.isArray(groupedOptions)) {
|
|
417
|
-
this._groupedOptions = groupedOptions;
|
|
418
|
-
return of(this._groupedOptions);
|
|
419
|
-
}
|
|
420
|
-
if (isObservable(groupedOptions)) {
|
|
421
|
-
return groupedOptions.pipe(map((o) => {
|
|
422
|
-
this._groupedOptions = o;
|
|
423
|
-
return this._groupedOptions;
|
|
424
|
-
}));
|
|
425
|
-
}
|
|
426
|
-
return of([]);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
482
|
const DYNAMIC_FORM_FIELD_SELECT = 'select';
|
|
431
483
|
class DynamicSelect extends DynamicFormFieldOptionModel {
|
|
432
484
|
constructor(config) {
|
|
@@ -437,12 +489,10 @@ class DynamicSelect extends DynamicFormFieldOptionModel {
|
|
|
437
489
|
}
|
|
438
490
|
}
|
|
439
491
|
|
|
440
|
-
class DynamicTextareaComponent extends
|
|
492
|
+
class DynamicTextareaComponent extends DynamicFormFieldBase {
|
|
441
493
|
constructor() {
|
|
442
494
|
super(...arguments);
|
|
443
|
-
this.blur = new EventEmitter();
|
|
444
495
|
this.change = new EventEmitter();
|
|
445
|
-
this.focus = new EventEmitter();
|
|
446
496
|
}
|
|
447
497
|
get valueCount() {
|
|
448
498
|
return this.textarea?.value ? this.textarea.value.length : 0;
|
|
@@ -450,12 +500,19 @@ class DynamicTextareaComponent extends DynamicFormFieldBaseComponent {
|
|
|
450
500
|
get maxCountText() {
|
|
451
501
|
return `${this.valueCount} / ${this.model.maxLength}`;
|
|
452
502
|
}
|
|
503
|
+
onChange(event) {
|
|
504
|
+
// Ignore the native HTML 5 change event
|
|
505
|
+
if (event instanceof Event) {
|
|
506
|
+
event.stopPropagation();
|
|
507
|
+
}
|
|
508
|
+
this.change.emit(event);
|
|
509
|
+
}
|
|
453
510
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
454
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicTextareaComponent, isStandalone: true, selector: "dynamic-textarea", inputs: { model: "model", group: "group" }, outputs: {
|
|
511
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicTextareaComponent, isStandalone: true, selector: "dynamic-textarea", inputs: { model: "model", group: "group" }, outputs: { change: "change" }, viewQueries: [{ propertyName: "textarea", first: true, predicate: MatInput, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field [formGroup]=\"group\"\n [id]=\"id\"\n color=\"primary\">\n <mat-label *ngIf=\"model.label\">{{model.label}}</mat-label>\n\n <textarea matInput\n [cdkTextareaAutosize]=\"model.resize\"\n [cdkAutosizeMinRows]=\"model.rows\"\n [cdkAutosizeMaxRows]=\"model.resizeMaxRows\"\n [id]=\"id\"\n [formControlName]=\"model.name\"\n [attr.minLength]=\"model.minLength\"\n [attr.maxLength]=\"model.maxLength\"\n [rows]=\"model.rows\"\n [autocomplete]=\"model.autocomplete\"\n (change)=\"onChange($event)\">\n </textarea>\n\n <mat-hint *ngIf=\"model.hint\"\n align=\"start\">{{model.hint}}</mat-hint>\n\n <mat-hint *ngIf=\"model.maxLength\"\n align=\"end\">{{maxCountText}}</mat-hint>\n\n <ng-container *ngFor=\"let validator of model.validators\"\n ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"hasError(validator.name)\">{{validator.message}}</mat-error>\n </ng-container>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: i3$2.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { 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: "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"] }] }); }
|
|
455
512
|
}
|
|
456
513
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicTextareaComponent, decorators: [{
|
|
457
514
|
type: Component,
|
|
458
|
-
args: [{ standalone: true, imports: [NgIf, NgFor, MatFormFieldModule, MatInputModule, ReactiveFormsModule], selector: 'dynamic-textarea', template: "<mat-form-field [formGroup]=\"group\"\n [id]=\"id\"\n color=\"primary\">\n <mat-label *ngIf=\"model.label\">{{model.label}}</mat-label>\n\n <textarea matInput\n [cdkTextareaAutosize]=\"model.resize\"\n [cdkAutosizeMinRows]=\"model.rows\"\n [cdkAutosizeMaxRows]=\"model.resizeMaxRows\"\n [id]=\"id\"\n [formControlName]=\"model.name\"\n [attr.minLength]=\"model.minLength\"\n [attr.maxLength]=\"model.maxLength\"\n [rows]=\"model.rows\"\n [autocomplete]=\"model.autocomplete\">\n </textarea>\n\n <mat-hint *ngIf=\"model.hint\"\n align=\"start\">{{model.hint}}</mat-hint>\n\n <mat-hint *ngIf=\"model.maxLength\"\n align=\"end\">{{maxCountText}}</mat-hint>\n\n <ng-container *ngFor=\"let validator of model.validators\"\n ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"hasError(validator.name)\">{{validator.message}}</mat-error>\n </ng-container>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
|
|
515
|
+
args: [{ standalone: true, imports: [NgIf, NgFor, MatFormFieldModule, MatInputModule, ReactiveFormsModule], selector: 'dynamic-textarea', template: "<mat-form-field [formGroup]=\"group\"\n [id]=\"id\"\n color=\"primary\">\n <mat-label *ngIf=\"model.label\">{{model.label}}</mat-label>\n\n <textarea matInput\n [cdkTextareaAutosize]=\"model.resize\"\n [cdkAutosizeMinRows]=\"model.rows\"\n [cdkAutosizeMaxRows]=\"model.resizeMaxRows\"\n [id]=\"id\"\n [formControlName]=\"model.name\"\n [attr.minLength]=\"model.minLength\"\n [attr.maxLength]=\"model.maxLength\"\n [rows]=\"model.rows\"\n [autocomplete]=\"model.autocomplete\"\n (change)=\"onChange($event)\">\n </textarea>\n\n <mat-hint *ngIf=\"model.hint\"\n align=\"start\">{{model.hint}}</mat-hint>\n\n <mat-hint *ngIf=\"model.maxLength\"\n align=\"end\">{{maxCountText}}</mat-hint>\n\n <ng-container *ngFor=\"let validator of model.validators\"\n ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"hasError(validator.name)\">{{validator.message}}</mat-error>\n </ng-container>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
|
|
459
516
|
}], propDecorators: { textarea: [{
|
|
460
517
|
type: ViewChild,
|
|
461
518
|
args: [MatInput, { static: true }]
|
|
@@ -463,12 +520,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
463
520
|
type: Input
|
|
464
521
|
}], group: [{
|
|
465
522
|
type: Input
|
|
466
|
-
}], blur: [{
|
|
467
|
-
type: Output
|
|
468
523
|
}], change: [{
|
|
469
524
|
type: Output
|
|
470
|
-
}], focus: [{
|
|
471
|
-
type: Output
|
|
472
525
|
}] } });
|
|
473
526
|
|
|
474
527
|
const DYNAMIC_FORM_FIELD_TEXTAREA = 'textarea';
|
|
@@ -571,6 +624,7 @@ var RelationOperator;
|
|
|
571
624
|
RelationOperator["AND"] = "AND";
|
|
572
625
|
RelationOperator["OR"] = "OR";
|
|
573
626
|
})(RelationOperator || (RelationOperator = {}));
|
|
627
|
+
|
|
574
628
|
const DISABLE_ACTION = {
|
|
575
629
|
type: RelationActionType.DISABLED,
|
|
576
630
|
reversedType: RelationActionType.ENABLED,
|
|
@@ -703,6 +757,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
703
757
|
|
|
704
758
|
class DynamicFormFieldComponent {
|
|
705
759
|
constructor() {
|
|
760
|
+
this.change = new EventEmitter();
|
|
706
761
|
this._subs = new Subscription();
|
|
707
762
|
this.dynamicFormService = inject(DynamicFormService);
|
|
708
763
|
this.relationService = inject(DynamicFormRelationsService);
|
|
@@ -739,6 +794,10 @@ class DynamicFormFieldComponent {
|
|
|
739
794
|
return DynamicSelectComponent;
|
|
740
795
|
case DYNAMIC_FORM_FIELD_BUTTON:
|
|
741
796
|
return DynamicButtonComponent;
|
|
797
|
+
case DYNAMIC_FORM_FIELD_BUTTON_TOGGLES:
|
|
798
|
+
return DynamicButtonTogglesComponent;
|
|
799
|
+
case DYNAMIC_FORM_FIELD_RADIO_GROUP:
|
|
800
|
+
return DymamicRadioGroupComponent;
|
|
742
801
|
default:
|
|
743
802
|
console.warn(`Model of type 'dynamic-${this.model.type}' is not implemented yet. Add this type to dynamic-form-field.component.ts to add support`);
|
|
744
803
|
return null;
|
|
@@ -749,6 +808,7 @@ class DynamicFormFieldComponent {
|
|
|
749
808
|
if (component != null) {
|
|
750
809
|
let componentRef = this.componentViewContainer.createComponent(component);
|
|
751
810
|
const componentInstance = componentRef.instance;
|
|
811
|
+
this._subs.add(componentInstance.change?.subscribe((event) => this.onChange(event)));
|
|
752
812
|
componentInstance.group = this.group;
|
|
753
813
|
componentInstance.model = this.model;
|
|
754
814
|
}
|
|
@@ -758,7 +818,7 @@ class DynamicFormFieldComponent {
|
|
|
758
818
|
*/
|
|
759
819
|
setSubscriptions() {
|
|
760
820
|
const model = this.model;
|
|
761
|
-
// Subscribe to the value change inside the control to
|
|
821
|
+
// Subscribe to the value change inside the control to change the value inside the model as well
|
|
762
822
|
this._subs.add(this._control.valueChanges.subscribe((value) => this.onValueChange(value)));
|
|
763
823
|
// Subscribe to the disabled change inside the model to change the disabled state of the FormControl
|
|
764
824
|
this._subs.add(model.disabledChange.subscribe((disabled) => this.onDisabledChange(disabled)));
|
|
@@ -794,8 +854,14 @@ class DynamicFormFieldComponent {
|
|
|
794
854
|
onDisabledChange(disabled) {
|
|
795
855
|
disabled ? this._control.disable() : this._control.enable();
|
|
796
856
|
}
|
|
857
|
+
onChange(ev) {
|
|
858
|
+
this.change.emit(this.createDynamicFormEvent(ev, 'change'));
|
|
859
|
+
}
|
|
860
|
+
createDynamicFormEvent(event, type) {
|
|
861
|
+
return { event, type, control: this._control, form: this.group, model: this.model };
|
|
862
|
+
}
|
|
797
863
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
798
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicFormFieldComponent, isStandalone: true, selector: "dynamic-form-field", inputs: { model: "model", group: "group" }, viewQueries: [{ propertyName: "componentViewContainer", first: true, predicate: ["componentViewContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div [formGroup]=\"group\"\n [ngClass]=\"['dynamic-form-field-container', 'dynamic-form-field-' + model.type]\">\n <ng-container #componentViewContainer></ng-container>\n</div>", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
864
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicFormFieldComponent, isStandalone: true, selector: "dynamic-form-field", inputs: { model: "model", group: "group" }, outputs: { change: "change" }, viewQueries: [{ propertyName: "componentViewContainer", first: true, predicate: ["componentViewContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div [formGroup]=\"group\"\n [ngClass]=\"['dynamic-form-field-container', 'dynamic-form-field-' + model.type]\">\n <ng-container #componentViewContainer></ng-container>\n</div>", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
799
865
|
}
|
|
800
866
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicFormFieldComponent, decorators: [{
|
|
801
867
|
type: Component,
|
|
@@ -807,12 +873,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
807
873
|
type: Input
|
|
808
874
|
}], group: [{
|
|
809
875
|
type: Input
|
|
876
|
+
}], change: [{
|
|
877
|
+
type: Output
|
|
810
878
|
}] } });
|
|
811
879
|
|
|
812
880
|
class DynamicFormComponent {
|
|
813
881
|
constructor() {
|
|
814
|
-
this.
|
|
815
|
-
this.dynamicFormService = inject(DynamicFormService);
|
|
882
|
+
this.change = new EventEmitter();
|
|
816
883
|
}
|
|
817
884
|
/**
|
|
818
885
|
* Get the formConfig as flat array.
|
|
@@ -820,10 +887,12 @@ class DynamicFormComponent {
|
|
|
820
887
|
get flatFormConfig() {
|
|
821
888
|
return this.formConfig.reduce((acc, curr) => acc.concat(curr), []);
|
|
822
889
|
}
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
890
|
+
/**
|
|
891
|
+
* TrackBy Function for performance optimization
|
|
892
|
+
* @param _index
|
|
893
|
+
* @param field
|
|
894
|
+
* @returns
|
|
895
|
+
*/
|
|
827
896
|
trackByFn(_index, field) {
|
|
828
897
|
return field.id;
|
|
829
898
|
}
|
|
@@ -839,25 +908,31 @@ class DynamicFormComponent {
|
|
|
839
908
|
* Provides an Observable to listen to changes of a specific field in the form.
|
|
840
909
|
*
|
|
841
910
|
* @param name Name of the field
|
|
842
|
-
* @returns Observable<
|
|
911
|
+
* @returns Observable<unknown>
|
|
843
912
|
*/
|
|
844
|
-
|
|
913
|
+
onControlChange(name) {
|
|
845
914
|
const field = this.group.get(name);
|
|
846
915
|
if (!field) {
|
|
847
916
|
throw new Error(`Cannot find a field with the name ${name} in the FormGroup`);
|
|
848
917
|
}
|
|
849
918
|
return field.valueChanges;
|
|
850
919
|
}
|
|
920
|
+
onChange(event) {
|
|
921
|
+
this.change.emit(event);
|
|
922
|
+
}
|
|
851
923
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
852
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicFormComponent, isStandalone: true, selector: "dynamic-form", inputs: { formConfig: "formConfig" }, outputs: {
|
|
924
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DynamicFormComponent, isStandalone: true, selector: "dynamic-form", inputs: { group: "group", formConfig: "formConfig" }, outputs: { change: "change" }, providers: [DynamicFormService], ngImport: i0, template: "<div *ngFor=\"let row of formConfig\"\n class=\"dynamic-form-row\">\n <dynamic-form-field *ngFor=\"let field of row; trackBy: trackByFn\"\n class=\"dynamic-form-field\"\n [id]=\"field.id\"\n [hidden]=\"field.hidden\"\n [ngClass]=\"[field.type, 'form-field-width-' + field.width]\"\n [group]=\"group\"\n [model]=\"field\"\n (change)=\"onChange($event)\">\n </dynamic-form-field>\n</div>", styles: [".dynamic-form-row{display:flex}.dynamic-form-row .dynamic-form-field{width:100%;margin:4px 0}.dynamic-form-row .dynamic-form-field:not(:last-of-type){margin-right:12px}.dynamic-form-row .dynamic-form-field.button{flex:0}.dynamic-form-row .form-field-width-1{width:1%}.dynamic-form-row .form-field-width-2{width:2%}.dynamic-form-row .form-field-width-3{width:3%}.dynamic-form-row .form-field-width-4{width:4%}.dynamic-form-row .form-field-width-5{width:5%}.dynamic-form-row .form-field-width-6{width:6%}.dynamic-form-row .form-field-width-7{width:7%}.dynamic-form-row .form-field-width-8{width:8%}.dynamic-form-row .form-field-width-9{width:9%}.dynamic-form-row .form-field-width-10{width:10%}.dynamic-form-row .form-field-width-11{width:11%}.dynamic-form-row .form-field-width-12{width:12%}.dynamic-form-row .form-field-width-13{width:13%}.dynamic-form-row .form-field-width-14{width:14%}.dynamic-form-row .form-field-width-15{width:15%}.dynamic-form-row .form-field-width-16{width:16%}.dynamic-form-row .form-field-width-17{width:17%}.dynamic-form-row .form-field-width-18{width:18%}.dynamic-form-row .form-field-width-19{width:19%}.dynamic-form-row .form-field-width-20{width:20%}.dynamic-form-row .form-field-width-21{width:21%}.dynamic-form-row .form-field-width-22{width:22%}.dynamic-form-row .form-field-width-23{width:23%}.dynamic-form-row .form-field-width-24{width:24%}.dynamic-form-row .form-field-width-25{width:25%}.dynamic-form-row .form-field-width-26{width:26%}.dynamic-form-row .form-field-width-27{width:27%}.dynamic-form-row .form-field-width-28{width:28%}.dynamic-form-row .form-field-width-29{width:29%}.dynamic-form-row .form-field-width-30{width:30%}.dynamic-form-row .form-field-width-31{width:31%}.dynamic-form-row .form-field-width-32{width:32%}.dynamic-form-row .form-field-width-33{width:33%}.dynamic-form-row .form-field-width-34{width:34%}.dynamic-form-row .form-field-width-35{width:35%}.dynamic-form-row .form-field-width-36{width:36%}.dynamic-form-row .form-field-width-37{width:37%}.dynamic-form-row .form-field-width-38{width:38%}.dynamic-form-row .form-field-width-39{width:39%}.dynamic-form-row .form-field-width-40{width:40%}.dynamic-form-row .form-field-width-41{width:41%}.dynamic-form-row .form-field-width-42{width:42%}.dynamic-form-row .form-field-width-43{width:43%}.dynamic-form-row .form-field-width-44{width:44%}.dynamic-form-row .form-field-width-45{width:45%}.dynamic-form-row .form-field-width-46{width:46%}.dynamic-form-row .form-field-width-47{width:47%}.dynamic-form-row .form-field-width-48{width:48%}.dynamic-form-row .form-field-width-49{width:49%}.dynamic-form-row .form-field-width-50{width:50%}.dynamic-form-row .form-field-width-51{width:51%}.dynamic-form-row .form-field-width-52{width:52%}.dynamic-form-row .form-field-width-53{width:53%}.dynamic-form-row .form-field-width-54{width:54%}.dynamic-form-row .form-field-width-55{width:55%}.dynamic-form-row .form-field-width-56{width:56%}.dynamic-form-row .form-field-width-57{width:57%}.dynamic-form-row .form-field-width-58{width:58%}.dynamic-form-row .form-field-width-59{width:59%}.dynamic-form-row .form-field-width-60{width:60%}.dynamic-form-row .form-field-width-61{width:61%}.dynamic-form-row .form-field-width-62{width:62%}.dynamic-form-row .form-field-width-63{width:63%}.dynamic-form-row .form-field-width-64{width:64%}.dynamic-form-row .form-field-width-65{width:65%}.dynamic-form-row .form-field-width-66{width:66%}.dynamic-form-row .form-field-width-67{width:67%}.dynamic-form-row .form-field-width-68{width:68%}.dynamic-form-row .form-field-width-69{width:69%}.dynamic-form-row .form-field-width-70{width:70%}.dynamic-form-row .form-field-width-71{width:71%}.dynamic-form-row .form-field-width-72{width:72%}.dynamic-form-row .form-field-width-73{width:73%}.dynamic-form-row .form-field-width-74{width:74%}.dynamic-form-row .form-field-width-75{width:75%}.dynamic-form-row .form-field-width-76{width:76%}.dynamic-form-row .form-field-width-77{width:77%}.dynamic-form-row .form-field-width-78{width:78%}.dynamic-form-row .form-field-width-79{width:79%}.dynamic-form-row .form-field-width-80{width:80%}.dynamic-form-row .form-field-width-81{width:81%}.dynamic-form-row .form-field-width-82{width:82%}.dynamic-form-row .form-field-width-83{width:83%}.dynamic-form-row .form-field-width-84{width:84%}.dynamic-form-row .form-field-width-85{width:85%}.dynamic-form-row .form-field-width-86{width:86%}.dynamic-form-row .form-field-width-87{width:87%}.dynamic-form-row .form-field-width-88{width:88%}.dynamic-form-row .form-field-width-89{width:89%}.dynamic-form-row .form-field-width-90{width:90%}.dynamic-form-row .form-field-width-91{width:91%}.dynamic-form-row .form-field-width-92{width:92%}.dynamic-form-row .form-field-width-93{width:93%}.dynamic-form-row .form-field-width-94{width:94%}.dynamic-form-row .form-field-width-95{width:95%}.dynamic-form-row .form-field-width-96{width:96%}.dynamic-form-row .form-field-width-97{width:97%}.dynamic-form-row .form-field-width-98{width:98%}.dynamic-form-row .form-field-width-99{width:99%}.dynamic-form-row .form-field-width-100{width:100%}\n"], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DynamicFormFieldComponent, selector: "dynamic-form-field", inputs: ["model", "group"], outputs: ["change"] }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
853
925
|
}
|
|
854
926
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicFormComponent, decorators: [{
|
|
855
927
|
type: Component,
|
|
856
|
-
args: [{ standalone: true, imports: [NgFor, NgClass, DynamicFormFieldComponent, ReactiveFormsModule], selector: 'dynamic-form', providers: [DynamicFormService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
857
|
-
}], propDecorators: {
|
|
928
|
+
args: [{ standalone: true, imports: [NgFor, NgClass, DynamicFormFieldComponent, ReactiveFormsModule], selector: 'dynamic-form', providers: [DynamicFormService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngFor=\"let row of formConfig\"\n class=\"dynamic-form-row\">\n <dynamic-form-field *ngFor=\"let field of row; trackBy: trackByFn\"\n class=\"dynamic-form-field\"\n [id]=\"field.id\"\n [hidden]=\"field.hidden\"\n [ngClass]=\"[field.type, 'form-field-width-' + field.width]\"\n [group]=\"group\"\n [model]=\"field\"\n (change)=\"onChange($event)\">\n </dynamic-form-field>\n</div>", styles: [".dynamic-form-row{display:flex}.dynamic-form-row .dynamic-form-field{width:100%;margin:4px 0}.dynamic-form-row .dynamic-form-field:not(:last-of-type){margin-right:12px}.dynamic-form-row .dynamic-form-field.button{flex:0}.dynamic-form-row .form-field-width-1{width:1%}.dynamic-form-row .form-field-width-2{width:2%}.dynamic-form-row .form-field-width-3{width:3%}.dynamic-form-row .form-field-width-4{width:4%}.dynamic-form-row .form-field-width-5{width:5%}.dynamic-form-row .form-field-width-6{width:6%}.dynamic-form-row .form-field-width-7{width:7%}.dynamic-form-row .form-field-width-8{width:8%}.dynamic-form-row .form-field-width-9{width:9%}.dynamic-form-row .form-field-width-10{width:10%}.dynamic-form-row .form-field-width-11{width:11%}.dynamic-form-row .form-field-width-12{width:12%}.dynamic-form-row .form-field-width-13{width:13%}.dynamic-form-row .form-field-width-14{width:14%}.dynamic-form-row .form-field-width-15{width:15%}.dynamic-form-row .form-field-width-16{width:16%}.dynamic-form-row .form-field-width-17{width:17%}.dynamic-form-row .form-field-width-18{width:18%}.dynamic-form-row .form-field-width-19{width:19%}.dynamic-form-row .form-field-width-20{width:20%}.dynamic-form-row .form-field-width-21{width:21%}.dynamic-form-row .form-field-width-22{width:22%}.dynamic-form-row .form-field-width-23{width:23%}.dynamic-form-row .form-field-width-24{width:24%}.dynamic-form-row .form-field-width-25{width:25%}.dynamic-form-row .form-field-width-26{width:26%}.dynamic-form-row .form-field-width-27{width:27%}.dynamic-form-row .form-field-width-28{width:28%}.dynamic-form-row .form-field-width-29{width:29%}.dynamic-form-row .form-field-width-30{width:30%}.dynamic-form-row .form-field-width-31{width:31%}.dynamic-form-row .form-field-width-32{width:32%}.dynamic-form-row .form-field-width-33{width:33%}.dynamic-form-row .form-field-width-34{width:34%}.dynamic-form-row .form-field-width-35{width:35%}.dynamic-form-row .form-field-width-36{width:36%}.dynamic-form-row .form-field-width-37{width:37%}.dynamic-form-row .form-field-width-38{width:38%}.dynamic-form-row .form-field-width-39{width:39%}.dynamic-form-row .form-field-width-40{width:40%}.dynamic-form-row .form-field-width-41{width:41%}.dynamic-form-row .form-field-width-42{width:42%}.dynamic-form-row .form-field-width-43{width:43%}.dynamic-form-row .form-field-width-44{width:44%}.dynamic-form-row .form-field-width-45{width:45%}.dynamic-form-row .form-field-width-46{width:46%}.dynamic-form-row .form-field-width-47{width:47%}.dynamic-form-row .form-field-width-48{width:48%}.dynamic-form-row .form-field-width-49{width:49%}.dynamic-form-row .form-field-width-50{width:50%}.dynamic-form-row .form-field-width-51{width:51%}.dynamic-form-row .form-field-width-52{width:52%}.dynamic-form-row .form-field-width-53{width:53%}.dynamic-form-row .form-field-width-54{width:54%}.dynamic-form-row .form-field-width-55{width:55%}.dynamic-form-row .form-field-width-56{width:56%}.dynamic-form-row .form-field-width-57{width:57%}.dynamic-form-row .form-field-width-58{width:58%}.dynamic-form-row .form-field-width-59{width:59%}.dynamic-form-row .form-field-width-60{width:60%}.dynamic-form-row .form-field-width-61{width:61%}.dynamic-form-row .form-field-width-62{width:62%}.dynamic-form-row .form-field-width-63{width:63%}.dynamic-form-row .form-field-width-64{width:64%}.dynamic-form-row .form-field-width-65{width:65%}.dynamic-form-row .form-field-width-66{width:66%}.dynamic-form-row .form-field-width-67{width:67%}.dynamic-form-row .form-field-width-68{width:68%}.dynamic-form-row .form-field-width-69{width:69%}.dynamic-form-row .form-field-width-70{width:70%}.dynamic-form-row .form-field-width-71{width:71%}.dynamic-form-row .form-field-width-72{width:72%}.dynamic-form-row .form-field-width-73{width:73%}.dynamic-form-row .form-field-width-74{width:74%}.dynamic-form-row .form-field-width-75{width:75%}.dynamic-form-row .form-field-width-76{width:76%}.dynamic-form-row .form-field-width-77{width:77%}.dynamic-form-row .form-field-width-78{width:78%}.dynamic-form-row .form-field-width-79{width:79%}.dynamic-form-row .form-field-width-80{width:80%}.dynamic-form-row .form-field-width-81{width:81%}.dynamic-form-row .form-field-width-82{width:82%}.dynamic-form-row .form-field-width-83{width:83%}.dynamic-form-row .form-field-width-84{width:84%}.dynamic-form-row .form-field-width-85{width:85%}.dynamic-form-row .form-field-width-86{width:86%}.dynamic-form-row .form-field-width-87{width:87%}.dynamic-form-row .form-field-width-88{width:88%}.dynamic-form-row .form-field-width-89{width:89%}.dynamic-form-row .form-field-width-90{width:90%}.dynamic-form-row .form-field-width-91{width:91%}.dynamic-form-row .form-field-width-92{width:92%}.dynamic-form-row .form-field-width-93{width:93%}.dynamic-form-row .form-field-width-94{width:94%}.dynamic-form-row .form-field-width-95{width:95%}.dynamic-form-row .form-field-width-96{width:96%}.dynamic-form-row .form-field-width-97{width:97%}.dynamic-form-row .form-field-width-98{width:98%}.dynamic-form-row .form-field-width-99{width:99%}.dynamic-form-row .form-field-width-100{width:100%}\n"] }]
|
|
929
|
+
}], propDecorators: { group: [{
|
|
858
930
|
type: Input,
|
|
859
931
|
args: [{ required: true }]
|
|
860
|
-
}],
|
|
932
|
+
}], formConfig: [{
|
|
933
|
+
type: Input,
|
|
934
|
+
args: [{ required: true }]
|
|
935
|
+
}], change: [{
|
|
861
936
|
type: Output
|
|
862
937
|
}] } });
|
|
863
938
|
|
|
@@ -869,5 +944,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
869
944
|
* Generated bundle index. Do not edit.
|
|
870
945
|
*/
|
|
871
946
|
|
|
872
|
-
export { DYNAMIC_FORM_FIELD_BUTTON, DYNAMIC_FORM_FIELD_CHECKBOX, DYNAMIC_FORM_FIELD_INPUT, DYNAMIC_FORM_FIELD_MAP_FN, DYNAMIC_FORM_FIELD_READONLY, DYNAMIC_FORM_FIELD_SELECT, DYNAMIC_FORM_FIELD_TEXTAREA, DynamicButton, DynamicCheckbox, DynamicFormComponent,
|
|
947
|
+
export { DYNAMIC_FORM_FIELD_BUTTON, DYNAMIC_FORM_FIELD_BUTTON_TOGGLES, DYNAMIC_FORM_FIELD_CHECKBOX, DYNAMIC_FORM_FIELD_INPUT, DYNAMIC_FORM_FIELD_MAP_FN, DYNAMIC_FORM_FIELD_RADIO_GROUP, DYNAMIC_FORM_FIELD_READONLY, DYNAMIC_FORM_FIELD_SELECT, DYNAMIC_FORM_FIELD_TEXTAREA, DynamicButton, DynamicButtonToggles, DynamicCheckbox, DynamicFormComponent, DynamicFormFieldBase, DynamicFormFieldModel, DynamicFormFieldOptionModel, DynamicFormFieldValueModel, DynamicFormService, DynamicFormValidators, DynamicInput, DynamicRadioGroup, DynamicReadonly, DynamicSelect, DynamicTextarea, RelationActionType, RelationOperator };
|
|
873
948
|
//# sourceMappingURL=olafvv-ngx-dynamic-form.mjs.map
|