@fluxhub/fluxhub-lib 11.0.138 → 11.0.140

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.
@@ -19758,6 +19758,7 @@
19758
19758
  this.columnDefs = [];
19759
19759
  this.rowData = [];
19760
19760
  this.selectAll = true;
19761
+ this.selectNumber = 0;
19761
19762
  this.gridOptions = {
19762
19763
  debug: false,
19763
19764
  rowMultiSelectWithClick: true,
@@ -19765,19 +19766,26 @@
19765
19766
  defaultColDef: { resizable: true, sortable: true, floatingFilter: true },
19766
19767
  rowDeselection: false,
19767
19768
  };
19768
- if (this.data) {
19769
- if (this.data.columnDefs)
19770
- this.columnDefs = this.data.columnDefs;
19771
- if (this.data.rowData)
19772
- this.rowData = this.data.rowData;
19773
- if (this.data.title)
19774
- this.title = this.data.title;
19775
- this.selectAll = (this.data.selectAll || true);
19769
+ console.log("🚀 ~ file: win_grid_selection.ts:135 ~ fh_win_grid_selection ~ data:", data);
19770
+ if (data) {
19771
+ if (data.columnDefs)
19772
+ this.columnDefs = data.columnDefs;
19773
+ if (data.rowData)
19774
+ this.rowData = data.rowData;
19775
+ if (data.title)
19776
+ this.title = data.title;
19777
+ this.selectAll = (data.selectAll || true);
19778
+ console.log("🚀 ~ file: win_grid_selection.ts:144 ~ fh_win_grid_selection ~ this.selectAll:", this.selectAll);
19776
19779
  }
19777
19780
  }
19778
19781
  fh_win_grid_selection.prototype.ngAfterViewInit = function () {
19779
19782
  this.fitSizeAll();
19780
19783
  };
19784
+ fh_win_grid_selection.prototype.onSelectionChanged = function (o) {
19785
+ if (!this.gridOptions.api)
19786
+ return;
19787
+ this.selectNumber = this.gridOptions.api.getSelectedRows().length;
19788
+ };
19781
19789
  fh_win_grid_selection.prototype.ck_sel = function () {
19782
19790
  if (!this.gridOptions.api)
19783
19791
  return true;
@@ -19786,8 +19794,12 @@
19786
19794
  fh_win_grid_selection.prototype.onReady = function (a) {
19787
19795
  var _this = this;
19788
19796
  setTimeout(function () {
19789
- if (_this.gridOptions.api && _this.selectAll)
19790
- _this.gridOptions.api.selectAll();
19797
+ console.log("🚀 ~ file: win_grid_selection.ts:104 ~ fh_win_grid_selection ~ setTimeout ~ this.selectAll:", _this.selectAll);
19798
+ if (_this.gridOptions.api)
19799
+ if (_this.selectAll)
19800
+ _this.gridOptions.api.selectAll();
19801
+ else
19802
+ _this.gridOptions.api.deselectAll();
19791
19803
  }, 100);
19792
19804
  };
19793
19805
  fh_win_grid_selection.prototype.autoSizeAll = function () {
@@ -19820,7 +19832,7 @@
19820
19832
  fh_win_grid_selection.decorators = [
19821
19833
  { type: i0.Component, args: [{
19822
19834
  providers: [FHCurrencyPipe],
19823
- template: "\n <div fxLayout=\"column\">\n <div fxFlex=\"100\" fxLayout=\"row\" class=\"dialog_header\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" style=\"width:50%\">\n {{ title }}\n </div>\n <div style=\"width:50%\" fxLayout=\"row\" fxLayoutAlign=\"end start\">\n <img\n src=\"assets/icons/x.png\"\n style=\"cursor: pointer;\"\n (click)=\"dialogRef.close(null)\"\n />\n </div>\n </div>\n <hr style=\"width:100%;size:0.5;color:#DDDDDD\" />\n\n <mat-dialog-content>\n <div fxLayout=\"column\" fxLayoutGap=\"10px\">\n <div\n style=\"width: 100%;\"\n [style.height]=\"m_AppService.getState().body_h - 210 + 'px'\"\n >\n <div style=\"width: 100%; height: 100%;\">\n <ag-grid-angular\n #dtm\n class=\"ag-theme-balham\"\n style=\"width: 100%; height: 100%;\"\n [gridOptions]=\"gridOptions\"\n [columnDefs]=\"columnDefs\"\n [rowData]=\"rowData\"\n (gridReady)=\"onReady($event)\"\n >\n </ag-grid-angular>\n </div>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div\n fxLayout=\"row\"\n fxLayoutAlign=\"10px\"\n fxLayoutAlign=\"center center\"\n fxFlex\n style=\"width:100%\"\n >\n <button\n mat-flat-button\n color=\"primary\"\n [disabled]=\"ck_sel()\"\n (click)=\"ok()\"\n >\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n </button>\n <button mat-flat-button color=\"warn\" (click)=\"dialogRef.close(null)\">\n ANNULLA\n </button>\n </div>\n </mat-dialog-actions>\n </div>\n "
19835
+ template: "\n <div fxLayout=\"column\">\n <div fxFlex=\"100\" fxLayout=\"row\" class=\"dialog_header\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" style=\"width:50%\">\n {{ title }}\n </div>\n <div style=\"width:50%\" fxLayout=\"row\" fxLayoutAlign=\"end start\">\n <img\n src=\"assets/icons/x.png\"\n style=\"cursor: pointer;\"\n (click)=\"dialogRef.close(null)\"\n />\n </div>\n </div>\n <hr style=\"width:100%;size:0.5;color:#DDDDDD\" />\n\n <mat-dialog-content>\n <div fxLayout=\"column\" fxLayoutGap=\"10px\">\n <div\n style=\"width: 100%;\"\n [style.height]=\"m_AppService.getState().body_h - 210 + 'px'\"\n >\n <div style=\"width: 100%; height: 100%;\">\n <ag-grid-angular\n #dtm\n class=\"ag-theme-balham\"\n style=\"width: 100%; height: 100%;\"\n [gridOptions]=\"gridOptions\"\n [columnDefs]=\"columnDefs\"\n [rowData]=\"rowData\"\n (gridReady)=\"onReady($event)\"\n (selectionChanged)=\"onSelectionChanged($event)\"\n >\n </ag-grid-angular>\n </div>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div\n fxLayout=\"row\"\n fxLayoutAlign=\"10px\"\n fxLayoutAlign=\"center center\"\n fxFlex\n style=\"width:100%\"\n >\n <button\n mat-flat-button\n color=\"primary\"\n [disabled]=\"ck_sel()\"\n (click)=\"ok()\"\n >\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OK ({{selectNumber}})&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n </button>\n <button mat-flat-button color=\"warn\" (click)=\"dialogRef.close(null)\">\n ANNULLA\n </button>\n </div>\n </mat-dialog-actions>\n </div>\n "
19824
19836
  },] }
19825
19837
  ];
19826
19838
  fh_win_grid_selection.ctorParameters = function () { return [