@messaia/cdk 13.3.4 → 13.3.5-rc01
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/base/components/generic-form-base.component.mjs +15 -13
- package/esm2020/lib/forms/components/generic-form/generic-form.component.mjs +1 -1
- package/esm2020/lib/forms/forms.module.mjs +3 -3
- package/esm2020/lib/forms/functions/decorators.mjs +24 -34
- package/esm2020/lib/forms/functions/functions.mjs +10 -4
- package/esm2020/lib/forms/models/form-field-definition.mjs +1 -1
- package/esm2020/lib/forms/models/form-field-group-definition.mjs +12 -0
- package/fesm2015/messaia-cdk.mjs +68 -70
- package/fesm2015/messaia-cdk.mjs.map +1 -1
- package/fesm2020/messaia-cdk.mjs +68 -70
- package/fesm2020/messaia-cdk.mjs.map +1 -1
- package/lib/base/components/generic-form-base.component.d.ts +2 -2
- package/lib/forms/components/generic-form/generic-form.component.d.ts +2 -2
- package/lib/forms/forms.module.d.ts +2 -2
- package/lib/forms/functions/decorators.d.ts +4 -2
- package/lib/forms/functions/functions.d.ts +3 -3
- package/lib/forms/models/form-field-definition.d.ts +2 -0
- package/lib/forms/models/{form-field-group.d.ts → form-field-group-definition.d.ts} +5 -2
- package/package.json +1 -1
- package/esm2020/lib/forms/models/form-field-group.mjs +0 -12
package/fesm2020/messaia-cdk.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { HttpParams, HttpClient, HttpRequest, HttpHeaders, HttpEventType, HttpRe
|
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { Directive, Input, Pipe, HostListener, Component, NgModule, Injectable, Injector, ViewEncapsulation, COMPILER_OPTIONS, CompilerFactory, Compiler, ContentChildren, Optional, SkipSelf, NgZone, ElementRef, ViewChildren, ViewChild, forwardRef, ContentChild, EventEmitter, ViewContainerRef, Output, LOCALE_ID, Inject, HostBinding, Self, Attribute, SecurityContext } from '@angular/core';
|
|
7
7
|
import * as i1 from '@angular/forms';
|
|
8
|
-
import { FormControlName, FormControlDirective, FormGroup
|
|
8
|
+
import { FormControlName, FormControlDirective, FormGroup, NG_VALUE_ACCESSOR, FormArray, FormControl, NG_ASYNC_VALIDATORS, NG_VALIDATORS, AbstractControl, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import * as i1$2 from '@angular/material/dialog';
|
|
10
10
|
import { MatDialogConfig, MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
11
11
|
import { MatExpansionPanel } from '@angular/material/expansion';
|
|
@@ -3130,7 +3130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
3130
3130
|
|
|
3131
3131
|
const formFieldGroupMetadataKey = Symbol('vdFormFieldGroup');
|
|
3132
3132
|
|
|
3133
|
-
class
|
|
3133
|
+
class FormFieldGroupDefinition {
|
|
3134
3134
|
/**
|
|
3135
3135
|
* constructor
|
|
3136
3136
|
* @param init
|
|
@@ -3158,14 +3158,20 @@ function getFormGroupsOld(origin) {
|
|
|
3158
3158
|
*/
|
|
3159
3159
|
function getFormGroups(origin) {
|
|
3160
3160
|
const grouped = Utils.groupArrayBy(Reflect.getMetadata(formFieldGroupMetadataKey, origin), x => x.groupName);
|
|
3161
|
-
return Array.from(grouped).map(([_, value]) => new
|
|
3161
|
+
return Array.from(grouped).map(([_, value]) => new FormFieldGroupDefinition({
|
|
3162
3162
|
name: value[0].groupName || null,
|
|
3163
3163
|
header: value[0].groupHeader,
|
|
3164
3164
|
fields: value,
|
|
3165
|
+
type: value[0].groupObjectType,
|
|
3166
|
+
instance: value[0].groupObjectInstance,
|
|
3165
3167
|
groups: Object.values((value).reduce(function (r, a) {
|
|
3166
3168
|
r[a.row] = (r[a.row] || []);
|
|
3167
3169
|
r[a.row].push(a);
|
|
3168
|
-
r[a.row].forEach((x, i) =>
|
|
3170
|
+
r[a.row].forEach((x, i) => {
|
|
3171
|
+
x.index = x.index || i;
|
|
3172
|
+
delete x.groupObjectType;
|
|
3173
|
+
delete x.groupObjectInstance;
|
|
3174
|
+
});
|
|
3169
3175
|
Utils.sortArray(r[a.row], 'index');
|
|
3170
3176
|
return r;
|
|
3171
3177
|
}, Object.create(null)))
|
|
@@ -3470,12 +3476,14 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
3470
3476
|
validateForm(form = null) {
|
|
3471
3477
|
var form = form || this.form;
|
|
3472
3478
|
/* Set the form as submitted */
|
|
3473
|
-
if (form && form instanceof FormGroup
|
|
3479
|
+
if (form && form instanceof FormGroup) {
|
|
3474
3480
|
/* Set form as submitted */
|
|
3475
3481
|
form['submitted'] = true;
|
|
3476
3482
|
/* Update value and validity */
|
|
3477
3483
|
form.updateValueAndValidity();
|
|
3478
3484
|
}
|
|
3485
|
+
/* Print some debug information */
|
|
3486
|
+
this.debugForm(form);
|
|
3479
3487
|
}
|
|
3480
3488
|
/**
|
|
3481
3489
|
* Validates the form
|
|
@@ -3483,9 +3491,7 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
3483
3491
|
*/
|
|
3484
3492
|
isFormValid(form = null) {
|
|
3485
3493
|
/* Print some debug information */
|
|
3486
|
-
|
|
3487
|
-
this.debugForm(form);
|
|
3488
|
-
}
|
|
3494
|
+
this.debugForm(form);
|
|
3489
3495
|
/* If the form ist not valid.. */
|
|
3490
3496
|
if (!form.valid) {
|
|
3491
3497
|
/* Mark invalid controls as dirtty and touched */
|
|
@@ -3559,15 +3565,17 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
3559
3565
|
* @param form
|
|
3560
3566
|
*/
|
|
3561
3567
|
debugForm(form = null) {
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3568
|
+
if (this.debug) {
|
|
3569
|
+
console.log('Form:', form);
|
|
3570
|
+
Object.keys(form.controls).forEach(key => {
|
|
3571
|
+
const controlErrors = form.controls[key].errors;
|
|
3572
|
+
if (controlErrors != null) {
|
|
3573
|
+
Object.keys(controlErrors).forEach(keyError => {
|
|
3574
|
+
console.log('Key control: ' + key + ', keyError: ' + keyError + ', err value: ', controlErrors[keyError]);
|
|
3575
|
+
});
|
|
3576
|
+
}
|
|
3577
|
+
});
|
|
3578
|
+
}
|
|
3571
3579
|
}
|
|
3572
3580
|
/**
|
|
3573
3581
|
* Add toolbar menu items
|
|
@@ -6987,10 +6995,10 @@ function isResetControl(controlName, control, options) {
|
|
|
6987
6995
|
isReset = control instanceof FormControl;
|
|
6988
6996
|
break;
|
|
6989
6997
|
case ResetFormType.ControlsAndFormGroupsOnly:
|
|
6990
|
-
isReset = control instanceof FormControl || control instanceof FormGroup
|
|
6998
|
+
isReset = control instanceof FormControl || control instanceof FormGroup;
|
|
6991
6999
|
break;
|
|
6992
7000
|
case ResetFormType.FormGroupsOnly:
|
|
6993
|
-
isReset = control instanceof FormGroup
|
|
7001
|
+
isReset = control instanceof FormGroup;
|
|
6994
7002
|
break;
|
|
6995
7003
|
case ResetFormType.FormArraysOnly:
|
|
6996
7004
|
isReset = control instanceof FormArray;
|
|
@@ -7031,7 +7039,7 @@ function getNestedOptions(controlName, options) {
|
|
|
7031
7039
|
return undefined;
|
|
7032
7040
|
}
|
|
7033
7041
|
|
|
7034
|
-
class RxFormGroup extends FormGroup
|
|
7042
|
+
class RxFormGroup extends FormGroup {
|
|
7035
7043
|
constructor(model, entityObject, controls, validatorOrOpts, asyncValidator) {
|
|
7036
7044
|
super(controls, validatorOrOpts, asyncValidator);
|
|
7037
7045
|
this.model = model;
|
|
@@ -7098,7 +7106,7 @@ class RxFormGroup extends FormGroup$1 {
|
|
|
7098
7106
|
let isDirty = false;
|
|
7099
7107
|
for (let name in this.value) {
|
|
7100
7108
|
let currentValue = this.modelInstance[name];
|
|
7101
|
-
if (!(this.controls[name] instanceof FormGroup
|
|
7109
|
+
if (!(this.controls[name] instanceof FormGroup || this.controls[name] instanceof FormArray)) {
|
|
7102
7110
|
isDirty = ApplicationUtil.notEqualTo(this.baseObject[name], currentValue);
|
|
7103
7111
|
}
|
|
7104
7112
|
else if (this.controls[name] instanceof RxFormGroup)
|
|
@@ -7117,7 +7125,7 @@ class RxFormGroup extends FormGroup$1 {
|
|
|
7117
7125
|
resetForm(options) {
|
|
7118
7126
|
for (let name in this.controls) {
|
|
7119
7127
|
if (isResetControl(name, this.controls[name], options)) {
|
|
7120
|
-
if (this.controls[name] instanceof FormGroup
|
|
7128
|
+
if (this.controls[name] instanceof FormGroup)
|
|
7121
7129
|
this.controls[name].resetForm(getNestedOptions(name, options));
|
|
7122
7130
|
else if (this.controls[name] instanceof FormArray) {
|
|
7123
7131
|
this.controls[name].resetForm(options && options.value ? options.value[name] : undefined);
|
|
@@ -7133,7 +7141,7 @@ class RxFormGroup extends FormGroup$1 {
|
|
|
7133
7141
|
}
|
|
7134
7142
|
commit() {
|
|
7135
7143
|
for (let name in this.controls) {
|
|
7136
|
-
if (this.controls[name] instanceof FormGroup
|
|
7144
|
+
if (this.controls[name] instanceof FormGroup)
|
|
7137
7145
|
this.controls[name].commit();
|
|
7138
7146
|
else if (this.controls[name] instanceof FormArray) {
|
|
7139
7147
|
this.controls[name].commit();
|
|
@@ -7164,7 +7172,7 @@ class RxFormGroup extends FormGroup$1 {
|
|
|
7164
7172
|
getErrorSummary(onlyMessage) {
|
|
7165
7173
|
let jObject = {};
|
|
7166
7174
|
Object.keys(this.controls).forEach(columnName => {
|
|
7167
|
-
if (this.controls[columnName] instanceof FormGroup
|
|
7175
|
+
if (this.controls[columnName] instanceof FormGroup) {
|
|
7168
7176
|
let error = this.controls[columnName].getErrorSummary(false);
|
|
7169
7177
|
if (Object.keys(error).length > 0)
|
|
7170
7178
|
jObject[columnName] = error;
|
|
@@ -7197,7 +7205,7 @@ class RxFormGroup extends FormGroup$1 {
|
|
|
7197
7205
|
}
|
|
7198
7206
|
valueChangedSync() {
|
|
7199
7207
|
Object.keys(this.controls).forEach(columnName => {
|
|
7200
|
-
if (!(this.controls[columnName] instanceof FormArray || this.controls[columnName] instanceof RxFormArray) && !(this.controls[columnName] instanceof FormGroup
|
|
7208
|
+
if (!(this.controls[columnName] instanceof FormArray || this.controls[columnName] instanceof RxFormArray) && !(this.controls[columnName] instanceof FormGroup || this.controls[columnName] instanceof RxFormGroup) && !(this.entityObject[columnName] instanceof FormControl || this.entityObject[columnName] instanceof RxFormControl) && this.controls[columnName].getControlValue && ApplicationUtil.notEqualTo(this.controls[columnName].getControlValue(), this.entityObject[columnName])) {
|
|
7201
7209
|
this.controls[columnName].setValue(this.entityObject[columnName], { updateChanged: true });
|
|
7202
7210
|
}
|
|
7203
7211
|
else if ((this.controls[columnName] instanceof FormArray || this.controls[columnName] instanceof RxFormArray)) {
|
|
@@ -7212,7 +7220,7 @@ class RxFormGroup extends FormGroup$1 {
|
|
|
7212
7220
|
}
|
|
7213
7221
|
refreshDisable() {
|
|
7214
7222
|
Object.keys(this.controls).forEach(columnName => {
|
|
7215
|
-
if (!(this.controls[columnName] instanceof FormArray || this.controls[columnName] instanceof RxFormArray) && !(this.controls[columnName] instanceof FormGroup
|
|
7223
|
+
if (!(this.controls[columnName] instanceof FormArray || this.controls[columnName] instanceof RxFormArray) && !(this.controls[columnName] instanceof FormGroup || this.controls[columnName] instanceof RxFormGroup)) {
|
|
7216
7224
|
this.controls[columnName].refresh();
|
|
7217
7225
|
}
|
|
7218
7226
|
else if ((this.controls[columnName] instanceof RxFormGroup)) {
|
|
@@ -7222,7 +7230,7 @@ class RxFormGroup extends FormGroup$1 {
|
|
|
7222
7230
|
}
|
|
7223
7231
|
bindErrorMessages() {
|
|
7224
7232
|
Object.keys(this.controls).forEach(columnName => {
|
|
7225
|
-
if (!(this.controls[columnName] instanceof FormArray || this.controls[columnName] instanceof RxFormArray) && !(this.controls[columnName] instanceof FormGroup
|
|
7233
|
+
if (!(this.controls[columnName] instanceof FormArray || this.controls[columnName] instanceof RxFormArray) && !(this.controls[columnName] instanceof FormGroup || this.controls[columnName] instanceof RxFormGroup)) {
|
|
7226
7234
|
this.controls[columnName].bindError();
|
|
7227
7235
|
}
|
|
7228
7236
|
else if ((this.controls[columnName] instanceof RxFormGroup)) {
|
|
@@ -7241,7 +7249,7 @@ class RxFormGroup extends FormGroup$1 {
|
|
|
7241
7249
|
for (let formGroup of formArray.controls)
|
|
7242
7250
|
formGroup.submitted = value;
|
|
7243
7251
|
}
|
|
7244
|
-
else if (this.controls[columnName] instanceof FormGroup
|
|
7252
|
+
else if (this.controls[columnName] instanceof FormGroup) {
|
|
7245
7253
|
this.controls[columnName].submitted = value;
|
|
7246
7254
|
}
|
|
7247
7255
|
else
|
|
@@ -7278,7 +7286,7 @@ class RxFormGroup extends FormGroup$1 {
|
|
|
7278
7286
|
setBackEndErrors(errors) {
|
|
7279
7287
|
Object.keys(errors).forEach(controlName => {
|
|
7280
7288
|
if (this.controls[controlName]) {
|
|
7281
|
-
if (this.controls[controlName] instanceof FormGroup
|
|
7289
|
+
if (this.controls[controlName] instanceof FormGroup)
|
|
7282
7290
|
this.controls[controlName].setBackEndErrors(errors[controlName]);
|
|
7283
7291
|
else
|
|
7284
7292
|
this.controls[controlName].setBackEndErrors(errors[controlName]);
|
|
@@ -7289,7 +7297,7 @@ class RxFormGroup extends FormGroup$1 {
|
|
|
7289
7297
|
let clearErrors = errors ? Object.keys(errors) : Object.keys(this.controls);
|
|
7290
7298
|
clearErrors.forEach(controlName => {
|
|
7291
7299
|
if (this.controls[controlName]) {
|
|
7292
|
-
if (this.controls[controlName] instanceof FormGroup
|
|
7300
|
+
if (this.controls[controlName] instanceof FormGroup)
|
|
7293
7301
|
errors ? this.controls[controlName].clearBackEndErrors(errors[controlName]) : this.controls[controlName].clearBackEndErrors();
|
|
7294
7302
|
else
|
|
7295
7303
|
errors ? this.controls[controlName].clearBackEndErrors(errors[controlName]) : this.controls[controlName].clearBackEndErrors();
|
|
@@ -9479,7 +9487,7 @@ class RxwebFormDirective extends BaseDirective {
|
|
|
9479
9487
|
}
|
|
9480
9488
|
updateValueAndValidity(controls) {
|
|
9481
9489
|
Object.keys(controls).forEach(key => {
|
|
9482
|
-
if (controls[key] instanceof FormGroup
|
|
9490
|
+
if (controls[key] instanceof FormGroup)
|
|
9483
9491
|
this.updateValueAndValidity(controls[key].controls);
|
|
9484
9492
|
else if (controls[key] instanceof FormArray)
|
|
9485
9493
|
this.updateValueAndValidity(controls[key].controls);
|
|
@@ -9516,7 +9524,7 @@ class RxwebFormDirective extends BaseDirective {
|
|
|
9516
9524
|
}
|
|
9517
9525
|
});
|
|
9518
9526
|
}
|
|
9519
|
-
else if (formControl instanceof FormGroup
|
|
9527
|
+
else if (formControl instanceof FormGroup) {
|
|
9520
9528
|
this.expressionProcessor(formControl.controls, `${fieldName}.`);
|
|
9521
9529
|
}
|
|
9522
9530
|
else if (formControl instanceof FormArray) {
|
|
@@ -9533,7 +9541,7 @@ class RxwebFormDirective extends BaseDirective {
|
|
|
9533
9541
|
if (this.validationRule.conditionalValidationProps && this.validationRule.conditionalValidationProps[fieldName]) {
|
|
9534
9542
|
controls[fieldName][CONDITIONAL_VALIDATOR] = conditionalChangeValidator(this.validationRule.conditionalValidationProps[fieldName]);
|
|
9535
9543
|
}
|
|
9536
|
-
else if (controls[fieldName] instanceof FormGroup
|
|
9544
|
+
else if (controls[fieldName] instanceof FormGroup && this.validationRule.conditionalObjectProps) {
|
|
9537
9545
|
var fields = this.validationRule.conditionalObjectProps.filter(t => t.objectPropName == fieldName);
|
|
9538
9546
|
let nestedFormGroup = controls[fieldName];
|
|
9539
9547
|
let propWiseConditionalControls = {};
|
|
@@ -10998,10 +11006,10 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10998
11006
|
}
|
|
10999
11007
|
else if (typeof prop == OBJECT_STRING && !(prop instanceof FormControl || prop instanceof RxFormControl)) {
|
|
11000
11008
|
let formGroup = (prop instanceof FormArray) ? prop.controls[0] : prop;
|
|
11001
|
-
if (!formGroup.model && (prop instanceof FormGroup
|
|
11009
|
+
if (!formGroup.model && (prop instanceof FormGroup || prop instanceof RxFormGroup)) {
|
|
11002
11010
|
formGroup = this.group(formGroup.controls);
|
|
11003
11011
|
}
|
|
11004
|
-
if (prop instanceof FormGroup
|
|
11012
|
+
if (prop instanceof FormGroup || prop instanceof RxFormGroup) {
|
|
11005
11013
|
entityObject[propName] = prop;
|
|
11006
11014
|
defaultContainer.initPropertyObject(propName, OBJECT_PROPERTY, formGroup.model, modelInstance);
|
|
11007
11015
|
}
|
|
@@ -11142,7 +11150,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
11142
11150
|
break;
|
|
11143
11151
|
case OBJECT_PROPERTY:
|
|
11144
11152
|
let objectValue = entityObject[property.name];
|
|
11145
|
-
if (objectValue && objectValue instanceof Object && !(objectValue instanceof FormGroup
|
|
11153
|
+
if (objectValue && objectValue instanceof Object && !(objectValue instanceof FormGroup || objectValue instanceof RxFormGroup)) {
|
|
11146
11154
|
this.isNestedBinding = this.isNested = true;
|
|
11147
11155
|
if (instanceContainer && instanceContainer.conditionalObjectProps)
|
|
11148
11156
|
this.conditionalObjectProps = instanceContainer.conditionalObjectProps.filter(t => t.objectPropName == property.name);
|
|
@@ -11157,7 +11165,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
11157
11165
|
this.builderConfigurationConditionalObjectProps = [];
|
|
11158
11166
|
this.isNestedBinding = this.isNested = false;
|
|
11159
11167
|
}
|
|
11160
|
-
else if (objectValue instanceof FormGroup
|
|
11168
|
+
else if (objectValue instanceof FormGroup || objectValue instanceof RxFormGroup)
|
|
11161
11169
|
formGroupObject[property.name] = objectValue;
|
|
11162
11170
|
break;
|
|
11163
11171
|
case ARRAY_PROPERTY:
|
|
@@ -14544,7 +14552,7 @@ function FormFieldOld(args) {
|
|
|
14544
14552
|
}
|
|
14545
14553
|
/* Create a new group */
|
|
14546
14554
|
else {
|
|
14547
|
-
group = new
|
|
14555
|
+
group = new FormFieldGroupDefinition({ name: formField.groupName || null, header: formField.groupHeader, fields: [formField] });
|
|
14548
14556
|
formFieldGroups.push(group);
|
|
14549
14557
|
}
|
|
14550
14558
|
/* Sort the fields by row */
|
|
@@ -14625,41 +14633,31 @@ function FormField(args) {
|
|
|
14625
14633
|
}
|
|
14626
14634
|
/**
|
|
14627
14635
|
* Property decorator to create form fields
|
|
14628
|
-
* @param
|
|
14636
|
+
* @param type
|
|
14637
|
+
* @param header
|
|
14638
|
+
* @param init
|
|
14629
14639
|
* @returns
|
|
14630
14640
|
*/
|
|
14631
|
-
function
|
|
14641
|
+
function FormFieldGroup(type, header, init) {
|
|
14632
14642
|
return function (target, propertyKey) {
|
|
14633
|
-
/*
|
|
14634
|
-
|
|
14643
|
+
/* Create an instance of the group object */
|
|
14644
|
+
var instance = Reflect.construct(type, []);
|
|
14635
14645
|
/* Get from groups */
|
|
14636
|
-
var groups = getFormGroups(
|
|
14637
|
-
/* Get
|
|
14638
|
-
|
|
14639
|
-
/* Get
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14651
|
-
formFieldGroups.push(group);
|
|
14652
|
-
}
|
|
14653
|
-
/* Sort the fields by row */
|
|
14654
|
-
group.fields = group?.fields?.sort((a, b) => (a.row || 0 > b.row || 0) ? 1 : ((b.row || 0 > a.row || 0) ? -1 : 0)) || [];
|
|
14655
|
-
/* Group the fields */
|
|
14656
|
-
group.groups = Object.values((group.fields).reduce(function (r, a) {
|
|
14657
|
-
r[a.row] = r[a.row] || [];
|
|
14658
|
-
r[a.row].push(a);
|
|
14659
|
-
return r;
|
|
14660
|
-
}, Object.create(null)));
|
|
14661
|
-
/* Add new table column */
|
|
14662
|
-
Reflect.defineMetadata(formFieldGroupMetadataKey, formFieldGroups, target);
|
|
14646
|
+
var groups = getFormGroups(instance);
|
|
14647
|
+
/* Get old form fields */
|
|
14648
|
+
const previousFormFields = Reflect.getMetadata(formFieldGroupMetadataKey, target);
|
|
14649
|
+
/* Get the fields from the groups */
|
|
14650
|
+
groups?.map(x => x.fields)?.forEach(x => {
|
|
14651
|
+
/* Set the name of the group in the fields */
|
|
14652
|
+
x.forEach(y => {
|
|
14653
|
+
y.groupName = propertyKey;
|
|
14654
|
+
y.groupHeader = header;
|
|
14655
|
+
y.groupObjectType = type;
|
|
14656
|
+
y.groupObjectInstance = init || instance;
|
|
14657
|
+
});
|
|
14658
|
+
/* Create a copy of the result and override the result in the metadata */
|
|
14659
|
+
Reflect.defineMetadata(formFieldGroupMetadataKey, (previousFormFields ? previousFormFields.concat(x) : x), target);
|
|
14660
|
+
});
|
|
14663
14661
|
};
|
|
14664
14662
|
}
|
|
14665
14663
|
|
|
@@ -16865,5 +16863,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
16865
16863
|
* Generated bundle index. Do not edit.
|
|
16866
16864
|
*/
|
|
16867
16865
|
|
|
16868
|
-
export { AbstractMatFormField, ActionMenuItem, Api, AppSetting, AppStorage, AsyncValidationDirective, AuditEntity, AuditUser, AuthHelper, AuthUser, BaseComponent, BaseDirective, BaseEntity, BaseInterceptor, BaseService, CachingInterceptor, Column, Common, ContextHelper, DataSourceFilterDirective, DataSourcePipe, DisableControlDirective, Display, DynamicBuilder, DynamicComponentCompiler, EnumPipe, EnumService, EqualValidator, ErrorMessageBindingStrategy, FileControlDirective, FileService, FileSizePipe, FilterClearComponent, FilterDateComponent, FilterInputComponent, FilterPipe, FilterSelectComponent, FirstLetterPipe, FormBuilderConfiguration, FormField, FormFieldDefinition, FormFieldGroup,
|
|
16866
|
+
export { AbstractMatFormField, ActionMenuItem, Api, AppSetting, AppStorage, AsyncValidationDirective, AuditEntity, AuditUser, AuthHelper, AuthUser, BaseComponent, BaseDirective, BaseEntity, BaseInterceptor, BaseService, CachingInterceptor, Column, Common, ContextHelper, DataSourceFilterDirective, DataSourcePipe, DisableControlDirective, Display, DynamicBuilder, DynamicComponentCompiler, EnumPipe, EnumService, EqualValidator, ErrorMessageBindingStrategy, FileControlDirective, FileService, FileSizePipe, FilterClearComponent, FilterDateComponent, FilterInputComponent, FilterPipe, FilterSelectComponent, FirstLetterPipe, FormBuilderConfiguration, FormField, FormFieldDefinition, FormFieldGroup, FormFieldGroupDefinition, FormFieldType, GenericFormBaseComponent, GenericFormComponent, GenericListComponent, GenericReactiveFormComponent, GenericService, HtmlControlTemplateDirective, IAbstractControl, ImageFileControlDirective, IpVersion, KeyValue, KeysPipe, LoadingScreenInterceptor, LoadingScreenService, MatFormFieldEditorDirective, MatFormFieldReadonlyDirective, Menu, MenuItem, MenuItemService, MenuResolve, MenuScope, MenuService, MessageType, MonthNamePipe, NativeElementInjectorDirective, NumericValueType, OnlyNumberDirective, OrderPipe, Pagination, PlaceholderPipe, PrintService, RUNTIME_COMPILER_PROVIDERS, ReactiveFormConfig, ReactiveTypedFormsModule, ResetFormType, RxFormArray, RxFormBuilder, RxFormControl, RxFormControlDirective, RxFormGroup, RxReactiveFormsModule, RxwebFormDirective, RxwebValidators, SafeHtmlPipe, Salutation, SaveAction, ServiceLocator, SubMenuResolve, SuffixButton, Table, TableColumn, TableColumnType, TableDataSource, TableDefinition, TableMenuItem, TableStaticDataSource, TimePipe, TitleCase, TruncatePipe, TypedForm, TypedFormBuilder, UniqueValidatorDirective, Utils, ValidationAlphabetLocale, ValueAccessorBase, ValuesPipe, VdAlertDialogComponent, VdAutocompleteOptionDirective, VdBaseModule, VdChipDirective, VdChipsComponent, VdChipsModule, VdCodeDirective, VdCommonModule, VdConfirmDialogComponent, VdCustomDirective, VdDialogActionsDirective, VdDialogComponent, VdDialogContentDirective, VdDialogService, VdDialogTitleDirective, VdDialogsModule, VdDynamicTableComponent, VdEditorDirective, VdFileDirective, VdFileInputComponent, VdFileModule, VdFilterOptionDirective, VdFormToolbarComponent, VdFormToolbarMenuComponent, VdFormsModule, VdGenericFormComponent, VdHttpModule, VdLayoutCardOverComponent, VdLayoutCloseDirective, VdLayoutComponent, VdLayoutFooterComponent, VdLayoutManageListCloseDirective, VdLayoutManageListComponent, VdLayoutManageListOpenDirective, VdLayoutManageListToggleDirective, VdLayoutModule, VdLayoutNavComponent, VdLayoutNavListCloseDirective, VdLayoutNavListComponent, VdLayoutNavListOpenDirective, VdLayoutNavListToggleDirective, VdLayoutOpenDirective, VdLayoutToggleDirective, VdListToolbarComponent, VdListToolbarMenuComponent, VdMediaModule, VdMediaService, VdMediaToggleDirective, VdMenuComponent, VdMenuModule, VdNavigationDrawerComponent, VdNavigationDrawerMenuDirective, VdNavigationDrawerToolbarDirective, VdPromptDialogComponent, VdSearchBoxComponent, VdSearchInputComponent, VdSearchModule, VdSelectComponent, VdSelectModule, VdSelectOptionDirective, VdSelectTriggerDirective, VdTableModule, allOf, allOfAsync, alpha, alphaAsync, alphaNumeric, alphaNumericAsync, and, ascii, async, blacklist, choice, choiceAsync, compare, compose, contains, containsAsync, createCompiler, creditCard, creditCardAsync, cusip, custom, customAsync, dataUri, date, dateAsync, different, digit, disable, elementClass, email, endsWith, endsWithAsync, error, escape, even, extension, extensionAsync, factor, factorAsync, file, fileAsync, fileSize, fileSizeAsync, formFieldGroupMetadataKey, getEndpoint, getFormGroups, getTableDefinition, greaterThan, greaterThanAsync, greaterThanEqualTo, greaterThanEqualToAsync, grid, headerMetadataKey, hexColor, image, imageAsync, json, latLong, latitude, leapYear, lessThan, lessThanAsync, lessThanEqualTo, lessThanEqualToAsync, longitude, lowerCase, ltrim, mac, mask, maxDate, maxDateAsync, maxLength, maxLengthAsync, maxNumber, maxNumberAsync, maxTime, maxTimeAsync, minDate, minDateAsync, minLength, minLengthAsync, minNumber, minNumberAsync, minTime, minTimeAsync, mixinControlValueAccessor, mixinDisabled, model, noneOf, noneOfAsync, not, notEmpty, numeric, numericAsync, odd, oneOf, oneOfAsync, or, password, passwordAsync, pattern, patternAsync, port, prefix, primeNumber, prop, propArray, propObject, range, rangeAsync, required, requiredTrue, rtrim, rule, sanitize, startsWith, startsWithAsync, stripLow, suffix, time, timeAsync, toBoolean, toDate, toDouble, toFloat, toInt, toString, trim, unique, upperCase, url, urlAsync, whitelist };
|
|
16869
16867
|
//# sourceMappingURL=messaia-cdk.mjs.map
|