@eqproject/eqp-dynamic-module 2.4.40 → 2.4.41
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/private/dynamic-module-field-fix/dynamic-module-field.component.mjs +2 -1
- package/esm2020/lib/components/private/form-records/add-form-record/add-form-record.component.mjs +18 -2
- package/fesm2015/eqproject-eqp-dynamic-module.mjs +17 -0
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +17 -0
- package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/lib/components/private/form-records/add-form-record/add-form-record.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4098,6 +4098,7 @@ class DynamicModuleFieldFixComponent {
|
|
|
4098
4098
|
}
|
|
4099
4099
|
}
|
|
4100
4100
|
ngOnInit() {
|
|
4101
|
+
console.log("dynamic-module-field", this.field);
|
|
4101
4102
|
this.configList.values = this.record[this.field.Name];
|
|
4102
4103
|
this.configList.showTitle = true;
|
|
4103
4104
|
this.configList.defaultListActions = new DynamicModuleListFormRecordActionsDefault();
|
|
@@ -4398,6 +4399,7 @@ class AddFormRecordComponent {
|
|
|
4398
4399
|
});
|
|
4399
4400
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, dynamicModuleParams, (res) => {
|
|
4400
4401
|
this.form = res;
|
|
4402
|
+
this.setDataGetter(this.form);
|
|
4401
4403
|
GlobalService.debugLog('getFormByID - DynaForm', this.form);
|
|
4402
4404
|
this.fieldsConfig();
|
|
4403
4405
|
}, (err) => { });
|
|
@@ -4447,6 +4449,7 @@ class AddFormRecordComponent {
|
|
|
4447
4449
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDAndVersionEndPoint, dynamicModuleParams, (res) => {
|
|
4448
4450
|
GlobalService.debugLog("AFTER getFormByIDandVersion - this.form", res);
|
|
4449
4451
|
this.form = res;
|
|
4452
|
+
this.setDataGetter(this.form);
|
|
4450
4453
|
this.createRecordProperties();
|
|
4451
4454
|
this.reorderFormFields();
|
|
4452
4455
|
this.createFormGroup();
|
|
@@ -4762,6 +4765,20 @@ class AddFormRecordComponent {
|
|
|
4762
4765
|
};
|
|
4763
4766
|
});
|
|
4764
4767
|
}
|
|
4768
|
+
setDataGetter(form) {
|
|
4769
|
+
form.Fields.forEach((field) => {
|
|
4770
|
+
// Trasformo il Base64String del Datagetter nel Datagetter vero e proprio
|
|
4771
|
+
if (field.DataGetterValueBase64String != null) {
|
|
4772
|
+
field.DataGetter = JSON.parse(atob(field.DataGetterValueBase64String));
|
|
4773
|
+
field.DataGetter.DataGetterType = field.DataGetter.DataGetterType == null ? DataGetterTypeEnum.Manuale : field.DataGetter.DataGetterType;
|
|
4774
|
+
console.log("setDataGetter", field.DataGetter);
|
|
4775
|
+
}
|
|
4776
|
+
else {
|
|
4777
|
+
field.DataGetter = new DataGetter();
|
|
4778
|
+
}
|
|
4779
|
+
field.DataGetterValueBase64String = null;
|
|
4780
|
+
});
|
|
4781
|
+
}
|
|
4765
4782
|
}
|
|
4766
4783
|
AddFormRecordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AddFormRecordComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: UtilityHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4767
4784
|
AddFormRecordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AddFormRecordComponent, selector: "add-form-record", inputs: { configurations: "configurations", endPointConfiguration: "endPointConfiguration", userID: "userID", formID: "formID", form: "form", record: "record", onlyView: "onlyView", isDuplicate: "isDuplicate", inConfig: "inConfig", QueryEditorComponent: "QueryEditorComponent" }, outputs: { saveRecordEvent: "saveRecordEvent", afterSaveRecordEvent: "afterSaveRecordEvent", out: "out" }, viewQueries: [{ propertyName: "fieldTemplate", predicate: ["fieldTemplate"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"loader\">\r\n\r\n <div class=\"row eqp-dynamic-module-title add-form-record-header\" *ngIf=\"showTitle\">\r\n <div class=\"col-md-12\">\r\n <span>{{form.Name}}</span>\r\n </div>\r\n </div>\r\n\r\n <form [formGroup]=\"formForm\" class=\"add-form-record-form\">\r\n\r\n <!-- VISUALIZZAZIONE SEMPLICE -->\r\n <ng-container *ngIf=\"form.FormScalarType == FormScalarTypeEnum.Semplice\" [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: form.Fields }\" class=\"add-form-record-semplice\">\r\n </ng-container>\r\n\r\n <!-- VISUALIZZAZIONE A STEPPER -->\r\n <mat-horizontal-stepper linear *ngIf=\"form.FormScalarType == FormScalarTypeEnum['A step']\"\r\n class=\"add-form-record-stepper\">\r\n <mat-step *ngFor=\"let group of form.FormFieldsGroups; let i = index; let first = first; let last = last\">\r\n <ng-template matStepLabel>\r\n {{group.Name}}\r\n </ng-template>\r\n\r\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\r\n </ng-container>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end add-form-record-buttons\">\r\n <button *ngIf=\"!first\" class=\"mr-2 previous\" mat-raised-button matStepperPrevious>\r\n Precedente\r\n </button>\r\n <button *ngIf=\"!last\" class=\"button-next\" color=\"primary\" mat-raised-button matStepperNext>\r\n Successivo\r\n </button>\r\n <button *ngIf=\"last && showSaveButton\" (click)=\"saveOrExitForm(false)\" class=\"button-next\"\r\n color=\"primary\" mat-raised-button>\r\n Salva\r\n </button>\r\n </div>\r\n\r\n </mat-step>\r\n </mat-horizontal-stepper>\r\n\r\n <!-- VISUALIZZAZIONE A TAB -->\r\n <mat-tab-group *ngIf=\"form.FormScalarType == FormScalarTypeEnum['In tab']\" class=\"add-form-record-tab\">\r\n <mat-tab *ngFor=\"let group of form.FormFieldsGroups\" [label]=\"group.Name\">\r\n <div class=\"mt-3\">\r\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\r\n </ng-container>\r\n </div>\r\n </mat-tab>\r\n </mat-tab-group>\r\n\r\n <!-- VISUALIZZAZIONE AD ACCORDION -->\r\n <mat-accordion multi *ngIf=\"form.FormScalarType == FormScalarTypeEnum['In accordion']\"\r\n class=\"add-form-record-accordion\">\r\n <mat-expansion-panel *ngFor=\"let group of form.FormFieldsGroups\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{group.Name}}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\r\n </ng-container>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </form>\r\n\r\n <div class=\"row mt-2 add-form-record-buttons\"\r\n *ngIf=\"(showBackButton || showSaveButton) && form.FormScalarType != FormScalarTypeEnum['A step']\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"mr-2\" mat-raised-button type=\"button\" *ngIf=\"showBackButton\" (click)=\"saveOrExitForm(true)\">\r\n Annulla\r\n </button>\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" type=\"button\" *ngIf=\"showSaveButton\"\r\n (click)=\"saveOrExitForm(false)\" [disabled]=\"formForm.invalid || formForm.disabled || isSaving\">\r\n <span *ngIf=\"!isSaving\">Salva</span>\r\n <span *ngIf=\"isSaving\">Salvataggio in Corso...</span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n</ng-container>\r\n\r\n\r\n\r\n<!-- TEMPLATE PER LA VISUALIZZAZIONE DEI CAMPI DELLA FORM -->\r\n<ng-template #fieldTemplates let-fields='fields'>\r\n <div class=\"row\">\r\n <div class=\"mt-2\" *ngFor=\"let field of fields\"\r\n [ngClass]=\"utilityService.getFieldSyleClass(field)\">\r\n <dynamic-module-field-fix #fieldTemplate [field]=\"field\" [QueryEditorComponent]=\"QueryEditorComponent\" [form]=\"form\" [record]=\"record\" [endPointConfiguration]=\"endPointConfiguration\" [inConfig]=\"inConfig\"\r\n (recordChange)=\"onRecordChange()\">\r\n </dynamic-module-field-fix>\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".visibility_hidden{display:none}.visibility_transparent{visibility:hidden}\n"], dependencies: [{ kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i11.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i11.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i11.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["selectedIndex", "disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i11.MatStepperNext, selector: "button[matStepperNext]", inputs: ["type"] }, { kind: "directive", type: i11.MatStepperPrevious, selector: "button[matStepperPrevious]", inputs: ["type"] }, { kind: "component", type: i4$4.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i4$4.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "directive", type: i6$1.MatAccordion, selector: "mat-accordion", inputs: ["multi", "hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i6$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i6$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i6$1.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: DynamicModuleFieldFixComponent, selector: "dynamic-module-field-fix", inputs: ["endPointConfiguration", "field", "form", "record", "inConfig", "QueryEditorComponent"], outputs: ["recordChange", "out"] }] });
|