basesite-shared-grid-lib 15.10.303 → 15.10.306

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.
@@ -1,7 +1,7 @@
1
1
  import * as i1 from '@angular/common/http';
2
2
  import { HttpHeaders, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
3
3
  import * as i0 from '@angular/core';
4
- import { Injectable, Component, EventEmitter, forwardRef, Input, Output, ViewChild, NgModule } from '@angular/core';
4
+ import { Injectable, Component, EventEmitter, forwardRef, Input, Output, ViewChild, HostListener, NgModule } from '@angular/core';
5
5
  import { BehaviorSubject, Subject } from 'rxjs';
6
6
  import * as i1$1 from '@angular/common';
7
7
  import { CommonModule, DatePipe } from '@angular/common';
@@ -1036,20 +1036,20 @@ class CellRendererComponent {
1036
1036
  return false;
1037
1037
  }
1038
1038
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1039
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: CellRendererComponent, isStandalone: false, selector: "app-cell-data", ngImport: i0, template: `
1040
- <span>
1041
- {{ params.value }}
1042
- </span>
1039
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: CellRendererComponent, isStandalone: false, selector: "app-cell-data", ngImport: i0, template: `
1040
+ <span>
1041
+ {{ params.value }}
1042
+ </span>
1043
1043
  `, isInline: true }); }
1044
1044
  }
1045
1045
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CellRendererComponent, decorators: [{
1046
1046
  type: Component,
1047
1047
  args: [{
1048
1048
  selector: 'app-cell-data',
1049
- template: `
1050
- <span>
1051
- {{ params.value }}
1052
- </span>
1049
+ template: `
1050
+ <span>
1051
+ {{ params.value }}
1052
+ </span>
1053
1053
  `,
1054
1054
  standalone: false
1055
1055
  }]
@@ -1064,52 +1064,52 @@ class FillCellRendererComponent {
1064
1064
  return false;
1065
1065
  }
