@eqproject/eqp-dynamic-module 2.7.4 → 2.7.6

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,28 @@ 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", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
4432
+ this.interval = setInterval(() => {
4433
+ console.log("this.record[fieldRelated] CHECK", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
4434
+ if (this.record[fieldRelated] != null) {
4435
+ console.log("this.record[fieldRelated] E' CAMBIATO E NON E' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
4436
+ fieldWithRelation.QueryPropertyValue = this.record[fieldRelated];
4437
+ this.relationsLoaded = true;
4438
+ clearInterval(this.interval);
4439
+ }
4440
+ }, 1000);
4441
+ }
4442
+ else {
4443
+ console.log("this.record[fieldRelated] NON E' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
4444
+ fieldWithRelation.QueryPropertyValue = this.record[fieldRelated] != null ? this.record[fieldRelated] : '';
4445
+ this.relationsLoaded = true;
4446
+ }
4431
4447
  });
4432
4448
  }
4449
+ else {
4450
+ this.relationsLoaded = true;
4451
+ }
4433
4452
  }
4434
4453
  else {
4435
4454
  if (this.data == null) {
@@ -4521,10 +4540,10 @@ class DbgetterComponent {
4521
4540
  }
4522
4541
  }
4523
4542
  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"] }] });
4543
+ 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
4544
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DbgetterComponent, decorators: [{
4526
4545
  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"] }]
4546
+ 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
4547
  }], ctorParameters: function () { return [{ type: i1.HttpClient }]; }, propDecorators: { form: [{
4529
4548
  type: Input
4530
4549
  }], field: [{