@pepperi-addons/ngx-lib 0.2.51-beta.21 → 0.2.51-beta.22
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/bundles/pepperi-addons-ngx-lib-form.umd.js +50 -66
- package/bundles/pepperi-addons-ngx-lib-form.umd.js.map +1 -1
- package/esm2015/form/form.component.js +8 -19
- package/fesm2015/pepperi-addons-ngx-lib-form.js +7 -18
- package/fesm2015/pepperi-addons-ngx-lib-form.js.map +1 -1
- package/form/form.component.d.ts +1 -0
- package/form/pepperi-addons-ngx-lib-form.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -850,22 +850,7 @@ class PepFormComponent {
|
|
|
850
850
|
this.customizationService.updateFormField(this.form, currentField, fieldFormattedValue);
|
|
851
851
|
// Hack to override (update) the field.
|
|
852
852
|
if (currentField.controlType === 'internalCarusel') {
|
|
853
|
-
|
|
854
|
-
currentField = null;
|
|
855
|
-
setTimeout(() => {
|
|
856
|
-
// const customField: PepFieldBase = this.convertToCustomField(
|
|
857
|
-
// field,
|
|
858
|
-
// dataField,
|
|
859
|
-
// this.canEditObject,
|
|
860
|
-
// this.menuDataField,
|
|
861
|
-
// this.hasCampaignDataField,
|
|
862
|
-
// this.indicatorsDataField,
|
|
863
|
-
// this.objectId,
|
|
864
|
-
// this.parentId,
|
|
865
|
-
// this.searchCode
|
|
866
|
-
// );
|
|
867
|
-
currentField = tmp;
|
|
868
|
-
}, 0);
|
|
853
|
+
currentField = this.createCopyField(currentField);
|
|
869
854
|
}
|
|
870
855
|
}
|
|
871
856
|
}
|
|
@@ -873,8 +858,6 @@ class PepFormComponent {
|
|
|
873
858
|
allFieldsAreReadOnly = false;
|
|
874
859
|
}
|
|
875
860
|
}
|
|
876
|
-
// // Hack to override (update) the field.
|
|
877
|
-
// this.fields = JSON.parse(JSON.stringify(this.fields));
|
|
878
861
|
}
|
|
879
862
|
let isFormValid = (_a = this.form) === null || _a === void 0 ? void 0 : _a.valid;
|
|
880
863
|
// Change validation to true if all fields are read only.
|
|
@@ -885,6 +868,12 @@ class PepFormComponent {
|
|
|
885
868
|
// Set it to false to enable all fields.
|
|
886
869
|
this.isLocked = false;
|
|
887
870
|
}
|
|
871
|
+
createCopyField(baseField) {
|
|
872
|
+
const uiControlField = this.getUiControlFields().find(cf => cf.ApiName === baseField.key);
|
|
873
|
+
const dataField = this.data.Fields.find(df => df.ApiName === baseField.key);
|
|
874
|
+
const customField = this.convertToCustomField(uiControlField, dataField, this.canEditObject, this.menuDataField, this.hasCampaignDataField, this.indicatorsDataField, this.objectId, this.parentId, this.searchCode);
|
|
875
|
+
return customField;
|
|
876
|
+
}
|
|
888
877
|
initForm() {
|
|
889
878
|
if (this.data && this.data.Fields) {
|
|
890
879
|
const fields = this.convertCustomFields(this.getUiControlFields(), this.data.Fields);
|