1066
1066
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FillCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1067
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FillCellRendererComponent, isStandalone: false, selector: "app-fill-cell-data", ngImport: i0, template: `
1068
- <span #dacIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'dacStatus'" [ngStyle]="{'background': rowData.dacIndicator? rowData.dacIndicator : '#fff', 'width':'178px'}" >
1069
- {{ params.value }}
1070
- </span>
1071
- <span #pocIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'completionStatus'" [ngStyle]="{'background': rowData.pocIndicator? rowData.pocIndicator:'#fff', 'width':'95px'}" >
1072
- {{ params.value }}
1073
- </span>
1074
- <span #fundingIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'funding'" [ngStyle]="{'background': rowData.fundingIndicator? rowData.fundingIndicator:'#fff', 'width':'108px'}">
1075
- {{ params.value }}
1076
- </span>
1077
- <span #layoutIndicator class="status-fill-cell" *ngIf="params.value && params.field === 'layout'" >
1078
- {{ params.value }}
1079
- </span>
1080
- <span #facilityIndicator class="info-fill-cell text-white" *ngIf="params.value && params.field === 'facilityName'" [ngStyle]="{'background': 'var(--primary)'}" >
1081
- {{ params.value }}
1082
- </span>
1083
- <span #aeIndicator class="info-fill-cell text-black" *ngIf="params.value && params.field === 'aefirm'" [ngStyle]="{'background': 'var(--gray-6)'}" >
1084
- {{ params.value }}
1085
- </span>
1086
- <span *ngIf="!params.value">{{params.value}}</span>
1067
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FillCellRendererComponent, isStandalone: false, selector: "app-fill-cell-data", ngImport: i0, template: `
1068
+ <span #dacIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'dacStatus'" [ngStyle]="{'background': rowData.dacIndicator? rowData.dacIndicator : '#fff', 'width':'178px'}" >
1069
+ {{ params.value }}
1070
+ </span>
1071
+ <span #pocIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'completionStatus'" [ngStyle]="{'background': rowData.pocIndicator? rowData.pocIndicator:'#fff', 'width':'95px'}" >
1072
+ {{ params.value }}
1073
+ </span>
1074
+ <span #fundingIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'funding'" [ngStyle]="{'background': rowData.fundingIndicator? rowData.fundingIndicator:'#fff', 'width':'108px'}">
1075
+ {{ params.value }}
1076
+ </span>
1077
+ <span #layoutIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'layout'" [ngStyle]="{'background': rowData.layoutIndicator? rowData.layoutIndicator:'#fff', 'width':'104px'}">
1078
+ {{ params.value }}
1079
+ </span>
1080
+ <span #facilityIndicator class="info-fill-cell text-white" *ngIf="params.value && params.field === 'facilityName'" [ngStyle]="{'background': 'var(--primary)'}" >
1081
+ {{ params.value }}
1082
+ </span>
1083
+ <span #aeIndicator class="info-fill-cell text-black" *ngIf="params.value && params.field === 'aefirm'" [ngStyle]="{'background': 'var(--gray-6)'}" >
1084
+ {{ params.value }}
1085
+ </span>
1086
+ <span *ngIf="!params.value">{{params.value}}</span>
1087
1087
  `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
1088
1088
  }
1089
1089
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FillCellRendererComponent, decorators: [{
1090
1090
  type: Component,
1091
1091
  args: [{
1092
1092
  selector: 'app-fill-cell-data',
1093
- template: `
1094
- <span #dacIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'dacStatus'" [ngStyle]="{'background': rowData.dacIndicator? rowData.dacIndicator : '#fff', 'width':'178px'}" >
1095
- {{ params.value }}
1096
- </span>
1097
- <span #pocIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'completionStatus'" [ngStyle]="{'background': rowData.pocIndicator? rowData.pocIndicator:'#fff', 'width':'95px'}" >
1098
- {{ params.value }}
1099
- </span>
1100
- <span #fundingIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'funding'" [ngStyle]="{'background': rowData.fundingIndicator? rowData.fundingIndicator:'#fff', 'width':'108px'}">
1101
- {{ params.value }}
1102
- </span>
1103
- <span #layoutIndicator class="status-fill-cell" *ngIf="params.value && params.field === 'layout'" >
1104
- {{ params.value }}
1105
- </span>
1106
- <span #facilityIndicator class="info-fill-cell text-white" *ngIf="params.value && params.field === 'facilityName'" [ngStyle]="{'background': 'var(--primary)'}" >
1107
- {{ params.value }}
1108
- </span>
1109
- <span #aeIndicator class="info-fill-cell text-black" *ngIf="params.value && params.field === 'aefirm'" [ngStyle]="{'background': 'var(--gray-6)'}" >
1110
- {{ params.value }}
1111
- </span>
1112
- <span *ngIf="!params.value">{{params.value}}</span>
1093
+ template: `
1094
+ <span #dacIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'dacStatus'" [ngStyle]="{'background': rowData.dacIndicator? rowData.dacIndicator : '#fff', 'width':'178px'}" >
1095
+ {{ params.value }}
1096
+ </span>
1097
+ <span #pocIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'completionStatus'" [ngStyle]="{'background': rowData.pocIndicator? rowData.pocIndicator:'#fff', 'width':'95px'}" >
1098
+ {{ params.value }}
1099
+ </span>
1100
+ <span #fundingIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'funding'" [ngStyle]="{'background': rowData.fundingIndicator? rowData.fundingIndicator:'#fff', 'width':'108px'}">
1101
+ {{ params.value }}
1102
+ </span>
1103
+ <span #layoutIndicator class="status-fill-cell text-white" *ngIf="params.value && params.field === 'layout'" [ngStyle]="{'background': rowData.layoutIndicator? rowData.layoutIndicator:'#fff', 'width':'104px'}">
1104
+ {{ params.value }}
1105
+ </span>
1106
+ <span #facilityIndicator class="info-fill-cell text-white" *ngIf="params.value && params.field === 'facilityName'" [ngStyle]="{'background': 'var(--primary)'}" >
1107
+ {{ params.value }}
1108
+ </span>
1109
+ <span #aeIndicator class="info-fill-cell text-black" *ngIf="params.value && params.field === 'aefirm'" [ngStyle]="{'background': 'var(--gray-6)'}" >
1110
+ {{ params.value }}
1111
+ </span>
1112
+ <span *ngIf="!params.value">{{params.value}}</span>
1113
1113
  `,
1114
1114
  standalone: false
