@stemy/ngx-dynamic-form 19.4.0 → 19.4.1

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.
@@ -2,13 +2,13 @@ import * as i2 from '@stemy/ngx-utils';
2
2
  import { cachedFactory, ReflectUtils, ObjectUtils, LANGUAGE_SERVICE, ForbiddenZone, API_SERVICE, StringUtils, TOASTER_SERVICE, EventsService, NgxUtilsModule } from '@stemy/ngx-utils';
3
3
  import { Subject, BehaviorSubject, startWith, distinctUntilChanged, switchMap, from, isObservable, firstValueFrom, first } from 'rxjs';
4
4
  import * as i0 from '@angular/core';
5
- import { Inject, Injectable, input, output, inject, Renderer2, ElementRef, computed, signal, effect, HostListener, HostBinding, Directive, Injector, ChangeDetectionStrategy, ViewEncapsulation, Component, makeEnvironmentProviders, NgModule } from '@angular/core';
5
+ import { Inject, Injectable, input, output, inject, Renderer2, ElementRef, computed, signal, effect, HostListener, HostBinding, Directive, Type, Component, Injector, ChangeDetectionStrategy, ViewEncapsulation, makeEnvironmentProviders, NgModule } from '@angular/core';
6
6
  import * as i1 from '@angular/forms';
7
7
  import { FormGroup as FormGroup$1, FormArray as FormArray$1, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
8
  import { outputToObservable, toSignal, rxResource } from '@angular/core/rxjs-interop';
9
9
  import { debounceTime } from 'rxjs/operators';
10
10
  import * as i3 from '@ngx-formly/core';
11
- import { FieldArrayType, FieldType, FieldWrapper, FormlyModule } from '@ngx-formly/core';
11
+ import { FieldType, ɵobserve as _observe, FieldArrayType, FieldWrapper, provideFormlyConfig, provideFormlyCore, FormlyModule } from '@ngx-formly/core';
12
12
  import * as i1$1 from '@angular/common';
13
13
  import { CommonModule } from '@angular/common';
14
14
 
@@ -1253,6 +1253,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1253
1253
  args: ["click"]
1254
1254
  }] } });
1255
1255
 
1256
+ class DynamicFieldType extends FieldType {
1257
+ stateChanges = new Subject();
1258
+ _errorState = false;
1259
+ _focused = false;
1260
+ ngOnDestroy() {
1261
+ delete this.formField?._control;
1262
+ this.stateChanges.complete();
1263
+ }
1264
+ setDescribedByIds(_ids) {
1265
+ }
1266
+ onContainerClick(_event) {
1267
+ this.field.focus = true;
1268
+ this.stateChanges.next();
1269
+ }
1270
+ get errorState() {
1271
+ const showError = this.options.showError(this);
1272
+ if (showError !== this._errorState) {
1273
+ this._errorState = showError;
1274
+ this.stateChanges.next();
1275
+ }
1276
+ return showError;
1277
+ }
1278
+ get controlType() {
1279
+ if (this.props.type) {
1280
+ return this.props.type;
1281
+ }
1282
+ const type = this.field.type;
1283
+ return type instanceof Type ? type.prototype.constructor.name : type;
1284
+ }
1285
+ get focused() {
1286
+ const focused = !!this.field.focus && !this.disabled;
1287
+ if (focused !== this._focused) {
1288
+ this._focused = focused;
1289
+ this.stateChanges.next();
1290
+ }
1291
+ return focused;
1292
+ }
1293
+ get disabled() {
1294
+ return !!this.props.disabled;
1295
+ }
1296
+ get required() {
1297
+ return !!this.props.required;
1298
+ }
1299
+ get placeholder() {
1300
+ return this.props.placeholder || "";
1301
+ }
1302
+ get shouldPlaceholderFloat() {
1303
+ return this.shouldLabelFloat;
1304
+ }
1305
+ get value() {
1306
+ return this.formControl?.value;
1307
+ }
1308
+ set value(value) {
1309
+ this.formControl?.patchValue(value);
1310
+ }
1311
+ get ngControl() {
1312
+ return this.formControl;
1313
+ }
1314
+ get empty() {
1315
+ return this.value == null || this.value === "";
1316
+ }
1317
+ get shouldLabelFloat() {
1318
+ return this.focused || !this.empty;
1319
+ }
1320
+ get formField() {
1321
+ return this.field?.["_formField"];
1322
+ }
1323
+ ngAfterViewInit() {
1324
+ const control = this;
1325
+ if (this.formField && control !== this.formField._control) {
1326
+ this.formField._control = control;
1327
+ // temporary fix for https://github.com/angular/material2/issues/6728
1328
+ const ngControl = control?.ngControl;
1329
+ if (ngControl?.valueAccessor?.hasOwnProperty("_formField")) {
1330
+ ngControl.valueAccessor["_formField"] = this.formField;
1331
+ }
1332
+ if (ngControl?.valueAccessor?.hasOwnProperty("_parentFormField")) {
1333
+ ngControl.valueAccessor["_parentFormField"] = this.formField;
1334
+ }
1335
+ ["prefix", "suffix", "textPrefix", "textSuffix"].forEach((type) => _observe(this.field, ["props", type], ({ currentValue }) => currentValue &&
1336
+ Promise.resolve().then(() => {
1337
+ this.options.detectChanges(this.field);
1338
+ })));
1339
+ // https://github.com/angular/components/issues/16209
1340
+ const setDescribedByIds = control.setDescribedByIds.bind(control);
1341
+ control.setDescribedByIds = (ids) => {
1342
+ setTimeout(() => setDescribedByIds(ids));
1343
+ };
1344
+ }
1345
+ }
1346
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFieldType, deps: null, target: i0.ɵɵFactoryTarget.Component });
1347
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DynamicFieldType, isStandalone: false, selector: "dynamic-field-type", usesInheritance: true, ngImport: i0, template: "", isInline: true });
1348
+ }
1349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFieldType, decorators: [{
1350
+ type: Component,
1351
+ args: [{
1352
+ standalone: false,
1353
+ selector: "dynamic-field-type",
1354
+ template: ""
1355
+ }]
1356
+ }] });
1357
+
1256
1358
  class DynamicFormComponent {
1257
1359
  builder = inject(DynamicFormBuilderService);
1258
1360
  events = inject(EventsService);
@@ -1312,7 +1414,7 @@ class DynamicFormComponent {
1312
1414
  this.options?.resetModel?.();
1313
1415
  }
1314
1416
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1315
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DynamicFormComponent, isStandalone: false, selector: "dynamic-form", inputs: { labelPrefix: { classPropertyName: "labelPrefix", publicName: "labelPrefix", isSignal: true, isRequired: false, transformFunction: null }, labelCustomizer: { classPropertyName: "labelCustomizer", publicName: "labelCustomizer", isSignal: true, isRequired: false, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSubmit: "onSubmit" }, ngImport: i0, template: "@if (config() && group()) {\n <form [formGroup]=\"group()\" (ngSubmit)=\"submit()\" autocomplete=\"off\" role=\"presentation\">\n <input type=\"submit\" [hidden]=\"true\" />\n <formly-form [model]=\"data()\"\n [fields]=\"config()\"\n [form]=\"group()\"\n [options]=\"options\"></formly-form>\n <ng-content></ng-content>\n </form>\n}\n", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "component", type: i3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1417
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DynamicFormComponent, isStandalone: false, selector: "dynamic-form", inputs: { labelPrefix: { classPropertyName: "labelPrefix", publicName: "labelPrefix", isSignal: true, isRequired: false, transformFunction: null }, labelCustomizer: { classPropertyName: "labelCustomizer", publicName: "labelCustomizer", isSignal: true, isRequired: false, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSubmit: "onSubmit" }, ngImport: i0, template: "@if (config() && group()) {\n <form [formGroup]=\"group()\" (ngSubmit)=\"submit()\" autocomplete=\"off\" role=\"presentation\">\n <input type=\"submit\" [hidden]=\"true\" />\n <formly-form [model]=\"data()\"\n [fields]=\"config()\"\n [form]=\"group()\"\n [options]=\"options\"></formly-form>\n <ng-content></ng-content>\n </form>\n}\n", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "component", type: i3.LegacyFormlyForm, selector: "formly-form" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1316
1418
  }
1317
1419
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFormComponent, decorators: [{
1318
1420
  type: Component,
@@ -1328,16 +1430,16 @@ class DynamicFormArrayComponent extends FieldArrayType {
1328
1430
  }
1329
1431
  }
1330
1432
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFormArrayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1331
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DynamicFormArrayComponent, isStandalone: false, selector: "dynamic-form-array", usesInheritance: true, ngImport: i0, template: "<label class=\"field-label\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n</label>\n<div class=\"field-container\">\n @if (props.useTabs) {\n <ul class=\"form-array-tabs\">\n @for (field of field.fieldGroup; track field.key; let ix = $index) {\n <li>\n <a class=\"btn\" [ngClass]=\"[currentTab() === ix ? 'btn-primary' : 'btn-secondary']\"\n (click)=\"currentTab.set(ix)\">\n {{ (field.formControl.value | getValue : props.tabsLabel) || ix + 1 }}\n </a>\n </li>\n }\n </ul>\n }\n @for (field of field.fieldGroup; track field.key; let ix = $index) {\n @if (!props.useTabs || ix === currentTab()) {\n <div class=\"form-array-item\">\n <div class=\"form-array-buttons\">\n @if (props.removeItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"remove(ix)\">\n <i icon=\"trash-outline\"></i>\n </button>\n }\n @if (props.insertItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"add(ix)\">\n <i icon=\"plus-outline\"></i>\n </button>\n }\n </div>\n <formly-field [field]=\"field\"></formly-field>\n </div>\n }\n }\n <div class=\"form-array-buttons\">\n @if (props.clearItems) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"clear()\">\n <i icon=\"trash-outline\"></i>\n {{ 'button.clear-items' | translate }}\n </button>\n }\n @if (props.addItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"add()\">\n <i icon=\"plus-outline\"></i>\n {{ 'button.insert-item' | translate }}\n </button>\n }\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IconDirective, selector: "[icon]", inputs: ["icon", "activeIcon", "active"], outputs: ["activeChange"] }, { kind: "component", type: i3.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "pipe", type: i2.GetValuePipe, name: "getValue" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1433
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DynamicFormArrayComponent, isStandalone: false, selector: "dynamic-form-array", usesInheritance: true, ngImport: i0, template: "<label class=\"field-label\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n</label>\n<div class=\"field-container\">\n @if (props.useTabs) {\n <ul class=\"form-array-tabs\">\n @for (field of field.fieldGroup; track field.key; let ix = $index) {\n <li>\n <a class=\"btn\" [ngClass]=\"[currentTab() === ix ? 'btn-primary' : 'btn-secondary']\"\n (click)=\"currentTab.set(ix)\">\n {{ (field.formControl.value | getValue : props.tabsLabel) || ix + 1 }}\n </a>\n </li>\n }\n </ul>\n }\n @for (field of field.fieldGroup; track field.key; let ix = $index) {\n @if (!props.useTabs || ix === currentTab()) {\n <div class=\"form-array-item\">\n <div class=\"form-array-buttons\">\n @if (props.removeItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"remove(ix)\">\n <i icon=\"trash-outline\"></i>\n </button>\n }\n @if (props.insertItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"add(ix)\">\n <i icon=\"plus-outline\"></i>\n </button>\n }\n </div>\n <formly-field [field]=\"field\"></formly-field>\n </div>\n }\n }\n <div class=\"form-array-buttons\">\n @if (props.clearItems) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"clear()\">\n <i icon=\"trash-outline\"></i>\n {{ 'button.clear-items' | translate }}\n </button>\n }\n @if (props.addItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"add()\">\n <i icon=\"plus-outline\"></i>\n {{ 'button.insert-item' | translate }}\n </button>\n }\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IconDirective, selector: "[icon]", inputs: ["icon", "activeIcon", "active"], outputs: ["activeChange"] }, { kind: "component", type: i3.LegacyFormlyField, selector: "formly-field" }, { kind: "pipe", type: i2.GetValuePipe, name: "getValue" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1332
1434
  }
1333
1435
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFormArrayComponent, decorators: [{
1334
1436
  type: Component,
1335
1437
  args: [{ standalone: false, selector: "dynamic-form-array", encapsulation: ViewEncapsulation.None, template: "<label class=\"field-label\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n</label>\n<div class=\"field-container\">\n @if (props.useTabs) {\n <ul class=\"form-array-tabs\">\n @for (field of field.fieldGroup; track field.key; let ix = $index) {\n <li>\n <a class=\"btn\" [ngClass]=\"[currentTab() === ix ? 'btn-primary' : 'btn-secondary']\"\n (click)=\"currentTab.set(ix)\">\n {{ (field.formControl.value | getValue : props.tabsLabel) || ix + 1 }}\n </a>\n </li>\n }\n </ul>\n }\n @for (field of field.fieldGroup; track field.key; let ix = $index) {\n @if (!props.useTabs || ix === currentTab()) {\n <div class=\"form-array-item\">\n <div class=\"form-array-buttons\">\n @if (props.removeItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"remove(ix)\">\n <i icon=\"trash-outline\"></i>\n </button>\n }\n @if (props.insertItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"add(ix)\">\n <i icon=\"plus-outline\"></i>\n </button>\n }\n </div>\n <formly-field [field]=\"field\"></formly-field>\n </div>\n }\n }\n <div class=\"form-array-buttons\">\n @if (props.clearItems) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"clear()\">\n <i icon=\"trash-outline\"></i>\n {{ 'button.clear-items' | translate }}\n </button>\n }\n @if (props.addItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"add()\">\n <i icon=\"plus-outline\"></i>\n {{ 'button.insert-item' | translate }}\n </button>\n }\n </div>\n</div>\n" }]
1336
1438
  }] });
1337
1439
 
