@eqproject/eqp-dynamic-module 0.0.11 → 0.0.12
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/eqproject-eqp-dynamic-module.umd.js +23 -17
- package/bundles/eqproject-eqp-dynamic-module.umd.js.map +1 -1
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js +1 -1
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js.map +1 -1
- package/eqproject-eqp-dynamic-module.metadata.json +1 -1
- package/esm2015/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +5 -2
- package/esm2015/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +20 -17
- package/esm2015/lib/components/private/add-form-field/add-form-field.component.js +1 -1
- package/esm2015/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +1 -1
- package/esm2015/lib/models/fields/{testareaField.model.js → textareaField.model.js} +1 -1
- package/esm2015/lib/models/form.model.js +1 -1
- package/esm2015/lib/services/utilityHelper.services.js +1 -1
- package/esm2015/public-api.js +2 -2
- package/esm5/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +5 -2
- package/esm5/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +20 -17
- package/esm5/lib/components/private/add-form-field/add-form-field.component.js +1 -1
- package/esm5/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +1 -1
- package/esm5/lib/models/fields/{testareaField.model.js → textareaField.model.js} +1 -1
- package/esm5/lib/models/form.model.js +1 -1
- package/esm5/lib/services/utilityHelper.services.js +1 -1
- package/esm5/public-api.js +2 -2
- package/fesm2015/eqproject-eqp-dynamic-module.js +23 -17
- package/fesm2015/eqproject-eqp-dynamic-module.js.map +1 -1
- package/fesm5/eqproject-eqp-dynamic-module.js +23 -17
- package/fesm5/eqproject-eqp-dynamic-module.js.map +1 -1
- package/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.d.ts +1 -1
- package/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.d.ts +1 -2
- package/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.d.ts +1 -1
- package/lib/models/fields/{testareaField.model.d.ts → textareaField.model.d.ts} +0 -0
- package/lib/models/form.model.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
|
@@ -950,6 +950,7 @@
|
|
|
950
950
|
this.context = new Context();
|
|
951
951
|
this.showButtons = true;
|
|
952
952
|
this.showTitle = true;
|
|
953
|
+
this.viewMode = exports.FormTypeEnum.LIST;
|
|
953
954
|
/**
|
|
954
955
|
* Url del server da chiamare per recuperare, salvare o eliminare i record.
|
|
955
956
|
* Usato per creare la configurazione di default degli endpoint da chiamare.
|
|
@@ -982,7 +983,6 @@
|
|
|
982
983
|
this.afterDeleteRecord = new core.EventEmitter();
|
|
983
984
|
this.afterDuplicateRecord = new core.EventEmitter();
|
|
984
985
|
this.form = new Form();
|
|
985
|
-
this.viewMode = exports.FormTypeEnum.LIST;
|
|
986
986
|
this.FormTypeEnum = exports.FormTypeEnum;
|
|
987
987
|
}
|
|
988
988
|
EqpDynamicModuleComponent.prototype.ngOnInit = function () {
|
|
@@ -1167,6 +1167,9 @@
|
|
|
1167
1167
|
__decorate([
|
|
1168
1168
|
core.Input()
|
|
1169
1169
|
], EqpDynamicModuleComponent.prototype, "showTitle", void 0);
|
|
1170
|
+
__decorate([
|
|
1171
|
+
core.Input()
|
|
1172
|
+
], EqpDynamicModuleComponent.prototype, "viewMode", void 0);
|
|
1170
1173
|
__decorate([
|
|
1171
1174
|
core.Input()
|
|
1172
1175
|
], EqpDynamicModuleComponent.prototype, "baseServerUrl", void 0);
|
|
@@ -1289,6 +1292,7 @@
|
|
|
1289
1292
|
this.form = new Form();
|
|
1290
1293
|
this.formID = null;
|
|
1291
1294
|
this.innerFormManagment = false;
|
|
1295
|
+
this.orgaID = null;
|
|
1292
1296
|
/**
|
|
1293
1297
|
* Url del server da chiamare per recuerare, salvare o eliminare i record.
|
|
1294
1298
|
* Usato per creare la configurazione di default degli endpoint da chiamare.
|
|
@@ -1635,29 +1639,28 @@
|
|
|
1635
1639
|
* Metodo per salvare la form creata alla fine del wizard.
|
|
1636
1640
|
* Se è stato configurato un endPoint per il salvataggio viene effettuata una chiamata al server passando l'oggeto da salvare
|
|
1637
1641
|
* nel body della chiamata, altrimenti scatena l'evento "saveFormEvent".
|
|
1638
|
-
* NOTA: Per comunicare correttamente con la parte server del modulo dinamico bisogna modificare l'array dei Fields.
|
|
1639
|
-
* Al posto di passare un array di BaseField bisogna passare un array di oggetti del tipo { FieldType: FieldTypeEnum, Value: BaseField }.
|
|
1640
1642
|
*/
|
|
1641
1643
|
EqpDynamicModuleConfiguratorComponent.prototype.saveForm = function () {
|
|
1642
1644
|
var _this = this;
|
|
1643
1645
|
if (this.endPointConfiguration != null && this.endPointConfiguration.Forms.SaveEndPoint) {
|
|
1644
|
-
//
|
|
1645
|
-
|
|
1646
|
-
var formToSave_1 = JSON.parse(JSON.stringify(this.form));
|
|
1647
|
-
/*formToSave.Fields = [];
|
|
1648
|
-
this.form.Fields.forEach(field => {
|
|
1649
|
-
formToSave.Fields.push({
|
|
1650
|
-
FieldType: field.FieldType,
|
|
1651
|
-
Value: JSON.parse(JSON.stringify(field))
|
|
1652
|
-
});
|
|
1653
|
-
});*/
|
|
1654
|
-
formToSave_1.Fields = [];
|
|
1646
|
+
// Per far arrivare al server l'array di Field bisogna passarli su Any
|
|
1647
|
+
this.form.ObjectFields = [];
|
|
1655
1648
|
this.form.Fields.forEach(function (field) {
|
|
1656
|
-
|
|
1657
|
-
|
|
1649
|
+
if (field.FieldType == exports.FieldTypeEnum.Allegato) {
|
|
1650
|
+
var fldA = field;
|
|
1651
|
+
fldA.MetadataObjectFields = fldA.MetadataFields;
|
|
1652
|
+
fldA.MetadataFields = [];
|
|
1653
|
+
_this.form.ObjectFields.push(fldA);
|
|
1654
|
+
}
|
|
1655
|
+
else {
|
|
1656
|
+
_this.form.ObjectFields.push(field);
|
|
1657
|
+
}
|
|
1658
1658
|
});
|
|
1659
|
+
this.form.Fields = null;
|
|
1660
|
+
this.form.OrgaID = this.orgaID;
|
|
1661
|
+
// chiamata effettiva
|
|
1659
1662
|
var dynamicModuleParams = [
|
|
1660
|
-
{ ParamName: "Form", ParamValue:
|
|
1663
|
+
{ ParamName: "Form", ParamValue: this.form, ParamType: exports.ParamTypeEnum['In Body'] }
|
|
1661
1664
|
];
|
|
1662
1665
|
this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.SaveEndPoint, dynamicModuleParams, function (res) {
|
|
1663
1666
|
EqpDynamicModuleDialogService.Success("Form salvata con successo!");
|
|
@@ -1888,6 +1891,9 @@
|
|
|
1888
1891
|
__decorate([
|
|
1889
1892
|
core.Input()
|
|
1890
1893
|
], EqpDynamicModuleConfiguratorComponent.prototype, "innerFormManagment", void 0);
|
|
1894
|
+
__decorate([
|
|
1895
|
+
core.Input()
|
|
1896
|
+
], EqpDynamicModuleConfiguratorComponent.prototype, "orgaID", void 0);
|
|
1891
1897
|
__decorate([
|
|
1892
1898
|
core.Input()
|
|
1893
1899
|
], EqpDynamicModuleConfiguratorComponent.prototype, "baseServerUrl", void 0);
|