1115
1115
  }]
@@ -1923,7 +1923,7 @@ class GridLibraryComponent {
1923
1923
  this.formatterService = formatterService;
1924
1924
  this._tokenSharingService = _tokenSharingService;
1925
1925
  this.router = router;
1926
- this.paginationAutoPageSize = true;
1926
+ this.paginationAutoPageSize = false;
1927
1927
  this.rowSelection = 'multiple';
1928
1928
  this.enableServerSidePaging = false;
1929
1929
  this.cacheBlockSize = 0;
@@ -3074,14 +3074,13 @@ class GridLibraryComponent {
3074
3074
  this.setPageSizeMinusOne(params.api);
3075
3075
  }
3076
3076
  setPageSizeMinusOne(api) {
3077
+ // 1. Get row height (public API)
3077
3078
  const rowHeight = api.getSizesForCurrentTheme().rowHeight;
3078
- // Get the grid's displayed body height (viewport)
3079
- const bodyHeight = api.getDisplayedRowCount() > 0
3080
- ? api.gridOptionsWrapper.eGridDiv.querySelector('.ag-body-viewport').clientHeight
3081
- : 0;
3082
- if (bodyHeight > 0) {
3083
- const rowsThatFit = Math.floor(bodyHeight / rowHeight);
3084
- api.paginationSetPageSize(Math.max(rowsThatFit - 1, 1)); // ensure >=1
3079
+ // 2. Query the body viewport DOM (safe, it's always rendered)
3080
+ const viewportEl = document.querySelector('.ag-body-viewport');
3081
+ if (viewportEl && rowHeight > 0) {
3082
+ const rowsThatFit = Math.floor(viewportEl.clientHeight / rowHeight);
3083
+ api.paginationSetPageSize(Math.max(rowsThatFit - 1, 1)); // avoid 0
3085
3084
  }
3086
3085
  }
3087
3086
  //destroy all associated subscriptions on component destroy
@@ -3156,8 +3155,13 @@ class GridLibraryComponent {
3156
3155
  observer.disconnect();
3157
3156
  });
3158
3157
  }
3158
+ onResize() {
3159
+ if (this.gridAPI) {
3160
+ this.setPageSizeMinusOne(this.gridAPI);
3161
+ }
3162
+ }
3159
3163
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GridLibraryComponent, deps: [{ token: GridLibraryService }, { token: ColumnValueFormatter }, { token: TokenSharingService }, { token: i4$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
3160
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: GridLibraryComponent, isStandalone: false, selector: "lib-basesite-shared-grid-lib", inputs: { overrideColumnDefs: "overrideColumnDefs", columnDefs: "columnDefs", rowData: "rowData", paginationAutoPageSize: "paginationAutoPageSize", rowSelection: "rowSelection", gridId: "gridId", loggedInUser: "loggedInUser", siteId: "siteId", enableServerSidePaging: "enableServerSidePaging", serverDataUrl: "serverDataUrl", environment: "environment", cacheBlockSize: "cacheBlockSize", rowMultiSelectWithClick: "rowMultiSelectWithClick", floatingFilter: "floatingFilter", token: "token", userRoles: "userRoles", rowHeight: "rowHeight", noRowsOverlayComponent: "noRowsOverlayComponent" }, outputs: { btnClickHandler: "btnClickHandler", firstDataRendered: "firstDataRendered", filterChanged: "filterChanged", selectionChanged: "selectionChanged", totalRowCount: "totalRowCount", gridReady: "gridReady" }, usesOnChanges: true, ngImport: i0, template: `
3164
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: GridLibraryComponent, isStandalone: false, selector: "lib-basesite-shared-grid-lib", inputs: { overrideColumnDefs: "overrideColumnDefs", columnDefs: "columnDefs", rowData: "rowData", paginationAutoPageSize: "paginationAutoPageSize", rowSelection: "rowSelection", gridId: "gridId", loggedInUser: "loggedInUser", siteId: "siteId", enableServerSidePaging: "enableServerSidePaging", serverDataUrl: "serverDataUrl", environment: "environment", cacheBlockSize: "cacheBlockSize", rowMultiSelectWithClick: "rowMultiSelectWithClick", floatingFilter: "floatingFilter", token: "token", userRoles: "userRoles", rowHeight: "rowHeight", noRowsOverlayComponent: "noRowsOverlayComponent" }, outputs: { btnClickHandler: "btnClickHandler", firstDataRendered: "firstDataRendered", filterChanged: "filterChanged", selectionChanged: "selectionChanged", totalRowCount: "totalRowCount", gridReady: "gridReady" }, host: { listeners: { "window:resize": "onResize()" } }, usesOnChanges: true, ngImport: i0, template: `
3161
3165
  <ag-grid-angular
3162
3166
  #agGrid
3163
3167
  style="width: 100%;height:98.2vh"
@@ -3368,6 +3372,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
3368
3372
  type: Output
3369
3373
  }], gridReady: [{
3370
3374
  type: Output
3375
+ }], onResize: [{
3376
+ type: HostListener,
3377
+ args: ['window:resize']
3371
3378
  }] } });