1338
- class DynamicFormChipsComponent extends FieldType {
1440
+ class DynamicFormChipsComponent extends DynamicFieldType {
1339
1441
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFormChipsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1340
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DynamicFormChipsComponent, isStandalone: false, selector: "dynamic-form-chips", usesInheritance: true, ngImport: i0, template: "<chips [formControl]=\"formControl\"\n [type]=\"props.type\"\n [step]=\"props.step\"\n [minLength]=\"props.minLength\"\n [maxLength]=\"props.maxLength\"\n [min]=\"props.min\"\n [max]=\"props.max\"\n [multiple]=\"props.multiple\"\n [formlyAttributes]=\"field\">\n</chips>\n", dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.ChipsComponent, selector: "chips", inputs: ["value", "multiple", "disabled", "type", "min", "max", "minLength", "maxLength", "step", "placeholder", "unique", "options"], outputs: ["valueChange"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1442
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DynamicFormChipsComponent, isStandalone: false, selector: "dynamic-form-chips", usesInheritance: true, ngImport: i0, template: "<chips [formControl]=\"formControl\"\n [type]=\"props.type\"\n [step]=\"props.step\"\n [minLength]=\"props.minLength\"\n [maxLength]=\"props.maxLength\"\n [min]=\"props.min\"\n [max]=\"props.max\"\n [multiple]=\"props.multiple\"\n [formlyAttributes]=\"field\">\n</chips>\n", dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.ChipsComponent, selector: "chips", inputs: ["value", "multiple", "disabled", "type", "min", "max", "minLength", "maxLength", "step", "placeholder", "unique", "options"], outputs: ["valueChange"] }, { kind: "directive", type: i3.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1341
1443
  }
1342
1444
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFormChipsComponent, decorators: [{
1343
1445
  type: Component,
@@ -1346,7 +1448,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1346
1448
 
1347
1449
  class DynamicFormFieldComponent extends FieldWrapper {
1348
1450
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFormFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1349
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DynamicFormFieldComponent, isStandalone: false, selector: "dynamic-form-field", usesInheritance: true, ngImport: i0, template: "<label class=\"field-label\" [for]=\"id\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n <span class=\"field-required\" *ngIf=\"props.required && props.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n</label>\n<div class=\"field-container\">\n <ng-container #fieldComponent></ng-container>\n <div *ngIf=\"showError\" class=\"field-errors invalid-feedback\">\n <formly-validation-message\n id=\"{{ id }}-formly-validation-error\"\n [field]=\"field\"\n role=\"alert\"\n ></formly-validation-message>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1451
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DynamicFormFieldComponent, isStandalone: false, selector: "dynamic-form-field", usesInheritance: true, ngImport: i0, template: "<label class=\"field-label\" [for]=\"id\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n <span class=\"field-required\" *ngIf=\"props.required && props.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n</label>\n<div class=\"field-container\">\n <ng-container #fieldComponent></ng-container>\n <div *ngIf=\"showError\" class=\"field-errors invalid-feedback\">\n <formly-validation-message\n id=\"{{ id }}-formly-validation-error\"\n [field]=\"field\"\n role=\"alert\"\n ></formly-validation-message>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.LegacyFormlyValidationMessage, selector: "formly-validation-message" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1350
1452
  }
1351
1453
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFormFieldComponent, decorators: [{
1352
1454
  type: Component,
@@ -1375,9 +1477,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1375
1477
  args: [{ standalone: false, selector: "dynamic-form-group", encapsulation: ViewEncapsulation.None, template: "<label class=\"field-label\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n</label>\n<ng-container #fieldComponent></ng-container>\n" }]
1376
1478
  }] });
1377
1479
 
1378
- class DynamicFormUploadComponent extends FieldType {
1480
+ class DynamicFormUploadComponent extends DynamicFieldType {
1379
1481
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFormUploadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1380
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DynamicFormUploadComponent, isStandalone: false, selector: "dynamic-form-upload", usesInheritance: true, ngImport: i0, template: "<upload [formControl]=\"formControl\"\n [multiple]=\"props.multiple\"\n [inline]=\"props.inline\"\n [accept]=\"props.accept\"\n [baseUrl]=\"props.url\"\n [makeUpload]=\"props.createUploadData\"\n [formlyAttributes]=\"field\">\n</upload>\n", dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.UploadComponent, selector: "upload", inputs: ["value", "disabled", "inline", "accept", "baseUrl", "message", "multiple", "buttonText", "makeUpload", "preProcess"], outputs: ["onUploaded", "onRemove"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1482
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DynamicFormUploadComponent, isStandalone: false, selector: "dynamic-form-upload", usesInheritance: true, ngImport: i0, template: "<upload [formControl]=\"formControl\"\n [multiple]=\"props.multiple\"\n [inline]=\"props.inline\"\n [accept]=\"props.accept\"\n [baseUrl]=\"props.url\"\n [makeUpload]=\"props.createUploadData\"\n [formlyAttributes]=\"field\">\n</upload>\n", dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.UploadComponent, selector: "upload", inputs: ["value", "disabled", "inline", "accept", "baseUrl", "message", "multiple", "buttonText", "makeUpload", "preProcess"], outputs: ["onUploaded", "onRemove"] }, { kind: "directive", type: i3.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1381
1483
  }
1382
1484
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicFormUploadComponent, decorators: [{
1383
1485
  type: Component,
@@ -1386,6 +1488,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1386
1488
 
1387
1489
  // --- Components ---
1388
1490
  const components = [
1491
+ DynamicFieldType,
1389
1492
  DynamicFormComponent,
1390
1493
  DynamicFormArrayComponent,
1391
1494
  DynamicFormChipsComponent,
@@ -1403,28 +1506,24 @@ const pipes = [];
1403
1506
 
1404
1507
  class NgxDynamicFormModule {
1405
1508
  static getProviders(config) {
1406
- const { providers } = FormlyModule.forRoot({
1407
- types: [
1408
- { name: "array", component: DynamicFormArrayComponent },
1409
- { name: "chips", component: DynamicFormChipsComponent },
1410
- { name: "upload", component: DynamicFormUploadComponent, wrappers: ["form-field"] },
1411
- { name: "file", extends: "upload" },
1412
- { name: "translation", extends: "array" },
1413
- ...(config?.types || [])
1414
- ],
1415
- wrappers: [
1416
- { name: "form-field", component: DynamicFormFieldComponent },
1417
- { name: "form-fieldset", component: DynamicFormFieldsetComponent },
1418
- { name: "form-group", component: DynamicFormGroupComponent },
1419
- ...(config?.wrappers || [])
1420
- ],
1421
- extras: {
1422
- renderFormlyFieldElement: false,
1423
- ...(config?.extras || {})
1424
- }
1425
- });
1509
+ const formlyConfigs = (config?.options || []).map(provideFormlyConfig);
1426
1510
  return [
1427
- ...providers,
1511
+ provideFormlyCore({
1512
+ types: [
1513
+ { name: "array", component: DynamicFormArrayComponent },
1514
+ { name: "chips", component: DynamicFormChipsComponent, wrappers: ["form-field"] },
1515
+ { name: "upload", component: DynamicFormUploadComponent, wrappers: ["form-field"] }
1516
+ ],
1517
+ wrappers: [
1518
+ { name: "form-field", component: DynamicFormFieldComponent },
1519
+ { name: "form-fieldset", component: DynamicFormFieldsetComponent },
1520
+ { name: "form-group", component: DynamicFormGroupComponent }
1521
+ ],
1522
+ extras: {
1523
+ renderFormlyFieldElement: false
1524
+ }
1525
+ }),
1526
+ ...formlyConfigs,
1428
1527
  DynamicFormService,
1429
1528
  DynamicFormBuilderService,
1430
1529
  DynamicFormSchemaService
@@ -1440,10 +1539,11 @@ class NgxDynamicFormModule {
1440
1539
  return makeEnvironmentProviders(NgxDynamicFormModule.getProviders(config));
1441
1540
  }
1442
1541
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxDynamicFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1443
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: NgxDynamicFormModule, declarations: [DynamicFormComponent, DynamicFormArrayComponent, DynamicFormChipsComponent, DynamicFormFieldComponent, DynamicFormFieldsetComponent, DynamicFormGroupComponent, DynamicFormUploadComponent, AsyncSubmitDirective], imports: [CommonModule,
1542
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: NgxDynamicFormModule, declarations: [DynamicFieldType, DynamicFormComponent, DynamicFormArrayComponent, DynamicFormChipsComponent, DynamicFormFieldComponent, DynamicFormFieldsetComponent, DynamicFormGroupComponent, DynamicFormUploadComponent, AsyncSubmitDirective], imports: [CommonModule,
1444
1543
  FormsModule,
1445
1544
  ReactiveFormsModule,
1446
- NgxUtilsModule, i3.FormlyModule], exports: [DynamicFormComponent, DynamicFormArrayComponent, DynamicFormChipsComponent, DynamicFormFieldComponent, DynamicFormFieldsetComponent, DynamicFormGroupComponent, DynamicFormUploadComponent, AsyncSubmitDirective, FormsModule,
1545
+ NgxUtilsModule,
1546
+ FormlyModule], exports: [DynamicFieldType, DynamicFormComponent, DynamicFormArrayComponent, DynamicFormChipsComponent, DynamicFormFieldComponent, DynamicFormFieldsetComponent, DynamicFormGroupComponent, DynamicFormUploadComponent, AsyncSubmitDirective, FormsModule,
1447
1547
  ReactiveFormsModule,
1448
1548
  NgxUtilsModule,
1449
1549
  FormlyModule] });
@@ -1453,7 +1553,7 @@ class NgxDynamicFormModule {
1453
1553
  FormsModule,
1454
1554
  ReactiveFormsModule,
1455
1555
  NgxUtilsModule,
1456
- FormlyModule.forChild(), FormsModule,
1556
+ FormlyModule, FormsModule,
1457
1557
  ReactiveFormsModule,
1458
1558
  NgxUtilsModule,
1459
1559
  FormlyModule] });
@@ -1471,7 +1571,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1471
1571
  FormsModule,
1472
1572
  ReactiveFormsModule,
1473
1573
  NgxUtilsModule,
1474
- FormlyModule.forChild()
1574
+ FormlyModule
1475
1575
  ],
1476
1576
  exports: [
1477
1577
  ...components,
@@ -1492,5 +1592,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1492
1592
  * Generated bundle index. Do not edit.
1493
1593
  */
1494
1594
 
1495
- export { AsyncSubmitDirective, DynamicFormArrayComponent, DynamicFormBuilderService, DynamicFormChipsComponent, DynamicFormComponent, DynamicFormFieldComponent, DynamicFormFieldsetComponent, DynamicFormGroupComponent, DynamicFormSchemaService, DynamicFormService, DynamicFormUploadComponent, EDITOR_FORMATS, FORM_ROOT_KEY, FormFile, FormGroup, FormInput, FormModel, FormSelect, FormSerializable, FormUpload, MAX_INPUT_NUM, MIN_INPUT_NUM, NgxDynamicFormModule, additionalFieldValues, customizeFormField, emailValidation, getFieldByPath, getFieldsByKey, getFieldsByPredicate, jsonValidation, maxLengthValidation, maxValueValidation, minLengthValidation, minValueValidation, phoneValidation, replaceSpecialChars, requiredValidation, setFieldDisabled, setFieldHidden, translationValidation, validationMessage };
1595
+ export { AsyncSubmitDirective, DynamicFieldType, DynamicFormArrayComponent, DynamicFormBuilderService, DynamicFormChipsComponent, DynamicFormComponent, DynamicFormFieldComponent, DynamicFormFieldsetComponent, DynamicFormGroupComponent, DynamicFormSchemaService, DynamicFormService, DynamicFormUploadComponent, EDITOR_FORMATS, FORM_ROOT_KEY, FormFile, FormGroup, FormInput, FormModel, FormSelect, FormSerializable, FormUpload, MAX_INPUT_NUM, MIN_INPUT_NUM, NgxDynamicFormModule, additionalFieldValues, customizeFormField, emailValidation, getFieldByPath, getFieldsByKey, getFieldsByPredicate, jsonValidation, maxLengthValidation, maxValueValidation, minLengthValidation, minValueValidation, phoneValidation, replaceSpecialChars, requiredValidation, setFieldDisabled, setFieldHidden, translationValidation, validationMessage };
1496
1596
  //# sourceMappingURL=stemy-ngx-dynamic-form.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"stemy-ngx-dynamic-form.mjs","sources":["../../src/ngx-dynamic-form/common-types.ts","../../src/ngx-dynamic-form/utils/customizer.ts","../../src/ngx-dynamic-form/utils/decorators.ts","../../src/ngx-dynamic-form/utils/validation.ts","../../src/ngx-dynamic-form/utils/misc.ts","../../src/ngx-dynamic-form/utils/internal.ts","../../src/ngx-dynamic-form/services/dynamic-form-builder.service.ts","../../src/ngx-dynamic-form/services/dynamic-form-schema.service.ts","../../src/ngx-dynamic-form/services/dynamic-form.service.ts","../../src/ngx-dynamic-form/directives/async-submit.directive.ts","../../src/ngx-dynamic-form/components/dynamic-form/dynamic-form.component.ts","../../src/ngx-dynamic-form/components/dynamic-form/dynamic-form.component.html","../../src/ngx-dynamic-form/components/dynamic-form-array/dynamic-form-array.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-array/dynamic-form-array.component.html","../../src/ngx-dynamic-form/components/dynamic-form-chips/dynamic-form-chips.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-chips/dynamic-form-chips.component.html","../../src/ngx-dynamic-form/components/dynamic-form-field/dynamic-form-field.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-field/dynamic-form-field.component.html","../../src/ngx-dynamic-form/components/dynamic-form-fieldset/dynamic-form-fieldset.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-fieldset/dynamic-form-fieldset.component.html","../../src/ngx-dynamic-form/components/dynamic-form-group/dynamic-form-group.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-group/dynamic-form-group.component.html","../../src/ngx-dynamic-form/components/dynamic-form-upload/dynamic-form-upload.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-upload/dynamic-form-upload.component.html","../../src/ngx-dynamic-form/ngx-dynamic-form.imports.ts","../../src/ngx-dynamic-form/ngx-dynamic-form.module.ts","../../src/stemy-ngx-dynamic-form.ts"],"sourcesContent":["import {Injector, OutputRef, Signal} from \"@angular/core\";\nimport {AbstractControl, FormControl, FormGroup} from \"@angular/forms\";\nimport {Observable} from \"rxjs\";\nimport {ConfigOption, FormlyFieldConfig, FormlyFieldProps} from \"@ngx-formly/core\";\nimport {FormlySelectOption} from \"@ngx-formly/core/select\";\nimport {\n IAsyncMessage,\n IOpenApiSchema,\n IOpenApiSchemaProperty,\n IRequestOptions,\n MaybeArray,\n MaybePromise\n} from \"@stemy/ngx-utils\";\n\n// --- Basic frm constants ---\nexport const FORM_ROOT_KEY = \"__root\";\n\n// --- Basic form types ---\n\nexport type DynamicFormState = \"VALID\" | \"INVALID\" | \"PENDING\" | \"DISABLED\" | \"LOADING\";\nexport type DynamicFormUpdateOn = \"change\" | \"blur\" | \"submit\";\nexport type UploadData = Record<string, any> | ArrayBuffer | FormData;\n\n// --- Basic form field interfaces ---\n\nexport type FormFieldKey = string | number | (string | number)[];\n\nexport type FormFieldLabelCustomizer = (key: string, label: string, parent: FormFieldConfig, labelPrefix: string) => string;\n\nexport interface FormBuilderOptions {\n labelPrefix?: string;\n labelCustomizer?: FormFieldLabelCustomizer;\n testId?: string;\n}\n\nexport interface FormFieldProps extends FormlyFieldProps {\n // --- Input props ---\n autocomplete?: string;\n suffix?: string;\n // --- Checkbox props ---\n formCheck?: string;\n indeterminate?: boolean;\n // --- Select props ---\n multiple?: boolean;\n allowEmpty?: boolean;\n groupBy?: string;\n // --- Array props ---\n useTabs?: boolean;\n tabsLabel?: string;\n addItem?: boolean;\n insertItem?: boolean;\n cloneItem?: boolean;\n moveItem?: boolean;\n removeItem?: boolean;\n clearItems?: boolean;\n // --- Upload props ---\n inline?: boolean;\n accept?: string | string[];\n url?: string;\n maxSize?: number;\n uploadOptions?: IRequestOptions;\n createUploadData?: (file: File) => UploadData | Promise<UploadData>;\n // --- Old upload props\n multi?: boolean;\n asFile?: boolean;\n uploadUrl?: string;\n}\n\nexport type FormFieldSerializer = (field: FormFieldConfig, injector: Injector) => MaybePromise<any>;\n\nexport declare type FormHookFn = (field: FormFieldConfig) => void;\n\nexport interface FormHookConfig {\n onInit?: FormHookFn | ((field: FormFieldConfig) => Observable<any>);\n onChanges?: FormHookFn;\n afterContentInit?: FormHookFn;\n afterViewInit?: FormHookFn;\n onDestroy?: FormHookFn;\n}\n\nexport type FormFieldExpression<T = any> = string | ((field: FormFieldConfig) => T) | Observable<T>;\nexport type FormFieldExpressions = {\n [property: string]: FormFieldExpression;\n} & {\n className?: FormFieldExpression<string>;\n hide?: FormFieldExpression<boolean>;\n \"props.disabled\"?: FormFieldExpression<boolean>;\n \"props.required\"?: FormFieldExpression<boolean>;\n};\n\nexport interface FormFieldConfig<T = FormFieldProps> extends FormlyFieldConfig<T> {\n serializer?: FormFieldSerializer;\n serialize?: boolean;\n fieldSet?: string;\n parent?: FormFieldConfig;\n fieldGroup?: FormFieldConfig[];\n fieldArray?: FormFieldConfig | ((field: FormFieldConfig) => FormFieldConfig);\n hooks: FormHookConfig;\n expressions: FormFieldExpressions;\n readonly additional?: Readonly<{[key: string]: any}>;\n readonly path?: string;\n readonly testId?: string;\n}\n\nexport interface FormFieldType<T = FormFieldProps> extends FormFieldConfig<T> {\n formControl: FormControl;\n props: NonNullable<T>;\n}\n\nexport interface FormFieldChangeEvent {\n field: FormFieldConfig;\n type: string;\n value: any;\n [meta: string]: any;\n}\n\nexport interface FormSerializeResult {\n [key: string]: any;\n}\n\nexport interface FormSelectOption extends FormlySelectOption {\n className?: string;\n classes?: string[] | string;\n id?: any;\n}\n\nexport type FormSelectOptions = FormSelectOption[] | Observable<FormSelectOption[]>;\n\nexport interface IDynamicForm {\n\n readonly fieldChanges: Observable<FormFieldChangeEvent>;\n readonly config: Signal<FormFieldConfig[]>;\n readonly group: Signal<FormGroup>;\n readonly status: Signal<DynamicFormState>;\n readonly onSubmit: OutputRef<IDynamicForm>;\n\n reset(): void;\n}\n\n// --- Validation types ---\n\ntype FormFieldValidatorFn<T> = ((control: AbstractControl, field?: FormlyFieldConfig) => T) & {\n validatorName?: string\n};\n\nexport type ValidationMessageFn = (error: any, field: FormFieldConfig) => string | Observable<string>;\n\ninterface FormFieldValidatorExpression<T> {\n expression: FormFieldValidatorFn<T>;\n message: ValidationMessageFn;\n}\n\ntype FormFieldValidation<T, R> = {\n validation?: (string | T)[];\n} & {\n [key: string]: FormFieldValidatorFn<R> | FormFieldValidatorExpression<R>;\n}\n\nexport type ValidatorFn = FormFieldValidatorFn<boolean>;\n\nexport type ValidatorExpression = FormFieldValidatorExpression<boolean>;\n\nexport type Validators = FormFieldValidation<ValidatorFn, boolean>;\n\nexport type AsyncBoolean = Promise<boolean> | Observable<boolean>;\n\nexport type AsyncValidatorFn = FormFieldValidatorFn<AsyncBoolean>;\n\nexport type AsyncValidatorExpression = FormFieldValidatorExpression<AsyncBoolean>;\n\nexport type AsyncValidators = FormFieldValidation<AsyncValidatorFn, AsyncBoolean>;\n\nexport interface AllValidationErrors {\n control: AbstractControl;\n path: string;\n errorKey: string;\n errorValue: any;\n}\n\n// --- Form field data types ---\n\nexport type FormFieldCustom = Pick<FormFieldConfig, \"wrappers\" | \"hooks\" | \"fieldGroup\" | \"fieldArray\">;\n\nexport type FormFieldData = Pick<FormFieldProps, \"label\" | \"readonly\" | \"hidden\" | \"disabled\">\n & {\n validators?: Validators | ValidatorFn[];\n serializer?: FormFieldSerializer;\n fieldSet?: string;\n classes?: string[] | string;\n};\n\nexport type FormInputData = FormFieldData\n & Pick<FormFieldProps, \"type\" | \"pattern\" | \"placeholder\" | \"step\" | \"min\" | \"max\" | \"minLength\" | \"maxLength\" | \"autocomplete\" | \"suffix\" | \"indeterminate\" | \"cols\" | \"rows\">;\n\nexport type FormSelectData = FormFieldData\n & Pick<FormFieldProps, \"multiple\" | \"type\" | \"allowEmpty\" | \"groupBy\"> & {\n options?: (field: FormFieldConfig) => FormSelectOptions | Promise<FormSelectOption[]>;\n};\n\nexport type FormUploadData = FormFieldData\n & Pick<FormFieldProps, \"inline\" | \"multiple\" | \"accept\" | \"url\" | \"maxSize\" | \"uploadOptions\" | \"createUploadData\" | \"multi\" | \"asFile\" | \"uploadUrl\">;\n\nexport type FormGroupData = FormFieldData;\n\nexport type FormArrayData = FormFieldData\n & Pick<FormFieldProps, \"useTabs\" | \"tabsLabel\" | \"addItem\" | \"insertItem\" | \"cloneItem\" | \"moveItem\" | \"removeItem\" | \"clearItems\">;\n\n// --- JSON schema interfaces ---\n\nexport type FormFieldCustomizer = (\n field: FormFieldConfig, options: FormBuilderOptions, injector: Injector,\n property: IOpenApiSchemaProperty, schema: IOpenApiSchema\n) => MaybePromise<MaybeArray<FormFieldConfig>>;\n\nexport interface ConfigForSchemaOptions extends FormBuilderOptions {\n fieldCustomizer?: FormFieldCustomizer;\n}\n\nexport type CustomizerOrSchemaOptions = FormFieldCustomizer | ConfigForSchemaOptions;\n\nexport declare type AsyncSubmitMethod = (form: IDynamicForm, context?: any) => Promise<IAsyncMessage>;\n\nexport interface IDynamicFormModuleConfig extends Pick<ConfigOption, \"types\" | \"wrappers\" | \"extras\"> {\n\n}\n","import {\n cachedFactory,\n CachedProvider,\n IOpenApiSchema,\n IOpenApiSchemaProperty,\n MaybeArray,\n MaybePromise\n} from \"@stemy/ngx-utils\";\n\nimport {FormBuilderOptions, FormFieldConfig, FormFieldCustomizer} from \"../common-types\";\n\nexport interface IFormFieldCustomizer {\n acceptField(\n field: FormFieldConfig,\n property: IOpenApiSchemaProperty,\n schema: IOpenApiSchema\n ): boolean;\n customizeField(\n field: FormFieldConfig,\n options: FormBuilderOptions,\n property: IOpenApiSchemaProperty,\n schema: IOpenApiSchema\n ): MaybePromise<MaybeArray<FormFieldConfig>>;\n}\n\nexport function customizeFormField(...providers: CachedProvider<IFormFieldCustomizer>[]): FormFieldCustomizer {\n const factory = cachedFactory(providers);\n return async (field, options, injector, property, schema) => {\n const customizers = factory(injector);\n const fields = [field];\n for (const customizer of customizers) {\n const index = fields.findIndex(m => customizer.acceptField(m, property, schema));\n if (index >= 0) {\n const custom = await customizer.customizeField(\n fields[index], options, property, schema\n );\n const result = Array.isArray(custom) ? custom : [custom];\n fields.splice(index, 1, ...result);\n }\n }\n return fields;\n }\n}\n","import {ObjectUtils, ReflectUtils} from \"@stemy/ngx-utils\";\nimport {\n FormArrayData,\n FormFieldSerializer,\n FormGroupData,\n FormInputData,\n FormSelectData,\n FormUploadData\n} from \"../common-types\";\nimport {FormFieldBuilder} from \"../services/dynamic-form-builder.service\";\nimport {Type} from \"@angular/core\";\n\nfunction defineFormControl(target: any, propertyKey: string, cb: FormFieldBuilder): void {\n const fields: Set<string> = ReflectUtils.getMetadata(\"dynamicFormFields\", target) || new Set();\n const existing: FormFieldBuilder = ReflectUtils.getMetadata(\"dynamicFormField\", target, propertyKey);\n const builder: FormFieldBuilder = !ObjectUtils.isFunction(existing) ? cb : ((fb, opts, path) => {\n const data = existing(fb, opts, path);\n return ObjectUtils.assign(data || {}, cb(fb, opts, path) || {});\n });\n fields.add(propertyKey);\n ReflectUtils.defineMetadata(\"dynamicFormField\", builder, target, propertyKey);\n ReflectUtils.defineMetadata(\"dynamicFormFields\", fields, target);\n}\n\nexport function FormSerializable(serializer?: FormFieldSerializer): PropertyDecorator {\n return (target: any, key: string): void => {\n defineFormControl(target, key, () => ({\n key,\n serializer,\n serialize: true\n }));\n };\n}\n\nexport function FormInput(data?: FormInputData): PropertyDecorator {\n data = data || {};\n return (target: any, key: string): void => {\n const meta = ReflectUtils.getOwnMetadata(\"design:type\", target, key);\n const type = meta ? meta.name : \"\";\n let inputType = key.indexOf(\"password\") < 0 ? \"text\" : \"password\";\n switch (type) {\n case \"Number\":\n inputType = \"number\";\n break;\n case \"Boolean\":\n inputType = \"checkbox\";\n break;\n }\n data.type = data.type || inputType;\n defineFormControl(\n target, key,\n (fb, path, options) =>\n fb.createFormInput(key, data, path, options)\n );\n };\n}\n\nexport function FormSelect(data?: FormSelectData): PropertyDecorator {\n data = data || {};\n return (target: any, key: string): void => {\n defineFormControl(\n target, key,\n (fb, path, options) =>\n fb.createFormSelect(key, data, path, options)\n );\n };\n}\n\nexport function FormUpload(data?: FormUploadData): PropertyDecorator {\n data = data || {};\n return (target: any, key: string): void => {\n defineFormControl(\n target, key,\n (fb, path, options) =>\n fb.createFormUpload(key, data, path, options)\n );\n };\n}\n\nexport function FormFile(data?: FormUploadData): PropertyDecorator {\n console.warn(`@FormFile decorator is deprecated, use @FormUpload instead`);\n return FormUpload(data);\n}\n\nexport function FormGroup(data?: FormGroupData): PropertyDecorator {\n data = data || {};\n return (target: any, key: string): void => {\n defineFormControl(\n target, key,\n (fb, path, options) => {\n const targetType = ReflectUtils.getOwnMetadata(\"design:type\", target, key);\n return fb.resolveFormGroup(key, targetType, data, path, options);\n }\n );\n };\n}\n\nexport function FormArray(itemType: string | FormInputData | Type<any>, data?: FormArrayData): PropertyDecorator {\n data = data || {};\n return (target: any, key: string): void => {\n defineFormControl(\n target, key,\n (fb, path, options) => {\n return fb.resolveFormArray(key, itemType, data, path, options);\n }\n );\n };\n}\n\nexport function FormModel(data?: FormGroupData): PropertyDecorator {\n console.warn(`@FormModel decorator is deprecated, use @FormGroup instead`);\n return FormGroup(data);\n}\n","import {Injector} from \"@angular/core\";\nimport {LANGUAGE_SERVICE, ObjectUtils} from \"@stemy/ngx-utils\";\nimport {ValidationMessageFn, ValidatorFn} from \"../common-types\";\n\nexport function validationMessage(injector: Injector, key: string, labelPrefix?: string): ValidationMessageFn {\n const language = injector.get(LANGUAGE_SERVICE);\n return (_, field) => {\n return language.getTranslationSync(labelPrefix ? `${labelPrefix}.error.${key}` : `error.${key}`, field);\n }\n}\n\nexport function withName(fn: ValidatorFn, name: string): ValidatorFn {\n fn.validatorName = name;\n return fn;\n}\n\nfunction validateEach(each: boolean, cb: (value: any) => boolean, name: string): ValidatorFn {\n return withName((control) => {\n const value = control.value;\n return each ? Array.isArray(value) && value.every(cb) : cb(value);\n }, name);\n}\n\nexport function jsonValidation(): ValidatorFn {\n return withName((control) => {\n const value = control.value;\n if (!value) return false;\n try {\n JSON.parse(value);\n return true;\n } catch (e) {\n return false;\n }\n }, \"json\");\n}\n\nexport function requiredValidation(): ValidatorFn {\n return withName((control) =>\n ObjectUtils.isString(control.value) ? control.value.length > 0 : ObjectUtils.isDefined(control.value),\n \"required\"\n )\n}\n\nexport function translationValidation(langs: string[] = [\"de\", \"en\"]): ValidatorFn {\n return withName((control) => {\n const value: any[] = control.value;\n if (!value || value.length == 0) return false;\n return value.findIndex(t => langs.includes(t.lang) && !t.translation) < 0;\n }, \"translation\");\n}\n\nexport function phoneValidation(): ValidatorFn {\n return withName((control) => {\n const value = control.value;\n if (!value) return true;\n const phoneRegexp = /^\\d{10,12}$/;\n return phoneRegexp.test(value);\n }, \"phone\");\n}\n\nexport function emailValidation(): ValidatorFn {\n return withName((control) => {\n const value = control.value;\n if (!value) return true;\n const emailRegexp = /^[\\w-.]+@([\\w-]+\\.)+[\\w-]{2,4}$/g;\n return emailRegexp.test(value);\n }, \"email\");\n}\n\nexport function minLengthValidation(minLength: number, each?: boolean): ValidatorFn {\n return validateEach(each, v => typeof v == \"string\" && v.length >= minLength, \"minLength\");\n}\n\nexport function maxLengthValidation(maxLength: number, each?: boolean): ValidatorFn {\n return validateEach(each, v => typeof v == \"string\" && v.length <= maxLength, \"maxLength\");\n}\n\nexport function minValueValidation(min: number, each?: boolean): ValidatorFn {\n return validateEach(each, v => typeof v == \"number\" && v >= min, \"minValue\");\n}\n\nexport function maxValueValidation(max: number, each?: boolean): ValidatorFn {\n return validateEach(each, v => typeof v == \"number\" && v <= max, \"maxValue\");\n}\n","import {BehaviorSubject, Subject} from \"rxjs\";\nimport {ObjectUtils} from \"@stemy/ngx-utils\";\nimport {FormFieldKey, FormFieldConfig} from \"../common-types\";\n\nexport function replaceSpecialChars(str: string, to: string = \"-\"): string {\n return `${str}`.replace(/[&\\/\\\\#, +()$~%.@'\":*?<>{}]/g, to);\n}\n\nexport function getFieldByPath(field: FormFieldConfig, path: string): FormFieldConfig | null {\n if (field.path === path) {\n return field;\n }\n if (!field.fieldGroup) return null;\n for (const sf of field.fieldGroup) {\n const found = getFieldByPath(sf, path);\n if (found) return found;\n }\n return null;\n}\n\nexport function getFieldsByPredicate(field: FormFieldConfig, cb: (field: FormFieldConfig) => boolean): FormFieldConfig[] {\n if (cb(field)) {\n return [field];\n }\n if (!field.fieldGroup) return [];\n const results: FormFieldConfig[] = [];\n for (const sf of field.fieldGroup) {\n results.push(...getFieldsByPredicate(sf, cb));\n }\n return results;\n}\n\nexport function getFieldsByKey(field: FormFieldConfig, key: FormFieldKey): FormFieldConfig[] {\n return getFieldsByPredicate(field, f => f.key === key);\n}\n\nexport function setFieldHidden(field: FormFieldConfig, hidden: boolean = true): void {\n const hide = field.expressions?.hide;\n if (hide) {\n if (hide instanceof Subject) {\n hide.next(hidden);\n return;\n }\n field.expressions.hide = new BehaviorSubject(hidden);\n return;\n }\n field.hide = hidden;\n}\n\nexport function setFieldDisabled(field: FormFieldConfig, disabled: boolean = true): void {\n field.props = {\n ...(field.props || {}),\n disabled\n };\n}\n\nexport function additionalFieldValues(field: FormFieldConfig, values: {[key: string]: any}): void {\n const additional = field.expressions?.additional;\n if (additional instanceof BehaviorSubject) {\n additional.next(ObjectUtils.assign(additional.value, values || {}));\n return;\n }\n field.expressions.additional = new BehaviorSubject(values || {});\n}\n\nexport const MIN_INPUT_NUM = -999999999;\n\nexport const MAX_INPUT_NUM = 999999999;\n\nexport const EDITOR_FORMATS = [\"php\", \"json\", \"html\", \"css\", \"scss\"];\n","import {Injector} from \"@angular/core\";\r\nimport {IOpenApiSchema, IOpenApiSchemaProperty, MaybeArray, ObjectUtils, ForbiddenZone} from \"@stemy/ngx-utils\";\r\nimport {\r\n AllValidationErrors,\r\n ConfigForSchemaOptions,\r\n CustomizerOrSchemaOptions,\r\n FormBuilderOptions,\r\n FormFieldConfig,\r\n FormFieldCustomizer\r\n} from \"../common-types\";\r\nimport {AbstractControl, FormArray, FormGroup} from \"@angular/forms\";\r\n\r\nexport type ConfigForSchemaWrapMode = \"wrap\" | \"customizer\";\r\n\r\nexport interface ConfigForSchemaWrapOptions extends Required<FormBuilderOptions> {\r\n readonly injector: Injector;\r\n readonly schema: IOpenApiSchema;\r\n customize(field: FormFieldConfig, property: IOpenApiSchemaProperty, schema: IOpenApiSchema): Promise<FormFieldConfig[]>;\r\n}\r\n\r\nclass ConfigForSchemaWrap implements ConfigForSchemaWrapOptions {\r\n\r\n get labelPrefix() {\r\n return this.opts.labelPrefix;\r\n }\r\n\r\n get labelCustomizer() {\r\n return this.opts.labelCustomizer;\r\n }\r\n\r\n get testId() {\r\n return this.opts.testId;\r\n }\r\n\r\n protected fieldCustomizer: FormFieldCustomizer;\r\n\r\n constructor(\r\n protected readonly opts: ConfigForSchemaOptions,\r\n protected readonly mode: ConfigForSchemaWrapMode,\r\n readonly injector: Injector,\r\n readonly schema: IOpenApiSchema\r\n ) {\r\n this.fieldCustomizer = this.mode !== \"wrap\" || !ObjectUtils.isFunction(this.opts.fieldCustomizer)\r\n ? field => field\r\n : this.opts.fieldCustomizer;\r\n }\r\n\r\n async customize(field: FormFieldConfig, property: IOpenApiSchemaProperty, schema: IOpenApiSchema) {\r\n field.defaultValue = `${field.props?.type}`.startsWith(\"date\")\r\n ? convertToDate(property.default) : property.default;\r\n const res = await ForbiddenZone.run(\"customizer\", () =>\r\n this.fieldCustomizer(\r\n field, this.forCustomizer(), this.injector,\r\n property, schema\r\n )\r\n );\r\n return !res ? [field] : handleConfigs(res);\r\n }\r\n\r\n forCustomizer(): FormBuilderOptions {\r\n return new ConfigForSchemaWrap(this.opts, \"customizer\", this.injector, this.schema);\r\n }\r\n\r\n forSchema(schema: IOpenApiSchema): ConfigForSchemaWrapOptions {\r\n return new ConfigForSchemaWrap(this.opts, this.mode, this.injector, schema);\r\n }\r\n}\r\n\r\nexport async function toWrapOptions(customizeOrOptions: CustomizerOrSchemaOptions | ConfigForSchemaWrapOptions,\r\n injector: Injector,\r\n schema: IOpenApiSchema,\r\n errorMsg?: string): Promise<ConfigForSchemaWrapOptions> {\r\n if (errorMsg && ForbiddenZone.isForbidden(\"customizer\")) {\r\n throw new Error(errorMsg);\r\n }\r\n if (customizeOrOptions instanceof ConfigForSchemaWrap) {\r\n return customizeOrOptions;\r\n }\r\n let schemaOptions = customizeOrOptions as ConfigForSchemaOptions;\r\n if (!ObjectUtils.isObject(schemaOptions)) {\r\n schemaOptions = {\r\n fieldCustomizer: customizeOrOptions as FormFieldCustomizer\r\n };\r\n }\r\n return new ConfigForSchemaWrap(schemaOptions, \"wrap\", injector, schema);\r\n}\r\n\r\nexport function convertToDate(value: any): any {\r\n if (ObjectUtils.isNullOrUndefined(value)) return null;\r\n const date = ObjectUtils.isDate(value)\r\n ? value\r\n : new Date(value);\r\n return isNaN(date as any) ? new Date() : date;\r\n}\r\n\r\nexport function handleConfigs(configs: MaybeArray<FormFieldConfig>) {\r\n return Array.isArray(configs) ? configs : [configs];\r\n}\r\n\r\nexport function isStringWithVal(val: any): boolean {\r\n return typeof val == \"string\" && val.length > 0;\r\n}\r\n\r\nexport function findRefs(property: IOpenApiSchemaProperty): string[] {\r\n const refs = Array.isArray(property.allOf)\r\n ? property.allOf.map(o => o.$ref).filter(isStringWithVal)\r\n : [property.items?.$ref, property.$ref].filter(isStringWithVal);\r\n return refs.map(t => t.split(\"/\").pop());\r\n}\r\n\r\nexport function mergeFormFields(formFields: FormFieldConfig[][]): FormFieldConfig[] {\r\n const res: FormFieldConfig[] = [];\r\n for (const formModel of formFields) {\r\n for (const subModel of formModel) {\r\n const index = res.findIndex(t => t.key == subModel.key);\r\n if (index >= 0) {\r\n res[index] = subModel;\r\n continue;\r\n }\r\n res.push(subModel);\r\n }\r\n }\r\n return res;\r\n}\r\n\r\ninterface FormGroupControls {\r\n [key: string]: AbstractControl;\r\n}\r\n\r\nexport function getFormValidationErrors(controls: FormGroupControls, parentPath: string = \"\"): AllValidationErrors[] {\r\n const errors: AllValidationErrors[] = [];\r\n Object.entries(controls).forEach(([name, control], ix) => {\r\n const path = !parentPath ? name : `${parentPath}.${name}`;\r\n if (control instanceof FormGroup) {\r\n getFormValidationErrors(control.controls, path).forEach(error => errors.push(error));\r\n return;\r\n }\r\n if (control instanceof FormArray) {\r\n control.controls.forEach((control: FormGroup, ix) => {\r\n getFormValidationErrors(control.controls, `${path}.${ix}`).forEach(error => errors.push(error));\r\n });\r\n return;\r\n }\r\n Object.entries(control.errors || {}).forEach(([errorKey, errorValue]) => {\r\n errors.push({control, path, errorKey, errorValue});\r\n });\r\n });\r\n return errors;\r\n}\r\n","import {Inject, Injectable, Injector, Type} from \"@angular/core\";\nimport {BehaviorSubject, distinctUntilChanged, startWith, switchMap} from \"rxjs\";\nimport {\n API_SERVICE,\n IApiService,\n ILanguageService,\n LANGUAGE_SERVICE,\n MaybePromise,\n ObjectUtils,\n ReflectUtils\n} from \"@stemy/ngx-utils\";\n\nimport {\n FormArrayData,\n FormBuilderOptions,\n FormFieldConfig,\n FormFieldData,\n FormFieldExpressions,\n FormFieldProps,\n FormGroupData,\n FormHookConfig,\n FormInputData,\n FormSelectData,\n FormSelectOption,\n FormUploadData,\n Validators\n} from \"../common-types\";\nimport {validationMessage} from \"../utils/validation\";\nimport {MAX_INPUT_NUM, MIN_INPUT_NUM} from \"../utils/misc\";\nimport {isStringWithVal} from \"../utils/internal\";\n\nexport type FormFieldBuilder = (fb: DynamicFormBuilderService, parent: FormFieldConfig, options: FormBuilderOptions) => Partial<FormFieldConfig>;\n\n@Injectable()\nexport class DynamicFormBuilderService {\n\n constructor(readonly injector: Injector,\n @Inject(API_SERVICE) readonly api: IApiService,\n @Inject(LANGUAGE_SERVICE) readonly language: ILanguageService) {\n }\n\n resolveFormFields(target: Type<any>, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig[] {\n const prototype = target?.prototype || {};\n const fields: Set<string> = ReflectUtils.getMetadata(\"dynamicFormFields\", target?.prototype || {}) || new Set();\n const result: FormFieldConfig[] = [];\n for (const key of fields) {\n const builder: FormFieldBuilder = ReflectUtils.getMetadata(\"dynamicFormField\", prototype, key);\n const field = builder(this, parent, options) as FormFieldConfig;\n if (field) {\n result.push(field);\n }\n }\n return this.createFieldSets(result, parent, options);\n }\n\n resolveFormGroup(key: string, target: Type<any>, data: FormGroupData, parent: FormFieldConfig = null, options: FormBuilderOptions = {}): FormFieldConfig {\n return this.createFormGroup(key, sp => this.resolveFormFields(\n target, sp, options\n ), data, parent, options);\n }\n\n resolveFormArray(key: string, itemType: string | FormInputData | Type<any>, data: FormArrayData, parent: FormFieldConfig = null, options: FormBuilderOptions = {}): FormFieldConfig {\n return this.createFormArray(key, sp => {\n return typeof itemType === \"function\" ? this.resolveFormFields(\n itemType, sp, options\n ) : this.createFormInput(\"\", typeof itemType === \"string\" ? {type: `${itemType}`} : itemType, null, options);\n }, data, parent, options);\n }\n\n createFieldSets(fields: FormFieldConfig[], parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig[] {\n const others: FormFieldConfig[] = [];\n const groups: { [fs: string]: FormFieldConfig[] } = {};\n fields = fields.filter(f => {\n if (Array.isArray(f.fieldGroup) && Array.isArray(f.wrappers) && f.wrappers[0] === \"form-fieldset\") {\n // This field is an already existing set\n groups[f.id] = f.fieldGroup;\n return false;\n }\n return true;\n });\n\n for (const field of fields) {\n const fsName = field.hide ? null : String(field.fieldSet || \"\");\n // If we have a fieldset name defined and have actual fields for it\n // then push the property fields into a group\n if (fsName) {\n const fsId = !parent?.path ? fsName : `${parent.path}.${fsName}`;\n const group = groups[fsId] || [];\n groups[fsId] = group;\n group.push(field);\n continue;\n }\n // Otherwise just push the fields to the others\n others.push(field);\n }\n\n // Create a field-set wrapper for each group and concat the other fields to the end\n return Object.keys(groups).map(id => {\n const key = id.split(\".\").pop();\n const fieldSet: FormFieldConfig = {\n id,\n parent,\n fieldGroup: groups[id],\n wrappers: [\"form-fieldset\"],\n className: `dynamic-form-fieldset dynamic-form-fieldset-${id}`,\n props: {\n label: this.getLabel(key, key, parent, options),\n hidden: false\n },\n hooks: {},\n expressions: {}\n };\n this.setExpressions(fieldSet, options);\n return fieldSet;\n }).concat(others);\n }\n\n createFormInput(key: string, data: FormInputData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig {\n data = data || {};\n const type = `${data.type || \"text\"}`;\n const autocomplete = data.autocomplete || (type === \"password\" ? \"new-password\" : \"none\");\n return this.createFormField(key, type === \"checkbox\" || type === \"textarea\" ? type : \"input\", data, {\n type,\n autocomplete,\n pattern: ObjectUtils.isString(data.pattern) ? data.pattern : \"\",\n step: data.step,\n cols: data.cols || null,\n rows: data.rows || 10,\n min: isNaN(data.min) ? MIN_INPUT_NUM : data.min,\n max: isNaN(data.max) ? MAX_INPUT_NUM : data.max,\n minLength: isNaN(data.minLength) ? 0 : data.minLength,\n maxLength: isNaN(data.maxLength) ? MAX_INPUT_NUM : data.maxLength,\n placeholder: data.placeholder || \"\",\n indeterminate: data.indeterminate || false,\n suffix: data.suffix || \"\",\n attributes: {\n autocomplete\n },\n }, parent, options);\n }\n\n createFormSelect(key: string, data: FormSelectData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig {\n data = data || {};\n const type = `${data.type || \"select\"}`;\n const select = this.createFormField(key, type === \"radio\" ? type : \"select\", data, {\n type,\n multiple: data.multiple,\n groupBy: data.groupBy,\n allowEmpty: data.allowEmpty\n }, parent, options);\n select.hooks = Object.assign(select.hooks, {\n onInit: field => {\n const options = data.options?.(field) || [];\n const control = field.formControl.root;\n field.props.options = options instanceof Promise ? control.valueChanges.pipe(\n startWith(control.value),\n distinctUntilChanged(),\n switchMap(async () => {\n const results: FormSelectOption[] = await data.options(field) as any;\n return this.fixSelectOptions(field, results);\n })\n ) : options;\n }\n } as FormHookConfig);\n return select;\n }\n\n createFormUpload(key: string, data: FormUploadData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig {\n data = data || {};\n\n if (data.asFile) {\n data.inline = true;\n console.warn(`File upload property \"asFile\" is deprecated. Use \"inline\" instead.`);\n }\n\n if (data.multi) {\n data.multiple = true;\n console.warn(`File upload property \"multi\" is deprecated. Use \"multiple\" instead.`);\n }\n\n return this.createFormField(key, \"upload\", data, {\n inline: data.inline === true,\n multiple: data.multiple === true,\n accept: data.accept || [\".png\", \".jpg\"],\n url: data.url?.startsWith(\"http\") ? data.url : this.api.url(data.url || \"assets\"),\n maxSize: isNaN(data.maxSize) ? MAX_INPUT_NUM : data.maxSize,\n uploadOptions: data.uploadOptions || {},\n createUploadData: data.createUploadData\n }, parent, options);\n }\n\n createFormGroup(key: string, fields: (parent: FormFieldConfig) => FormFieldConfig[], data: FormGroupData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig\n createFormGroup(key: string, fields: (parent: FormFieldConfig) => Promise<FormFieldConfig[]>, data: FormGroupData, parent: FormFieldConfig, options: FormBuilderOptions): Promise<FormFieldConfig>\n createFormGroup(key: string, fields: (parent: FormFieldConfig) => any, data: FormGroupData, parent: FormFieldConfig, options: FormBuilderOptions): MaybePromise<FormFieldConfig> {\n data = data || {};\n const group = this.createFormField(key, undefined, data, {}, parent, options);\n group.wrappers = [\"form-group\"];\n const result = fields(group);\n const handleGroup = (fieldGroup: FormFieldConfig[]) => {\n group.fieldGroup = fieldGroup;\n return group;\n };\n return result instanceof Promise\n ? result.then(handleGroup)\n : handleGroup(result);\n }\n\n createFormArray(key: string, fields: (parent: FormFieldConfig) => FormFieldConfig | FormFieldConfig[], data: FormArrayData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig\n createFormArray(key: string, fields: (parent: FormFieldConfig) => Promise<FormFieldConfig | FormFieldConfig[]>, data: FormArrayData, parent: FormFieldConfig, options: FormBuilderOptions): Promise<FormFieldConfig>\n createFormArray(key: string, fields: (parent: FormFieldConfig) => any, data: FormArrayData, parent: FormFieldConfig, options: FormBuilderOptions): MaybePromise<FormFieldConfig> {\n data = data || {};\n const array = this.createFormField(key, \"array\", data, {\n // initialCount: data.initialCount || 0,\n // sortable: data.sortable || false,\n useTabs: data.useTabs === true,\n tabsLabel: `${data.tabsLabel || \"label\"}`,\n addItem: data.addItem !== false,\n insertItem: data.insertItem !== false,\n cloneItem: data.cloneItem !== false,\n moveItem: data.moveItem !== false,\n removeItem: data.removeItem !== false,\n clearItems: data.clearItems !== false\n }, parent, options);\n const result = fields(array);\n const handleItems = (items: FormFieldConfig | FormFieldConfig[]) => {\n if (Array.isArray(items)) {\n array.fieldArray = {\n wrappers: [\"form-group\"],\n fieldGroup: items,\n hooks: {},\n expressions: {}\n };\n return array;\n }\n const props = items.props || {};\n if (props.type === \"text\" || props.type === \"number\") {\n array.type = \"chips\";\n array.wrappers = [\"form-field\"];\n array.props = {\n ...props,\n ...array.props,\n multiple: true\n };\n return array;\n }\n array.fieldArray = {\n ...items,\n props: {\n ...items.props,\n label: \"\"\n }\n };\n return array;\n };\n return result instanceof Promise\n ? result.then(handleItems)\n : handleItems(result);\n }\n\n async fixSelectOptions(field: FormFieldConfig, options: FormSelectOption[]): Promise<FormSelectOption[]> {\n if (!options) return [];\n for (const option of options) {\n const classes = Array.isArray(option.classes) ? option.classes : [`${option.classes}`];\n option.className = classes.filter(isStringWithVal).join(\" \");\n option.label = await this.language.getTranslation(option.label);\n option.value = option.value ?? option.id;\n option.id = option.id ?? option.value;\n }\n const control = field.formControl;\n if (field.props.multiple || options.length === 0 || options.findIndex(o => o.value === control.value) >= 0) return options;\n control.setValue(options[0].value);\n return options;\n }\n\n protected getLabel(key: string, label: string, parent: FormFieldConfig, options: FormBuilderOptions): string {\n const labelPrefix = !ObjectUtils.isString(options.labelPrefix) ? `` : options.labelPrefix;\n const pathPrefix = `${parent?.props?.label || labelPrefix}`;\n const labelItems = ObjectUtils.isString(label)\n ? (!label ? [] : [labelPrefix, label])\n : [pathPrefix, `${key || \"\"}`]\n return labelItems.filter(l => l.length > 0).join(\".\");\n }\n\n protected createFormField(key: string, type: string, data: FormFieldData, props: FormFieldProps, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig {\n const validators = Array.isArray(data.validators)\n ? data.validators.reduce((res, validator, ix) => {\n res[validator.validatorName || `validator_${ix}`] = validator;\n return res;\n }, {} as Validators)\n : data.validators || {};\n const hide = new BehaviorSubject(data.hidden === true);\n const additional = new BehaviorSubject({});\n const field: FormFieldConfig = {\n key,\n type,\n validators,\n parent,\n fieldSet: String(data.fieldSet || \"\"),\n resetOnHide: false,\n validation: {\n messages: Object.keys(validators).reduce((res, key) => {\n res[key] = validationMessage(this.injector, key, options.labelPrefix);\n return res;\n }, {})\n },\n props: {\n ...props,\n disabled: data.disabled === true,\n formCheck: \"nolabel\",\n required: !!validators.required,\n label: options.labelCustomizer?.(key, data.label, parent, options.labelPrefix)\n ?? this.getLabel(key, data.label, parent, options),\n },\n modelOptions: {\n updateOn: \"change\"\n },\n fieldGroupClassName: \"field-container\",\n hooks: {},\n expressions: {\n hide,\n additional,\n className: (target: FormFieldConfig) => {\n return target.hide ? `` : [`dynamic-form-field`, `dynamic-form-field-${target.key}`, `dynamic-form-${target.type || \"group\"}`].concat(\n Array.isArray(data.classes) ? data.classes : [data.classes || \"\"]\n ).filter(c => c?.length > 0).join(\" \");\n }\n }\n };\n this.setExpressions(field, options);\n return field;\n }\n\n protected setExpressions(field: FormFieldConfig, options: FormBuilderOptions): void {\n const expressions: FormFieldExpressions = {\n path: target => {\n const tp = target.parent;\n const key = !target.key ? `` : `.${target.key}`;\n return !tp?.path ? `${target.key || \"\"}` : `${tp.path}.${key}`;\n },\n testId: target => {\n const tp = target.parent;\n const prefix = !options.testId ? `` : `${options.testId}-`;\n const key = !target.key ? `` : `-${target.key}`;\n return !tp?.testId ? `${prefix}${target.key || key}` : `${tp.testId}${key}`;\n }\n };\n Object.entries(expressions).forEach(([key, expression]) => {\n field.expressions = field.expressions ?? {};\n field.expressions[key] = expression;\n if (ObjectUtils.isFunction(expression)) {\n field[key] = expression(field);\n }\n });\n }\n}\n","import {Injectable, Injector} from \"@angular/core\";\nimport {AbstractControl, FormArray, FormGroup} from \"@angular/forms\";\nimport {distinctUntilChanged, firstValueFrom, from, isObservable, startWith, switchMap} from \"rxjs\";\nimport {\n IApiService,\n ILanguageService, IOpenApiSchema,\n IOpenApiSchemaProperty,\n ObjectUtils,\n OpenApiService,\n StringUtils\n} from \"@stemy/ngx-utils\";\n\nimport {\n CustomizerOrSchemaOptions,\n FormFieldConfig,\n FormFieldData,\n FormSelectOption,\n FormSelectOptions,\n Validators\n} from \"../common-types\";\n\nimport {\n emailValidation,\n maxLengthValidation,\n maxValueValidation,\n minLengthValidation,\n minValueValidation,\n requiredValidation\n} from \"../utils/validation\";\nimport {\n ConfigForSchemaWrapOptions,\n convertToDate,\n findRefs,\n isStringWithVal,\n mergeFormFields,\n toWrapOptions\n} from \"../utils/internal\";\n\nimport {DynamicFormBuilderService} from \"./dynamic-form-builder.service\";\n\n@Injectable()\nexport class DynamicFormSchemaService {\n\n get api(): IApiService {\n return this.openApi.api;\n }\n\n get language(): ILanguageService {\n return this.api.language;\n }\n\n constructor(protected readonly openApi: OpenApiService,\n protected readonly injector: Injector,\n protected readonly builder: DynamicFormBuilderService) {\n }\n\n async getSchema(name: string): Promise<IOpenApiSchema> {\n return this.openApi.getSchema(name);\n }\n\n async getFormFieldsForSchema(name: string,\n parent: FormFieldConfig,\n customizeOrOptions: CustomizerOrSchemaOptions): Promise<FormFieldConfig[]> {\n const schema = await this.getSchema(name);\n if (!schema) return [];\n const options = await toWrapOptions(customizeOrOptions, this.injector, schema);\n const keys = Object.keys(schema.properties || {});\n const fields: FormFieldConfig[] = [];\n // Collect all properties of this schema def\n for (const key of keys) {\n const property = schema.properties[key];\n const propFields = await this.getFormFieldsForProp(property, schema, options, parent);\n fields.push(...propFields);\n }\n return this.builder.createFieldSets(\n fields.filter(f => null !== f),\n parent, options\n );\n }\n\n protected async getFormFieldsForProp(property: IOpenApiSchemaProperty, schema: IOpenApiSchema, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormFieldConfig[]> {\n const field = await this.getFormFieldForProp(property, options, parent);\n return !field ? [] : options.customize(field, property, schema);\n }\n\n protected async getFormFieldForProp(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormFieldConfig> {\n const $enum = property.items?.enum || property.enum;\n if (Array.isArray($enum) || isStringWithVal(property.optionsPath) || isStringWithVal(property.endpoint)) {\n return this.getFormSelectConfig(property, options, parent);\n }\n switch (property.type) {\n case \"string\":\n case \"number\":\n case \"integer\":\n case \"textarea\":\n // if (this.checkIsEditorProperty(property)) {\n // return this.getFormEditorConfig(property, options, parent);\n // }\n if (property.format == \"textarea\") {\n return this.getFormTextareaConfig(property, options, parent);\n }\n if (property.format == \"date\" || property.format == \"date-time\") {\n return this.getFormDatepickerConfig(property, options, parent);\n }\n return this.getFormInputConfig(property, options, parent);\n // case \"object\":\n // return this.getFormEditorConfig(property, options, parent);\n case \"boolean\":\n return this.getFormCheckboxConfig(property, options, parent);\n case \"array\":\n return this.getFormArrayConfig(property, options, parent);\n case \"file\":\n case \"upload\":\n return this.getFormUploadConfig(property, options, parent);\n }\n if (findRefs(property).length > 0) {\n return this.getFormGroupConfig(property, options, parent);\n }\n return null;\n }\n\n protected getFormFieldData(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions): FormFieldData {\n const validators: Validators = {};\n const schema = options.schema;\n if (ObjectUtils.isArray(schema.required) && schema.required.indexOf(property.id) >= 0) {\n validators.required = requiredValidation();\n }\n this.addPropertyValidators(validators, property);\n this.addItemsValidators(validators, property.items);\n return {\n hidden: property.hidden === true,\n fieldSet: property.fieldSet,\n classes: property.classes,\n validators\n };\n }\n\n protected async getFormArrayConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormFieldConfig> {\n return this.builder.createFormArray(property.id, async sp => {\n const subSchemas = findRefs(property);\n if (subSchemas.length > 0) {\n const subModels = await Promise.all(\n subSchemas.map(s => this.getFormFieldsForSchema(s, sp, options))\n );\n return mergeFormFields(ObjectUtils.copy(subModels));\n }\n return this.getFormFieldForProp(property.items, options, null);\n }, {\n ...this.getFormFieldData(property, options),\n // initialCount: property.initialCount || 0,\n // sortable: property.sortable || false,\n useTabs: property.useTabs,\n tabsLabel: property.tabsLabel,\n addItem: property.addItem,\n insertItem: property.insertItem,\n cloneItem: property.cloneItem,\n moveItem: property.moveItem,\n removeItem: property.removeItem,\n clearItems: property.clearItems\n }, parent, options);\n }\n\n protected async getFormGroupConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormFieldConfig> {\n return this.builder.createFormGroup(property.id, async sp => {\n const subSchemas = findRefs(property);\n const subModels = await Promise.all(\n subSchemas.map(s => this.getFormFieldsForSchema(s, sp, options))\n );\n return mergeFormFields(subModels);\n }, {\n ...this.getFormFieldData(property, options),\n }, parent, options);\n }\n\n protected getFormInputConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n let type = StringUtils.has(property.id || \"\", \"password\", \"Password\") ? \"password\" : (property.format || property.type);\n switch (type) {\n case \"string\":\n type = \"text\";\n break;\n case \"boolean\":\n type = \"checkbox\";\n break;\n case \"textarea\":\n type = \"textarea\";\n break;\n case \"integer\":\n type = \"number\";\n break;\n }\n const sub = property.type == \"array\" ? property.items || property : property;\n return this.builder.createFormInput(property.id, {\n ...this.getFormFieldData(property, options),\n type,\n autocomplete: property.autocomplete,\n pattern: property.pattern,\n step: isNaN(sub.step) ? property.step : sub.step,\n min: sub.minimum,\n max: sub.maximum,\n minLength: sub.minLength,\n maxLength: sub.maxLength,\n placeholder: property.placeholder,\n indeterminate: property.indeterminate,\n suffix: property.suffix\n }, parent, options);\n }\n\n protected getFormTextareaConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n return this.builder.createFormInput(property.id, {\n ...this.getFormFieldData(property, options),\n type: \"textarea\",\n autocomplete: property.autoComplete,\n cols: property.cols || null,\n rows: property.rows || 10,\n minLength: property.minLength,\n maxLength: property.maxLength,\n placeholder: property.placeholder || \"\"\n }, parent, options);\n }\n\n // getFormEditorConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrap): DynamicEditorModelConfig {\n // const sub = property.type == \"array\" ? property.items || property : property;\n // return Object.assign(\n // this.getFormControlConfig(property, options),\n // {\n // inputType: property.format || \"json\",\n // convertObject: property.type !== \"string\",\n // autoComplete: property.autoComplete || \"off\",\n // multiple: property.type == \"array\",\n // accept: ObjectUtils.isString(property.accept) ? property.accept : null,\n // mask: ObjectUtils.isString(property.mask) ? property.mask : null,\n // pattern: ObjectUtils.isString(property.pattern) ? property.pattern : null,\n // step: isNaN(sub.step) ? (isNaN(property.step) ? 1 : property.step) : sub.step,\n // minLength: isNaN(sub.minLength) ? 0 : sub.minLength,\n // maxLength: isNaN(sub.maxLength) ? MAX_INPUT_NUM : sub.maxLength,\n // placeholder: property.placeholder || \"\"\n // }\n // );\n // }\n\n protected getFormDatepickerConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n return this.builder.createFormInput(property.id, {\n ...this.getFormFieldData(property, options),\n type: property.format == \"date-time\" ? \"datetime-local\" : \"date\",\n // format: property.dateFormat || \"dd.MM.yyyy\",\n min: convertToDate(property.min),\n max: convertToDate(property.max),\n }, parent, options);\n }\n\n protected getFormSelectConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n return this.builder.createFormSelect(property.id, {\n ...this.getFormFieldData(property, options),\n options: field => this.getFormSelectOptions(property, options, field),\n type: property.format || \"select\",\n multiple: property.type == \"array\",\n groupBy: property.groupBy,\n allowEmpty: property.allowEmpty\n }, parent, options);\n }\n\n protected getFormUploadConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n return this.builder.createFormUpload(property.id, {\n ...this.getFormFieldData(property, options),\n multiple: property.type === \"array\",\n inline: property.inline,\n accept: property.accept,\n url: property.url,\n maxSize: property.maxSize,\n uploadOptions: property.uploadOptions\n }, parent, options);\n }\n\n protected getFormCheckboxConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n return this.builder.createFormInput(property.id, {\n ...this.getFormFieldData(property, options),\n type: \"checkbox\",\n indeterminate: property.indeterminate || false\n }, parent, options);\n }\n\n protected getFormSelectOptions(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, field: FormFieldConfig): FormSelectOptions {\n const $enum = property.items?.enum || property.enum;\n if (Array.isArray($enum)) {\n return from(this.builder.fixSelectOptions(field, $enum.map(value => {\n const label = options.labelPrefix\n ? this.language.getTranslationSync(`${options.labelPrefix}.${property.id}.${value}`)\n : `${property.id}.${value}`;\n return {value, label};\n })));\n }\n if (isStringWithVal(property.endpoint)) {\n const entries = Object.entries((field.formControl.root as FormGroup)?.controls || {});\n const endpoint = entries.reduce((res, [key, control]) => {\n return this.replaceOptionsEndpoint(res, key, control?.value);\n }, `${property.endpoint}`);\n this.api.cache[endpoint] = this.api.cache[endpoint] || this.api.list(endpoint, this.api.makeListParams(1, -1)).then(result => {\n const items = ObjectUtils.isArray(result)\n ? result\n : (ObjectUtils.isArray(result.items) ? result.items : []);\n return items.map(i => {\n const item = ObjectUtils.isObject(i) ? i : {id: i};\n return {\n ...item,\n value: item.id || item._id,\n label: item[property.labelField] || item.label || item.id || item._id\n };\n });\n });\n const options = this.api.cache[endpoint] as Promise<FormSelectOption[]>;\n return from(options.then(opts => {\n return this.builder.fixSelectOptions(field, opts.map(o => Object.assign({}, o)))\n }));\n }\n let path = property.optionsPath as string;\n let control = field.formControl;\n let current = field;\n if (path.startsWith(\"$root\")) {\n path = path.substring(5);\n control = control.root || control;\n while (current.parent) {\n current = current.parent;\n }\n }\n while (path.startsWith(\".\")) {\n path = path.substring(1);\n control = control.parent || control;\n current = current.parent || current;\n }\n control = !path ? control : control.get(path);\n return control.valueChanges.pipe(\n startWith(control.value),\n distinctUntilChanged(),\n switchMap(async (controlVal) => {\n const currentOpts = current.props.options;\n const finalOpts = isObservable(currentOpts)\n ? await firstValueFrom(currentOpts)\n : (Array.isArray(currentOpts) ? currentOpts : []);\n return this.builder.fixSelectOptions(field, (!Array.isArray(controlVal) ? [] : controlVal).map(value => {\n const modelOption = finalOpts.find(t => t.value == value);\n return {value, label: modelOption?.label || value};\n }));\n })\n );\n }\n\n protected replaceOptionsEndpoint(endpoint: string, key: string, value: any): string {\n if (ObjectUtils.isObject(value)) {\n return Object.entries(value).reduce((res, [k, v]) => {\n return this.replaceOptionsEndpoint(res, `${key}.${k}`, v);\n }, endpoint)\n }\n if (ObjectUtils.isArray(value)) {\n return value.reduce((res, v, i) => {\n return this.replaceOptionsEndpoint(res, `${key}.${i}`, v);\n }, endpoint)\n }\n return endpoint.replace(new RegExp(`\\\\$${key}`, \"gi\"), `${value ?? \"\"}`);\n }\n\n protected showErrorsForGroup(formGroup: FormGroup): void {\n if (!formGroup) return;\n formGroup.markAsTouched({onlySelf: true});\n const controls = Object.keys(formGroup.controls).map(id => formGroup.controls[id]);\n this.showErrorsForControls(controls);\n }\n\n protected showErrorsForControls(controls: AbstractControl[]): void {\n controls.forEach(control => {\n if (control instanceof FormGroup) {\n this.showErrorsForGroup(control);\n return;\n }\n control.markAsTouched({onlySelf: true});\n if (control instanceof FormArray) {\n this.showErrorsForControls(control.controls);\n }\n });\n }\n\n protected addPropertyValidators(validators: Validators, property: IOpenApiSchemaProperty): void {\n if (!property) return;\n if (!isNaN(property.minLength)) {\n validators.minLength = minLengthValidation(property.minLength);\n }\n if (!isNaN(property.maxLength)) {\n validators.maxLength = maxLengthValidation(property.maxLength);\n }\n if (!isNaN(property.minimum)) {\n validators.min = minValueValidation(property.minimum);\n }\n if (!isNaN(property.maximum)) {\n validators.max = maxValueValidation(property.maximum);\n }\n // if (isString(property.pattern) && property.pattern.length) {\n // validators.pattern = property.pattern;\n // }\n switch (property.format) {\n case \"email\":\n validators.email = emailValidation();\n break;\n }\n }\n\n protected addItemsValidators(validators: Validators, items: IOpenApiSchemaProperty): void {\n if (!items) return;\n if (!isNaN(items.minLength)) {\n validators.itemsMinLength = minLengthValidation(items.minLength, true);\n }\n if (!isNaN(items.maxLength)) {\n validators.itemsMaxLength = maxLengthValidation(items.maxLength, true);\n }\n if (!isNaN(items.minimum)) {\n validators.itemsMinValue = minValueValidation(items.minimum, true);\n }\n if (!isNaN(items.maximum)) {\n validators.itemsMaxValue = maxValueValidation(items.maximum, true);\n }\n }\n}\n","import {Inject, Injectable, Injector} from \"@angular/core\";\nimport {AbstractControl, FormArray, FormGroup} from \"@angular/forms\";\nimport {first} from \"rxjs\";\nimport {API_SERVICE, IApiService, ObjectUtils} from \"@stemy/ngx-utils\";\n\nimport {\n CustomizerOrSchemaOptions,\n FORM_ROOT_KEY,\n FormFieldConfig,\n FormSerializeResult,\n IDynamicForm\n} from \"../common-types\";\nimport {getFormValidationErrors, toWrapOptions} from \"../utils/internal\";\n\nimport {DynamicFormSchemaService} from \"./dynamic-form-schema.service\";\nimport {DynamicFormBuilderService} from \"./dynamic-form-builder.service\";\n\n@Injectable()\nexport class DynamicFormService {\n\n constructor(protected readonly fs: DynamicFormSchemaService,\n protected readonly fb: DynamicFormBuilderService,\n protected readonly injector: Injector,\n @Inject(API_SERVICE) protected readonly api: IApiService) {\n\n }\n\n async getFormFieldsForSchema(name: string, customizeOrOptions?: CustomizerOrSchemaOptions): Promise<FormFieldConfig[]> {\n const group = await this.getFormFieldGroupBySchemaName(name, customizeOrOptions, \"getFormFieldsForSchema\");\n return group.fieldGroup;\n }\n\n async getFormFieldGroupForSchema(name: string, customizeOrOptions?: CustomizerOrSchemaOptions): Promise<FormFieldConfig> {\n return this.getFormFieldGroupBySchemaName(name, customizeOrOptions, \"getFormFieldsForSchema\");\n }\n\n protected async getFormFieldGroupBySchemaName(name: string, customizeOrOptions: CustomizerOrSchemaOptions, restrictedMethod: string): Promise<FormFieldConfig> {\n const config = {\n key: FORM_ROOT_KEY,\n path: \"\",\n wrappers: [\"form-group\"]\n } as FormFieldConfig;\n const schema = await this.fs.getSchema(name);\n const wrapOptions = await toWrapOptions(\n customizeOrOptions, this.injector, schema,\n `\"DynamicFormService.${restrictedMethod}\" is called from a customizer, which is not allowed. Please use DynamicFormSchemaService instead!`\n );\n const fields = await this.fs.getFormFieldsForSchema(name, config, wrapOptions);\n const fieldGroup = [...fields];\n\n config.fieldGroup = fieldGroup;\n\n // There are no actual fields in the schema, or no schema exists\n if (fields.length === 0) return config;\n\n // Add id fields if necessary\n const idFields: FormFieldConfig[] = [\n this.fb.createFormInput(\"id\", {hidden: true}, null, wrapOptions),\n this.fb.createFormInput(\"_id\", {hidden: true}, null, wrapOptions)\n ];\n\n fieldGroup.unshift(...idFields\n .filter(t => !fields.some(c => c.key == t.key))\n );\n\n const root = await wrapOptions.customize(config, {\n id: FORM_ROOT_KEY,\n type: \"object\",\n properties: schema?.properties || {}\n }, schema);\n // Check if the customized root wrapper returned an array\n fields.length = 0;\n\n for (const model of root) {\n if (model.key === FORM_ROOT_KEY) {\n return model;\n } else {\n fields.push(model);\n }\n }\n\n return {\n ...config,\n fieldGroup: fields\n };\n }\n\n async validateForm(form: IDynamicForm, showErrors: boolean = true): Promise<any> {\n const group = form.group();\n if (!group) return Promise.resolve();\n return new Promise<any>((resolve, reject) => {\n group.statusChanges\n .pipe(first(status => status == \"VALID\" || status == \"INVALID\"))\n .subscribe(status => {\n if (showErrors) {\n this.showErrorsForGroup(group);\n }\n if (status == \"VALID\") {\n resolve(null);\n return;\n }\n reject(getFormValidationErrors(group.controls));\n });\n group.updateValueAndValidity();\n });\n }\n\n async serializeForm(form: IDynamicForm, validate: boolean = true): Promise<FormSerializeResult> {\n const fields = form.config();\n if (!fields) return null;\n if (validate) {\n await this.validateForm(form);\n }\n return this.serialize(fields);\n }\n\n async serialize(fields: FormFieldConfig[]): Promise<FormSerializeResult> {\n const result = {};\n if (!fields) return result;\n for (const field of fields) {\n const serializer = field.serializer;\n const key = `${field.key}`;\n if (ObjectUtils.isFunction(serializer)) {\n result[key] = await serializer(field, this.injector);\n continue;\n }\n if (field.hide && !field.serialize) {\n continue;\n }\n const control = field.formControl;\n if (field.fieldGroup) {\n const group = await this.serialize(field.fieldGroup);\n if (field.key) {\n result[key] = !field.fieldArray ? group : Object.values(group);\n continue;\n }\n Object.assign(result, group);\n continue;\n }\n result[key] = control.value;\n }\n return result;\n }\n\n protected showErrorsForGroup(formGroup: FormGroup): void {\n if (!formGroup) return;\n formGroup.markAsTouched({onlySelf: true});\n const controls = Object.keys(formGroup.controls).map(id => formGroup.controls[id]);\n this.showErrorsForControls(controls);\n }\n\n protected showErrorsForControls(controls: AbstractControl[]): void {\n controls.forEach(control => {\n if (control instanceof FormGroup) {\n this.showErrorsForGroup(control);\n return;\n }\n control.markAsTouched({onlySelf: true});\n if (control instanceof FormArray) {\n this.showErrorsForControls(control.controls);\n }\n });\n }\n}\n","import {\n computed,\n Directive,\n effect,\n ElementRef,\n HostBinding,\n HostListener,\n inject,\n input,\n output,\n Renderer2,\n signal\n} from \"@angular/core\";\nimport {outputToObservable} from \"@angular/core/rxjs-interop\";\nimport {debounceTime} from \"rxjs/operators\";\nimport {IAsyncMessage, TOASTER_SERVICE} from \"@stemy/ngx-utils\";\n\nimport {AsyncSubmitMethod, IDynamicForm} from \"../common-types\";\n\n@Directive({\n standalone: false,\n selector: \"[async-submit]\",\n exportAs: \"async-submit\"\n})\nexport class AsyncSubmitDirective {\n\n method = input<AsyncSubmitMethod>(null, {alias: \"async-submit\"});\n form = input<IDynamicForm>();\n context = input<any>();\n\n onSuccess = output<IAsyncMessage>();\n onError = output<IAsyncMessage>();\n\n toaster = inject(TOASTER_SERVICE);\n renderer = inject(Renderer2);\n elem = inject<ElementRef<HTMLElement>>(ElementRef);\n\n protected status = computed(() => {\n const form = this.form();\n return form?.status() || null;\n });\n\n protected group = computed(() => {\n const form = this.form();\n return form?.group() || null;\n });\n\n protected loading = signal(false);\n protected callback = signal<() => void>(null);\n\n @HostBinding(\"class.disabled\")\n get isDisabled(): boolean {\n return this.status() !== \"VALID\";\n }\n\n @HostBinding(\"class.loading\")\n get isLoading(): boolean {\n return this.loading();\n }\n\n constructor() {\n effect(() => {\n if (this.elem.nativeElement.tagName === \"BUTTON\") {\n this.renderer.setAttribute(this.elem.nativeElement, \"type\", \"button\");\n }\n });\n effect(() => {\n const status = this.status();\n const cb = this.callback();\n if (!cb || status == \"PENDING\") return;\n if (status === \"VALID\") {\n cb();\n }\n this.callback.set(null);\n });\n effect(() => {\n const form = this.form();\n if (!form) return;\n const sub = outputToObservable(form.onSubmit)\n .pipe(debounceTime(200)).subscribe(() => this.callMethod());\n return () => sub.unsubscribe();\n });\n }\n\n @HostListener(\"click\")\n click(): void {\n const status = this.status();\n if (status !== \"VALID\" && status !== \"INVALID\") {\n this.callback.set(() => this.callMethod());\n return;\n }\n this.callMethod();\n }\n\n callMethod(): void {\n if (this.loading()) return;\n this.loading.set(true);\n this.method()(this.form(), this.context).then(result => {\n this.loading.set(false);\n if (result) {\n this.onSuccess.emit(result);\n this.toaster.success(result.message, result.context);\n }\n }, reason => {\n if (!reason || !reason.message)\n throw new Error(\"Reason must implement IAsyncMessage interface\");\n this.loading.set(false);\n this.onError.emit(reason);\n this.toaster.error(reason.message, reason.context);\n });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n Injector,\n input,\n output,\n ViewEncapsulation\n} from \"@angular/core\";\nimport {rxResource, toSignal} from \"@angular/core/rxjs-interop\";\nimport {FormGroup} from \"@angular/forms\";\nimport {Subject} from \"rxjs\";\nimport {FormlyFormOptions} from \"@ngx-formly/core\";\nimport {EventsService, LANGUAGE_SERVICE} from \"@stemy/ngx-utils\";\n\nimport {FormFieldChangeEvent, FormFieldConfig, FormFieldLabelCustomizer, IDynamicForm} from \"../../common-types\";\nimport {DynamicFormBuilderService} from \"../../services/dynamic-form-builder.service\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form\",\n templateUrl: \"./dynamic-form.component.html\",\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DynamicFormComponent implements IDynamicForm {\n\n protected readonly builder = inject(DynamicFormBuilderService);\n\n protected readonly events = inject(EventsService);\n\n protected readonly languages = inject(LANGUAGE_SERVICE);\n\n readonly labelPrefix = input<string>(\"label\");\n\n readonly labelCustomizer = input<FormFieldLabelCustomizer>(null);\n\n readonly testId = input<string>(\"\");\n\n readonly data = input<any>({});\n\n readonly fields = input<FormFieldConfig[]>(null);\n\n readonly fieldChanges = new Subject<FormFieldChangeEvent>();\n\n protected readonly language = toSignal(this.events.languageChanged, {\n initialValue: this.languages.currentLanguage\n });\n\n protected readonly enableTranslations = toSignal(this.events.translationsEnabled, {\n initialValue: this.languages.enableTranslations\n });\n\n readonly config = computed(() => {\n return this.fields() || this.builder.resolveFormFields(this.data()?.constructor, null, {\n labelPrefix: this.labelPrefix(),\n labelCustomizer: this.labelCustomizer(),\n testId: this.testId(),\n });\n });\n\n readonly group = computed(() => {\n this.config();\n return new FormGroup({});\n });\n\n protected readonly status$ = rxResource({\n request: () => this.group(),\n loader: p => p.request.statusChanges,\n defaultValue: \"PENDING\"\n });\n\n readonly status = computed(() => this.status$.value());\n\n readonly onSubmit = output<IDynamicForm>();\n\n readonly options: FormlyFormOptions = {\n fieldChanges: this.fieldChanges,\n formState: {\n injector: inject(Injector)\n }\n };\n\n constructor() {\n effect(() => {\n this.language();\n this.enableTranslations();\n this.config().forEach(field => {\n if (!field.options) return;\n this.options.detectChanges(field);\n });\n });\n }\n\n submit() {\n // TODO: Templ disable submit\n // this.onSubmit.emit(this);\n }\n\n reset() {\n this.options?.resetModel?.();\n }\n}\n","@if (config() && group()) {\n <form [formGroup]=\"group()\" (ngSubmit)=\"submit()\" autocomplete=\"off\" role=\"presentation\">\n <input type=\"submit\" [hidden]=\"true\" />\n <formly-form [model]=\"data()\"\n [fields]=\"config()\"\n [form]=\"group()\"\n [options]=\"options\"></formly-form>\n <ng-content></ng-content>\n </form>\n}\n","import {Component, signal, ViewEncapsulation} from \"@angular/core\";\nimport {FormArray} from \"@angular/forms\";\nimport {FieldArrayType} from \"@ngx-formly/core\";\nimport {FormFieldConfig} from \"../../common-types\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-array\",\n templateUrl: \"./dynamic-form-array.component.html\",\n encapsulation: ViewEncapsulation.None\n})\nexport class DynamicFormArrayComponent extends FieldArrayType<FormFieldConfig> {\n\n readonly currentTab = signal(0);\n\n clear(): void {\n const control = this.formControl as FormArray;\n while (control.length > 0) {\n this.remove(0);\n }\n }\n}\n","<label class=\"field-label\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n</label>\n<div class=\"field-container\">\n @if (props.useTabs) {\n <ul class=\"form-array-tabs\">\n @for (field of field.fieldGroup; track field.key; let ix = $index) {\n <li>\n <a class=\"btn\" [ngClass]=\"[currentTab() === ix ? 'btn-primary' : 'btn-secondary']\"\n (click)=\"currentTab.set(ix)\">\n {{ (field.formControl.value | getValue : props.tabsLabel) || ix + 1 }}\n </a>\n </li>\n }\n </ul>\n }\n @for (field of field.fieldGroup; track field.key; let ix = $index) {\n @if (!props.useTabs || ix === currentTab()) {\n <div class=\"form-array-item\">\n <div class=\"form-array-buttons\">\n @if (props.removeItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"remove(ix)\">\n <i icon=\"trash-outline\"></i>\n </button>\n }\n @if (props.insertItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"add(ix)\">\n <i icon=\"plus-outline\"></i>\n </button>\n }\n </div>\n <formly-field [field]=\"field\"></formly-field>\n </div>\n }\n }\n <div class=\"form-array-buttons\">\n @if (props.clearItems) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"clear()\">\n <i icon=\"trash-outline\"></i>\n {{ 'button.clear-items' | translate }}\n </button>\n }\n @if (props.addItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"add()\">\n <i icon=\"plus-outline\"></i>\n {{ 'button.insert-item' | translate }}\n </button>\n }\n </div>\n</div>\n","import {ChangeDetectionStrategy, Component, ViewEncapsulation} from \"@angular/core\";\nimport {FieldType} from \"@ngx-formly/core\";\nimport {FormFieldType} from \"../../common-types\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-chips\",\n templateUrl: \"./dynamic-form-chips.component.html\",\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DynamicFormChipsComponent extends FieldType<FormFieldType> {\n\n}\n","<chips [formControl]=\"formControl\"\n [type]=\"props.type\"\n [step]=\"props.step\"\n [minLength]=\"props.minLength\"\n [maxLength]=\"props.maxLength\"\n [min]=\"props.min\"\n [max]=\"props.max\"\n [multiple]=\"props.multiple\"\n [formlyAttributes]=\"field\">\n</chips>\n","import {Component, ViewEncapsulation} from \"@angular/core\";\nimport {FieldWrapper} from \"@ngx-formly/core\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-field\",\n templateUrl: \"./dynamic-form-field.component.html\",\n encapsulation: ViewEncapsulation.None\n})\nexport class DynamicFormFieldComponent extends FieldWrapper {\n\n}\n","<label class=\"field-label\" [for]=\"id\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n <span class=\"field-required\" *ngIf=\"props.required && props.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n</label>\n<div class=\"field-container\">\n <ng-container #fieldComponent></ng-container>\n <div *ngIf=\"showError\" class=\"field-errors invalid-feedback\">\n <formly-validation-message\n id=\"{{ id }}-formly-validation-error\"\n [field]=\"field\"\n role=\"alert\"\n ></formly-validation-message>\n </div>\n</div>\n","import {Component, inject, ViewEncapsulation} from \"@angular/core\";\nimport {FieldWrapper} from \"@ngx-formly/core\";\nimport {DynamicFormGroupComponent} from \"../dynamic-form-group/dynamic-form-group.component\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-fieldset\",\n templateUrl: \"./dynamic-form-fieldset.component.html\",\n encapsulation: ViewEncapsulation.None\n})\nexport class DynamicFormFieldsetComponent extends FieldWrapper {\n\n ngOnInit(): void {\n // console.log(this.field.id, this.field.props?.label, this.options);\n // console.log(this.field.parent);\n }\n}\n","<legend class=\"field-legend\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n</legend>\n<div class=\"field-container\">\n <ng-container #fieldComponent></ng-container>\n</div>\n","import {Component, ViewEncapsulation} from \"@angular/core\";\nimport {FieldWrapper} from \"@ngx-formly/core\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-group\",\n templateUrl: \"./dynamic-form-group.component.html\",\n encapsulation: ViewEncapsulation.None\n})\nexport class DynamicFormGroupComponent extends FieldWrapper {\n\n}\n","<label class=\"field-label\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n</label>\n<ng-container #fieldComponent></ng-container>\n","import {ChangeDetectionStrategy, Component, ViewEncapsulation} from \"@angular/core\";\nimport {FieldType} from \"@ngx-formly/core\";\nimport {FormFieldType} from \"../../common-types\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-upload\",\n templateUrl: \"./dynamic-form-upload.component.html\",\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DynamicFormUploadComponent extends FieldType<FormFieldType> {\n\n}\n","<upload [formControl]=\"formControl\"\n [multiple]=\"props.multiple\"\n [inline]=\"props.inline\"\n [accept]=\"props.accept\"\n [baseUrl]=\"props.url\"\n [makeUpload]=\"props.createUploadData\"\n [formlyAttributes]=\"field\">\n</upload>\n","import {AsyncSubmitDirective} from \"./directives/async-submit.directive\";\n\nimport {DynamicFormComponent} from \"./components/dynamic-form/dynamic-form.component\";\nimport {DynamicFormArrayComponent} from \"./components/dynamic-form-array/dynamic-form-array.component\";\nimport {DynamicFormChipsComponent} from \"./components/dynamic-form-chips/dynamic-form-chips.component\";\nimport {DynamicFormFieldComponent} from \"./components/dynamic-form-field/dynamic-form-field.component\";\nimport {DynamicFormFieldsetComponent} from \"./components/dynamic-form-fieldset/dynamic-form-fieldset.component\";\nimport {DynamicFormGroupComponent} from \"./components/dynamic-form-group/dynamic-form-group.component\";\nimport {DynamicFormUploadComponent} from \"./components/dynamic-form-upload/dynamic-form-upload.component\";\n\n// --- Components ---\nexport const components = [\n DynamicFormComponent,\n DynamicFormArrayComponent,\n DynamicFormChipsComponent,\n DynamicFormFieldComponent,\n DynamicFormFieldsetComponent,\n DynamicFormGroupComponent,\n DynamicFormUploadComponent\n];\n\n// --- Directives ---\nexport const directives = [\n AsyncSubmitDirective,\n];\n\n// --- Pipes ---\nexport const pipes = [];\n","import {EnvironmentProviders, makeEnvironmentProviders, ModuleWithProviders, NgModule, Provider} from \"@angular/core\";\nimport {CommonModule} from \"@angular/common\";\nimport {FormsModule, ReactiveFormsModule} from \"@angular/forms\";\nimport {FormlyModule} from \"@ngx-formly/core\";\nimport {NgxUtilsModule} from \"@stemy/ngx-utils\";\n\nimport {components, directives, pipes} from \"./ngx-dynamic-form.imports\";\n\nimport {IDynamicFormModuleConfig} from \"./common-types\";\n\nimport {DynamicFormService} from \"./services/dynamic-form.service\";\nimport {DynamicFormBuilderService} from \"./services/dynamic-form-builder.service\";\nimport {DynamicFormSchemaService} from \"./services/dynamic-form-schema.service\";\n\nimport {DynamicFormArrayComponent} from \"./components/dynamic-form-array/dynamic-form-array.component\";\nimport {DynamicFormChipsComponent} from \"./components/dynamic-form-chips/dynamic-form-chips.component\";\nimport {DynamicFormGroupComponent} from \"./components/dynamic-form-group/dynamic-form-group.component\";\nimport {DynamicFormFieldComponent} from \"./components/dynamic-form-field/dynamic-form-field.component\";\nimport {DynamicFormFieldsetComponent} from \"./components/dynamic-form-fieldset/dynamic-form-fieldset.component\";\nimport {DynamicFormUploadComponent} from \"./components/dynamic-form-upload/dynamic-form-upload.component\";\n\n@NgModule({\n declarations: [\n ...components,\n ...directives,\n ...pipes\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NgxUtilsModule,\n FormlyModule.forChild()\n ],\n exports: [\n ...components,\n ...directives,\n ...pipes,\n FormsModule,\n ReactiveFormsModule,\n NgxUtilsModule,\n FormlyModule\n ],\n providers: [\n ...pipes\n ]\n})\nexport class NgxDynamicFormModule {\n\n private static getProviders(config?: IDynamicFormModuleConfig): Provider[] {\n const {providers} = FormlyModule.forRoot({\n types: [\n {name: \"array\", component: DynamicFormArrayComponent},\n {name: \"chips\", component: DynamicFormChipsComponent},\n {name: \"upload\", component: DynamicFormUploadComponent, wrappers: [\"form-field\"]},\n {name: \"file\", extends: \"upload\"},\n {name: \"translation\", extends: \"array\"},\n ...(config?.types || [])\n ],\n wrappers: [\n { name: \"form-field\", component: DynamicFormFieldComponent },\n { name: \"form-fieldset\", component: DynamicFormFieldsetComponent },\n { name: \"form-group\", component: DynamicFormGroupComponent },\n ...(config?.wrappers || [])\n ],\n extras: {\n renderFormlyFieldElement: false,\n ...(config?.extras || {})\n }\n });\n\n return [\n ...(providers as Provider[]),\n DynamicFormService,\n DynamicFormBuilderService,\n DynamicFormSchemaService\n ];\n }\n\n static forRoot(config?: IDynamicFormModuleConfig): ModuleWithProviders<NgxDynamicFormModule> {\n return {\n ngModule: NgxDynamicFormModule,\n providers: NgxDynamicFormModule.getProviders(config)\n }\n }\n\n static provideForms(config?: IDynamicFormModuleConfig): EnvironmentProviders {\n return makeEnvironmentProviders(NgxDynamicFormModule.getProviders(config));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["FormGroup","FormArray","i1","i2.DynamicFormBuilderService","i2","i3"],"mappings":";;;;;;;;;;;;;;AAcA;AACO,MAAM,aAAa,GAAG;;ACUb,SAAA,kBAAkB,CAAC,GAAG,SAAiD,EAAA;AACnF,IAAA,MAAM,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC;AACxC,IAAA,OAAO,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,KAAI;AACxD,QAAA,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;AACrC,QAAA,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC;AACtB,QAAA,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;YAClC,MAAM,KAAK,GAAG,MAAM,C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cAAc;wBACd,YAAY,CAAC,QAAQ;AACxB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACL,wBAAA,GAAG,UAAU;AACb,wBAAA,GAAG,UAAU;AACb,wBAAA,GAAG,KAAK;wBACR,WAAW;wBACX,mBAAmB;wBACnB,cAAc;wBACd;AACH,qBAAA;AACD,oBAAA,SAAS,EAAE;AACP,wBAAA,GAAG;AACN;AACJ,iBAAA;;;AC9CD;;AAEG;;;;"}
1
+ {"version":3,"file":"stemy-ngx-dynamic-form.mjs","sources":["../../src/ngx-dynamic-form/common-types.ts","../../src/ngx-dynamic-form/utils/customizer.ts","../../src/ngx-dynamic-form/utils/decorators.ts","../../src/ngx-dynamic-form/utils/validation.ts","../../src/ngx-dynamic-form/utils/misc.ts","../../src/ngx-dynamic-form/utils/internal.ts","../../src/ngx-dynamic-form/services/dynamic-form-builder.service.ts","../../src/ngx-dynamic-form/services/dynamic-form-schema.service.ts","../../src/ngx-dynamic-form/services/dynamic-form.service.ts","../../src/ngx-dynamic-form/directives/async-submit.directive.ts","../../src/ngx-dynamic-form/components/base/dynamic-field-type.ts","../../src/ngx-dynamic-form/components/dynamic-form/dynamic-form.component.ts","../../src/ngx-dynamic-form/components/dynamic-form/dynamic-form.component.html","../../src/ngx-dynamic-form/components/dynamic-form-array/dynamic-form-array.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-array/dynamic-form-array.component.html","../../src/ngx-dynamic-form/components/dynamic-form-chips/dynamic-form-chips.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-chips/dynamic-form-chips.component.html","../../src/ngx-dynamic-form/components/dynamic-form-field/dynamic-form-field.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-field/dynamic-form-field.component.html","../../src/ngx-dynamic-form/components/dynamic-form-fieldset/dynamic-form-fieldset.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-fieldset/dynamic-form-fieldset.component.html","../../src/ngx-dynamic-form/components/dynamic-form-group/dynamic-form-group.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-group/dynamic-form-group.component.html","../../src/ngx-dynamic-form/components/dynamic-form-upload/dynamic-form-upload.component.ts","../../src/ngx-dynamic-form/components/dynamic-form-upload/dynamic-form-upload.component.html","../../src/ngx-dynamic-form/ngx-dynamic-form.imports.ts","../../src/ngx-dynamic-form/ngx-dynamic-form.module.ts","../../src/stemy-ngx-dynamic-form.ts"],"sourcesContent":["import {Injector, OutputRef, Signal} from \"@angular/core\";\nimport {AbstractControl, FormControl, FormGroup} from \"@angular/forms\";\nimport {Observable} from \"rxjs\";\nimport {ConfigOption, FormlyFieldConfig, FormlyFieldProps} from \"@ngx-formly/core\";\nimport {FormlySelectOption} from \"@ngx-formly/core/select\";\nimport {\n IAsyncMessage,\n IOpenApiSchema,\n IOpenApiSchemaProperty,\n IRequestOptions,\n MaybeArray,\n MaybePromise\n} from \"@stemy/ngx-utils\";\n\n// --- Basic frm constants ---\nexport const FORM_ROOT_KEY = \"__root\";\n\n// --- Basic form types ---\n\nexport type DynamicFormState = \"VALID\" | \"INVALID\" | \"PENDING\" | \"DISABLED\" | \"LOADING\";\nexport type DynamicFormUpdateOn = \"change\" | \"blur\" | \"submit\";\nexport type UploadData = Record<string, any> | ArrayBuffer | FormData;\n\n// --- Basic form field interfaces ---\n\nexport type FormFieldKey = string | number | (string | number)[];\n\nexport type FormFieldLabelCustomizer = (key: string, label: string, parent: FormFieldConfig, labelPrefix: string) => string;\n\nexport interface FormBuilderOptions {\n labelPrefix?: string;\n labelCustomizer?: FormFieldLabelCustomizer;\n testId?: string;\n}\n\nexport interface FormFieldProps extends FormlyFieldProps {\n // --- Input props ---\n autocomplete?: string;\n suffix?: string;\n // --- Checkbox props ---\n formCheck?: string;\n indeterminate?: boolean;\n // --- Select props ---\n multiple?: boolean;\n allowEmpty?: boolean;\n groupBy?: string;\n // --- Array props ---\n useTabs?: boolean;\n tabsLabel?: string;\n addItem?: boolean;\n insertItem?: boolean;\n cloneItem?: boolean;\n moveItem?: boolean;\n removeItem?: boolean;\n clearItems?: boolean;\n // --- Upload props ---\n inline?: boolean;\n accept?: string | string[];\n url?: string;\n maxSize?: number;\n uploadOptions?: IRequestOptions;\n createUploadData?: (file: File) => UploadData | Promise<UploadData>;\n // --- Old upload props\n multi?: boolean;\n asFile?: boolean;\n uploadUrl?: string;\n}\n\nexport type FormFieldSerializer = (field: FormFieldConfig, injector: Injector) => MaybePromise<any>;\n\nexport declare type FormHookFn = (field: FormFieldConfig) => void;\n\nexport interface FormHookConfig {\n onInit?: FormHookFn | ((field: FormFieldConfig) => Observable<any>);\n onChanges?: FormHookFn;\n afterContentInit?: FormHookFn;\n afterViewInit?: FormHookFn;\n onDestroy?: FormHookFn;\n}\n\nexport type FormFieldExpression<T = any> = string | ((field: FormFieldConfig) => T) | Observable<T>;\nexport type FormFieldExpressions = {\n [property: string]: FormFieldExpression;\n} & {\n className?: FormFieldExpression<string>;\n hide?: FormFieldExpression<boolean>;\n \"props.disabled\"?: FormFieldExpression<boolean>;\n \"props.required\"?: FormFieldExpression<boolean>;\n};\n\nexport interface FormFieldConfig<T = FormFieldProps> extends FormlyFieldConfig<T> {\n serializer?: FormFieldSerializer;\n serialize?: boolean;\n fieldSet?: string;\n parent?: FormFieldConfig;\n fieldGroup?: FormFieldConfig[];\n fieldArray?: FormFieldConfig | ((field: FormFieldConfig) => FormFieldConfig);\n hooks: FormHookConfig;\n expressions: FormFieldExpressions;\n readonly additional?: Readonly<{[key: string]: any}>;\n readonly path?: string;\n readonly testId?: string;\n}\n\nexport interface FormFieldType<T = FormFieldProps> extends FormFieldConfig<T> {\n formControl: FormControl;\n props: NonNullable<T>;\n}\n\nexport interface FormFieldChangeEvent {\n field: FormFieldConfig;\n type: string;\n value: any;\n [meta: string]: any;\n}\n\nexport interface FormSerializeResult {\n [key: string]: any;\n}\n\nexport interface FormSelectOption extends FormlySelectOption {\n className?: string;\n classes?: string[] | string;\n id?: any;\n}\n\nexport type FormSelectOptions = FormSelectOption[] | Observable<FormSelectOption[]>;\n\nexport interface IDynamicForm {\n\n readonly fieldChanges: Observable<FormFieldChangeEvent>;\n readonly config: Signal<FormFieldConfig[]>;\n readonly group: Signal<FormGroup>;\n readonly status: Signal<DynamicFormState>;\n readonly onSubmit: OutputRef<IDynamicForm>;\n\n reset(): void;\n}\n\n// --- Validation types ---\n\ntype FormFieldValidatorFn<T> = ((control: AbstractControl, field?: FormlyFieldConfig) => T) & {\n validatorName?: string\n};\n\nexport type ValidationMessageFn = (error: any, field: FormFieldConfig) => string | Observable<string>;\n\ninterface FormFieldValidatorExpression<T> {\n expression: FormFieldValidatorFn<T>;\n message: ValidationMessageFn;\n}\n\ntype FormFieldValidation<T, R> = {\n validation?: (string | T)[];\n} & {\n [key: string]: FormFieldValidatorFn<R> | FormFieldValidatorExpression<R>;\n}\n\nexport type ValidatorFn = FormFieldValidatorFn<boolean>;\n\nexport type ValidatorExpression = FormFieldValidatorExpression<boolean>;\n\nexport type Validators = FormFieldValidation<ValidatorFn, boolean>;\n\nexport type AsyncBoolean = Promise<boolean> | Observable<boolean>;\n\nexport type AsyncValidatorFn = FormFieldValidatorFn<AsyncBoolean>;\n\nexport type AsyncValidatorExpression = FormFieldValidatorExpression<AsyncBoolean>;\n\nexport type AsyncValidators = FormFieldValidation<AsyncValidatorFn, AsyncBoolean>;\n\nexport interface AllValidationErrors {\n control: AbstractControl;\n path: string;\n errorKey: string;\n errorValue: any;\n}\n\n// --- Form field data types ---\n\nexport type FormFieldCustom = Pick<FormFieldConfig, \"wrappers\" | \"hooks\" | \"fieldGroup\" | \"fieldArray\">;\n\nexport type FormFieldData = Pick<FormFieldProps, \"label\" | \"readonly\" | \"hidden\" | \"disabled\">\n & {\n validators?: Validators | ValidatorFn[];\n serializer?: FormFieldSerializer;\n fieldSet?: string;\n classes?: string[] | string;\n};\n\nexport type FormInputData = FormFieldData\n & Pick<FormFieldProps, \"type\" | \"pattern\" | \"placeholder\" | \"step\" | \"min\" | \"max\" | \"minLength\" | \"maxLength\" | \"autocomplete\" | \"suffix\" | \"indeterminate\" | \"cols\" | \"rows\">;\n\nexport type FormSelectData = FormFieldData\n & Pick<FormFieldProps, \"multiple\" | \"type\" | \"allowEmpty\" | \"groupBy\"> & {\n options?: (field: FormFieldConfig) => FormSelectOptions | Promise<FormSelectOption[]>;\n};\n\nexport type FormUploadData = FormFieldData\n & Pick<FormFieldProps, \"inline\" | \"multiple\" | \"accept\" | \"url\" | \"maxSize\" | \"uploadOptions\" | \"createUploadData\" | \"multi\" | \"asFile\" | \"uploadUrl\">;\n\nexport type FormGroupData = FormFieldData;\n\nexport type FormArrayData = FormFieldData\n & Pick<FormFieldProps, \"useTabs\" | \"tabsLabel\" | \"addItem\" | \"insertItem\" | \"cloneItem\" | \"moveItem\" | \"removeItem\" | \"clearItems\">;\n\n// --- JSON schema interfaces ---\n\nexport type FormFieldCustomizer = (\n field: FormFieldConfig, options: FormBuilderOptions, injector: Injector,\n property: IOpenApiSchemaProperty, schema: IOpenApiSchema\n) => MaybePromise<MaybeArray<FormFieldConfig>>;\n\nexport interface ConfigForSchemaOptions extends FormBuilderOptions {\n fieldCustomizer?: FormFieldCustomizer;\n}\n\nexport type CustomizerOrSchemaOptions = FormFieldCustomizer | ConfigForSchemaOptions;\n\nexport declare type AsyncSubmitMethod = (form: IDynamicForm, context?: any) => Promise<IAsyncMessage>;\n\nexport interface IDynamicFormModuleConfig {\n options?: ConfigOption[];\n}\n","import {\n cachedFactory,\n CachedProvider,\n IOpenApiSchema,\n IOpenApiSchemaProperty,\n MaybeArray,\n MaybePromise\n} from \"@stemy/ngx-utils\";\n\nimport {FormBuilderOptions, FormFieldConfig, FormFieldCustomizer} from \"../common-types\";\n\nexport interface IFormFieldCustomizer {\n acceptField(\n field: FormFieldConfig,\n property: IOpenApiSchemaProperty,\n schema: IOpenApiSchema\n ): boolean;\n customizeField(\n field: FormFieldConfig,\n options: FormBuilderOptions,\n property: IOpenApiSchemaProperty,\n schema: IOpenApiSchema\n ): MaybePromise<MaybeArray<FormFieldConfig>>;\n}\n\nexport function customizeFormField(...providers: CachedProvider<IFormFieldCustomizer>[]): FormFieldCustomizer {\n const factory = cachedFactory(providers);\n return async (field, options, injector, property, schema) => {\n const customizers = factory(injector);\n const fields = [field];\n for (const customizer of customizers) {\n const index = fields.findIndex(m => customizer.acceptField(m, property, schema));\n if (index >= 0) {\n const custom = await customizer.customizeField(\n fields[index], options, property, schema\n );\n const result = Array.isArray(custom) ? custom : [custom];\n fields.splice(index, 1, ...result);\n }\n }\n return fields;\n }\n}\n","import {ObjectUtils, ReflectUtils} from \"@stemy/ngx-utils\";\nimport {\n FormArrayData,\n FormFieldSerializer,\n FormGroupData,\n FormInputData,\n FormSelectData,\n FormUploadData\n} from \"../common-types\";\nimport {FormFieldBuilder} from \"../services/dynamic-form-builder.service\";\nimport {Type} from \"@angular/core\";\n\nfunction defineFormControl(target: any, propertyKey: string, cb: FormFieldBuilder): void {\n const fields: Set<string> = ReflectUtils.getMetadata(\"dynamicFormFields\", target) || new Set();\n const existing: FormFieldBuilder = ReflectUtils.getMetadata(\"dynamicFormField\", target, propertyKey);\n const builder: FormFieldBuilder = !ObjectUtils.isFunction(existing) ? cb : ((fb, opts, path) => {\n const data = existing(fb, opts, path);\n return ObjectUtils.assign(data || {}, cb(fb, opts, path) || {});\n });\n fields.add(propertyKey);\n ReflectUtils.defineMetadata(\"dynamicFormField\", builder, target, propertyKey);\n ReflectUtils.defineMetadata(\"dynamicFormFields\", fields, target);\n}\n\nexport function FormSerializable(serializer?: FormFieldSerializer): PropertyDecorator {\n return (target: any, key: string): void => {\n defineFormControl(target, key, () => ({\n key,\n serializer,\n serialize: true\n }));\n };\n}\n\nexport function FormInput(data?: FormInputData): PropertyDecorator {\n data = data || {};\n return (target: any, key: string): void => {\n const meta = ReflectUtils.getOwnMetadata(\"design:type\", target, key);\n const type = meta ? meta.name : \"\";\n let inputType = key.indexOf(\"password\") < 0 ? \"text\" : \"password\";\n switch (type) {\n case \"Number\":\n inputType = \"number\";\n break;\n case \"Boolean\":\n inputType = \"checkbox\";\n break;\n }\n data.type = data.type || inputType;\n defineFormControl(\n target, key,\n (fb, path, options) =>\n fb.createFormInput(key, data, path, options)\n );\n };\n}\n\nexport function FormSelect(data?: FormSelectData): PropertyDecorator {\n data = data || {};\n return (target: any, key: string): void => {\n defineFormControl(\n target, key,\n (fb, path, options) =>\n fb.createFormSelect(key, data, path, options)\n );\n };\n}\n\nexport function FormUpload(data?: FormUploadData): PropertyDecorator {\n data = data || {};\n return (target: any, key: string): void => {\n defineFormControl(\n target, key,\n (fb, path, options) =>\n fb.createFormUpload(key, data, path, options)\n );\n };\n}\n\nexport function FormFile(data?: FormUploadData): PropertyDecorator {\n console.warn(`@FormFile decorator is deprecated, use @FormUpload instead`);\n return FormUpload(data);\n}\n\nexport function FormGroup(data?: FormGroupData): PropertyDecorator {\n data = data || {};\n return (target: any, key: string): void => {\n defineFormControl(\n target, key,\n (fb, path, options) => {\n const targetType = ReflectUtils.getOwnMetadata(\"design:type\", target, key);\n return fb.resolveFormGroup(key, targetType, data, path, options);\n }\n );\n };\n}\n\nexport function FormArray(itemType: string | FormInputData | Type<any>, data?: FormArrayData): PropertyDecorator {\n data = data || {};\n return (target: any, key: string): void => {\n defineFormControl(\n target, key,\n (fb, path, options) => {\n return fb.resolveFormArray(key, itemType, data, path, options);\n }\n );\n };\n}\n\nexport function FormModel(data?: FormGroupData): PropertyDecorator {\n console.warn(`@FormModel decorator is deprecated, use @FormGroup instead`);\n return FormGroup(data);\n}\n","import {Injector} from \"@angular/core\";\nimport {LANGUAGE_SERVICE, ObjectUtils} from \"@stemy/ngx-utils\";\nimport {ValidationMessageFn, ValidatorFn} from \"../common-types\";\n\nexport function validationMessage(injector: Injector, key: string, labelPrefix?: string): ValidationMessageFn {\n const language = injector.get(LANGUAGE_SERVICE);\n return (_, field) => {\n return language.getTranslationSync(labelPrefix ? `${labelPrefix}.error.${key}` : `error.${key}`, field);\n }\n}\n\nexport function withName(fn: ValidatorFn, name: string): ValidatorFn {\n fn.validatorName = name;\n return fn;\n}\n\nfunction validateEach(each: boolean, cb: (value: any) => boolean, name: string): ValidatorFn {\n return withName((control) => {\n const value = control.value;\n return each ? Array.isArray(value) && value.every(cb) : cb(value);\n }, name);\n}\n\nexport function jsonValidation(): ValidatorFn {\n return withName((control) => {\n const value = control.value;\n if (!value) return false;\n try {\n JSON.parse(value);\n return true;\n } catch (e) {\n return false;\n }\n }, \"json\");\n}\n\nexport function requiredValidation(): ValidatorFn {\n return withName((control) =>\n ObjectUtils.isString(control.value) ? control.value.length > 0 : ObjectUtils.isDefined(control.value),\n \"required\"\n )\n}\n\nexport function translationValidation(langs: string[] = [\"de\", \"en\"]): ValidatorFn {\n return withName((control) => {\n const value: any[] = control.value;\n if (!value || value.length == 0) return false;\n return value.findIndex(t => langs.includes(t.lang) && !t.translation) < 0;\n }, \"translation\");\n}\n\nexport function phoneValidation(): ValidatorFn {\n return withName((control) => {\n const value = control.value;\n if (!value) return true;\n const phoneRegexp = /^\\d{10,12}$/;\n return phoneRegexp.test(value);\n }, \"phone\");\n}\n\nexport function emailValidation(): ValidatorFn {\n return withName((control) => {\n const value = control.value;\n if (!value) return true;\n const emailRegexp = /^[\\w-.]+@([\\w-]+\\.)+[\\w-]{2,4}$/g;\n return emailRegexp.test(value);\n }, \"email\");\n}\n\nexport function minLengthValidation(minLength: number, each?: boolean): ValidatorFn {\n return validateEach(each, v => typeof v == \"string\" && v.length >= minLength, \"minLength\");\n}\n\nexport function maxLengthValidation(maxLength: number, each?: boolean): ValidatorFn {\n return validateEach(each, v => typeof v == \"string\" && v.length <= maxLength, \"maxLength\");\n}\n\nexport function minValueValidation(min: number, each?: boolean): ValidatorFn {\n return validateEach(each, v => typeof v == \"number\" && v >= min, \"minValue\");\n}\n\nexport function maxValueValidation(max: number, each?: boolean): ValidatorFn {\n return validateEach(each, v => typeof v == \"number\" && v <= max, \"maxValue\");\n}\n","import {BehaviorSubject, Subject} from \"rxjs\";\nimport {ObjectUtils} from \"@stemy/ngx-utils\";\nimport {FormFieldKey, FormFieldConfig} from \"../common-types\";\n\nexport function replaceSpecialChars(str: string, to: string = \"-\"): string {\n return `${str}`.replace(/[&\\/\\\\#, +()$~%.@'\":*?<>{}]/g, to);\n}\n\nexport function getFieldByPath(field: FormFieldConfig, path: string): FormFieldConfig | null {\n if (field.path === path) {\n return field;\n }\n if (!field.fieldGroup) return null;\n for (const sf of field.fieldGroup) {\n const found = getFieldByPath(sf, path);\n if (found) return found;\n }\n return null;\n}\n\nexport function getFieldsByPredicate(field: FormFieldConfig, cb: (field: FormFieldConfig) => boolean): FormFieldConfig[] {\n if (cb(field)) {\n return [field];\n }\n if (!field.fieldGroup) return [];\n const results: FormFieldConfig[] = [];\n for (const sf of field.fieldGroup) {\n results.push(...getFieldsByPredicate(sf, cb));\n }\n return results;\n}\n\nexport function getFieldsByKey(field: FormFieldConfig, key: FormFieldKey): FormFieldConfig[] {\n return getFieldsByPredicate(field, f => f.key === key);\n}\n\nexport function setFieldHidden(field: FormFieldConfig, hidden: boolean = true): void {\n const hide = field.expressions?.hide;\n if (hide) {\n if (hide instanceof Subject) {\n hide.next(hidden);\n return;\n }\n field.expressions.hide = new BehaviorSubject(hidden);\n return;\n }\n field.hide = hidden;\n}\n\nexport function setFieldDisabled(field: FormFieldConfig, disabled: boolean = true): void {\n field.props = {\n ...(field.props || {}),\n disabled\n };\n}\n\nexport function additionalFieldValues(field: FormFieldConfig, values: {[key: string]: any}): void {\n const additional = field.expressions?.additional;\n if (additional instanceof BehaviorSubject) {\n additional.next(ObjectUtils.assign(additional.value, values || {}));\n return;\n }\n field.expressions.additional = new BehaviorSubject(values || {});\n}\n\nexport const MIN_INPUT_NUM = -999999999;\n\nexport const MAX_INPUT_NUM = 999999999;\n\nexport const EDITOR_FORMATS = [\"php\", \"json\", \"html\", \"css\", \"scss\"];\n","import {Injector} from \"@angular/core\";\r\nimport {IOpenApiSchema, IOpenApiSchemaProperty, MaybeArray, ObjectUtils, ForbiddenZone} from \"@stemy/ngx-utils\";\r\nimport {\r\n AllValidationErrors,\r\n ConfigForSchemaOptions,\r\n CustomizerOrSchemaOptions,\r\n FormBuilderOptions,\r\n FormFieldConfig,\r\n FormFieldCustomizer\r\n} from \"../common-types\";\r\nimport {AbstractControl, FormArray, FormGroup} from \"@angular/forms\";\r\n\r\nexport type ConfigForSchemaWrapMode = \"wrap\" | \"customizer\";\r\n\r\nexport interface ConfigForSchemaWrapOptions extends Required<FormBuilderOptions> {\r\n readonly injector: Injector;\r\n readonly schema: IOpenApiSchema;\r\n customize(field: FormFieldConfig, property: IOpenApiSchemaProperty, schema: IOpenApiSchema): Promise<FormFieldConfig[]>;\r\n}\r\n\r\nclass ConfigForSchemaWrap implements ConfigForSchemaWrapOptions {\r\n\r\n get labelPrefix() {\r\n return this.opts.labelPrefix;\r\n }\r\n\r\n get labelCustomizer() {\r\n return this.opts.labelCustomizer;\r\n }\r\n\r\n get testId() {\r\n return this.opts.testId;\r\n }\r\n\r\n protected fieldCustomizer: FormFieldCustomizer;\r\n\r\n constructor(\r\n protected readonly opts: ConfigForSchemaOptions,\r\n protected readonly mode: ConfigForSchemaWrapMode,\r\n readonly injector: Injector,\r\n readonly schema: IOpenApiSchema\r\n ) {\r\n this.fieldCustomizer = this.mode !== \"wrap\" || !ObjectUtils.isFunction(this.opts.fieldCustomizer)\r\n ? field => field\r\n : this.opts.fieldCustomizer;\r\n }\r\n\r\n async customize(field: FormFieldConfig, property: IOpenApiSchemaProperty, schema: IOpenApiSchema) {\r\n field.defaultValue = `${field.props?.type}`.startsWith(\"date\")\r\n ? convertToDate(property.default) : property.default;\r\n const res = await ForbiddenZone.run(\"customizer\", () =>\r\n this.fieldCustomizer(\r\n field, this.forCustomizer(), this.injector,\r\n property, schema\r\n )\r\n );\r\n return !res ? [field] : handleConfigs(res);\r\n }\r\n\r\n forCustomizer(): FormBuilderOptions {\r\n return new ConfigForSchemaWrap(this.opts, \"customizer\", this.injector, this.schema);\r\n }\r\n\r\n forSchema(schema: IOpenApiSchema): ConfigForSchemaWrapOptions {\r\n return new ConfigForSchemaWrap(this.opts, this.mode, this.injector, schema);\r\n }\r\n}\r\n\r\nexport async function toWrapOptions(customizeOrOptions: CustomizerOrSchemaOptions | ConfigForSchemaWrapOptions,\r\n injector: Injector,\r\n schema: IOpenApiSchema,\r\n errorMsg?: string): Promise<ConfigForSchemaWrapOptions> {\r\n if (errorMsg && ForbiddenZone.isForbidden(\"customizer\")) {\r\n throw new Error(errorMsg);\r\n }\r\n if (customizeOrOptions instanceof ConfigForSchemaWrap) {\r\n return customizeOrOptions;\r\n }\r\n let schemaOptions = customizeOrOptions as ConfigForSchemaOptions;\r\n if (!ObjectUtils.isObject(schemaOptions)) {\r\n schemaOptions = {\r\n fieldCustomizer: customizeOrOptions as FormFieldCustomizer\r\n };\r\n }\r\n return new ConfigForSchemaWrap(schemaOptions, \"wrap\", injector, schema);\r\n}\r\n\r\nexport function convertToDate(value: any): any {\r\n if (ObjectUtils.isNullOrUndefined(value)) return null;\r\n const date = ObjectUtils.isDate(value)\r\n ? value\r\n : new Date(value);\r\n return isNaN(date as any) ? new Date() : date;\r\n}\r\n\r\nexport function handleConfigs(configs: MaybeArray<FormFieldConfig>) {\r\n return Array.isArray(configs) ? configs : [configs];\r\n}\r\n\r\nexport function isStringWithVal(val: any): boolean {\r\n return typeof val == \"string\" && val.length > 0;\r\n}\r\n\r\nexport function findRefs(property: IOpenApiSchemaProperty): string[] {\r\n const refs = Array.isArray(property.allOf)\r\n ? property.allOf.map(o => o.$ref).filter(isStringWithVal)\r\n : [property.items?.$ref, property.$ref].filter(isStringWithVal);\r\n return refs.map(t => t.split(\"/\").pop());\r\n}\r\n\r\nexport function mergeFormFields(formFields: FormFieldConfig[][]): FormFieldConfig[] {\r\n const res: FormFieldConfig[] = [];\r\n for (const formModel of formFields) {\r\n for (const subModel of formModel) {\r\n const index = res.findIndex(t => t.key == subModel.key);\r\n if (index >= 0) {\r\n res[index] = subModel;\r\n continue;\r\n }\r\n res.push(subModel);\r\n }\r\n }\r\n return res;\r\n}\r\n\r\ninterface FormGroupControls {\r\n [key: string]: AbstractControl;\r\n}\r\n\r\nexport function getFormValidationErrors(controls: FormGroupControls, parentPath: string = \"\"): AllValidationErrors[] {\r\n const errors: AllValidationErrors[] = [];\r\n Object.entries(controls).forEach(([name, control], ix) => {\r\n const path = !parentPath ? name : `${parentPath}.${name}`;\r\n if (control instanceof FormGroup) {\r\n getFormValidationErrors(control.controls, path).forEach(error => errors.push(error));\r\n return;\r\n }\r\n if (control instanceof FormArray) {\r\n control.controls.forEach((control: FormGroup, ix) => {\r\n getFormValidationErrors(control.controls, `${path}.${ix}`).forEach(error => errors.push(error));\r\n });\r\n return;\r\n }\r\n Object.entries(control.errors || {}).forEach(([errorKey, errorValue]) => {\r\n errors.push({control, path, errorKey, errorValue});\r\n });\r\n });\r\n return errors;\r\n}\r\n","import {Inject, Injectable, Injector, Type} from \"@angular/core\";\nimport {BehaviorSubject, distinctUntilChanged, startWith, switchMap} from \"rxjs\";\nimport {\n API_SERVICE,\n IApiService,\n ILanguageService,\n LANGUAGE_SERVICE,\n MaybePromise,\n ObjectUtils,\n ReflectUtils\n} from \"@stemy/ngx-utils\";\n\nimport {\n FormArrayData,\n FormBuilderOptions,\n FormFieldConfig,\n FormFieldData,\n FormFieldExpressions,\n FormFieldProps,\n FormGroupData,\n FormHookConfig,\n FormInputData,\n FormSelectData,\n FormSelectOption,\n FormUploadData,\n Validators\n} from \"../common-types\";\nimport {validationMessage} from \"../utils/validation\";\nimport {MAX_INPUT_NUM, MIN_INPUT_NUM} from \"../utils/misc\";\nimport {isStringWithVal} from \"../utils/internal\";\n\nexport type FormFieldBuilder = (fb: DynamicFormBuilderService, parent: FormFieldConfig, options: FormBuilderOptions) => Partial<FormFieldConfig>;\n\n@Injectable()\nexport class DynamicFormBuilderService {\n\n constructor(readonly injector: Injector,\n @Inject(API_SERVICE) readonly api: IApiService,\n @Inject(LANGUAGE_SERVICE) readonly language: ILanguageService) {\n }\n\n resolveFormFields(target: Type<any>, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig[] {\n const prototype = target?.prototype || {};\n const fields: Set<string> = ReflectUtils.getMetadata(\"dynamicFormFields\", target?.prototype || {}) || new Set();\n const result: FormFieldConfig[] = [];\n for (const key of fields) {\n const builder: FormFieldBuilder = ReflectUtils.getMetadata(\"dynamicFormField\", prototype, key);\n const field = builder(this, parent, options) as FormFieldConfig;\n if (field) {\n result.push(field);\n }\n }\n return this.createFieldSets(result, parent, options);\n }\n\n resolveFormGroup(key: string, target: Type<any>, data: FormGroupData, parent: FormFieldConfig = null, options: FormBuilderOptions = {}): FormFieldConfig {\n return this.createFormGroup(key, sp => this.resolveFormFields(\n target, sp, options\n ), data, parent, options);\n }\n\n resolveFormArray(key: string, itemType: string | FormInputData | Type<any>, data: FormArrayData, parent: FormFieldConfig = null, options: FormBuilderOptions = {}): FormFieldConfig {\n return this.createFormArray(key, sp => {\n return typeof itemType === \"function\" ? this.resolveFormFields(\n itemType, sp, options\n ) : this.createFormInput(\"\", typeof itemType === \"string\" ? {type: `${itemType}`} : itemType, null, options);\n }, data, parent, options);\n }\n\n createFieldSets(fields: FormFieldConfig[], parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig[] {\n const others: FormFieldConfig[] = [];\n const groups: { [fs: string]: FormFieldConfig[] } = {};\n fields = fields.filter(f => {\n if (Array.isArray(f.fieldGroup) && Array.isArray(f.wrappers) && f.wrappers[0] === \"form-fieldset\") {\n // This field is an already existing set\n groups[f.id] = f.fieldGroup;\n return false;\n }\n return true;\n });\n\n for (const field of fields) {\n const fsName = field.hide ? null : String(field.fieldSet || \"\");\n // If we have a fieldset name defined and have actual fields for it\n // then push the property fields into a group\n if (fsName) {\n const fsId = !parent?.path ? fsName : `${parent.path}.${fsName}`;\n const group = groups[fsId] || [];\n groups[fsId] = group;\n group.push(field);\n continue;\n }\n // Otherwise just push the fields to the others\n others.push(field);\n }\n\n // Create a field-set wrapper for each group and concat the other fields to the end\n return Object.keys(groups).map(id => {\n const key = id.split(\".\").pop();\n const fieldSet: FormFieldConfig = {\n id,\n parent,\n fieldGroup: groups[id],\n wrappers: [\"form-fieldset\"],\n className: `dynamic-form-fieldset dynamic-form-fieldset-${id}`,\n props: {\n label: this.getLabel(key, key, parent, options),\n hidden: false\n },\n hooks: {},\n expressions: {}\n };\n this.setExpressions(fieldSet, options);\n return fieldSet;\n }).concat(others);\n }\n\n createFormInput(key: string, data: FormInputData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig {\n data = data || {};\n const type = `${data.type || \"text\"}`;\n const autocomplete = data.autocomplete || (type === \"password\" ? \"new-password\" : \"none\");\n return this.createFormField(key, type === \"checkbox\" || type === \"textarea\" ? type : \"input\", data, {\n type,\n autocomplete,\n pattern: ObjectUtils.isString(data.pattern) ? data.pattern : \"\",\n step: data.step,\n cols: data.cols || null,\n rows: data.rows || 10,\n min: isNaN(data.min) ? MIN_INPUT_NUM : data.min,\n max: isNaN(data.max) ? MAX_INPUT_NUM : data.max,\n minLength: isNaN(data.minLength) ? 0 : data.minLength,\n maxLength: isNaN(data.maxLength) ? MAX_INPUT_NUM : data.maxLength,\n placeholder: data.placeholder || \"\",\n indeterminate: data.indeterminate || false,\n suffix: data.suffix || \"\",\n attributes: {\n autocomplete\n },\n }, parent, options);\n }\n\n createFormSelect(key: string, data: FormSelectData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig {\n data = data || {};\n const type = `${data.type || \"select\"}`;\n const select = this.createFormField(key, type === \"radio\" ? type : \"select\", data, {\n type,\n multiple: data.multiple,\n groupBy: data.groupBy,\n allowEmpty: data.allowEmpty\n }, parent, options);\n select.hooks = Object.assign(select.hooks, {\n onInit: field => {\n const options = data.options?.(field) || [];\n const control = field.formControl.root;\n field.props.options = options instanceof Promise ? control.valueChanges.pipe(\n startWith(control.value),\n distinctUntilChanged(),\n switchMap(async () => {\n const results: FormSelectOption[] = await data.options(field) as any;\n return this.fixSelectOptions(field, results);\n })\n ) : options;\n }\n } as FormHookConfig);\n return select;\n }\n\n createFormUpload(key: string, data: FormUploadData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig {\n data = data || {};\n\n if (data.asFile) {\n data.inline = true;\n console.warn(`File upload property \"asFile\" is deprecated. Use \"inline\" instead.`);\n }\n\n if (data.multi) {\n data.multiple = true;\n console.warn(`File upload property \"multi\" is deprecated. Use \"multiple\" instead.`);\n }\n\n return this.createFormField(key, \"upload\", data, {\n inline: data.inline === true,\n multiple: data.multiple === true,\n accept: data.accept || [\".png\", \".jpg\"],\n url: data.url?.startsWith(\"http\") ? data.url : this.api.url(data.url || \"assets\"),\n maxSize: isNaN(data.maxSize) ? MAX_INPUT_NUM : data.maxSize,\n uploadOptions: data.uploadOptions || {},\n createUploadData: data.createUploadData\n }, parent, options);\n }\n\n createFormGroup(key: string, fields: (parent: FormFieldConfig) => FormFieldConfig[], data: FormGroupData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig\n createFormGroup(key: string, fields: (parent: FormFieldConfig) => Promise<FormFieldConfig[]>, data: FormGroupData, parent: FormFieldConfig, options: FormBuilderOptions): Promise<FormFieldConfig>\n createFormGroup(key: string, fields: (parent: FormFieldConfig) => any, data: FormGroupData, parent: FormFieldConfig, options: FormBuilderOptions): MaybePromise<FormFieldConfig> {\n data = data || {};\n const group = this.createFormField(key, undefined, data, {}, parent, options);\n group.wrappers = [\"form-group\"];\n const result = fields(group);\n const handleGroup = (fieldGroup: FormFieldConfig[]) => {\n group.fieldGroup = fieldGroup;\n return group;\n };\n return result instanceof Promise\n ? result.then(handleGroup)\n : handleGroup(result);\n }\n\n createFormArray(key: string, fields: (parent: FormFieldConfig) => FormFieldConfig | FormFieldConfig[], data: FormArrayData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig\n createFormArray(key: string, fields: (parent: FormFieldConfig) => Promise<FormFieldConfig | FormFieldConfig[]>, data: FormArrayData, parent: FormFieldConfig, options: FormBuilderOptions): Promise<FormFieldConfig>\n createFormArray(key: string, fields: (parent: FormFieldConfig) => any, data: FormArrayData, parent: FormFieldConfig, options: FormBuilderOptions): MaybePromise<FormFieldConfig> {\n data = data || {};\n const array = this.createFormField(key, \"array\", data, {\n // initialCount: data.initialCount || 0,\n // sortable: data.sortable || false,\n useTabs: data.useTabs === true,\n tabsLabel: `${data.tabsLabel || \"label\"}`,\n addItem: data.addItem !== false,\n insertItem: data.insertItem !== false,\n cloneItem: data.cloneItem !== false,\n moveItem: data.moveItem !== false,\n removeItem: data.removeItem !== false,\n clearItems: data.clearItems !== false\n }, parent, options);\n const result = fields(array);\n const handleItems = (items: FormFieldConfig | FormFieldConfig[]) => {\n if (Array.isArray(items)) {\n array.fieldArray = {\n wrappers: [\"form-group\"],\n fieldGroup: items,\n hooks: {},\n expressions: {}\n };\n return array;\n }\n const props = items.props || {};\n if (props.type === \"text\" || props.type === \"number\") {\n array.type = \"chips\";\n array.wrappers = [\"form-field\"];\n array.props = {\n ...props,\n ...array.props,\n multiple: true\n };\n return array;\n }\n array.fieldArray = {\n ...items,\n props: {\n ...items.props,\n label: \"\"\n }\n };\n return array;\n };\n return result instanceof Promise\n ? result.then(handleItems)\n : handleItems(result);\n }\n\n async fixSelectOptions(field: FormFieldConfig, options: FormSelectOption[]): Promise<FormSelectOption[]> {\n if (!options) return [];\n for (const option of options) {\n const classes = Array.isArray(option.classes) ? option.classes : [`${option.classes}`];\n option.className = classes.filter(isStringWithVal).join(\" \");\n option.label = await this.language.getTranslation(option.label);\n option.value = option.value ?? option.id;\n option.id = option.id ?? option.value;\n }\n const control = field.formControl;\n if (field.props.multiple || options.length === 0 || options.findIndex(o => o.value === control.value) >= 0) return options;\n control.setValue(options[0].value);\n return options;\n }\n\n protected getLabel(key: string, label: string, parent: FormFieldConfig, options: FormBuilderOptions): string {\n const labelPrefix = !ObjectUtils.isString(options.labelPrefix) ? `` : options.labelPrefix;\n const pathPrefix = `${parent?.props?.label || labelPrefix}`;\n const labelItems = ObjectUtils.isString(label)\n ? (!label ? [] : [labelPrefix, label])\n : [pathPrefix, `${key || \"\"}`]\n return labelItems.filter(l => l.length > 0).join(\".\");\n }\n\n protected createFormField(key: string, type: string, data: FormFieldData, props: FormFieldProps, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig {\n const validators = Array.isArray(data.validators)\n ? data.validators.reduce((res, validator, ix) => {\n res[validator.validatorName || `validator_${ix}`] = validator;\n return res;\n }, {} as Validators)\n : data.validators || {};\n const hide = new BehaviorSubject(data.hidden === true);\n const additional = new BehaviorSubject({});\n const field: FormFieldConfig = {\n key,\n type,\n validators,\n parent,\n fieldSet: String(data.fieldSet || \"\"),\n resetOnHide: false,\n validation: {\n messages: Object.keys(validators).reduce((res, key) => {\n res[key] = validationMessage(this.injector, key, options.labelPrefix);\n return res;\n }, {})\n },\n props: {\n ...props,\n disabled: data.disabled === true,\n formCheck: \"nolabel\",\n required: !!validators.required,\n label: options.labelCustomizer?.(key, data.label, parent, options.labelPrefix)\n ?? this.getLabel(key, data.label, parent, options),\n },\n modelOptions: {\n updateOn: \"change\"\n },\n fieldGroupClassName: \"field-container\",\n hooks: {},\n expressions: {\n hide,\n additional,\n className: (target: FormFieldConfig) => {\n return target.hide ? `` : [`dynamic-form-field`, `dynamic-form-field-${target.key}`, `dynamic-form-${target.type || \"group\"}`].concat(\n Array.isArray(data.classes) ? data.classes : [data.classes || \"\"]\n ).filter(c => c?.length > 0).join(\" \");\n }\n }\n };\n this.setExpressions(field, options);\n return field;\n }\n\n protected setExpressions(field: FormFieldConfig, options: FormBuilderOptions): void {\n const expressions: FormFieldExpressions = {\n path: target => {\n const tp = target.parent;\n const key = !target.key ? `` : `.${target.key}`;\n return !tp?.path ? `${target.key || \"\"}` : `${tp.path}.${key}`;\n },\n testId: target => {\n const tp = target.parent;\n const prefix = !options.testId ? `` : `${options.testId}-`;\n const key = !target.key ? `` : `-${target.key}`;\n return !tp?.testId ? `${prefix}${target.key || key}` : `${tp.testId}${key}`;\n }\n };\n Object.entries(expressions).forEach(([key, expression]) => {\n field.expressions = field.expressions ?? {};\n field.expressions[key] = expression;\n if (ObjectUtils.isFunction(expression)) {\n field[key] = expression(field);\n }\n });\n }\n}\n","import {Injectable, Injector} from \"@angular/core\";\nimport {AbstractControl, FormArray, FormGroup} from \"@angular/forms\";\nimport {distinctUntilChanged, firstValueFrom, from, isObservable, startWith, switchMap} from \"rxjs\";\nimport {\n IApiService,\n ILanguageService, IOpenApiSchema,\n IOpenApiSchemaProperty,\n ObjectUtils,\n OpenApiService,\n StringUtils\n} from \"@stemy/ngx-utils\";\n\nimport {\n CustomizerOrSchemaOptions,\n FormFieldConfig,\n FormFieldData,\n FormSelectOption,\n FormSelectOptions,\n Validators\n} from \"../common-types\";\n\nimport {\n emailValidation,\n maxLengthValidation,\n maxValueValidation,\n minLengthValidation,\n minValueValidation,\n requiredValidation\n} from \"../utils/validation\";\nimport {\n ConfigForSchemaWrapOptions,\n convertToDate,\n findRefs,\n isStringWithVal,\n mergeFormFields,\n toWrapOptions\n} from \"../utils/internal\";\n\nimport {DynamicFormBuilderService} from \"./dynamic-form-builder.service\";\n\n@Injectable()\nexport class DynamicFormSchemaService {\n\n get api(): IApiService {\n return this.openApi.api;\n }\n\n get language(): ILanguageService {\n return this.api.language;\n }\n\n constructor(protected readonly openApi: OpenApiService,\n protected readonly injector: Injector,\n protected readonly builder: DynamicFormBuilderService) {\n }\n\n async getSchema(name: string): Promise<IOpenApiSchema> {\n return this.openApi.getSchema(name);\n }\n\n async getFormFieldsForSchema(name: string,\n parent: FormFieldConfig,\n customizeOrOptions: CustomizerOrSchemaOptions): Promise<FormFieldConfig[]> {\n const schema = await this.getSchema(name);\n if (!schema) return [];\n const options = await toWrapOptions(customizeOrOptions, this.injector, schema);\n const keys = Object.keys(schema.properties || {});\n const fields: FormFieldConfig[] = [];\n // Collect all properties of this schema def\n for (const key of keys) {\n const property = schema.properties[key];\n const propFields = await this.getFormFieldsForProp(property, schema, options, parent);\n fields.push(...propFields);\n }\n return this.builder.createFieldSets(\n fields.filter(f => null !== f),\n parent, options\n );\n }\n\n protected async getFormFieldsForProp(property: IOpenApiSchemaProperty, schema: IOpenApiSchema, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormFieldConfig[]> {\n const field = await this.getFormFieldForProp(property, options, parent);\n return !field ? [] : options.customize(field, property, schema);\n }\n\n protected async getFormFieldForProp(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormFieldConfig> {\n const $enum = property.items?.enum || property.enum;\n if (Array.isArray($enum) || isStringWithVal(property.optionsPath) || isStringWithVal(property.endpoint)) {\n return this.getFormSelectConfig(property, options, parent);\n }\n switch (property.type) {\n case \"string\":\n case \"number\":\n case \"integer\":\n case \"textarea\":\n // if (this.checkIsEditorProperty(property)) {\n // return this.getFormEditorConfig(property, options, parent);\n // }\n if (property.format == \"textarea\") {\n return this.getFormTextareaConfig(property, options, parent);\n }\n if (property.format == \"date\" || property.format == \"date-time\") {\n return this.getFormDatepickerConfig(property, options, parent);\n }\n return this.getFormInputConfig(property, options, parent);\n // case \"object\":\n // return this.getFormEditorConfig(property, options, parent);\n case \"boolean\":\n return this.getFormCheckboxConfig(property, options, parent);\n case \"array\":\n return this.getFormArrayConfig(property, options, parent);\n case \"file\":\n case \"upload\":\n return this.getFormUploadConfig(property, options, parent);\n }\n if (findRefs(property).length > 0) {\n return this.getFormGroupConfig(property, options, parent);\n }\n return null;\n }\n\n protected getFormFieldData(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions): FormFieldData {\n const validators: Validators = {};\n const schema = options.schema;\n if (ObjectUtils.isArray(schema.required) && schema.required.indexOf(property.id) >= 0) {\n validators.required = requiredValidation();\n }\n this.addPropertyValidators(validators, property);\n this.addItemsValidators(validators, property.items);\n return {\n hidden: property.hidden === true,\n fieldSet: property.fieldSet,\n classes: property.classes,\n validators\n };\n }\n\n protected async getFormArrayConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormFieldConfig> {\n return this.builder.createFormArray(property.id, async sp => {\n const subSchemas = findRefs(property);\n if (subSchemas.length > 0) {\n const subModels = await Promise.all(\n subSchemas.map(s => this.getFormFieldsForSchema(s, sp, options))\n );\n return mergeFormFields(ObjectUtils.copy(subModels));\n }\n return this.getFormFieldForProp(property.items, options, null);\n }, {\n ...this.getFormFieldData(property, options),\n // initialCount: property.initialCount || 0,\n // sortable: property.sortable || false,\n useTabs: property.useTabs,\n tabsLabel: property.tabsLabel,\n addItem: property.addItem,\n insertItem: property.insertItem,\n cloneItem: property.cloneItem,\n moveItem: property.moveItem,\n removeItem: property.removeItem,\n clearItems: property.clearItems\n }, parent, options);\n }\n\n protected async getFormGroupConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormFieldConfig> {\n return this.builder.createFormGroup(property.id, async sp => {\n const subSchemas = findRefs(property);\n const subModels = await Promise.all(\n subSchemas.map(s => this.getFormFieldsForSchema(s, sp, options))\n );\n return mergeFormFields(subModels);\n }, {\n ...this.getFormFieldData(property, options),\n }, parent, options);\n }\n\n protected getFormInputConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n let type = StringUtils.has(property.id || \"\", \"password\", \"Password\") ? \"password\" : (property.format || property.type);\n switch (type) {\n case \"string\":\n type = \"text\";\n break;\n case \"boolean\":\n type = \"checkbox\";\n break;\n case \"textarea\":\n type = \"textarea\";\n break;\n case \"integer\":\n type = \"number\";\n break;\n }\n const sub = property.type == \"array\" ? property.items || property : property;\n return this.builder.createFormInput(property.id, {\n ...this.getFormFieldData(property, options),\n type,\n autocomplete: property.autocomplete,\n pattern: property.pattern,\n step: isNaN(sub.step) ? property.step : sub.step,\n min: sub.minimum,\n max: sub.maximum,\n minLength: sub.minLength,\n maxLength: sub.maxLength,\n placeholder: property.placeholder,\n indeterminate: property.indeterminate,\n suffix: property.suffix\n }, parent, options);\n }\n\n protected getFormTextareaConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n return this.builder.createFormInput(property.id, {\n ...this.getFormFieldData(property, options),\n type: \"textarea\",\n autocomplete: property.autoComplete,\n cols: property.cols || null,\n rows: property.rows || 10,\n minLength: property.minLength,\n maxLength: property.maxLength,\n placeholder: property.placeholder || \"\"\n }, parent, options);\n }\n\n // getFormEditorConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrap): DynamicEditorModelConfig {\n // const sub = property.type == \"array\" ? property.items || property : property;\n // return Object.assign(\n // this.getFormControlConfig(property, options),\n // {\n // inputType: property.format || \"json\",\n // convertObject: property.type !== \"string\",\n // autoComplete: property.autoComplete || \"off\",\n // multiple: property.type == \"array\",\n // accept: ObjectUtils.isString(property.accept) ? property.accept : null,\n // mask: ObjectUtils.isString(property.mask) ? property.mask : null,\n // pattern: ObjectUtils.isString(property.pattern) ? property.pattern : null,\n // step: isNaN(sub.step) ? (isNaN(property.step) ? 1 : property.step) : sub.step,\n // minLength: isNaN(sub.minLength) ? 0 : sub.minLength,\n // maxLength: isNaN(sub.maxLength) ? MAX_INPUT_NUM : sub.maxLength,\n // placeholder: property.placeholder || \"\"\n // }\n // );\n // }\n\n protected getFormDatepickerConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n return this.builder.createFormInput(property.id, {\n ...this.getFormFieldData(property, options),\n type: property.format == \"date-time\" ? \"datetime-local\" : \"date\",\n // format: property.dateFormat || \"dd.MM.yyyy\",\n min: convertToDate(property.min),\n max: convertToDate(property.max),\n }, parent, options);\n }\n\n protected getFormSelectConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n return this.builder.createFormSelect(property.id, {\n ...this.getFormFieldData(property, options),\n options: field => this.getFormSelectOptions(property, options, field),\n type: property.format || \"select\",\n multiple: property.type == \"array\",\n groupBy: property.groupBy,\n allowEmpty: property.allowEmpty\n }, parent, options);\n }\n\n protected getFormUploadConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n return this.builder.createFormUpload(property.id, {\n ...this.getFormFieldData(property, options),\n multiple: property.type === \"array\",\n inline: property.inline,\n accept: property.accept,\n url: property.url,\n maxSize: property.maxSize,\n uploadOptions: property.uploadOptions\n }, parent, options);\n }\n\n protected getFormCheckboxConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig {\n return this.builder.createFormInput(property.id, {\n ...this.getFormFieldData(property, options),\n type: \"checkbox\",\n indeterminate: property.indeterminate || false\n }, parent, options);\n }\n\n protected getFormSelectOptions(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, field: FormFieldConfig): FormSelectOptions {\n const $enum = property.items?.enum || property.enum;\n if (Array.isArray($enum)) {\n return from(this.builder.fixSelectOptions(field, $enum.map(value => {\n const label = options.labelPrefix\n ? this.language.getTranslationSync(`${options.labelPrefix}.${property.id}.${value}`)\n : `${property.id}.${value}`;\n return {value, label};\n })));\n }\n if (isStringWithVal(property.endpoint)) {\n const entries = Object.entries((field.formControl.root as FormGroup)?.controls || {});\n const endpoint = entries.reduce((res, [key, control]) => {\n return this.replaceOptionsEndpoint(res, key, control?.value);\n }, `${property.endpoint}`);\n this.api.cache[endpoint] = this.api.cache[endpoint] || this.api.list(endpoint, this.api.makeListParams(1, -1)).then(result => {\n const items = ObjectUtils.isArray(result)\n ? result\n : (ObjectUtils.isArray(result.items) ? result.items : []);\n return items.map(i => {\n const item = ObjectUtils.isObject(i) ? i : {id: i};\n return {\n ...item,\n value: item.id || item._id,\n label: item[property.labelField] || item.label || item.id || item._id\n };\n });\n });\n const options = this.api.cache[endpoint] as Promise<FormSelectOption[]>;\n return from(options.then(opts => {\n return this.builder.fixSelectOptions(field, opts.map(o => Object.assign({}, o)))\n }));\n }\n let path = property.optionsPath as string;\n let control = field.formControl;\n let current = field;\n if (path.startsWith(\"$root\")) {\n path = path.substring(5);\n control = control.root || control;\n while (current.parent) {\n current = current.parent;\n }\n }\n while (path.startsWith(\".\")) {\n path = path.substring(1);\n control = control.parent || control;\n current = current.parent || current;\n }\n control = !path ? control : control.get(path);\n return control.valueChanges.pipe(\n startWith(control.value),\n distinctUntilChanged(),\n switchMap(async (controlVal) => {\n const currentOpts = current.props.options;\n const finalOpts = isObservable(currentOpts)\n ? await firstValueFrom(currentOpts)\n : (Array.isArray(currentOpts) ? currentOpts : []);\n return this.builder.fixSelectOptions(field, (!Array.isArray(controlVal) ? [] : controlVal).map(value => {\n const modelOption = finalOpts.find(t => t.value == value);\n return {value, label: modelOption?.label || value};\n }));\n })\n );\n }\n\n protected replaceOptionsEndpoint(endpoint: string, key: string, value: any): string {\n if (ObjectUtils.isObject(value)) {\n return Object.entries(value).reduce((res, [k, v]) => {\n return this.replaceOptionsEndpoint(res, `${key}.${k}`, v);\n }, endpoint)\n }\n if (ObjectUtils.isArray(value)) {\n return value.reduce((res, v, i) => {\n return this.replaceOptionsEndpoint(res, `${key}.${i}`, v);\n }, endpoint)\n }\n return endpoint.replace(new RegExp(`\\\\$${key}`, \"gi\"), `${value ?? \"\"}`);\n }\n\n protected showErrorsForGroup(formGroup: FormGroup): void {\n if (!formGroup) return;\n formGroup.markAsTouched({onlySelf: true});\n const controls = Object.keys(formGroup.controls).map(id => formGroup.controls[id]);\n this.showErrorsForControls(controls);\n }\n\n protected showErrorsForControls(controls: AbstractControl[]): void {\n controls.forEach(control => {\n if (control instanceof FormGroup) {\n this.showErrorsForGroup(control);\n return;\n }\n control.markAsTouched({onlySelf: true});\n if (control instanceof FormArray) {\n this.showErrorsForControls(control.controls);\n }\n });\n }\n\n protected addPropertyValidators(validators: Validators, property: IOpenApiSchemaProperty): void {\n if (!property) return;\n if (!isNaN(property.minLength)) {\n validators.minLength = minLengthValidation(property.minLength);\n }\n if (!isNaN(property.maxLength)) {\n validators.maxLength = maxLengthValidation(property.maxLength);\n }\n if (!isNaN(property.minimum)) {\n validators.min = minValueValidation(property.minimum);\n }\n if (!isNaN(property.maximum)) {\n validators.max = maxValueValidation(property.maximum);\n }\n // if (isString(property.pattern) && property.pattern.length) {\n // validators.pattern = property.pattern;\n // }\n switch (property.format) {\n case \"email\":\n validators.email = emailValidation();\n break;\n }\n }\n\n protected addItemsValidators(validators: Validators, items: IOpenApiSchemaProperty): void {\n if (!items) return;\n if (!isNaN(items.minLength)) {\n validators.itemsMinLength = minLengthValidation(items.minLength, true);\n }\n if (!isNaN(items.maxLength)) {\n validators.itemsMaxLength = maxLengthValidation(items.maxLength, true);\n }\n if (!isNaN(items.minimum)) {\n validators.itemsMinValue = minValueValidation(items.minimum, true);\n }\n if (!isNaN(items.maximum)) {\n validators.itemsMaxValue = maxValueValidation(items.maximum, true);\n }\n }\n}\n","import {Inject, Injectable, Injector} from \"@angular/core\";\nimport {AbstractControl, FormArray, FormGroup} from \"@angular/forms\";\nimport {first} from \"rxjs\";\nimport {API_SERVICE, IApiService, ObjectUtils} from \"@stemy/ngx-utils\";\n\nimport {\n CustomizerOrSchemaOptions,\n FORM_ROOT_KEY,\n FormFieldConfig,\n FormSerializeResult,\n IDynamicForm\n} from \"../common-types\";\nimport {getFormValidationErrors, toWrapOptions} from \"../utils/internal\";\n\nimport {DynamicFormSchemaService} from \"./dynamic-form-schema.service\";\nimport {DynamicFormBuilderService} from \"./dynamic-form-builder.service\";\n\n@Injectable()\nexport class DynamicFormService {\n\n constructor(protected readonly fs: DynamicFormSchemaService,\n protected readonly fb: DynamicFormBuilderService,\n protected readonly injector: Injector,\n @Inject(API_SERVICE) protected readonly api: IApiService) {\n\n }\n\n async getFormFieldsForSchema(name: string, customizeOrOptions?: CustomizerOrSchemaOptions): Promise<FormFieldConfig[]> {\n const group = await this.getFormFieldGroupBySchemaName(name, customizeOrOptions, \"getFormFieldsForSchema\");\n return group.fieldGroup;\n }\n\n async getFormFieldGroupForSchema(name: string, customizeOrOptions?: CustomizerOrSchemaOptions): Promise<FormFieldConfig> {\n return this.getFormFieldGroupBySchemaName(name, customizeOrOptions, \"getFormFieldsForSchema\");\n }\n\n protected async getFormFieldGroupBySchemaName(name: string, customizeOrOptions: CustomizerOrSchemaOptions, restrictedMethod: string): Promise<FormFieldConfig> {\n const config = {\n key: FORM_ROOT_KEY,\n path: \"\",\n wrappers: [\"form-group\"]\n } as FormFieldConfig;\n const schema = await this.fs.getSchema(name);\n const wrapOptions = await toWrapOptions(\n customizeOrOptions, this.injector, schema,\n `\"DynamicFormService.${restrictedMethod}\" is called from a customizer, which is not allowed. Please use DynamicFormSchemaService instead!`\n );\n const fields = await this.fs.getFormFieldsForSchema(name, config, wrapOptions);\n const fieldGroup = [...fields];\n\n config.fieldGroup = fieldGroup;\n\n // There are no actual fields in the schema, or no schema exists\n if (fields.length === 0) return config;\n\n // Add id fields if necessary\n const idFields: FormFieldConfig[] = [\n this.fb.createFormInput(\"id\", {hidden: true}, null, wrapOptions),\n this.fb.createFormInput(\"_id\", {hidden: true}, null, wrapOptions)\n ];\n\n fieldGroup.unshift(...idFields\n .filter(t => !fields.some(c => c.key == t.key))\n );\n\n const root = await wrapOptions.customize(config, {\n id: FORM_ROOT_KEY,\n type: \"object\",\n properties: schema?.properties || {}\n }, schema);\n // Check if the customized root wrapper returned an array\n fields.length = 0;\n\n for (const model of root) {\n if (model.key === FORM_ROOT_KEY) {\n return model;\n } else {\n fields.push(model);\n }\n }\n\n return {\n ...config,\n fieldGroup: fields\n };\n }\n\n async validateForm(form: IDynamicForm, showErrors: boolean = true): Promise<any> {\n const group = form.group();\n if (!group) return Promise.resolve();\n return new Promise<any>((resolve, reject) => {\n group.statusChanges\n .pipe(first(status => status == \"VALID\" || status == \"INVALID\"))\n .subscribe(status => {\n if (showErrors) {\n this.showErrorsForGroup(group);\n }\n if (status == \"VALID\") {\n resolve(null);\n return;\n }\n reject(getFormValidationErrors(group.controls));\n });\n group.updateValueAndValidity();\n });\n }\n\n async serializeForm(form: IDynamicForm, validate: boolean = true): Promise<FormSerializeResult> {\n const fields = form.config();\n if (!fields) return null;\n if (validate) {\n await this.validateForm(form);\n }\n return this.serialize(fields);\n }\n\n async serialize(fields: FormFieldConfig[]): Promise<FormSerializeResult> {\n const result = {};\n if (!fields) return result;\n for (const field of fields) {\n const serializer = field.serializer;\n const key = `${field.key}`;\n if (ObjectUtils.isFunction(serializer)) {\n result[key] = await serializer(field, this.injector);\n continue;\n }\n if (field.hide && !field.serialize) {\n continue;\n }\n const control = field.formControl;\n if (field.fieldGroup) {\n const group = await this.serialize(field.fieldGroup);\n if (field.key) {\n result[key] = !field.fieldArray ? group : Object.values(group);\n continue;\n }\n Object.assign(result, group);\n continue;\n }\n result[key] = control.value;\n }\n return result;\n }\n\n protected showErrorsForGroup(formGroup: FormGroup): void {\n if (!formGroup) return;\n formGroup.markAsTouched({onlySelf: true});\n const controls = Object.keys(formGroup.controls).map(id => formGroup.controls[id]);\n this.showErrorsForControls(controls);\n }\n\n protected showErrorsForControls(controls: AbstractControl[]): void {\n controls.forEach(control => {\n if (control instanceof FormGroup) {\n this.showErrorsForGroup(control);\n return;\n }\n control.markAsTouched({onlySelf: true});\n if (control instanceof FormArray) {\n this.showErrorsForControls(control.controls);\n }\n });\n }\n}\n","import {\n computed,\n Directive,\n effect,\n ElementRef,\n HostBinding,\n HostListener,\n inject,\n input,\n output,\n Renderer2,\n signal\n} from \"@angular/core\";\nimport {outputToObservable} from \"@angular/core/rxjs-interop\";\nimport {debounceTime} from \"rxjs/operators\";\nimport {IAsyncMessage, TOASTER_SERVICE} from \"@stemy/ngx-utils\";\n\nimport {AsyncSubmitMethod, IDynamicForm} from \"../common-types\";\n\n@Directive({\n standalone: false,\n selector: \"[async-submit]\",\n exportAs: \"async-submit\"\n})\nexport class AsyncSubmitDirective {\n\n method = input<AsyncSubmitMethod>(null, {alias: \"async-submit\"});\n form = input<IDynamicForm>();\n context = input<any>();\n\n onSuccess = output<IAsyncMessage>();\n onError = output<IAsyncMessage>();\n\n toaster = inject(TOASTER_SERVICE);\n renderer = inject(Renderer2);\n elem = inject<ElementRef<HTMLElement>>(ElementRef);\n\n protected status = computed(() => {\n const form = this.form();\n return form?.status() || null;\n });\n\n protected group = computed(() => {\n const form = this.form();\n return form?.group() || null;\n });\n\n protected loading = signal(false);\n protected callback = signal<() => void>(null);\n\n @HostBinding(\"class.disabled\")\n get isDisabled(): boolean {\n return this.status() !== \"VALID\";\n }\n\n @HostBinding(\"class.loading\")\n get isLoading(): boolean {\n return this.loading();\n }\n\n constructor() {\n effect(() => {\n if (this.elem.nativeElement.tagName === \"BUTTON\") {\n this.renderer.setAttribute(this.elem.nativeElement, \"type\", \"button\");\n }\n });\n effect(() => {\n const status = this.status();\n const cb = this.callback();\n if (!cb || status == \"PENDING\") return;\n if (status === \"VALID\") {\n cb();\n }\n this.callback.set(null);\n });\n effect(() => {\n const form = this.form();\n if (!form) return;\n const sub = outputToObservable(form.onSubmit)\n .pipe(debounceTime(200)).subscribe(() => this.callMethod());\n return () => sub.unsubscribe();\n });\n }\n\n @HostListener(\"click\")\n click(): void {\n const status = this.status();\n if (status !== \"VALID\" && status !== \"INVALID\") {\n this.callback.set(() => this.callMethod());\n return;\n }\n this.callMethod();\n }\n\n callMethod(): void {\n if (this.loading()) return;\n this.loading.set(true);\n this.method()(this.form(), this.context).then(result => {\n this.loading.set(false);\n if (result) {\n this.onSuccess.emit(result);\n this.toaster.success(result.message, result.context);\n }\n }, reason => {\n if (!reason || !reason.message)\n throw new Error(\"Reason must implement IAsyncMessage interface\");\n this.loading.set(false);\n this.onError.emit(reason);\n this.toaster.error(reason.message, reason.context);\n });\n }\n}\n","import {AfterViewInit, Component, Directive, OnDestroy, TemplateRef, Type} from \"@angular/core\";\r\nimport {FieldType as CoreFieldType, ɵobserve as observe} from \"@ngx-formly/core\";\r\nimport {Subject} from \"rxjs\";\r\nimport type {MatFormField, MatFormFieldControl} from \"@angular/material/form-field\";\r\n\r\nimport {FormFieldType} from \"../../common-types\";\r\n\r\n@Component({\r\n standalone: false,\r\n selector: \"dynamic-field-type\",\r\n template: \"\"\r\n})\r\nexport class DynamicFieldType<F extends FormFieldType = FormFieldType> extends CoreFieldType<F> implements AfterViewInit, OnDestroy, MatFormFieldControl<any> {\r\n\r\n stateChanges = new Subject<void>();\r\n _errorState = false;\r\n _focused = false;\r\n\r\n ngOnDestroy() {\r\n delete (this.formField as any)?._control;\r\n this.stateChanges.complete();\r\n }\r\n\r\n setDescribedByIds(_ids: string[]): void {\r\n }\r\n\r\n onContainerClick(_event: MouseEvent): void {\r\n this.field.focus = true;\r\n this.stateChanges.next();\r\n }\r\n\r\n get errorState() {\r\n const showError = this.options!.showError!(this);\r\n if (showError !== this._errorState) {\r\n this._errorState = showError;\r\n this.stateChanges.next();\r\n }\r\n\r\n return showError;\r\n }\r\n\r\n get controlType() {\r\n if (this.props.type) {\r\n return this.props.type;\r\n }\r\n\r\n const type = this.field.type!;\r\n return type instanceof Type ? type.prototype.constructor.name : type;\r\n }\r\n\r\n get focused() {\r\n const focused = !!this.field.focus && !this.disabled;\r\n if (focused !== this._focused) {\r\n this._focused = focused;\r\n this.stateChanges.next();\r\n }\r\n return focused;\r\n }\r\n\r\n get disabled() {\r\n return !!this.props.disabled;\r\n }\r\n\r\n get required() {\r\n return !!this.props.required;\r\n }\r\n\r\n get placeholder() {\r\n return this.props.placeholder || \"\";\r\n }\r\n\r\n get shouldPlaceholderFloat() {\r\n return this.shouldLabelFloat;\r\n }\r\n\r\n get value() {\r\n return this.formControl?.value;\r\n }\r\n\r\n set value(value) {\r\n this.formControl?.patchValue(value);\r\n }\r\n\r\n get ngControl() {\r\n return this.formControl as any;\r\n }\r\n\r\n get empty() {\r\n return this.value == null || this.value === \"\";\r\n }\r\n\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n get formField(): MatFormField {\r\n return (this.field as any)?.[\"_formField\"];\r\n }\r\n\r\n ngAfterViewInit() {\r\n const control = this as MatFormFieldControl<any>;\r\n if (this.formField && control !== this.formField._control) {\r\n this.formField._control = control;\r\n\r\n // temporary fix for https://github.com/angular/material2/issues/6728\r\n const ngControl = control?.ngControl as any;\r\n if (ngControl?.valueAccessor?.hasOwnProperty(\"_formField\")) {\r\n ngControl.valueAccessor[\"_formField\"] = this.formField;\r\n }\r\n if (ngControl?.valueAccessor?.hasOwnProperty(\"_parentFormField\")) {\r\n ngControl.valueAccessor[\"_parentFormField\"] = this.formField;\r\n }\r\n\r\n [\"prefix\", \"suffix\", \"textPrefix\", \"textSuffix\"].forEach((type) =>\r\n observe<TemplateRef<any>>(\r\n this.field,\r\n [\"props\", type],\r\n ({currentValue}) =>\r\n currentValue &&\r\n Promise.resolve().then(() => {\r\n this.options.detectChanges!(this.field);\r\n }),\r\n ),\r\n );\r\n\r\n // https://github.com/angular/components/issues/16209\r\n const setDescribedByIds = control.setDescribedByIds.bind(control);\r\n control.setDescribedByIds = (ids: string[]) => {\r\n setTimeout(() => setDescribedByIds(ids));\r\n };\r\n }\r\n }\r\n}\r\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n Injector,\n input,\n output,\n ViewEncapsulation\n} from \"@angular/core\";\nimport {rxResource, toSignal} from \"@angular/core/rxjs-interop\";\nimport {FormGroup} from \"@angular/forms\";\nimport {Subject} from \"rxjs\";\nimport {FormlyFormOptions} from \"@ngx-formly/core\";\nimport {EventsService, LANGUAGE_SERVICE} from \"@stemy/ngx-utils\";\n\nimport {FormFieldChangeEvent, FormFieldConfig, FormFieldLabelCustomizer, IDynamicForm} from \"../../common-types\";\nimport {DynamicFormBuilderService} from \"../../services/dynamic-form-builder.service\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form\",\n templateUrl: \"./dynamic-form.component.html\",\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DynamicFormComponent implements IDynamicForm {\n\n protected readonly builder = inject(DynamicFormBuilderService);\n\n protected readonly events = inject(EventsService);\n\n protected readonly languages = inject(LANGUAGE_SERVICE);\n\n readonly labelPrefix = input<string>(\"label\");\n\n readonly labelCustomizer = input<FormFieldLabelCustomizer>(null);\n\n readonly testId = input<string>(\"\");\n\n readonly data = input<any>({});\n\n readonly fields = input<FormFieldConfig[]>(null);\n\n readonly fieldChanges = new Subject<FormFieldChangeEvent>();\n\n protected readonly language = toSignal(this.events.languageChanged, {\n initialValue: this.languages.currentLanguage\n });\n\n protected readonly enableTranslations = toSignal(this.events.translationsEnabled, {\n initialValue: this.languages.enableTranslations\n });\n\n readonly config = computed(() => {\n return this.fields() || this.builder.resolveFormFields(this.data()?.constructor, null, {\n labelPrefix: this.labelPrefix(),\n labelCustomizer: this.labelCustomizer(),\n testId: this.testId(),\n });\n });\n\n readonly group = computed(() => {\n this.config();\n return new FormGroup({});\n });\n\n protected readonly status$ = rxResource({\n request: () => this.group(),\n loader: p => p.request.statusChanges,\n defaultValue: \"PENDING\"\n });\n\n readonly status = computed(() => this.status$.value());\n\n readonly onSubmit = output<IDynamicForm>();\n\n readonly options: FormlyFormOptions = {\n fieldChanges: this.fieldChanges,\n formState: {\n injector: inject(Injector)\n }\n };\n\n constructor() {\n effect(() => {\n this.language();\n this.enableTranslations();\n this.config().forEach(field => {\n if (!field.options) return;\n this.options.detectChanges(field);\n });\n });\n }\n\n submit() {\n // TODO: Templ disable submit\n // this.onSubmit.emit(this);\n }\n\n reset() {\n this.options?.resetModel?.();\n }\n}\n","@if (config() && group()) {\n <form [formGroup]=\"group()\" (ngSubmit)=\"submit()\" autocomplete=\"off\" role=\"presentation\">\n <input type=\"submit\" [hidden]=\"true\" />\n <formly-form [model]=\"data()\"\n [fields]=\"config()\"\n [form]=\"group()\"\n [options]=\"options\"></formly-form>\n <ng-content></ng-content>\n </form>\n}\n","import {Component, signal, ViewEncapsulation} from \"@angular/core\";\nimport {FormArray} from \"@angular/forms\";\nimport {FieldArrayType} from \"@ngx-formly/core\";\nimport {FormFieldConfig} from \"../../common-types\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-array\",\n templateUrl: \"./dynamic-form-array.component.html\",\n encapsulation: ViewEncapsulation.None\n})\nexport class DynamicFormArrayComponent extends FieldArrayType<FormFieldConfig> {\n\n readonly currentTab = signal(0);\n\n clear(): void {\n const control = this.formControl as FormArray;\n while (control.length > 0) {\n this.remove(0);\n }\n }\n}\n","<label class=\"field-label\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n</label>\n<div class=\"field-container\">\n @if (props.useTabs) {\n <ul class=\"form-array-tabs\">\n @for (field of field.fieldGroup; track field.key; let ix = $index) {\n <li>\n <a class=\"btn\" [ngClass]=\"[currentTab() === ix ? 'btn-primary' : 'btn-secondary']\"\n (click)=\"currentTab.set(ix)\">\n {{ (field.formControl.value | getValue : props.tabsLabel) || ix + 1 }}\n </a>\n </li>\n }\n </ul>\n }\n @for (field of field.fieldGroup; track field.key; let ix = $index) {\n @if (!props.useTabs || ix === currentTab()) {\n <div class=\"form-array-item\">\n <div class=\"form-array-buttons\">\n @if (props.removeItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"remove(ix)\">\n <i icon=\"trash-outline\"></i>\n </button>\n }\n @if (props.insertItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"add(ix)\">\n <i icon=\"plus-outline\"></i>\n </button>\n }\n </div>\n <formly-field [field]=\"field\"></formly-field>\n </div>\n }\n }\n <div class=\"form-array-buttons\">\n @if (props.clearItems) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"clear()\">\n <i icon=\"trash-outline\"></i>\n {{ 'button.clear-items' | translate }}\n </button>\n }\n @if (props.addItem) {\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"add()\">\n <i icon=\"plus-outline\"></i>\n {{ 'button.insert-item' | translate }}\n </button>\n }\n </div>\n</div>\n","import {ChangeDetectionStrategy, Component, ViewEncapsulation} from \"@angular/core\";\nimport {DynamicFieldType} from \"../base/dynamic-field-type\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-chips\",\n templateUrl: \"./dynamic-form-chips.component.html\",\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DynamicFormChipsComponent extends DynamicFieldType {\n\n}\n","<chips [formControl]=\"formControl\"\n [type]=\"props.type\"\n [step]=\"props.step\"\n [minLength]=\"props.minLength\"\n [maxLength]=\"props.maxLength\"\n [min]=\"props.min\"\n [max]=\"props.max\"\n [multiple]=\"props.multiple\"\n [formlyAttributes]=\"field\">\n</chips>\n","import {Component, ViewEncapsulation} from \"@angular/core\";\nimport {FieldWrapper} from \"@ngx-formly/core\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-field\",\n templateUrl: \"./dynamic-form-field.component.html\",\n encapsulation: ViewEncapsulation.None\n})\nexport class DynamicFormFieldComponent extends FieldWrapper {\n\n}\n","<label class=\"field-label\" [for]=\"id\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n <span class=\"field-required\" *ngIf=\"props.required && props.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n</label>\n<div class=\"field-container\">\n <ng-container #fieldComponent></ng-container>\n <div *ngIf=\"showError\" class=\"field-errors invalid-feedback\">\n <formly-validation-message\n id=\"{{ id }}-formly-validation-error\"\n [field]=\"field\"\n role=\"alert\"\n ></formly-validation-message>\n </div>\n</div>\n","import {Component, inject, ViewEncapsulation} from \"@angular/core\";\nimport {FieldWrapper} from \"@ngx-formly/core\";\nimport {DynamicFormGroupComponent} from \"../dynamic-form-group/dynamic-form-group.component\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-fieldset\",\n templateUrl: \"./dynamic-form-fieldset.component.html\",\n encapsulation: ViewEncapsulation.None\n})\nexport class DynamicFormFieldsetComponent extends FieldWrapper {\n\n ngOnInit(): void {\n // console.log(this.field.id, this.field.props?.label, this.options);\n // console.log(this.field.parent);\n }\n}\n","<legend class=\"field-legend\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n</legend>\n<div class=\"field-container\">\n <ng-container #fieldComponent></ng-container>\n</div>\n","import {Component, ViewEncapsulation} from \"@angular/core\";\nimport {FieldWrapper} from \"@ngx-formly/core\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-group\",\n templateUrl: \"./dynamic-form-group.component.html\",\n encapsulation: ViewEncapsulation.None\n})\nexport class DynamicFormGroupComponent extends FieldWrapper {\n\n}\n","<label class=\"field-label\" *ngIf=\"props.label\">\n {{ props.label | translate }}\n <p class=\"field-description\" *ngIf=\"props.description\">{{ props.description | translate }}</p>\n</label>\n<ng-container #fieldComponent></ng-container>\n","import {ChangeDetectionStrategy, Component, ViewEncapsulation} from \"@angular/core\";\nimport {DynamicFieldType} from \"../base/dynamic-field-type\";\n\n@Component({\n standalone: false,\n selector: \"dynamic-form-upload\",\n templateUrl: \"./dynamic-form-upload.component.html\",\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DynamicFormUploadComponent extends DynamicFieldType {\n\n}\n","<upload [formControl]=\"formControl\"\n [multiple]=\"props.multiple\"\n [inline]=\"props.inline\"\n [accept]=\"props.accept\"\n [baseUrl]=\"props.url\"\n [makeUpload]=\"props.createUploadData\"\n [formlyAttributes]=\"field\">\n</upload>\n","import {AsyncSubmitDirective} from \"./directives/async-submit.directive\";\n\nimport {DynamicFieldType} from \"./components/base/dynamic-field-type\";\nimport {DynamicFormComponent} from \"./components/dynamic-form/dynamic-form.component\";\nimport {DynamicFormArrayComponent} from \"./components/dynamic-form-array/dynamic-form-array.component\";\nimport {DynamicFormChipsComponent} from \"./components/dynamic-form-chips/dynamic-form-chips.component\";\nimport {DynamicFormFieldComponent} from \"./components/dynamic-form-field/dynamic-form-field.component\";\nimport {DynamicFormFieldsetComponent} from \"./components/dynamic-form-fieldset/dynamic-form-fieldset.component\";\nimport {DynamicFormGroupComponent} from \"./components/dynamic-form-group/dynamic-form-group.component\";\nimport {DynamicFormUploadComponent} from \"./components/dynamic-form-upload/dynamic-form-upload.component\";\n\n// --- Components ---\nexport const components = [\n DynamicFieldType,\n DynamicFormComponent,\n DynamicFormArrayComponent,\n DynamicFormChipsComponent,\n DynamicFormFieldComponent,\n DynamicFormFieldsetComponent,\n DynamicFormGroupComponent,\n DynamicFormUploadComponent\n];\n\n// --- Directives ---\nexport const directives = [\n AsyncSubmitDirective,\n];\n\n// --- Pipes ---\nexport const pipes = [];\n","import {EnvironmentProviders, makeEnvironmentProviders, ModuleWithProviders, NgModule, Provider} from \"@angular/core\";\nimport {CommonModule} from \"@angular/common\";\nimport {FormsModule, ReactiveFormsModule} from \"@angular/forms\";\nimport {FormlyModule, FormlyConfig, FormlyFormBuilder, provideFormlyCore, provideFormlyConfig} from \"@ngx-formly/core\";\nimport {NgxUtilsModule} from \"@stemy/ngx-utils\";\n\nimport {components, directives, pipes} from \"./ngx-dynamic-form.imports\";\n\nimport {IDynamicFormModuleConfig} from \"./common-types\";\n\nimport {DynamicFormService} from \"./services/dynamic-form.service\";\nimport {DynamicFormBuilderService} from \"./services/dynamic-form-builder.service\";\nimport {DynamicFormSchemaService} from \"./services/dynamic-form-schema.service\";\n\nimport {DynamicFormArrayComponent} from \"./components/dynamic-form-array/dynamic-form-array.component\";\nimport {DynamicFormChipsComponent} from \"./components/dynamic-form-chips/dynamic-form-chips.component\";\nimport {DynamicFormGroupComponent} from \"./components/dynamic-form-group/dynamic-form-group.component\";\nimport {DynamicFormFieldComponent} from \"./components/dynamic-form-field/dynamic-form-field.component\";\nimport {DynamicFormFieldsetComponent} from \"./components/dynamic-form-fieldset/dynamic-form-fieldset.component\";\nimport {DynamicFormUploadComponent} from \"./components/dynamic-form-upload/dynamic-form-upload.component\";\n\n@NgModule({\n declarations: [\n ...components,\n ...directives,\n ...pipes\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NgxUtilsModule,\n FormlyModule\n ],\n exports: [\n ...components,\n ...directives,\n ...pipes,\n FormsModule,\n ReactiveFormsModule,\n NgxUtilsModule,\n FormlyModule\n ],\n providers: [\n ...pipes\n ]\n})\nexport class NgxDynamicFormModule {\n\n private static getProviders(config?: IDynamicFormModuleConfig): Provider[] {\n const formlyConfigs = (config?.options || []).map(provideFormlyConfig);\n return [\n provideFormlyCore({\n types: [\n {name: \"array\", component: DynamicFormArrayComponent},\n {name: \"chips\", component: DynamicFormChipsComponent, wrappers: [\"form-field\"]},\n {name: \"upload\", component: DynamicFormUploadComponent, wrappers: [\"form-field\"]}\n ],\n wrappers: [\n { name: \"form-field\", component: DynamicFormFieldComponent },\n { name: \"form-fieldset\", component: DynamicFormFieldsetComponent },\n { name: \"form-group\", component: DynamicFormGroupComponent }\n ],\n extras: {\n renderFormlyFieldElement: false\n }\n }),\n ...formlyConfigs,\n DynamicFormService,\n DynamicFormBuilderService,\n DynamicFormSchemaService\n ];\n }\n\n static forRoot(config?: IDynamicFormModuleConfig): ModuleWithProviders<NgxDynamicFormModule> {\n return {\n ngModule: NgxDynamicFormModule,\n providers: NgxDynamicFormModule.getProviders(config)\n }\n }\n\n static provideForms(config?: IDynamicFormModuleConfig): EnvironmentProviders {\n return makeEnvironmentProviders(NgxDynamicFormModule.getProviders(config));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["FormGroup","FormArray","i1","i2.DynamicFormBuilderService","CoreFieldType","observe","i2","i3"],"mappings":";;;;;;;;;;;;;;AAcA;AACO,MAAM,aAAa,GAAG;;ACUb,SAAA,kBAAkB,CAAC,GAAG,SAAiD,EAAA;AACnF,IAAA,MAAM,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC;AACxC,IAAA,OAAO,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,K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,GAAG;AACN;AACJ,iBAAA;;;AC9CD;;AAEG;;;;"}
@@ -147,6 +147,7 @@ export interface ConfigForSchemaOptions extends FormBuilderOptions {
147
147
  }
148
148
  export type CustomizerOrSchemaOptions = FormFieldCustomizer | ConfigForSchemaOptions;
149
149
  export declare type AsyncSubmitMethod = (form: IDynamicForm, context?: any) => Promise<IAsyncMessage>;
150
- export interface IDynamicFormModuleConfig extends Pick<ConfigOption, "types" | "wrappers" | "extras"> {
150
+ export interface IDynamicFormModuleConfig {
151
+ options?: ConfigOption[];
151
152
  }
152
153
  export {};
@@ -0,0 +1,30 @@
1
+ import { AfterViewInit, OnDestroy } from "@angular/core";
2
+ import { FieldType as CoreFieldType } from "@ngx-formly/core";
3
+ import { Subject } from "rxjs";
4
+ import type { MatFormField, MatFormFieldControl } from "@angular/material/form-field";
5
+ import { FormFieldType } from "../../common-types";
6
+ import * as i0 from "@angular/core";
7
+ export declare class DynamicFieldType<F extends FormFieldType = FormFieldType> extends CoreFieldType<F> implements AfterViewInit, OnDestroy, MatFormFieldControl<any> {
8
+ stateChanges: Subject<void>;
9
+ _errorState: boolean;
10
+ _focused: boolean;
11
+ ngOnDestroy(): void;
12
+ setDescribedByIds(_ids: string[]): void;
13
+ onContainerClick(_event: MouseEvent): void;
14
+ get errorState(): boolean;
15
+ get controlType(): any;
16
+ get focused(): boolean;
17
+ get disabled(): boolean;
18
+ get required(): boolean;
19
+ get placeholder(): string;
20
+ get shouldPlaceholderFloat(): boolean;
21
+ get value(): any;
22
+ set value(value: any);
23
+ get ngControl(): any;
24
+ get empty(): boolean;
25
+ get shouldLabelFloat(): boolean;
26
+ get formField(): MatFormField;
27
+ ngAfterViewInit(): void;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFieldType<any>, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFieldType<any>, "dynamic-field-type", never, {}, {}, never, never, false, never>;
30
+ }
@@ -1,7 +1,6 @@
1
- import { FieldType } from "@ngx-formly/core";
2
- import { FormFieldType } from "../../common-types";
1
+ import { DynamicFieldType } from "../base/dynamic-field-type";
3
2
  import * as i0 from "@angular/core";
4
- export declare class DynamicFormChipsComponent extends FieldType<FormFieldType> {
3
+ export declare class DynamicFormChipsComponent extends DynamicFieldType {
5
4
  static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormChipsComponent, never>;
6
5
  static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormChipsComponent, "dynamic-form-chips", never, {}, {}, never, never, false, never>;
7
6
  }
@@ -1,7 +1,6 @@
1
- import { FieldType } from "@ngx-formly/core";
2
- import { FormFieldType } from "../../common-types";
1
+ import { DynamicFieldType } from "../base/dynamic-field-type";
3
2
  import * as i0 from "@angular/core";
4
- export declare class DynamicFormUploadComponent extends FieldType<FormFieldType> {
3
+ export declare class DynamicFormUploadComponent extends DynamicFieldType {
5
4
  static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormUploadComponent, never>;
6
5
  static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormUploadComponent, "dynamic-form-upload", never, {}, {}, never, never, false, never>;
7
6
  }
@@ -1,23 +1,24 @@
1
1
  import { EnvironmentProviders, ModuleWithProviders } from "@angular/core";
2
2
  import { IDynamicFormModuleConfig } from "./common-types";
3
3
  import * as i0 from "@angular/core";
4
- import * as i1 from "./components/dynamic-form/dynamic-form.component";
5
- import * as i2 from "./components/dynamic-form-array/dynamic-form-array.component";
6
- import * as i3 from "./components/dynamic-form-chips/dynamic-form-chips.component";
7
- import * as i4 from "./components/dynamic-form-field/dynamic-form-field.component";
8
- import * as i5 from "./components/dynamic-form-fieldset/dynamic-form-fieldset.component";
9
- import * as i6 from "./components/dynamic-form-group/dynamic-form-group.component";
10
- import * as i7 from "./components/dynamic-form-upload/dynamic-form-upload.component";
11
- import * as i8 from "./directives/async-submit.directive";
12
- import * as i9 from "@angular/common";
13
- import * as i10 from "@angular/forms";
14
- import * as i11 from "@stemy/ngx-utils";
15
- import * as i12 from "@ngx-formly/core";
4
+ import * as i1 from "./components/base/dynamic-field-type";
5
+ import * as i2 from "./components/dynamic-form/dynamic-form.component";
6
+ import * as i3 from "./components/dynamic-form-array/dynamic-form-array.component";
7
+ import * as i4 from "./components/dynamic-form-chips/dynamic-form-chips.component";
8
+ import * as i5 from "./components/dynamic-form-field/dynamic-form-field.component";
9
+ import * as i6 from "./components/dynamic-form-fieldset/dynamic-form-fieldset.component";
10
+ import * as i7 from "./components/dynamic-form-group/dynamic-form-group.component";
11
+ import * as i8 from "./components/dynamic-form-upload/dynamic-form-upload.component";
12
+ import * as i9 from "./directives/async-submit.directive";
13
+ import * as i10 from "@angular/common";
14
+ import * as i11 from "@angular/forms";
15
+ import * as i12 from "@stemy/ngx-utils";
16
+ import * as i13 from "@ngx-formly/core";
16
17
  export declare class NgxDynamicFormModule {
17
18
  private static getProviders;
18
19
  static forRoot(config?: IDynamicFormModuleConfig): ModuleWithProviders<NgxDynamicFormModule>;
19
20
  static provideForms(config?: IDynamicFormModuleConfig): EnvironmentProviders;
20
21
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxDynamicFormModule, never>;
21
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxDynamicFormModule, [typeof i1.DynamicFormComponent, typeof i2.DynamicFormArrayComponent, typeof i3.DynamicFormChipsComponent, typeof i4.DynamicFormFieldComponent, typeof i5.DynamicFormFieldsetComponent, typeof i6.DynamicFormGroupComponent, typeof i7.DynamicFormUploadComponent, typeof i8.AsyncSubmitDirective], [typeof i9.CommonModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.NgxUtilsModule, typeof i12.FormlyModule], [typeof i1.DynamicFormComponent, typeof i2.DynamicFormArrayComponent, typeof i3.DynamicFormChipsComponent, typeof i4.DynamicFormFieldComponent, typeof i5.DynamicFormFieldsetComponent, typeof i6.DynamicFormGroupComponent, typeof i7.DynamicFormUploadComponent, typeof i8.AsyncSubmitDirective, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.NgxUtilsModule, typeof i12.FormlyModule]>;
22
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxDynamicFormModule, [typeof i1.DynamicFieldType, typeof i2.DynamicFormComponent, typeof i3.DynamicFormArrayComponent, typeof i4.DynamicFormChipsComponent, typeof i5.DynamicFormFieldComponent, typeof i6.DynamicFormFieldsetComponent, typeof i7.DynamicFormGroupComponent, typeof i8.DynamicFormUploadComponent, typeof i9.AsyncSubmitDirective], [typeof i10.CommonModule, typeof i11.FormsModule, typeof i11.ReactiveFormsModule, typeof i12.NgxUtilsModule, typeof i13.FormlyModule], [typeof i1.DynamicFieldType, typeof i2.DynamicFormComponent, typeof i3.DynamicFormArrayComponent, typeof i4.DynamicFormChipsComponent, typeof i5.DynamicFormFieldComponent, typeof i6.DynamicFormFieldsetComponent, typeof i7.DynamicFormGroupComponent, typeof i8.DynamicFormUploadComponent, typeof i9.AsyncSubmitDirective, typeof i11.FormsModule, typeof i11.ReactiveFormsModule, typeof i12.NgxUtilsModule, typeof i13.FormlyModule]>;
22
23
  static ɵinj: i0.ɵɵInjectorDeclaration<NgxDynamicFormModule>;
23
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-dynamic-form",
3
- "version": "19.4.0",
3
+ "version": "19.4.1",
4
4
  "license": "MIT",
5
5
  "public": true,
6
6
  "repository": "https://github.com/stemyke/ngx-dynamic-form.git",
@@ -24,7 +24,11 @@
24
24
  "json5": "^2.2.3",
25
25
  "@stemy/ngx-utils": ">=19.5.3",
26
26
  "@ngx-formly/core": "^7.0.0",
27
- "ngx-mask": "^17.1.8"
27
+ "ngx-mask": "^19.0.7",
28
+ "@angular/material": "^19.2.18"
29
+ },
30
+ "optionalDependencies": {
31
+ "@angular/material": "^19.2.18"
28
32
  },
29
33
  "main": "dist/bundles/stemy-ngx-dynamic-form.umd.js",
30
34
  "module": "fesm2022/stemy-ngx-dynamic-form.mjs",
package/public_api.d.ts CHANGED
@@ -7,6 +7,7 @@ export { DynamicFormBuilderService } from "./ngx-dynamic-form/services/dynamic-f
7
7
  export { DynamicFormSchemaService } from "./ngx-dynamic-form/services/dynamic-form-schema.service";
8
8
  export { DynamicFormService } from "./ngx-dynamic-form/services/dynamic-form.service";
9
9
  export { AsyncSubmitDirective } from "./ngx-dynamic-form/directives/async-submit.directive";
10
+ export { DynamicFieldType } from "./ngx-dynamic-form/components/base/dynamic-field-type";
10
11
  export { DynamicFormComponent } from "./ngx-dynamic-form/components/dynamic-form/dynamic-form.component";
11
12
  export { DynamicFormArrayComponent } from "./ngx-dynamic-form/components/dynamic-form-array/dynamic-form-array.component";
12
13
  export { DynamicFormChipsComponent } from "./ngx-dynamic-form/components/dynamic-form-chips/dynamic-form-chips.component";