@eqproject/eqp-dynamic-module 0.0.10 → 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 +27 -22
- package/bundles/eqproject-eqp-dynamic-module.umd.js.map +1 -1
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js +2 -2
- 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/eqp-dynamic-module.module.js +1 -3
- 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/eqp-dynamic-module.module.js +1 -3
- 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 -19
- package/fesm2015/eqproject-eqp-dynamic-module.js.map +1 -1
- package/fesm5/eqproject-eqp-dynamic-module.js +23 -19
- 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
|
@@ -43,7 +43,6 @@ import { PickerModeEnum, EqpDatetimepickerModule } from '@eqproject/eqp-datetime
|
|
|
43
43
|
import { EqpImgDrawingModule } from '@eqproject/eqp-img-drawing';
|
|
44
44
|
import { EqpFiltersModule } from '@eqproject/eqp-filters';
|
|
45
45
|
import { EqpNumericInputMode, EqpNumericModule } from '@eqproject/eqp-numeric';
|
|
46
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
47
46
|
|
|
48
47
|
var Context = /** @class */ (function () {
|
|
49
48
|
function Context() {
|
|
@@ -770,6 +769,7 @@ var EqpDynamicModuleComponent = /** @class */ (function () {
|
|
|
770
769
|
this.context = new Context();
|
|
771
770
|
this.showButtons = true;
|
|
772
771
|
this.showTitle = true;
|
|
772
|
+
this.viewMode = FormTypeEnum.LIST;
|
|
773
773
|
/**
|
|
774
774
|
* Url del server da chiamare per recuperare, salvare o eliminare i record.
|
|
775
775
|
* Usato per creare la configurazione di default degli endpoint da chiamare.
|
|
@@ -802,7 +802,6 @@ var EqpDynamicModuleComponent = /** @class */ (function () {
|
|
|
802
802
|
this.afterDeleteRecord = new EventEmitter();
|
|
803
803
|
this.afterDuplicateRecord = new EventEmitter();
|
|
804
804
|
this.form = new Form();
|
|
805
|
-
this.viewMode = FormTypeEnum.LIST;
|
|
806
805
|
this.FormTypeEnum = FormTypeEnum;
|
|
807
806
|
}
|
|
808
807
|
EqpDynamicModuleComponent.prototype.ngOnInit = function () {
|
|
@@ -987,6 +986,9 @@ var EqpDynamicModuleComponent = /** @class */ (function () {
|
|
|
987
986
|
__decorate([
|
|
988
987
|
Input()
|
|
989
988
|
], EqpDynamicModuleComponent.prototype, "showTitle", void 0);
|
|
989
|
+
__decorate([
|
|
990
|
+
Input()
|
|
991
|
+
], EqpDynamicModuleComponent.prototype, "viewMode", void 0);
|
|
990
992
|
__decorate([
|
|
991
993
|
Input()
|
|
992
994
|
], EqpDynamicModuleComponent.prototype, "baseServerUrl", void 0);
|
|
@@ -1109,6 +1111,7 @@ var EqpDynamicModuleConfiguratorComponent = /** @class */ (function () {
|
|
|
1109
1111
|
this.form = new Form();
|
|
1110
1112
|
this.formID = null;
|
|
1111
1113
|
this.innerFormManagment = false;
|
|
1114
|
+
this.orgaID = null;
|
|
1112
1115
|
/**
|
|
1113
1116
|
* Url del server da chiamare per recuerare, salvare o eliminare i record.
|
|
1114
1117
|
* Usato per creare la configurazione di default degli endpoint da chiamare.
|
|
@@ -1455,29 +1458,28 @@ var EqpDynamicModuleConfiguratorComponent = /** @class */ (function () {
|
|
|
1455
1458
|
* Metodo per salvare la form creata alla fine del wizard.
|
|
1456
1459
|
* Se è stato configurato un endPoint per il salvataggio viene effettuata una chiamata al server passando l'oggeto da salvare
|
|
1457
1460
|
* nel body della chiamata, altrimenti scatena l'evento "saveFormEvent".
|
|
1458
|
-
* NOTA: Per comunicare correttamente con la parte server del modulo dinamico bisogna modificare l'array dei Fields.
|
|
1459
|
-
* Al posto di passare un array di BaseField bisogna passare un array di oggetti del tipo { FieldType: FieldTypeEnum, Value: BaseField }.
|
|
1460
1461
|
*/
|
|
1461
1462
|
EqpDynamicModuleConfiguratorComponent.prototype.saveForm = function () {
|
|
1462
1463
|
var _this = this;
|
|
1463
1464
|
if (this.endPointConfiguration != null && this.endPointConfiguration.Forms.SaveEndPoint) {
|
|
1464
|
-
//
|
|
1465
|
-
|
|
1466
|
-
var formToSave_1 = JSON.parse(JSON.stringify(this.form));
|
|
1467
|
-
/*formToSave.Fields = [];
|
|
1468
|
-
this.form.Fields.forEach(field => {
|
|
1469
|
-
formToSave.Fields.push({
|
|
1470
|
-
FieldType: field.FieldType,
|
|
1471
|
-
Value: JSON.parse(JSON.stringify(field))
|
|
1472
|
-
});
|
|
1473
|
-
});*/
|
|
1474
|
-
formToSave_1.Fields = [];
|
|
1465
|
+
// Per far arrivare al server l'array di Field bisogna passarli su Any
|
|
1466
|
+
this.form.ObjectFields = [];
|
|
1475
1467
|
this.form.Fields.forEach(function (field) {
|
|
1476
|
-
|
|
1477
|
-
|
|
1468
|
+
if (field.FieldType == FieldTypeEnum.Allegato) {
|
|
1469
|
+
var fldA = field;
|
|
1470
|
+
fldA.MetadataObjectFields = fldA.MetadataFields;
|
|
1471
|
+
fldA.MetadataFields = [];
|
|
1472
|
+
_this.form.ObjectFields.push(fldA);
|
|
1473
|
+
}
|
|
1474
|
+
else {
|
|
1475
|
+
_this.form.ObjectFields.push(field);
|
|
1476
|
+
}
|
|
1478
1477
|
});
|
|
1478
|
+
this.form.Fields = null;
|
|
1479
|
+
this.form.OrgaID = this.orgaID;
|
|
1480
|
+
// chiamata effettiva
|
|
1479
1481
|
var dynamicModuleParams = [
|
|
1480
|
-
{ ParamName: "Form", ParamValue:
|
|
1482
|
+
{ ParamName: "Form", ParamValue: this.form, ParamType: ParamTypeEnum['In Body'] }
|
|
1481
1483
|
];
|
|
1482
1484
|
this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.SaveEndPoint, dynamicModuleParams, function (res) {
|
|
1483
1485
|
EqpDynamicModuleDialogService.Success("Form salvata con successo!");
|
|
@@ -1708,6 +1710,9 @@ var EqpDynamicModuleConfiguratorComponent = /** @class */ (function () {
|
|
|
1708
1710
|
__decorate([
|
|
1709
1711
|
Input()
|
|
1710
1712
|
], EqpDynamicModuleConfiguratorComponent.prototype, "innerFormManagment", void 0);
|
|
1713
|
+
__decorate([
|
|
1714
|
+
Input()
|
|
1715
|
+
], EqpDynamicModuleConfiguratorComponent.prototype, "orgaID", void 0);
|
|
1711
1716
|
__decorate([
|
|
1712
1717
|
Input()
|
|
1713
1718
|
], EqpDynamicModuleConfiguratorComponent.prototype, "baseServerUrl", void 0);
|
|
@@ -3681,7 +3686,6 @@ var EqpDynamicModuleModule = /** @class */ (function () {
|
|
|
3681
3686
|
SpinnerComponent,
|
|
3682
3687
|
],
|
|
3683
3688
|
imports: [
|
|
3684
|
-
BrowserModule,
|
|
3685
3689
|
MaterialModule,
|
|
3686
3690
|
FormsModule,
|
|
3687
3691
|
CommonModule,
|