3372
3379
 
3373
3380
  class DateHeaderComponent {
@@ -3384,26 +3391,26 @@ class DateHeaderComponent {
3384
3391
  this.params.setSort(newSort);
3385
3392
  }
3386
3393
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DateHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3387
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DateHeaderComponent, isStandalone: false, selector: "app-date-header", ngImport: i0, template: `
3388
- <span>
3389
- {{ params.displayName }}
3390
- <i class="fa-solid fa-calendar-days" style="margin-left: 4px;"></i>
3391
- <span #menuButton (click)="toggleSort()">{{ params.displayName }}</span>
3392
- <span (click)="params.showColumnMenu(menuButton)">☰</span>
3393
- </span>
3394
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DateHeaderComponent, isStandalone: false, selector: "app-date-header", ngImport: i0, template: `
3395
+ <span>
3396
+ {{ params.displayName }}
3397
+ <i class="fa-solid fa-calendar-days" style="margin-left: 4px;"></i>
3398
+ <span #menuButton (click)="toggleSort()">{{ params.displayName }}</span>
3399
+ <span (click)="params.showColumnMenu(menuButton)">☰</span>
3400
+ </span>
3394
3401
  `, isInline: true }); }
3395
3402
  }
3396
3403
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DateHeaderComponent, decorators: [{
3397
3404
  type: Component,
3398
3405
  args: [{
3399
3406
  selector: 'app-date-header',
3400
- template: `
3401
- <span>
3402
- {{ params.displayName }}
3403
- <i class="fa-solid fa-calendar-days" style="margin-left: 4px;"></i>
3404
- <span #menuButton (click)="toggleSort()">{{ params.displayName }}</span>
3405
- <span (click)="params.showColumnMenu(menuButton)">☰</span>
3406
- </span>
3407
+ template: `
3408
+ <span>
3409
+ {{ params.displayName }}
3410
+ <i class="fa-solid fa-calendar-days" style="margin-left: 4px;"></i>
3411
+ <span #menuButton (click)="toggleSort()">{{ params.displayName }}</span>
3412
+ <span (click)="params.showColumnMenu(menuButton)">☰</span>
3413
+ </span>
3407
3414
  `,
3408
3415
  standalone: false
3409
3416
  }]
@@ -3414,20 +3421,20 @@ class HeaderComponent {
3414
3421
  this.params = params;
3415
3422
  }
3416
3423
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3417
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: HeaderComponent, isStandalone: false, selector: "app-date-header", ngImport: i0, template: `
3418
- <span>
3419
- {{ params.displayName }}
3420
- </span>
3424
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: HeaderComponent, isStandalone: false, selector: "app-date-header", ngImport: i0, template: `
3425
+ <span>
3426
+ {{ params.displayName }}
3427
+ </span>
3421
3428
  `, isInline: true }); }
3422
3429
  }
3423
3430
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: HeaderComponent, decorators: [{
3424
3431
  type: Component,
3425
3432
  args: [{
3426
3433
  selector: 'app-date-header',
3427
- template: `
3428
- <span>
3429
- {{ params.displayName }}
3430
- </span>
3434
+ template: `
3435
+ <span>
3436
+ {{ params.displayName }}
3437
+ </span>
3431
3438
  `, standalone: false
3432
3439
  }]
3433
3440
  }] });