tuain-ng-forms-lib 14.5.26 → 14.5.28
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/classes/forms/form.mjs +2 -2
- package/esm2020/lib/components/forms/basic-form.mjs +10 -1
- package/fesm2015/tuain-ng-forms-lib.mjs +10 -1
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -1
- package/fesm2020/tuain-ng-forms-lib.mjs +10 -1
- package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -1
- package/lib/components/forms/basic-form.d.ts +3 -0
- package/package.json +1 -1
|
@@ -2257,7 +2257,7 @@ class FormStructureAndData {
|
|
|
2257
2257
|
setFieldErrorMessage(code, message) { this.getField(code)?.setErrorMessage(message); }
|
|
2258
2258
|
setFieldOptions(code, optionsArray, idAttribute, nameAttribute) {
|
|
2259
2259
|
const field = this.getField(code);
|
|
2260
|
-
if (field && optionsArray
|
|
2260
|
+
if (field && optionsArray) {
|
|
2261
2261
|
const fieldOptions = optionsArray.map(item => ({
|
|
2262
2262
|
fieldOptionId: item[idAttribute],
|
|
2263
2263
|
fieldOptionValue: item[nameAttribute]
|
|
@@ -2638,6 +2638,9 @@ class BasicFormComponent {
|
|
|
2638
2638
|
this.errorMessage = '';
|
|
2639
2639
|
this.errorDetail = '';
|
|
2640
2640
|
this.visible = false;
|
|
2641
|
+
this.fieldsArray = null;
|
|
2642
|
+
this.actionsArray = null;
|
|
2643
|
+
this.sectionsArray = null;
|
|
2641
2644
|
this.busy = false;
|
|
2642
2645
|
this._eventEmiter = this._eventManager;
|
|
2643
2646
|
this.cleanStart();
|
|
@@ -3066,6 +3069,12 @@ class BasicFormComponent {
|
|
|
3066
3069
|
this.fields = this._formStructure?.fields;
|
|
3067
3070
|
this.actions = this._formStructure?.actions;
|
|
3068
3071
|
this.sections = this._formStructure?.sections;
|
|
3072
|
+
this.fieldsArray = Object.keys(this.fields)
|
|
3073
|
+
.reduce((accumulator, value) => accumulator.concat(this.fields[value]), []);
|
|
3074
|
+
this.actionsArray = Object.keys(this.actions)
|
|
3075
|
+
.reduce((accumulator, value) => accumulator.concat(this.actions[value]), []);
|
|
3076
|
+
this.sectionsArray = Object.keys(this.sections)
|
|
3077
|
+
.reduce((accumulator, value) => accumulator.concat(this.sections[value]), []);
|
|
3069
3078
|
this._definitionObtained = true;
|
|
3070
3079
|
}
|
|
3071
3080
|
else {
|