@genesislcap/grid-pro 14.501.0 → 15.0.0
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.
- package/dist/custom-elements.json +14 -618
- package/dist/dts/datasource/base.datasource.d.ts +0 -1
- package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/base.types.d.ts +0 -1
- package/dist/dts/datasource/base.types.d.ts.map +1 -1
- package/dist/dts/datasource/client-side.datasource.d.ts +1 -1
- package/dist/dts/datasource/server-side.datasource.d.ts +1 -2
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-base.d.ts +1 -10
- package/dist/dts/datasource/server-side.resource-base.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-dataserver.d.ts +1 -2
- package/dist/dts/datasource/server-side.resource-dataserver.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-reqrep.d.ts +2 -2
- package/dist/dts/datasource/server-side.resource-reqrep.d.ts.map +1 -1
- package/dist/dts/grid-pro-beta.d.ts +1 -23
- package/dist/dts/grid-pro-beta.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/datasource-events.types.d.ts +1 -7
- package/dist/dts/grid-pro-genesis-datasource/datasource-events.types.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +1 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +1 -23
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/grid-pro.types.d.ts +0 -1
- package/dist/dts/grid-pro.types.d.ts.map +1 -1
- package/dist/dts/react.d.ts +4 -4
- package/dist/dts/status-bar-components/index.d.ts +0 -1
- package/dist/dts/status-bar-components/index.d.ts.map +1 -1
- package/dist/dts/status-bar-components/load-more.status-bar.d.ts +0 -2
- package/dist/dts/status-bar-components/load-more.status-bar.d.ts.map +1 -1
- package/dist/dts/status-bar-components/row-count.status-bar.d.ts +1 -2
- package/dist/dts/status-bar-components/row-count.status-bar.d.ts.map +1 -1
- package/dist/esm/datasource/base.datasource.js +1 -1
- package/dist/esm/datasource/client-side.datasource.js +1 -1
- package/dist/esm/datasource/server-side.datasource.js +3 -13
- package/dist/esm/datasource/server-side.resource-base.js +1 -26
- package/dist/esm/datasource/server-side.resource-dataserver.js +25 -150
- package/dist/esm/datasource/server-side.resource-reqrep.js +10 -37
- package/dist/esm/grid-pro-beta.js +8 -52
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +2 -4
- package/dist/esm/grid-pro.js +8 -52
- package/dist/esm/grid-pro.types.js +0 -1
- package/dist/esm/status-bar-components/index.js +0 -1
- package/dist/esm/status-bar-components/load-more.status-bar.js +5 -19
- package/dist/esm/status-bar-components/row-count.status-bar.js +1 -2
- package/dist/grid-pro.api.json +12 -430
- package/dist/grid-pro.d.ts +7 -96
- package/package.json +14 -14
- package/dist/dts/status-bar-components/pagination.status-bar.d.ts +0 -32
- package/dist/dts/status-bar-components/pagination.status-bar.d.ts.map +0 -1
- package/dist/esm/status-bar-components/pagination.status-bar.js +0 -238
package/dist/esm/grid-pro.js
CHANGED
|
@@ -23,7 +23,7 @@ import { foundationGridProStyles as styles } from './grid-pro.styles';
|
|
|
23
23
|
import { gridProTemplate as template } from './grid-pro.template';
|
|
24
24
|
import { AgGridTheme, agThemeFontsId, agThemeTokenMapClassname, DEFAULT_STATUS_BAR_CONFIG, EDITED_COLUMN_FIELD, ERROR_COLUMN_FIELD, GRID_READY_EVENT, GridOptionsConfig, GridProRendererTypes, GridProStatusBarTypes, } from './grid-pro.types';
|
|
25
25
|
import { StatePersistence } from './state-persistence';
|
|
26
|
-
import { LabelValueStatusBarComponent, LoadMoreStatusBarComponent,
|
|
26
|
+
import { LabelValueStatusBarComponent, LoadMoreStatusBarComponent, ReloadStatusBarComponent, RowCountStatusBarComponent, } from './status-bar-components';
|
|
27
27
|
import { ErrorTooltip } from './tooltips';
|
|
28
28
|
import { convertColDefsToColumnStates, convertToKebabCase, logger, mergeAndDedupColDefWithColumnState, sanitizeColumnState, } from './utils';
|
|
29
29
|
avoidTreeShaking(GridProGenesisDatasource, GridProClientSideDatasource, GridProServerSideDatasource, GridProCell, GridProColumn);
|
|
@@ -149,17 +149,6 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
149
149
|
this.columnComponentName = 'grid-pro-column';
|
|
150
150
|
this.theme = AgGridTheme.alpine;
|
|
151
151
|
this.themeMode = 'dark';
|
|
152
|
-
/**
|
|
153
|
-
* Enable pagination for the grid.
|
|
154
|
-
* @remarks
|
|
155
|
-
* When enabled, the grid will automatically configure pagination settings.
|
|
156
|
-
* Note that AG Grid's full pagination functionality requires the Enterprise module.
|
|
157
|
-
* While basic pagination will work in Community edition, advanced features like
|
|
158
|
-
* custom pagination components require Enterprise.
|
|
159
|
-
* @see https://www.ag-grid.com/javascript-data-grid/row-pagination/
|
|
160
|
-
* @see https://www.ag-grid.com/javascript-data-grid/server-side-model-pagination/
|
|
161
|
-
*/
|
|
162
|
-
this.pagination = false;
|
|
163
152
|
/**
|
|
164
153
|
* Configuration for the grid status bar components.
|
|
165
154
|
* @remarks
|
|
@@ -278,9 +267,6 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
278
267
|
configurable: true,
|
|
279
268
|
});
|
|
280
269
|
});
|
|
281
|
-
this.paginationPageSize = this.isServerSide
|
|
282
|
-
? this.gridProDatasource.maxRows
|
|
283
|
-
: DatasourceDefaults.DEFAULT_PAGINATION_PAGE_SIZE;
|
|
284
270
|
}
|
|
285
271
|
disconnectedCallback() {
|
|
286
272
|
this.disposed = true;
|
|
@@ -658,7 +644,6 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
658
644
|
[GridProRendererTypes.stringEditor]: StringEditor,
|
|
659
645
|
[GridProStatusBarTypes.labelValue]: LabelValueStatusBarComponent,
|
|
660
646
|
[GridProStatusBarTypes.loadMore]: LoadMoreStatusBarComponent,
|
|
661
|
-
[GridProStatusBarTypes.pagination]: PaginationStatusBarComponent,
|
|
662
647
|
[GridProStatusBarTypes.reload]: ReloadStatusBarComponent,
|
|
663
648
|
[GridProStatusBarTypes.rowCount]: RowCountStatusBarComponent,
|
|
664
649
|
};
|
|
@@ -1005,9 +990,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
1005
990
|
// Emit datasource ready event, signals that the datasource is ready to be used
|
|
1006
991
|
// TODO: prevent rendering datasource slot until grid is ready
|
|
1007
992
|
// so there is no need for this even and handling it in datasources
|
|
1008
|
-
(_b = this.gridProDatasource) === null || _b === void 0 ? void 0 : _b.$emit(datasourceEventNames.ready
|
|
1009
|
-
pagination: this.pagination,
|
|
1010
|
-
});
|
|
993
|
+
(_b = this.gridProDatasource) === null || _b === void 0 ? void 0 : _b.$emit(datasourceEventNames.ready);
|
|
1011
994
|
this.restoreColumnState();
|
|
1012
995
|
this.restoreCachedFilterConfig();
|
|
1013
996
|
this.debouncedColumnAutosize();
|
|
@@ -1048,7 +1031,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
1048
1031
|
if (hasGetRowId) {
|
|
1049
1032
|
derivedOptions.getRowId = getRowId;
|
|
1050
1033
|
}
|
|
1051
|
-
this.
|
|
1034
|
+
this.setupStatusBar(derivedOptions);
|
|
1052
1035
|
this.setLocalGridOptions(derivedOptions);
|
|
1053
1036
|
}
|
|
1054
1037
|
else {
|
|
@@ -1060,7 +1043,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
1060
1043
|
if (hasGetRowId) {
|
|
1061
1044
|
derivedOptions.getRowId = getRowId;
|
|
1062
1045
|
}
|
|
1063
|
-
this.
|
|
1046
|
+
this.setupStatusBar(derivedOptions);
|
|
1064
1047
|
this.setLocalGridOptions(derivedOptions);
|
|
1065
1048
|
this.initGrid();
|
|
1066
1049
|
});
|
|
@@ -1222,13 +1205,11 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
1222
1205
|
return panels.some((panel) => panel.statusPanel === statusPanelType);
|
|
1223
1206
|
}
|
|
1224
1207
|
addRowCountPanel(statusPanels, gridOptions) {
|
|
1225
|
-
//
|
|
1226
|
-
//
|
|
1227
|
-
// where pagination is disabled.
|
|
1208
|
+
// The custom rowCount panel is used for server-side infinite scroll (load more) scenarios;
|
|
1209
|
+
// client-side row models use AG Grid's own row count component instead.
|
|
1228
1210
|
if (this.statusBarConfig && this.statusBarConfig.rows === true) {
|
|
1229
1211
|
const isServerSide = this.isServerSide || (gridOptions === null || gridOptions === void 0 ? void 0 : gridOptions.rowModelType) === 'serverSide';
|
|
1230
|
-
|
|
1231
|
-
if (isServerSide && !isPaginationEnabled) {
|
|
1212
|
+
if (isServerSide) {
|
|
1232
1213
|
if (!this.panelExists(GridProStatusBarTypes.rowCount, statusPanels)) {
|
|
1233
1214
|
statusPanels.push({
|
|
1234
1215
|
statusPanel: GridProStatusBarTypes.rowCount,
|
|
@@ -1280,25 +1261,10 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
1280
1261
|
statusPanels.push(...newDatasourcePanels);
|
|
1281
1262
|
}
|
|
1282
1263
|
}
|
|
1283
|
-
|
|
1284
|
-
if (this['_pagination']) {
|
|
1285
|
-
if (!this.panelExists(GridProStatusBarTypes.pagination, statusPanels)) {
|
|
1286
|
-
statusPanels.push({
|
|
1287
|
-
statusPanel: GridProStatusBarTypes.pagination,
|
|
1288
|
-
align: 'right',
|
|
1289
|
-
});
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
setupPaginationAndStatusBar(gridOptions) {
|
|
1264
|
+
setupStatusBar(gridOptions) {
|
|
1294
1265
|
// Keep the guard for production code, but allow override for testing
|
|
1295
1266
|
// if (this.initialised && !allowDuplicateCheck) return;
|
|
1296
1267
|
var _a, _b;
|
|
1297
|
-
if (this['_pagination']) {
|
|
1298
|
-
gridOptions.pagination = true;
|
|
1299
|
-
gridOptions.suppressScrollOnNewData = true;
|
|
1300
|
-
gridOptions.paginationPageSize = this.paginationPageSize;
|
|
1301
|
-
}
|
|
1302
1268
|
// Set default status bar with components based on configuration
|
|
1303
1269
|
if (this.withStatusBar && this.statusBarConfig) {
|
|
1304
1270
|
// For duplicate checking (testing scenario), clear existing status panels to prevent duplicates
|
|
@@ -1309,10 +1275,6 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
1309
1275
|
this.addMaxRowsPanel(statusPanels);
|
|
1310
1276
|
this.addAggregationPanel(statusPanels);
|
|
1311
1277
|
this.addDatasourcePanels(statusPanels);
|
|
1312
|
-
if (this['_pagination']) {
|
|
1313
|
-
gridOptions.suppressPaginationPanel = true;
|
|
1314
|
-
this.addPaginationPanel(statusPanels);
|
|
1315
|
-
}
|
|
1316
1278
|
const userDefinedStatusPanels = ((_b = gridOptions.statusBar) === null || _b === void 0 ? void 0 : _b.statusPanels) || [];
|
|
1317
1279
|
const newUserDefinedPanels = userDefinedStatusPanels.filter((panel) => !this.panelExists(panel.statusPanel, statusPanels));
|
|
1318
1280
|
statusPanels.push(...newUserDefinedPanels);
|
|
@@ -1558,12 +1520,6 @@ __decorate([
|
|
|
1558
1520
|
__decorate([
|
|
1559
1521
|
observable
|
|
1560
1522
|
], GridPro.prototype, "gridComponents", void 0);
|
|
1561
|
-
__decorate([
|
|
1562
|
-
attr({ mode: 'boolean' })
|
|
1563
|
-
], GridPro.prototype, "pagination", void 0);
|
|
1564
|
-
__decorate([
|
|
1565
|
-
attr({ attribute: 'pagination-page-size' })
|
|
1566
|
-
], GridPro.prototype, "paginationPageSize", void 0);
|
|
1567
1523
|
__decorate([
|
|
1568
1524
|
observable
|
|
1569
1525
|
], GridPro.prototype, "statusBarConfig", void 0);
|
|
@@ -148,7 +148,6 @@ export var GridProRendererTypes;
|
|
|
148
148
|
export var GridProStatusBarTypes;
|
|
149
149
|
(function (GridProStatusBarTypes) {
|
|
150
150
|
GridProStatusBarTypes["labelValue"] = "labelValue";
|
|
151
|
-
GridProStatusBarTypes["pagination"] = "pagination";
|
|
152
151
|
GridProStatusBarTypes["loadMore"] = "loadMore";
|
|
153
152
|
GridProStatusBarTypes["reload"] = "reload";
|
|
154
153
|
GridProStatusBarTypes["rowCount"] = "rowCount";
|
|
@@ -9,12 +9,9 @@ export class LoadMoreStatusBarComponent {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
this.buttonLabel = 'Load More';
|
|
11
11
|
this.isLoading = false;
|
|
12
|
-
this.isLeftAligned = false;
|
|
13
12
|
}
|
|
14
13
|
init(params) {
|
|
15
|
-
var _a, _b, _c;
|
|
16
14
|
this.params = params;
|
|
17
|
-
this.gridApi = params.api;
|
|
18
15
|
this.element = document.createElement('div');
|
|
19
16
|
this.element.classList.add('ag-status-panel', 'ag-load-more-panel');
|
|
20
17
|
this.element.setAttribute('data-test-id', 'grid-load-more-panel');
|
|
@@ -22,10 +19,7 @@ export class LoadMoreStatusBarComponent {
|
|
|
22
19
|
this.element.setAttribute('aria-label', 'Load more data controls');
|
|
23
20
|
this.element.style.display = 'flex';
|
|
24
21
|
this.element.style.alignItems = 'center';
|
|
25
|
-
|
|
26
|
-
// When pagination is enabled, load more is aligned left, otherwise right
|
|
27
|
-
this.isLeftAligned = ((_c = (_b = (_a = this.gridApi) === null || _a === void 0 ? void 0 : _a.gridOptionsService) === null || _b === void 0 ? void 0 : _b.gridOptions) === null || _c === void 0 ? void 0 : _c.pagination) || false;
|
|
28
|
-
this.element.style.justifyContent = this.isLeftAligned ? 'flex-start' : 'flex-end';
|
|
22
|
+
this.element.style.justifyContent = 'flex-end';
|
|
29
23
|
// Only add padding on the side where the button is
|
|
30
24
|
this.element.style.paddingLeft = 'var(--ag-grid-size)';
|
|
31
25
|
this.element.style.paddingRight = 'var(--ag-grid-size)';
|
|
@@ -39,17 +33,9 @@ export class LoadMoreStatusBarComponent {
|
|
|
39
33
|
while (this.element.firstChild) {
|
|
40
34
|
this.element.removeChild(this.element.firstChild);
|
|
41
35
|
}
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
this.element.appendChild(this.loadMoreButton);
|
|
46
|
-
this.element.appendChild(this.progressRing);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
// Right-aligned: Progress ring first, then button
|
|
50
|
-
this.element.appendChild(this.progressRing);
|
|
51
|
-
this.element.appendChild(this.loadMoreButton);
|
|
52
|
-
}
|
|
36
|
+
// Right-aligned: progress ring first, then button
|
|
37
|
+
this.element.appendChild(this.progressRing);
|
|
38
|
+
this.element.appendChild(this.loadMoreButton);
|
|
53
39
|
}
|
|
54
40
|
createProgressRing() {
|
|
55
41
|
// Create the progress ring with the appropriate design system prefix
|
|
@@ -60,7 +46,7 @@ export class LoadMoreStatusBarComponent {
|
|
|
60
46
|
this.progressRing.style.width = '20px';
|
|
61
47
|
this.progressRing.style.height = '20px';
|
|
62
48
|
// Different margin based on alignment - when left-aligned, progress ring goes after button
|
|
63
|
-
this.progressRing.style.margin =
|
|
49
|
+
this.progressRing.style.margin = '0 8px 0 0';
|
|
64
50
|
this.progressRing.style.display = 'none'; // Hidden by default
|
|
65
51
|
}
|
|
66
52
|
createLoadMoreButton() {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Row Count Status Bar Component for Server-Side Infinite Scroll
|
|
3
|
-
* Displays current row count information for server-side grids
|
|
4
|
-
* For pagination scenarios, use PaginationStatusBarComponent instead.
|
|
3
|
+
* Displays current row count information for server-side grids.
|
|
5
4
|
* @public
|
|
6
5
|
*/
|
|
7
6
|
export class RowCountStatusBarComponent {
|