@eqproject/eqp-dynamic-module 2.7.4 → 2.7.5

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.
@@ -4409,6 +4409,7 @@ class DbgetterComponent {
4409
4409
  this.showQE = true;
4410
4410
  this.haveQuestions = false;
4411
4411
  this.haveRelations = false;
4412
+ this.relationsLoaded = false;
4412
4413
  }
4413
4414
  ngOnInit() {
4414
4415
  console.log("INSIDE DBGETTER", this.form, this.record, this.field, this.QueryEditorComponent);
@@ -4426,10 +4427,26 @@ class DbgetterComponent {
4426
4427
  this.haveRelations = true;
4427
4428
  this.field.DataGetter.DataGetterValue.openedFields.filter(x => x.QueryPropertyValue.indexOf('!') != -1).forEach((fieldWithRelation) => {
4428
4429
  var fieldRelated = fieldWithRelation.QueryPropertyValue.replace("!", "");
4429
- console.log("fieldRelated", fieldRelated);
4430
- fieldWithRelation.QueryPropertyValue = this.record[fieldRelated] != null ? this.record[fieldRelated] : '';
4430
+ if (this.record[fieldRelated] == null) {
4431
+ console.log("this.record[fieldRelated] E' NULL", fieldRelated, this.record[fieldRelated], this.record);
4432
+ this.interval = setInterval(() => {
4433
+ console.log("this.record[fieldRelated] CHECK", fieldRelated, this.record[fieldRelated], this.record);
4434
+ if (this.record[fieldRelated] != null) {
4435
+ fieldWithRelation.QueryPropertyValue = this.record[fieldRelated];
4436
+ this.relationsLoaded = true;
4437
+ clearInterval(this.interval);
4438
+ }
4439
+ }, 1000);
4440
+ }
4441
+ else {
4442
+ console.log("this.record[fieldRelated] NON E' NULL!! :)", fieldRelated, this.record[fieldRelated], this.record);
4443
+ fieldWithRelation.QueryPropertyValue = this.record[fieldRelated] != null ? this.record[fieldRelated] : '';
4444
+ }
4431
4445
  });
4432
4446
  }
4447
+ else {
4448
+ this.relationsLoaded = true;
4449
+ }
4433
4450
  }
