basesite-shared-grid-lib 15.10.302 → 15.10.305
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.
|
Binary file
|
|
@@ -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';
|
|
@@ -1923,7 +1923,7 @@ class GridLibraryComponent {
|
|
|
1923
1923
|
this.formatterService = formatterService;
|
|
1924
1924
|
this._tokenSharingService = _tokenSharingService;
|
|
1925
1925
|
this.router = router;
|
|
1926
|
-
this.paginationAutoPageSize =
|
|
1926
|
+
this.paginationAutoPageSize = false;
|
|
1927
1927
|
this.rowSelection = 'multiple';
|
|
1928
1928
|
this.enableServerSidePaging = false;
|
|
1929
1929
|
this.cacheBlockSize = 0;
|
|
@@ -2737,6 +2737,7 @@ class GridLibraryComponent {
|
|
|
2737
2737
|
this.dataLoaded = true;
|
|
2738
2738
|
setTimeout(() => this.updatePaginationInfo(), 0);
|
|
2739
2739
|
setTimeout(() => this.applyFilterHighlightingWithRetry(), 100);
|
|
2740
|
+
this.setPageSizeMinusOne(e.api);
|
|
2740
2741
|
this.firstDataRendered.emit(e);
|
|
2741
2742
|
}
|
|
2742
2743
|
onGridReadyExcel(params) {
|
|
@@ -3069,6 +3070,19 @@ class GridLibraryComponent {
|
|
|
3069
3070
|
console.warn('Filter highlighting retry limit reached. Some filter inputs may not be highlighted.');
|
|
3070
3071
|
}
|
|
3071
3072
|
}
|
|
3073
|
+
onGridSizeChanged(params) {
|
|
3074
|
+
this.setPageSizeMinusOne(params.api);
|
|
3075
|
+
}
|
|
3076
|
+
setPageSizeMinusOne(api) {
|
|
3077
|
+
// 1. Get row height (public API)
|
|
3078
|
+
const rowHeight = api.getSizesForCurrentTheme().rowHeight;
|
|
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
|
|
3084
|
+
}
|
|
3085
|
+
}
|
|
3072
3086
|
//destroy all associated subscriptions on component destroy
|
|
3073
3087
|
ngOnDestroy() {
|
|
3074
3088
|
if (this.filterHighlightingObserver) {
|
|
@@ -3141,8 +3155,13 @@ class GridLibraryComponent {
|
|
|
3141
3155
|
observer.disconnect();
|
|
3142
3156
|
});
|
|
3143
3157
|
}
|
|
3158
|
+
onResize() {
|
|
3159
|
+
if (this.gridAPI) {
|
|
3160
|
+
this.setPageSizeMinusOne(this.gridAPI);
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3144
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 }); }
|
|
3145
|
-
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: `
|
|
3146
3165
|
<ag-grid-angular
|
|
3147
3166
|
#agGrid
|
|
3148
3167
|
style="width: 100%;height:98.2vh"
|
|
@@ -3172,6 +3191,7 @@ class GridLibraryComponent {
|
|
|
3172
3191
|
(selectionChanged)="onSelectionChanged($event)"
|
|
3173
3192
|
(filterChanged)="onFilterChanged($event)"
|
|
3174
3193
|
(firstDataRendered)="onFirstDataRendered($event)"
|
|
3194
|
+
(onGridSizeChanged)="onGridSizeChanged($event)"
|
|
3175
3195
|
[rowHeight]="rowHeight"
|
|
3176
3196
|
(paginationChanged)="onPaginationChanged($event)"
|
|
3177
3197
|
[noRowsOverlayComponent]="noRowsOverlayComponent"
|
|
@@ -3254,6 +3274,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
3254
3274
|
(selectionChanged)="onSelectionChanged($event)"
|
|
3255
3275
|
(filterChanged)="onFilterChanged($event)"
|
|
3256
3276
|
(firstDataRendered)="onFirstDataRendered($event)"
|
|
3277
|
+
(onGridSizeChanged)="onGridSizeChanged($event)"
|
|
3257
3278
|
[rowHeight]="rowHeight"
|
|
3258
3279
|
(paginationChanged)="onPaginationChanged($event)"
|
|
3259
3280
|
[noRowsOverlayComponent]="noRowsOverlayComponent"
|
|
@@ -3351,6 +3372,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
3351
3372
|
type: Output
|
|
3352
3373
|
}], gridReady: [{
|
|
3353
3374
|
type: Output
|
|
3375
|
+
}], onResize: [{
|
|
3376
|
+
type: HostListener,
|
|
3377
|
+
args: ['window:resize']
|
|
3354
3378
|
}] } });
|
|
3355
3379
|
|
|
3356
3380
|
class DateHeaderComponent {
|