@eqproject/eqp-dynamic-module 2.4.36 → 2.4.37
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/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.mjs +9 -4
- package/esm2020/lib/components/private/dbgetter/dbgetter.component.mjs +15 -13
- package/esm2020/lib/components/private/dynamic-module-field-fix/dynamic-module-field.component.mjs +3 -3
- package/fesm2015/eqproject-eqp-dynamic-module.mjs +23 -16
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +23 -16
- package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4018,18 +4018,20 @@ class DbgetterComponent {
|
|
|
4018
4018
|
this.processResult(this.data);
|
|
4019
4019
|
}
|
|
4020
4020
|
processResult(data) {
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4021
|
+
if (data.length > 0) {
|
|
4022
|
+
this.keys = Object.keys(data[0]);
|
|
4023
|
+
if (this.keys.length == 2 && data.length == 1) {
|
|
4024
|
+
// Se ho un solo occhietto selezionato e la query restituisce un solo valore, lo butto fuori automaticamente
|
|
4025
|
+
this.record[this.field.Name] = data[0][this.keys[1]];
|
|
4026
|
+
this.selectedValue.emit([data[0][this.keys[1]], true]);
|
|
4027
|
+
}
|
|
4028
|
+
else if (data.length == 1 && this.field.DataGetter.DataGetterColumnForce != null) {
|
|
4029
|
+
this.record[this.field.Name] = data[0][this.field.DataGetter.DataGetterColumnForce.key];
|
|
4030
|
+
this.selectedValue.emit([data[0][this.keys[1]], true]);
|
|
4031
|
+
}
|
|
4032
|
+
else {
|
|
4033
|
+
this.loaded = true;
|
|
4034
|
+
}
|
|
4033
4035
|
}
|
|
4034
4036
|
}
|
|
4035
4037
|
selectValueNotForced(value) {
|
|
@@ -4202,10 +4204,10 @@ class DynamicModuleFieldFixComponent {
|
|
|
4202
4204
|
}
|
|
4203
4205
|
}
|
|
4204
4206
|
DynamicModuleFieldFixComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DynamicModuleFieldFixComponent, deps: [{ token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
4205
|
-
DynamicModuleFieldFixComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DynamicModuleFieldFixComponent, selector: "dynamic-module-field-fix", inputs: { endPointConfiguration: "endPointConfiguration", field: "field", form: "form", record: "record", inConfig: "inConfig", QueryEditorComponent: "QueryEditorComponent" }, outputs: { recordChange: "recordChange", out: "out" }, viewQueries: [{ propertyName: "dialogInnerFormRecord", first: true, predicate: ["dialogInnerFormRecord"], descendants: true, static: true }, { propertyName: "fieldTemplate", predicate: ["fieldTemplate"], descendants: true }, { propertyName: "listInnerFormRecords", predicate: ["listInnerFormRecords"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"field.DataGetter.DataGetterType == DataGetterTypeEnum['Manuale'] || field.DataGetter.DataGetterType == DataGetterTypeEnum['Formula']\"> \r\n <ng-container [ngTemplateOutlet]=\"fieldsTemplate\" [ngTemplateOutletContext]=\"{ field: field, record: record }\"></ng-container>\r\n</div>\r\n\r\n<div *ngIf=\"field.DataGetter.DataGetterType == DataGetterTypeEnum['Da database']\"> \r\n\r\n <div class=\"flex dbgetterfield\"
|
|
4207
|
+
DynamicModuleFieldFixComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DynamicModuleFieldFixComponent, selector: "dynamic-module-field-fix", inputs: { endPointConfiguration: "endPointConfiguration", field: "field", form: "form", record: "record", inConfig: "inConfig", QueryEditorComponent: "QueryEditorComponent" }, outputs: { recordChange: "recordChange", out: "out" }, viewQueries: [{ propertyName: "dialogInnerFormRecord", first: true, predicate: ["dialogInnerFormRecord"], descendants: true, static: true }, { propertyName: "fieldTemplate", predicate: ["fieldTemplate"], descendants: true }, { propertyName: "listInnerFormRecords", predicate: ["listInnerFormRecords"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"field.DataGetter.DataGetterType == DataGetterTypeEnum['Manuale'] || field.DataGetter.DataGetterType == DataGetterTypeEnum['Formula']\"> \r\n <ng-container [ngTemplateOutlet]=\"fieldsTemplate\" [ngTemplateOutletContext]=\"{ field: field, record: record }\"></ng-container>\r\n</div>\r\n\r\n<div *ngIf=\"field.DataGetter.DataGetterType == DataGetterTypeEnum['Da database']\"> \r\n\r\n <div class=\"flex dbgetterfield\" *ngIf=\"DBGetterValue == null && !DBGetterLoaded\">\r\n <span>{{field.Name}}: </span>\r\n <button class=\"btn btn-primary\" (click)=\"DBGetterChange()\">Rispondi</button>\r\n </div>\r\n\r\n <dbgetter class=\"flex\" [(record)]=\"record\" [field]=\"field\" [hidden]=\"DBGetterValue != null\" [QueryEditorComponent]=\"QueryEditorComponent\" [inConfig]=\"inConfig\" (out)=\"onExternalComponentOut($event)\" (selectedValue)=\"onSelectedValue($event)\" *ngIf=\"DBGetterLoaded\"></dbgetter>\r\n \r\n <div class=\"row\">\r\n <div class=\"col-11\">\r\n <ng-container [ngTemplateOutlet]=\"fieldsTemplate\" [ngTemplateOutletContext]=\"{ field: field, record: record }\" *ngIf=\"DBGetterValue != null\"></ng-container>\r\n </div>\r\n <div class=\"col-1 flex\" *ngIf=\"!DBGetterExact\">\r\n <button class=\"btn btn-warning\" (click)=\"DBGetterChange()\" *ngIf=\"DBGetterValue != null\">Modifica</button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #fieldsTemplate>\r\n\r\n <text-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo di testo']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </text-field-template>\r\n\r\n <textarea-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Area di testo']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </textarea-field-template>\r\n\r\n <boolean-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Booleano']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </boolean-field-template>\r\n\r\n <date-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Data e/o ora']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </date-field-template>\r\n\r\n <numeric-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo numerico']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </numeric-field-template>\r\n\r\n <list-value-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Elenco generico']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </list-value-field-template>\r\n\r\n <attachment-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Allegato']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </attachment-field-template>\r\n\r\n <image-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Immagine']\" [endPointConfiguration]=\"endPointConfiguration\" [inConfig]=\"inConfig\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\" (imageDraw)=\"onImageDraw($event)\">\r\n </image-field-template> \r\n\r\n <image-with-markers-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Immagine con markers']\" [endPointConfiguration]=\"endPointConfiguration\" [inConfig]=\"inConfig\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\" (imageMark)=\"onImageMark($event)\">\r\n </image-with-markers-field-template> \r\n\r\n <image-field-selector-template #imageSelectorTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Elenco immagini']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\"\r\n >\r\n </image-field-selector-template>\r\n\r\n <list-form-record #listInnerFormRecords *ngIf=\"field.FieldType == FieldTypeEnum['Form di dettaglio']\"\r\n [form]=\"getInnerFormFromField(field)\" [configurations]=\"configList\"\r\n (onAddViewEditRecord)=\"onAddViewEditInnerFormRecord($event, field)\">\r\n </list-form-record>\r\n\r\n <label-field-template #labelTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Etichetta']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </label-field-template>\r\n\r\n</ng-template>", styles: [".dbgetterfield{align-items:center;justify-content:flex-start;height:80px}.dbgetterfield span{margin-right:15px}\n"], dependencies: [{ kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TextFieldTemplateComponent, selector: "text-field-template", inputs: ["field", "record"], outputs: ["recordChange"] }, { kind: "component", type: BooleanFieldTemplateComponent, selector: "boolean-field-template", inputs: ["field", "record"], outputs: ["recordChange"] }, { kind: "component", type: DateFieldTemplateComponent, selector: "date-field-template", inputs: ["field", "record"], outputs: ["recordChange"] }, { kind: "component", type: TextareaFieldTemplateComponent, selector: "textarea-field-template", inputs: ["field", "record"], outputs: ["recordChange"] }, { kind: "component", type: NumericFieldTemplateComponent, selector: "numeric-field-template", inputs: ["field", "record"], outputs: ["recordChange"] }, { kind: "component", type: ListValueFieldTemplateComponent, selector: "list-value-field-template", inputs: ["field", "record"], outputs: ["recordChange"] }, { kind: "component", type: AttachmentFieldTemplateComponent, selector: "attachment-field-template", inputs: ["onlyImages", "field", "record"], outputs: ["recordChange", "onAttachmentsChange"] }, { kind: "component", type: ImageFieldTemplateComponent, selector: "image-field-template", inputs: ["endPointConfiguration", "record", "field", "inConfig"], outputs: ["recordChange", "imageDraw"] }, { kind: "component", type: ListFormRecordComponent, selector: "list-form-record", inputs: ["configurations", "endPointConfiguration", "formID", "form", "externalButtons"], outputs: ["onViewRecord", "onAddViewEditRecord", "onDeleteRecord", "onAfterDeleteRecord"] }, { kind: "component", type: ImageFieldSelectorTemplateComponent, selector: "image-field-selector-template", inputs: ["record", "field"], outputs: ["recordChange"] }, { kind: "component", type: LabelFieldTemplateComponent, selector: "label-field-template", inputs: ["field", "record"], outputs: ["recordChange"] }, { kind: "component", type: ImageWithMarkersFieldTemplateComponent, selector: "image-with-markers-field-template", inputs: ["endPointConfiguration", "record", "field", "inConfig"], outputs: ["recordChange", "imageMark"] }, { kind: "component", type: DbgetterComponent, selector: "dbgetter", inputs: ["field", "record", "inConfig", "QueryEditorComponent", "data"], outputs: ["out", "selectedValue"] }] });
|
|
4206
4208
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DynamicModuleFieldFixComponent, decorators: [{
|
|
4207
4209
|
type: Component,
|
|
4208
|
-
args: [{ selector: 'dynamic-module-field-fix', template: "<div *ngIf=\"field.DataGetter.DataGetterType == DataGetterTypeEnum['Manuale'] || field.DataGetter.DataGetterType == DataGetterTypeEnum['Formula']\"> \r\n <ng-container [ngTemplateOutlet]=\"fieldsTemplate\" [ngTemplateOutletContext]=\"{ field: field, record: record }\"></ng-container>\r\n</div>\r\n\r\n<div *ngIf=\"field.DataGetter.DataGetterType == DataGetterTypeEnum['Da database']\"> \r\n\r\n <div class=\"flex dbgetterfield\"
|
|
4210
|
+
args: [{ selector: 'dynamic-module-field-fix', template: "<div *ngIf=\"field.DataGetter.DataGetterType == DataGetterTypeEnum['Manuale'] || field.DataGetter.DataGetterType == DataGetterTypeEnum['Formula']\"> \r\n <ng-container [ngTemplateOutlet]=\"fieldsTemplate\" [ngTemplateOutletContext]=\"{ field: field, record: record }\"></ng-container>\r\n</div>\r\n\r\n<div *ngIf=\"field.DataGetter.DataGetterType == DataGetterTypeEnum['Da database']\"> \r\n\r\n <div class=\"flex dbgetterfield\" *ngIf=\"DBGetterValue == null && !DBGetterLoaded\">\r\n <span>{{field.Name}}: </span>\r\n <button class=\"btn btn-primary\" (click)=\"DBGetterChange()\">Rispondi</button>\r\n </div>\r\n\r\n <dbgetter class=\"flex\" [(record)]=\"record\" [field]=\"field\" [hidden]=\"DBGetterValue != null\" [QueryEditorComponent]=\"QueryEditorComponent\" [inConfig]=\"inConfig\" (out)=\"onExternalComponentOut($event)\" (selectedValue)=\"onSelectedValue($event)\" *ngIf=\"DBGetterLoaded\"></dbgetter>\r\n \r\n <div class=\"row\">\r\n <div class=\"col-11\">\r\n <ng-container [ngTemplateOutlet]=\"fieldsTemplate\" [ngTemplateOutletContext]=\"{ field: field, record: record }\" *ngIf=\"DBGetterValue != null\"></ng-container>\r\n </div>\r\n <div class=\"col-1 flex\" *ngIf=\"!DBGetterExact\">\r\n <button class=\"btn btn-warning\" (click)=\"DBGetterChange()\" *ngIf=\"DBGetterValue != null\">Modifica</button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #fieldsTemplate>\r\n\r\n <text-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo di testo']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </text-field-template>\r\n\r\n <textarea-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Area di testo']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </textarea-field-template>\r\n\r\n <boolean-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Booleano']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </boolean-field-template>\r\n\r\n <date-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Data e/o ora']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </date-field-template>\r\n\r\n <numeric-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo numerico']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </numeric-field-template>\r\n\r\n <list-value-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Elenco generico']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </list-value-field-template>\r\n\r\n <attachment-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Allegato']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </attachment-field-template>\r\n\r\n <image-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Immagine']\" [endPointConfiguration]=\"endPointConfiguration\" [inConfig]=\"inConfig\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\" (imageDraw)=\"onImageDraw($event)\">\r\n </image-field-template> \r\n\r\n <image-with-markers-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Immagine con markers']\" [endPointConfiguration]=\"endPointConfiguration\" [inConfig]=\"inConfig\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\" (imageMark)=\"onImageMark($event)\">\r\n </image-with-markers-field-template> \r\n\r\n <image-field-selector-template #imageSelectorTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Elenco immagini']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\"\r\n >\r\n </image-field-selector-template>\r\n\r\n <list-form-record #listInnerFormRecords *ngIf=\"field.FieldType == FieldTypeEnum['Form di dettaglio']\"\r\n [form]=\"getInnerFormFromField(field)\" [configurations]=\"configList\"\r\n (onAddViewEditRecord)=\"onAddViewEditInnerFormRecord($event, field)\">\r\n </list-form-record>\r\n\r\n <label-field-template #labelTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Etichetta']\"\r\n [matTooltip]=\"field.Tooltip\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n </label-field-template>\r\n\r\n</ng-template>", styles: [".dbgetterfield{align-items:center;justify-content:flex-start;height:80px}.dbgetterfield span{margin-right:15px}\n"] }]
|
|
4209
4211
|
}], ctorParameters: function () { return [{ type: i1$3.MatDialog }]; }, propDecorators: { endPointConfiguration: [{
|
|
4210
4212
|
type: Input
|
|
4211
4213
|
}], field: [{
|
|
@@ -10183,9 +10185,14 @@ class EqpDynamicModuleConfiguratorComponent {
|
|
|
10183
10185
|
if (typeof this.form.Fields != "undefined") {
|
|
10184
10186
|
this.form.Fields.forEach((field) => {
|
|
10185
10187
|
// Trasformo il Base64String del Datagetter nel Datagetter vero e proprio
|
|
10186
|
-
|
|
10188
|
+
if (field.DataGetterValueBase64String != null) {
|
|
10189
|
+
field.DataGetter = JSON.parse(atob(field.DataGetterValueBase64String));
|
|
10190
|
+
field.DataGetter.DataGetterType = field.DataGetter.DataGetterType == null ? DataGetterTypeEnum.Manuale : field.DataGetter.DataGetterType;
|
|
10191
|
+
}
|
|
10192
|
+
else {
|
|
10193
|
+
field.DataGetter = new DataGetter();
|
|
10194
|
+
}
|
|
10187
10195
|
field.DataGetterValueBase64String = null;
|
|
10188
|
-
field.DataGetter.DataGetterType = field.DataGetter.DataGetterType == null ? DataGetterTypeEnum.Manuale : field.DataGetter.DataGetterType;
|
|
10189
10196
|
});
|
|
10190
10197
|
}
|
|
10191
10198
|
}
|