@eqproject/eqp-dynamic-module 2.6.37 → 2.6.38
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/trigger-creator/trigger-creator.component.mjs +17 -6
- package/fesm2015/eqproject-eqp-dynamic-module.mjs +16 -5
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +16 -5
- package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/lib/components/private/trigger-creator/trigger-creator.component.d.ts +0 -1
- package/package.json +1 -1
|
@@ -10731,6 +10731,8 @@ class TriggerCreatorComponent {
|
|
|
10731
10731
|
this.triggerPropertyType = TriggerPropertyTypeEnum;
|
|
10732
10732
|
}
|
|
10733
10733
|
ngOnInit() {
|
|
10734
|
+
console.log("this.formulas", this.formulas);
|
|
10735
|
+
console.log("this.trigger", this.trigger);
|
|
10734
10736
|
if (this.trigger == null) {
|
|
10735
10737
|
this.trigger = new Trigger();
|
|
10736
10738
|
this.trigger.conditions = new Array();
|
|
@@ -10740,10 +10742,10 @@ class TriggerCreatorComponent {
|
|
|
10740
10742
|
this.selectedFormula.key = this.trigger.execution;
|
|
10741
10743
|
this.formulaFieldsStructure = new Array();
|
|
10742
10744
|
Object.keys(this.formulas[this.selectedFormula.key]).forEach((res) => {
|
|
10743
|
-
this.formulaFieldsStructure.push({ "key": res });
|
|
10745
|
+
this.formulaFieldsStructure.push({ "key": res, "type": this.formulas[this.selectedFormula.key][res].type });
|
|
10744
10746
|
});
|
|
10745
10747
|
Object.keys(this.trigger.formulas).forEach((res) => {
|
|
10746
|
-
this.formulaFieldsStructure.find(x => x.key == res).value = this.trigger.formulas[res];
|
|
10748
|
+
this.formulaFieldsStructure.find(x => x.key == res).value = this.trigger.formulas[res].value;
|
|
10747
10749
|
});
|
|
10748
10750
|
}
|
|
10749
10751
|
var executeGetModules = false;
|
|
@@ -10839,17 +10841,26 @@ class TriggerCreatorComponent {
|
|
|
10839
10841
|
this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.GetAllFormEndPoint, dynamicModuleParams, (res) => {
|
|
10840
10842
|
this.forms = res;
|
|
10841
10843
|
this.forms = this.forms.sort((uno, due) => uno.Name.localeCompare(due.Name));
|
|
10844
|
+
this.forms.forEach((form) => {
|
|
10845
|
+
form.ID = '"' + form.ID + '"';
|
|
10846
|
+
});
|
|
10847
|
+
this.formulaFieldsStructure.forEach((res) => {
|
|
10848
|
+
if (res.type == TriggerPropertyTypeEnum.DMMODULE) {
|
|
10849
|
+
res.object = this.forms.find(x => x.ID == res.value);
|
|
10850
|
+
}
|
|
10851
|
+
});
|
|
10852
|
+
console.log("this.formulaFieldsStructure", this.formulaFieldsStructure);
|
|
10842
10853
|
}, (err) => { });
|
|
10843
10854
|
}
|
|
10844
10855
|
onEqpSelectModule(ev, formulaField) {
|
|
10845
|
-
formulaField.value =
|
|
10856
|
+
formulaField.value = ev.ID;
|
|
10846
10857
|
}
|
|
10847
10858
|
}
|
|
10848
10859
|
TriggerCreatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TriggerCreatorComponent, deps: [{ token: i1$3.MatDialog }, { token: UtilityHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
10849
|
-
TriggerCreatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TriggerCreatorComponent, selector: "trigger-creator", inputs: { form: "form", trigger: "trigger", formulas: "formulas", endPointConfiguration: "endPointConfiguration" }, outputs: { onSaveRecord: "onSaveRecord" }, viewQueries: [{ propertyName: "dialogFormula", first: true, predicate: ["dialogFormula"], descendants: true, static: true }], ngImport: i0, template: "\r\n<mat-card class=\"add-form-field\">\r\n <mat-card-header>\r\n <mat-card-title>\r\n {{trigger != null ? \"Modifica\" : \"Aggiungi\"}} trigger\r\n </mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n <div class=\"container-fluid containerContent padder\" *ngIf=\"trigger.conditions != null\">\r\n\r\n <div class=\"row\">\r\n <div class=\"col-3\">Descrizione Trigger</div>\r\n <div class=\"col-9\">\r\n <mat-form-field>\r\n <mat-label class=\"pt-1\"> Descrizione </mat-label>\r\n <input matInput [(ngModel)]=\"trigger.description\" [readonly]=\"false\" [required]=\"false\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-3\">Tipo Trigger</div>\r\n <div class=\"col-9\">\r\n <eqp-select [arrayData]=\"formulaKeys\" [(ngModelInput)]=\"selectedFormula\"\r\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'key'\" [showCancelButton]=\"false\" (ngModelInputChange)=\"onChangeFormula($event)\">\r\n </eqp-select> \r\n </div>\r\n </div>\r\n\r\n <div class=\"row\" *ngFor=\"let formulaField of formulaFieldsStructure\">\r\n <div class=\"col-3\">{{formulaField.key}}</div>\r\n <div class=\"col-9\" *ngIf=\"formulaField.type == triggerPropertyType.STRING\">\r\n <mat-form-field>\r\n <mat-label class=\"pt-1\"> {{formulaField.key}} </mat-label>\r\n <input matInput [readonly]=\"false\" [required]=\"false\" (click)=\"openFormulaDialog(formulaField)\" [(ngModel)]=\"formulaField.value\" (ngModelChange)=\"onFormulaFieldChange(formulaField)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-9\" *ngIf=\"formulaField.type == triggerPropertyType.DMMODULE\">\r\n <eqp-select [placeholder]=\"'Seleziona modulo'\" [arrayData]=\"forms\" [(ngModelInput)]=\"
|
|
10860
|
+
TriggerCreatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TriggerCreatorComponent, selector: "trigger-creator", inputs: { form: "form", trigger: "trigger", formulas: "formulas", endPointConfiguration: "endPointConfiguration" }, outputs: { onSaveRecord: "onSaveRecord" }, viewQueries: [{ propertyName: "dialogFormula", first: true, predicate: ["dialogFormula"], descendants: true, static: true }], ngImport: i0, template: "\r\n<mat-card class=\"add-form-field\">\r\n <mat-card-header>\r\n <mat-card-title>\r\n {{trigger != null ? \"Modifica\" : \"Aggiungi\"}} trigger\r\n </mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n <div class=\"container-fluid containerContent padder\" *ngIf=\"trigger.conditions != null\">\r\n\r\n <div class=\"row\">\r\n <div class=\"col-3\">Descrizione Trigger</div>\r\n <div class=\"col-9\">\r\n <mat-form-field>\r\n <mat-label class=\"pt-1\"> Descrizione </mat-label>\r\n <input matInput [(ngModel)]=\"trigger.description\" [readonly]=\"false\" [required]=\"false\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-3\">Tipo Trigger</div>\r\n <div class=\"col-9\">\r\n <eqp-select [arrayData]=\"formulaKeys\" [(ngModelInput)]=\"selectedFormula\"\r\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'key'\" [showCancelButton]=\"false\" (ngModelInputChange)=\"onChangeFormula($event)\">\r\n </eqp-select> \r\n </div>\r\n </div>\r\n\r\n <div class=\"row\" *ngFor=\"let formulaField of formulaFieldsStructure\">\r\n <div class=\"col-3\">{{formulaField.key}}</div>\r\n <div class=\"col-9\" *ngIf=\"formulaField.type == triggerPropertyType.STRING\">\r\n <mat-form-field>\r\n <mat-label class=\"pt-1\"> {{formulaField.key}} </mat-label>\r\n <input matInput [readonly]=\"false\" [required]=\"false\" (click)=\"openFormulaDialog(formulaField)\" [(ngModel)]=\"formulaField.value\" (ngModelChange)=\"onFormulaFieldChange(formulaField)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-9\" *ngIf=\"formulaField.type == triggerPropertyType.DMMODULE\">\r\n <eqp-select [placeholder]=\"'Seleziona modulo'\" [arrayData]=\"forms\" [(ngModelInput)]=\"formulaField.object\" [isSearchable]=\"true\"\r\n [arrayKeyProperty]=\"'ID'\" [arrayValueProperty]=\"'Name'\" [ngModelOptions]=\"{ standalone: true }\" (ngModelInputChange)=\"onEqpSelectModule($event, formulaField)\">\r\n </eqp-select>\r\n </div>\r\n </div>\r\n\r\n <button class=\"btn btn-primary\" (click)=\"addCondition()\">Aggiungi condizione</button>\r\n\r\n <div class=\"padder\" *ngFor=\"let condition of trigger.conditions\">\r\n <div class=\"row\" *ngIf=\"condition.Field != null\">\r\n <div class=\"col-1\"><button class=\"btn btn-danger\"><mat-icon (click)=\"deleteCondition(condition)\">delete</mat-icon></button></div>\r\n <div class=\"col-2\">\r\n <eqp-select [arrayData]=\"form.Fields\" [(ngModelInput)]=\"condition.Field\"\r\n [arrayKeyProperty]=\"'Name'\" [arrayValueProperty]=\"'Name'\"\r\n [showCancelButton]=\"false\" (ngModelInputChange)=\"onFieldTypeChange($event, condition)\"\r\n [includeFullObject]=\"true\">\r\n </eqp-select>\r\n </div> \r\n <div class=\"col-9\" *ngIf=\"condition.Field != null\">\r\n <dynamic-module-trigger-fix #fieldTemplate [condition]=\"condition\" [form]=\"form\" (triggerChange)=\"onTriggerChange($event, condition)\"></dynamic-module-trigger-fix>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card-content>\r\n <mat-card-footer>\r\n <div class=\"d-flex justify-content-end mt-2 mb-1 me-3\"> \r\n <button class=\"mr-2\" mat-raised-button type=\"button\" (click)=\"saveOrExitForm(true)\">\r\n Annulla\r\n </button>\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"saveOrExitForm(false)\" [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 </mat-card-footer>\r\n\r\n</mat-card>\r\n\r\n<!--DIALOG PER SEMPLIFICARE LA SCRITTURA DEL CAMPO FORMULA-->\r\n<ng-template #dialogFormula>\r\n <eqp-dynamic-module-add-formula-component>\r\n </eqp-dynamic-module-add-formula-component>\r\n</ng-template>", styles: [".padder{padding:15px}\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: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i5$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i5$1.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i5$1.MatCardFooter, selector: "mat-card-footer" }, { kind: "component", type: i5$1.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i5$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: "component", type: i7.EqpSelectComponent, selector: "eqp-select", inputs: ["placeholder", "enumData", "enumDataToExclude", "arrayData", "arrayKeyProperty", "arrayValueProperty", "ngModelOptions", "ngModelInput", "formGroupInput", "formControlNameInput", "isRequired", "isDisabled", "isMultiLanguage", "multilanguagePrefixKey", "isAlphabeticalOrderable", "suffixIcon", "prefixIcon", "isMultiSelect", "includeFullObject", "showCancelButton", "isSearchable", "searchText", "noResultSearchText", "data"], outputs: ["ngModelInputChange"] }, { kind: "component", type: AddFormulaComponent, selector: "eqp-dynamic-module-add-formula-component" }, { kind: "component", type: DynamicModuleTriggerFixComponent, selector: "dynamic-module-trigger-fix", inputs: ["condition", "form"], outputs: ["triggerChange"] }] });
|
|
10850
10861
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TriggerCreatorComponent, decorators: [{
|
|
10851
10862
|
type: Component,
|
|
10852
|
-
args: [{ selector: 'trigger-creator', template: "\r\n<mat-card class=\"add-form-field\">\r\n <mat-card-header>\r\n <mat-card-title>\r\n {{trigger != null ? \"Modifica\" : \"Aggiungi\"}} trigger\r\n </mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n <div class=\"container-fluid containerContent padder\" *ngIf=\"trigger.conditions != null\">\r\n\r\n <div class=\"row\">\r\n <div class=\"col-3\">Descrizione Trigger</div>\r\n <div class=\"col-9\">\r\n <mat-form-field>\r\n <mat-label class=\"pt-1\"> Descrizione </mat-label>\r\n <input matInput [(ngModel)]=\"trigger.description\" [readonly]=\"false\" [required]=\"false\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-3\">Tipo Trigger</div>\r\n <div class=\"col-9\">\r\n <eqp-select [arrayData]=\"formulaKeys\" [(ngModelInput)]=\"selectedFormula\"\r\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'key'\" [showCancelButton]=\"false\" (ngModelInputChange)=\"onChangeFormula($event)\">\r\n </eqp-select> \r\n </div>\r\n </div>\r\n\r\n <div class=\"row\" *ngFor=\"let formulaField of formulaFieldsStructure\">\r\n <div class=\"col-3\">{{formulaField.key}}</div>\r\n <div class=\"col-9\" *ngIf=\"formulaField.type == triggerPropertyType.STRING\">\r\n <mat-form-field>\r\n <mat-label class=\"pt-1\"> {{formulaField.key}} </mat-label>\r\n <input matInput [readonly]=\"false\" [required]=\"false\" (click)=\"openFormulaDialog(formulaField)\" [(ngModel)]=\"formulaField.value\" (ngModelChange)=\"onFormulaFieldChange(formulaField)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-9\" *ngIf=\"formulaField.type == triggerPropertyType.DMMODULE\">\r\n <eqp-select [placeholder]=\"'Seleziona modulo'\" [arrayData]=\"forms\" [(ngModelInput)]=\"
|
|
10863
|
+
args: [{ selector: 'trigger-creator', template: "\r\n<mat-card class=\"add-form-field\">\r\n <mat-card-header>\r\n <mat-card-title>\r\n {{trigger != null ? \"Modifica\" : \"Aggiungi\"}} trigger\r\n </mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n <div class=\"container-fluid containerContent padder\" *ngIf=\"trigger.conditions != null\">\r\n\r\n <div class=\"row\">\r\n <div class=\"col-3\">Descrizione Trigger</div>\r\n <div class=\"col-9\">\r\n <mat-form-field>\r\n <mat-label class=\"pt-1\"> Descrizione </mat-label>\r\n <input matInput [(ngModel)]=\"trigger.description\" [readonly]=\"false\" [required]=\"false\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-3\">Tipo Trigger</div>\r\n <div class=\"col-9\">\r\n <eqp-select [arrayData]=\"formulaKeys\" [(ngModelInput)]=\"selectedFormula\"\r\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'key'\" [showCancelButton]=\"false\" (ngModelInputChange)=\"onChangeFormula($event)\">\r\n </eqp-select> \r\n </div>\r\n </div>\r\n\r\n <div class=\"row\" *ngFor=\"let formulaField of formulaFieldsStructure\">\r\n <div class=\"col-3\">{{formulaField.key}}</div>\r\n <div class=\"col-9\" *ngIf=\"formulaField.type == triggerPropertyType.STRING\">\r\n <mat-form-field>\r\n <mat-label class=\"pt-1\"> {{formulaField.key}} </mat-label>\r\n <input matInput [readonly]=\"false\" [required]=\"false\" (click)=\"openFormulaDialog(formulaField)\" [(ngModel)]=\"formulaField.value\" (ngModelChange)=\"onFormulaFieldChange(formulaField)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-9\" *ngIf=\"formulaField.type == triggerPropertyType.DMMODULE\">\r\n <eqp-select [placeholder]=\"'Seleziona modulo'\" [arrayData]=\"forms\" [(ngModelInput)]=\"formulaField.object\" [isSearchable]=\"true\"\r\n [arrayKeyProperty]=\"'ID'\" [arrayValueProperty]=\"'Name'\" [ngModelOptions]=\"{ standalone: true }\" (ngModelInputChange)=\"onEqpSelectModule($event, formulaField)\">\r\n </eqp-select>\r\n </div>\r\n </div>\r\n\r\n <button class=\"btn btn-primary\" (click)=\"addCondition()\">Aggiungi condizione</button>\r\n\r\n <div class=\"padder\" *ngFor=\"let condition of trigger.conditions\">\r\n <div class=\"row\" *ngIf=\"condition.Field != null\">\r\n <div class=\"col-1\"><button class=\"btn btn-danger\"><mat-icon (click)=\"deleteCondition(condition)\">delete</mat-icon></button></div>\r\n <div class=\"col-2\">\r\n <eqp-select [arrayData]=\"form.Fields\" [(ngModelInput)]=\"condition.Field\"\r\n [arrayKeyProperty]=\"'Name'\" [arrayValueProperty]=\"'Name'\"\r\n [showCancelButton]=\"false\" (ngModelInputChange)=\"onFieldTypeChange($event, condition)\"\r\n [includeFullObject]=\"true\">\r\n </eqp-select>\r\n </div> \r\n <div class=\"col-9\" *ngIf=\"condition.Field != null\">\r\n <dynamic-module-trigger-fix #fieldTemplate [condition]=\"condition\" [form]=\"form\" (triggerChange)=\"onTriggerChange($event, condition)\"></dynamic-module-trigger-fix>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card-content>\r\n <mat-card-footer>\r\n <div class=\"d-flex justify-content-end mt-2 mb-1 me-3\"> \r\n <button class=\"mr-2\" mat-raised-button type=\"button\" (click)=\"saveOrExitForm(true)\">\r\n Annulla\r\n </button>\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"saveOrExitForm(false)\" [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 </mat-card-footer>\r\n\r\n</mat-card>\r\n\r\n<!--DIALOG PER SEMPLIFICARE LA SCRITTURA DEL CAMPO FORMULA-->\r\n<ng-template #dialogFormula>\r\n <eqp-dynamic-module-add-formula-component>\r\n </eqp-dynamic-module-add-formula-component>\r\n</ng-template>", styles: [".padder{padding:15px}\n"] }]
|
|
10853
10864
|
}], ctorParameters: function () { return [{ type: i1$3.MatDialog }, { type: UtilityHelperService }]; }, propDecorators: { form: [{
|
|
10854
10865
|
type: Input,
|
|
10855
10866
|
args: ["form"]
|