4434
4451
  else {
4435
4452
  if (this.data == null) {
@@ -4521,10 +4538,10 @@ class DbgetterComponent {
4521
4538
  }
4522
4539
  }
4523
4540
  DbgetterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DbgetterComponent, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
4524
- DbgetterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DbgetterComponent, selector: "dbgetter", inputs: { form: "form", field: "field", record: "record", inConfig: "inConfig", DirectlyOpenTable: "DirectlyOpenTable", QueryEditorComponent: "QueryEditorComponent", data: "data" }, outputs: { out: "out", selectedValue: "selectedValue" }, ngImport: i0, template: "<div [hidden]=\"!showQE\">\r\n <ng-template [appDynamicLoader] [data]=\"QueryEditorComponent\" (out)=\"onExternalSQLResultOut($event);\" *ngIf=\"QueryEditorComponent != null\"></ng-template>\r\n</div>\r\n\r\n\r\n<div class=\"flex dbgetterfield\" *ngIf=\"showButtonReply\">\r\n <button class=\"btn btn-primary\" (click)=\"onClickButtonReply()\"> {{field.Name}} <mat-icon>edit</mat-icon></button>\r\n</div>\r\n\r\n\r\n\r\n<div class=\"floatingtable draggable\" cdkDrag *ngIf=\"showTable\">\r\n <div class=\"header\">\r\n <div class=\"left\"><button class=\"btn btn-small btn-danger\" (click)=\"close()\">Chiudi finestra <mat-icon>close</mat-icon></button></div>\r\n <div class=\"left\"><button class=\"btn btn-small btn-danger\" (click)=\"delete()\">Cancella valore <mat-icon>delete</mat-icon></button></div>\r\n <div class=\"right\"><mat-icon>drag_indicator</mat-icon> Seleziona il valore da registrare. Clicca su questa barra per trascinare.</div>\r\n </div>\r\n <table class=\"table table-notforced\" *ngIf=\"field.DataGetter.DataGetterColumnForce == null\">\r\n <tr><th *ngFor=\"let key of keys; let first = first\">\r\n <span *ngIf=\"first\">{{key}}</span>\r\n <span *ngIf=\"!first\">{{key.split(\"__\")[1]}}</span>\r\n </th></tr>\r\n <tr *ngFor=\"let row of data\" class=\"rows\">\r\n <td *ngFor=\"let key of keys\" (click)=\"selectValueNotForced(row[key])\">\r\n {{row[key] != null ? row[key].toString().substring(0,100) : ''}}<span *ngIf=\"row[key] != null && row[key].toString().length > 100\">...</span>\r\n </td>\r\n </tr>\r\n </table>\r\n <table class=\"table table-forced\" *ngIf=\"field.DataGetter.DataGetterColumnForce != null\">\r\n <tr><th *ngFor=\"let key of keys; let first = first\">\r\n <span *ngIf=\"first\">{{key}}</span>\r\n <span *ngIf=\"!first\">{{key.split(\"__\")[1]}}</span>\r\n </th></tr>\r\n <tr *ngFor=\"let row of data\" class=\"rows\" (click)=\"selectValueForced(row)\">\r\n <td *ngFor=\"let key of keys\">{{row[key] != null ? row[key].toString().substring(0,100) : ''}}<span *ngIf=\"row[key] != null && row[key].toString().length > 100\">...</span></td>\r\n </tr>\r\n </table> \r\n</div>\r\n\r\n<span *ngIf=\"value != null\">{{value}}</span>", styles: [".floatingtable{position:fixed;bottom:10%;left:10%;width:80%;height:80%;background-color:#fff;border:1px solid black;border-radius:10px;margin:0;z-index:9000000000;padding:2px;overflow-x:hidden}.floatingtable .header{cursor:move;display:flex;justify-content:flex-start;height:40px;background-color:#4fa2c0;color:#fff;align-items:center;font-size:19px;padding-right:15px;margin-bottom:10px}.floatingtable .header>*{margin-right:10px}.floatingtable .header .left mat-icon{position:relative;top:5px;left:10px;cursor:pointer!important;background-color:red!important;color:#fff}.floatingtable .header .right mat-icon{position:relative;top:5px}.floatingtable .table.table-notforced{width:99%;margin:0 5px}.floatingtable .table.table-notforced td,.floatingtable .table.table-notforced th{padding:2px 2px 2px 0}.floatingtable .table.table-notforced td span,.floatingtable .table.table-notforced th span{padding:0!important}.floatingtable .table.table-notforced td:hover{cursor:pointer;background-color:#d3d3d3;color:#000}.floatingtable .table.table-forced{width:99%;margin:0 5px}.floatingtable .table.table-forced td,.floatingtable .table.table-forced th{padding:2px 2px 2px 0}.floatingtable .table.table-forced td span,.floatingtable .table.table-forced th span{padding:0!important}.floatingtable .table.table-forced tr.rows:hover{cursor:pointer;background-color:#d3d3d3;color:#000}.btn-small{margin:0;padding:0 16px}\n"], dependencies: [{ kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: i4$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: DynamicLoaderDirective, selector: "[appDynamicLoader]", inputs: ["data"], outputs: ["out"] }] });
4541
+ DbgetterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DbgetterComponent, selector: "dbgetter", inputs: { form: "form", field: "field", record: "record", inConfig: "inConfig", DirectlyOpenTable: "DirectlyOpenTable", QueryEditorComponent: "QueryEditorComponent", data: "data" }, outputs: { out: "out", selectedValue: "selectedValue" }, ngImport: i0, template: "<div [hidden]=\"!showQE\">\r\n <ng-template [appDynamicLoader] [data]=\"QueryEditorComponent\" (out)=\"onExternalSQLResultOut($event);\" *ngIf=\"QueryEditorComponent != null && relationsLoaded\"></ng-template>\r\n</div>\r\n\r\n\r\n<div class=\"flex dbgetterfield\" *ngIf=\"showButtonReply\">\r\n <button class=\"btn btn-primary\" (click)=\"onClickButtonReply()\"> {{field.Name}} <mat-icon>edit</mat-icon></button>\r\n</div>\r\n\r\n\r\n\r\n<div class=\"floatingtable draggable\" cdkDrag *ngIf=\"showTable\">\r\n <div class=\"header\">\r\n <div class=\"left\"><button class=\"btn btn-small btn-danger\" (click)=\"close()\">Chiudi finestra <mat-icon>close</mat-icon></button></div>\r\n <div class=\"left\"><button class=\"btn btn-small btn-danger\" (click)=\"delete()\">Cancella valore <mat-icon>delete</mat-icon></button></div>\r\n <div class=\"right\"><mat-icon>drag_indicator</mat-icon> Seleziona il valore da registrare. Clicca su questa barra per trascinare.</div>\r\n </div>\r\n <table class=\"table table-notforced\" *ngIf=\"field.DataGetter.DataGetterColumnForce == null\">\r\n <tr><th *ngFor=\"let key of keys; let first = first\">\r\n <span *ngIf=\"first\">{{key}}</span>\r\n <span *ngIf=\"!first\">{{key.split(\"__\")[1]}}</span>\r\n </th></tr>\r\n <tr *ngFor=\"let row of data\" class=\"rows\">\r\n <td *ngFor=\"let key of keys\" (click)=\"selectValueNotForced(row[key])\">\r\n {{row[key] != null ? row[key].toString().substring(0,100) : ''}}<span *ngIf=\"row[key] != null && row[key].toString().length > 100\">...</span>\r\n </td>\r\n </tr>\r\n </table>\r\n <table class=\"table table-forced\" *ngIf=\"field.DataGetter.DataGetterColumnForce != null\">\r\n <tr><th *ngFor=\"let key of keys; let first = first\">\r\n <span *ngIf=\"first\">{{key}}</span>\r\n <span *ngIf=\"!first\">{{key.split(\"__\")[1]}}</span>\r\n </th></tr>\r\n <tr *ngFor=\"let row of data\" class=\"rows\" (click)=\"selectValueForced(row)\">\r\n <td *ngFor=\"let key of keys\">{{row[key] != null ? row[key].toString().substring(0,100) : ''}}<span *ngIf=\"row[key] != null && row[key].toString().length > 100\">...</span></td>\r\n </tr>\r\n </table> \r\n</div>\r\n\r\n<span *ngIf=\"value != null\">{{value}}</span>", styles: [".floatingtable{position:fixed;bottom:10%;left:10%;width:80%;height:80%;background-color:#fff;border:1px solid black;border-radius:10px;margin:0;z-index:9000000000;padding:2px;overflow-x:hidden}.floatingtable .header{cursor:move;display:flex;justify-content:flex-start;height:40px;background-color:#4fa2c0;color:#fff;align-items:center;font-size:19px;padding-right:15px;margin-bottom:10px}.floatingtable .header>*{margin-right:10px}.floatingtable .header .left mat-icon{position:relative;top:5px;left:10px;cursor:pointer!important;background-color:red!important;color:#fff}.floatingtable .header .right mat-icon{position:relative;top:5px}.floatingtable .table.table-notforced{width:99%;margin:0 5px}.floatingtable .table.table-notforced td,.floatingtable .table.table-notforced th{padding:2px 2px 2px 0}.floatingtable .table.table-notforced td span,.floatingtable .table.table-notforced th span{padding:0!important}.floatingtable .table.table-notforced td:hover{cursor:pointer;background-color:#d3d3d3;color:#000}.floatingtable .table.table-forced{width:99%;margin:0 5px}.floatingtable .table.table-forced td,.floatingtable .table.table-forced th{padding:2px 2px 2px 0}.floatingtable .table.table-forced td span,.floatingtable .table.table-forced th span{padding:0!important}.floatingtable .table.table-forced tr.rows:hover{cursor:pointer;background-color:#d3d3d3;color:#000}.btn-small{margin:0;padding:0 16px}\n"], dependencies: [{ kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: i4$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: DynamicLoaderDirective, selector: "[appDynamicLoader]", inputs: ["data"], outputs: ["out"] }] });
4525
4542
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DbgetterComponent, decorators: [{
4526
4543
  type: Component,
4527
- args: [{ selector: 'dbgetter', template: "<div [hidden]=\"!showQE\">\r\n <ng-template [appDynamicLoader] [data]=\"QueryEditorComponent\" (out)=\"onExternalSQLResultOut($event);\" *ngIf=\"QueryEditorComponent != null\"></ng-template>\r\n</div>\r\n\r\n\r\n<div class=\"flex dbgetterfield\" *ngIf=\"showButtonReply\">\r\n <button class=\"btn btn-primary\" (click)=\"onClickButtonReply()\"> {{field.Name}} <mat-icon>edit</mat-icon></button>\r\n</div>\r\n\r\n\r\n\r\n<div class=\"floatingtable draggable\" cdkDrag *ngIf=\"showTable\">\r\n <div class=\"header\">\r\n <div class=\"left\"><button class=\"btn btn-small btn-danger\" (click)=\"close()\">Chiudi finestra <mat-icon>close</mat-icon></button></div>\r\n <div class=\"left\"><button class=\"btn btn-small btn-danger\" (click)=\"delete()\">Cancella valore <mat-icon>delete</mat-icon></button></div>\r\n <div class=\"right\"><mat-icon>drag_indicator</mat-icon> Seleziona il valore da registrare. Clicca su questa barra per trascinare.</div>\r\n </div>\r\n <table class=\"table table-notforced\" *ngIf=\"field.DataGetter.DataGetterColumnForce == null\">\r\n <tr><th *ngFor=\"let key of keys; let first = first\">\r\n <span *ngIf=\"first\">{{key}}</span>\r\n <span *ngIf=\"!first\">{{key.split(\"__\")[1]}}</span>\r\n </th></tr>\r\n <tr *ngFor=\"let row of data\" class=\"rows\">\r\n <td *ngFor=\"let key of keys\" (click)=\"selectValueNotForced(row[key])\">\r\n {{row[key] != null ? row[key].toString().substring(0,100) : ''}}<span *ngIf=\"row[key] != null && row[key].toString().length > 100\">...</span>\r\n </td>\r\n </tr>\r\n </table>\r\n <table class=\"table table-forced\" *ngIf=\"field.DataGetter.DataGetterColumnForce != null\">\r\n <tr><th *ngFor=\"let key of keys; let first = first\">\r\n <span *ngIf=\"first\">{{key}}</span>\r\n <span *ngIf=\"!first\">{{key.split(\"__\")[1]}}</span>\r\n </th></tr>\r\n <tr *ngFor=\"let row of data\" class=\"rows\" (click)=\"selectValueForced(row)\">\r\n <td *ngFor=\"let key of keys\">{{row[key] != null ? row[key].toString().substring(0,100) : ''}}<span *ngIf=\"row[key] != null && row[key].toString().length > 100\">...</span></td>\r\n </tr>\r\n </table> \r\n</div>\r\n\r\n<span *ngIf=\"value != null\">{{value}}</span>", styles: [".floatingtable{position:fixed;bottom:10%;left:10%;width:80%;height:80%;background-color:#fff;border:1px solid black;border-radius:10px;margin:0;z-index:9000000000;padding:2px;overflow-x:hidden}.floatingtable .header{cursor:move;display:flex;justify-content:flex-start;height:40px;background-color:#4fa2c0;color:#fff;align-items:center;font-size:19px;padding-right:15px;margin-bottom:10px}.floatingtable .header>*{margin-right:10px}.floatingtable .header .left mat-icon{position:relative;top:5px;left:10px;cursor:pointer!important;background-color:red!important;color:#fff}.floatingtable .header .right mat-icon{position:relative;top:5px}.floatingtable .table.table-notforced{width:99%;margin:0 5px}.floatingtable .table.table-notforced td,.floatingtable .table.table-notforced th{padding:2px 2px 2px 0}.floatingtable .table.table-notforced td span,.floatingtable .table.table-notforced th span{padding:0!important}.floatingtable .table.table-notforced td:hover{cursor:pointer;background-color:#d3d3d3;color:#000}.floatingtable .table.table-forced{width:99%;margin:0 5px}.floatingtable .table.table-forced td,.floatingtable .table.table-forced th{padding:2px 2px 2px 0}.floatingtable .table.table-forced td span,.floatingtable .table.table-forced th span{padding:0!important}.floatingtable .table.table-forced tr.rows:hover{cursor:pointer;background-color:#d3d3d3;color:#000}.btn-small{margin:0;padding:0 16px}\n"] }]
4544
+ args: [{ selector: 'dbgetter', template: "<div [hidden]=\"!showQE\">\r\n <ng-template [appDynamicLoader] [data]=\"QueryEditorComponent\" (out)=\"onExternalSQLResultOut($event);\" *ngIf=\"QueryEditorComponent != null && relationsLoaded\"></ng-template>\r\n</div>\r\n\r\n\r\n<div class=\"flex dbgetterfield\" *ngIf=\"showButtonReply\">\r\n <button class=\"btn btn-primary\" (click)=\"onClickButtonReply()\"> {{field.Name}} <mat-icon>edit</mat-icon></button>\r\n</div>\r\n\r\n\r\n\r\n<div class=\"floatingtable draggable\" cdkDrag *ngIf=\"showTable\">\r\n <div class=\"header\">\r\n <div class=\"left\"><button class=\"btn btn-small btn-danger\" (click)=\"close()\">Chiudi finestra <mat-icon>close</mat-icon></button></div>\r\n <div class=\"left\"><button class=\"btn btn-small btn-danger\" (click)=\"delete()\">Cancella valore <mat-icon>delete</mat-icon></button></div>\r\n <div class=\"right\"><mat-icon>drag_indicator</mat-icon> Seleziona il valore da registrare. Clicca su questa barra per trascinare.</div>\r\n </div>\r\n <table class=\"table table-notforced\" *ngIf=\"field.DataGetter.DataGetterColumnForce == null\">\r\n <tr><th *ngFor=\"let key of keys; let first = first\">\r\n <span *ngIf=\"first\">{{key}}</span>\r\n <span *ngIf=\"!first\">{{key.split(\"__\")[1]}}</span>\r\n </th></tr>\r\n <tr *ngFor=\"let row of data\" class=\"rows\">\r\n <td *ngFor=\"let key of keys\" (click)=\"selectValueNotForced(row[key])\">\r\n {{row[key] != null ? row[key].toString().substring(0,100) : ''}}<span *ngIf=\"row[key] != null && row[key].toString().length > 100\">...</span>\r\n </td>\r\n </tr>\r\n </table>\r\n <table class=\"table table-forced\" *ngIf=\"field.DataGetter.DataGetterColumnForce != null\">\r\n <tr><th *ngFor=\"let key of keys; let first = first\">\r\n <span *ngIf=\"first\">{{key}}</span>\r\n <span *ngIf=\"!first\">{{key.split(\"__\")[1]}}</span>\r\n </th></tr>\r\n <tr *ngFor=\"let row of data\" class=\"rows\" (click)=\"selectValueForced(row)\">\r\n <td *ngFor=\"let key of keys\">{{row[key] != null ? row[key].toString().substring(0,100) : ''}}<span *ngIf=\"row[key] != null && row[key].toString().length > 100\">...</span></td>\r\n </tr>\r\n </table> \r\n</div>\r\n\r\n<span *ngIf=\"value != null\">{{value}}</span>", styles: [".floatingtable{position:fixed;bottom:10%;left:10%;width:80%;height:80%;background-color:#fff;border:1px solid black;border-radius:10px;margin:0;z-index:9000000000;padding:2px;overflow-x:hidden}.floatingtable .header{cursor:move;display:flex;justify-content:flex-start;height:40px;background-color:#4fa2c0;color:#fff;align-items:center;font-size:19px;padding-right:15px;margin-bottom:10px}.floatingtable .header>*{margin-right:10px}.floatingtable .header .left mat-icon{position:relative;top:5px;left:10px;cursor:pointer!important;background-color:red!important;color:#fff}.floatingtable .header .right mat-icon{position:relative;top:5px}.floatingtable .table.table-notforced{width:99%;margin:0 5px}.floatingtable .table.table-notforced td,.floatingtable .table.table-notforced th{padding:2px 2px 2px 0}.floatingtable .table.table-notforced td span,.floatingtable .table.table-notforced th span{padding:0!important}.floatingtable .table.table-notforced td:hover{cursor:pointer;background-color:#d3d3d3;color:#000}.floatingtable .table.table-forced{width:99%;margin:0 5px}.floatingtable .table.table-forced td,.floatingtable .table.table-forced th{padding:2px 2px 2px 0}.floatingtable .table.table-forced td span,.floatingtable .table.table-forced th span{padding:0!important}.floatingtable .table.table-forced tr.rows:hover{cursor:pointer;background-color:#d3d3d3;color:#000}.btn-small{margin:0;padding:0 16px}\n"] }]
4528
4545
  }], ctorParameters: function () { return [{ type: i1.HttpClient }]; }, propDecorators: { form: [{
4529
4546
  type: Input
4530
4547
  }], field: [{